earthsdk3 3.2.0-beta.7 → 3.3.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/earthsdk3.iife.js +16 -16
- package/dist/earthsdk3.js +693 -679
- package/dist/earthsdk3.umd.cjs +17 -17
- package/dist/types/ESJTypes/properties/Viewer.d.ts +14 -1
- package/dist/types/ESJTypes/properties/Viewer.d.ts.map +1 -1
- package/dist/types/ESObjectManager/index.d.ts +15 -1
- package/dist/types/ESObjectManager/index.d.ts.map +1 -1
- package/dist/types/ESObjects/general/ES3DTileset/index.d.ts +3 -0
- package/dist/types/ESObjects/general/ES3DTileset/index.d.ts.map +1 -1
- package/dist/types/ESViewer/ViewerContext.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/earthsdk3.iife.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var EarthSDK3=function(N,d){"use strict";var zI=Object.defineProperty;var VI=(N,d,ql)=>d in N?zI(N,d,{enumerable:!0,configurable:!0,writable:!0,value:ql}):N[d]=ql;var p=(N,d,ql)=>VI(N,typeof d!="symbol"?d+"":d,ql);class ql extends d.Destroyable{constructor(){super(...arguments);p(this,"registerEngines",{})}register(e,n,i){const s=this.registerEngines[e]||new Map;s.has(n)&&console.warn(`register warn:${e}中${n}的实现类已经被注册,再次注册会覆盖。`),s.set(n,i),this.registerEngines[e]=s}getEngineObjConstructor(e,n){const s=(this.registerEngines[n]||new Map).get(e);if(s)return s;console.warn(`未找到${e}在${n}中对应的实现类!`)}createEngineObject(e,n){const i=this.getEngineObjConstructor(e.typeName,n.typeName);if(i){const s=new i(e,n);return s.createdEvent.emit(),s}else{const s=new Oa(e,n);return s.createdEvent.emit(),s}}}class lv extends d.Destroyable{constructor(){super(...arguments);p(this,"registerEngines",{})}register(e,n,i){const s=this.registerEngines[e]||new Map;s.has(n)&&console.warn(`register warn:${e}中${n}的实现类已经被注册,再次注册会覆盖。`),s.set(n,i),this.registerEngines[e]=s}getEngineObjConstructor(e,n){const s=(this.registerEngines[n]||new Map).get(e);if(s)return s;console.warn(`未找到${e}在${n}中对应的实现类!`)}createEngineObject(e,n){const i=this.getEngineObjConstructor(e.typeName,n.typeName);if(i){const s=new i(e,n);return s.createdEvent.emit(),s}else{const s=new Oa(e,n);return s.createdEvent.emit(),s}}}const si=class si extends d.Destroyable{constructor(e,n,i=!1){super();p(this,"_createdEvent",this.dv(new d.Event));p(this,"_id",++si._accumId);this._sceneObject=e,this._viewer=n;{if(i)return;e.viewer=n,e.viewerChanged.emit(n);const s=(a,o)=>{for(let l of a)this._viewer.delete(l);for(let l of o)this._viewer.add(l)};s([],this._sceneObject.components.values()),this.d(this._sceneObject.components.toChange.don(s)),this.d(()=>s(this._sceneObject.components.values(),[]))}}get createdEvent(){return this._createdEvent}get sceneObject(){return this._sceneObject}get viewer(){return this._viewer}get id(){return this._id}};p(si,"context",new ql),p(si,"contextEditing",new lv),p(si,"register",si.context.register.bind(si.context)),p(si,"registerEditing",si.contextEditing.register.bind(si.contextEditing)),p(si,"_accumId",-1);let Oa=si;const tf=class tf extends d.Destroyable{constructor(e,n){super();p(this,"_id",++tf._accumId);this._name=e,this._description=n}get id(){return this._id}get name(){return this._name}get description(){return this._description}};p(tf,"_accumId",-1);let Ys=tf;class ff extends Ys{constructor(t,e,n,i,s){super(t,e),this._withUndefined=n,this._readonly=i,this._defaultValue=s}get withUndefined(){return this._withUndefined}get readonly(){return this._readonly}get defaultValue(){return this._defaultValue instanceof Function?this._defaultValue():this._defaultValue}}class Rt extends ff{constructor(t,e,n,i,s,a){super(t,e,n,i,a),this._reactVar=s}get reactVar(){return this._reactVar}}class U extends Rt{get type(){return"BooleanProperty"}}class nt extends Rt{get type(){return"StringProperty"}}class C extends Rt{get type(){return"NumberProperty"}}class uv extends Rt{get type(){return"MaximumScreenSpaceErrorProperty"}}class tp extends Rt{get type(){return"StringsProperty"}}class hv extends Rt{get type(){return"NumbersProperty"}}class cv extends Rt{get type(){return"BooleansProperty"}}class fv extends Rt{get type(){return"String2Property"}}class dv extends Rt{get type(){return"String3Property"}}class pv extends Rt{get type(){return"String4Property"}}class ep extends Rt{get type(){return"String2sProperty"}}class gv extends Rt{get type(){return"String3sProperty"}}class mv extends Rt{get type(){return"String4sProperty"}}class se extends Rt{get type(){return"Number2Property"}}class Qe extends Rt{get type(){return"Number3Property"}}class Rr extends Rt{get type(){return"Number4Property"}}class vv extends Rt{get type(){return"Number4WithUndefinedProperty"}}class rp extends Rt{get type(){return"Number2sProperty"}}class df extends Rt{get type(){return"Number3sProperty"}}class yv extends Rt{get type(){return"Number4sProperty"}}class _v extends Rt{get type(){return"Boolean2Property"}}class wv extends Rt{get type(){return"Boolean3Property"}}class Ev extends Rt{get type(){return"Boolean4Property"}}class Sv extends Rt{get type(){return"Boolean2sProperty"}}class Pv extends Rt{get type(){return"Boolean3sProperty"}}class Cv extends Rt{get type(){return"Boolean4sProperty"}}class Iv extends Rt{get type(){return"StringNumberProperty"}}class Mv extends Rt{get type(){return"StringNumbersProperty"}}class it extends Rr{get type(){return"ColorProperty"}}class Nv extends Qe{get type(){return"ColorRgbProperty"}}class bv extends C{get type(){return"DashPatternProperty"}}class tt extends Rt{constructor(t,e,n,i,s,a,o){super(t,e,n,i,s,o),this._enums=a}get type(){return"EnumProperty"}get enums(){return this._enums}}class Tv extends Rt{constructor(t,e,n,i,s,a,o){super(t,e,n,i,s,o),this._enums=a}get type(){return"EnumStringsProperty"}get enums(){return this._enums}}class Fi extends Rt{constructor(t,e,n,i,s,a,o){super(t,e,n,i,s,a),this._sampleValue=o}get sampleValue(){return this._sampleValue}get type(){return"EvalStringProperty"}}class np extends Rt{constructor(t,e,n,i,s){super(t,e,!1,!1,n,s),this._paramTypes=i}get type(){return"ParamsProperty"}get paramTypes(){return this._paramTypes}}class mt extends Ys{constructor(e,n,i,s,a){super(e,n);p(this,"_paramsProperty");p(this,"_getValueFunc");this._func=s;const o=this.disposeVar(d.reactJson(a));this._paramsProperty=this.disposeVar(new np(e+"_params",e+"_params",o,i,a));const[l]=d.getReactFuncs(this._paramsProperty.reactVar);this._getValueFunc=l}get paramsProperty(){return this._paramsProperty}exec(){this._func(...this._getValueFunc())}get type(){return"FunctionProperty"}}class H extends Ys{constructor(t,e,n){super(t,e),this._children=n}get type(){return"GroupProperty"}get children(){return this._children}}class Y extends Rt{constructor(t,e,n,i,s,a,o){super(t,e,n,i,s,a),this._sampleValue=o}get sampleValue(){return this._sampleValue}get type(){return"JsonProperty"}}class Xh extends Rt{constructor(t,e,n,i,s,a,o){super(t,e,n,i,s,a),this._sampleValue=o}get sampleValue(){return this._sampleValue}get type(){return"LongStringProperty"}}class Dv extends se{get type(){return"MinmaxProperty"}}class xv extends Rr{get type(){return"NearFarScalerProperty"}}class ip extends ff{constructor(t,e,n,i,s,a,o){super(t,e,n,i,o),this._getJsonStringFunc=s,this._setJsonStringFunc=a}get type(){return"NonreactiveJsonStringProperty"}get getJsonStringFunc(){return this._getJsonStringFunc}get setJsonStringFunc(){return this._setJsonStringFunc}}class Ov extends se{get type(){return"NumberRangeProperty"}}class Kt extends Rt{constructor(t,e,n,i,s,a,o,l){super(t,e,n,i,s,l),this._step=a,this._minMax=o}get type(){return"NumberSliderProperty"}get minMax(){return this._minMax}get step(){return this._step}}function Av(r,t){const[e,n,i]=d.getReactFuncs(r),[s,a,o]=d.getReactFuncs(t),l=d.react((e()??0)/(s()??3e3)),u=()=>{const c=l.value,h=s()??3e3,f=e()??0;if(!Number.isFinite(h)||!Number.isFinite(f)){console.warn(`duration || currentTime error: duration: ${h} currentTime: ${f}`);return}Math.abs(c*h-f)<.001||(h<=0?l.value=0:l.value=f/h)};return l.dispose(i.disposableOn(u)),l.dispose(o.disposableOn(u)),l.dispose(l.changed.disposableOn(()=>{const c=l.value,h=s()??3e3,f=e()??0;if(!Number.isFinite(h)||!Number.isFinite(f)){console.warn(`duration || currentTime error: duration: ${h} currentTime: ${f}`);return}Math.abs(c*h-f)<.001||n(c*h)})),l}class Yh extends Ys{constructor(e,n,i,s,a,o){super(e,n);p(this,"_defaults",{playing:!1,ratio:0,loop:!1});this._playingReact=i,this._ratioReact=s,this._loopReact=a,o&&(this._defaults.playing=o.playing??this._defaults.playing,this._defaults.ratio=o.ratio??this._defaults.ratio,this._defaults.loop=o.loop??this._defaults.loop)}get type(){return"PlayerProperty"}get playingReact(){return this._playingReact}get ratioReact(){return this._ratioReact}get loopReact(){return this._loopReact}get defaults(){return this._defaults}}p(Yh,"createPlayingRatio",Av);class li extends Qe{get type(){return"PositionProperty"}}class sp extends Rt{get type(){return"PositionsProperty"}}class Lv extends Rt{get type(){return"PositionsSetPropety"}}class Jh extends Qe{get type(){return"RotationProperty"}}class ku extends nt{get type(){return"UriProperty"}}class ap extends Ys{constructor(e,n,i,s,a,o){super(e,n);p(this,"_defaults",{playing:!1,loop:!1});this._playingReact=i,this._stopFn=s,this._loopReact=a,o&&(this._defaults.playing=o.playing??this._defaults.playing,this._defaults.loop=o.loop??this._defaults.loop)}get type(){return"ViewPlayerProperty"}get playingReact(){return this._playingReact}get loopReact(){return this._loopReact}get stopFn(){return this._stopFn}get defaults(){return this._defaults}}class pf extends Rt{get type(){return"DatesProperty"}}class Gi extends Rt{get type(){return"DateProperty"}}var vt=(r=>(r.Place="place",r.Translation="translation",r.Rotation="rotation",r.Scale="scale",r.DoublePointsAppend="doublePointsAppend",r.DoublePointsModify="doublePointsModify",r.CircularAppend="circularAppend",r.CircularInsert="circularInsert",r.LineStringAppend="lineStringAppend",r.LineStringInsert="lineStringInsert",r.ScatterAppend="scatterAppend",r.ScatterModify="scatterModify",r.VisibilityAppend="visibilityAppend",r.VisibilityModify="visibilityModify",r.HeightModify="heightModify",r))(vt||{}),op=(r=>(r.DECIMAL_DEGREE="DECIMAL_DEGREE",r.DEGREES_DECIMAL_MINUTES="DEGREES_DECIMAL_MINUTES",r.SEXAGESIMAL_DEGREE="SEXAGESIMAL_DEGREE",r))(op||{});class Rv{constructor(t){this.childPickedInfo=t}}class Fv{constructor(t,e,n,i,s,a){this.pickResult=t,this.sceneObject=e,this.tilesetPickInfo=n,this.geojsonPickInfo=i,this.attachedInfo=s,this.screenPosition=a}assign(t){t!=null&&t.pickedResult&&(this.pickResult=t.pickedResult),t!=null&&t.sceneObject&&(this.sceneObject=t.sceneObject),t!=null&&t.tilesetPickInfo&&(this.tilesetPickInfo=t.tilesetPickInfo),t!=null&&t.geojsonPickInfo&&(this.geojsonPickInfo=t.geojsonPickInfo),t!=null&&t.attachedInfo&&(this.attachedInfo=t.attachedInfo),t!=null&&t.screenPosition&&(this.screenPosition=t.screenPosition)}}class Gv extends d.Destroyable{constructor(e){super();p(this,"_sceneObjRefs",new Map);p(this,"_refs",{});p(this,"_refsChanged",this.dv(new d.Event));const n=(i,s,a)=>{if(a){const o=this.getLastSceneObject(a),l=this._sceneObjRefs.get(a);if(!l)console.warn(`this._sceneObjRefs中不存在ref(${a}), 可能系统存在逻辑问题`);else{const c=l.indexOf(i);c===-1?console.warn(`this._sceneObjRefs中不存在当前对象(id: ${i.id} type: ${i.typeName})!可能系统存在逻辑问题`):(l.splice(c,1),l.length===0&&this._sceneObjRefs.delete(a))}const u=this.getLastSceneObject(a);this._refs[a]=u,this._refsChanged.emit(u,o)}if(s){const o=this.getLastSceneObject(s),l=this._sceneObjRefs.get(s);l?(l.push(i),l.length>0&&console.warn(`同时存在多个ref${s}相同的场景对象!
|
|
1
|
+
var EarthSDK3=function(N,d){"use strict";var zI=Object.defineProperty;var VI=(N,d,ql)=>d in N?zI(N,d,{enumerable:!0,configurable:!0,writable:!0,value:ql}):N[d]=ql;var p=(N,d,ql)=>VI(N,typeof d!="symbol"?d+"":d,ql);class ql extends d.Destroyable{constructor(){super(...arguments);p(this,"registerEngines",{})}register(e,n,i){const s=this.registerEngines[e]||new Map;s.has(n)&&console.warn(`register warn:${e}中${n}的实现类已经被注册,再次注册会覆盖。`),s.set(n,i),this.registerEngines[e]=s}getEngineObjConstructor(e,n){const s=(this.registerEngines[n]||new Map).get(e);if(s)return s;console.warn(`未找到${e}在${n}中对应的实现类!`)}createEngineObject(e,n){const i=this.getEngineObjConstructor(e.typeName,n.typeName);if(i){const s=new i(e,n);return s.createdEvent.emit(),s}else{const s=new Oa(e,n);return s.createdEvent.emit(),s}}}class lv extends d.Destroyable{constructor(){super(...arguments);p(this,"registerEngines",{})}register(e,n,i){const s=this.registerEngines[e]||new Map;s.has(n)&&console.warn(`register warn:${e}中${n}的实现类已经被注册,再次注册会覆盖。`),s.set(n,i),this.registerEngines[e]=s}getEngineObjConstructor(e,n){const s=(this.registerEngines[n]||new Map).get(e);if(s)return s;console.warn(`未找到${e}在${n}中对应的实现类!`)}createEngineObject(e,n){const i=this.getEngineObjConstructor(e.typeName,n.typeName);if(i){const s=new i(e,n);return s.createdEvent.emit(),s}else{const s=new Oa(e,n);return s.createdEvent.emit(),s}}}const ii=class ii extends d.Destroyable{constructor(e,n,i=!1){super();p(this,"_createdEvent",this.dv(new d.Event));p(this,"_id",++ii._accumId);this._sceneObject=e,this._viewer=n;{if(i)return;e.viewer=n,e.viewerChanged.emit(n);const s=(a,o)=>{for(let l of a)this._viewer.delete(l);for(let l of o)this._viewer.add(l)};s([],this._sceneObject.components.values()),this.d(this._sceneObject.components.toChange.don(s)),this.d(()=>s(this._sceneObject.components.values(),[]))}}get createdEvent(){return this._createdEvent}get sceneObject(){return this._sceneObject}get viewer(){return this._viewer}get id(){return this._id}};p(ii,"context",new ql),p(ii,"contextEditing",new lv),p(ii,"register",ii.context.register.bind(ii.context)),p(ii,"registerEditing",ii.contextEditing.register.bind(ii.contextEditing)),p(ii,"_accumId",-1);let Oa=ii;const tf=class tf extends d.Destroyable{constructor(e,n){super();p(this,"_id",++tf._accumId);this._name=e,this._description=n}get id(){return this._id}get name(){return this._name}get description(){return this._description}};p(tf,"_accumId",-1);let Ys=tf;class ff extends Ys{constructor(t,e,n,i,s){super(t,e),this._withUndefined=n,this._readonly=i,this._defaultValue=s}get withUndefined(){return this._withUndefined}get readonly(){return this._readonly}get defaultValue(){return this._defaultValue instanceof Function?this._defaultValue():this._defaultValue}}class Rt extends ff{constructor(t,e,n,i,s,a){super(t,e,n,i,a),this._reactVar=s}get reactVar(){return this._reactVar}}class U extends Rt{get type(){return"BooleanProperty"}}class nt extends Rt{get type(){return"StringProperty"}}class C extends Rt{get type(){return"NumberProperty"}}class uv extends Rt{get type(){return"MaximumScreenSpaceErrorProperty"}}class tp extends Rt{get type(){return"StringsProperty"}}class hv extends Rt{get type(){return"NumbersProperty"}}class cv extends Rt{get type(){return"BooleansProperty"}}class fv extends Rt{get type(){return"String2Property"}}class dv extends Rt{get type(){return"String3Property"}}class pv extends Rt{get type(){return"String4Property"}}class ep extends Rt{get type(){return"String2sProperty"}}class gv extends Rt{get type(){return"String3sProperty"}}class mv extends Rt{get type(){return"String4sProperty"}}class se extends Rt{get type(){return"Number2Property"}}class Qe extends Rt{get type(){return"Number3Property"}}class Lr extends Rt{get type(){return"Number4Property"}}class vv extends Rt{get type(){return"Number4WithUndefinedProperty"}}class rp extends Rt{get type(){return"Number2sProperty"}}class df extends Rt{get type(){return"Number3sProperty"}}class yv extends Rt{get type(){return"Number4sProperty"}}class _v extends Rt{get type(){return"Boolean2Property"}}class wv extends Rt{get type(){return"Boolean3Property"}}class Ev extends Rt{get type(){return"Boolean4Property"}}class Sv extends Rt{get type(){return"Boolean2sProperty"}}class Pv extends Rt{get type(){return"Boolean3sProperty"}}class Cv extends Rt{get type(){return"Boolean4sProperty"}}class Iv extends Rt{get type(){return"StringNumberProperty"}}class Mv extends Rt{get type(){return"StringNumbersProperty"}}class it extends Lr{get type(){return"ColorProperty"}}class Nv extends Qe{get type(){return"ColorRgbProperty"}}class bv extends C{get type(){return"DashPatternProperty"}}class tt extends Rt{constructor(t,e,n,i,s,a,o){super(t,e,n,i,s,o),this._enums=a}get type(){return"EnumProperty"}get enums(){return this._enums}}class Tv extends Rt{constructor(t,e,n,i,s,a,o){super(t,e,n,i,s,o),this._enums=a}get type(){return"EnumStringsProperty"}get enums(){return this._enums}}class Fi extends Rt{constructor(t,e,n,i,s,a,o){super(t,e,n,i,s,a),this._sampleValue=o}get sampleValue(){return this._sampleValue}get type(){return"EvalStringProperty"}}class np extends Rt{constructor(t,e,n,i,s){super(t,e,!1,!1,n,s),this._paramTypes=i}get type(){return"ParamsProperty"}get paramTypes(){return this._paramTypes}}class mt extends Ys{constructor(e,n,i,s,a){super(e,n);p(this,"_paramsProperty");p(this,"_getValueFunc");this._func=s;const o=this.disposeVar(d.reactJson(a));this._paramsProperty=this.disposeVar(new np(e+"_params",e+"_params",o,i,a));const[l]=d.getReactFuncs(this._paramsProperty.reactVar);this._getValueFunc=l}get paramsProperty(){return this._paramsProperty}exec(){this._func(...this._getValueFunc())}get type(){return"FunctionProperty"}}class H extends Ys{constructor(t,e,n){super(t,e),this._children=n}get type(){return"GroupProperty"}get children(){return this._children}}class Y extends Rt{constructor(t,e,n,i,s,a,o){super(t,e,n,i,s,a),this._sampleValue=o}get sampleValue(){return this._sampleValue}get type(){return"JsonProperty"}}class Xh extends Rt{constructor(t,e,n,i,s,a,o){super(t,e,n,i,s,a),this._sampleValue=o}get sampleValue(){return this._sampleValue}get type(){return"LongStringProperty"}}class Dv extends se{get type(){return"MinmaxProperty"}}class xv extends Lr{get type(){return"NearFarScalerProperty"}}class ip extends ff{constructor(t,e,n,i,s,a,o){super(t,e,n,i,o),this._getJsonStringFunc=s,this._setJsonStringFunc=a}get type(){return"NonreactiveJsonStringProperty"}get getJsonStringFunc(){return this._getJsonStringFunc}get setJsonStringFunc(){return this._setJsonStringFunc}}class Ov extends se{get type(){return"NumberRangeProperty"}}class Kt extends Rt{constructor(t,e,n,i,s,a,o,l){super(t,e,n,i,s,l),this._step=a,this._minMax=o}get type(){return"NumberSliderProperty"}get minMax(){return this._minMax}get step(){return this._step}}function Av(r,t){const[e,n,i]=d.getReactFuncs(r),[s,a,o]=d.getReactFuncs(t),l=d.react((e()??0)/(s()??3e3)),u=()=>{const c=l.value,h=s()??3e3,f=e()??0;if(!Number.isFinite(h)||!Number.isFinite(f)){console.warn(`duration || currentTime error: duration: ${h} currentTime: ${f}`);return}Math.abs(c*h-f)<.001||(h<=0?l.value=0:l.value=f/h)};return l.dispose(i.disposableOn(u)),l.dispose(o.disposableOn(u)),l.dispose(l.changed.disposableOn(()=>{const c=l.value,h=s()??3e3,f=e()??0;if(!Number.isFinite(h)||!Number.isFinite(f)){console.warn(`duration || currentTime error: duration: ${h} currentTime: ${f}`);return}Math.abs(c*h-f)<.001||n(c*h)})),l}class Yh extends Ys{constructor(e,n,i,s,a,o){super(e,n);p(this,"_defaults",{playing:!1,ratio:0,loop:!1});this._playingReact=i,this._ratioReact=s,this._loopReact=a,o&&(this._defaults.playing=o.playing??this._defaults.playing,this._defaults.ratio=o.ratio??this._defaults.ratio,this._defaults.loop=o.loop??this._defaults.loop)}get type(){return"PlayerProperty"}get playingReact(){return this._playingReact}get ratioReact(){return this._ratioReact}get loopReact(){return this._loopReact}get defaults(){return this._defaults}}p(Yh,"createPlayingRatio",Av);class li extends Qe{get type(){return"PositionProperty"}}class sp extends Rt{get type(){return"PositionsProperty"}}class Lv extends Rt{get type(){return"PositionsSetPropety"}}class Jh extends Qe{get type(){return"RotationProperty"}}class ku extends nt{get type(){return"UriProperty"}}class ap extends Ys{constructor(e,n,i,s,a,o){super(e,n);p(this,"_defaults",{playing:!1,loop:!1});this._playingReact=i,this._stopFn=s,this._loopReact=a,o&&(this._defaults.playing=o.playing??this._defaults.playing,this._defaults.loop=o.loop??this._defaults.loop)}get type(){return"ViewPlayerProperty"}get playingReact(){return this._playingReact}get loopReact(){return this._loopReact}get stopFn(){return this._stopFn}get defaults(){return this._defaults}}class pf extends Rt{get type(){return"DatesProperty"}}class Gi extends Rt{get type(){return"DateProperty"}}var vt=(r=>(r.Place="place",r.Translation="translation",r.Rotation="rotation",r.Scale="scale",r.DoublePointsAppend="doublePointsAppend",r.DoublePointsModify="doublePointsModify",r.CircularAppend="circularAppend",r.CircularInsert="circularInsert",r.LineStringAppend="lineStringAppend",r.LineStringInsert="lineStringInsert",r.ScatterAppend="scatterAppend",r.ScatterModify="scatterModify",r.VisibilityAppend="visibilityAppend",r.VisibilityModify="visibilityModify",r.HeightModify="heightModify",r))(vt||{}),op=(r=>(r.DECIMAL_DEGREE="DECIMAL_DEGREE",r.DEGREES_DECIMAL_MINUTES="DEGREES_DECIMAL_MINUTES",r.SEXAGESIMAL_DEGREE="SEXAGESIMAL_DEGREE",r))(op||{});class Rv{constructor(t){this.childPickedInfo=t}}class Fv{constructor(t,e,n,i,s,a){this.pickResult=t,this.sceneObject=e,this.tilesetPickInfo=n,this.geojsonPickInfo=i,this.attachedInfo=s,this.screenPosition=a}assign(t){t!=null&&t.pickedResult&&(this.pickResult=t.pickedResult),t!=null&&t.sceneObject&&(this.sceneObject=t.sceneObject),t!=null&&t.tilesetPickInfo&&(this.tilesetPickInfo=t.tilesetPickInfo),t!=null&&t.geojsonPickInfo&&(this.geojsonPickInfo=t.geojsonPickInfo),t!=null&&t.attachedInfo&&(this.attachedInfo=t.attachedInfo),t!=null&&t.screenPosition&&(this.screenPosition=t.screenPosition)}}class Gv extends d.Destroyable{constructor(e){super();p(this,"_sceneObjRefs",new Map);p(this,"_refs",{});p(this,"_refsChanged",this.dv(new d.Event));const n=(i,s,a)=>{if(a){const o=this.getLastSceneObject(a),l=this._sceneObjRefs.get(a);if(!l)console.warn(`this._sceneObjRefs中不存在ref(${a}), 可能系统存在逻辑问题`);else{const c=l.indexOf(i);c===-1?console.warn(`this._sceneObjRefs中不存在当前对象(id: ${i.id} type: ${i.typeName})!可能系统存在逻辑问题`):(l.splice(c,1),l.length===0&&this._sceneObjRefs.delete(a))}const u=this.getLastSceneObject(a);this._refs[a]=u,this._refsChanged.emit(u,o)}if(s){const o=this.getLastSceneObject(s),l=this._sceneObjRefs.get(s);l?(l.push(i),l.length>0&&console.warn(`同时存在多个ref${s}相同的场景对象!
|
|
2
2
|
${l.map(c=>`${c.id} ${c.typeName}
|
|
3
|
-
`).join(" ")}`)):this._sceneObjRefs.set(s,[i]);const u=this.getLastSceneObject(s);this._refs[s]=u,this._refsChanged.emit(u,o)}};this.d(e.sceneObjCreatedEvent.don(i=>{const s=(a,o)=>n(i,a,o);i.ref&&s(i.ref,void 0),i.refChanged.don(s)})),this.d(e.sceneObjToDestroyEvent.don(i=>{i.ref&&n(i,void 0,i.ref)}))}get sceneObjRefs(){return this._sceneObjRefs}get refs(){return this._refs}get refsChanged(){return this._refsChanged}getLastSceneObject(e){const n=this.getSceneObjects(e);if(n)return n[n.length-1]}getSceneObjects(e){const n=this._sceneObjRefs.get(e);if(!(!n||n.length===0))return n}}function lp(r,t){const[e,n,i]=d.getReactFuncs(r),s=d.react(void 0),a=()=>{const o=e()??t;s.value=o&&ft.context.getStrFromEnv(o)};return a(),i&&s.d(i.don(a)),s.d(ft.context.environmentVariablesChanged.don(a)),s}function kv(r){do{const t=r.replace(/\${(.*?)\}/,(e,n)=>{const i=ft.context.getEnv(n);return i===void 0?(console.warn(`环境变量(${n})不存在,无法进行转换`),"{env-error}"):i});if(t===r)break;r=t}while(!0);return r}class zv extends d.Destroyable{constructor(){super();p(this,"_esObjConstructors",new Map);p(this,"_sceneObjs",new Map);p(this,"_sceneObjCreatedEvent",new d.Event);p(this,"_sceneObjToDestroyEvent",new d.Event);p(this,"_refsManager",this.dv(new Gv(this)));p(this,"_environmentVariables",window.ESSDK_ENV||{});p(this,"_environmentVariablesChanged",this.dv(new d.Event))}get typeNames(){return this._esObjConstructors.keys()}get sceneObjs(){return this._sceneObjs.values()}get sceneObjCreatedEvent(){return this._sceneObjCreatedEvent}get sceneObjToDestroyEvent(){return this._sceneObjToDestroyEvent}get refsManager(){return this._refsManager}get $refs(){return this._refsManager.refs}register(e,n,i){return this._esObjConstructors.has(e)&&console.warn(`register warn: ${e} has registered ! will be override!`),this._esObjConstructors.set(e,n),i&&d.setExtProp(n,"__sceneObjExtraInfo",i),e}_addSceneObject(e){this._sceneObjs.set(e.id,e),this._sceneObjCreatedEvent.emit(e),e.d(()=>this._deleteSceneObject(e))}addSceneObject(e){this._addSceneObject(e)}_deleteSceneObject(e){this._sceneObjToDestroyEvent.emit(e),this._sceneObjs.delete(e.id)}deleteSceneObject(e){this._deleteSceneObject(e)}createSceneObjectFromClass(e,n){if(!n||this._sceneObjs.has(n)){const s=d.createGuid();n&&console.warn(`已存在相同id的对象!id自动变更!${n} -> ${s} 请注意:id变更可能导致引用失效!`),n=s}if(!n)throw new Error("id不能为空!");const i=new e(n);return i.id!==n&&(console.warn(`sceneObj.id(${i.id}) !== id(${n}) sceneObjectType: ${i.typeName}`),console.warn("出现这种问题有可能是自定义的场景对象,没有在构造函数中传递id参数!示例如下:"),console.warn("class XXX extends XXX { constructor(id) { super(id); } }")),this._addSceneObject(i),i}createSceneObject(e,n){if(typeof e=="string"){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`Cannot find SceneObjectType: ${e}`);return}return this.createSceneObjectFromClass(i,n)}else return this.createSceneObjectFromClass(e,n)}createSceneObjectFromJson(e){const n=this.createSceneObject(e.type,e.id);return n&&(n.json=e),n}destroySceneObject(e){return this._deleteSceneObject(e),e.destroy(),e.isDestroyed()}getSceneObjectById(e){return this._sceneObjs.get(e)}getSceneObject(e){if(!e&&e!="")return Array.from(this._sceneObjs.values());if(e.startsWith("ES")){const n=[];for(const i of this._sceneObjs.values())i.typeName===e&&n.push(i);return n}else return this._sceneObjs.get(e)}_getSceneObjConstructor(e){const n=this._esObjConstructors.get(e);if(n)return n}getProps(e){const n=this._getSceneObjConstructor(e);if(!n){console.warn(`cannot get constructor from type: ${e}`);return}return d.getExtProp(n,"__sceneObjExtraInfo")}setProps(e,n){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`cannot get constructor from type: ${e}`);return}let s=d.getExtProp(i,"__sceneObjExtraInfo");s||(s={},d.setExtProp(i,"__sceneObjExtraInfo",s)),Object.assign(s,n)}getProp(e,n){const i=this.getProps(e);return i&&i[n]}setProp(e,n,i){this.setProps(e,{[n]:i})}get environmentVariables(){return this._environmentVariables}set environmentVariables(e){for(let[n,i]of Object.entries(e))this.setEnv(n,i)}get environmentVariablesChanged(){return this._environmentVariablesChanged}setEnv(e,n){if(this._environmentVariables[e]!==n){const i=this._environmentVariables[e];this._environmentVariables[e]=n,this._environmentVariablesChanged.emit(e,n,i)}window.ESSDK_ENV={...this._environmentVariables}}getEnv(e){return this._environmentVariables[e]}getStrFromEnv(e){return kv(e)}createEnvStrReact(e,n){return lp(e,n)}createEvnStrReact(e,n){return lp(e,n)}}const xt=class xt extends d.Destroyable{constructor(e){super();p(this,"_components",this.dv(new d.ObservableSet));p(this,"_viewerAttached",this.dv(new d.Event));p(this,"_viewerDetached",this.dv(new d.Event));p(this,"_attachedViewers",(()=>{const e=new Set;return this.d(this._viewerAttached.don(n=>{e.add(n)})),this.d(this._viewerDetached.don(n=>{e.delete(n)})),e})());p(this,"_createdEvent",this.dv(new d.Event));p(this,"_flushEvent",this.dv(new d.Event));p(this,"_id");p(this,"viewer");p(this,"viewerChanged",this.ad(new d.Event));p(this,"combinationClass",!1);p(this,"mainClass");p(this,"_updateFuncReact",this.dv(d.react(void 0)));p(this,"_toDestroyFuncReact",this.dv(d.react(void 0)));p(this,"_parentID",this.disposeVar(d.react(void 0)));e!==void 0&&(typeof e!="string"?console.warn(`对象id必须是字符串类型,当前id的类型是${typeof e},值为${e}`):e.trim()===""?console.warn("场景对象创建时的id不能是空字符串!"):e.trim()!==e&&console.warn(`id前后有空字符串!id: ${e}`)),this._id=e??d.createGuid(),this._initName();{const n=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(i){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`)}};n(),this.d(this.execOnceFuncStrChanged.don(n))}{const n=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(s){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};n(),this.d(this.updateFuncStrChanged.don(n));let i;this.d(()=>i&&i.destroy()),this.d(this.updateFuncChanged.don(()=>{i&&i.cancel(),this.updateFunc&&(i=i||d.createAnimateFrame(),i.restart(void 0,s=>{this.updateFunc&&this.updateFunc(this,s)}))}))}{const n=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(i){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`),this.toDestroyFunc=void 0}};n(),this.d(this.toDestroyFuncStrChanged.don(n)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}}static get envs(){return xt.context.environmentVariables}static get $refs(){return xt.context.refsManager.refs}get components(){return this._components}get viewerAttached(){return this._viewerAttached}get viewerDetached(){return this._viewerDetached}get attachedViewers(){return this._attachedViewers}removefromViewer(e){this.attachedViewers.has(e)&&e.delete(this)}addToViewer(e){this.attachedViewers.has(e)||e.add(this)}registerAttachedObject(e){const n=new Map;this.d(()=>{n.size>0&&console.warn("viewerPropSceneObjects.size > 0")}),this.d(this._viewerAttached.don(i=>{const s=e(i);s&&n.set(i,s)})),this.d(this._viewerDetached.don(i=>{if(!n.has(i))return;const s=n.get(i);s&&(s.destroy(),n.delete(i))}))}createAttachedObject(e){const n=new Map,i=()=>{for(let[l,u]of n.entries())u.destroy();n.clear()},s=l=>{const u=e(l);u&&n.set(l,u)};for(let l of this.attachedViewers)s(l);const a=this._viewerAttached.don(s),o=this._viewerDetached.don(l=>{if(!n.has(l))return;const u=n.get(l);u&&(u.destroy(),n.delete(l))});return()=>{o(),a(),i()}}registerAttachedObjectForContainer(e){this.registerAttachedObject(n=>new Vv(n,e))}get createdEvent(){return this._createdEvent}get flushEvent(){return this._flushEvent}flush(){this.flushEvent.emit()}get id(){return this._id}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return xt.createDefaultProps()}getMainClass(){return this.mainClass??this}_innerGetJson(e=!0){const n={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let s,a=this.defaultProps[i];a instanceof d.ReactiveVariable?s=a.equals(this[i]):s=a===this[i],s||(n[i]=this[i])}else n[i]=this[i];return n}_innerSetJson(e,n,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const s=n||[];s.push("id","type");const a=Object.keys(this.defaultProps).filter(o=>!s.includes(o));for(let o of a)if(o in e)this[o]=e[o]===null?void 0:e[o];else if(!(i??!1)){let l=this.defaultProps[o];l instanceof d.ReactiveVariable&&(l=l.value),this[o]=l}}get json(){return this._innerGetJson()}set json(e){this._innerSetJson(e)}get _jsonStr(){return JSON.stringify(this.json,null,4)}set _jsonStr(e){this._innerSetJson(JSON.parse(e))}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get parentID(){return this._parentID.value}set parentID(e){this._parentID.value=e}get parentIDChanged(){return this._parentID.changed}getProperties(e){return[new H("ESSceneObject","ESSceneObject",[new nt("对象类型","类型(type)",!1,!0,[this,"typeName"]),new nt("对象id","唯一标识符(id)",!1,!0,[this,"id"]),new nt("对象名称","名称(name)",!1,!1,[this,"name"]),new nt("ref","标识(ref),可通过 ESSceneObject.$refs.xxx快速获取到对象",!0,!1,[this,"ref"]),new Y("extras","扩展属性,必须整体赋值(extras)",!0,!1,[this,"extras"]),new ip("JSON","对象JSON数据动态更改导入导出。",!1,!1,()=>this._jsonStr,n=>n&&(this._jsonStr=n))])]}getESProperties(){return{defaultMenu:"basic",basic:[],general:[],dataSource:[],location:[],coordinate:[],style:[]}}};p(xt,"context",new zv),p(xt,"register",xt.context.register.bind(xt.context)),p(xt,"create",xt.context.createSceneObject.bind(xt.context)),p(xt,"createFromClass",xt.context.createSceneObjectFromClass.bind(xt.context)),p(xt,"createFromJson",xt.context.createSceneObjectFromJson.bind(xt.context)),p(xt,"destroySceneObject",xt.context.destroySceneObject.bind(xt.context)),p(xt,"getSceneObjById",xt.context.getSceneObjectById.bind(xt.context)),p(xt,"getSceneObj",xt.context.getSceneObject.bind(xt.context)),p(xt,"getEnv",xt.context.getEnv.bind(xt.context)),p(xt,"setEnv",xt.context.setEnv.bind(xt.context)),p(xt,"getStrFromEnv",xt.context.getStrFromEnv.bind(xt.context)),p(xt,"getSceneObjectById",xt.context.getSceneObjectById.bind(xt.context)),p(xt,"getSceneObject",xt.context.getSceneObject.bind(xt.context)),p(xt,"defaults",{}),p(xt,"createDefaultProps",()=>({name:"未命名场景对象",ref:void 0,extras:d.reactJson(void 0),devTags:d.reactArrayWithUndefined(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0}));let ft=xt;d.extendClassProps(ft.prototype,ft.createDefaultProps);class Vv extends d.Destroyable{constructor(t,e){super(),this.dv(new d.ObjResettingWithEvent(t.subContainerChanged,()=>{if(t.subContainer)return e(t,t.subContainer)}))}}function gf(r){return d.reactDeepArrayWithUndefined(r,(t,e)=>t[0]===e[0]&&t[1]===e[1],t=>[...t])}function up(r,t){const e=new Array;for(let n of r)e.push(t(n));return e}function mf(r,t){return r===void 0&&t===void 0?!0:!r||!t?!1:r[0]===t[0]&&r[1]===t[1]&&r[2]===t[2]}var hr=63710088e-1,hp={centimeters:hr*100,centimetres:hr*100,degrees:hr/111325,feet:hr*3.28084,inches:hr*39.37,kilometers:hr/1e3,kilometres:hr/1e3,meters:hr,metres:hr,miles:hr/1609.344,millimeters:hr*1e3,millimetres:hr*1e3,nauticalmiles:hr/1852,radians:1,yards:hr*1.0936};function ui(r,t,e){e===void 0&&(e={});var n={type:"Feature"};return(e.id===0||e.id)&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.properties=t||{},n.geometry=r,n}function ae(r,t,e){if(e===void 0&&(e={}),!r)throw new Error("coordinates is required");if(!Array.isArray(r))throw new Error("coordinates must be an Array");if(r.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!cp(r[0])||!cp(r[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:r};return ui(n,t,e)}function Cr(r,t,e){e===void 0&&(e={});for(var n=0,i=r;n<i.length;n++){var s=i[n];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<s[s.length-1].length;a++)if(s[s.length-1][a]!==s[0][a])throw new Error("First and last Position are not equivalent.")}var o={type:"Polygon",coordinates:r};return ui(o,t,e)}function hi(r,t,e){if(e===void 0&&(e={}),r.length<2)throw new Error("coordinates must be an array of two or more positions");var n={type:"LineString",coordinates:r};return ui(n,t,e)}function Wl(r,t){t===void 0&&(t={});var e={type:"FeatureCollection"};return t.id&&(e.id=t.id),t.bbox&&(e.bbox=t.bbox),e.features=r,e}function vf(r,t,e){e===void 0&&(e={});var n={type:"MultiPolygon",coordinates:r};return ui(n,t,e)}function yf(r,t){t===void 0&&(t="kilometers");var e=hp[t];if(!e)throw new Error(t+" units is invalid");return r*e}function _f(r,t){t===void 0&&(t="kilometers");var e=hp[t];if(!e)throw new Error(t+" units is invalid");return r/e}function Kh(r){var t=r%(2*Math.PI);return t*180/Math.PI}function Ir(r){var t=r%360;return t*Math.PI/180}function wf(r,t,e){if(t===void 0&&(t="kilometers"),e===void 0&&(e="kilometers"),!(r>=0))throw new Error("length must be a positive number");return yf(_f(r,t),e)}function cp(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}function Hl(r,t,e){if(r!==null)for(var n,i,s,a,o,l,u,c=0,h=0,f,g=r.type,m=g==="FeatureCollection",_=g==="Feature",E=m?r.features.length:1,M=0;M<E;M++){u=m?r.features[M].geometry:_?r.geometry:r,f=u?u.type==="GeometryCollection":!1,o=f?u.geometries.length:1;for(var y=0;y<o;y++){var w=0,v=0;if(a=f?u.geometries[y]:u,a!==null){l=a.coordinates;var S=a.type;switch(c=e&&(S==="Polygon"||S==="MultiPolygon")?1:0,S){case null:break;case"Point":if(t(l,h,M,w,v)===!1)return!1;h++,w++;break;case"LineString":case"MultiPoint":for(n=0;n<l.length;n++){if(t(l[n],h,M,w,v)===!1)return!1;h++,S==="MultiPoint"&&w++}S==="LineString"&&w++;break;case"Polygon":case"MultiLineString":for(n=0;n<l.length;n++){for(i=0;i<l[n].length-c;i++){if(t(l[n][i],h,M,w,v)===!1)return!1;h++}S==="MultiLineString"&&w++,S==="Polygon"&&v++}S==="Polygon"&&w++;break;case"MultiPolygon":for(n=0;n<l.length;n++){for(v=0,i=0;i<l[n].length;i++){for(s=0;s<l[n][i].length-c;s++){if(t(l[n][i][s],h,M,w,v)===!1)return!1;h++}v++}w++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(Hl(a.geometries[n],t,e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Qh(r,t){if(r.type==="Feature")t(r,0);else if(r.type==="FeatureCollection")for(var e=0;e<r.features.length&&t(r.features[e],e)!==!1;e++);}function Bh(r,t){var e,n,i,s,a,o,l,u,c,h,f=0,g=r.type==="FeatureCollection",m=r.type==="Feature",_=g?r.features.length:1;for(e=0;e<_;e++){for(o=g?r.features[e].geometry:m?r.geometry:r,u=g?r.features[e].properties:m?r.properties:{},c=g?r.features[e].bbox:m?r.bbox:void 0,h=g?r.features[e].id:m?r.id:void 0,l=o?o.type==="GeometryCollection":!1,a=l?o.geometries.length:1,i=0;i<a;i++){if(s=l?o.geometries[i]:o,s===null){if(t(null,f,u,c,h)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(s,f,u,c,h)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<s.geometries.length;n++)if(t(s.geometries[n],f,u,c,h)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}f++}}function Uv(r,t,e){var n=e;return Bh(r,function(i,s,a,o,l){n=t(n,i,s,a,o,l)}),n}function Ef(r,t){Bh(r,function(e,n,i,s,a){var o=e===null?null:e.type;switch(o){case null:case"Point":case"LineString":case"Polygon":return t(ui(e,i,{bbox:s,id:a}),n,0)===!1?!1:void 0}var l;switch(o){case"MultiPoint":l="Point";break;case"MultiLineString":l="LineString";break;case"MultiPolygon":l="Polygon";break}for(var u=0;u<e.coordinates.length;u++){var c=e.coordinates[u],h={type:l,coordinates:c};if(t(ui(h,i),n,u)===!1)return!1}})}function qv(r,t){Ef(r,function(e,n,i){var s=0;if(e.geometry){var a=e.geometry.type;if(!(a==="Point"||a==="MultiPoint")){var o,l=0,u=0,c=0;if(Hl(e,function(h,f,g,m,_){if(o===void 0||n>l||m>u||_>c){o=h,l=n,u=m,c=_,s=0;return}var E=hi([o,h],e.properties);if(t(E,n,i,_,s)===!1)return!1;s++,o=h})===!1)return!1}}})}function ci(r){var t=[1/0,1/0,-1/0,-1/0];return Hl(r,function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])}),t}ci.default=ci;function Fr(r){if(!r)throw new Error("coord is required");if(!Array.isArray(r)){if(r.type==="Feature"&&r.geometry!==null&&r.geometry.type==="Point")return r.geometry.coordinates;if(r.type==="Point")return r.coordinates}if(Array.isArray(r)&&r.length>=2&&!Array.isArray(r[0])&&!Array.isArray(r[1]))return r;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Aa(r){if(Array.isArray(r))return r;if(r.type==="Feature"){if(r.geometry!==null)return r.geometry.coordinates}else if(r.coordinates)return r.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function fp(r,t,e){if(!r)throw new Error("No feature passed");if(!e)throw new Error(".featureOf() requires a name");if(!r||r.type!=="Feature"||!r.geometry)throw new Error("Invalid input to "+e+", Feature with geometry required");if(!r.geometry||r.geometry.type!==t)throw new Error("Invalid input to "+e+": must be a "+t+", given "+r.geometry.type)}function _n(r){return r.type==="Feature"?r.geometry:r}function Wv(r,t){return r.type==="FeatureCollection"?"FeatureCollection":r.type==="GeometryCollection"?"GeometryCollection":r.type==="Feature"&&r.geometry!==null?r.geometry.type:r.type}function dp(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Hv(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var t=r.default;if(typeof t=="function"){var e=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),e}var Zh={exports:{}},$h={exports:{}},Xv=$h.exports,pp;function gp(){return pp||(pp=1,function(r,t){(function(e,n){r.exports=n()})(Xv,function(){function e(y,w,v,S,P){(function I(b,D,O,T,x){for(;T>O;){if(T-O>600){var R=T-O+1,z=D-O+1,rt=Math.log(R),B=.5*Math.exp(2*rt/3),ct=.5*Math.sqrt(rt*B*(R-B)/R)*(z-R/2<0?-1:1),G=Math.max(O,Math.floor(D-z*B/R+ct)),X=Math.min(T,Math.floor(D+(R-z)*B/R+ct));I(b,D,G,X,x)}var k=b[D],V=O,A=T;for(n(b,O,D),x(b[T],k)>0&&n(b,O,T);V<A;){for(n(b,V,A),V++,A--;x(b[V],k)<0;)V++;for(;x(b[A],k)>0;)A--}x(b[O],k)===0?n(b,O,A):n(b,++A,T),A<=D&&(O=A+1),D<=A&&(T=A-1)}})(y,w,v||0,S||y.length-1,P||i)}function n(y,w,v){var S=y[w];y[w]=y[v],y[v]=S}function i(y,w){return y<w?-1:y>w?1:0}var s=function(y){y===void 0&&(y=9),this._maxEntries=Math.max(4,y),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function a(y,w,v){if(!v)return w.indexOf(y);for(var S=0;S<w.length;S++)if(v(y,w[S]))return S;return-1}function o(y,w){l(y,0,y.children.length,w,y)}function l(y,w,v,S,P){P||(P=E(null)),P.minX=1/0,P.minY=1/0,P.maxX=-1/0,P.maxY=-1/0;for(var I=w;I<v;I++){var b=y.children[I];u(P,y.leaf?S(b):b)}return P}function u(y,w){return y.minX=Math.min(y.minX,w.minX),y.minY=Math.min(y.minY,w.minY),y.maxX=Math.max(y.maxX,w.maxX),y.maxY=Math.max(y.maxY,w.maxY),y}function c(y,w){return y.minX-w.minX}function h(y,w){return y.minY-w.minY}function f(y){return(y.maxX-y.minX)*(y.maxY-y.minY)}function g(y){return y.maxX-y.minX+(y.maxY-y.minY)}function m(y,w){return y.minX<=w.minX&&y.minY<=w.minY&&w.maxX<=y.maxX&&w.maxY<=y.maxY}function _(y,w){return w.minX<=y.maxX&&w.minY<=y.maxY&&w.maxX>=y.minX&&w.maxY>=y.minY}function E(y){return{children:y,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function M(y,w,v,S,P){for(var I=[w,v];I.length;)if(!((v=I.pop())-(w=I.pop())<=S)){var b=w+Math.ceil((v-w)/S/2)*S;e(y,b,w,v,P),I.push(w,b,b,v)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(y){var w=this.data,v=[];if(!_(y,w))return v;for(var S=this.toBBox,P=[];w;){for(var I=0;I<w.children.length;I++){var b=w.children[I],D=w.leaf?S(b):b;_(y,D)&&(w.leaf?v.push(b):m(y,D)?this._all(b,v):P.push(b))}w=P.pop()}return v},s.prototype.collides=function(y){var w=this.data;if(!_(y,w))return!1;for(var v=[];w;){for(var S=0;S<w.children.length;S++){var P=w.children[S],I=w.leaf?this.toBBox(P):P;if(_(y,I)){if(w.leaf||m(y,I))return!0;v.push(P)}}w=v.pop()}return!1},s.prototype.load=function(y){if(!y||!y.length)return this;if(y.length<this._minEntries){for(var w=0;w<y.length;w++)this.insert(y[w]);return this}var v=this._build(y.slice(),0,y.length-1,0);if(this.data.children.length)if(this.data.height===v.height)this._splitRoot(this.data,v);else{if(this.data.height<v.height){var S=this.data;this.data=v,v=S}this._insert(v,this.data.height-v.height-1,!0)}else this.data=v;return this},s.prototype.insert=function(y){return y&&this._insert(y,this.data.height-1),this},s.prototype.clear=function(){return this.data=E([]),this},s.prototype.remove=function(y,w){if(!y)return this;for(var v,S,P,I=this.data,b=this.toBBox(y),D=[],O=[];I||D.length;){if(I||(I=D.pop(),S=D[D.length-1],v=O.pop(),P=!0),I.leaf){var T=a(y,I.children,w);if(T!==-1)return I.children.splice(T,1),D.push(I),this._condense(D),this}P||I.leaf||!m(I,b)?S?(v++,I=S.children[v],P=!1):I=null:(D.push(I),O.push(v),v=0,S=I,I=I.children[0])}return this},s.prototype.toBBox=function(y){return y},s.prototype.compareMinX=function(y,w){return y.minX-w.minX},s.prototype.compareMinY=function(y,w){return y.minY-w.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(y){return this.data=y,this},s.prototype._all=function(y,w){for(var v=[];y;)y.leaf?w.push.apply(w,y.children):v.push.apply(v,y.children),y=v.pop();return w},s.prototype._build=function(y,w,v,S){var P,I=v-w+1,b=this._maxEntries;if(I<=b)return o(P=E(y.slice(w,v+1)),this.toBBox),P;S||(S=Math.ceil(Math.log(I)/Math.log(b)),b=Math.ceil(I/Math.pow(b,S-1))),(P=E([])).leaf=!1,P.height=S;var D=Math.ceil(I/b),O=D*Math.ceil(Math.sqrt(b));M(y,w,v,O,this.compareMinX);for(var T=w;T<=v;T+=O){var x=Math.min(T+O-1,v);M(y,T,x,D,this.compareMinY);for(var R=T;R<=x;R+=D){var z=Math.min(R+D-1,x);P.children.push(this._build(y,R,z,S-1))}}return o(P,this.toBBox),P},s.prototype._chooseSubtree=function(y,w,v,S){for(;S.push(w),!w.leaf&&S.length-1!==v;){for(var P=1/0,I=1/0,b=void 0,D=0;D<w.children.length;D++){var O=w.children[D],T=f(O),x=(R=y,z=O,(Math.max(z.maxX,R.maxX)-Math.min(z.minX,R.minX))*(Math.max(z.maxY,R.maxY)-Math.min(z.minY,R.minY))-T);x<I?(I=x,P=T<P?T:P,b=O):x===I&&T<P&&(P=T,b=O)}w=b||w.children[0]}var R,z;return w},s.prototype._insert=function(y,w,v){var S=v?y:this.toBBox(y),P=[],I=this._chooseSubtree(S,this.data,w,P);for(I.children.push(y),u(I,S);w>=0&&P[w].children.length>this._maxEntries;)this._split(P,w),w--;this._adjustParentBBoxes(S,P,w)},s.prototype._split=function(y,w){var v=y[w],S=v.children.length,P=this._minEntries;this._chooseSplitAxis(v,P,S);var I=this._chooseSplitIndex(v,P,S),b=E(v.children.splice(I,v.children.length-I));b.height=v.height,b.leaf=v.leaf,o(v,this.toBBox),o(b,this.toBBox),w?y[w-1].children.push(b):this._splitRoot(v,b)},s.prototype._splitRoot=function(y,w){this.data=E([y,w]),this.data.height=y.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(y,w,v){for(var S,P,I,b,D,O,T,x=1/0,R=1/0,z=w;z<=v-w;z++){var rt=l(y,0,z,this.toBBox),B=l(y,z,v,this.toBBox),ct=(P=rt,I=B,b=void 0,D=void 0,O=void 0,T=void 0,b=Math.max(P.minX,I.minX),D=Math.max(P.minY,I.minY),O=Math.min(P.maxX,I.maxX),T=Math.min(P.maxY,I.maxY),Math.max(0,O-b)*Math.max(0,T-D)),G=f(rt)+f(B);ct<x?(x=ct,S=z,R=G<R?G:R):ct===x&&G<R&&(R=G,S=z)}return S||v-w},s.prototype._chooseSplitAxis=function(y,w,v){var S=y.leaf?this.compareMinX:c,P=y.leaf?this.compareMinY:h;this._allDistMargin(y,w,v,S)<this._allDistMargin(y,w,v,P)&&y.children.sort(S)},s.prototype._allDistMargin=function(y,w,v,S){y.children.sort(S);for(var P=this.toBBox,I=l(y,0,w,P),b=l(y,v-w,v,P),D=g(I)+g(b),O=w;O<v-w;O++){var T=y.children[O];u(I,y.leaf?P(T):T),D+=g(I)}for(var x=v-w-1;x>=w;x--){var R=y.children[x];u(b,y.leaf?P(R):R),D+=g(b)}return D},s.prototype._adjustParentBBoxes=function(y,w,v){for(var S=v;S>=0;S--)u(w[S],y)},s.prototype._condense=function(y){for(var w=y.length-1,v=void 0;w>=0;w--)y[w].children.length===0?w>0?(v=y[w-1].children).splice(v.indexOf(y[w]),1):this.clear():o(y[w],this.toBBox)},s})}($h)),$h.exports}class Yv{constructor(t=[],e=Jv){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let n=(this.length>>1)-1;n>=0;n--)this._down(n)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:n}=this,i=e[t];for(;t>0;){const s=t-1>>1,a=e[s];if(n(i,a)>=0)break;e[t]=a,t=s}e[t]=i}_down(t){const{data:e,compare:n}=this,i=this.length>>1,s=e[t];for(;t<i;){let a=(t<<1)+1,o=e[a];const l=a+1;if(l<this.length&&n(e[l],o)<0&&(a=l,o=e[l]),n(o,s)>=0)break;e[t]=o,t=a}e[t]=s}}function Jv(r,t){return r<t?-1:r>t?1:0}const Kv=Hv(Object.freeze(Object.defineProperty({__proto__:null,default:Yv},Symbol.toStringTag,{value:"Module"})));var zu={exports:{}},Sf,mp;function Qv(){return mp||(mp=1,Sf=function(t,e,n,i){var s=t[0],a=t[1],o=!1;n===void 0&&(n=0),i===void 0&&(i=e.length);for(var l=(i-n)/2,u=0,c=l-1;u<l;c=u++){var h=e[n+u*2+0],f=e[n+u*2+1],g=e[n+c*2+0],m=e[n+c*2+1],_=f>a!=m>a&&s<(g-h)*(a-f)/(m-f)+h;_&&(o=!o)}return o}),Sf}var Pf,vp;function Bv(){return vp||(vp=1,Pf=function(t,e,n,i){var s=t[0],a=t[1],o=!1;n===void 0&&(n=0),i===void 0&&(i=e.length);for(var l=i-n,u=0,c=l-1;u<l;c=u++){var h=e[u+n][0],f=e[u+n][1],g=e[c+n][0],m=e[c+n][1],_=f>a!=m>a&&s<(g-h)*(a-f)/(m-f)+h;_&&(o=!o)}return o}),Pf}var yp;function Zv(){if(yp)return zu.exports;yp=1;var r=Qv(),t=Bv();return zu.exports=function(n,i,s,a){return i.length>0&&Array.isArray(i[0])?t(n,i,s,a):r(n,i,s,a)},zu.exports.nested=t,zu.exports.flat=r,zu.exports}var Vu={exports:{}},$v=Vu.exports,_p;function jv(){return _p||(_p=1,function(r,t){(function(e,n){n(t)})($v,function(e){const i=33306690738754706e-32;function s(_,E,M,y,w){let v,S,P,I,b=E[0],D=y[0],O=0,T=0;D>b==D>-b?(v=b,b=E[++O]):(v=D,D=y[++T]);let x=0;if(O<_&&T<M)for(D>b==D>-b?(P=v-((S=b+v)-b),b=E[++O]):(P=v-((S=D+v)-D),D=y[++T]),v=S,P!==0&&(w[x++]=P);O<_&&T<M;)D>b==D>-b?(P=v-((S=v+b)-(I=S-v))+(b-I),b=E[++O]):(P=v-((S=v+D)-(I=S-v))+(D-I),D=y[++T]),v=S,P!==0&&(w[x++]=P);for(;O<_;)P=v-((S=v+b)-(I=S-v))+(b-I),b=E[++O],v=S,P!==0&&(w[x++]=P);for(;T<M;)P=v-((S=v+D)-(I=S-v))+(D-I),D=y[++T],v=S,P!==0&&(w[x++]=P);return v===0&&x!==0||(w[x++]=v),x}function a(_){return new Float64Array(_)}const o=33306690738754716e-32,l=22204460492503146e-32,u=11093356479670487e-47,c=a(4),h=a(8),f=a(12),g=a(16),m=a(4);e.orient2d=function(_,E,M,y,w,v){const S=(E-v)*(M-w),P=(_-w)*(y-v),I=S-P;if(S===0||P===0||S>0!=P>0)return I;const b=Math.abs(S+P);return Math.abs(I)>=o*b?I:-function(D,O,T,x,R,z,rt){let B,ct,G,X,k,V,A,W,J,ot,gt,lt,St,ut,It,Nt,j,Pt;const bt=D-R,Gt=T-R,Ht=O-z,Xt=x-z;k=(It=(W=bt-(A=(V=134217729*bt)-(V-bt)))*(ot=Xt-(J=(V=134217729*Xt)-(V-Xt)))-((ut=bt*Xt)-A*J-W*J-A*ot))-(gt=It-(j=(W=Ht-(A=(V=134217729*Ht)-(V-Ht)))*(ot=Gt-(J=(V=134217729*Gt)-(V-Gt)))-((Nt=Ht*Gt)-A*J-W*J-A*ot))),c[0]=It-(gt+k)+(k-j),k=(St=ut-((lt=ut+gt)-(k=lt-ut))+(gt-k))-(gt=St-Nt),c[1]=St-(gt+k)+(k-Nt),k=(Pt=lt+gt)-lt,c[2]=lt-(Pt-k)+(gt-k),c[3]=Pt;let Zt=function(zt,Ee){let ke=Ee[0];for(let oi=1;oi<zt;oi++)ke+=Ee[oi];return ke}(4,c),me=l*rt;if(Zt>=me||-Zt>=me||(B=D-(bt+(k=D-bt))+(k-R),G=T-(Gt+(k=T-Gt))+(k-R),ct=O-(Ht+(k=O-Ht))+(k-z),X=x-(Xt+(k=x-Xt))+(k-z),B===0&&ct===0&&G===0&&X===0)||(me=u*rt+i*Math.abs(Zt),(Zt+=bt*X+Xt*B-(Ht*G+Gt*ct))>=me||-Zt>=me))return Zt;k=(It=(W=B-(A=(V=134217729*B)-(V-B)))*(ot=Xt-(J=(V=134217729*Xt)-(V-Xt)))-((ut=B*Xt)-A*J-W*J-A*ot))-(gt=It-(j=(W=ct-(A=(V=134217729*ct)-(V-ct)))*(ot=Gt-(J=(V=134217729*Gt)-(V-Gt)))-((Nt=ct*Gt)-A*J-W*J-A*ot))),m[0]=It-(gt+k)+(k-j),k=(St=ut-((lt=ut+gt)-(k=lt-ut))+(gt-k))-(gt=St-Nt),m[1]=St-(gt+k)+(k-Nt),k=(Pt=lt+gt)-lt,m[2]=lt-(Pt-k)+(gt-k),m[3]=Pt;const Ke=s(4,c,4,m,h);k=(It=(W=bt-(A=(V=134217729*bt)-(V-bt)))*(ot=X-(J=(V=134217729*X)-(V-X)))-((ut=bt*X)-A*J-W*J-A*ot))-(gt=It-(j=(W=Ht-(A=(V=134217729*Ht)-(V-Ht)))*(ot=G-(J=(V=134217729*G)-(V-G)))-((Nt=Ht*G)-A*J-W*J-A*ot))),m[0]=It-(gt+k)+(k-j),k=(St=ut-((lt=ut+gt)-(k=lt-ut))+(gt-k))-(gt=St-Nt),m[1]=St-(gt+k)+(k-Nt),k=(Pt=lt+gt)-lt,m[2]=lt-(Pt-k)+(gt-k),m[3]=Pt;const Yt=s(Ke,h,4,m,f);k=(It=(W=B-(A=(V=134217729*B)-(V-B)))*(ot=X-(J=(V=134217729*X)-(V-X)))-((ut=B*X)-A*J-W*J-A*ot))-(gt=It-(j=(W=ct-(A=(V=134217729*ct)-(V-ct)))*(ot=G-(J=(V=134217729*G)-(V-G)))-((Nt=ct*G)-A*J-W*J-A*ot))),m[0]=It-(gt+k)+(k-j),k=(St=ut-((lt=ut+gt)-(k=lt-ut))+(gt-k))-(gt=St-Nt),m[1]=St-(gt+k)+(k-Nt),k=(Pt=lt+gt)-lt,m[2]=lt-(Pt-k)+(gt-k),m[3]=Pt;const kt=s(Yt,f,4,m,g);return g[kt-1]}(_,E,M,y,w,v,b)},e.orient2dfast=function(_,E,M,y,w,v){return(E-v)*(M-w)-(_-w)*(y-v)},Object.defineProperty(e,"__esModule",{value:!0})})}(Vu,Vu.exports)),Vu.exports}var wp;function ty(){if(wp)return Zh.exports;wp=1;var r=gp(),t=Kv,e=Zv(),n=jv().orient2d;t.default&&(t=t.default),Zh.exports=i,Zh.exports.default=i;function i(v,S,P){S=Math.max(0,S===void 0?2:S),P=P||0;var I=g(v),b=new r(16);b.toBBox=function(A){return{minX:A[0],minY:A[1],maxX:A[0],maxY:A[1]}},b.compareMinX=function(A,W){return A[0]-W[0]},b.compareMinY=function(A,W){return A[1]-W[1]},b.load(v);for(var D=[],O=0,T;O<I.length;O++){var x=I[O];b.remove(x),T=m(x,T),D.push(T)}var R=new r(16);for(O=0;O<D.length;O++)R.insert(f(D[O]));for(var z=S*S,rt=P*P;D.length;){var B=D.shift(),ct=B.p,G=B.next.p,X=_(ct,G);if(!(X<rt)){var k=X/z;x=s(b,B.prev.p,ct,G,B.next.next.p,k,R),x&&Math.min(_(x,ct),_(x,G))<=k&&(D.push(B),D.push(m(x,B)),b.remove(x),R.remove(B),R.insert(f(B)),R.insert(f(B.next)))}}B=T;var V=[];do V.push(B.p),B=B.next;while(B!==T);return V.push(B.p),V}function s(v,S,P,I,b,D,O){for(var T=new t([],a),x=v.data;x;){for(var R=0;R<x.children.length;R++){var z=x.children[R],rt=x.leaf?E(z,P,I):o(P,I,z);rt>D||T.push({node:z,dist:rt})}for(;T.length&&!T.peek().node.children;){var B=T.pop(),ct=B.node,G=E(ct,S,P),X=E(ct,I,b);if(B.dist<G&&B.dist<X&&u(P,ct,O)&&u(I,ct,O))return ct}x=T.pop(),x&&(x=x.node)}return null}function a(v,S){return v.dist-S.dist}function o(v,S,P){if(l(v,P)||l(S,P))return 0;var I=M(v[0],v[1],S[0],S[1],P.minX,P.minY,P.maxX,P.minY);if(I===0)return 0;var b=M(v[0],v[1],S[0],S[1],P.minX,P.minY,P.minX,P.maxY);if(b===0)return 0;var D=M(v[0],v[1],S[0],S[1],P.maxX,P.minY,P.maxX,P.maxY);if(D===0)return 0;var O=M(v[0],v[1],S[0],S[1],P.minX,P.maxY,P.maxX,P.maxY);return O===0?0:Math.min(I,b,D,O)}function l(v,S){return v[0]>=S.minX&&v[0]<=S.maxX&&v[1]>=S.minY&&v[1]<=S.maxY}function u(v,S,P){for(var I=Math.min(v[0],S[0]),b=Math.min(v[1],S[1]),D=Math.max(v[0],S[0]),O=Math.max(v[1],S[1]),T=P.search({minX:I,minY:b,maxX:D,maxY:O}),x=0;x<T.length;x++)if(h(T[x].p,T[x].next.p,v,S))return!1;return!0}function c(v,S,P){return n(v[0],v[1],S[0],S[1],P[0],P[1])}function h(v,S,P,I){return v!==I&&S!==P&&c(v,S,P)>0!=c(v,S,I)>0&&c(P,I,v)>0!=c(P,I,S)>0}function f(v){var S=v.p,P=v.next.p;return v.minX=Math.min(S[0],P[0]),v.minY=Math.min(S[1],P[1]),v.maxX=Math.max(S[0],P[0]),v.maxY=Math.max(S[1],P[1]),v}function g(v){for(var S=v[0],P=v[0],I=v[0],b=v[0],D=0;D<v.length;D++){var O=v[D];O[0]<S[0]&&(S=O),O[0]>I[0]&&(I=O),O[1]<P[1]&&(P=O),O[1]>b[1]&&(b=O)}var T=[S,P,I,b],x=T.slice();for(D=0;D<v.length;D++)e(v[D],T)||x.push(v[D]);return w(x)}function m(v,S){var P={p:v,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return S?(P.next=S.next,P.prev=S,S.next.prev=P,S.next=P):(P.prev=P,P.next=P),P}function _(v,S){var P=v[0]-S[0],I=v[1]-S[1];return P*P+I*I}function E(v,S,P){var I=S[0],b=S[1],D=P[0]-I,O=P[1]-b;if(D!==0||O!==0){var T=((v[0]-I)*D+(v[1]-b)*O)/(D*D+O*O);T>1?(I=P[0],b=P[1]):T>0&&(I+=D*T,b+=O*T)}return D=v[0]-I,O=v[1]-b,D*D+O*O}function M(v,S,P,I,b,D,O,T){var x=P-v,R=I-S,z=O-b,rt=T-D,B=v-b,ct=S-D,G=x*x+R*R,X=x*z+R*rt,k=z*z+rt*rt,V=x*B+R*ct,A=z*B+rt*ct,W=G*k-X*X,J,ot,gt,lt,St=W,ut=W;W===0?(ot=0,St=1,lt=A,ut=k):(ot=X*A-k*V,lt=G*A-X*V,ot<0?(ot=0,lt=A,ut=k):ot>St&&(ot=St,lt=A+X,ut=k)),lt<0?(lt=0,-V<0?ot=0:-V>G?ot=St:(ot=-V,St=G)):lt>ut&&(lt=ut,-V+X<0?ot=0:-V+X>G?ot=St:(ot=-V+X,St=G)),J=ot===0?0:ot/St,gt=lt===0?0:lt/ut;var It=(1-J)*v+J*P,Nt=(1-J)*S+J*I,j=(1-gt)*b+gt*O,Pt=(1-gt)*D+gt*T,bt=j-It,Gt=Pt-Nt;return bt*bt+Gt*Gt}function y(v,S){return v[0]===S[0]?v[1]-S[1]:v[0]-S[0]}function w(v){v.sort(y);for(var S=[],P=0;P<v.length;P++){for(;S.length>=2&&c(S[S.length-2],S[S.length-1],v[P])<=0;)S.pop();S.push(v[P])}for(var I=[],b=v.length-1;b>=0;b--){for(;I.length>=2&&c(I[I.length-2],I[I.length-1],v[b])<=0;)I.pop();I.push(v[b])}return I.pop(),S.pop(),S.concat(I)}return Zh.exports}var ey=ty();const ry=dp(ey);function ny(r,t){t===void 0&&(t={}),t.concavity=t.concavity||1/0;var e=[];if(Hl(r,function(i){e.push([i[0],i[1]])}),!e.length)return null;var n=ry(e,t.concavity);return n.length>3?Cr([n]):null}function kn(r,t,e){if(e===void 0&&(e={}),!r)throw new Error("point is required");if(!t)throw new Error("polygon is required");var n=Fr(r),i=_n(t),s=i.type,a=t.bbox,o=i.coordinates;if(a&&iy(n,a)===!1)return!1;s==="Polygon"&&(o=[o]);for(var l=!1,u=0;u<o.length&&!l;u++)if(Ep(n,o[u][0],e.ignoreBoundary)){for(var c=!1,h=1;h<o[u].length&&!c;)Ep(n,o[u][h],!e.ignoreBoundary)&&(c=!0),h++;c||(l=!0)}return l}function Ep(r,t,e){var n=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var i=0,s=t.length-1;i<t.length;s=i++){var a=t[i][0],o=t[i][1],l=t[s][0],u=t[s][1],c=r[1]*(a-l)+o*(l-r[0])+u*(r[0]-a)===0&&(a-r[0])*(l-r[0])<=0&&(o-r[1])*(u-r[1])<=0;if(c)return!e;var h=o>r[1]!=u>r[1]&&r[0]<(l-a)*(r[1]-o)/(u-o)+a;h&&(n=!n)}return n}function iy(r,t){return t[0]<=r[0]&&t[1]<=r[1]&&t[2]>=r[0]&&t[3]>=r[1]}function ps(r,t,e){e===void 0&&(e={});var n=Fr(r),i=Fr(t),s=Ir(i[1]-n[1]),a=Ir(i[0]-n[0]),o=Ir(n[1]),l=Ir(i[1]),u=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(o)*Math.cos(l);return yf(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),e.units)}function Xl(r,t,e,n){n===void 0&&(n={});var i=Fr(r),s=Ir(i[0]),a=Ir(i[1]),o=Ir(e),l=_f(t,n.units),u=Math.asin(Math.sin(a)*Math.cos(l)+Math.cos(a)*Math.sin(l)*Math.cos(o)),c=s+Math.atan2(Math.sin(o)*Math.sin(l)*Math.cos(a),Math.cos(l)-Math.sin(a)*Math.sin(u)),h=Kh(c),f=Kh(u);return ae([h,f],n.properties)}function sy(r,t,e){e===void 0&&(e={});for(var n=e.steps||64,i=e.properties?e.properties:!Array.isArray(r)&&r.type==="Feature"&&r.properties?r.properties:{},s=[],a=0;a<n;a++)s.push(Xl(r,t,a*-360/n,e).geometry.coordinates);return s.push(s[0]),Cr([s],i)}function Uu(r,t,e){if(e===void 0&&(e={}),e.final===!0)return ay(r,t);var n=Fr(r),i=Fr(t),s=Ir(n[0]),a=Ir(i[0]),o=Ir(n[1]),l=Ir(i[1]),u=Math.sin(a-s)*Math.cos(l),c=Math.cos(o)*Math.sin(l)-Math.sin(o)*Math.cos(l)*Math.cos(a-s);return Kh(Math.atan2(u,c))}function ay(r,t){var e=Uu(t,r);return e=(e+180)%360,e}function oy(r,t){var e=ps(r,t),n=Uu(r,t),i=Xl(r,e/2,n);return i}function ly(r,t){t===void 0&&(t={});var e=ci(r),n=(e[0]+e[2])/2,i=(e[1]+e[3])/2;return ae([n,i],t.properties,t)}function Sp(r,t){t===void 0&&(t={});var e=0,n=0,i=0;return Hl(r,function(s){e+=s[0],n+=s[1],i++},!0),ae([e/i,n/i],t.properties)}function Pp(r,t){switch(t===void 0&&(t={}),Wv(r)){case"Point":return ae(Fr(r),t.properties);case"Polygon":var e=[];Hl(r,function(v){e.push(v)});var n=Sp(r,{properties:t.properties}),i=n.geometry.coordinates,s=0,a=0,o=0,l,u,c,h,f,g,m,_,E=e.map(function(v){return[v[0]-i[0],v[1]-i[1]]});for(l=0;l<e.length-1;l++)u=E[l],h=u[0],g=u[1],c=E[l+1],f=c[0],m=c[1],_=h*m-f*g,o+=_,s+=(h+f)*_,a+=(g+m)*_;if(o===0)return n;var M=o*.5,y=1/(6*M);return ae([i[0]+y*s,i[1]+y*a],t.properties);default:var w=ny(r);return w?Pp(w,{properties:t.properties}):Sp(r,{properties:t.properties})}}function Cp(r){if(!r)throw new Error("geojson is required");var t=[];return Ef(r,function(e){uy(e,t)}),Wl(t)}function uy(r,t){var e=[],n=r.geometry;if(n!==null){switch(n.type){case"Polygon":e=Aa(n);break;case"LineString":e=[Aa(n)]}e.forEach(function(i){var s=hy(i,r.properties);s.forEach(function(a){a.id=t.length,t.push(a)})})}}function hy(r,t){var e=[];return r.reduce(function(n,i){var s=hi([n,i],t);return s.bbox=cy(n,i),e.push(s),i}),e}function cy(r,t){var e=r[0],n=r[1],i=t[0],s=t[1],a=e<i?e:i,o=n<s?n:s,l=e>i?e:i,u=n>s?n:s;return[a,o,l,u]}var jh={exports:{}},Cf={},Ip;function Mp(){return Ip||(Ip=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.earthRadius=63710088e-1,r.factors={centimeters:r.earthRadius*100,centimetres:r.earthRadius*100,degrees:r.earthRadius/111325,feet:r.earthRadius*3.28084,inches:r.earthRadius*39.37,kilometers:r.earthRadius/1e3,kilometres:r.earthRadius/1e3,meters:r.earthRadius,metres:r.earthRadius,miles:r.earthRadius/1609.344,millimeters:r.earthRadius*1e3,millimetres:r.earthRadius*1e3,nauticalmiles:r.earthRadius/1852,radians:1,yards:r.earthRadius*1.0936},r.unitsFactors={centimeters:100,centimetres:100,degrees:8982708286548395e-21,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:.0006213711922373339,millimeters:1e3,millimetres:1e3,nauticalmiles:.0005399568034557236,radians:1/r.earthRadius,yards:1.0936133},r.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function t(T,x,R){R===void 0&&(R={});var z={type:"Feature"};return(R.id===0||R.id)&&(z.id=R.id),R.bbox&&(z.bbox=R.bbox),z.properties=x||{},z.geometry=T,z}r.feature=t;function e(T,x,R){switch(T){case"Point":return n(x).geometry;case"LineString":return o(x).geometry;case"Polygon":return s(x).geometry;case"MultiPoint":return h(x).geometry;case"MultiLineString":return c(x).geometry;case"MultiPolygon":return f(x).geometry;default:throw new Error(T+" is invalid")}}r.geometry=e;function n(T,x,R){if(R===void 0&&(R={}),!T)throw new Error("coordinates is required");if(!Array.isArray(T))throw new Error("coordinates must be an Array");if(T.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!I(T[0])||!I(T[1]))throw new Error("coordinates must contain numbers");var z={type:"Point",coordinates:T};return t(z,x,R)}r.point=n;function i(T,x,R){return R===void 0&&(R={}),u(T.map(function(z){return n(z,x)}),R)}r.points=i;function s(T,x,R){R===void 0&&(R={});for(var z=0,rt=T;z<rt.length;z++){var B=rt[z];if(B.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var ct=0;ct<B[B.length-1].length;ct++)if(B[B.length-1][ct]!==B[0][ct])throw new Error("First and last Position are not equivalent.")}var G={type:"Polygon",coordinates:T};return t(G,x,R)}r.polygon=s;function a(T,x,R){return R===void 0&&(R={}),u(T.map(function(z){return s(z,x)}),R)}r.polygons=a;function o(T,x,R){if(R===void 0&&(R={}),T.length<2)throw new Error("coordinates must be an array of two or more positions");var z={type:"LineString",coordinates:T};return t(z,x,R)}r.lineString=o;function l(T,x,R){return R===void 0&&(R={}),u(T.map(function(z){return o(z,x)}),R)}r.lineStrings=l;function u(T,x){x===void 0&&(x={});var R={type:"FeatureCollection"};return x.id&&(R.id=x.id),x.bbox&&(R.bbox=x.bbox),R.features=T,R}r.featureCollection=u;function c(T,x,R){R===void 0&&(R={});var z={type:"MultiLineString",coordinates:T};return t(z,x,R)}r.multiLineString=c;function h(T,x,R){R===void 0&&(R={});var z={type:"MultiPoint",coordinates:T};return t(z,x,R)}r.multiPoint=h;function f(T,x,R){R===void 0&&(R={});var z={type:"MultiPolygon",coordinates:T};return t(z,x,R)}r.multiPolygon=f;function g(T,x,R){R===void 0&&(R={});var z={type:"GeometryCollection",geometries:T};return t(z,x,R)}r.geometryCollection=g;function m(T,x){if(x===void 0&&(x=0),x&&!(x>=0))throw new Error("precision must be a positive number");var R=Math.pow(10,x||0);return Math.round(T*R)/R}r.round=m;function _(T,x){x===void 0&&(x="kilometers");var R=r.factors[x];if(!R)throw new Error(x+" units is invalid");return T*R}r.radiansToLength=_;function E(T,x){x===void 0&&(x="kilometers");var R=r.factors[x];if(!R)throw new Error(x+" units is invalid");return T/R}r.lengthToRadians=E;function M(T,x){return w(E(T,x))}r.lengthToDegrees=M;function y(T){var x=T%360;return x<0&&(x+=360),x}r.bearingToAzimuth=y;function w(T){var x=T%(2*Math.PI);return x*180/Math.PI}r.radiansToDegrees=w;function v(T){var x=T%360;return x*Math.PI/180}r.degreesToRadians=v;function S(T,x,R){if(x===void 0&&(x="kilometers"),R===void 0&&(R="kilometers"),!(T>=0))throw new Error("length must be a positive number");return _(E(T,x),R)}r.convertLength=S;function P(T,x,R){if(x===void 0&&(x="meters"),R===void 0&&(R="kilometers"),!(T>=0))throw new Error("area must be a positive number");var z=r.areaFactors[x];if(!z)throw new Error("invalid original units");var rt=r.areaFactors[R];if(!rt)throw new Error("invalid final units");return T/z*rt}r.convertArea=P;function I(T){return!isNaN(T)&&T!==null&&!Array.isArray(T)}r.isNumber=I;function b(T){return!!T&&T.constructor===Object}r.isObject=b;function D(T){if(!T)throw new Error("bbox is required");if(!Array.isArray(T))throw new Error("bbox must be an Array");if(T.length!==4&&T.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");T.forEach(function(x){if(!I(x))throw new Error("bbox must only contain numbers")})}r.validateBBox=D;function O(T){if(!T)throw new Error("id is required");if(["string","number"].indexOf(typeof T)===-1)throw new Error("id must be a number or a string")}r.validateId=O}(Cf)),Cf}var ze={},Np;function bp(){if(Np)return ze;Np=1,Object.defineProperty(ze,"__esModule",{value:!0});var r=Mp();function t(y,w,v){if(y!==null)for(var S,P,I,b,D,O,T,x=0,R=0,z,rt=y.type,B=rt==="FeatureCollection",ct=rt==="Feature",G=B?y.features.length:1,X=0;X<G;X++){T=B?y.features[X].geometry:ct?y.geometry:y,z=T?T.type==="GeometryCollection":!1,D=z?T.geometries.length:1;for(var k=0;k<D;k++){var V=0,A=0;if(b=z?T.geometries[k]:T,b!==null){O=b.coordinates;var W=b.type;switch(x=v&&(W==="Polygon"||W==="MultiPolygon")?1:0,W){case null:break;case"Point":if(w(O,R,X,V,A)===!1)return!1;R++,V++;break;case"LineString":case"MultiPoint":for(S=0;S<O.length;S++){if(w(O[S],R,X,V,A)===!1)return!1;R++,W==="MultiPoint"&&V++}W==="LineString"&&V++;break;case"Polygon":case"MultiLineString":for(S=0;S<O.length;S++){for(P=0;P<O[S].length-x;P++){if(w(O[S][P],R,X,V,A)===!1)return!1;R++}W==="MultiLineString"&&V++,W==="Polygon"&&A++}W==="Polygon"&&V++;break;case"MultiPolygon":for(S=0;S<O.length;S++){for(A=0,P=0;P<O[S].length;P++){for(I=0;I<O[S][P].length-x;I++){if(w(O[S][P][I],R,X,V,A)===!1)return!1;R++}A++}V++}break;case"GeometryCollection":for(S=0;S<b.geometries.length;S++)if(t(b.geometries[S],w,v)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function e(y,w,v,S){var P=v;return t(y,function(I,b,D,O,T){b===0&&v===void 0?P=I:P=w(P,I,b,D,O,T)},S),P}function n(y,w){var v;switch(y.type){case"FeatureCollection":for(v=0;v<y.features.length&&w(y.features[v].properties,v)!==!1;v++);break;case"Feature":w(y.properties,0);break}}function i(y,w,v){var S=v;return n(y,function(P,I){I===0&&v===void 0?S=P:S=w(S,P,I)}),S}function s(y,w){if(y.type==="Feature")w(y,0);else if(y.type==="FeatureCollection")for(var v=0;v<y.features.length&&w(y.features[v],v)!==!1;v++);}function a(y,w,v){var S=v;return s(y,function(P,I){I===0&&v===void 0?S=P:S=w(S,P,I)}),S}function o(y){var w=[];return t(y,function(v){w.push(v)}),w}function l(y,w){var v,S,P,I,b,D,O,T,x,R,z=0,rt=y.type==="FeatureCollection",B=y.type==="Feature",ct=rt?y.features.length:1;for(v=0;v<ct;v++){for(D=rt?y.features[v].geometry:B?y.geometry:y,T=rt?y.features[v].properties:B?y.properties:{},x=rt?y.features[v].bbox:B?y.bbox:void 0,R=rt?y.features[v].id:B?y.id:void 0,O=D?D.type==="GeometryCollection":!1,b=O?D.geometries.length:1,P=0;P<b;P++){if(I=O?D.geometries[P]:D,I===null){if(w(null,z,T,x,R)===!1)return!1;continue}switch(I.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(w(I,z,T,x,R)===!1)return!1;break}case"GeometryCollection":{for(S=0;S<I.geometries.length;S++)if(w(I.geometries[S],z,T,x,R)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}z++}}function u(y,w,v){var S=v;return l(y,function(P,I,b,D,O){I===0&&v===void 0?S=P:S=w(S,P,I,b,D,O)}),S}function c(y,w){l(y,function(v,S,P,I,b){var D=v===null?null:v.type;switch(D){case null:case"Point":case"LineString":case"Polygon":return w(r.feature(v,P,{bbox:I,id:b}),S,0)===!1?!1:void 0}var O;switch(D){case"MultiPoint":O="Point";break;case"MultiLineString":O="LineString";break;case"MultiPolygon":O="Polygon";break}for(var T=0;T<v.coordinates.length;T++){var x=v.coordinates[T],R={type:O,coordinates:x};if(w(r.feature(R,P),S,T)===!1)return!1}})}function h(y,w,v){var S=v;return c(y,function(P,I,b){I===0&&b===0&&v===void 0?S=P:S=w(S,P,I,b)}),S}function f(y,w){c(y,function(v,S,P){var I=0;if(v.geometry){var b=v.geometry.type;if(!(b==="Point"||b==="MultiPoint")){var D,O=0,T=0,x=0;if(t(v,function(R,z,rt,B,ct){if(D===void 0||S>O||B>T||ct>x){D=R,O=S,T=B,x=ct,I=0;return}var G=r.lineString([D,R],v.properties);if(w(G,S,P,ct,I)===!1)return!1;I++,D=R})===!1)return!1}}})}function g(y,w,v){var S=v,P=!1;return f(y,function(I,b,D,O,T){P===!1&&v===void 0?S=I:S=w(S,I,b,D,O,T),P=!0}),S}function m(y,w){if(!y)throw new Error("geojson is required");c(y,function(v,S,P){if(v.geometry!==null){var I=v.geometry.type,b=v.geometry.coordinates;switch(I){case"LineString":if(w(v,S,P,0,0)===!1)return!1;break;case"Polygon":for(var D=0;D<b.length;D++)if(w(r.lineString(b[D],v.properties),S,P,D)===!1)return!1;break}}})}function _(y,w,v){var S=v;return m(y,function(P,I,b,D){I===0&&v===void 0?S=P:S=w(S,P,I,b,D)}),S}function E(y,w){if(w=w||{},!r.isObject(w))throw new Error("options is invalid");var v=w.featureIndex||0,S=w.multiFeatureIndex||0,P=w.geometryIndex||0,I=w.segmentIndex||0,b=w.properties,D;switch(y.type){case"FeatureCollection":v<0&&(v=y.features.length+v),b=b||y.features[v].properties,D=y.features[v].geometry;break;case"Feature":b=b||y.properties,D=y.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":D=y;break;default:throw new Error("geojson is invalid")}if(D===null)return null;var O=D.coordinates;switch(D.type){case"Point":case"MultiPoint":return null;case"LineString":return I<0&&(I=O.length+I-1),r.lineString([O[I],O[I+1]],b,w);case"Polygon":return P<0&&(P=O.length+P),I<0&&(I=O[P].length+I-1),r.lineString([O[P][I],O[P][I+1]],b,w);case"MultiLineString":return S<0&&(S=O.length+S),I<0&&(I=O[S].length+I-1),r.lineString([O[S][I],O[S][I+1]],b,w);case"MultiPolygon":return S<0&&(S=O.length+S),P<0&&(P=O[S].length+P),I<0&&(I=O[S][P].length-I-1),r.lineString([O[S][P][I],O[S][P][I+1]],b,w)}throw new Error("geojson is invalid")}function M(y,w){if(w=w||{},!r.isObject(w))throw new Error("options is invalid");var v=w.featureIndex||0,S=w.multiFeatureIndex||0,P=w.geometryIndex||0,I=w.coordIndex||0,b=w.properties,D;switch(y.type){case"FeatureCollection":v<0&&(v=y.features.length+v),b=b||y.features[v].properties,D=y.features[v].geometry;break;case"Feature":b=b||y.properties,D=y.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":D=y;break;default:throw new Error("geojson is invalid")}if(D===null)return null;var O=D.coordinates;switch(D.type){case"Point":return r.point(O,b,w);case"MultiPoint":return S<0&&(S=O.length+S),r.point(O[S],b,w);case"LineString":return I<0&&(I=O.length+I),r.point(O[I],b,w);case"Polygon":return P<0&&(P=O.length+P),I<0&&(I=O[P].length+I),r.point(O[P][I],b,w);case"MultiLineString":return S<0&&(S=O.length+S),I<0&&(I=O[S].length+I),r.point(O[S][I],b,w);case"MultiPolygon":return S<0&&(S=O.length+S),P<0&&(P=O[S].length+P),I<0&&(I=O[S][P].length-I),r.point(O[S][P][I],b,w)}throw new Error("geojson is invalid")}return ze.coordAll=o,ze.coordEach=t,ze.coordReduce=e,ze.featureEach=s,ze.featureReduce=a,ze.findPoint=M,ze.findSegment=E,ze.flattenEach=c,ze.flattenReduce=h,ze.geomEach=l,ze.geomReduce=u,ze.lineEach=m,ze.lineReduce=_,ze.propEach=n,ze.propReduce=i,ze.segmentEach=f,ze.segmentReduce=g,ze}var tc={},Tp;function fy(){if(Tp)return tc;Tp=1,Object.defineProperty(tc,"__esModule",{value:!0});var r=bp();function t(e){var n=[1/0,1/0,-1/0,-1/0];return r.coordEach(e,function(i){n[0]>i[0]&&(n[0]=i[0]),n[1]>i[1]&&(n[1]=i[1]),n[2]<i[0]&&(n[2]=i[0]),n[3]<i[1]&&(n[3]=i[1])}),n}return t.default=t,tc.default=t,tc}var Dp;function dy(){if(Dp)return jh.exports;Dp=1;var r=gp(),t=Mp(),e=bp(),n=fy().default,i=e.featureEach;e.coordEach,t.polygon;var s=t.featureCollection;function a(o){var l=new r(o);return l.insert=function(u){if(u.type!=="Feature")throw new Error("invalid feature");return u.bbox=u.bbox?u.bbox:n(u),r.prototype.insert.call(this,u)},l.load=function(u){var c=[];return Array.isArray(u)?u.forEach(function(h){if(h.type!=="Feature")throw new Error("invalid features");h.bbox=h.bbox?h.bbox:n(h),c.push(h)}):i(u,function(h){if(h.type!=="Feature")throw new Error("invalid features");h.bbox=h.bbox?h.bbox:n(h),c.push(h)}),r.prototype.load.call(this,c)},l.remove=function(u,c){if(u.type!=="Feature")throw new Error("invalid feature");return u.bbox=u.bbox?u.bbox:n(u),r.prototype.remove.call(this,u,c)},l.clear=function(){return r.prototype.clear.call(this)},l.search=function(u){var c=r.prototype.search.call(this,this.toBBox(u));return s(c)},l.collides=function(u){return r.prototype.collides.call(this,this.toBBox(u))},l.all=function(){var u=r.prototype.all.call(this);return s(u)},l.toJSON=function(){return r.prototype.toJSON.call(this)},l.fromJSON=function(u){return r.prototype.fromJSON.call(this,u)},l.toBBox=function(u){var c;if(u.bbox)c=u.bbox;else if(Array.isArray(u)&&u.length===4)c=u;else if(Array.isArray(u)&&u.length===6)c=[u[0],u[1],u[3],u[4]];else if(u.type==="Feature")c=n(u);else if(u.type==="FeatureCollection")c=n(u);else throw new Error("invalid geojson");return{minX:c[0],minY:c[1],maxX:c[2],maxY:c[3]}},l}return jh.exports=a,jh.exports.default=a,jh.exports}var py=dy();const gy=dp(py);function xp(r,t){var e={},n=[];if(r.type==="LineString"&&(r=ui(r)),t.type==="LineString"&&(t=ui(t)),r.type==="Feature"&&t.type==="Feature"&&r.geometry!==null&&t.geometry!==null&&r.geometry.type==="LineString"&&t.geometry.type==="LineString"&&r.geometry.coordinates.length===2&&t.geometry.coordinates.length===2){var i=Op(r,t);return i&&n.push(i),Wl(n)}var s=gy();return s.load(Cp(t)),Qh(Cp(r),function(a){Qh(s.search(a),function(o){var l=Op(a,o);if(l){var u=Aa(l).join(",");e[u]||(e[u]=!0,n.push(l))}})}),Wl(n)}function Op(r,t){var e=Aa(r),n=Aa(t);if(e.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(n.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=e[0][0],s=e[0][1],a=e[1][0],o=e[1][1],l=n[0][0],u=n[0][1],c=n[1][0],h=n[1][1],f=(h-u)*(a-i)-(c-l)*(o-s),g=(c-l)*(s-u)-(h-u)*(i-l),m=(a-i)*(s-u)-(o-s)*(i-l);if(f===0)return null;var _=g/f,E=m/f;if(_>=0&&_<=1&&E>=0&&E<=1){var M=i+_*(a-i),y=s+_*(o-s);return ae([M,y])}return null}function my(r,t,e){e===void 0&&(e={});var n=ae([1/0,1/0],{dist:1/0}),i=0;return Ef(r,function(s){for(var a=Aa(s),o=0;o<a.length-1;o++){var l=ae(a[o]);l.properties.dist=ps(t,l,e);var u=ae(a[o+1]);u.properties.dist=ps(t,u,e);var c=ps(l,u,e),h=Math.max(l.properties.dist,u.properties.dist),f=Uu(l,u),g=Xl(t,h,f+90,e),m=Xl(t,h,f-90,e),_=xp(hi([g.geometry.coordinates,m.geometry.coordinates]),hi([l.geometry.coordinates,u.geometry.coordinates])),E=null;_.features.length>0&&(E=_.features[0],E.properties.dist=ps(t,E,e),E.properties.location=i+ps(l,E,e)),l.properties.dist<n.properties.dist&&(n=l,n.properties.index=o,n.properties.location=i),u.properties.dist<n.properties.dist&&(n=u,n.properties.index=o+1,n.properties.location=i+c),E&&E.properties.dist<n.properties.dist&&(n=E,n.properties.index=o),i+=c}}),n}function Ap(r,t,e){e===void 0&&(e={});var n=Fr(r),i=Fr(t);i[0]+=i[0]-n[0]>180?-360:n[0]-i[0]>180?360:0;var s=vy(n,i),a=wf(s,"meters",e.units);return a}function vy(r,t,e){e=e===void 0?hr:Number(e);var n=e,i=r[1]*Math.PI/180,s=t[1]*Math.PI/180,a=s-i,o=Math.abs(t[0]-r[0])*Math.PI/180;o>Math.PI&&(o-=2*Math.PI);var l=Math.log(Math.tan(s/2+Math.PI/4)/Math.tan(i/2+Math.PI/4)),u=Math.abs(l)>1e-11?a/l:Math.cos(i),c=Math.sqrt(a*a+u*u*o*o),h=c*n;return h}function yy(r,t,e){if(e===void 0&&(e={}),e.method||(e.method="geodesic"),e.units||(e.units="kilometers"),!r)throw new Error("pt is required");if(Array.isArray(r)?r=ae(r):r.type==="Point"?r=ui(r):fp(r,"Point","point"),!t)throw new Error("line is required");Array.isArray(t)?t=hi(t):t.type==="LineString"?t=ui(t):fp(t,"LineString","line");var n=1/0,i=r.geometry.coordinates;return qv(t,function(s){var a=s.geometry.coordinates[0],o=s.geometry.coordinates[1],l=_y(i,a,o,e);l<n&&(n=l)}),wf(n,"degrees",e.units)}function _y(r,t,e,n){var i=[e[0]-t[0],e[1]-t[1]],s=[r[0]-t[0],r[1]-t[1]],a=Lp(s,i);if(a<=0)return If(r,t,{method:n.method,units:"degrees"});var o=Lp(i,i);if(o<=a)return If(r,e,{method:n.method,units:"degrees"});var l=a/o,u=[t[0]+l*i[0],t[1]+l*i[1]];return If(r,u,{method:n.method,units:"degrees"})}function Lp(r,t){return r[0]*t[0]+r[1]*t[1]}function If(r,t,e){return e.method==="planar"?Ap(r,t,e):ps(r,t,e)}var Rp=6378137;function wy(r){return Uv(r,function(t,e){return t+Ey(e)},0)}function Ey(r){var t=0,e;switch(r.type){case"Polygon":return Fp(r.coordinates);case"MultiPolygon":for(e=0;e<r.coordinates.length;e++)t+=Fp(r.coordinates[e]);return t;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function Fp(r){var t=0;if(r&&r.length>0){t+=Math.abs(Gp(r[0]));for(var e=1;e<r.length;e++)t-=Math.abs(Gp(r[e]))}return t}function Gp(r){var t,e,n,i,s,a,o,l=0,u=r.length;if(u>2){for(o=0;o<u;o++)o===u-2?(i=u-2,s=u-1,a=0):o===u-1?(i=u-1,s=0,a=1):(i=o,s=o+1,a=o+2),t=r[i],e=r[s],n=r[a],l+=(Mf(n[0])-Mf(t[0]))*Math.sin(Mf(e[1]));l=l*Rp*Rp/2}return l}function Mf(r){return r*Math.PI/180}function Sy(r,t,e){e===void 0&&(e={});for(var n=_n(r),i=n.coordinates,s=0,a=0;a<i.length&&!(t>=s&&a===i.length-1);a++)if(s>=t){var o=t-s;if(o){var l=Uu(i[a],i[a-1])-180,u=Xl(i[a],o,l,e);return u}else return ae(i[a])}else s+=ps(i[a],i[a+1],e);return ae(i[i.length-1])}function gs(r,t,e){e===void 0&&(e={});for(var n=Fr(r),i=Aa(t),s=0;s<i.length-1;s++){var a=!1;if(e.ignoreEndVertices&&(s===0&&(a="start"),s===i.length-2&&(a="end"),s===0&&s+1===i.length-1&&(a="both")),Py(i[s],i[s+1],n,a,typeof e.epsilon>"u"?null:e.epsilon))return!0}return!1}function Py(r,t,e,n,i){var s=e[0],a=e[1],o=r[0],l=r[1],u=t[0],c=t[1],h=e[0]-o,f=e[1]-l,g=u-o,m=c-l,_=h*m-f*g;if(i!==null){if(Math.abs(_)>i)return!1}else if(_!==0)return!1;if(n){if(n==="start")return Math.abs(g)>=Math.abs(m)?g>0?o<s&&s<=u:u<=s&&s<o:m>0?l<a&&a<=c:c<=a&&a<l;if(n==="end")return Math.abs(g)>=Math.abs(m)?g>0?o<=s&&s<u:u<s&&s<=o:m>0?l<=a&&a<c:c<a&&a<=l;if(n==="both")return Math.abs(g)>=Math.abs(m)?g>0?o<s&&s<u:u<s&&s<o:m>0?l<a&&a<c:c<a&&a<l}else return Math.abs(g)>=Math.abs(m)?g>0?o<=s&&s<=u:u<=s&&s<=o:m>0?l<=a&&a<=c:c<=a&&a<=l;return!1}function Cy(r,t){var e=_n(r),n=_n(t),i=e.type,s=n.type;switch(i){case"Point":switch(s){case"MultiPoint":return Iy(e,n);case"LineString":return gs(e,n,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return kn(e,n,{ignoreBoundary:!0});default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"MultiPoint":return My(e,n);case"LineString":return Ny(e,n);case"Polygon":case"MultiPolygon":return by(e,n);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"LineString":return Ty(e,n);case"Polygon":case"MultiPolygon":return Dy(e,n);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Polygon":case"MultiPolygon":return xy(e,n);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function Iy(r,t){var e,n=!1;for(e=0;e<t.coordinates.length;e++)if(zp(t.coordinates[e],r.coordinates)){n=!0;break}return n}function My(r,t){for(var e=0;e<r.coordinates.length;e++){for(var n=!1,i=0;i<t.coordinates.length;i++)zp(r.coordinates[e],t.coordinates[i])&&(n=!0);if(!n)return!1}return!0}function Ny(r,t){for(var e=!1,n=0;n<r.coordinates.length;n++){if(!gs(r.coordinates[n],t))return!1;e||(e=gs(r.coordinates[n],t,{ignoreEndVertices:!0}))}return e}function by(r,t){for(var e=!0,n=!1,i=0;i<r.coordinates.length;i++){if(n=kn(r.coordinates[1],t),!n){e=!1;break}n=kn(r.coordinates[1],t,{ignoreBoundary:!0})}return e&&n}function Ty(r,t){for(var e=0;e<r.coordinates.length;e++)if(!gs(r.coordinates[e],t))return!1;return!0}function Dy(r,t){var e=ci(t),n=ci(r);if(!kp(e,n))return!1;for(var i=!1,s=0;s<r.coordinates.length-1;s++){if(!kn(r.coordinates[s],t))return!1;if(i||(i=kn(r.coordinates[s],t,{ignoreBoundary:!0})),!i){var a=Oy(r.coordinates[s],r.coordinates[s+1]);i=kn(a,t,{ignoreBoundary:!0})}}return i}function xy(r,t){var e=ci(r),n=ci(t);if(!kp(n,e))return!1;for(var i=0;i<r.coordinates[0].length;i++)if(!kn(r.coordinates[0][i],t))return!1;return!0}function kp(r,t){return!(r[0]>t[0]||r[2]<t[2]||r[1]>t[1]||r[3]<t[3])}function zp(r,t){return r[0]===t[0]&&r[1]===t[1]}function Oy(r,t){return[(r[0]+t[0])/2,(r[1]+t[1])/2]}function Ay(r,t,e){e===void 0&&(e={});var n;e.final?n=Vp(Fr(t),Fr(r)):n=Vp(Fr(r),Fr(t));var i=n>180?-(360-n):n;return i}function Vp(r,t){var e=Ir(r[1]),n=Ir(t[1]),i=Ir(t[0]-r[0]);i>Math.PI&&(i-=2*Math.PI),i<-Math.PI&&(i+=2*Math.PI);var s=Math.log(Math.tan(n/2+Math.PI/4)/Math.tan(e/2+Math.PI/4)),a=Math.atan2(i,s);return(Kh(a)+360)%360}function Ly(r,t,e,n){n===void 0&&(n={});var i=t<0,s=wf(Math.abs(t),n.units,"meters");i&&(s=-Math.abs(s));var a=Fr(r),o=Ry(a,s,e);return o[0]+=o[0]-a[0]>180?-360:a[0]-o[0]>180?360:0,ae(o,n.properties)}function Ry(r,t,e,n){n=n===void 0?hr:Number(n);var i=t/n,s=r[0]*Math.PI/180,a=Ir(r[1]),o=Ir(e),l=i*Math.cos(o),u=a+l;Math.abs(u)>Math.PI/2&&(u=u>0?Math.PI-u:-Math.PI-u);var c=Math.log(Math.tan(u/2+Math.PI/4)/Math.tan(a/2+Math.PI/4)),h=Math.abs(c)>1e-11?l/c:Math.cos(a),f=i*Math.sin(o)/h,g=s+f;return[(g*180/Math.PI+540)%360-180,u*180/Math.PI]}function Fy(r,t){var e=_n(r),n=_n(t),i=e.type,s=n.type,a=e.coordinates,o=n.coordinates;switch(i){case"Point":switch(s){case"Point":return Nf(a,o);default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"Point":return Gy(e,n);case"MultiPoint":return ky(e,n);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"Point":return gs(n,e,{ignoreEndVertices:!0});case"LineString":return Uy(e,n);case"MultiPoint":return zy(e,n);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Point":return kn(n,e,{ignoreBoundary:!0});case"LineString":return qy(e,n);case"Polygon":return Wy(e,n);case"MultiPoint":return Vy(e,n);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function Gy(r,t){var e,n=!1;for(e=0;e<r.coordinates.length;e++)if(Nf(r.coordinates[e],t.coordinates)){n=!0;break}return n}function ky(r,t){for(var e=0,n=t.coordinates;e<n.length;e++){for(var i=n[e],s=!1,a=0,o=r.coordinates;a<o.length;a++){var l=o[a];if(Nf(i,l)){s=!0;break}}if(!s)return!1}return!0}function zy(r,t){for(var e=!1,n=0,i=t.coordinates;n<i.length;n++){var s=i[n];if(gs(s,r,{ignoreEndVertices:!0})&&(e=!0),!gs(s,r))return!1}return!!e}function Vy(r,t){for(var e=0,n=t.coordinates;e<n.length;e++){var i=n[e];if(!kn(i,r,{ignoreBoundary:!0}))return!1}return!0}function Uy(r,t){for(var e=!1,n=0,i=t.coordinates;n<i.length;n++){var s=i[n];if(gs({type:"Point",coordinates:s},r,{ignoreEndVertices:!0})&&(e=!0),!gs({type:"Point",coordinates:s},r,{ignoreEndVertices:!1}))return!1}return e}function qy(r,t){var e=!1,n=0,i=ci(r),s=ci(t);if(!Up(i,s))return!1;for(n;n<t.coordinates.length-1;n++){var a=Hy(t.coordinates[n],t.coordinates[n+1]);if(kn({type:"Point",coordinates:a},r,{ignoreBoundary:!0})){e=!0;break}}return e}function Wy(r,t){if(r.type==="Feature"&&r.geometry===null||t.type==="Feature"&&t.geometry===null)return!1;var e=ci(r),n=ci(t);if(!Up(e,n))return!1;for(var i=_n(t).coordinates,s=0,a=i;s<a.length;s++)for(var o=a[s],l=0,u=o;l<u.length;l++){var c=u[l];if(!kn(c,r))return!1}return!0}function Up(r,t){return!(r[0]>t[0]||r[2]<t[2]||r[1]>t[1]||r[3]<t[3])}function Nf(r,t){return r[0]===t[0]&&r[1]===t[1]}function Hy(r,t){return[(r[0]+t[0])/2,(r[1]+t[1])/2]}/**
|
|
3
|
+
`).join(" ")}`)):this._sceneObjRefs.set(s,[i]);const u=this.getLastSceneObject(s);this._refs[s]=u,this._refsChanged.emit(u,o)}};this.d(e.sceneObjCreatedEvent.don(i=>{const s=(a,o)=>n(i,a,o);i.ref&&s(i.ref,void 0),i.refChanged.don(s)})),this.d(e.sceneObjToDestroyEvent.don(i=>{i.ref&&n(i,void 0,i.ref)}))}get sceneObjRefs(){return this._sceneObjRefs}get refs(){return this._refs}get refsChanged(){return this._refsChanged}getLastSceneObject(e){const n=this.getSceneObjects(e);if(n)return n[n.length-1]}getSceneObjects(e){const n=this._sceneObjRefs.get(e);if(!(!n||n.length===0))return n}}function lp(r,t){const[e,n,i]=d.getReactFuncs(r),s=d.react(void 0),a=()=>{const o=e()??t;s.value=o&&ft.context.getStrFromEnv(o)};return a(),i&&s.d(i.don(a)),s.d(ft.context.environmentVariablesChanged.don(a)),s}function kv(r){do{const t=r.replace(/\${(.*?)\}/,(e,n)=>{const i=ft.context.getEnv(n);return i===void 0?(console.warn(`环境变量(${n})不存在,无法进行转换`),"{env-error}"):i});if(t===r)break;r=t}while(!0);return r}class zv extends d.Destroyable{constructor(){super();p(this,"_esObjConstructors",new Map);p(this,"_sceneObjs",new Map);p(this,"_sceneObjCreatedEvent",new d.Event);p(this,"_sceneObjToDestroyEvent",new d.Event);p(this,"_refsManager",this.dv(new Gv(this)));p(this,"_environmentVariables",window.ESSDK_ENV||{});p(this,"_environmentVariablesChanged",this.dv(new d.Event))}get typeNames(){return this._esObjConstructors.keys()}get sceneObjs(){return this._sceneObjs.values()}get sceneObjCreatedEvent(){return this._sceneObjCreatedEvent}get sceneObjToDestroyEvent(){return this._sceneObjToDestroyEvent}get refsManager(){return this._refsManager}get $refs(){return this._refsManager.refs}register(e,n,i){return this._esObjConstructors.has(e)&&console.warn(`register warn: ${e} has registered ! will be override!`),this._esObjConstructors.set(e,n),i&&d.setExtProp(n,"__sceneObjExtraInfo",i),e}_addSceneObject(e){this._sceneObjs.set(e.id,e),this._sceneObjCreatedEvent.emit(e),e.d(()=>this._deleteSceneObject(e))}addSceneObject(e){this._addSceneObject(e)}_deleteSceneObject(e){this._sceneObjToDestroyEvent.emit(e),this._sceneObjs.delete(e.id)}deleteSceneObject(e){this._deleteSceneObject(e)}createSceneObjectFromClass(e,n){if(!n||this._sceneObjs.has(n)){const s=d.createGuid();n&&console.warn(`已存在相同id的对象!id自动变更!${n} -> ${s} 请注意:id变更可能导致引用失效!`),n=s}if(!n)throw new Error("id不能为空!");const i=new e(n);return i.id!==n&&(console.warn(`sceneObj.id(${i.id}) !== id(${n}) sceneObjectType: ${i.typeName}`),console.warn("出现这种问题有可能是自定义的场景对象,没有在构造函数中传递id参数!示例如下:"),console.warn("class XXX extends XXX { constructor(id) { super(id); } }")),this._addSceneObject(i),i}createSceneObject(e,n){if(typeof e=="string"){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`Cannot find SceneObjectType: ${e}`);return}return this.createSceneObjectFromClass(i,n)}else return this.createSceneObjectFromClass(e,n)}createSceneObjectFromJson(e){const n=this.createSceneObject(e.type,e.id);return n&&(n.json=e),n}destroySceneObject(e){return this._deleteSceneObject(e),e.destroy(),e.isDestroyed()}getSceneObjectById(e){return this._sceneObjs.get(e)}getSceneObject(e){if(!e&&e!="")return Array.from(this._sceneObjs.values());if(e.startsWith("ES")){const n=[];for(const i of this._sceneObjs.values())i.typeName===e&&n.push(i);return n}else return this._sceneObjs.get(e)}_getSceneObjConstructor(e){const n=this._esObjConstructors.get(e);if(n)return n}getProps(e){const n=this._getSceneObjConstructor(e);if(!n){console.warn(`cannot get constructor from type: ${e}`);return}return d.getExtProp(n,"__sceneObjExtraInfo")}setProps(e,n){const i=this._getSceneObjConstructor(e);if(!i){console.warn(`cannot get constructor from type: ${e}`);return}let s=d.getExtProp(i,"__sceneObjExtraInfo");s||(s={},d.setExtProp(i,"__sceneObjExtraInfo",s)),Object.assign(s,n)}getProp(e,n){const i=this.getProps(e);return i&&i[n]}setProp(e,n,i){this.setProps(e,{[n]:i})}get environmentVariables(){return this._environmentVariables}set environmentVariables(e){for(let[n,i]of Object.entries(e))this.setEnv(n,i)}get environmentVariablesChanged(){return this._environmentVariablesChanged}setEnv(e,n){if(this._environmentVariables[e]!==n){const i=this._environmentVariables[e];this._environmentVariables[e]=n,this._environmentVariablesChanged.emit(e,n,i)}window.ESSDK_ENV={...this._environmentVariables}}getEnv(e){return this._environmentVariables[e]}getStrFromEnv(e){return kv(e)}createEnvStrReact(e,n){return lp(e,n)}createEvnStrReact(e,n){return lp(e,n)}}const xt=class xt extends d.Destroyable{constructor(e){super();p(this,"_components",this.dv(new d.ObservableSet));p(this,"_viewerAttached",this.dv(new d.Event));p(this,"_viewerDetached",this.dv(new d.Event));p(this,"_attachedViewers",(()=>{const e=new Set;return this.d(this._viewerAttached.don(n=>{e.add(n)})),this.d(this._viewerDetached.don(n=>{e.delete(n)})),e})());p(this,"_createdEvent",this.dv(new d.Event));p(this,"_flushEvent",this.dv(new d.Event));p(this,"_id");p(this,"viewer");p(this,"viewerChanged",this.ad(new d.Event));p(this,"combinationClass",!1);p(this,"mainClass");p(this,"_updateFuncReact",this.dv(d.react(void 0)));p(this,"_toDestroyFuncReact",this.dv(d.react(void 0)));p(this,"_parentID",this.disposeVar(d.react(void 0)));e!==void 0&&(typeof e!="string"?console.warn(`对象id必须是字符串类型,当前id的类型是${typeof e},值为${e}`):e.trim()===""?console.warn("场景对象创建时的id不能是空字符串!"):e.trim()!==e&&console.warn(`id前后有空字符串!id: ${e}`)),this._id=e??d.createGuid(),this._initName();{const n=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(i){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`)}};n(),this.d(this.execOnceFuncStrChanged.don(n))}{const n=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(s){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};n(),this.d(this.updateFuncStrChanged.don(n));let i;this.d(()=>i&&i.destroy()),this.d(this.updateFuncChanged.don(()=>{i&&i.cancel(),this.updateFunc&&(i=i||d.createAnimateFrame(),i.restart(void 0,s=>{this.updateFunc&&this.updateFunc(this,s)}))}))}{const n=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(i){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${i}`),this.toDestroyFunc=void 0}};n(),this.d(this.toDestroyFuncStrChanged.don(n)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}}static get envs(){return xt.context.environmentVariables}static get $refs(){return xt.context.refsManager.refs}get components(){return this._components}get viewerAttached(){return this._viewerAttached}get viewerDetached(){return this._viewerDetached}get attachedViewers(){return this._attachedViewers}removefromViewer(e){this.attachedViewers.has(e)&&e.delete(this)}addToViewer(e){this.attachedViewers.has(e)||e.add(this)}registerAttachedObject(e){const n=new Map;this.d(()=>{n.size>0&&console.warn("viewerPropSceneObjects.size > 0")}),this.d(this._viewerAttached.don(i=>{const s=e(i);s&&n.set(i,s)})),this.d(this._viewerDetached.don(i=>{if(!n.has(i))return;const s=n.get(i);s&&(s.destroy(),n.delete(i))}))}createAttachedObject(e){const n=new Map,i=()=>{for(let[l,u]of n.entries())u.destroy();n.clear()},s=l=>{const u=e(l);u&&n.set(l,u)};for(let l of this.attachedViewers)s(l);const a=this._viewerAttached.don(s),o=this._viewerDetached.don(l=>{if(!n.has(l))return;const u=n.get(l);u&&(u.destroy(),n.delete(l))});return()=>{o(),a(),i()}}registerAttachedObjectForContainer(e){this.registerAttachedObject(n=>new Vv(n,e))}get createdEvent(){return this._createdEvent}get flushEvent(){return this._flushEvent}flush(){this.flushEvent.emit()}get id(){return this._id}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return xt.createDefaultProps()}getMainClass(){return this.mainClass??this}_innerGetJson(e=!0){const n={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let s,a=this.defaultProps[i];a instanceof d.ReactiveVariable?s=a.equals(this[i]):s=a===this[i],s||(n[i]=this[i])}else n[i]=this[i];return n}_innerSetJson(e,n,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const s=n||[];s.push("id","type");const a=Object.keys(this.defaultProps).filter(o=>!s.includes(o));for(let o of a)if(o in e)this[o]=e[o]===null?void 0:e[o];else if(!(i??!1)){let l=this.defaultProps[o];l instanceof d.ReactiveVariable&&(l=l.value),this[o]=l}}get json(){return this._innerGetJson()}set json(e){this._innerSetJson(e)}get _jsonStr(){return JSON.stringify(this.json,null,4)}set _jsonStr(e){this._innerSetJson(JSON.parse(e))}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get parentID(){return this._parentID.value}set parentID(e){this._parentID.value=e}get parentIDChanged(){return this._parentID.changed}getProperties(e){return[new H("ESSceneObject","ESSceneObject",[new nt("对象类型","类型(type)",!1,!0,[this,"typeName"]),new nt("对象id","唯一标识符(id)",!1,!0,[this,"id"]),new nt("对象名称","名称(name)",!1,!1,[this,"name"]),new nt("ref","标识(ref),可通过 ESSceneObject.$refs.xxx快速获取到对象",!0,!1,[this,"ref"]),new Y("extras","扩展属性,必须整体赋值(extras)",!0,!1,[this,"extras"]),new ip("JSON","对象JSON数据动态更改导入导出。",!1,!1,()=>this._jsonStr,n=>n&&(this._jsonStr=n))])]}getESProperties(){return{defaultMenu:"basic",basic:[],general:[],dataSource:[],location:[],coordinate:[],style:[]}}};p(xt,"context",new zv),p(xt,"register",xt.context.register.bind(xt.context)),p(xt,"create",xt.context.createSceneObject.bind(xt.context)),p(xt,"createFromClass",xt.context.createSceneObjectFromClass.bind(xt.context)),p(xt,"createFromJson",xt.context.createSceneObjectFromJson.bind(xt.context)),p(xt,"destroySceneObject",xt.context.destroySceneObject.bind(xt.context)),p(xt,"getSceneObjById",xt.context.getSceneObjectById.bind(xt.context)),p(xt,"getSceneObj",xt.context.getSceneObject.bind(xt.context)),p(xt,"getEnv",xt.context.getEnv.bind(xt.context)),p(xt,"setEnv",xt.context.setEnv.bind(xt.context)),p(xt,"getStrFromEnv",xt.context.getStrFromEnv.bind(xt.context)),p(xt,"getSceneObjectById",xt.context.getSceneObjectById.bind(xt.context)),p(xt,"getSceneObject",xt.context.getSceneObject.bind(xt.context)),p(xt,"defaults",{}),p(xt,"createDefaultProps",()=>({name:"未命名场景对象",ref:void 0,extras:d.reactJson(void 0),devTags:d.reactArrayWithUndefined(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0}));let ft=xt;d.extendClassProps(ft.prototype,ft.createDefaultProps);class Vv extends d.Destroyable{constructor(t,e){super(),this.dv(new d.ObjResettingWithEvent(t.subContainerChanged,()=>{if(t.subContainer)return e(t,t.subContainer)}))}}function gf(r){return d.reactDeepArrayWithUndefined(r,(t,e)=>t[0]===e[0]&&t[1]===e[1],t=>[...t])}function up(r,t){const e=new Array;for(let n of r)e.push(t(n));return e}function mf(r,t){return r===void 0&&t===void 0?!0:!r||!t?!1:r[0]===t[0]&&r[1]===t[1]&&r[2]===t[2]}var hr=63710088e-1,hp={centimeters:hr*100,centimetres:hr*100,degrees:hr/111325,feet:hr*3.28084,inches:hr*39.37,kilometers:hr/1e3,kilometres:hr/1e3,meters:hr,metres:hr,miles:hr/1609.344,millimeters:hr*1e3,millimetres:hr*1e3,nauticalmiles:hr/1852,radians:1,yards:hr*1.0936};function ui(r,t,e){e===void 0&&(e={});var n={type:"Feature"};return(e.id===0||e.id)&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.properties=t||{},n.geometry=r,n}function ae(r,t,e){if(e===void 0&&(e={}),!r)throw new Error("coordinates is required");if(!Array.isArray(r))throw new Error("coordinates must be an Array");if(r.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!cp(r[0])||!cp(r[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:r};return ui(n,t,e)}function Pr(r,t,e){e===void 0&&(e={});for(var n=0,i=r;n<i.length;n++){var s=i[n];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<s[s.length-1].length;a++)if(s[s.length-1][a]!==s[0][a])throw new Error("First and last Position are not equivalent.")}var o={type:"Polygon",coordinates:r};return ui(o,t,e)}function hi(r,t,e){if(e===void 0&&(e={}),r.length<2)throw new Error("coordinates must be an array of two or more positions");var n={type:"LineString",coordinates:r};return ui(n,t,e)}function Wl(r,t){t===void 0&&(t={});var e={type:"FeatureCollection"};return t.id&&(e.id=t.id),t.bbox&&(e.bbox=t.bbox),e.features=r,e}function vf(r,t,e){e===void 0&&(e={});var n={type:"MultiPolygon",coordinates:r};return ui(n,t,e)}function yf(r,t){t===void 0&&(t="kilometers");var e=hp[t];if(!e)throw new Error(t+" units is invalid");return r*e}function _f(r,t){t===void 0&&(t="kilometers");var e=hp[t];if(!e)throw new Error(t+" units is invalid");return r/e}function Kh(r){var t=r%(2*Math.PI);return t*180/Math.PI}function Cr(r){var t=r%360;return t*Math.PI/180}function wf(r,t,e){if(t===void 0&&(t="kilometers"),e===void 0&&(e="kilometers"),!(r>=0))throw new Error("length must be a positive number");return yf(_f(r,t),e)}function cp(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}function Hl(r,t,e){if(r!==null)for(var n,i,s,a,o,l,u,c=0,h=0,f,g=r.type,m=g==="FeatureCollection",_=g==="Feature",E=m?r.features.length:1,M=0;M<E;M++){u=m?r.features[M].geometry:_?r.geometry:r,f=u?u.type==="GeometryCollection":!1,o=f?u.geometries.length:1;for(var y=0;y<o;y++){var w=0,v=0;if(a=f?u.geometries[y]:u,a!==null){l=a.coordinates;var S=a.type;switch(c=e&&(S==="Polygon"||S==="MultiPolygon")?1:0,S){case null:break;case"Point":if(t(l,h,M,w,v)===!1)return!1;h++,w++;break;case"LineString":case"MultiPoint":for(n=0;n<l.length;n++){if(t(l[n],h,M,w,v)===!1)return!1;h++,S==="MultiPoint"&&w++}S==="LineString"&&w++;break;case"Polygon":case"MultiLineString":for(n=0;n<l.length;n++){for(i=0;i<l[n].length-c;i++){if(t(l[n][i],h,M,w,v)===!1)return!1;h++}S==="MultiLineString"&&w++,S==="Polygon"&&v++}S==="Polygon"&&w++;break;case"MultiPolygon":for(n=0;n<l.length;n++){for(v=0,i=0;i<l[n].length;i++){for(s=0;s<l[n][i].length-c;s++){if(t(l[n][i][s],h,M,w,v)===!1)return!1;h++}v++}w++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(Hl(a.geometries[n],t,e)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Qh(r,t){if(r.type==="Feature")t(r,0);else if(r.type==="FeatureCollection")for(var e=0;e<r.features.length&&t(r.features[e],e)!==!1;e++);}function Bh(r,t){var e,n,i,s,a,o,l,u,c,h,f=0,g=r.type==="FeatureCollection",m=r.type==="Feature",_=g?r.features.length:1;for(e=0;e<_;e++){for(o=g?r.features[e].geometry:m?r.geometry:r,u=g?r.features[e].properties:m?r.properties:{},c=g?r.features[e].bbox:m?r.bbox:void 0,h=g?r.features[e].id:m?r.id:void 0,l=o?o.type==="GeometryCollection":!1,a=l?o.geometries.length:1,i=0;i<a;i++){if(s=l?o.geometries[i]:o,s===null){if(t(null,f,u,c,h)===!1)return!1;continue}switch(s.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(s,f,u,c,h)===!1)return!1;break}case"GeometryCollection":{for(n=0;n<s.geometries.length;n++)if(t(s.geometries[n],f,u,c,h)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}f++}}function Uv(r,t,e){var n=e;return Bh(r,function(i,s,a,o,l){n=t(n,i,s,a,o,l)}),n}function Ef(r,t){Bh(r,function(e,n,i,s,a){var o=e===null?null:e.type;switch(o){case null:case"Point":case"LineString":case"Polygon":return t(ui(e,i,{bbox:s,id:a}),n,0)===!1?!1:void 0}var l;switch(o){case"MultiPoint":l="Point";break;case"MultiLineString":l="LineString";break;case"MultiPolygon":l="Polygon";break}for(var u=0;u<e.coordinates.length;u++){var c=e.coordinates[u],h={type:l,coordinates:c};if(t(ui(h,i),n,u)===!1)return!1}})}function qv(r,t){Ef(r,function(e,n,i){var s=0;if(e.geometry){var a=e.geometry.type;if(!(a==="Point"||a==="MultiPoint")){var o,l=0,u=0,c=0;if(Hl(e,function(h,f,g,m,_){if(o===void 0||n>l||m>u||_>c){o=h,l=n,u=m,c=_,s=0;return}var E=hi([o,h],e.properties);if(t(E,n,i,_,s)===!1)return!1;s++,o=h})===!1)return!1}}})}function ci(r){var t=[1/0,1/0,-1/0,-1/0];return Hl(r,function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])}),t}ci.default=ci;function Rr(r){if(!r)throw new Error("coord is required");if(!Array.isArray(r)){if(r.type==="Feature"&&r.geometry!==null&&r.geometry.type==="Point")return r.geometry.coordinates;if(r.type==="Point")return r.coordinates}if(Array.isArray(r)&&r.length>=2&&!Array.isArray(r[0])&&!Array.isArray(r[1]))return r;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Aa(r){if(Array.isArray(r))return r;if(r.type==="Feature"){if(r.geometry!==null)return r.geometry.coordinates}else if(r.coordinates)return r.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function fp(r,t,e){if(!r)throw new Error("No feature passed");if(!e)throw new Error(".featureOf() requires a name");if(!r||r.type!=="Feature"||!r.geometry)throw new Error("Invalid input to "+e+", Feature with geometry required");if(!r.geometry||r.geometry.type!==t)throw new Error("Invalid input to "+e+": must be a "+t+", given "+r.geometry.type)}function _n(r){return r.type==="Feature"?r.geometry:r}function Wv(r,t){return r.type==="FeatureCollection"?"FeatureCollection":r.type==="GeometryCollection"?"GeometryCollection":r.type==="Feature"&&r.geometry!==null?r.geometry.type:r.type}function dp(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Hv(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var t=r.default;if(typeof t=="function"){var e=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),e}var Zh={exports:{}},$h={exports:{}},Xv=$h.exports,pp;function gp(){return pp||(pp=1,function(r,t){(function(e,n){r.exports=n()})(Xv,function(){function e(y,w,v,S,P){(function I(b,D,O,T,x){for(;T>O;){if(T-O>600){var R=T-O+1,z=D-O+1,rt=Math.log(R),B=.5*Math.exp(2*rt/3),ct=.5*Math.sqrt(rt*B*(R-B)/R)*(z-R/2<0?-1:1),G=Math.max(O,Math.floor(D-z*B/R+ct)),X=Math.min(T,Math.floor(D+(R-z)*B/R+ct));I(b,D,G,X,x)}var k=b[D],V=O,A=T;for(n(b,O,D),x(b[T],k)>0&&n(b,O,T);V<A;){for(n(b,V,A),V++,A--;x(b[V],k)<0;)V++;for(;x(b[A],k)>0;)A--}x(b[O],k)===0?n(b,O,A):n(b,++A,T),A<=D&&(O=A+1),D<=A&&(T=A-1)}})(y,w,v||0,S||y.length-1,P||i)}function n(y,w,v){var S=y[w];y[w]=y[v],y[v]=S}function i(y,w){return y<w?-1:y>w?1:0}var s=function(y){y===void 0&&(y=9),this._maxEntries=Math.max(4,y),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function a(y,w,v){if(!v)return w.indexOf(y);for(var S=0;S<w.length;S++)if(v(y,w[S]))return S;return-1}function o(y,w){l(y,0,y.children.length,w,y)}function l(y,w,v,S,P){P||(P=E(null)),P.minX=1/0,P.minY=1/0,P.maxX=-1/0,P.maxY=-1/0;for(var I=w;I<v;I++){var b=y.children[I];u(P,y.leaf?S(b):b)}return P}function u(y,w){return y.minX=Math.min(y.minX,w.minX),y.minY=Math.min(y.minY,w.minY),y.maxX=Math.max(y.maxX,w.maxX),y.maxY=Math.max(y.maxY,w.maxY),y}function c(y,w){return y.minX-w.minX}function h(y,w){return y.minY-w.minY}function f(y){return(y.maxX-y.minX)*(y.maxY-y.minY)}function g(y){return y.maxX-y.minX+(y.maxY-y.minY)}function m(y,w){return y.minX<=w.minX&&y.minY<=w.minY&&w.maxX<=y.maxX&&w.maxY<=y.maxY}function _(y,w){return w.minX<=y.maxX&&w.minY<=y.maxY&&w.maxX>=y.minX&&w.maxY>=y.minY}function E(y){return{children:y,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function M(y,w,v,S,P){for(var I=[w,v];I.length;)if(!((v=I.pop())-(w=I.pop())<=S)){var b=w+Math.ceil((v-w)/S/2)*S;e(y,b,w,v,P),I.push(w,b,b,v)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(y){var w=this.data,v=[];if(!_(y,w))return v;for(var S=this.toBBox,P=[];w;){for(var I=0;I<w.children.length;I++){var b=w.children[I],D=w.leaf?S(b):b;_(y,D)&&(w.leaf?v.push(b):m(y,D)?this._all(b,v):P.push(b))}w=P.pop()}return v},s.prototype.collides=function(y){var w=this.data;if(!_(y,w))return!1;for(var v=[];w;){for(var S=0;S<w.children.length;S++){var P=w.children[S],I=w.leaf?this.toBBox(P):P;if(_(y,I)){if(w.leaf||m(y,I))return!0;v.push(P)}}w=v.pop()}return!1},s.prototype.load=function(y){if(!y||!y.length)return this;if(y.length<this._minEntries){for(var w=0;w<y.length;w++)this.insert(y[w]);return this}var v=this._build(y.slice(),0,y.length-1,0);if(this.data.children.length)if(this.data.height===v.height)this._splitRoot(this.data,v);else{if(this.data.height<v.height){var S=this.data;this.data=v,v=S}this._insert(v,this.data.height-v.height-1,!0)}else this.data=v;return this},s.prototype.insert=function(y){return y&&this._insert(y,this.data.height-1),this},s.prototype.clear=function(){return this.data=E([]),this},s.prototype.remove=function(y,w){if(!y)return this;for(var v,S,P,I=this.data,b=this.toBBox(y),D=[],O=[];I||D.length;){if(I||(I=D.pop(),S=D[D.length-1],v=O.pop(),P=!0),I.leaf){var T=a(y,I.children,w);if(T!==-1)return I.children.splice(T,1),D.push(I),this._condense(D),this}P||I.leaf||!m(I,b)?S?(v++,I=S.children[v],P=!1):I=null:(D.push(I),O.push(v),v=0,S=I,I=I.children[0])}return this},s.prototype.toBBox=function(y){return y},s.prototype.compareMinX=function(y,w){return y.minX-w.minX},s.prototype.compareMinY=function(y,w){return y.minY-w.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(y){return this.data=y,this},s.prototype._all=function(y,w){for(var v=[];y;)y.leaf?w.push.apply(w,y.children):v.push.apply(v,y.children),y=v.pop();return w},s.prototype._build=function(y,w,v,S){var P,I=v-w+1,b=this._maxEntries;if(I<=b)return o(P=E(y.slice(w,v+1)),this.toBBox),P;S||(S=Math.ceil(Math.log(I)/Math.log(b)),b=Math.ceil(I/Math.pow(b,S-1))),(P=E([])).leaf=!1,P.height=S;var D=Math.ceil(I/b),O=D*Math.ceil(Math.sqrt(b));M(y,w,v,O,this.compareMinX);for(var T=w;T<=v;T+=O){var x=Math.min(T+O-1,v);M(y,T,x,D,this.compareMinY);for(var R=T;R<=x;R+=D){var z=Math.min(R+D-1,x);P.children.push(this._build(y,R,z,S-1))}}return o(P,this.toBBox),P},s.prototype._chooseSubtree=function(y,w,v,S){for(;S.push(w),!w.leaf&&S.length-1!==v;){for(var P=1/0,I=1/0,b=void 0,D=0;D<w.children.length;D++){var O=w.children[D],T=f(O),x=(R=y,z=O,(Math.max(z.maxX,R.maxX)-Math.min(z.minX,R.minX))*(Math.max(z.maxY,R.maxY)-Math.min(z.minY,R.minY))-T);x<I?(I=x,P=T<P?T:P,b=O):x===I&&T<P&&(P=T,b=O)}w=b||w.children[0]}var R,z;return w},s.prototype._insert=function(y,w,v){var S=v?y:this.toBBox(y),P=[],I=this._chooseSubtree(S,this.data,w,P);for(I.children.push(y),u(I,S);w>=0&&P[w].children.length>this._maxEntries;)this._split(P,w),w--;this._adjustParentBBoxes(S,P,w)},s.prototype._split=function(y,w){var v=y[w],S=v.children.length,P=this._minEntries;this._chooseSplitAxis(v,P,S);var I=this._chooseSplitIndex(v,P,S),b=E(v.children.splice(I,v.children.length-I));b.height=v.height,b.leaf=v.leaf,o(v,this.toBBox),o(b,this.toBBox),w?y[w-1].children.push(b):this._splitRoot(v,b)},s.prototype._splitRoot=function(y,w){this.data=E([y,w]),this.data.height=y.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(y,w,v){for(var S,P,I,b,D,O,T,x=1/0,R=1/0,z=w;z<=v-w;z++){var rt=l(y,0,z,this.toBBox),B=l(y,z,v,this.toBBox),ct=(P=rt,I=B,b=void 0,D=void 0,O=void 0,T=void 0,b=Math.max(P.minX,I.minX),D=Math.max(P.minY,I.minY),O=Math.min(P.maxX,I.maxX),T=Math.min(P.maxY,I.maxY),Math.max(0,O-b)*Math.max(0,T-D)),G=f(rt)+f(B);ct<x?(x=ct,S=z,R=G<R?G:R):ct===x&&G<R&&(R=G,S=z)}return S||v-w},s.prototype._chooseSplitAxis=function(y,w,v){var S=y.leaf?this.compareMinX:c,P=y.leaf?this.compareMinY:h;this._allDistMargin(y,w,v,S)<this._allDistMargin(y,w,v,P)&&y.children.sort(S)},s.prototype._allDistMargin=function(y,w,v,S){y.children.sort(S);for(var P=this.toBBox,I=l(y,0,w,P),b=l(y,v-w,v,P),D=g(I)+g(b),O=w;O<v-w;O++){var T=y.children[O];u(I,y.leaf?P(T):T),D+=g(I)}for(var x=v-w-1;x>=w;x--){var R=y.children[x];u(b,y.leaf?P(R):R),D+=g(b)}return D},s.prototype._adjustParentBBoxes=function(y,w,v){for(var S=v;S>=0;S--)u(w[S],y)},s.prototype._condense=function(y){for(var w=y.length-1,v=void 0;w>=0;w--)y[w].children.length===0?w>0?(v=y[w-1].children).splice(v.indexOf(y[w]),1):this.clear():o(y[w],this.toBBox)},s})}($h)),$h.exports}class Yv{constructor(t=[],e=Jv){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let n=(this.length>>1)-1;n>=0;n--)this._down(n)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:n}=this,i=e[t];for(;t>0;){const s=t-1>>1,a=e[s];if(n(i,a)>=0)break;e[t]=a,t=s}e[t]=i}_down(t){const{data:e,compare:n}=this,i=this.length>>1,s=e[t];for(;t<i;){let a=(t<<1)+1,o=e[a];const l=a+1;if(l<this.length&&n(e[l],o)<0&&(a=l,o=e[l]),n(o,s)>=0)break;e[t]=o,t=a}e[t]=s}}function Jv(r,t){return r<t?-1:r>t?1:0}const Kv=Hv(Object.freeze(Object.defineProperty({__proto__:null,default:Yv},Symbol.toStringTag,{value:"Module"})));var zu={exports:{}},Sf,mp;function Qv(){return mp||(mp=1,Sf=function(t,e,n,i){var s=t[0],a=t[1],o=!1;n===void 0&&(n=0),i===void 0&&(i=e.length);for(var l=(i-n)/2,u=0,c=l-1;u<l;c=u++){var h=e[n+u*2+0],f=e[n+u*2+1],g=e[n+c*2+0],m=e[n+c*2+1],_=f>a!=m>a&&s<(g-h)*(a-f)/(m-f)+h;_&&(o=!o)}return o}),Sf}var Pf,vp;function Bv(){return vp||(vp=1,Pf=function(t,e,n,i){var s=t[0],a=t[1],o=!1;n===void 0&&(n=0),i===void 0&&(i=e.length);for(var l=i-n,u=0,c=l-1;u<l;c=u++){var h=e[u+n][0],f=e[u+n][1],g=e[c+n][0],m=e[c+n][1],_=f>a!=m>a&&s<(g-h)*(a-f)/(m-f)+h;_&&(o=!o)}return o}),Pf}var yp;function Zv(){if(yp)return zu.exports;yp=1;var r=Qv(),t=Bv();return zu.exports=function(n,i,s,a){return i.length>0&&Array.isArray(i[0])?t(n,i,s,a):r(n,i,s,a)},zu.exports.nested=t,zu.exports.flat=r,zu.exports}var Vu={exports:{}},$v=Vu.exports,_p;function jv(){return _p||(_p=1,function(r,t){(function(e,n){n(t)})($v,function(e){const i=33306690738754706e-32;function s(_,E,M,y,w){let v,S,P,I,b=E[0],D=y[0],O=0,T=0;D>b==D>-b?(v=b,b=E[++O]):(v=D,D=y[++T]);let x=0;if(O<_&&T<M)for(D>b==D>-b?(P=v-((S=b+v)-b),b=E[++O]):(P=v-((S=D+v)-D),D=y[++T]),v=S,P!==0&&(w[x++]=P);O<_&&T<M;)D>b==D>-b?(P=v-((S=v+b)-(I=S-v))+(b-I),b=E[++O]):(P=v-((S=v+D)-(I=S-v))+(D-I),D=y[++T]),v=S,P!==0&&(w[x++]=P);for(;O<_;)P=v-((S=v+b)-(I=S-v))+(b-I),b=E[++O],v=S,P!==0&&(w[x++]=P);for(;T<M;)P=v-((S=v+D)-(I=S-v))+(D-I),D=y[++T],v=S,P!==0&&(w[x++]=P);return v===0&&x!==0||(w[x++]=v),x}function a(_){return new Float64Array(_)}const o=33306690738754716e-32,l=22204460492503146e-32,u=11093356479670487e-47,c=a(4),h=a(8),f=a(12),g=a(16),m=a(4);e.orient2d=function(_,E,M,y,w,v){const S=(E-v)*(M-w),P=(_-w)*(y-v),I=S-P;if(S===0||P===0||S>0!=P>0)return I;const b=Math.abs(S+P);return Math.abs(I)>=o*b?I:-function(D,O,T,x,R,z,rt){let B,ct,G,X,k,V,A,W,J,ot,gt,lt,St,ut,It,Nt,j,Pt;const bt=D-R,Gt=T-R,Ht=O-z,Xt=x-z;k=(It=(W=bt-(A=(V=134217729*bt)-(V-bt)))*(ot=Xt-(J=(V=134217729*Xt)-(V-Xt)))-((ut=bt*Xt)-A*J-W*J-A*ot))-(gt=It-(j=(W=Ht-(A=(V=134217729*Ht)-(V-Ht)))*(ot=Gt-(J=(V=134217729*Gt)-(V-Gt)))-((Nt=Ht*Gt)-A*J-W*J-A*ot))),c[0]=It-(gt+k)+(k-j),k=(St=ut-((lt=ut+gt)-(k=lt-ut))+(gt-k))-(gt=St-Nt),c[1]=St-(gt+k)+(k-Nt),k=(Pt=lt+gt)-lt,c[2]=lt-(Pt-k)+(gt-k),c[3]=Pt;let Zt=function(zt,Ee){let ke=Ee[0];for(let oi=1;oi<zt;oi++)ke+=Ee[oi];return ke}(4,c),me=l*rt;if(Zt>=me||-Zt>=me||(B=D-(bt+(k=D-bt))+(k-R),G=T-(Gt+(k=T-Gt))+(k-R),ct=O-(Ht+(k=O-Ht))+(k-z),X=x-(Xt+(k=x-Xt))+(k-z),B===0&&ct===0&&G===0&&X===0)||(me=u*rt+i*Math.abs(Zt),(Zt+=bt*X+Xt*B-(Ht*G+Gt*ct))>=me||-Zt>=me))return Zt;k=(It=(W=B-(A=(V=134217729*B)-(V-B)))*(ot=Xt-(J=(V=134217729*Xt)-(V-Xt)))-((ut=B*Xt)-A*J-W*J-A*ot))-(gt=It-(j=(W=ct-(A=(V=134217729*ct)-(V-ct)))*(ot=Gt-(J=(V=134217729*Gt)-(V-Gt)))-((Nt=ct*Gt)-A*J-W*J-A*ot))),m[0]=It-(gt+k)+(k-j),k=(St=ut-((lt=ut+gt)-(k=lt-ut))+(gt-k))-(gt=St-Nt),m[1]=St-(gt+k)+(k-Nt),k=(Pt=lt+gt)-lt,m[2]=lt-(Pt-k)+(gt-k),m[3]=Pt;const Ke=s(4,c,4,m,h);k=(It=(W=bt-(A=(V=134217729*bt)-(V-bt)))*(ot=X-(J=(V=134217729*X)-(V-X)))-((ut=bt*X)-A*J-W*J-A*ot))-(gt=It-(j=(W=Ht-(A=(V=134217729*Ht)-(V-Ht)))*(ot=G-(J=(V=134217729*G)-(V-G)))-((Nt=Ht*G)-A*J-W*J-A*ot))),m[0]=It-(gt+k)+(k-j),k=(St=ut-((lt=ut+gt)-(k=lt-ut))+(gt-k))-(gt=St-Nt),m[1]=St-(gt+k)+(k-Nt),k=(Pt=lt+gt)-lt,m[2]=lt-(Pt-k)+(gt-k),m[3]=Pt;const Yt=s(Ke,h,4,m,f);k=(It=(W=B-(A=(V=134217729*B)-(V-B)))*(ot=X-(J=(V=134217729*X)-(V-X)))-((ut=B*X)-A*J-W*J-A*ot))-(gt=It-(j=(W=ct-(A=(V=134217729*ct)-(V-ct)))*(ot=G-(J=(V=134217729*G)-(V-G)))-((Nt=ct*G)-A*J-W*J-A*ot))),m[0]=It-(gt+k)+(k-j),k=(St=ut-((lt=ut+gt)-(k=lt-ut))+(gt-k))-(gt=St-Nt),m[1]=St-(gt+k)+(k-Nt),k=(Pt=lt+gt)-lt,m[2]=lt-(Pt-k)+(gt-k),m[3]=Pt;const kt=s(Yt,f,4,m,g);return g[kt-1]}(_,E,M,y,w,v,b)},e.orient2dfast=function(_,E,M,y,w,v){return(E-v)*(M-w)-(_-w)*(y-v)},Object.defineProperty(e,"__esModule",{value:!0})})}(Vu,Vu.exports)),Vu.exports}var wp;function ty(){if(wp)return Zh.exports;wp=1;var r=gp(),t=Kv,e=Zv(),n=jv().orient2d;t.default&&(t=t.default),Zh.exports=i,Zh.exports.default=i;function i(v,S,P){S=Math.max(0,S===void 0?2:S),P=P||0;var I=g(v),b=new r(16);b.toBBox=function(A){return{minX:A[0],minY:A[1],maxX:A[0],maxY:A[1]}},b.compareMinX=function(A,W){return A[0]-W[0]},b.compareMinY=function(A,W){return A[1]-W[1]},b.load(v);for(var D=[],O=0,T;O<I.length;O++){var x=I[O];b.remove(x),T=m(x,T),D.push(T)}var R=new r(16);for(O=0;O<D.length;O++)R.insert(f(D[O]));for(var z=S*S,rt=P*P;D.length;){var B=D.shift(),ct=B.p,G=B.next.p,X=_(ct,G);if(!(X<rt)){var k=X/z;x=s(b,B.prev.p,ct,G,B.next.next.p,k,R),x&&Math.min(_(x,ct),_(x,G))<=k&&(D.push(B),D.push(m(x,B)),b.remove(x),R.remove(B),R.insert(f(B)),R.insert(f(B.next)))}}B=T;var V=[];do V.push(B.p),B=B.next;while(B!==T);return V.push(B.p),V}function s(v,S,P,I,b,D,O){for(var T=new t([],a),x=v.data;x;){for(var R=0;R<x.children.length;R++){var z=x.children[R],rt=x.leaf?E(z,P,I):o(P,I,z);rt>D||T.push({node:z,dist:rt})}for(;T.length&&!T.peek().node.children;){var B=T.pop(),ct=B.node,G=E(ct,S,P),X=E(ct,I,b);if(B.dist<G&&B.dist<X&&u(P,ct,O)&&u(I,ct,O))return ct}x=T.pop(),x&&(x=x.node)}return null}function a(v,S){return v.dist-S.dist}function o(v,S,P){if(l(v,P)||l(S,P))return 0;var I=M(v[0],v[1],S[0],S[1],P.minX,P.minY,P.maxX,P.minY);if(I===0)return 0;var b=M(v[0],v[1],S[0],S[1],P.minX,P.minY,P.minX,P.maxY);if(b===0)return 0;var D=M(v[0],v[1],S[0],S[1],P.maxX,P.minY,P.maxX,P.maxY);if(D===0)return 0;var O=M(v[0],v[1],S[0],S[1],P.minX,P.maxY,P.maxX,P.maxY);return O===0?0:Math.min(I,b,D,O)}function l(v,S){return v[0]>=S.minX&&v[0]<=S.maxX&&v[1]>=S.minY&&v[1]<=S.maxY}function u(v,S,P){for(var I=Math.min(v[0],S[0]),b=Math.min(v[1],S[1]),D=Math.max(v[0],S[0]),O=Math.max(v[1],S[1]),T=P.search({minX:I,minY:b,maxX:D,maxY:O}),x=0;x<T.length;x++)if(h(T[x].p,T[x].next.p,v,S))return!1;return!0}function c(v,S,P){return n(v[0],v[1],S[0],S[1],P[0],P[1])}function h(v,S,P,I){return v!==I&&S!==P&&c(v,S,P)>0!=c(v,S,I)>0&&c(P,I,v)>0!=c(P,I,S)>0}function f(v){var S=v.p,P=v.next.p;return v.minX=Math.min(S[0],P[0]),v.minY=Math.min(S[1],P[1]),v.maxX=Math.max(S[0],P[0]),v.maxY=Math.max(S[1],P[1]),v}function g(v){for(var S=v[0],P=v[0],I=v[0],b=v[0],D=0;D<v.length;D++){var O=v[D];O[0]<S[0]&&(S=O),O[0]>I[0]&&(I=O),O[1]<P[1]&&(P=O),O[1]>b[1]&&(b=O)}var T=[S,P,I,b],x=T.slice();for(D=0;D<v.length;D++)e(v[D],T)||x.push(v[D]);return w(x)}function m(v,S){var P={p:v,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return S?(P.next=S.next,P.prev=S,S.next.prev=P,S.next=P):(P.prev=P,P.next=P),P}function _(v,S){var P=v[0]-S[0],I=v[1]-S[1];return P*P+I*I}function E(v,S,P){var I=S[0],b=S[1],D=P[0]-I,O=P[1]-b;if(D!==0||O!==0){var T=((v[0]-I)*D+(v[1]-b)*O)/(D*D+O*O);T>1?(I=P[0],b=P[1]):T>0&&(I+=D*T,b+=O*T)}return D=v[0]-I,O=v[1]-b,D*D+O*O}function M(v,S,P,I,b,D,O,T){var x=P-v,R=I-S,z=O-b,rt=T-D,B=v-b,ct=S-D,G=x*x+R*R,X=x*z+R*rt,k=z*z+rt*rt,V=x*B+R*ct,A=z*B+rt*ct,W=G*k-X*X,J,ot,gt,lt,St=W,ut=W;W===0?(ot=0,St=1,lt=A,ut=k):(ot=X*A-k*V,lt=G*A-X*V,ot<0?(ot=0,lt=A,ut=k):ot>St&&(ot=St,lt=A+X,ut=k)),lt<0?(lt=0,-V<0?ot=0:-V>G?ot=St:(ot=-V,St=G)):lt>ut&&(lt=ut,-V+X<0?ot=0:-V+X>G?ot=St:(ot=-V+X,St=G)),J=ot===0?0:ot/St,gt=lt===0?0:lt/ut;var It=(1-J)*v+J*P,Nt=(1-J)*S+J*I,j=(1-gt)*b+gt*O,Pt=(1-gt)*D+gt*T,bt=j-It,Gt=Pt-Nt;return bt*bt+Gt*Gt}function y(v,S){return v[0]===S[0]?v[1]-S[1]:v[0]-S[0]}function w(v){v.sort(y);for(var S=[],P=0;P<v.length;P++){for(;S.length>=2&&c(S[S.length-2],S[S.length-1],v[P])<=0;)S.pop();S.push(v[P])}for(var I=[],b=v.length-1;b>=0;b--){for(;I.length>=2&&c(I[I.length-2],I[I.length-1],v[b])<=0;)I.pop();I.push(v[b])}return I.pop(),S.pop(),S.concat(I)}return Zh.exports}var ey=ty();const ry=dp(ey);function ny(r,t){t===void 0&&(t={}),t.concavity=t.concavity||1/0;var e=[];if(Hl(r,function(i){e.push([i[0],i[1]])}),!e.length)return null;var n=ry(e,t.concavity);return n.length>3?Pr([n]):null}function Gn(r,t,e){if(e===void 0&&(e={}),!r)throw new Error("point is required");if(!t)throw new Error("polygon is required");var n=Rr(r),i=_n(t),s=i.type,a=t.bbox,o=i.coordinates;if(a&&iy(n,a)===!1)return!1;s==="Polygon"&&(o=[o]);for(var l=!1,u=0;u<o.length&&!l;u++)if(Ep(n,o[u][0],e.ignoreBoundary)){for(var c=!1,h=1;h<o[u].length&&!c;)Ep(n,o[u][h],!e.ignoreBoundary)&&(c=!0),h++;c||(l=!0)}return l}function Ep(r,t,e){var n=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var i=0,s=t.length-1;i<t.length;s=i++){var a=t[i][0],o=t[i][1],l=t[s][0],u=t[s][1],c=r[1]*(a-l)+o*(l-r[0])+u*(r[0]-a)===0&&(a-r[0])*(l-r[0])<=0&&(o-r[1])*(u-r[1])<=0;if(c)return!e;var h=o>r[1]!=u>r[1]&&r[0]<(l-a)*(r[1]-o)/(u-o)+a;h&&(n=!n)}return n}function iy(r,t){return t[0]<=r[0]&&t[1]<=r[1]&&t[2]>=r[0]&&t[3]>=r[1]}function ps(r,t,e){e===void 0&&(e={});var n=Rr(r),i=Rr(t),s=Cr(i[1]-n[1]),a=Cr(i[0]-n[0]),o=Cr(n[1]),l=Cr(i[1]),u=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(a/2),2)*Math.cos(o)*Math.cos(l);return yf(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),e.units)}function Xl(r,t,e,n){n===void 0&&(n={});var i=Rr(r),s=Cr(i[0]),a=Cr(i[1]),o=Cr(e),l=_f(t,n.units),u=Math.asin(Math.sin(a)*Math.cos(l)+Math.cos(a)*Math.sin(l)*Math.cos(o)),c=s+Math.atan2(Math.sin(o)*Math.sin(l)*Math.cos(a),Math.cos(l)-Math.sin(a)*Math.sin(u)),h=Kh(c),f=Kh(u);return ae([h,f],n.properties)}function sy(r,t,e){e===void 0&&(e={});for(var n=e.steps||64,i=e.properties?e.properties:!Array.isArray(r)&&r.type==="Feature"&&r.properties?r.properties:{},s=[],a=0;a<n;a++)s.push(Xl(r,t,a*-360/n,e).geometry.coordinates);return s.push(s[0]),Pr([s],i)}function Uu(r,t,e){if(e===void 0&&(e={}),e.final===!0)return ay(r,t);var n=Rr(r),i=Rr(t),s=Cr(n[0]),a=Cr(i[0]),o=Cr(n[1]),l=Cr(i[1]),u=Math.sin(a-s)*Math.cos(l),c=Math.cos(o)*Math.sin(l)-Math.sin(o)*Math.cos(l)*Math.cos(a-s);return Kh(Math.atan2(u,c))}function ay(r,t){var e=Uu(t,r);return e=(e+180)%360,e}function oy(r,t){var e=ps(r,t),n=Uu(r,t),i=Xl(r,e/2,n);return i}function ly(r,t){t===void 0&&(t={});var e=ci(r),n=(e[0]+e[2])/2,i=(e[1]+e[3])/2;return ae([n,i],t.properties,t)}function Sp(r,t){t===void 0&&(t={});var e=0,n=0,i=0;return Hl(r,function(s){e+=s[0],n+=s[1],i++},!0),ae([e/i,n/i],t.properties)}function Pp(r,t){switch(t===void 0&&(t={}),Wv(r)){case"Point":return ae(Rr(r),t.properties);case"Polygon":var e=[];Hl(r,function(v){e.push(v)});var n=Sp(r,{properties:t.properties}),i=n.geometry.coordinates,s=0,a=0,o=0,l,u,c,h,f,g,m,_,E=e.map(function(v){return[v[0]-i[0],v[1]-i[1]]});for(l=0;l<e.length-1;l++)u=E[l],h=u[0],g=u[1],c=E[l+1],f=c[0],m=c[1],_=h*m-f*g,o+=_,s+=(h+f)*_,a+=(g+m)*_;if(o===0)return n;var M=o*.5,y=1/(6*M);return ae([i[0]+y*s,i[1]+y*a],t.properties);default:var w=ny(r);return w?Pp(w,{properties:t.properties}):Sp(r,{properties:t.properties})}}function Cp(r){if(!r)throw new Error("geojson is required");var t=[];return Ef(r,function(e){uy(e,t)}),Wl(t)}function uy(r,t){var e=[],n=r.geometry;if(n!==null){switch(n.type){case"Polygon":e=Aa(n);break;case"LineString":e=[Aa(n)]}e.forEach(function(i){var s=hy(i,r.properties);s.forEach(function(a){a.id=t.length,t.push(a)})})}}function hy(r,t){var e=[];return r.reduce(function(n,i){var s=hi([n,i],t);return s.bbox=cy(n,i),e.push(s),i}),e}function cy(r,t){var e=r[0],n=r[1],i=t[0],s=t[1],a=e<i?e:i,o=n<s?n:s,l=e>i?e:i,u=n>s?n:s;return[a,o,l,u]}var jh={exports:{}},Cf={},Ip;function Mp(){return Ip||(Ip=1,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.earthRadius=63710088e-1,r.factors={centimeters:r.earthRadius*100,centimetres:r.earthRadius*100,degrees:r.earthRadius/111325,feet:r.earthRadius*3.28084,inches:r.earthRadius*39.37,kilometers:r.earthRadius/1e3,kilometres:r.earthRadius/1e3,meters:r.earthRadius,metres:r.earthRadius,miles:r.earthRadius/1609.344,millimeters:r.earthRadius*1e3,millimetres:r.earthRadius*1e3,nauticalmiles:r.earthRadius/1852,radians:1,yards:r.earthRadius*1.0936},r.unitsFactors={centimeters:100,centimetres:100,degrees:8982708286548395e-21,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:.0006213711922373339,millimeters:1e3,millimetres:1e3,nauticalmiles:.0005399568034557236,radians:1/r.earthRadius,yards:1.0936133},r.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046};function t(T,x,R){R===void 0&&(R={});var z={type:"Feature"};return(R.id===0||R.id)&&(z.id=R.id),R.bbox&&(z.bbox=R.bbox),z.properties=x||{},z.geometry=T,z}r.feature=t;function e(T,x,R){switch(T){case"Point":return n(x).geometry;case"LineString":return o(x).geometry;case"Polygon":return s(x).geometry;case"MultiPoint":return h(x).geometry;case"MultiLineString":return c(x).geometry;case"MultiPolygon":return f(x).geometry;default:throw new Error(T+" is invalid")}}r.geometry=e;function n(T,x,R){if(R===void 0&&(R={}),!T)throw new Error("coordinates is required");if(!Array.isArray(T))throw new Error("coordinates must be an Array");if(T.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!I(T[0])||!I(T[1]))throw new Error("coordinates must contain numbers");var z={type:"Point",coordinates:T};return t(z,x,R)}r.point=n;function i(T,x,R){return R===void 0&&(R={}),u(T.map(function(z){return n(z,x)}),R)}r.points=i;function s(T,x,R){R===void 0&&(R={});for(var z=0,rt=T;z<rt.length;z++){var B=rt[z];if(B.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var ct=0;ct<B[B.length-1].length;ct++)if(B[B.length-1][ct]!==B[0][ct])throw new Error("First and last Position are not equivalent.")}var G={type:"Polygon",coordinates:T};return t(G,x,R)}r.polygon=s;function a(T,x,R){return R===void 0&&(R={}),u(T.map(function(z){return s(z,x)}),R)}r.polygons=a;function o(T,x,R){if(R===void 0&&(R={}),T.length<2)throw new Error("coordinates must be an array of two or more positions");var z={type:"LineString",coordinates:T};return t(z,x,R)}r.lineString=o;function l(T,x,R){return R===void 0&&(R={}),u(T.map(function(z){return o(z,x)}),R)}r.lineStrings=l;function u(T,x){x===void 0&&(x={});var R={type:"FeatureCollection"};return x.id&&(R.id=x.id),x.bbox&&(R.bbox=x.bbox),R.features=T,R}r.featureCollection=u;function c(T,x,R){R===void 0&&(R={});var z={type:"MultiLineString",coordinates:T};return t(z,x,R)}r.multiLineString=c;function h(T,x,R){R===void 0&&(R={});var z={type:"MultiPoint",coordinates:T};return t(z,x,R)}r.multiPoint=h;function f(T,x,R){R===void 0&&(R={});var z={type:"MultiPolygon",coordinates:T};return t(z,x,R)}r.multiPolygon=f;function g(T,x,R){R===void 0&&(R={});var z={type:"GeometryCollection",geometries:T};return t(z,x,R)}r.geometryCollection=g;function m(T,x){if(x===void 0&&(x=0),x&&!(x>=0))throw new Error("precision must be a positive number");var R=Math.pow(10,x||0);return Math.round(T*R)/R}r.round=m;function _(T,x){x===void 0&&(x="kilometers");var R=r.factors[x];if(!R)throw new Error(x+" units is invalid");return T*R}r.radiansToLength=_;function E(T,x){x===void 0&&(x="kilometers");var R=r.factors[x];if(!R)throw new Error(x+" units is invalid");return T/R}r.lengthToRadians=E;function M(T,x){return w(E(T,x))}r.lengthToDegrees=M;function y(T){var x=T%360;return x<0&&(x+=360),x}r.bearingToAzimuth=y;function w(T){var x=T%(2*Math.PI);return x*180/Math.PI}r.radiansToDegrees=w;function v(T){var x=T%360;return x*Math.PI/180}r.degreesToRadians=v;function S(T,x,R){if(x===void 0&&(x="kilometers"),R===void 0&&(R="kilometers"),!(T>=0))throw new Error("length must be a positive number");return _(E(T,x),R)}r.convertLength=S;function P(T,x,R){if(x===void 0&&(x="meters"),R===void 0&&(R="kilometers"),!(T>=0))throw new Error("area must be a positive number");var z=r.areaFactors[x];if(!z)throw new Error("invalid original units");var rt=r.areaFactors[R];if(!rt)throw new Error("invalid final units");return T/z*rt}r.convertArea=P;function I(T){return!isNaN(T)&&T!==null&&!Array.isArray(T)}r.isNumber=I;function b(T){return!!T&&T.constructor===Object}r.isObject=b;function D(T){if(!T)throw new Error("bbox is required");if(!Array.isArray(T))throw new Error("bbox must be an Array");if(T.length!==4&&T.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");T.forEach(function(x){if(!I(x))throw new Error("bbox must only contain numbers")})}r.validateBBox=D;function O(T){if(!T)throw new Error("id is required");if(["string","number"].indexOf(typeof T)===-1)throw new Error("id must be a number or a string")}r.validateId=O}(Cf)),Cf}var ze={},Np;function bp(){if(Np)return ze;Np=1,Object.defineProperty(ze,"__esModule",{value:!0});var r=Mp();function t(y,w,v){if(y!==null)for(var S,P,I,b,D,O,T,x=0,R=0,z,rt=y.type,B=rt==="FeatureCollection",ct=rt==="Feature",G=B?y.features.length:1,X=0;X<G;X++){T=B?y.features[X].geometry:ct?y.geometry:y,z=T?T.type==="GeometryCollection":!1,D=z?T.geometries.length:1;for(var k=0;k<D;k++){var V=0,A=0;if(b=z?T.geometries[k]:T,b!==null){O=b.coordinates;var W=b.type;switch(x=v&&(W==="Polygon"||W==="MultiPolygon")?1:0,W){case null:break;case"Point":if(w(O,R,X,V,A)===!1)return!1;R++,V++;break;case"LineString":case"MultiPoint":for(S=0;S<O.length;S++){if(w(O[S],R,X,V,A)===!1)return!1;R++,W==="MultiPoint"&&V++}W==="LineString"&&V++;break;case"Polygon":case"MultiLineString":for(S=0;S<O.length;S++){for(P=0;P<O[S].length-x;P++){if(w(O[S][P],R,X,V,A)===!1)return!1;R++}W==="MultiLineString"&&V++,W==="Polygon"&&A++}W==="Polygon"&&V++;break;case"MultiPolygon":for(S=0;S<O.length;S++){for(A=0,P=0;P<O[S].length;P++){for(I=0;I<O[S][P].length-x;I++){if(w(O[S][P][I],R,X,V,A)===!1)return!1;R++}A++}V++}break;case"GeometryCollection":for(S=0;S<b.geometries.length;S++)if(t(b.geometries[S],w,v)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function e(y,w,v,S){var P=v;return t(y,function(I,b,D,O,T){b===0&&v===void 0?P=I:P=w(P,I,b,D,O,T)},S),P}function n(y,w){var v;switch(y.type){case"FeatureCollection":for(v=0;v<y.features.length&&w(y.features[v].properties,v)!==!1;v++);break;case"Feature":w(y.properties,0);break}}function i(y,w,v){var S=v;return n(y,function(P,I){I===0&&v===void 0?S=P:S=w(S,P,I)}),S}function s(y,w){if(y.type==="Feature")w(y,0);else if(y.type==="FeatureCollection")for(var v=0;v<y.features.length&&w(y.features[v],v)!==!1;v++);}function a(y,w,v){var S=v;return s(y,function(P,I){I===0&&v===void 0?S=P:S=w(S,P,I)}),S}function o(y){var w=[];return t(y,function(v){w.push(v)}),w}function l(y,w){var v,S,P,I,b,D,O,T,x,R,z=0,rt=y.type==="FeatureCollection",B=y.type==="Feature",ct=rt?y.features.length:1;for(v=0;v<ct;v++){for(D=rt?y.features[v].geometry:B?y.geometry:y,T=rt?y.features[v].properties:B?y.properties:{},x=rt?y.features[v].bbox:B?y.bbox:void 0,R=rt?y.features[v].id:B?y.id:void 0,O=D?D.type==="GeometryCollection":!1,b=O?D.geometries.length:1,P=0;P<b;P++){if(I=O?D.geometries[P]:D,I===null){if(w(null,z,T,x,R)===!1)return!1;continue}switch(I.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(w(I,z,T,x,R)===!1)return!1;break}case"GeometryCollection":{for(S=0;S<I.geometries.length;S++)if(w(I.geometries[S],z,T,x,R)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}z++}}function u(y,w,v){var S=v;return l(y,function(P,I,b,D,O){I===0&&v===void 0?S=P:S=w(S,P,I,b,D,O)}),S}function c(y,w){l(y,function(v,S,P,I,b){var D=v===null?null:v.type;switch(D){case null:case"Point":case"LineString":case"Polygon":return w(r.feature(v,P,{bbox:I,id:b}),S,0)===!1?!1:void 0}var O;switch(D){case"MultiPoint":O="Point";break;case"MultiLineString":O="LineString";break;case"MultiPolygon":O="Polygon";break}for(var T=0;T<v.coordinates.length;T++){var x=v.coordinates[T],R={type:O,coordinates:x};if(w(r.feature(R,P),S,T)===!1)return!1}})}function h(y,w,v){var S=v;return c(y,function(P,I,b){I===0&&b===0&&v===void 0?S=P:S=w(S,P,I,b)}),S}function f(y,w){c(y,function(v,S,P){var I=0;if(v.geometry){var b=v.geometry.type;if(!(b==="Point"||b==="MultiPoint")){var D,O=0,T=0,x=0;if(t(v,function(R,z,rt,B,ct){if(D===void 0||S>O||B>T||ct>x){D=R,O=S,T=B,x=ct,I=0;return}var G=r.lineString([D,R],v.properties);if(w(G,S,P,ct,I)===!1)return!1;I++,D=R})===!1)return!1}}})}function g(y,w,v){var S=v,P=!1;return f(y,function(I,b,D,O,T){P===!1&&v===void 0?S=I:S=w(S,I,b,D,O,T),P=!0}),S}function m(y,w){if(!y)throw new Error("geojson is required");c(y,function(v,S,P){if(v.geometry!==null){var I=v.geometry.type,b=v.geometry.coordinates;switch(I){case"LineString":if(w(v,S,P,0,0)===!1)return!1;break;case"Polygon":for(var D=0;D<b.length;D++)if(w(r.lineString(b[D],v.properties),S,P,D)===!1)return!1;break}}})}function _(y,w,v){var S=v;return m(y,function(P,I,b,D){I===0&&v===void 0?S=P:S=w(S,P,I,b,D)}),S}function E(y,w){if(w=w||{},!r.isObject(w))throw new Error("options is invalid");var v=w.featureIndex||0,S=w.multiFeatureIndex||0,P=w.geometryIndex||0,I=w.segmentIndex||0,b=w.properties,D;switch(y.type){case"FeatureCollection":v<0&&(v=y.features.length+v),b=b||y.features[v].properties,D=y.features[v].geometry;break;case"Feature":b=b||y.properties,D=y.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":D=y;break;default:throw new Error("geojson is invalid")}if(D===null)return null;var O=D.coordinates;switch(D.type){case"Point":case"MultiPoint":return null;case"LineString":return I<0&&(I=O.length+I-1),r.lineString([O[I],O[I+1]],b,w);case"Polygon":return P<0&&(P=O.length+P),I<0&&(I=O[P].length+I-1),r.lineString([O[P][I],O[P][I+1]],b,w);case"MultiLineString":return S<0&&(S=O.length+S),I<0&&(I=O[S].length+I-1),r.lineString([O[S][I],O[S][I+1]],b,w);case"MultiPolygon":return S<0&&(S=O.length+S),P<0&&(P=O[S].length+P),I<0&&(I=O[S][P].length-I-1),r.lineString([O[S][P][I],O[S][P][I+1]],b,w)}throw new Error("geojson is invalid")}function M(y,w){if(w=w||{},!r.isObject(w))throw new Error("options is invalid");var v=w.featureIndex||0,S=w.multiFeatureIndex||0,P=w.geometryIndex||0,I=w.coordIndex||0,b=w.properties,D;switch(y.type){case"FeatureCollection":v<0&&(v=y.features.length+v),b=b||y.features[v].properties,D=y.features[v].geometry;break;case"Feature":b=b||y.properties,D=y.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":D=y;break;default:throw new Error("geojson is invalid")}if(D===null)return null;var O=D.coordinates;switch(D.type){case"Point":return r.point(O,b,w);case"MultiPoint":return S<0&&(S=O.length+S),r.point(O[S],b,w);case"LineString":return I<0&&(I=O.length+I),r.point(O[I],b,w);case"Polygon":return P<0&&(P=O.length+P),I<0&&(I=O[P].length+I),r.point(O[P][I],b,w);case"MultiLineString":return S<0&&(S=O.length+S),I<0&&(I=O[S].length+I),r.point(O[S][I],b,w);case"MultiPolygon":return S<0&&(S=O.length+S),P<0&&(P=O[S].length+P),I<0&&(I=O[S][P].length-I),r.point(O[S][P][I],b,w)}throw new Error("geojson is invalid")}return ze.coordAll=o,ze.coordEach=t,ze.coordReduce=e,ze.featureEach=s,ze.featureReduce=a,ze.findPoint=M,ze.findSegment=E,ze.flattenEach=c,ze.flattenReduce=h,ze.geomEach=l,ze.geomReduce=u,ze.lineEach=m,ze.lineReduce=_,ze.propEach=n,ze.propReduce=i,ze.segmentEach=f,ze.segmentReduce=g,ze}var tc={},Tp;function fy(){if(Tp)return tc;Tp=1,Object.defineProperty(tc,"__esModule",{value:!0});var r=bp();function t(e){var n=[1/0,1/0,-1/0,-1/0];return r.coordEach(e,function(i){n[0]>i[0]&&(n[0]=i[0]),n[1]>i[1]&&(n[1]=i[1]),n[2]<i[0]&&(n[2]=i[0]),n[3]<i[1]&&(n[3]=i[1])}),n}return t.default=t,tc.default=t,tc}var Dp;function dy(){if(Dp)return jh.exports;Dp=1;var r=gp(),t=Mp(),e=bp(),n=fy().default,i=e.featureEach;e.coordEach,t.polygon;var s=t.featureCollection;function a(o){var l=new r(o);return l.insert=function(u){if(u.type!=="Feature")throw new Error("invalid feature");return u.bbox=u.bbox?u.bbox:n(u),r.prototype.insert.call(this,u)},l.load=function(u){var c=[];return Array.isArray(u)?u.forEach(function(h){if(h.type!=="Feature")throw new Error("invalid features");h.bbox=h.bbox?h.bbox:n(h),c.push(h)}):i(u,function(h){if(h.type!=="Feature")throw new Error("invalid features");h.bbox=h.bbox?h.bbox:n(h),c.push(h)}),r.prototype.load.call(this,c)},l.remove=function(u,c){if(u.type!=="Feature")throw new Error("invalid feature");return u.bbox=u.bbox?u.bbox:n(u),r.prototype.remove.call(this,u,c)},l.clear=function(){return r.prototype.clear.call(this)},l.search=function(u){var c=r.prototype.search.call(this,this.toBBox(u));return s(c)},l.collides=function(u){return r.prototype.collides.call(this,this.toBBox(u))},l.all=function(){var u=r.prototype.all.call(this);return s(u)},l.toJSON=function(){return r.prototype.toJSON.call(this)},l.fromJSON=function(u){return r.prototype.fromJSON.call(this,u)},l.toBBox=function(u){var c;if(u.bbox)c=u.bbox;else if(Array.isArray(u)&&u.length===4)c=u;else if(Array.isArray(u)&&u.length===6)c=[u[0],u[1],u[3],u[4]];else if(u.type==="Feature")c=n(u);else if(u.type==="FeatureCollection")c=n(u);else throw new Error("invalid geojson");return{minX:c[0],minY:c[1],maxX:c[2],maxY:c[3]}},l}return jh.exports=a,jh.exports.default=a,jh.exports}var py=dy();const gy=dp(py);function xp(r,t){var e={},n=[];if(r.type==="LineString"&&(r=ui(r)),t.type==="LineString"&&(t=ui(t)),r.type==="Feature"&&t.type==="Feature"&&r.geometry!==null&&t.geometry!==null&&r.geometry.type==="LineString"&&t.geometry.type==="LineString"&&r.geometry.coordinates.length===2&&t.geometry.coordinates.length===2){var i=Op(r,t);return i&&n.push(i),Wl(n)}var s=gy();return s.load(Cp(t)),Qh(Cp(r),function(a){Qh(s.search(a),function(o){var l=Op(a,o);if(l){var u=Aa(l).join(",");e[u]||(e[u]=!0,n.push(l))}})}),Wl(n)}function Op(r,t){var e=Aa(r),n=Aa(t);if(e.length!==2)throw new Error("<intersects> line1 must only contain 2 coordinates");if(n.length!==2)throw new Error("<intersects> line2 must only contain 2 coordinates");var i=e[0][0],s=e[0][1],a=e[1][0],o=e[1][1],l=n[0][0],u=n[0][1],c=n[1][0],h=n[1][1],f=(h-u)*(a-i)-(c-l)*(o-s),g=(c-l)*(s-u)-(h-u)*(i-l),m=(a-i)*(s-u)-(o-s)*(i-l);if(f===0)return null;var _=g/f,E=m/f;if(_>=0&&_<=1&&E>=0&&E<=1){var M=i+_*(a-i),y=s+_*(o-s);return ae([M,y])}return null}function my(r,t,e){e===void 0&&(e={});var n=ae([1/0,1/0],{dist:1/0}),i=0;return Ef(r,function(s){for(var a=Aa(s),o=0;o<a.length-1;o++){var l=ae(a[o]);l.properties.dist=ps(t,l,e);var u=ae(a[o+1]);u.properties.dist=ps(t,u,e);var c=ps(l,u,e),h=Math.max(l.properties.dist,u.properties.dist),f=Uu(l,u),g=Xl(t,h,f+90,e),m=Xl(t,h,f-90,e),_=xp(hi([g.geometry.coordinates,m.geometry.coordinates]),hi([l.geometry.coordinates,u.geometry.coordinates])),E=null;_.features.length>0&&(E=_.features[0],E.properties.dist=ps(t,E,e),E.properties.location=i+ps(l,E,e)),l.properties.dist<n.properties.dist&&(n=l,n.properties.index=o,n.properties.location=i),u.properties.dist<n.properties.dist&&(n=u,n.properties.index=o+1,n.properties.location=i+c),E&&E.properties.dist<n.properties.dist&&(n=E,n.properties.index=o),i+=c}}),n}function Ap(r,t,e){e===void 0&&(e={});var n=Rr(r),i=Rr(t);i[0]+=i[0]-n[0]>180?-360:n[0]-i[0]>180?360:0;var s=vy(n,i),a=wf(s,"meters",e.units);return a}function vy(r,t,e){e=e===void 0?hr:Number(e);var n=e,i=r[1]*Math.PI/180,s=t[1]*Math.PI/180,a=s-i,o=Math.abs(t[0]-r[0])*Math.PI/180;o>Math.PI&&(o-=2*Math.PI);var l=Math.log(Math.tan(s/2+Math.PI/4)/Math.tan(i/2+Math.PI/4)),u=Math.abs(l)>1e-11?a/l:Math.cos(i),c=Math.sqrt(a*a+u*u*o*o),h=c*n;return h}function yy(r,t,e){if(e===void 0&&(e={}),e.method||(e.method="geodesic"),e.units||(e.units="kilometers"),!r)throw new Error("pt is required");if(Array.isArray(r)?r=ae(r):r.type==="Point"?r=ui(r):fp(r,"Point","point"),!t)throw new Error("line is required");Array.isArray(t)?t=hi(t):t.type==="LineString"?t=ui(t):fp(t,"LineString","line");var n=1/0,i=r.geometry.coordinates;return qv(t,function(s){var a=s.geometry.coordinates[0],o=s.geometry.coordinates[1],l=_y(i,a,o,e);l<n&&(n=l)}),wf(n,"degrees",e.units)}function _y(r,t,e,n){var i=[e[0]-t[0],e[1]-t[1]],s=[r[0]-t[0],r[1]-t[1]],a=Lp(s,i);if(a<=0)return If(r,t,{method:n.method,units:"degrees"});var o=Lp(i,i);if(o<=a)return If(r,e,{method:n.method,units:"degrees"});var l=a/o,u=[t[0]+l*i[0],t[1]+l*i[1]];return If(r,u,{method:n.method,units:"degrees"})}function Lp(r,t){return r[0]*t[0]+r[1]*t[1]}function If(r,t,e){return e.method==="planar"?Ap(r,t,e):ps(r,t,e)}var Rp=6378137;function wy(r){return Uv(r,function(t,e){return t+Ey(e)},0)}function Ey(r){var t=0,e;switch(r.type){case"Polygon":return Fp(r.coordinates);case"MultiPolygon":for(e=0;e<r.coordinates.length;e++)t+=Fp(r.coordinates[e]);return t;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function Fp(r){var t=0;if(r&&r.length>0){t+=Math.abs(Gp(r[0]));for(var e=1;e<r.length;e++)t-=Math.abs(Gp(r[e]))}return t}function Gp(r){var t,e,n,i,s,a,o,l=0,u=r.length;if(u>2){for(o=0;o<u;o++)o===u-2?(i=u-2,s=u-1,a=0):o===u-1?(i=u-1,s=0,a=1):(i=o,s=o+1,a=o+2),t=r[i],e=r[s],n=r[a],l+=(Mf(n[0])-Mf(t[0]))*Math.sin(Mf(e[1]));l=l*Rp*Rp/2}return l}function Mf(r){return r*Math.PI/180}function Sy(r,t,e){e===void 0&&(e={});for(var n=_n(r),i=n.coordinates,s=0,a=0;a<i.length&&!(t>=s&&a===i.length-1);a++)if(s>=t){var o=t-s;if(o){var l=Uu(i[a],i[a-1])-180,u=Xl(i[a],o,l,e);return u}else return ae(i[a])}else s+=ps(i[a],i[a+1],e);return ae(i[i.length-1])}function gs(r,t,e){e===void 0&&(e={});for(var n=Rr(r),i=Aa(t),s=0;s<i.length-1;s++){var a=!1;if(e.ignoreEndVertices&&(s===0&&(a="start"),s===i.length-2&&(a="end"),s===0&&s+1===i.length-1&&(a="both")),Py(i[s],i[s+1],n,a,typeof e.epsilon>"u"?null:e.epsilon))return!0}return!1}function Py(r,t,e,n,i){var s=e[0],a=e[1],o=r[0],l=r[1],u=t[0],c=t[1],h=e[0]-o,f=e[1]-l,g=u-o,m=c-l,_=h*m-f*g;if(i!==null){if(Math.abs(_)>i)return!1}else if(_!==0)return!1;if(n){if(n==="start")return Math.abs(g)>=Math.abs(m)?g>0?o<s&&s<=u:u<=s&&s<o:m>0?l<a&&a<=c:c<=a&&a<l;if(n==="end")return Math.abs(g)>=Math.abs(m)?g>0?o<=s&&s<u:u<s&&s<=o:m>0?l<=a&&a<c:c<a&&a<=l;if(n==="both")return Math.abs(g)>=Math.abs(m)?g>0?o<s&&s<u:u<s&&s<o:m>0?l<a&&a<c:c<a&&a<l}else return Math.abs(g)>=Math.abs(m)?g>0?o<=s&&s<=u:u<=s&&s<=o:m>0?l<=a&&a<=c:c<=a&&a<=l;return!1}function Cy(r,t){var e=_n(r),n=_n(t),i=e.type,s=n.type;switch(i){case"Point":switch(s){case"MultiPoint":return Iy(e,n);case"LineString":return gs(e,n,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return Gn(e,n,{ignoreBoundary:!0});default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"MultiPoint":return My(e,n);case"LineString":return Ny(e,n);case"Polygon":case"MultiPolygon":return by(e,n);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"LineString":return Ty(e,n);case"Polygon":case"MultiPolygon":return Dy(e,n);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Polygon":case"MultiPolygon":return xy(e,n);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function Iy(r,t){var e,n=!1;for(e=0;e<t.coordinates.length;e++)if(zp(t.coordinates[e],r.coordinates)){n=!0;break}return n}function My(r,t){for(var e=0;e<r.coordinates.length;e++){for(var n=!1,i=0;i<t.coordinates.length;i++)zp(r.coordinates[e],t.coordinates[i])&&(n=!0);if(!n)return!1}return!0}function Ny(r,t){for(var e=!1,n=0;n<r.coordinates.length;n++){if(!gs(r.coordinates[n],t))return!1;e||(e=gs(r.coordinates[n],t,{ignoreEndVertices:!0}))}return e}function by(r,t){for(var e=!0,n=!1,i=0;i<r.coordinates.length;i++){if(n=Gn(r.coordinates[1],t),!n){e=!1;break}n=Gn(r.coordinates[1],t,{ignoreBoundary:!0})}return e&&n}function Ty(r,t){for(var e=0;e<r.coordinates.length;e++)if(!gs(r.coordinates[e],t))return!1;return!0}function Dy(r,t){var e=ci(t),n=ci(r);if(!kp(e,n))return!1;for(var i=!1,s=0;s<r.coordinates.length-1;s++){if(!Gn(r.coordinates[s],t))return!1;if(i||(i=Gn(r.coordinates[s],t,{ignoreBoundary:!0})),!i){var a=Oy(r.coordinates[s],r.coordinates[s+1]);i=Gn(a,t,{ignoreBoundary:!0})}}return i}function xy(r,t){var e=ci(r),n=ci(t);if(!kp(n,e))return!1;for(var i=0;i<r.coordinates[0].length;i++)if(!Gn(r.coordinates[0][i],t))return!1;return!0}function kp(r,t){return!(r[0]>t[0]||r[2]<t[2]||r[1]>t[1]||r[3]<t[3])}function zp(r,t){return r[0]===t[0]&&r[1]===t[1]}function Oy(r,t){return[(r[0]+t[0])/2,(r[1]+t[1])/2]}function Ay(r,t,e){e===void 0&&(e={});var n;e.final?n=Vp(Rr(t),Rr(r)):n=Vp(Rr(r),Rr(t));var i=n>180?-(360-n):n;return i}function Vp(r,t){var e=Cr(r[1]),n=Cr(t[1]),i=Cr(t[0]-r[0]);i>Math.PI&&(i-=2*Math.PI),i<-Math.PI&&(i+=2*Math.PI);var s=Math.log(Math.tan(n/2+Math.PI/4)/Math.tan(e/2+Math.PI/4)),a=Math.atan2(i,s);return(Kh(a)+360)%360}function Ly(r,t,e,n){n===void 0&&(n={});var i=t<0,s=wf(Math.abs(t),n.units,"meters");i&&(s=-Math.abs(s));var a=Rr(r),o=Ry(a,s,e);return o[0]+=o[0]-a[0]>180?-360:a[0]-o[0]>180?360:0,ae(o,n.properties)}function Ry(r,t,e,n){n=n===void 0?hr:Number(n);var i=t/n,s=r[0]*Math.PI/180,a=Cr(r[1]),o=Cr(e),l=i*Math.cos(o),u=a+l;Math.abs(u)>Math.PI/2&&(u=u>0?Math.PI-u:-Math.PI-u);var c=Math.log(Math.tan(u/2+Math.PI/4)/Math.tan(a/2+Math.PI/4)),h=Math.abs(c)>1e-11?l/c:Math.cos(a),f=i*Math.sin(o)/h,g=s+f;return[(g*180/Math.PI+540)%360-180,u*180/Math.PI]}function Fy(r,t){var e=_n(r),n=_n(t),i=e.type,s=n.type,a=e.coordinates,o=n.coordinates;switch(i){case"Point":switch(s){case"Point":return Nf(a,o);default:throw new Error("feature2 "+s+" geometry not supported")}case"MultiPoint":switch(s){case"Point":return Gy(e,n);case"MultiPoint":return ky(e,n);default:throw new Error("feature2 "+s+" geometry not supported")}case"LineString":switch(s){case"Point":return gs(n,e,{ignoreEndVertices:!0});case"LineString":return Uy(e,n);case"MultiPoint":return zy(e,n);default:throw new Error("feature2 "+s+" geometry not supported")}case"Polygon":switch(s){case"Point":return Gn(n,e,{ignoreBoundary:!0});case"LineString":return qy(e,n);case"Polygon":return Wy(e,n);case"MultiPoint":return Vy(e,n);default:throw new Error("feature2 "+s+" geometry not supported")}default:throw new Error("feature1 "+i+" geometry not supported")}}function Gy(r,t){var e,n=!1;for(e=0;e<r.coordinates.length;e++)if(Nf(r.coordinates[e],t.coordinates)){n=!0;break}return n}function ky(r,t){for(var e=0,n=t.coordinates;e<n.length;e++){for(var i=n[e],s=!1,a=0,o=r.coordinates;a<o.length;a++){var l=o[a];if(Nf(i,l)){s=!0;break}}if(!s)return!1}return!0}function zy(r,t){for(var e=!1,n=0,i=t.coordinates;n<i.length;n++){var s=i[n];if(gs(s,r,{ignoreEndVertices:!0})&&(e=!0),!gs(s,r))return!1}return!!e}function Vy(r,t){for(var e=0,n=t.coordinates;e<n.length;e++){var i=n[e];if(!Gn(i,r,{ignoreBoundary:!0}))return!1}return!0}function Uy(r,t){for(var e=!1,n=0,i=t.coordinates;n<i.length;n++){var s=i[n];if(gs({type:"Point",coordinates:s},r,{ignoreEndVertices:!0})&&(e=!0),!gs({type:"Point",coordinates:s},r,{ignoreEndVertices:!1}))return!1}return e}function qy(r,t){var e=!1,n=0,i=ci(r),s=ci(t);if(!Up(i,s))return!1;for(n;n<t.coordinates.length-1;n++){var a=Hy(t.coordinates[n],t.coordinates[n+1]);if(Gn({type:"Point",coordinates:a},r,{ignoreBoundary:!0})){e=!0;break}}return e}function Wy(r,t){if(r.type==="Feature"&&r.geometry===null||t.type==="Feature"&&t.geometry===null)return!1;var e=ci(r),n=ci(t);if(!Up(e,n))return!1;for(var i=_n(t).coordinates,s=0,a=i;s<a.length;s++)for(var o=a[s],l=0,u=o;l<u.length;l++){var c=u[l];if(!Gn(c,r))return!1}return!0}function Up(r,t){return!(r[0]>t[0]||r[2]<t[2]||r[1]>t[1]||r[3]<t[3])}function Nf(r,t){return r[0]===t[0]&&r[1]===t[1]}function Hy(r,t){return[(r[0]+t[0])/2,(r[1]+t[1])/2]}/**
|
|
4
4
|
* splaytree v3.1.2
|
|
5
5
|
* Fast Splay tree for Node and browser
|
|
6
6
|
*
|
|
@@ -21,13 +21,13 @@ ${l.map(c=>`${c.id} ${c.typeName}
|
|
|
21
21
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
22
22
|
and limitations under the License.
|
|
23
23
|
***************************************************************************** */function Xy(r,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;e;)try{if(n=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return e.label++,{value:u[1],done:!1};case 5:e.label++,i=u[1],u=[0];continue;case 7:u=e.ops.pop(),e.trys.pop();continue;default:if(s=e.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){e.label=u[1];break}if(u[0]===6&&e.label<s[1]){e.label=s[1],s=u;break}if(s&&e.label<s[2]){e.label=s[2],e.ops.push(u);break}s[2]&&e.ops.pop(),e.trys.pop();continue}u=t.call(r,e)}catch(c){u=[6,c],i=0}finally{n=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var Js=function(){function r(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null}return r}();function Yy(r,t){return r>t?1:r<t?-1:0}function Ks(r,t,e){for(var n=new Js(null,null),i=n,s=n;;){var a=e(r,t.key);if(a<0){if(t.left===null)break;if(e(r,t.left.key)<0){var o=t.left;if(t.left=o.right,o.right=t,t=o,t.left===null)break}s.left=t,s=t,t=t.left}else if(a>0){if(t.right===null)break;if(e(r,t.right.key)>0){var o=t.right;if(t.right=o.left,o.left=t,t=o,t.right===null)break}i.right=t,i=t,t=t.right}else break}return i.right=t.left,s.left=t.right,t.left=n.right,t.right=n.left,t}function bf(r,t,e,n){var i=new Js(r,t);if(e===null)return i.left=i.right=null,i;e=Ks(r,e,n);var s=n(r,e.key);return s<0?(i.left=e.left,i.right=e,e.left=null):s>=0&&(i.right=e.right,i.left=e,e.right=null),i}function qp(r,t,e){var n=null,i=null;if(t){t=Ks(r,t,e);var s=e(t.key,r);s===0?(n=t.left,i=t.right):s<0?(i=t.right,t.right=null,n=t):(n=t.left,t.left=null,i=t)}return{left:n,right:i}}function Jy(r,t,e){return t===null?r:(r===null||(t=Ks(r.key,t,e),t.left=r),t)}function Tf(r,t,e,n,i){if(r){n(""+t+(e?"└── ":"├── ")+i(r)+`
|
|
24
|
-
`);var s=t+(e?" ":"│ ");r.left&&Tf(r.left,s,!1,n,i),r.right&&Tf(r.right,s,!0,n,i)}}var Df=function(){function r(t){t===void 0&&(t=Yy),this._root=null,this._size=0,this._comparator=t}return r.prototype.insert=function(t,e){return this._size++,this._root=bf(t,e,this._root,this._comparator)},r.prototype.add=function(t,e){var n=new Js(t,e);this._root===null&&(n.left=n.right=null,this._size++,this._root=n);var i=this._comparator,s=Ks(t,this._root,i),a=i(t,s.key);return a===0?this._root=s:(a<0?(n.left=s.left,n.right=s,s.left=null):a>0&&(n.right=s.right,n.left=s,s.right=null),this._size++,this._root=n),this._root},r.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},r.prototype._remove=function(t,e,n){var i;if(e===null)return null;e=Ks(t,e,n);var s=n(t,e.key);return s===0?(e.left===null?i=e.right:(i=Ks(t,e.left,n),i.right=e.right),this._size--,i):e},r.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=Ks(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},r.prototype.findStatic=function(t){for(var e=this._root,n=this._comparator;e;){var i=n(t,e.key);if(i===0)return e;i<0?e=e.left:e=e.right}return null},r.prototype.find=function(t){return this._root&&(this._root=Ks(t,this._root,this._comparator),this._comparator(t,this._root.key)!==0)?null:this._root},r.prototype.contains=function(t){for(var e=this._root,n=this._comparator;e;){var i=n(t,e.key);if(i===0)return!0;i<0?e=e.left:e=e.right}return!1},r.prototype.forEach=function(t,e){for(var n=this._root,i=[],s=!1;!s;)n!==null?(i.push(n),n=n.left):i.length!==0?(n=i.pop(),t.call(e,n),n=n.right):s=!0;return this},r.prototype.range=function(t,e,n,i){for(var s=[],a=this._comparator,o=this._root,l;s.length!==0||o;)if(o)s.push(o),o=o.left;else{if(o=s.pop(),l=a(o.key,e),l>0)break;if(a(o.key,t)>=0&&n.call(i,o))return this;o=o.right}return this},r.prototype.keys=function(){var t=[];return this.forEach(function(e){var n=e.key;return t.push(n)}),t},r.prototype.values=function(){var t=[];return this.forEach(function(e){var n=e.data;return t.push(n)}),t},r.prototype.min=function(){return this._root?this.minNode(this._root).key:null},r.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},r.prototype.minNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.left;)t=t.left;return t},r.prototype.maxNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.right;)t=t.right;return t},r.prototype.at=function(t){for(var e=this._root,n=!1,i=0,s=[];!n;)if(e)s.push(e),e=e.left;else if(s.length>0){if(e=s.pop(),i===t)return e;i++,e=e.right}else n=!0;return null},r.prototype.next=function(t){var e=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var i=this._comparator;e;){var s=i(t.key,e.key);if(s===0)break;s<0?(n=e,e=e.left):e=e.right}return n},r.prototype.prev=function(t){var e=this._root,n=null;if(t.left!==null){for(n=t.left;n.right;)n=n.right;return n}for(var i=this._comparator;e;){var s=i(t.key,e.key);if(s===0)break;s<0?e=e.left:(n=e,e=e.right)}return n},r.prototype.clear=function(){return this._root=null,this._size=0,this},r.prototype.toList=function(){return Qy(this._root)},r.prototype.load=function(t,e,n){e===void 0&&(e=[]),n===void 0&&(n=!1);var i=t.length,s=this._comparator;if(n&&Af(t,e,0,i-1,s),this._root===null)this._root=xf(t,e,0,i),this._size=i;else{var a=By(this.toList(),Ky(t,e),s);i=this._size+i,this._root=Of({head:a},0,i)}return this},r.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(r.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),r.prototype.toString=function(t){t===void 0&&(t=function(n){return String(n.key)});var e=[];return Tf(this._root,"",!0,function(n){return e.push(n)},t),e.join("")},r.prototype.update=function(t,e,n){var i=this._comparator,s=qp(t,this._root,i),a=s.left,o=s.right;i(t,e)<0?o=bf(e,n,o,i):a=bf(e,n,a,i),this._root=Jy(a,o,i)},r.prototype.split=function(t){return qp(t,this._root,this._comparator)},r.prototype[Symbol.iterator]=function(){var t,e,n;return Xy(this,function(i){switch(i.label){case 0:t=this._root,e=[],n=!1,i.label=1;case 1:return n?[3,6]:t===null?[3,2]:(e.push(t),t=t.left,[3,5]);case 2:return e.length===0?[3,4]:(t=e.pop(),[4,t]);case 3:return i.sent(),t=t.right,[3,5];case 4:n=!0,i.label=5;case 5:return[3,1];case 6:return[2]}})},r}();function xf(r,t,e,n){var i=n-e;if(i>0){var s=e+Math.floor(i/2),a=r[s],o=t[s],l=new Js(a,o);return l.left=xf(r,t,e,s),l.right=xf(r,t,s+1,n),l}return null}function Ky(r,t){for(var e=new Js(null,null),n=e,i=0;i<r.length;i++)n=n.next=new Js(r[i],t[i]);return n.next=null,e.next}function Qy(r){for(var t=r,e=[],n=!1,i=new Js(null,null),s=i;!n;)t?(e.push(t),t=t.left):e.length>0?(t=s=s.next=e.pop(),t=t.right):n=!0;return s.next=null,i.next}function Of(r,t,e){var n=e-t;if(n>0){var i=t+Math.floor(n/2),s=Of(r,t,i),a=r.head;return a.left=s,r.head=r.head.next,a.right=Of(r,i+1,e),a}return null}function By(r,t,e){for(var n=new Js(null,null),i=n,s=r,a=t;s!==null&&a!==null;)e(s.key,a.key)<0?(i.next=s,s=s.next):(i.next=a,a=a.next),i=i.next;return s!==null?i.next=s:a!==null&&(i.next=a),n.next}function Af(r,t,e,n,i){if(!(e>=n)){for(var s=r[e+n>>1],a=e-1,o=n+1;;){do a++;while(i(r[a],s)<0);do o--;while(i(r[o],s)>0);if(a>=o)break;var l=r[a];r[a]=r[o],r[o]=l,l=t[a],t[a]=t[o],t[o]=l}Af(r,t,e,o,i),Af(r,t,o+1,n,i)}}const ms=11102230246251565e-32,Mr=134217729,Zy=(3+8*ms)*ms;function Lf(r,t,e,n,i){let s,a,o,l,u=t[0],c=n[0],h=0,f=0;c>u==c>-u?(s=u,u=t[++h]):(s=c,c=n[++f]);let g=0;if(h<r&&f<e)for(c>u==c>-u?(a=u+s,o=s-(a-u),u=t[++h]):(a=c+s,o=s-(a-c),c=n[++f]),s=a,o!==0&&(i[g++]=o);h<r&&f<e;)c>u==c>-u?(a=s+u,l=a-s,o=s-(a-l)+(u-l),u=t[++h]):(a=s+c,l=a-s,o=s-(a-l)+(c-l),c=n[++f]),s=a,o!==0&&(i[g++]=o);for(;h<r;)a=s+u,l=a-s,o=s-(a-l)+(u-l),u=t[++h],s=a,o!==0&&(i[g++]=o);for(;f<e;)a=s+c,l=a-s,o=s-(a-l)+(c-l),c=n[++f],s=a,o!==0&&(i[g++]=o);return(s!==0||g===0)&&(i[g++]=s),g}function $y(r,t){let e=t[0];for(let n=1;n<r;n++)e+=t[n];return e}function qu(r){return new Float64Array(r)}const jy=(3+16*ms)*ms,t_=(2+12*ms)*ms,e_=(9+64*ms)*ms*ms,Yl=qu(4),Wp=qu(8),Hp=qu(12),Xp=qu(16),Gr=qu(4);function r_(r,t,e,n,i,s,a){let o,l,u,c,h,f,g,m,_,E,M,y,w,v,S,P,I,b;const D=r-i,O=e-i,T=t-s,x=n-s;v=D*x,f=Mr*D,g=f-(f-D),m=D-g,f=Mr*x,_=f-(f-x),E=x-_,S=m*E-(v-g*_-m*_-g*E),P=T*O,f=Mr*T,g=f-(f-T),m=T-g,f=Mr*O,_=f-(f-O),E=O-_,I=m*E-(P-g*_-m*_-g*E),M=S-I,h=S-M,Yl[0]=S-(M+h)+(h-I),y=v+M,h=y-v,w=v-(y-h)+(M-h),M=w-P,h=w-M,Yl[1]=w-(M+h)+(h-P),b=y+M,h=b-y,Yl[2]=y-(b-h)+(M-h),Yl[3]=b;let R=$y(4,Yl),z=t_*a;if(R>=z||-R>=z||(h=r-D,o=r-(D+h)+(h-i),h=e-O,u=e-(O+h)+(h-i),h=t-T,l=t-(T+h)+(h-s),h=n-x,c=n-(x+h)+(h-s),o===0&&l===0&&u===0&&c===0)||(z=e_*a+Zy*Math.abs(R),R+=D*c+x*o-(T*u+O*l),R>=z||-R>=z))return R;v=o*x,f=Mr*o,g=f-(f-o),m=o-g,f=Mr*x,_=f-(f-x),E=x-_,S=m*E-(v-g*_-m*_-g*E),P=l*O,f=Mr*l,g=f-(f-l),m=l-g,f=Mr*O,_=f-(f-O),E=O-_,I=m*E-(P-g*_-m*_-g*E),M=S-I,h=S-M,Gr[0]=S-(M+h)+(h-I),y=v+M,h=y-v,w=v-(y-h)+(M-h),M=w-P,h=w-M,Gr[1]=w-(M+h)+(h-P),b=y+M,h=b-y,Gr[2]=y-(b-h)+(M-h),Gr[3]=b;const rt=Lf(4,Yl,4,Gr,Wp);v=D*c,f=Mr*D,g=f-(f-D),m=D-g,f=Mr*c,_=f-(f-c),E=c-_,S=m*E-(v-g*_-m*_-g*E),P=T*u,f=Mr*T,g=f-(f-T),m=T-g,f=Mr*u,_=f-(f-u),E=u-_,I=m*E-(P-g*_-m*_-g*E),M=S-I,h=S-M,Gr[0]=S-(M+h)+(h-I),y=v+M,h=y-v,w=v-(y-h)+(M-h),M=w-P,h=w-M,Gr[1]=w-(M+h)+(h-P),b=y+M,h=b-y,Gr[2]=y-(b-h)+(M-h),Gr[3]=b;const B=Lf(rt,Wp,4,Gr,Hp);v=o*c,f=Mr*o,g=f-(f-o),m=o-g,f=Mr*c,_=f-(f-c),E=c-_,S=m*E-(v-g*_-m*_-g*E),P=l*u,f=Mr*l,g=f-(f-l),m=l-g,f=Mr*u,_=f-(f-u),E=u-_,I=m*E-(P-g*_-m*_-g*E),M=S-I,h=S-M,Gr[0]=S-(M+h)+(h-I),y=v+M,h=y-v,w=v-(y-h)+(M-h),M=w-P,h=w-M,Gr[1]=w-(M+h)+(h-P),b=y+M,h=b-y,Gr[2]=y-(b-h)+(M-h),Gr[3]=b;const ct=Lf(B,Hp,4,Gr,Xp);return Xp[ct-1]}function n_(r,t,e,n,i,s){const a=(t-s)*(e-i),o=(r-i)*(n-s),l=a-o,u=Math.abs(a+o);return Math.abs(l)>=jy*u?l:-r_(r,t,e,n,i,s,u)}const Wu=(r,t)=>r.ll.x<=t.x&&t.x<=r.ur.x&&r.ll.y<=t.y&&t.y<=r.ur.y,Rf=(r,t)=>{if(t.ur.x<r.ll.x||r.ur.x<t.ll.x||t.ur.y<r.ll.y||r.ur.y<t.ll.y)return null;const e=r.ll.x<t.ll.x?t.ll.x:r.ll.x,n=r.ur.x<t.ur.x?r.ur.x:t.ur.x,i=r.ll.y<t.ll.y?t.ll.y:r.ll.y,s=r.ur.y<t.ur.y?r.ur.y:t.ur.y;return{ll:{x:e,y:i},ur:{x:n,y:s}}};let Qs=Number.EPSILON;Qs===void 0&&(Qs=Math.pow(2,-52));const i_=Qs*Qs,Yp=(r,t)=>{if(-Qs<r&&r<Qs&&-Qs<t&&t<Qs)return 0;const e=r-t;return e*e<i_*r*t?0:r<t?-1:1};class s_{constructor(){this.reset()}reset(){this.xRounder=new Jp,this.yRounder=new Jp}round(t,e){return{x:this.xRounder.round(t),y:this.yRounder.round(e)}}}class Jp{constructor(){this.tree=new Df,this.round(0)}round(t){const e=this.tree.add(t),n=this.tree.prev(e);if(n!==null&&Yp(e.key,n.key)===0)return this.tree.remove(t),n.key;const i=this.tree.next(e);return i!==null&&Yp(e.key,i.key)===0?(this.tree.remove(t),i.key):t}}const Hu=new s_,ec=(r,t)=>r.x*t.y-r.y*t.x,Kp=(r,t)=>r.x*t.x+r.y*t.y,Qp=(r,t,e)=>{const n=n_(r.x,r.y,t.x,t.y,e.x,e.y);return n>0?-1:n<0?1:0},rc=r=>Math.sqrt(Kp(r,r)),a_=(r,t,e)=>{const n={x:t.x-r.x,y:t.y-r.y},i={x:e.x-r.x,y:e.y-r.y};return ec(i,n)/rc(i)/rc(n)},o_=(r,t,e)=>{const n={x:t.x-r.x,y:t.y-r.y},i={x:e.x-r.x,y:e.y-r.y};return Kp(i,n)/rc(i)/rc(n)},Bp=(r,t,e)=>t.y===0?null:{x:r.x+t.x/t.y*(e-r.y),y:e},Zp=(r,t,e)=>t.x===0?null:{x:e,y:r.y+t.y/t.x*(e-r.x)},l_=(r,t,e,n)=>{if(t.x===0)return Zp(e,n,r.x);if(n.x===0)return Zp(r,t,e.x);if(t.y===0)return Bp(e,n,r.y);if(n.y===0)return Bp(r,t,e.y);const i=ec(t,n);if(i==0)return null;const s={x:e.x-r.x,y:e.y-r.y},a=ec(s,t)/i,o=ec(s,n)/i,l=r.x+o*t.x,u=e.x+a*n.x,c=r.y+o*t.y,h=e.y+a*n.y,f=(l+u)/2,g=(c+h)/2;return{x:f,y:g}};class zn{static compare(t,e){const n=zn.comparePoints(t.point,e.point);return n!==0?n:(t.point!==e.point&&t.link(e),t.isLeft!==e.isLeft?t.isLeft?1:-1:Bs.compare(t.segment,e.segment))}static comparePoints(t,e){return t.x<e.x?-1:t.x>e.x?1:t.y<e.y?-1:t.y>e.y?1:0}constructor(t,e){t.events===void 0?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}link(t){if(t.point===this.point)throw new Error("Tried to link already linked events");const e=t.point.events;for(let n=0,i=e.length;n<i;n++){const s=e[n];this.point.events.push(s),s.point=this.point}this.checkForConsuming()}checkForConsuming(){const t=this.point.events.length;for(let e=0;e<t;e++){const n=this.point.events[e];if(n.segment.consumedBy===void 0)for(let i=e+1;i<t;i++){const s=this.point.events[i];s.consumedBy===void 0&&n.otherSE.point.events===s.otherSE.point.events&&n.segment.consume(s.segment)}}}getAvailableLinkedEvents(){const t=[];for(let e=0,n=this.point.events.length;e<n;e++){const i=this.point.events[e];i!==this&&!i.segment.ringOut&&i.segment.isInResult()&&t.push(i)}return t}getLeftmostComparator(t){const e=new Map,n=i=>{const s=i.otherSE;e.set(i,{sine:a_(this.point,t.point,s.point),cosine:o_(this.point,t.point,s.point)})};return(i,s)=>{e.has(i)||n(i),e.has(s)||n(s);const{sine:a,cosine:o}=e.get(i),{sine:l,cosine:u}=e.get(s);return a>=0&&l>=0?o<u?1:o>u?-1:0:a<0&&l<0?o<u?-1:o>u?1:0:l<a?-1:l>a?1:0}}}let u_=0;class Bs{static compare(t,e){const n=t.leftSE.point.x,i=e.leftSE.point.x,s=t.rightSE.point.x,a=e.rightSE.point.x;if(a<n)return 1;if(s<i)return-1;const o=t.leftSE.point.y,l=e.leftSE.point.y,u=t.rightSE.point.y,c=e.rightSE.point.y;if(n<i){if(l<o&&l<u)return 1;if(l>o&&l>u)return-1;const h=t.comparePoint(e.leftSE.point);if(h<0)return 1;if(h>0)return-1;const f=e.comparePoint(t.rightSE.point);return f!==0?f:-1}if(n>i){if(o<l&&o<c)return-1;if(o>l&&o>c)return 1;const h=e.comparePoint(t.leftSE.point);if(h!==0)return h;const f=t.comparePoint(e.rightSE.point);return f<0?1:f>0?-1:1}if(o<l)return-1;if(o>l)return 1;if(s<a){const h=e.comparePoint(t.rightSE.point);if(h!==0)return h}if(s>a){const h=t.comparePoint(e.rightSE.point);if(h<0)return 1;if(h>0)return-1}if(s!==a){const h=u-o,f=s-n,g=c-l,m=a-i;if(h>f&&g<m)return 1;if(h<f&&g>m)return-1}return s>a?1:s<a||u<c?-1:u>c?1:t.id<e.id?-1:t.id>e.id?1:0}constructor(t,e,n,i){this.id=++u_,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=n,this.windings=i}static fromRing(t,e,n){let i,s,a;const o=zn.comparePoints(t,e);if(o<0)i=t,s=e,a=1;else if(o>0)i=e,s=t,a=-1;else throw new Error(`Tried to create degenerate segment at [${t.x}, ${t.y}]`);const l=new zn(i,!0),u=new zn(s,!1);return new Bs(l,u,[n],[a])}replaceRightSE(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<e?t:e},ur:{x:this.rightSE.point.x,y:t>e?t:e}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}comparePoint(t){if(this.isAnEndpoint(t))return 0;const e=this.leftSE.point,n=this.rightSE.point,i=this.vector();if(e.x===n.x)return t.x===e.x?0:t.x<e.x?1:-1;const s=(t.y-e.y)/i.y,a=e.x+s*i.x;if(t.x===a)return 0;const o=(t.x-e.x)/i.x,l=e.y+o*i.y;return t.y===l?0:t.y<l?-1:1}getIntersection(t){const e=this.bbox(),n=t.bbox(),i=Rf(e,n);if(i===null)return null;const s=this.leftSE.point,a=this.rightSE.point,o=t.leftSE.point,l=t.rightSE.point,u=Wu(e,o)&&this.comparePoint(o)===0,c=Wu(n,s)&&t.comparePoint(s)===0,h=Wu(e,l)&&this.comparePoint(l)===0,f=Wu(n,a)&&t.comparePoint(a)===0;if(c&&u)return f&&!h?a:!f&&h?l:null;if(c)return h&&s.x===l.x&&s.y===l.y?null:s;if(u)return f&&a.x===o.x&&a.y===o.y?null:o;if(f&&h)return null;if(f)return a;if(h)return l;const g=l_(s,this.vector(),o,t.vector());return g===null||!Wu(i,g)?null:Hu.round(g.x,g.y)}split(t){const e=[],n=t.events!==void 0,i=new zn(t,!0),s=new zn(t,!1),a=this.rightSE;this.replaceRightSE(s),e.push(s),e.push(i);const o=new Bs(i,a,this.rings.slice(),this.windings.slice());return zn.comparePoints(o.leftSE.point,o.rightSE.point)>0&&o.swapEvents(),zn.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(i.checkForConsuming(),s.checkForConsuming()),e}swapEvents(){const t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let e=0,n=this.windings.length;e<n;e++)this.windings[e]*=-1}consume(t){let e=this,n=t;for(;e.consumedBy;)e=e.consumedBy;for(;n.consumedBy;)n=n.consumedBy;const i=Bs.compare(e,n);if(i!==0){if(i>0){const s=e;e=n,n=s}if(e.prev===n){const s=e;e=n,n=s}for(let s=0,a=n.rings.length;s<a;s++){const o=n.rings[s],l=n.windings[s],u=e.rings.indexOf(o);u===-1?(e.rings.push(o),e.windings.push(l)):e.windings[u]+=l}n.rings=null,n.windings=null,n.consumedBy=e,n.leftSE.consumedBy=e.leftSE,n.rightSE.consumedBy=e.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{const t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;const t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};const e=this._afterState.rings,n=this._afterState.windings,i=this._afterState.multiPolys;for(let o=0,l=this.rings.length;o<l;o++){const u=this.rings[o],c=this.windings[o],h=e.indexOf(u);h===-1?(e.push(u),n.push(c)):n[h]+=c}const s=[],a=[];for(let o=0,l=e.length;o<l;o++){if(n[o]===0)continue;const u=e[o],c=u.poly;if(a.indexOf(c)===-1)if(u.isExterior)s.push(c);else{a.indexOf(c)===-1&&a.push(c);const h=s.indexOf(u.poly);h!==-1&&s.splice(h,1)}}for(let o=0,l=s.length;o<l;o++){const u=s[o].multiPoly;i.indexOf(u)===-1&&i.push(u)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;const t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(fi.type){case"union":{const n=t.length===0,i=e.length===0;this._isInResult=n!==i;break}case"intersection":{let n,i;t.length<e.length?(n=t.length,i=e.length):(n=e.length,i=t.length),this._isInResult=i===fi.numMultiPolys&&n<i;break}case"xor":{const n=Math.abs(t.length-e.length);this._isInResult=n%2===1;break}case"difference":{const n=i=>i.length===1&&i[0].isSubject;this._isInResult=n(t)!==n(e);break}default:throw new Error(`Unrecognized operation type found ${fi.type}`)}return this._isInResult}}class $p{constructor(t,e,n){if(!Array.isArray(t)||t.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=n,this.segments=[],typeof t[0][0]!="number"||typeof t[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const i=Hu.round(t[0][0],t[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};let s=i;for(let a=1,o=t.length;a<o;a++){if(typeof t[a][0]!="number"||typeof t[a][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let l=Hu.round(t[a][0],t[a][1]);l.x===s.x&&l.y===s.y||(this.segments.push(Bs.fromRing(s,l,this)),l.x<this.bbox.ll.x&&(this.bbox.ll.x=l.x),l.y<this.bbox.ll.y&&(this.bbox.ll.y=l.y),l.x>this.bbox.ur.x&&(this.bbox.ur.x=l.x),l.y>this.bbox.ur.y&&(this.bbox.ur.y=l.y),s=l)}(i.x!==s.x||i.y!==s.y)&&this.segments.push(Bs.fromRing(s,i,this))}getSweepEvents(){const t=[];for(let e=0,n=this.segments.length;e<n;e++){const i=this.segments[e];t.push(i.leftSE),t.push(i.rightSE)}return t}}class h_{constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new $p(t[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let n=1,i=t.length;n<i;n++){const s=new $p(t[n],this,!1);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}this.multiPoly=e}getSweepEvents(){const t=this.exteriorRing.getSweepEvents();for(let e=0,n=this.interiorRings.length;e<n;e++){const i=this.interiorRings[e].getSweepEvents();for(let s=0,a=i.length;s<a;s++)t.push(i[s])}return t}}class jp{constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof t[0][0][0]=="number"&&(t=[t])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(let n=0,i=t.length;n<i;n++){const s=new h_(t[n],this);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}this.isSubject=e}getSweepEvents(){const t=[];for(let e=0,n=this.polys.length;e<n;e++){const i=this.polys[e].getSweepEvents();for(let s=0,a=i.length;s<a;s++)t.push(i[s])}return t}}class nc{static factory(t){const e=[];for(let n=0,i=t.length;n<i;n++){const s=t[n];if(!s.isInResult()||s.ringOut)continue;let a=null,o=s.leftSE,l=s.rightSE;const u=[o],c=o.point,h=[];for(;a=o,o=l,u.push(o),o.point!==c;)for(;;){const f=o.getAvailableLinkedEvents();if(f.length===0){const _=u[0].point,E=u[u.length-1].point;throw new Error(`Unable to complete output ring starting at [${_.x}, ${_.y}]. Last matching segment found ends at [${E.x}, ${E.y}].`)}if(f.length===1){l=f[0].otherSE;break}let g=null;for(let _=0,E=h.length;_<E;_++)if(h[_].point===o.point){g=_;break}if(g!==null){const _=h.splice(g)[0],E=u.splice(_.index);E.unshift(E[0].otherSE),e.push(new nc(E.reverse()));continue}h.push({index:u.length,point:o.point});const m=o.getLeftmostComparator(a);l=f.sort(m)[0].otherSE;break}e.push(new nc(u))}return e}constructor(t){this.events=t;for(let e=0,n=t.length;e<n;e++)t[e].segment.ringOut=this;this.poly=null}getGeom(){let t=this.events[0].point;const e=[t];for(let u=1,c=this.events.length-1;u<c;u++){const h=this.events[u].point,f=this.events[u+1].point;Qp(h,t,f)!==0&&(e.push(h),t=h)}if(e.length===1)return null;const n=e[0],i=e[1];Qp(n,t,i)===0&&e.shift(),e.push(e[0]);const s=this.isExteriorRing()?1:-1,a=this.isExteriorRing()?0:e.length-1,o=this.isExteriorRing()?e.length:-1,l=[];for(let u=a;u!=o;u+=s)l.push([e[u].x,e[u].y]);return l}isExteriorRing(){if(this._isExteriorRing===void 0){const t=this.enclosingRing();this._isExteriorRing=t?!t.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let t=this.events[0];for(let i=1,s=this.events.length;i<s;i++){const a=this.events[i];zn.compare(t,a)>0&&(t=a)}let e=t.segment.prevInResult(),n=e?e.prevInResult():null;for(;;){if(!e)return null;if(!n)return e.ringOut;if(n.ringOut!==e.ringOut)return n.ringOut.enclosingRing()!==e.ringOut?e.ringOut:e.ringOut.enclosingRing();e=n.prevInResult(),n=e?e.prevInResult():null}}}class tg{constructor(t){this.exteriorRing=t,t.poly=this,this.interiorRings=[]}addInterior(t){this.interiorRings.push(t),t.poly=this}getGeom(){const t=[this.exteriorRing.getGeom()];if(t[0]===null)return null;for(let e=0,n=this.interiorRings.length;e<n;e++){const i=this.interiorRings[e].getGeom();i!==null&&t.push(i)}return t}}class c_{constructor(t){this.rings=t,this.polys=this._composePolys(t)}getGeom(){const t=[];for(let e=0,n=this.polys.length;e<n;e++){const i=this.polys[e].getGeom();i!==null&&t.push(i)}return t}_composePolys(t){const e=[];for(let n=0,i=t.length;n<i;n++){const s=t[n];if(!s.poly)if(s.isExteriorRing())e.push(new tg(s));else{const a=s.enclosingRing();a.poly||e.push(new tg(a)),a.poly.addInterior(s)}}return e}}class f_{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Bs.compare;this.queue=t,this.tree=new Df(e),this.segments=[]}process(t){const e=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),n;const i=t.isLeft?this.tree.add(e):this.tree.find(e);if(!i)throw new Error(`Unable to find segment #${e.id} [${e.leftSE.point.x}, ${e.leftSE.point.y}] -> [${e.rightSE.point.x}, ${e.rightSE.point.y}] in SweepLine tree.`);let s=i,a=i,o,l;for(;o===void 0;)s=this.tree.prev(s),s===null?o=null:s.key.consumedBy===void 0&&(o=s.key);for(;l===void 0;)a=this.tree.next(a),a===null?l=null:a.key.consumedBy===void 0&&(l=a.key);if(t.isLeft){let u=null;if(o){const h=o.getIntersection(e);if(h!==null&&(e.isAnEndpoint(h)||(u=h),!o.isAnEndpoint(h))){const f=this._splitSafely(o,h);for(let g=0,m=f.length;g<m;g++)n.push(f[g])}}let c=null;if(l){const h=l.getIntersection(e);if(h!==null&&(e.isAnEndpoint(h)||(c=h),!l.isAnEndpoint(h))){const f=this._splitSafely(l,h);for(let g=0,m=f.length;g<m;g++)n.push(f[g])}}if(u!==null||c!==null){let h=null;u===null?h=c:c===null?h=u:h=zn.comparePoints(u,c)<=0?u:c,this.queue.remove(e.rightSE),n.push(e.rightSE);const f=e.split(h);for(let g=0,m=f.length;g<m;g++)n.push(f[g])}n.length>0?(this.tree.remove(e),n.push(t)):(this.segments.push(e),e.prev=o)}else{if(o&&l){const u=o.getIntersection(l);if(u!==null){if(!o.isAnEndpoint(u)){const c=this._splitSafely(o,u);for(let h=0,f=c.length;h<f;h++)n.push(c[h])}if(!l.isAnEndpoint(u)){const c=this._splitSafely(l,u);for(let h=0,f=c.length;h<f;h++)n.push(c[h])}}}this.tree.remove(e)}return n}_splitSafely(t,e){this.tree.remove(t);const n=t.rightSE;this.queue.remove(n);const i=t.split(e);return i.push(n),t.consumedBy===void 0&&this.tree.add(t),i}}const eg=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,d_=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class p_{run(t,e,n){fi.type=t,Hu.reset();const i=[new jp(e,!0)];for(let h=0,f=n.length;h<f;h++)i.push(new jp(n[h],!1));if(fi.numMultiPolys=i.length,fi.type==="difference"){const h=i[0];let f=1;for(;f<i.length;)Rf(i[f].bbox,h.bbox)!==null?f++:i.splice(f,1)}if(fi.type==="intersection")for(let h=0,f=i.length;h<f;h++){const g=i[h];for(let m=h+1,_=i.length;m<_;m++)if(Rf(g.bbox,i[m].bbox)===null)return[]}const s=new Df(zn.compare);for(let h=0,f=i.length;h<f;h++){const g=i[h].getSweepEvents();for(let m=0,_=g.length;m<_;m++)if(s.insert(g[m]),s.size>eg)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const a=new f_(s);let o=s.size,l=s.pop();for(;l;){const h=l.key;if(s.size===o){const g=h.segment;throw new Error(`Unable to pop() ${h.isLeft?"left":"right"} SweepEvent [${h.point.x}, ${h.point.y}] from segment #${g.id} [${g.leftSE.point.x}, ${g.leftSE.point.y}] -> [${g.rightSE.point.x}, ${g.rightSE.point.y}] from queue.`)}if(s.size>eg)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(a.segments.length>d_)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const f=a.process(h);for(let g=0,m=f.length;g<m;g++){const _=f[g];_.consumedBy===void 0&&s.insert(_)}o=s.size,l=s.pop()}Hu.reset();const u=nc.factory(a.segments);return new c_(u).getGeom()}}const fi=new p_;var Ff={union:function(r){for(var t=arguments.length,e=new Array(t>1?t-1:0),n=1;n<t;n++)e[n-1]=arguments[n];return fi.run("union",r,e)},intersection:function(r){for(var t=arguments.length,e=new Array(t>1?t-1:0),n=1;n<t;n++)e[n-1]=arguments[n];return fi.run("intersection",r,e)},xor:function(r){for(var t=arguments.length,e=new Array(t>1?t-1:0),n=1;n<t;n++)e[n-1]=arguments[n];return fi.run("xor",r,e)},difference:function(r){for(var t=arguments.length,e=new Array(t>1?t-1:0),n=1;n<t;n++)e[n-1]=arguments[n];return fi.run("difference",r,e)}};function g_(r,t){var e=_n(r),n=_n(t),i=r.properties||{},s=Ff.difference(e.coordinates,n.coordinates);return s.length===0?null:s.length===1?Cr(s[0],i):vf(s,i)}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(t){if(this===void 0||this===null)throw new TypeError(this+" is not an object");var e=Object(this),n=Math.max(Math.min(e.length,9007199254740991),0)||0,i=1 in arguments&&parseInt(Number(arguments[1]),10)||0;i=i<0?Math.max(n+i,0):Math.min(i,n);var s=2 in arguments&&arguments[2]!==void 0?parseInt(Number(arguments[2]),10)||0:n;for(s=s<0?Math.max(n+arguments[2],0):Math.min(s,n);i<s;)e[i]=t,++i;return e},writable:!0}),Number.isFinite=Number.isFinite||function(r){return typeof r=="number"&&isFinite(r)},Number.isInteger=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(r){return r!==r},Math.trunc=Math.trunc||function(r){return r<0?Math.ceil(r):Math.floor(r)};var La=function(){};La.prototype.interfaces_=function(){return[]},La.prototype.getClass=function(){return La},La.prototype.equalsWithTolerance=function(t,e,n){return Math.abs(t-e)<=n};var oe=function(r){function t(e){r.call(this,e),this.name="IllegalArgumentException",this.message=e,this.stack=new r().stack}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t}(Error),wt=function(){},rg={MAX_VALUE:{configurable:!0}};wt.isNaN=function(t){return Number.isNaN(t)},wt.doubleToLongBits=function(t){return t},wt.longBitsToDouble=function(t){return t},wt.isInfinite=function(t){return!Number.isFinite(t)},rg.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(wt,rg);var Zr=function(){},ic=function(){},Jl=function(){};function $r(){}var L=function r(){if(this.x=null,this.y=null,this.z=null,arguments.length===0)this.x=0,this.y=0,this.z=r.NULL_ORDINATE;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.z=t.z}else arguments.length===2?(this.x=arguments[0],this.y=arguments[1],this.z=r.NULL_ORDINATE):arguments.length===3&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},Ra={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};L.prototype.setOrdinate=function(t,e){switch(t){case L.X:this.x=e;break;case L.Y:this.y=e;break;case L.Z:this.z=e;break;default:throw new oe("Invalid ordinate index: "+t)}},L.prototype.equals2D=function(){if(arguments.length===1){var t=arguments[0];return!(this.x!==t.x||this.y!==t.y)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return!(!La.equalsWithTolerance(this.x,e.x,n)||!La.equalsWithTolerance(this.y,e.y,n))}},L.prototype.getOrdinate=function(t){switch(t){case L.X:return this.x;case L.Y:return this.y;case L.Z:return this.z}throw new oe("Invalid ordinate index: "+t)},L.prototype.equals3D=function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||wt.isNaN(this.z))&&wt.isNaN(t.z)},L.prototype.equals=function(t){return t instanceof L?this.equals2D(t):!1},L.prototype.equalInZ=function(t,e){return La.equalsWithTolerance(this.z,t.z,e)},L.prototype.compareTo=function(t){var e=t;return this.x<e.x?-1:this.x>e.x?1:this.y<e.y?-1:this.y>e.y?1:0},L.prototype.clone=function(){},L.prototype.copy=function(){return new L(this)},L.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},L.prototype.distance3D=function(t){var e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return Math.sqrt(e*e+n*n+i*i)},L.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},L.prototype.hashCode=function(){var t=17;return t=37*t+L.hashCode(this.x),t=37*t+L.hashCode(this.y),t},L.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},L.prototype.interfaces_=function(){return[Zr,ic,$r]},L.prototype.getClass=function(){return L},L.hashCode=function(){if(arguments.length===1){var t=arguments[0],e=wt.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},Ra.DimensionalComparator.get=function(){return vs},Ra.serialVersionUID.get=function(){return 6683108902428367e3},Ra.NULL_ORDINATE.get=function(){return wt.NaN},Ra.X.get=function(){return 0},Ra.Y.get=function(){return 1},Ra.Z.get=function(){return 2},Object.defineProperties(L,Ra);var vs=function(t){if(this._dimensionsToTest=2,arguments.length!==0){if(arguments.length===1){var e=arguments[0];if(e!==2&&e!==3)throw new oe("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}}};vs.prototype.compare=function(t,e){var n=t,i=e,s=vs.compare(n.x,i.x);if(s!==0)return s;var a=vs.compare(n.y,i.y);if(a!==0)return a;if(this._dimensionsToTest<=2)return 0;var o=vs.compare(n.z,i.z);return o},vs.prototype.interfaces_=function(){return[Jl]},vs.prototype.getClass=function(){return vs},vs.compare=function(t,e){return t<e?-1:t>e?1:wt.isNaN(t)?wt.isNaN(e)?0:-1:wt.isNaN(e)?1:0};var Kl=function(){};Kl.prototype.create=function(){},Kl.prototype.interfaces_=function(){return[]},Kl.prototype.getClass=function(){return Kl};var F=function(){},Xu={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};F.prototype.interfaces_=function(){return[]},F.prototype.getClass=function(){return F},F.toLocationSymbol=function(t){switch(t){case F.EXTERIOR:return"e";case F.BOUNDARY:return"b";case F.INTERIOR:return"i";case F.NONE:return"-"}throw new oe("Unknown location value: "+t)},Xu.INTERIOR.get=function(){return 0},Xu.BOUNDARY.get=function(){return 1},Xu.EXTERIOR.get=function(){return 2},Xu.NONE.get=function(){return-1},Object.defineProperties(F,Xu);var _t=function(r,t){return r.interfaces_&&r.interfaces_().indexOf(t)>-1},kr=function(){},ng={LOG_10:{configurable:!0}};kr.prototype.interfaces_=function(){return[]},kr.prototype.getClass=function(){return kr},kr.log10=function(t){var e=Math.log(t);return wt.isInfinite(e)||wt.isNaN(e)?e:e/kr.LOG_10},kr.min=function(t,e,n,i){var s=t;return e<s&&(s=e),n<s&&(s=n),i<s&&(s=i),s},kr.clamp=function(){if(typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1],n=arguments[2];return t<e?e:t>n?n:t}else if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var i=arguments[0],s=arguments[1],a=arguments[2];return i<s?s:i>a?a:i}},kr.wrap=function(t,e){return t<0?e- -t%e:t%e},kr.max=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],n=arguments[2],i=t;return e>i&&(i=e),n>i&&(i=n),i}else if(arguments.length===4){var s=arguments[0],a=arguments[1],o=arguments[2],l=arguments[3],u=s;return a>u&&(u=a),o>u&&(u=o),l>u&&(u=l),u}},kr.average=function(t,e){return(t+e)/2},ng.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(kr,ng);var Vn=function(t){this.str=t};Vn.prototype.append=function(t){this.str+=t},Vn.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},Vn.prototype.toString=function(t){return this.str};var Un=function(t){this.value=t};Un.prototype.intValue=function(){return this.value},Un.prototype.compareTo=function(t){return this.value<t?-1:this.value>t?1:0},Un.isNaN=function(t){return Number.isNaN(t)};var Yu=function(){};Yu.isWhitespace=function(t){return t<=32&&t>=0||t===127},Yu.toUpperCase=function(t){return t.toUpperCase()};var q=function r(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this.init(t)}else if(arguments[0]instanceof r){var e=arguments[0];this.init(e)}else if(typeof arguments[0]=="string"){var n=arguments[0];r.call(this,r.parse(n))}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.init(i,s)}},wn={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};q.prototype.le=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<=t._lo},q.prototype.extractSignificantDigits=function(t,e){var n=this.abs(),i=q.magnitude(n._hi),s=q.TEN.pow(i);n=n.divide(s),n.gt(q.TEN)?(n=n.divide(q.TEN),i+=1):n.lt(q.ONE)&&(n=n.multiply(q.TEN),i-=1);for(var a=i+1,o=new Vn,l=q.MAX_PRINT_DIGITS-1,u=0;u<=l;u++){t&&u===a&&o.append(".");var c=Math.trunc(n._hi);if(c<0)break;var h=!1,f=0;c>9?(h=!0,f="9"):f="0"+c,o.append(f),n=n.subtract(q.valueOf(c)).multiply(q.TEN),h&&n.selfAdd(q.TEN);var g=!0,m=q.magnitude(n._hi);if(m<0&&Math.abs(m)>=l-u&&(g=!1),!g)break}return e[0]=i,o.toString()},q.prototype.sqr=function(){return this.multiply(this)},q.prototype.doubleValue=function(){return this._hi+this._lo},q.prototype.subtract=function(){if(arguments[0]instanceof q){var t=arguments[0];return this.add(t.negate())}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.add(-e)}},q.prototype.equals=function(){if(arguments.length===1){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},q.prototype.isZero=function(){return this._hi===0&&this._lo===0},q.prototype.selfSubtract=function(){if(arguments[0]instanceof q){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},q.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},q.prototype.min=function(t){return this.le(t)?this:t},q.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof q){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfDivide(e,0)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=null,a=null,o=null,l=null,u=null,c=null,h=null,f=null;return u=this._hi/n,c=q.SPLIT*u,s=c-u,f=q.SPLIT*n,s=c-s,a=u-s,o=f-n,h=u*n,o=f-o,l=n-o,f=s*o-h+s*l+a*o+a*l,c=(this._hi-h-f+this._lo-u*i)/n,f=u+c,this._hi=f,this._lo=u-f+c,this}},q.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},q.prototype.divide=function(){if(arguments[0]instanceof q){var t=arguments[0],e=null,n=null,i=null,s=null,a=null,o=null,l=null,u=null;a=this._hi/t._hi,o=q.SPLIT*a,e=o-a,u=q.SPLIT*t._hi,e=o-e,n=a-e,i=u-t._hi,l=a*t._hi,i=u-i,s=t._hi-i,u=e*i-l+e*s+n*i+n*s,o=(this._hi-l-u+this._lo-a*t._lo)/t._hi,u=a+o;var c=u,h=a-u+o;return new q(c,h)}else if(typeof arguments[0]=="number"){var f=arguments[0];return wt.isNaN(f)?q.createNaN():q.copy(this).selfDivide(f,0)}},q.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},q.prototype.pow=function(t){if(t===0)return q.valueOf(1);var e=new q(this),n=q.valueOf(1),i=Math.abs(t);if(i>1)for(;i>0;)i%2===1&&n.selfMultiply(e),i/=2,i>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n},q.prototype.ceil=function(){if(this.isNaN())return q.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new q(t,e)},q.prototype.compareTo=function(t){var e=t;return this._hi<e._hi?-1:this._hi>e._hi?1:this._lo<e._lo?-1:this._lo>e._lo?1:0},q.prototype.rint=function(){if(this.isNaN())return this;var t=this.add(.5);return t.floor()},q.prototype.setValue=function(){if(arguments[0]instanceof q){var t=arguments[0];return this.init(t),this}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.init(e),this}},q.prototype.max=function(t){return this.ge(t)?this:t},q.prototype.sqrt=function(){if(this.isZero())return q.valueOf(0);if(this.isNegative())return q.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=q.valueOf(e),i=this.subtract(n.sqr()),s=i._hi*(t*.5);return n.add(s)},q.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof q){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0],n=null,i=null,s=null,a=null,o=null,l=null;return s=this._hi+e,o=s-this._hi,a=s-o,a=e-o+(this._hi-a),l=a+this._lo,n=s+l,i=l+(s-n),this._hi=n+i,this._lo=i+(n-this._hi),this}}else if(arguments.length===2){var u=arguments[0],c=arguments[1],h=null,f=null,g=null,m=null,_=null,E=null,M=null,y=null;_=this._hi+u,g=this._lo+c,M=_-this._hi,y=g-this._lo,E=_-M,m=g-y,E=u-M+(this._hi-E),m=c-y+(this._lo-m),M=E+g,h=_+M,f=M+(_-h),M=m+f;var w=h+M,v=M+(h-w);return this._hi=w,this._lo=v,this}},q.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof q){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfMultiply(e,0)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=null,a=null,o=null,l=null,u=null,c=null;u=q.SPLIT*this._hi,s=u-this._hi,c=q.SPLIT*n,s=u-s,a=this._hi-s,o=c-n,u=this._hi*n,o=c-o,l=n-o,c=s*o-u+s*l+a*o+a*l+(this._hi*i+this._lo*n);var h=u+c;s=u-h;var f=c+s;return this._hi=h,this._lo=f,this}},q.prototype.selfSqr=function(){return this.selfMultiply(this)},q.prototype.floor=function(){if(this.isNaN())return q.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new q(t,e)},q.prototype.negate=function(){return this.isNaN()?this:new q(-this._hi,-this._lo)},q.prototype.clone=function(){},q.prototype.multiply=function(){if(arguments[0]instanceof q){var t=arguments[0];return t.isNaN()?q.createNaN():q.copy(this).selfMultiply(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return wt.isNaN(e)?q.createNaN():q.copy(this).selfMultiply(e,0)}},q.prototype.isNaN=function(){return wt.isNaN(this._hi)},q.prototype.intValue=function(){return Math.trunc(this._hi)},q.prototype.toString=function(){var t=q.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},q.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),i=e[0]+1,s=n;if(n.charAt(0)===".")s="0"+n;else if(i<0)s="0."+q.stringOfChar("0",-i)+n;else if(n.indexOf(".")===-1){var a=i-n.length,o=q.stringOfChar("0",a);s=n+o+".0"}return this.isNegative()?"-"+s:s},q.prototype.reciprocal=function(){var t=null,e=null,n=null,i=null,s=null,a=null,o=null,l=null;s=1/this._hi,a=q.SPLIT*s,t=a-s,l=q.SPLIT*this._hi,t=a-t,e=s-t,n=l-this._hi,o=s*this._hi,n=l-n,i=this._hi-n,l=t*n-o+t*i+e*n+e*i,a=(1-o-l-s*this._lo)/this._hi;var u=s+a,c=s-u+a;return new q(u,c)},q.prototype.toSciNotation=function(){if(this.isZero())return q.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),i=q.SCI_NOT_EXPONENT_CHAR+e[0];if(n.charAt(0)==="0")throw new Error("Found leading zero: "+n);var s="";n.length>1&&(s=n.substring(1));var a=n.charAt(0)+"."+s;return this.isNegative()?"-"+a+i:a+i},q.prototype.abs=function(){return this.isNaN()?q.NaN:this.isNegative()?this.negate():new q(this)},q.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0},q.prototype.lt=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<t._lo},q.prototype.add=function(){if(arguments[0]instanceof q){var t=arguments[0];return q.copy(this).selfAdd(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return q.copy(this).selfAdd(e)}},q.prototype.init=function(){if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this._hi=t,this._lo=0}else if(arguments[0]instanceof q){var e=arguments[0];this._hi=e._hi,this._lo=e._lo}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this._hi=n,this._lo=i}},q.prototype.gt=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>t._lo},q.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0},q.prototype.trunc=function(){return this.isNaN()?q.NaN:this.isPositive()?this.floor():this.ceil()},q.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},q.prototype.interfaces_=function(){return[$r,Zr,ic]},q.prototype.getClass=function(){return q},q.sqr=function(t){return q.valueOf(t).selfMultiply(t)},q.valueOf=function(){if(typeof arguments[0]=="string"){var t=arguments[0];return q.parse(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return new q(e)}},q.sqrt=function(t){return q.valueOf(t).sqrt()},q.parse=function(t){for(var e=0,n=t.length;Yu.isWhitespace(t.charAt(e));)e++;var i=!1;if(e<n){var s=t.charAt(e);(s==="-"||s==="+")&&(e++,s==="-"&&(i=!0))}for(var a=new q,o=0,l=0,u=0;!(e>=n);){var c=t.charAt(e);if(e++,Yu.isDigit(c)){var h=c-"0";a.selfMultiply(q.TEN),a.selfAdd(h),o++;continue}if(c==="."){l=o;continue}if(c==="e"||c==="E"){var f=t.substring(e);try{u=Un.parseInt(f)}catch(M){throw M instanceof Error?new Error("Invalid exponent "+f+" in string "+t):M}finally{}break}throw new Error("Unexpected character '"+c+"' at position "+e+" in string "+t)}var g=a,m=o-l-u;if(m===0)g=a;else if(m>0){var _=q.TEN.pow(m);g=a.divide(_)}else if(m<0){var E=q.TEN.pow(-m);g=a.multiply(E)}return i?g.negate():g},q.createNaN=function(){return new q(wt.NaN,wt.NaN)},q.copy=function(t){return new q(t)},q.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),i=Math.trunc(Math.floor(n)),s=Math.pow(10,i);return s*10<=e&&(i+=1),i},q.stringOfChar=function(t,e){for(var n=new Vn,i=0;i<e;i++)n.append(t);return n.toString()},wn.PI.get=function(){return new q(3.141592653589793,12246467991473532e-32)},wn.TWO_PI.get=function(){return new q(6.283185307179586,24492935982947064e-32)},wn.PI_2.get=function(){return new q(1.5707963267948966,6123233995736766e-32)},wn.E.get=function(){return new q(2.718281828459045,14456468917292502e-32)},wn.NaN.get=function(){return new q(wt.NaN,wt.NaN)},wn.EPS.get=function(){return 123259516440783e-46},wn.SPLIT.get=function(){return 134217729},wn.MAX_PRINT_DIGITS.get=function(){return 32},wn.TEN.get=function(){return q.valueOf(10)},wn.ONE.get=function(){return q.valueOf(1)},wn.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},wn.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(q,wn);var cr=function(){},ig={DP_SAFE_EPSILON:{configurable:!0}};cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr},cr.orientationIndex=function(t,e,n){var i=cr.orientationIndexFilter(t,e,n);if(i<=1)return i;var s=q.valueOf(e.x).selfAdd(-t.x),a=q.valueOf(e.y).selfAdd(-t.y),o=q.valueOf(n.x).selfAdd(-e.x),l=q.valueOf(n.y).selfAdd(-e.y);return s.selfMultiply(l).selfSubtract(a.selfMultiply(o)).signum()},cr.signOfDet2x2=function(t,e,n,i){var s=t.multiply(i).selfSubtract(e.multiply(n));return s.signum()},cr.intersection=function(t,e,n,i){var s=q.valueOf(i.y).selfSubtract(n.y).selfMultiply(q.valueOf(e.x).selfSubtract(t.x)),a=q.valueOf(i.x).selfSubtract(n.x).selfMultiply(q.valueOf(e.y).selfSubtract(t.y)),o=s.subtract(a),l=q.valueOf(i.x).selfSubtract(n.x).selfMultiply(q.valueOf(t.y).selfSubtract(n.y)),u=q.valueOf(i.y).selfSubtract(n.y).selfMultiply(q.valueOf(t.x).selfSubtract(n.x)),c=l.subtract(u),h=c.selfDivide(o).doubleValue(),f=q.valueOf(t.x).selfAdd(q.valueOf(e.x).selfSubtract(t.x).selfMultiply(h)).doubleValue(),g=q.valueOf(e.x).selfSubtract(t.x).selfMultiply(q.valueOf(t.y).selfSubtract(n.y)),m=q.valueOf(e.y).selfSubtract(t.y).selfMultiply(q.valueOf(t.x).selfSubtract(n.x)),_=g.subtract(m),E=_.selfDivide(o).doubleValue(),M=q.valueOf(n.y).selfAdd(q.valueOf(i.y).selfSubtract(n.y).selfMultiply(E)).doubleValue();return new L(f,M)},cr.orientationIndexFilter=function(t,e,n){var i=null,s=(t.x-n.x)*(e.y-n.y),a=(t.y-n.y)*(e.x-n.x),o=s-a;if(s>0){if(a<=0)return cr.signum(o);i=s+a}else if(s<0){if(a>=0)return cr.signum(o);i=-s-a}else return cr.signum(o);var l=cr.DP_SAFE_EPSILON*i;return o>=l||-o>=l?cr.signum(o):2},cr.signum=function(t){return t>0?1:t<0?-1:0},ig.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(cr,ig);var Ft=function(){},Ju={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};Ju.X.get=function(){return 0},Ju.Y.get=function(){return 1},Ju.Z.get=function(){return 2},Ju.M.get=function(){return 3},Ft.prototype.setOrdinate=function(t,e,n){},Ft.prototype.size=function(){},Ft.prototype.getOrdinate=function(t,e){},Ft.prototype.getCoordinate=function(){},Ft.prototype.getCoordinateCopy=function(t){},Ft.prototype.getDimension=function(){},Ft.prototype.getX=function(t){},Ft.prototype.clone=function(){},Ft.prototype.expandEnvelope=function(t){},Ft.prototype.copy=function(){},Ft.prototype.getY=function(t){},Ft.prototype.toCoordinateArray=function(){},Ft.prototype.interfaces_=function(){return[ic]},Ft.prototype.getClass=function(){return Ft},Object.defineProperties(Ft,Ju);var sg=function(){},Ql=function(r){function t(){r.call(this,"Projective point not representable on the Cartesian plane.")}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(sg),Ve=function(){};Ve.arraycopy=function(t,e,n,i,s){for(var a=0,o=e;o<e+s;o++)n[i+a]=t[o],a++},Ve.getProperty=function(t){return{"line.separator":`
|
|
25
|
-
`}[t]};var En=function r(){if(this.x=null,this.y=null,this.w=null,arguments.length===0)this.x=0,this.y=0,this.w=1;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.w=1}else if(arguments.length===2){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var e=arguments[0],n=arguments[1];this.x=e,this.y=n,this.w=1}else if(arguments[0]instanceof r&&arguments[1]instanceof r){var i=arguments[0],s=arguments[1];this.x=i.y*s.w-s.y*i.w,this.y=s.x*i.w-i.x*s.w,this.w=i.x*s.y-s.x*i.y}else if(arguments[0]instanceof L&&arguments[1]instanceof L){var a=arguments[0],o=arguments[1];this.x=a.y-o.y,this.y=o.x-a.x,this.w=a.x*o.y-o.x*a.y}}else if(arguments.length===3){var l=arguments[0],u=arguments[1],c=arguments[2];this.x=l,this.y=u,this.w=c}else if(arguments.length===4){var h=arguments[0],f=arguments[1],g=arguments[2],m=arguments[3],_=h.y-f.y,E=f.x-h.x,M=h.x*f.y-f.x*h.y,y=g.y-m.y,w=m.x-g.x,v=g.x*m.y-m.x*g.y;this.x=E*v-w*M,this.y=y*M-_*v,this.w=_*w-y*E}};En.prototype.getY=function(){var t=this.y/this.w;if(wt.isNaN(t)||wt.isInfinite(t))throw new Ql;return t},En.prototype.getX=function(){var t=this.x/this.w;if(wt.isNaN(t)||wt.isInfinite(t))throw new Ql;return t},En.prototype.getCoordinate=function(){var t=new L;return t.x=this.getX(),t.y=this.getY(),t},En.prototype.interfaces_=function(){return[]},En.prototype.getClass=function(){return En},En.intersection=function(t,e,n,i){var s=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,l=n.y-i.y,u=i.x-n.x,c=n.x*i.y-i.x*n.y,h=a*c-u*o,f=l*o-s*c,g=s*u-l*a,m=h/g,_=f/g;if(wt.isNaN(m)||wt.isInfinite(m)||wt.isNaN(_)||wt.isInfinite(_))throw new Ql;return new L(m,_)};var dt=function r(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,arguments.length===0)this.init();else if(arguments.length===1){if(arguments[0]instanceof L){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof r){var e=arguments[0];this.init(e)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.init(n.x,i.x,n.y,i.y)}else if(arguments.length===4){var s=arguments[0],a=arguments[1],o=arguments[2],l=arguments[3];this.init(s,a,o,l)}},ag={serialVersionUID:{configurable:!0}};dt.prototype.getArea=function(){return this.getWidth()*this.getHeight()},dt.prototype.equals=function(t){if(!(t instanceof dt))return!1;var e=t;return this.isNull()?e.isNull():this._maxx===e.getMaxX()&&this._maxy===e.getMaxY()&&this._minx===e.getMinX()&&this._miny===e.getMinY()},dt.prototype.intersection=function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new dt;var e=this._minx>t._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny,i=this._maxx<t._maxx?this._maxx:t._maxx,s=this._maxy<t._maxy?this._maxy:t._maxy;return new dt(e,i,n,s)},dt.prototype.isNull=function(){return this._maxx<this._minx},dt.prototype.getMaxX=function(){return this._maxx},dt.prototype.covers=function(){if(arguments.length===1){if(arguments[0]instanceof L){var t=arguments[0];return this.covers(t.x,t.y)}else if(arguments[0]instanceof dt){var e=arguments[0];return this.isNull()||e.isNull()?!1:e.getMinX()>=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.isNull()?!1:n>=this._minx&&n<=this._maxx&&i>=this._miny&&i<=this._maxy}},dt.prototype.intersects=function(){if(arguments.length===1){if(arguments[0]instanceof dt){var t=arguments[0];return this.isNull()||t.isNull()?!1:!(t._minx>this._maxx||t._maxx<this._minx||t._miny>this._maxy||t._maxy<this._miny)}else if(arguments[0]instanceof L){var e=arguments[0];return this.intersects(e.x,e.y)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.isNull()?!1:!(n>this._maxx||n<this._minx||i>this._maxy||i<this._miny)}},dt.prototype.getMinY=function(){return this._miny},dt.prototype.getMinX=function(){return this._minx},dt.prototype.expandToInclude=function(){if(arguments.length===1){if(arguments[0]instanceof L){var t=arguments[0];this.expandToInclude(t.x,t.y)}else if(arguments[0]instanceof dt){var e=arguments[0];if(e.isNull())return null;this.isNull()?(this._minx=e.getMinX(),this._maxx=e.getMaxX(),this._miny=e.getMinY(),this._maxy=e.getMaxY()):(e._minx<this._minx&&(this._minx=e._minx),e._maxx>this._maxx&&(this._maxx=e._maxx),e._miny<this._miny&&(this._miny=e._miny),e._maxy>this._maxy&&(this._maxy=e._maxy))}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=i,this._maxy=i):(n<this._minx&&(this._minx=n),n>this._maxx&&(this._maxx=n),i<this._miny&&(this._miny=i),i>this._maxy&&(this._maxy=i))}},dt.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t<e?t:e},dt.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},dt.prototype.compareTo=function(t){var e=t;return this.isNull()?e.isNull()?0:-1:e.isNull()?1:this._minx<e._minx?-1:this._minx>e._minx?1:this._miny<e._miny?-1:this._miny>e._miny?1:this._maxx<e._maxx?-1:this._maxx>e._maxx?1:this._maxy<e._maxy?-1:this._maxy>e._maxy?1:0},dt.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},dt.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},dt.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},dt.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},dt.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},dt.prototype.expandBy=function(){if(arguments.length===1){var t=arguments[0];this.expandBy(t,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},dt.prototype.contains=function(){if(arguments.length===1){if(arguments[0]instanceof dt){var t=arguments[0];return this.covers(t)}else if(arguments[0]instanceof L){var e=arguments[0];return this.covers(e)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.covers(n,i)}},dt.prototype.centre=function(){return this.isNull()?null:new L((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},dt.prototype.init=function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof L){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof dt){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.init(n.x,i.x,n.y,i.y)}else if(arguments.length===4){var s=arguments[0],a=arguments[1],o=arguments[2],l=arguments[3];s<a?(this._minx=s,this._maxx=a):(this._minx=a,this._maxx=s),o<l?(this._miny=o,this._maxy=l):(this._miny=l,this._maxy=o)}},dt.prototype.getMaxY=function(){return this._maxy},dt.prototype.distance=function(t){if(this.intersects(t))return 0;var e=0;this._maxx<t._minx?e=t._minx-this._maxx:this._minx>t._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxy<t._miny?n=t._miny-this._maxy:this._miny>t._maxy&&(n=this._miny-t._maxy),e===0?n:n===0?e:Math.sqrt(e*e+n*n)},dt.prototype.hashCode=function(){var t=17;return t=37*t+L.hashCode(this._minx),t=37*t+L.hashCode(this._maxx),t=37*t+L.hashCode(this._miny),t=37*t+L.hashCode(this._maxy),t},dt.prototype.interfaces_=function(){return[Zr,$r]},dt.prototype.getClass=function(){return dt},dt.intersects=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.x<e.x?t.x:e.x)&&n.x<=(t.x>e.x?t.x:e.x)&&n.y>=(t.y<e.y?t.y:e.y)&&n.y<=(t.y>e.y?t.y:e.y)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],a=arguments[2],o=arguments[3],l=Math.min(a.x,o.x),u=Math.max(a.x,o.x),c=Math.min(i.x,s.x),h=Math.max(i.x,s.x);return!(c>u||h<l||(l=Math.min(a.y,o.y),u=Math.max(a.y,o.y),c=Math.min(i.y,s.y),h=Math.max(i.y,s.y),c>u)||h<l)}},ag.serialVersionUID.get=function(){return 5873921885273102e3},Object.defineProperties(dt,ag);var qn={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,emptyTypeStr:/^\s*(\w+)\s*EMPTY\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},sc=function(t){this.geometryFactory=t||new Dt};sc.prototype.read=function(t){var e,n,i;t=t.replace(/[\n\r]/g," ");var s=qn.typeStr.exec(t);if(t.search("EMPTY")!==-1&&(s=qn.emptyTypeStr.exec(t),s[2]=void 0),s&&(n=s[1].toLowerCase(),i=s[2],Bl[n]&&(e=Bl[n].apply(this,[i]))),e===void 0)throw new Error("Could not parse WKT "+t);return e},sc.prototype.write=function(t){return this.extractGeometry(t)},sc.prototype.extractGeometry=function(t){var e=t.getGeometryType().toLowerCase();if(!ki[e])return null;var n=e.toUpperCase(),i;return t.isEmpty()?i=n+" EMPTY":i=n+"("+ki[e].apply(this,[t])+")",i};var ki={coordinate:function(t){return t.x+" "+t.y},point:function(t){return ki.coordinate.call(this,t._coordinates._coordinates[0])},multipoint:function(t){for(var e=this,n=[],i=0,s=t._geometries.length;i<s;++i)n.push("("+ki.point.apply(e,[t._geometries[i]])+")");return n.join(",")},linestring:function(t){for(var e=this,n=[],i=0,s=t._points._coordinates.length;i<s;++i)n.push(ki.coordinate.apply(e,[t._points._coordinates[i]]));return n.join(",")},linearring:function(t){for(var e=this,n=[],i=0,s=t._points._coordinates.length;i<s;++i)n.push(ki.coordinate.apply(e,[t._points._coordinates[i]]));return n.join(",")},multilinestring:function(t){for(var e=this,n=[],i=0,s=t._geometries.length;i<s;++i)n.push("("+ki.linestring.apply(e,[t._geometries[i]])+")");return n.join(",")},polygon:function(t){var e=this,n=[];n.push("("+ki.linestring.apply(this,[t._shell])+")");for(var i=0,s=t._holes.length;i<s;++i)n.push("("+ki.linestring.apply(e,[t._holes[i]])+")");return n.join(",")},multipolygon:function(t){for(var e=this,n=[],i=0,s=t._geometries.length;i<s;++i)n.push("("+ki.polygon.apply(e,[t._geometries[i]])+")");return n.join(",")},geometrycollection:function(t){for(var e=this,n=[],i=0,s=t._geometries.length;i<s;++i)n.push(e.extractGeometry(t._geometries[i]));return n.join(",")}},Bl={point:function(t){if(t===void 0)return this.geometryFactory.createPoint();var e=t.trim().split(qn.spaces);return this.geometryFactory.createPoint(new L(Number.parseFloat(e[0]),Number.parseFloat(e[1])))},multipoint:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiPoint();for(var n,i=t.trim().split(","),s=[],a=0,o=i.length;a<o;++a)n=i[a].replace(qn.trimParens,"$1"),s.push(Bl.point.apply(e,[n]));return this.geometryFactory.createMultiPoint(s)},linestring:function(t){if(t===void 0)return this.geometryFactory.createLineString();for(var e=t.trim().split(","),n=[],i,s=0,a=e.length;s<a;++s)i=e[s].trim().split(qn.spaces),n.push(new L(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLineString(n)},linearring:function(t){if(t===void 0)return this.geometryFactory.createLinearRing();for(var e=t.trim().split(","),n=[],i,s=0,a=e.length;s<a;++s)i=e[s].trim().split(qn.spaces),n.push(new L(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLinearRing(n)},multilinestring:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiLineString();for(var n,i=t.trim().split(qn.parenComma),s=[],a=0,o=i.length;a<o;++a)n=i[a].replace(qn.trimParens,"$1"),s.push(Bl.linestring.apply(e,[n]));return this.geometryFactory.createMultiLineString(s)},polygon:function(t){var e=this;if(t===void 0)return this.geometryFactory.createPolygon();for(var n,i,s,a=t.trim().split(qn.parenComma),o,l=[],u=0,c=a.length;u<c;++u)n=a[u].replace(qn.trimParens,"$1"),i=Bl.linestring.apply(e,[n]),s=e.geometryFactory.createLinearRing(i._points),u===0?o=s:l.push(s);return this.geometryFactory.createPolygon(o,l)},multipolygon:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiPolygon();for(var n,i=t.trim().split(qn.doubleParenComma),s=[],a=0,o=i.length;a<o;++a)n=i[a].replace(qn.trimParens,"$1"),s.push(Bl.polygon.apply(e,[n]));return this.geometryFactory.createMultiPolygon(s)},geometrycollection:function(t){var e=this;if(t===void 0)return this.geometryFactory.createGeometryCollection();t=t.replace(/,\s*([A-Za-z])/g,"|$1");for(var n=t.trim().split("|"),i=[],s=0,a=n.length;s<a;++s)i.push(e.read(n[s]));return this.geometryFactory.createGeometryCollection(i)}},Sn=function(t){this.parser=new sc(t)};Sn.prototype.write=function(t){return this.parser.write(t)},Sn.toLineString=function(t,e){if(arguments.length!==2)throw new Error("Not implemented");return"LINESTRING ( "+t.x+" "+t.y+", "+e.x+" "+e.y+" )"};var zi=function(r){function t(e){r.call(this,e),this.name="RuntimeException",this.message=e,this.stack=new r().stack}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t}(Error),ac=function(r){function t(){if(r.call(this),arguments.length===0)r.call(this);else if(arguments.length===1){var e=arguments[0];r.call(this,e)}}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(zi),Mt=function(){};Mt.prototype.interfaces_=function(){return[]},Mt.prototype.getClass=function(){return Mt},Mt.shouldNeverReachHere=function(){if(arguments.length===0)Mt.shouldNeverReachHere(null);else if(arguments.length===1){var t=arguments[0];throw new ac("Should never reach here"+(t!==null?": "+t:""))}},Mt.isTrue=function(){var t,e;if(arguments.length===1)t=arguments[0],Mt.isTrue(t,null);else if(arguments.length===2&&(t=arguments[0],e=arguments[1],!t))throw e===null?new ac:new ac(e)},Mt.equals=function(){var t,e,n;if(arguments.length===2)t=arguments[0],e=arguments[1],Mt.equals(t,e,null);else if(arguments.length===3&&(t=arguments[0],e=arguments[1],n=arguments[2],!e.equals(t)))throw new ac("Expected "+t+" but encountered "+e+(n!==null?": "+n:""))};var ce=function(){this._result=null,this._inputLines=Array(2).fill().map(function(){return Array(2)}),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new L,this._intPt[1]=new L,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},Fa={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};ce.prototype.getIndexAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intLineIndex[t][e]},ce.prototype.getTopologySummary=function(){var t=new Vn;return this.isEndPoint()&&t.append(" endpoint"),this._isProper&&t.append(" proper"),this.isCollinear()&&t.append(" collinear"),t.toString()},ce.prototype.computeIntersection=function(t,e,n,i){this._inputLines[0][0]=t,this._inputLines[0][1]=e,this._inputLines[1][0]=n,this._inputLines[1][1]=i,this._result=this.computeIntersect(t,e,n,i)},ce.prototype.getIntersectionNum=function(){return this._result},ce.prototype.computeIntLineIndex=function(){if(arguments.length===0)this._intLineIndex===null&&(this._intLineIndex=Array(2).fill().map(function(){return Array(2)}),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(arguments.length===1){var t=arguments[0],e=this.getEdgeDistance(t,0),n=this.getEdgeDistance(t,1);e>n?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},ce.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},ce.prototype.setPrecisionModel=function(t){this._precisionModel=t},ce.prototype.isInteriorIntersection=function(){var t=this;if(arguments.length===0)return!!(this.isInteriorIntersection(0)||this.isInteriorIntersection(1));if(arguments.length===1){for(var e=arguments[0],n=0;n<this._result;n++)if(!(t._intPt[n].equals2D(t._inputLines[e][0])||t._intPt[n].equals2D(t._inputLines[e][1])))return!0;return!1}},ce.prototype.getIntersection=function(t){return this._intPt[t]},ce.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},ce.prototype.hasIntersection=function(){return this._result!==ce.NO_INTERSECTION},ce.prototype.getEdgeDistance=function(t,e){var n=ce.computeEdgeDistance(this._intPt[e],this._inputLines[t][0],this._inputLines[t][1]);return n},ce.prototype.isCollinear=function(){return this._result===ce.COLLINEAR_INTERSECTION},ce.prototype.toString=function(){return Sn.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+Sn.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},ce.prototype.getEndpoint=function(t,e){return this._inputLines[t][e]},ce.prototype.isIntersection=function(t){for(var e=this,n=0;n<this._result;n++)if(e._intPt[n].equals2D(t))return!0;return!1},ce.prototype.getIntersectionAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[t][e]]},ce.prototype.interfaces_=function(){return[]},ce.prototype.getClass=function(){return ce},ce.computeEdgeDistance=function(t,e,n){var i=Math.abs(n.x-e.x),s=Math.abs(n.y-e.y),a=-1;if(t.equals(e))a=0;else if(t.equals(n))i>s?a=i:a=s;else{var o=Math.abs(t.x-e.x),l=Math.abs(t.y-e.y);i>s?a=o:a=l,a===0&&!t.equals(e)&&(a=Math.max(o,l))}return Mt.isTrue(!(a===0&&!t.equals(e)),"Bad distance calculation"),a},ce.nonRobustComputeEdgeDistance=function(t,e,n){var i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s);return Mt.isTrue(!(a===0&&!t.equals(e)),"Invalid distance calculation"),a},Fa.DONT_INTERSECT.get=function(){return 0},Fa.DO_INTERSECT.get=function(){return 1},Fa.COLLINEAR.get=function(){return 2},Fa.NO_INTERSECTION.get=function(){return 0},Fa.POINT_INTERSECTION.get=function(){return 1},Fa.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(ce,Fa);var Zs=function(r){function t(){r.apply(this,arguments)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.isInSegmentEnvelopes=function(n){var i=new dt(this._inputLines[0][0],this._inputLines[0][1]),s=new dt(this._inputLines[1][0],this._inputLines[1][1]);return i.contains(n)&&s.contains(n)},t.prototype.computeIntersection=function(){if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];if(this._isProper=!1,dt.intersects(i,s,n)&&et.orientationIndex(i,s,n)===0&&et.orientationIndex(s,i,n)===0)return this._isProper=!0,(n.equals(i)||n.equals(s))&&(this._isProper=!1),this._result=r.POINT_INTERSECTION,null;this._result=r.NO_INTERSECTION}else return r.prototype.computeIntersection.apply(this,arguments)},t.prototype.normalizeToMinimum=function(n,i,s,a,o){o.x=this.smallestInAbsValue(n.x,i.x,s.x,a.x),o.y=this.smallestInAbsValue(n.y,i.y,s.y,a.y),n.x-=o.x,n.y-=o.y,i.x-=o.x,i.y-=o.y,s.x-=o.x,s.y-=o.y,a.x-=o.x,a.y-=o.y},t.prototype.safeHCoordinateIntersection=function(n,i,s,a){var o=null;try{o=En.intersection(n,i,s,a)}catch(l){if(l instanceof Ql)o=t.nearestEndpoint(n,i,s,a);else throw l}finally{}return o},t.prototype.intersection=function(n,i,s,a){var o=this.intersectionWithNormalization(n,i,s,a);return this.isInSegmentEnvelopes(o)||(o=new L(t.nearestEndpoint(n,i,s,a))),this._precisionModel!==null&&this._precisionModel.makePrecise(o),o},t.prototype.smallestInAbsValue=function(n,i,s,a){var o=n,l=Math.abs(o);return Math.abs(i)<l&&(o=i,l=Math.abs(i)),Math.abs(s)<l&&(o=s,l=Math.abs(s)),Math.abs(a)<l&&(o=a),o},t.prototype.checkDD=function(n,i,s,a,o){var l=cr.intersection(n,i,s,a),u=this.isInSegmentEnvelopes(l);Ve.out.println("DD in env = "+u+" --------------------- "+l),o.distance(l)>1e-4&&Ve.out.println("Distance = "+o.distance(l))},t.prototype.intersectionWithNormalization=function(n,i,s,a){var o=new L(n),l=new L(i),u=new L(s),c=new L(a),h=new L;this.normalizeToEnvCentre(o,l,u,c,h);var f=this.safeHCoordinateIntersection(o,l,u,c);return f.x+=h.x,f.y+=h.y,f},t.prototype.computeCollinearIntersection=function(n,i,s,a){var o=dt.intersects(n,i,s),l=dt.intersects(n,i,a),u=dt.intersects(s,a,n),c=dt.intersects(s,a,i);return o&&l?(this._intPt[0]=s,this._intPt[1]=a,r.COLLINEAR_INTERSECTION):u&&c?(this._intPt[0]=n,this._intPt[1]=i,r.COLLINEAR_INTERSECTION):o&&u?(this._intPt[0]=s,this._intPt[1]=n,s.equals(n)&&!l&&!c?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):o&&c?(this._intPt[0]=s,this._intPt[1]=i,s.equals(i)&&!l&&!u?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):l&&u?(this._intPt[0]=a,this._intPt[1]=n,a.equals(n)&&!o&&!c?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):l&&c?(this._intPt[0]=a,this._intPt[1]=i,a.equals(i)&&!o&&!u?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):r.NO_INTERSECTION},t.prototype.normalizeToEnvCentre=function(n,i,s,a,o){var l=n.x<i.x?n.x:i.x,u=n.y<i.y?n.y:i.y,c=n.x>i.x?n.x:i.x,h=n.y>i.y?n.y:i.y,f=s.x<a.x?s.x:a.x,g=s.y<a.y?s.y:a.y,m=s.x>a.x?s.x:a.x,_=s.y>a.y?s.y:a.y,E=l>f?l:f,M=c<m?c:m,y=u>g?u:g,w=h<_?h:_,v=(E+M)/2,S=(y+w)/2;o.x=v,o.y=S,n.x-=o.x,n.y-=o.y,i.x-=o.x,i.y-=o.y,s.x-=o.x,s.y-=o.y,a.x-=o.x,a.y-=o.y},t.prototype.computeIntersect=function(n,i,s,a){if(this._isProper=!1,!dt.intersects(n,i,s,a))return r.NO_INTERSECTION;var o=et.orientationIndex(n,i,s),l=et.orientationIndex(n,i,a);if(o>0&&l>0||o<0&&l<0)return r.NO_INTERSECTION;var u=et.orientationIndex(s,a,n),c=et.orientationIndex(s,a,i);if(u>0&&c>0||u<0&&c<0)return r.NO_INTERSECTION;var h=o===0&&l===0&&u===0&&c===0;return h?this.computeCollinearIntersection(n,i,s,a):(o===0||l===0||u===0||c===0?(this._isProper=!1,n.equals2D(s)||n.equals2D(a)?this._intPt[0]=n:i.equals2D(s)||i.equals2D(a)?this._intPt[0]=i:o===0?this._intPt[0]=new L(s):l===0?this._intPt[0]=new L(a):u===0?this._intPt[0]=new L(n):c===0&&(this._intPt[0]=new L(i))):(this._isProper=!0,this._intPt[0]=this.intersection(n,i,s,a)),r.POINT_INTERSECTION)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.nearestEndpoint=function(n,i,s,a){var o=n,l=et.distancePointLine(n,s,a),u=et.distancePointLine(i,s,a);return u<l&&(l=u,o=i),u=et.distancePointLine(s,n,i),u<l&&(l=u,o=s),u=et.distancePointLine(a,n,i),u<l&&(l=u,o=a),o},t}(ce),Ga=function(){};Ga.prototype.interfaces_=function(){return[]},Ga.prototype.getClass=function(){return Ga},Ga.orientationIndex=function(t,e,n){var i=e.x-t.x,s=e.y-t.y,a=n.x-e.x,o=n.y-e.y;return Ga.signOfDet2x2(i,s,a,o)},Ga.signOfDet2x2=function(t,e,n,i){var s=null,a=null,o=null;if(s=1,t===0||i===0)return e===0||n===0?0:e>0?n>0?-s:s:n>0?s:-s;if(e===0||n===0)return i>0?t>0?s:-s:t>0?-s:s;if(e>0?i>0?e<=i||(s=-s,a=t,t=n,n=a,a=e,e=i,i=a):e<=-i?(s=-s,n=-n,i=-i):(a=t,t=-n,n=a,a=e,e=-i,i=a):i>0?-e<=i?(s=-s,t=-t,e=-e):(a=-t,t=n,n=a,a=-e,e=i,i=a):e>=i?(t=-t,e=-e,n=-n,i=-i):(s=-s,a=-t,t=-n,n=a,a=-e,e=-i,i=a),t>0)if(n>0){if(!(t<=n))return s}else return s;else{if(n>0)return-s;if(t>=n)s=-s,t=-t,n=-n;else return-s}for(;;){if(o=Math.floor(n/t),n=n-o*t,i=i-o*e,i<0)return-s;if(i>e)return s;if(t>n+n){if(e<i+i)return s}else{if(e>i+i)return-s;n=t-n,i=e-i,s=-s}if(i===0)return n===0?0:-s;if(n===0||(o=Math.floor(t/n),t=t-o*n,e=e-o*i,e<0))return s;if(e>i)return-s;if(n>t+t){if(i<e+e)return-s}else{if(i>e+e)return s;t=n-t,e=i-e,s=-s}if(e===0)return t===0?0:s;if(t===0)return-s}};var Wn=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};Wn.prototype.countSegment=function(t,e){if(t.x<this._p.x&&e.x<this._p.x)return null;if(this._p.x===e.x&&this._p.y===e.y)return this._isPointOnSegment=!0,null;if(t.y===this._p.y&&e.y===this._p.y){var n=t.x,i=e.x;return n>i&&(n=e.x,i=t.x),this._p.x>=n&&this._p.x<=i&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var s=t.x-this._p.x,a=t.y-this._p.y,o=e.x-this._p.x,l=e.y-this._p.y,u=Ga.signOfDet2x2(s,a,o,l);if(u===0)return this._isPointOnSegment=!0,null;l<a&&(u=-u),u>0&&this._crossingCount++}},Wn.prototype.isPointInPolygon=function(){return this.getLocation()!==F.EXTERIOR},Wn.prototype.getLocation=function(){return this._isPointOnSegment?F.BOUNDARY:this._crossingCount%2===1?F.INTERIOR:F.EXTERIOR},Wn.prototype.isOnSegment=function(){return this._isPointOnSegment},Wn.prototype.interfaces_=function(){return[]},Wn.prototype.getClass=function(){return Wn},Wn.locatePointInRing=function(){if(arguments[0]instanceof L&&_t(arguments[1],Ft)){for(var t=arguments[0],e=arguments[1],n=new Wn(t),i=new L,s=new L,a=1;a<e.size();a++)if(e.getCoordinate(a,i),e.getCoordinate(a-1,s),n.countSegment(i,s),n.isOnSegment())return n.getLocation();return n.getLocation()}else if(arguments[0]instanceof L&&arguments[1]instanceof Array){for(var o=arguments[0],l=arguments[1],u=new Wn(o),c=1;c<l.length;c++){var h=l[c],f=l[c-1];if(u.countSegment(h,f),u.isOnSegment())return u.getLocation()}return u.getLocation()}};var et=function(){},ka={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};et.prototype.interfaces_=function(){return[]},et.prototype.getClass=function(){return et},et.orientationIndex=function(t,e,n){return cr.orientationIndex(t,e,n)},et.signedArea=function(){if(arguments[0]instanceof Array){var t=arguments[0];if(t.length<3)return 0;for(var e=0,n=t[0].x,i=1;i<t.length-1;i++){var s=t[i].x-n,a=t[i+1].y,o=t[i-1].y;e+=s*(o-a)}return e/2}else if(_t(arguments[0],Ft)){var l=arguments[0],u=l.size();if(u<3)return 0;var c=new L,h=new L,f=new L;l.getCoordinate(0,h),l.getCoordinate(1,f);var g=h.x;f.x-=g;for(var m=0,_=1;_<u-1;_++)c.y=h.y,h.x=f.x,h.y=f.y,l.getCoordinate(_+1,f),f.x-=g,m+=h.x*(c.y-f.y);return m/2}},et.distanceLineLine=function(t,e,n,i){if(t.equals(e))return et.distancePointLine(t,n,i);if(n.equals(i))return et.distancePointLine(i,t,e);var s=!1;if(!dt.intersects(t,e,n,i))s=!0;else{var a=(e.x-t.x)*(i.y-n.y)-(e.y-t.y)*(i.x-n.x);if(a===0)s=!0;else{var o=(t.y-n.y)*(i.x-n.x)-(t.x-n.x)*(i.y-n.y),l=(t.y-n.y)*(e.x-t.x)-(t.x-n.x)*(e.y-t.y),u=l/a,c=o/a;(c<0||c>1||u<0||u>1)&&(s=!0)}}return s?kr.min(et.distancePointLine(t,n,i),et.distancePointLine(e,n,i),et.distancePointLine(n,t,e),et.distancePointLine(i,t,e)):0},et.isPointInRing=function(t,e){return et.locatePointInRing(t,e)!==F.EXTERIOR},et.computeLength=function(t){var e=t.size();if(e<=1)return 0;var n=0,i=new L;t.getCoordinate(0,i);for(var s=i.x,a=i.y,o=1;o<e;o++){t.getCoordinate(o,i);var l=i.x,u=i.y,c=l-s,h=u-a;n+=Math.sqrt(c*c+h*h),s=l,a=u}return n},et.isCCW=function(t){var e=t.length-1;if(e<3)throw new oe("Ring has fewer than 4 points, so orientation cannot be determined");for(var n=t[0],i=0,s=1;s<=e;s++){var a=t[s];a.y>n.y&&(n=a,i=s)}var o=i;do o=o-1,o<0&&(o=e);while(t[o].equals2D(n)&&o!==i);var l=i;do l=(l+1)%e;while(t[l].equals2D(n)&&l!==i);var u=t[o],c=t[l];if(u.equals2D(n)||c.equals2D(n)||u.equals2D(c))return!1;var h=et.computeOrientation(u,n,c),f=!1;return h===0?f=u.x>c.x:f=h>0,f},et.locatePointInRing=function(t,e){return Wn.locatePointInRing(t,e)},et.distancePointLinePerpendicular=function(t,e,n){var i=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),s=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/i;return Math.abs(s)*Math.sqrt(i)},et.computeOrientation=function(t,e,n){return et.orientationIndex(t,e,n)},et.distancePointLine=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(e.length===0)throw new oe("Line array must contain at least one vertex");for(var n=t.distance(e[0]),i=0;i<e.length-1;i++){var s=et.distancePointLine(t,e[i],e[i+1]);s<n&&(n=s)}return n}else if(arguments.length===3){var a=arguments[0],o=arguments[1],l=arguments[2];if(o.x===l.x&&o.y===l.y)return a.distance(o);var u=(l.x-o.x)*(l.x-o.x)+(l.y-o.y)*(l.y-o.y),c=((a.x-o.x)*(l.x-o.x)+(a.y-o.y)*(l.y-o.y))/u;if(c<=0)return a.distance(o);if(c>=1)return a.distance(l);var h=((o.y-a.y)*(l.x-o.x)-(o.x-a.x)*(l.y-o.y))/u;return Math.abs(h)*Math.sqrt(u)}},et.isOnLine=function(t,e){for(var n=new Zs,i=1;i<e.length;i++){var s=e[i-1],a=e[i];if(n.computeIntersection(t,s,a),n.hasIntersection())return!0}return!1},ka.CLOCKWISE.get=function(){return-1},ka.RIGHT.get=function(){return et.CLOCKWISE},ka.COUNTERCLOCKWISE.get=function(){return 1},ka.LEFT.get=function(){return et.COUNTERCLOCKWISE},ka.COLLINEAR.get=function(){return 0},ka.STRAIGHT.get=function(){return et.COLLINEAR},Object.defineProperties(et,ka);var Vi=function(){};Vi.prototype.filter=function(t){},Vi.prototype.interfaces_=function(){return[]},Vi.prototype.getClass=function(){return Vi};var yt=function(){var t=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=t,this._SRID=t.getSRID()},di={serialVersionUID:{configurable:!0},SORTINDEX_POINT:{configurable:!0},SORTINDEX_MULTIPOINT:{configurable:!0},SORTINDEX_LINESTRING:{configurable:!0},SORTINDEX_LINEARRING:{configurable:!0},SORTINDEX_MULTILINESTRING:{configurable:!0},SORTINDEX_POLYGON:{configurable:!0},SORTINDEX_MULTIPOLYGON:{configurable:!0},SORTINDEX_GEOMETRYCOLLECTION:{configurable:!0},geometryChangedFilter:{configurable:!0}};yt.prototype.isGeometryCollection=function(){return this.getSortIndex()===yt.SORTINDEX_GEOMETRYCOLLECTION},yt.prototype.getFactory=function(){return this._factory},yt.prototype.getGeometryN=function(t){return this},yt.prototype.getArea=function(){return 0},yt.prototype.isRectangle=function(){return!1},yt.prototype.equals=function(){if(arguments[0]instanceof yt){var t=arguments[0];return t===null?!1:this.equalsTopo(t)}else if(arguments[0]instanceof Object){var e=arguments[0];if(!(e instanceof yt))return!1;var n=e;return this.equalsExact(n)}},yt.prototype.equalsExact=function(t){return this===t||this.equalsExact(t,0)},yt.prototype.geometryChanged=function(){this.apply(yt.geometryChangedFilter)},yt.prototype.geometryChangedAction=function(){this._envelope=null},yt.prototype.equalsNorm=function(t){return t===null?!1:this.norm().equalsExact(t.norm())},yt.prototype.getLength=function(){return 0},yt.prototype.getNumGeometries=function(){return 1},yt.prototype.compareTo=function(){if(arguments.length===1){var t=arguments[0],e=t;return this.getSortIndex()!==e.getSortIndex()?this.getSortIndex()-e.getSortIndex():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t)}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.getSortIndex()!==n.getSortIndex()?this.getSortIndex()-n.getSortIndex():this.isEmpty()&&n.isEmpty()?0:this.isEmpty()?-1:n.isEmpty()?1:this.compareToSameClass(n,i)}},yt.prototype.getUserData=function(){return this._userData},yt.prototype.getSRID=function(){return this._SRID},yt.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},yt.prototype.checkNotGeometryCollection=function(t){if(t.getSortIndex()===yt.SORTINDEX_GEOMETRYCOLLECTION)throw new oe("This method does not support GeometryCollection arguments")},yt.prototype.equal=function(t,e,n){return n===0?t.equals(e):t.distance(e)<=n},yt.prototype.norm=function(){var t=this.copy();return t.normalize(),t},yt.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()},yt.prototype.getEnvelopeInternal=function(){return this._envelope===null&&(this._envelope=this.computeEnvelopeInternal()),new dt(this._envelope)},yt.prototype.setSRID=function(t){this._SRID=t},yt.prototype.setUserData=function(t){this._userData=t},yt.prototype.compare=function(t,e){for(var n=t.iterator(),i=e.iterator();n.hasNext()&&i.hasNext();){var s=n.next(),a=i.next(),o=s.compareTo(a);if(o!==0)return o}return n.hasNext()?1:i.hasNext()?-1:0},yt.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()},yt.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===yt.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===yt.SORTINDEX_MULTIPOINT||this.getSortIndex()===yt.SORTINDEX_MULTILINESTRING||this.getSortIndex()===yt.SORTINDEX_MULTIPOLYGON},yt.prototype.interfaces_=function(){return[ic,Zr,$r]},yt.prototype.getClass=function(){return yt},yt.hasNonEmptyElements=function(t){for(var e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1},yt.hasNullElements=function(t){for(var e=0;e<t.length;e++)if(t[e]===null)return!0;return!1},di.serialVersionUID.get=function(){return 8763622679187377e3},di.SORTINDEX_POINT.get=function(){return 0},di.SORTINDEX_MULTIPOINT.get=function(){return 1},di.SORTINDEX_LINESTRING.get=function(){return 2},di.SORTINDEX_LINEARRING.get=function(){return 3},di.SORTINDEX_MULTILINESTRING.get=function(){return 4},di.SORTINDEX_POLYGON.get=function(){return 5},di.SORTINDEX_MULTIPOLYGON.get=function(){return 6},di.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},di.geometryChangedFilter.get=function(){return Gf},Object.defineProperties(yt,di);var Gf=function(){};Gf.interfaces_=function(){return[Vi]},Gf.filter=function(t){t.geometryChangedAction()};var pi=function(){};pi.prototype.filter=function(t){},pi.prototype.interfaces_=function(){return[]},pi.prototype.getClass=function(){return pi};var jr=function(){},Ui={Mod2BoundaryNodeRule:{configurable:!0},EndPointBoundaryNodeRule:{configurable:!0},MultiValentEndPointBoundaryNodeRule:{configurable:!0},MonoValentEndPointBoundaryNodeRule:{configurable:!0},MOD2_BOUNDARY_RULE:{configurable:!0},ENDPOINT_BOUNDARY_RULE:{configurable:!0},MULTIVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},MONOVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},OGC_SFS_BOUNDARY_RULE:{configurable:!0}};jr.prototype.isInBoundary=function(t){},jr.prototype.interfaces_=function(){return[]},jr.prototype.getClass=function(){return jr},Ui.Mod2BoundaryNodeRule.get=function(){return Zl},Ui.EndPointBoundaryNodeRule.get=function(){return $l},Ui.MultiValentEndPointBoundaryNodeRule.get=function(){return jl},Ui.MonoValentEndPointBoundaryNodeRule.get=function(){return tu},Ui.MOD2_BOUNDARY_RULE.get=function(){return new Zl},Ui.ENDPOINT_BOUNDARY_RULE.get=function(){return new $l},Ui.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new jl},Ui.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new tu},Ui.OGC_SFS_BOUNDARY_RULE.get=function(){return jr.MOD2_BOUNDARY_RULE},Object.defineProperties(jr,Ui);var Zl=function(){};Zl.prototype.isInBoundary=function(t){return t%2===1},Zl.prototype.interfaces_=function(){return[jr]},Zl.prototype.getClass=function(){return Zl};var $l=function(){};$l.prototype.isInBoundary=function(t){return t>0},$l.prototype.interfaces_=function(){return[jr]},$l.prototype.getClass=function(){return $l};var jl=function(){};jl.prototype.isInBoundary=function(t){return t>1},jl.prototype.interfaces_=function(){return[jr]},jl.prototype.getClass=function(){return jl};var tu=function(){};tu.prototype.isInBoundary=function(t){return t===1},tu.prototype.interfaces_=function(){return[jr]},tu.prototype.getClass=function(){return tu};var Me=function(){};Me.prototype.add=function(){},Me.prototype.addAll=function(){},Me.prototype.isEmpty=function(){},Me.prototype.iterator=function(){},Me.prototype.size=function(){},Me.prototype.toArray=function(){},Me.prototype.remove=function(){};function kf(r){this.message=r||""}kf.prototype=new Error,kf.prototype.name="IndexOutOfBoundsException";var eu=function(){};eu.prototype.hasNext=function(){},eu.prototype.next=function(){},eu.prototype.remove=function(){};var Pn=function(r){function t(){r.apply(this,arguments)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.get=function(){},t.prototype.set=function(){},t.prototype.isEmpty=function(){},t}(Me);function ru(r){this.message=r||""}ru.prototype=new Error,ru.prototype.name="NoSuchElementException";var Z=function(r){function t(){r.call(this),this.array_=[],arguments[0]instanceof Me&&this.addAll(arguments[0])}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.ensureCapacity=function(){},t.prototype.interfaces_=function(){return[r,Me]},t.prototype.add=function(n){return arguments.length===1?this.array_.push(n):this.array_.splice(arguments[0],arguments[1]),!0},t.prototype.clear=function(){this.array_=[]},t.prototype.addAll=function(n){for(var i=this,s=n.iterator();s.hasNext();)i.add(s.next());return!0},t.prototype.set=function(n,i){var s=this.array_[n];return this.array_[n]=i,s},t.prototype.iterator=function(){return new m_(this)},t.prototype.get=function(n){if(n<0||n>=this.size())throw new kf;return this.array_[n]},t.prototype.isEmpty=function(){return this.array_.length===0},t.prototype.size=function(){return this.array_.length},t.prototype.toArray=function(){for(var n=this,i=[],s=0,a=this.array_.length;s<a;s++)i.push(n.array_[s]);return i},t.prototype.remove=function(n){for(var i=this,s=!1,a=0,o=this.array_.length;a<o;a++)if(i.array_[a]===n){i.array_.splice(a,1),s=!0;break}return s},t}(Pn),m_=function(r){function t(e){r.call(this),this.arrayList_=e,this.position_=0}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new ru;return this.arrayList_.get(this.position_++)},t.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},t.prototype.set=function(n){return this.arrayList_.set(this.position_-1,n)},t.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},t}(eu),Ku=function(r){function t(){if(r.call(this),arguments.length!==0){if(arguments.length===1){var n=arguments[0];this.ensureCapacity(n.length),this.add(n,!0)}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.ensureCapacity(i.length),this.add(i,s)}}}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={coordArrayType:{configurable:!0}};return e.coordArrayType.get=function(){return new Array(0).fill(null)},t.prototype.getCoordinate=function(i){return this.get(i)},t.prototype.addAll=function(){var i=this;if(arguments.length===2){for(var s=arguments[0],a=arguments[1],o=!1,l=s.iterator();l.hasNext();)i.add(l.next(),a),o=!0;return o}else return r.prototype.addAll.apply(this,arguments)},t.prototype.clone=function(){for(var i=this,s=r.prototype.clone.call(this),a=0;a<this.size();a++)s.add(a,i.get(a).copy());return s},t.prototype.toCoordinateArray=function(){return this.toArray(t.coordArrayType)},t.prototype.add=function(){var i=this;if(arguments.length===1){var s=arguments[0];r.prototype.add.call(this,s)}else if(arguments.length===2){if(arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var a=arguments[0],o=arguments[1];return this.add(a,o,!0),!0}else if(arguments[0]instanceof L&&typeof arguments[1]=="boolean"){var l=arguments[0],u=arguments[1];if(!u&&this.size()>=1){var c=this.get(this.size()-1);if(c.equals2D(l))return null}r.prototype.add.call(this,l)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var h=arguments[0],f=arguments[1];return this.add(h,f),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var g=arguments[0],m=arguments[1],_=arguments[2];if(_)for(var E=0;E<g.length;E++)i.add(g[E],m);else for(var M=g.length-1;M>=0;M--)i.add(g[M],m);return!0}else if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof L){var y=arguments[0],w=arguments[1],v=arguments[2];if(!v){var S=this.size();if(S>0){if(y>0){var P=this.get(y-1);if(P.equals2D(w))return null}if(y<S){var I=this.get(y);if(I.equals2D(w))return null}}}r.prototype.add.call(this,y,w)}}else if(arguments.length===4){var b=arguments[0],D=arguments[1],O=arguments[2],T=arguments[3],x=1;O>T&&(x=-1);for(var R=O;R!==T;R+=x)i.add(b[R],D);return!0}},t.prototype.closeRing=function(){this.size()>0&&this.add(new L(this.get(0)),!1)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},Object.defineProperties(t,e),t}(Z),Tt=function(){},oc={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};oc.ForwardComparator.get=function(){return Qu},oc.BidirectionalComparator.get=function(){return nu},oc.coordArrayType.get=function(){return new Array(0).fill(null)},Tt.prototype.interfaces_=function(){return[]},Tt.prototype.getClass=function(){return Tt},Tt.isRing=function(t){return!(t.length<4||!t[0].equals2D(t[t.length-1]))},Tt.ptNotInList=function(t,e){for(var n=0;n<t.length;n++){var i=t[n];if(Tt.indexOf(i,e)<0)return i}return null},Tt.scroll=function(t,e){var n=Tt.indexOf(e,t);if(n<0)return null;var i=new Array(t.length).fill(null);Ve.arraycopy(t,n,i,0,t.length-n),Ve.arraycopy(t,0,i,t.length-n,n),Ve.arraycopy(i,0,t,0,t.length)},Tt.equals=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(t===e)return!0;if(t===null||e===null||t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].equals(e[n]))return!1;return!0}else if(arguments.length===3){var i=arguments[0],s=arguments[1],a=arguments[2];if(i===s)return!0;if(i===null||s===null||i.length!==s.length)return!1;for(var o=0;o<i.length;o++)if(a.compare(i[o],s[o])!==0)return!1;return!0}},Tt.intersection=function(t,e){for(var n=new Ku,i=0;i<t.length;i++)e.intersects(t[i])&&n.add(t[i],!0);return n.toCoordinateArray()},Tt.hasRepeatedPoints=function(t){for(var e=1;e<t.length;e++)if(t[e-1].equals(t[e]))return!0;return!1},Tt.removeRepeatedPoints=function(t){if(!Tt.hasRepeatedPoints(t))return t;var e=new Ku(t,!1);return e.toCoordinateArray()},Tt.reverse=function(t){for(var e=t.length-1,n=Math.trunc(e/2),i=0;i<=n;i++){var s=t[i];t[i]=t[e-i],t[e-i]=s}},Tt.removeNull=function(t){for(var e=0,n=0;n<t.length;n++)t[n]!==null&&e++;var i=new Array(e).fill(null);if(e===0)return i;for(var s=0,a=0;a<t.length;a++)t[a]!==null&&(i[s++]=t[a]);return i},Tt.copyDeep=function(){if(arguments.length===1){for(var t=arguments[0],e=new Array(t.length).fill(null),n=0;n<t.length;n++)e[n]=new L(t[n]);return e}else if(arguments.length===5)for(var i=arguments[0],s=arguments[1],a=arguments[2],o=arguments[3],l=arguments[4],u=0;u<l;u++)a[o+u]=new L(i[s+u])},Tt.isEqualReversed=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],s=e[t.length-n-1];if(i.compareTo(s)!==0)return!1}return!0},Tt.envelope=function(t){for(var e=new dt,n=0;n<t.length;n++)e.expandToInclude(t[n]);return e},Tt.toCoordinateArray=function(t){return t.toArray(Tt.coordArrayType)},Tt.atLeastNCoordinatesOrNothing=function(t,e){return e.length>=t?e:[]},Tt.indexOf=function(t,e){for(var n=0;n<e.length;n++)if(t.equals(e[n]))return n;return-1},Tt.increasingDirection=function(t){for(var e=0;e<Math.trunc(t.length/2);e++){var n=t.length-1-e,i=t[e].compareTo(t[n]);if(i!==0)return i}return 1},Tt.compare=function(t,e){for(var n=0;n<t.length&&n<e.length;){var i=t[n].compareTo(e[n]);if(i!==0)return i;n++}return n<e.length?-1:n<t.length?1:0},Tt.minCoordinate=function(t){for(var e=null,n=0;n<t.length;n++)(e===null||e.compareTo(t[n])>0)&&(e=t[n]);return e},Tt.extract=function(t,e,n){e=kr.clamp(e,0,t.length),n=kr.clamp(n,-1,t.length);var i=n-e+1;n<0&&(i=0),e>=t.length&&(i=0),n<e&&(i=0);var s=new Array(i).fill(null);if(i===0)return s;for(var a=0,o=e;o<=n;o++)s[a++]=t[o];return s},Object.defineProperties(Tt,oc);var Qu=function(){};Qu.prototype.compare=function(t,e){var n=t,i=e;return Tt.compare(n,i)},Qu.prototype.interfaces_=function(){return[Jl]},Qu.prototype.getClass=function(){return Qu};var nu=function(){};nu.prototype.compare=function(t,e){var n=t,i=e;if(n.length<i.length)return-1;if(n.length>i.length)return 1;if(n.length===0)return 0;var s=Tt.compare(n,i),a=Tt.isEqualReversed(n,i);return a?0:s},nu.prototype.OLDcompare=function(t,e){var n=t,i=e;if(n.length<i.length)return-1;if(n.length>i.length)return 1;if(n.length===0)return 0;for(var s=Tt.increasingDirection(n),a=Tt.increasingDirection(i),o=s>0?0:n.length-1,l=a>0?0:n.length-1,u=0;u<n.length;u++){var c=n[o].compareTo(i[l]);if(c!==0)return c;o+=s,l+=a}return 0},nu.prototype.interfaces_=function(){return[Jl]},nu.prototype.getClass=function(){return nu};var za=function(){};za.prototype.get=function(){},za.prototype.put=function(){},za.prototype.size=function(){},za.prototype.values=function(){},za.prototype.entrySet=function(){};var v_=function(r){function t(){r.apply(this,arguments)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t}(za);function Bu(r){this.message=r||""}Bu.prototype=new Error,Bu.prototype.name="OperationNotSupported";function lc(){}lc.prototype=new Me,lc.prototype.contains=function(){};var zf=function(r){function t(){r.call(this),this.array_=[],arguments[0]instanceof Me&&this.addAll(arguments[0])}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.contains=function(n){for(var i=this,s=0,a=this.array_.length;s<a;s++){var o=i.array_[s];if(o===n)return!0}return!1},t.prototype.add=function(n){return this.contains(n)?!1:(this.array_.push(n),!0)},t.prototype.addAll=function(n){for(var i=this,s=n.iterator();s.hasNext();)i.add(s.next());return!0},t.prototype.remove=function(n){throw new Error},t.prototype.size=function(){return this.array_.length},t.prototype.isEmpty=function(){return this.array_.length===0},t.prototype.toArray=function(){for(var n=this,i=[],s=0,a=this.array_.length;s<a;s++)i.push(n.array_[s]);return i},t.prototype.iterator=function(){return new y_(this)},t}(lc),y_=function(r){function t(e){r.call(this),this.hashSet_=e,this.position_=0}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new ru;return this.hashSet_.array_[this.position_++]},t.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},t.prototype.remove=function(){throw new Bu},t}(eu),qi=0,$s=1;function og(r){return r===null?qi:r.color}function jt(r){return r===null?null:r.parent}function Wi(r,t){r!==null&&(r.color=t)}function Vf(r){return r===null?null:r.left}function lg(r){return r===null?null:r.right}function Be(){this.root_=null,this.size_=0}Be.prototype=new v_,Be.prototype.get=function(r){for(var t=this.root_;t!==null;){var e=r.compareTo(t.key);if(e<0)t=t.left;else if(e>0)t=t.right;else return t.value}return null},Be.prototype.put=function(r,t){if(this.root_===null)return this.root_={key:r,value:t,left:null,right:null,parent:null,color:qi,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var e=this.root_,n,i;do if(n=e,i=r.compareTo(e.key),i<0)e=e.left;else if(i>0)e=e.right;else{var s=e.value;return e.value=t,s}while(e!==null);var a={key:r,left:null,right:null,value:t,parent:n,color:qi,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?n.left=a:n.right=a,this.fixAfterInsertion(a),this.size_++,null},Be.prototype.fixAfterInsertion=function(r){var t=this;for(r.color=$s;r!=null&&r!==this.root_&&r.parent.color===$s;)if(jt(r)===Vf(jt(jt(r)))){var e=lg(jt(jt(r)));og(e)===$s?(Wi(jt(r),qi),Wi(e,qi),Wi(jt(jt(r)),$s),r=jt(jt(r))):(r===lg(jt(r))&&(r=jt(r),t.rotateLeft(r)),Wi(jt(r),qi),Wi(jt(jt(r)),$s),t.rotateRight(jt(jt(r))))}else{var n=Vf(jt(jt(r)));og(n)===$s?(Wi(jt(r),qi),Wi(n,qi),Wi(jt(jt(r)),$s),r=jt(jt(r))):(r===Vf(jt(r))&&(r=jt(r),t.rotateRight(r)),Wi(jt(r),qi),Wi(jt(jt(r)),$s),t.rotateLeft(jt(jt(r))))}this.root_.color=qi},Be.prototype.values=function(){var r=new Z,t=this.getFirstEntry();if(t!==null)for(r.add(t.value);(t=Be.successor(t))!==null;)r.add(t.value);return r},Be.prototype.entrySet=function(){var r=new zf,t=this.getFirstEntry();if(t!==null)for(r.add(t);(t=Be.successor(t))!==null;)r.add(t);return r},Be.prototype.rotateLeft=function(r){if(r!=null){var t=r.right;r.right=t.left,t.left!=null&&(t.left.parent=r),t.parent=r.parent,r.parent===null?this.root_=t:r.parent.left===r?r.parent.left=t:r.parent.right=t,t.left=r,r.parent=t}},Be.prototype.rotateRight=function(r){if(r!=null){var t=r.left;r.left=t.right,t.right!=null&&(t.right.parent=r),t.parent=r.parent,r.parent===null?this.root_=t:r.parent.right===r?r.parent.right=t:r.parent.left=t,t.right=r,r.parent=t}},Be.prototype.getFirstEntry=function(){var r=this.root_;if(r!=null)for(;r.left!=null;)r=r.left;return r},Be.successor=function(r){if(r===null)return null;if(r.right!==null){for(var t=r.right;t.left!==null;)t=t.left;return t}else{for(var e=r.parent,n=r;e!==null&&n===e.right;)n=e,e=e.parent;return e}},Be.prototype.size=function(){return this.size_};var Zu=function(){};Zu.prototype.interfaces_=function(){return[]},Zu.prototype.getClass=function(){return Zu};function ug(){}ug.prototype=new lc;function Hn(){this.array_=[],arguments[0]instanceof Me&&this.addAll(arguments[0])}Hn.prototype=new ug,Hn.prototype.contains=function(r){for(var t=this,e=0,n=this.array_.length;e<n;e++){var i=t.array_[e];if(i.compareTo(r)===0)return!0}return!1},Hn.prototype.add=function(r){var t=this;if(this.contains(r))return!1;for(var e=0,n=this.array_.length;e<n;e++){var i=t.array_[e];if(i.compareTo(r)===1)return t.array_.splice(e,0,r),!0}return this.array_.push(r),!0},Hn.prototype.addAll=function(r){for(var t=this,e=r.iterator();e.hasNext();)t.add(e.next());return!0},Hn.prototype.remove=function(r){throw new Bu},Hn.prototype.size=function(){return this.array_.length},Hn.prototype.isEmpty=function(){return this.array_.length===0},Hn.prototype.toArray=function(){for(var r=this,t=[],e=0,n=this.array_.length;e<n;e++)t.push(r.array_[e]);return t},Hn.prototype.iterator=function(){return new uc(this)};var uc=function(r){this.treeSet_=r,this.position_=0};uc.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new ru;return this.treeSet_.array_[this.position_++]},uc.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},uc.prototype.remove=function(){throw new Bu};var js=function(){};js.sort=function(){var t=arguments[0],e,n,i,s;if(arguments.length===1)s=function(o,l){return o.compareTo(l)},t.sort(s);else if(arguments.length===2)i=arguments[1],s=function(o,l){return i.compare(o,l)},t.sort(s);else if(arguments.length===3){n=t.slice(arguments[1],arguments[2]),n.sort();var a=t.slice(0,arguments[1]).concat(n,t.slice(arguments[2],t.length));for(t.splice(0,t.length),e=0;e<a.length;e++)t.push(a[e])}else if(arguments.length===4)for(n=t.slice(arguments[1],arguments[2]),i=arguments[3],s=function(o,l){return i.compare(o,l)},n.sort(s),a=t.slice(0,arguments[1]).concat(n,t.slice(arguments[2],t.length)),t.splice(0,t.length),e=0;e<a.length;e++)t.push(a[e])},js.asList=function(t){for(var e=new Z,n=0,i=t.length;n<i;n++)e.add(t[n]);return e};var Vt=function(){},Cn={P:{configurable:!0},L:{configurable:!0},A:{configurable:!0},FALSE:{configurable:!0},TRUE:{configurable:!0},DONTCARE:{configurable:!0},SYM_FALSE:{configurable:!0},SYM_TRUE:{configurable:!0},SYM_DONTCARE:{configurable:!0},SYM_P:{configurable:!0},SYM_L:{configurable:!0},SYM_A:{configurable:!0}};Cn.P.get=function(){return 0},Cn.L.get=function(){return 1},Cn.A.get=function(){return 2},Cn.FALSE.get=function(){return-1},Cn.TRUE.get=function(){return-2},Cn.DONTCARE.get=function(){return-3},Cn.SYM_FALSE.get=function(){return"F"},Cn.SYM_TRUE.get=function(){return"T"},Cn.SYM_DONTCARE.get=function(){return"*"},Cn.SYM_P.get=function(){return"0"},Cn.SYM_L.get=function(){return"1"},Cn.SYM_A.get=function(){return"2"},Vt.prototype.interfaces_=function(){return[]},Vt.prototype.getClass=function(){return Vt},Vt.toDimensionSymbol=function(t){switch(t){case Vt.FALSE:return Vt.SYM_FALSE;case Vt.TRUE:return Vt.SYM_TRUE;case Vt.DONTCARE:return Vt.SYM_DONTCARE;case Vt.P:return Vt.SYM_P;case Vt.L:return Vt.SYM_L;case Vt.A:return Vt.SYM_A}throw new oe("Unknown dimension value: "+t)},Vt.toDimensionValue=function(t){switch(Yu.toUpperCase(t)){case Vt.SYM_FALSE:return Vt.FALSE;case Vt.SYM_TRUE:return Vt.TRUE;case Vt.SYM_DONTCARE:return Vt.DONTCARE;case Vt.SYM_P:return Vt.P;case Vt.SYM_L:return Vt.L;case Vt.SYM_A:return Vt.A}throw new oe("Unknown dimension symbol: "+t)},Object.defineProperties(Vt,Cn);var Xn=function(){};Xn.prototype.filter=function(t){},Xn.prototype.interfaces_=function(){return[]},Xn.prototype.getClass=function(){return Xn};var In=function(){};In.prototype.filter=function(t,e){},In.prototype.isDone=function(){},In.prototype.isGeometryChanged=function(){},In.prototype.interfaces_=function(){return[]},In.prototype.getClass=function(){return In};var er=function(r){function t(n,i){if(r.call(this,i),this._geometries=n||[],r.hasNullElements(this._geometries))throw new oe("geometries must not contain null elements")}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){for(var i=this,s=new dt,a=0;a<this._geometries.length;a++)s.expandToInclude(i._geometries[a].getEnvelopeInternal());return s},t.prototype.getGeometryN=function(i){return this._geometries[i]},t.prototype.getSortIndex=function(){return r.SORTINDEX_GEOMETRYCOLLECTION},t.prototype.getCoordinates=function(){for(var i=this,s=new Array(this.getNumPoints()).fill(null),a=-1,o=0;o<this._geometries.length;o++)for(var l=i._geometries[o].getCoordinates(),u=0;u<l.length;u++)a++,s[a]=l[u];return s},t.prototype.getArea=function(){for(var i=this,s=0,a=0;a<this._geometries.length;a++)s+=i._geometries[a].getArea();return s},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],a=arguments[1];if(!this.isEquivalentClass(s))return!1;var o=s;if(this._geometries.length!==o._geometries.length)return!1;for(var l=0;l<this._geometries.length;l++)if(!i._geometries[l].equalsExact(o._geometries[l],a))return!1;return!0}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var i=this,s=0;s<this._geometries.length;s++)i._geometries[s].normalize();js.sort(this._geometries)},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},t.prototype.getBoundaryDimension=function(){for(var i=this,s=Vt.FALSE,a=0;a<this._geometries.length;a++)s=Math.max(s,i._geometries[a].getBoundaryDimension());return s},t.prototype.getDimension=function(){for(var i=this,s=Vt.FALSE,a=0;a<this._geometries.length;a++)s=Math.max(s,i._geometries[a].getDimension());return s},t.prototype.getLength=function(){for(var i=this,s=0,a=0;a<this._geometries.length;a++)s+=i._geometries[a].getLength();return s},t.prototype.getNumPoints=function(){for(var i=this,s=0,a=0;a<this._geometries.length;a++)s+=i._geometries[a].getNumPoints();return s},t.prototype.getNumGeometries=function(){return this._geometries.length},t.prototype.reverse=function(){for(var i=this,s=this._geometries.length,a=new Array(s).fill(null),o=0;o<this._geometries.length;o++)a[o]=i._geometries[o].reverse();return this.getFactory().createGeometryCollection(a)},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var s=arguments[0],a=new Hn(js.asList(this._geometries)),o=new Hn(js.asList(s._geometries));return this.compare(a,o)}else if(arguments.length===2){for(var l=arguments[0],u=arguments[1],c=l,h=this.getNumGeometries(),f=c.getNumGeometries(),g=0;g<h&&g<f;){var m=i.getGeometryN(g),_=c.getGeometryN(g),E=m.compareToSameClass(_,u);if(E!==0)return E;g++}return g<h?1:g<f?-1:0}},t.prototype.apply=function(){var i=this;if(_t(arguments[0],pi))for(var s=arguments[0],a=0;a<this._geometries.length;a++)i._geometries[a].apply(s);else if(_t(arguments[0],In)){var o=arguments[0];if(this._geometries.length===0)return null;for(var l=0;l<this._geometries.length&&(i._geometries[l].apply(o),!o.isDone());l++);o.isGeometryChanged()&&this.geometryChanged()}else if(_t(arguments[0],Xn)){var u=arguments[0];u.filter(this);for(var c=0;c<this._geometries.length;c++)i._geometries[c].apply(u)}else if(_t(arguments[0],Vi)){var h=arguments[0];h.filter(this);for(var f=0;f<this._geometries.length;f++)i._geometries[f].apply(h)}},t.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),Mt.shouldNeverReachHere(),null},t.prototype.clone=function(){var i=this,s=r.prototype.clone.call(this);s._geometries=new Array(this._geometries.length).fill(null);for(var a=0;a<this._geometries.length;a++)s._geometries[a]=i._geometries[a].clone();return s},t.prototype.getGeometryType=function(){return"GeometryCollection"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),a=0;a<s.length;a++)s[a]=i._geometries[a].copy();return new t(s,this._factory)},t.prototype.isEmpty=function(){for(var i=this,s=0;s<this._geometries.length;s++)if(!i._geometries[s].isEmpty())return!1;return!0},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-5694727726395021e3},Object.defineProperties(t,e),t}(yt),ta=function(r){function t(){r.apply(this,arguments)}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return yt.SORTINDEX_MULTILINESTRING},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?r.prototype.equalsExact.call(this,i,s):!1}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?Vt.FALSE:0},t.prototype.isClosed=function(){var i=this;if(this.isEmpty())return!1;for(var s=0;s<this._geometries.length;s++)if(!i._geometries[s].isClosed())return!1;return!0},t.prototype.getDimension=function(){return 1},t.prototype.reverse=function(){for(var i=this,s=this._geometries.length,a=new Array(s).fill(null),o=0;o<this._geometries.length;o++)a[s-1-o]=i._geometries[o].reverse();return this.getFactory().createMultiLineString(a)},t.prototype.getBoundary=function(){return new tn(this).getBoundary()},t.prototype.getGeometryType=function(){return"MultiLineString"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),a=0;a<s.length;a++)s[a]=i._geometries[a].copy();return new t(s,this._factory)},t.prototype.interfaces_=function(){return[Zu]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 8166665132445434e3},Object.defineProperties(t,e),t}(er),tn=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,arguments.length===1){var t=arguments[0],e=jr.MOD2_BOUNDARY_RULE;this._geom=t,this._geomFact=t.getFactory(),this._bnRule=e}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this._geom=n,this._geomFact=n.getFactory(),this._bnRule=i}};tn.prototype.boundaryMultiLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var e=this.computeBoundaryCoordinates(t);return e.length===1?this._geomFact.createPoint(e[0]):this._geomFact.createMultiPointFromCoords(e)},tn.prototype.getBoundary=function(){return this._geom instanceof pe?this.boundaryLineString(this._geom):this._geom instanceof ta?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},tn.prototype.boundaryLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();if(t.isClosed()){var e=this._bnRule.isInBoundary(2);return e?t.getStartPoint():this._geomFact.createMultiPoint()}return this._geomFact.createMultiPoint([t.getStartPoint(),t.getEndPoint()])},tn.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()},tn.prototype.computeBoundaryCoordinates=function(t){var e=this,n=new Z;this._endpointMap=new Be;for(var i=0;i<t.getNumGeometries();i++){var s=t.getGeometryN(i);s.getNumPoints()!==0&&(e.addEndpoint(s.getCoordinateN(0)),e.addEndpoint(s.getCoordinateN(s.getNumPoints()-1)))}for(var a=this._endpointMap.entrySet().iterator();a.hasNext();){var o=a.next(),l=o.getValue(),u=l.count;e._bnRule.isInBoundary(u)&&n.add(o.getKey())}return Tt.toCoordinateArray(n)},tn.prototype.addEndpoint=function(t){var e=this._endpointMap.get(t);e===null&&(e=new hc,this._endpointMap.put(t,e)),e.count++},tn.prototype.interfaces_=function(){return[]},tn.prototype.getClass=function(){return tn},tn.getBoundary=function(){if(arguments.length===1){var t=arguments[0],e=new tn(t);return e.getBoundary()}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=new tn(n,i);return s.getBoundary()}};var hc=function(){this.count=null};hc.prototype.interfaces_=function(){return[]},hc.prototype.getClass=function(){return hc};function __(){}function w_(){}var E_=function(){};function S_(){}function P_(){}function C_(){}var en=function(){},Uf={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};en.prototype.interfaces_=function(){return[]},en.prototype.getClass=function(){return en},en.chars=function(t,e){for(var n=new Array(e).fill(null),i=0;i<e;i++)n[i]=t;return String(n)},en.getStackTrace=function(){if(arguments.length===1){var t=arguments[0],e=new S_,n=new __;return t.printStackTrace(n),e.toString()}else if(arguments.length===2){var i=arguments[0],s=arguments[1],a="";new w_(en.getStackTrace(i));for(var o=new C_,l=0;l<s;l++)try{a+=o.readLine()+en.NEWLINE}catch(u){if(u instanceof P_)Mt.shouldNeverReachHere();else throw u}finally{}return a}},en.split=function(t,e){for(var n=e.length,i=new Z,s=""+t,a=s.indexOf(e);a>=0;){var o=s.substring(0,a);i.add(o),s=s.substring(a+n),a=s.indexOf(e)}s.length>0&&i.add(s);for(var l=new Array(i.size()).fill(null),u=0;u<l.length;u++)l[u]=i.get(u);return l},en.toString=function(){if(arguments.length===1){var t=arguments[0];return en.SIMPLE_ORDINATE_FORMAT.format(t)}},en.spaces=function(t){return en.chars(" ",t)},Uf.NEWLINE.get=function(){return Ve.getProperty("line.separator")},Uf.SIMPLE_ORDINATE_FORMAT.get=function(){return new E_},Object.defineProperties(en,Uf);var ve=function(){};ve.prototype.interfaces_=function(){return[]},ve.prototype.getClass=function(){return ve},ve.copyCoord=function(t,e,n,i){for(var s=Math.min(t.getDimension(),n.getDimension()),a=0;a<s;a++)n.setOrdinate(i,a,t.getOrdinate(e,a))},ve.isRing=function(t){var e=t.size();return e===0?!0:e<=3?!1:t.getOrdinate(0,Ft.X)===t.getOrdinate(e-1,Ft.X)&&t.getOrdinate(0,Ft.Y)===t.getOrdinate(e-1,Ft.Y)},ve.isEqual=function(t,e){var n=t.size(),i=e.size();if(n!==i)return!1;for(var s=Math.min(t.getDimension(),e.getDimension()),a=0;a<n;a++)for(var o=0;o<s;o++){var l=t.getOrdinate(a,o),u=e.getOrdinate(a,o);if(t.getOrdinate(a,o)!==e.getOrdinate(a,o)&&!(wt.isNaN(l)&&wt.isNaN(u)))return!1}return!0},ve.extend=function(t,e,n){var i=t.create(n,e.getDimension()),s=e.size();if(ve.copy(e,0,i,0,s),s>0)for(var a=s;a<n;a++)ve.copy(e,s-1,i,a,1);return i},ve.reverse=function(t){for(var e=t.size()-1,n=Math.trunc(e/2),i=0;i<=n;i++)ve.swap(t,i,e-i)},ve.swap=function(t,e,n){if(e===n)return null;for(var i=0;i<t.getDimension();i++){var s=t.getOrdinate(e,i);t.setOrdinate(e,i,t.getOrdinate(n,i)),t.setOrdinate(n,i,s)}},ve.copy=function(t,e,n,i,s){for(var a=0;a<s;a++)ve.copyCoord(t,e+a,n,i+a)},ve.toString=function(){if(arguments.length===1){var t=arguments[0],e=t.size();if(e===0)return"()";var n=t.getDimension(),i=new Vn;i.append("(");for(var s=0;s<e;s++){s>0&&i.append(" ");for(var a=0;a<n;a++)a>0&&i.append(","),i.append(en.toString(t.getOrdinate(s,a)))}return i.append(")"),i.toString()}},ve.ensureValidRing=function(t,e){var n=e.size();if(n===0)return e;if(n<=3)return ve.createClosedRing(t,e,4);var i=e.getOrdinate(0,Ft.X)===e.getOrdinate(n-1,Ft.X)&&e.getOrdinate(0,Ft.Y)===e.getOrdinate(n-1,Ft.Y);return i?e:ve.createClosedRing(t,e,n+1)},ve.createClosedRing=function(t,e,n){var i=t.create(n,e.getDimension()),s=e.size();ve.copy(e,0,i,0,s);for(var a=s;a<n;a++)ve.copy(e,0,i,a,1);return i};var pe=function(r){function t(n,i){r.call(this,i),this._points=null,this.init(n)}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new dt:this._points.expandEnvelope(new dt)},t.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},t.prototype.getSortIndex=function(){return r.SORTINDEX_LINESTRING},t.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],a=arguments[1];if(!this.isEquivalentClass(s))return!1;var o=s;if(this._points.size()!==o._points.size())return!1;for(var l=0;l<this._points.size();l++)if(!i.equal(i._points.getCoordinate(l),o._points.getCoordinate(l),a))return!1;return!0}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var i=this,s=0;s<Math.trunc(this._points.size()/2);s++){var a=i._points.size()-1-s;if(!i._points.getCoordinate(s).equals(i._points.getCoordinate(a)))return i._points.getCoordinate(s).compareTo(i._points.getCoordinate(a))>0&&ve.reverse(i._points),null}},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?Vt.FALSE:0},t.prototype.isClosed=function(){return this.isEmpty()?!1:this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},t.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},t.prototype.getDimension=function(){return 1},t.prototype.getLength=function(){return et.computeLength(this._points)},t.prototype.getNumPoints=function(){return this._points.size()},t.prototype.reverse=function(){var i=this._points.copy();ve.reverse(i);var s=this.getFactory().createLineString(i);return s},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){for(var s=arguments[0],a=s,o=0,l=0;o<this._points.size()&&l<a._points.size();){var u=i._points.getCoordinate(o).compareTo(a._points.getCoordinate(l));if(u!==0)return u;o++,l++}return o<this._points.size()?1:l<a._points.size()?-1:0}else if(arguments.length===2){var c=arguments[0],h=arguments[1],f=c;return h.compare(this._points,f._points)}},t.prototype.apply=function(){var i=this;if(_t(arguments[0],pi))for(var s=arguments[0],a=0;a<this._points.size();a++)s.filter(i._points.getCoordinate(a));else if(_t(arguments[0],In)){var o=arguments[0];if(this._points.size()===0)return null;for(var l=0;l<this._points.size()&&(o.filter(i._points,l),!o.isDone());l++);o.isGeometryChanged()&&this.geometryChanged()}else if(_t(arguments[0],Xn)){var u=arguments[0];u.filter(this)}else if(_t(arguments[0],Vi)){var c=arguments[0];c.filter(this)}},t.prototype.getBoundary=function(){return new tn(this).getBoundary()},t.prototype.isEquivalentClass=function(i){return i instanceof t},t.prototype.clone=function(){var i=r.prototype.clone.call(this);return i._points=this._points.clone(),i},t.prototype.getCoordinateN=function(i){return this._points.getCoordinate(i)},t.prototype.getGeometryType=function(){return"LineString"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._points},t.prototype.isEmpty=function(){return this._points.size()===0},t.prototype.init=function(i){if(i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),i.size()===1)throw new oe("Invalid number of points in LineString (found "+i.size()+" - must be 0 or >= 2)");this._points=i},t.prototype.isCoordinate=function(i){for(var s=this,a=0;a<this._points.size();a++)if(s._points.getCoordinate(a).equals(i))return!0;return!1},t.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},t.prototype.getPointN=function(i){return this.getFactory().createPoint(this._points.getCoordinate(i))},t.prototype.interfaces_=function(){return[Zu]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(t,e),t}(yt),$u=function(){};$u.prototype.interfaces_=function(){return[]},$u.prototype.getClass=function(){return $u};var Nr=function(r){function t(n,i){r.call(this,i),this._coordinates=n||null,this.init(this._coordinates)}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new dt;var i=new dt;return i.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),i},t.prototype.getSortIndex=function(){return r.SORTINDEX_POINT},t.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?this.isEmpty()&&i.isEmpty()?!0:this.isEmpty()!==i.isEmpty()?!1:this.equal(i.getCoordinate(),this.getCoordinate(),s):!1}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){},t.prototype.getCoordinate=function(){return this._coordinates.size()!==0?this._coordinates.getCoordinate(0):null},t.prototype.getBoundaryDimension=function(){return Vt.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getNumPoints=function(){return this.isEmpty()?0:1},t.prototype.reverse=function(){return this.copy()},t.prototype.getX=function(){if(this.getCoordinate()===null)throw new Error("getX called on empty Point");return this.getCoordinate().x},t.prototype.compareToSameClass=function(){if(arguments.length===1){var i=arguments[0],s=i;return this.getCoordinate().compareTo(s.getCoordinate())}else if(arguments.length===2){var a=arguments[0],o=arguments[1],l=a;return o.compare(this._coordinates,l._coordinates)}},t.prototype.apply=function(){if(_t(arguments[0],pi)){var i=arguments[0];if(this.isEmpty())return null;i.filter(this.getCoordinate())}else if(_t(arguments[0],In)){var s=arguments[0];if(this.isEmpty())return null;s.filter(this._coordinates,0),s.isGeometryChanged()&&this.geometryChanged()}else if(_t(arguments[0],Xn)){var a=arguments[0];a.filter(this)}else if(_t(arguments[0],Vi)){var o=arguments[0];o.filter(this)}},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.clone=function(){var i=r.prototype.clone.call(this);return i._coordinates=this._coordinates.clone(),i},t.prototype.getGeometryType=function(){return"Point"},t.prototype.copy=function(){return new t(this._coordinates.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._coordinates},t.prototype.getY=function(){if(this.getCoordinate()===null)throw new Error("getY called on empty Point");return this.getCoordinate().y},t.prototype.isEmpty=function(){return this._coordinates.size()===0},t.prototype.init=function(i){i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),Mt.isTrue(i.size()<=1),this._coordinates=i},t.prototype.isSimple=function(){return!0},t.prototype.interfaces_=function(){return[$u]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 4902022702746615e3},Object.defineProperties(t,e),t}(yt),ys=function(){};ys.prototype.interfaces_=function(){return[]},ys.prototype.getClass=function(){return ys};var Ne=function(r){function t(n,i,s){if(r.call(this,s),this._shell=null,this._holes=null,n===null&&(n=this.getFactory().createLinearRing()),i===null&&(i=[]),r.hasNullElements(i))throw new oe("holes must not contain null elements");if(n.isEmpty()&&r.hasNonEmptyElements(i))throw new oe("shell is empty but holes are not");this._shell=n,this._holes=i}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},t.prototype.getSortIndex=function(){return r.SORTINDEX_POLYGON},t.prototype.getCoordinates=function(){var i=this;if(this.isEmpty())return[];for(var s=new Array(this.getNumPoints()).fill(null),a=-1,o=this._shell.getCoordinates(),l=0;l<o.length;l++)a++,s[a]=o[l];for(var u=0;u<this._holes.length;u++)for(var c=i._holes[u].getCoordinates(),h=0;h<c.length;h++)a++,s[a]=c[h];return s},t.prototype.getArea=function(){var i=this,s=0;s+=Math.abs(et.signedArea(this._shell.getCoordinateSequence()));for(var a=0;a<this._holes.length;a++)s-=Math.abs(et.signedArea(i._holes[a].getCoordinateSequence()));return s},t.prototype.isRectangle=function(){if(this.getNumInteriorRing()!==0||this._shell===null||this._shell.getNumPoints()!==5)return!1;for(var i=this._shell.getCoordinateSequence(),s=this.getEnvelopeInternal(),a=0;a<5;a++){var o=i.getX(a);if(!(o===s.getMinX()||o===s.getMaxX()))return!1;var l=i.getY(a);if(!(l===s.getMinY()||l===s.getMaxY()))return!1}for(var u=i.getX(0),c=i.getY(0),h=1;h<=4;h++){var f=i.getX(h),g=i.getY(h),m=f!==u,_=g!==c;if(m===_)return!1;u=f,c=g}return!0},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],a=arguments[1];if(!this.isEquivalentClass(s))return!1;var o=s,l=this._shell,u=o._shell;if(!l.equalsExact(u,a)||this._holes.length!==o._holes.length)return!1;for(var c=0;c<this._holes.length;c++)if(!i._holes[c].equalsExact(o._holes[c],a))return!1;return!0}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){var i=this;if(arguments.length===0){this.normalize(this._shell,!0);for(var s=0;s<this._holes.length;s++)i.normalize(i._holes[s],!1);js.sort(this._holes)}else if(arguments.length===2){var a=arguments[0],o=arguments[1];if(a.isEmpty())return null;var l=new Array(a.getCoordinates().length-1).fill(null);Ve.arraycopy(a.getCoordinates(),0,l,0,l.length);var u=Tt.minCoordinate(a.getCoordinates());Tt.scroll(l,u),Ve.arraycopy(l,0,a.getCoordinates(),0,l.length),a.getCoordinates()[l.length]=l[0],et.isCCW(a.getCoordinates())===o&&Tt.reverse(a.getCoordinates())}},t.prototype.getCoordinate=function(){return this._shell.getCoordinate()},t.prototype.getNumInteriorRing=function(){return this._holes.length},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.getLength=function(){var i=this,s=0;s+=this._shell.getLength();for(var a=0;a<this._holes.length;a++)s+=i._holes[a].getLength();return s},t.prototype.getNumPoints=function(){for(var i=this,s=this._shell.getNumPoints(),a=0;a<this._holes.length;a++)s+=i._holes[a].getNumPoints();return s},t.prototype.reverse=function(){var i=this,s=this.copy();s._shell=this._shell.copy().reverse(),s._holes=new Array(this._holes.length).fill(null);for(var a=0;a<this._holes.length;a++)s._holes[a]=i._holes[a].copy().reverse();return s},t.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var s=arguments[0],a=this._shell,o=s._shell;return a.compareToSameClass(o)}else if(arguments.length===2){var l=arguments[0],u=arguments[1],c=l,h=this._shell,f=c._shell,g=h.compareToSameClass(f,u);if(g!==0)return g;for(var m=this.getNumInteriorRing(),_=c.getNumInteriorRing(),E=0;E<m&&E<_;){var M=i.getInteriorRingN(E),y=c.getInteriorRingN(E),w=M.compareToSameClass(y,u);if(w!==0)return w;E++}return E<m?1:E<_?-1:0}},t.prototype.apply=function(i){var s=this;if(_t(i,pi)){this._shell.apply(i);for(var a=0;a<this._holes.length;a++)s._holes[a].apply(i)}else if(_t(i,In)){if(this._shell.apply(i),!i.isDone())for(var o=0;o<this._holes.length&&(s._holes[o].apply(i),!i.isDone());o++);i.isGeometryChanged()&&this.geometryChanged()}else if(_t(i,Xn))i.filter(this);else if(_t(i,Vi)){i.filter(this),this._shell.apply(i);for(var l=0;l<this._holes.length;l++)s._holes[l].apply(i)}},t.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();var s=new Array(this._holes.length+1).fill(null);s[0]=this._shell;for(var a=0;a<this._holes.length;a++)s[a+1]=i._holes[a];return s.length<=1?this.getFactory().createLinearRing(s[0].getCoordinateSequence()):this.getFactory().createMultiLineString(s)},t.prototype.clone=function(){var i=this,s=r.prototype.clone.call(this);s._shell=this._shell.clone(),s._holes=new Array(this._holes.length).fill(null);for(var a=0;a<this._holes.length;a++)s._holes[a]=i._holes[a].clone();return s},t.prototype.getGeometryType=function(){return"Polygon"},t.prototype.copy=function(){for(var i=this,s=this._shell.copy(),a=new Array(this._holes.length).fill(null),o=0;o<a.length;o++)a[o]=i._holes[o].copy();return new t(s,a,this._factory)},t.prototype.getExteriorRing=function(){return this._shell},t.prototype.isEmpty=function(){return this._shell.isEmpty()},t.prototype.getInteriorRingN=function(i){return this._holes[i]},t.prototype.interfaces_=function(){return[ys]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(t,e),t}(yt),iu=function(r){function t(){r.apply(this,arguments)}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return yt.SORTINDEX_MULTIPOINT},t.prototype.isValid=function(){return!0},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?r.prototype.equalsExact.call(this,i,s):!1}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.getCoordinate=function(){if(arguments.length===1){var i=arguments[0];return this._geometries[i].getCoordinate()}else return r.prototype.getCoordinate.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return Vt.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.getGeometryType=function(){return"MultiPoint"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),a=0;a<s.length;a++)s[a]=i._geometries[a].copy();return new t(s,this._factory)},t.prototype.interfaces_=function(){return[$u]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-8048474874175356e3},Object.defineProperties(t,e),t}(er),gi=function(r){function t(n,i){n instanceof L&&i instanceof Dt&&(n=i.getCoordinateSequenceFactory().create(n)),r.call(this,n,i),this.validateConstruction()}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return yt.SORTINDEX_LINEARRING},t.prototype.getBoundaryDimension=function(){return Vt.FALSE},t.prototype.isClosed=function(){return this.isEmpty()?!0:r.prototype.isClosed.call(this)},t.prototype.reverse=function(){var i=this._points.copy();ve.reverse(i);var s=this.getFactory().createLinearRing(i);return s},t.prototype.validateConstruction=function(){if(!this.isEmpty()&&!r.prototype.isClosed.call(this))throw new oe("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<t.MINIMUM_VALID_SIZE)throw new oe("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},t.prototype.getGeometryType=function(){return"LinearRing"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.MINIMUM_VALID_SIZE.get=function(){return 4},e.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(t,e),t}(pe),mi=function(r){function t(){r.apply(this,arguments)}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return yt.SORTINDEX_MULTIPOLYGON},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?r.prototype.equalsExact.call(this,i,s):!1}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.reverse=function(){for(var i=this,s=this._geometries.length,a=new Array(s).fill(null),o=0;o<this._geometries.length;o++)a[o]=i._geometries[o].reverse();return this.getFactory().createMultiPolygon(a)},t.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();for(var s=new Z,a=0;a<this._geometries.length;a++)for(var o=i._geometries[a],l=o.getBoundary(),u=0;u<l.getNumGeometries();u++)s.add(l.getGeometryN(u));var c=new Array(s.size()).fill(null);return this.getFactory().createMultiLineString(s.toArray(c))},t.prototype.getGeometryType=function(){return"MultiPolygon"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),a=0;a<s.length;a++)s[a]=i._geometries[a].copy();return new t(s,this._factory)},t.prototype.interfaces_=function(){return[ys]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(t,e),t}(er),rn=function(t){this._factory=t||null,this._isUserDataCopied=!1},cc={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};rn.prototype.setCopyUserData=function(t){this._isUserDataCopied=t},rn.prototype.edit=function(t,e){if(t===null)return null;var n=this.editInternal(t,e);return this._isUserDataCopied&&n.setUserData(t.getUserData()),n},rn.prototype.editInternal=function(t,e){return this._factory===null&&(this._factory=t.getFactory()),t instanceof er?this.editGeometryCollection(t,e):t instanceof Ne?this.editPolygon(t,e):t instanceof Nr?e.edit(t,this._factory):t instanceof pe?e.edit(t,this._factory):(Mt.shouldNeverReachHere("Unsupported Geometry class: "+t.getClass().getName()),null)},rn.prototype.editGeometryCollection=function(t,e){for(var n=this,i=e.edit(t,this._factory),s=new Z,a=0;a<i.getNumGeometries();a++){var o=n.edit(i.getGeometryN(a),e);o===null||o.isEmpty()||s.add(o)}return i.getClass()===iu?this._factory.createMultiPoint(s.toArray([])):i.getClass()===ta?this._factory.createMultiLineString(s.toArray([])):i.getClass()===mi?this._factory.createMultiPolygon(s.toArray([])):this._factory.createGeometryCollection(s.toArray([]))},rn.prototype.editPolygon=function(t,e){var n=this,i=e.edit(t,this._factory);if(i===null&&(i=this._factory.createPolygon(null)),i.isEmpty())return i;var s=this.edit(i.getExteriorRing(),e);if(s===null||s.isEmpty())return this._factory.createPolygon();for(var a=new Z,o=0;o<i.getNumInteriorRing();o++){var l=n.edit(i.getInteriorRingN(o),e);l===null||l.isEmpty()||a.add(l)}return this._factory.createPolygon(s,a.toArray([]))},rn.prototype.interfaces_=function(){return[]},rn.prototype.getClass=function(){return rn},rn.GeometryEditorOperation=function(){},cc.NoOpGeometryOperation.get=function(){return ju},cc.CoordinateOperation.get=function(){return th},cc.CoordinateSequenceOperation.get=function(){return eh},Object.defineProperties(rn,cc);var ju=function(){};ju.prototype.edit=function(t,e){return t},ju.prototype.interfaces_=function(){return[rn.GeometryEditorOperation]},ju.prototype.getClass=function(){return ju};var th=function(){};th.prototype.edit=function(t,e){var n=this.editCoordinates(t.getCoordinates(),t);return n===null?t:t instanceof gi?e.createLinearRing(n):t instanceof pe?e.createLineString(n):t instanceof Nr?n.length>0?e.createPoint(n[0]):e.createPoint():t},th.prototype.interfaces_=function(){return[rn.GeometryEditorOperation]},th.prototype.getClass=function(){return th};var eh=function(){};eh.prototype.edit=function(t,e){return t instanceof gi?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof pe?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof Nr?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},eh.prototype.interfaces_=function(){return[rn.GeometryEditorOperation]},eh.prototype.getClass=function(){return eh};var ye=function(){var t=this;if(this._dimension=3,this._coordinates=null,arguments.length===1){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var e=arguments[0];this._coordinates=new Array(e).fill(null);for(var n=0;n<e;n++)t._coordinates[n]=new L}else if(_t(arguments[0],Ft)){var i=arguments[0];if(i===null)return this._coordinates=new Array(0).fill(null),null;this._dimension=i.getDimension(),this._coordinates=new Array(i.size()).fill(null);for(var s=0;s<this._coordinates.length;s++)t._coordinates[s]=i.getCoordinateCopy(s)}}else if(arguments.length===2){if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var a=arguments[0],o=arguments[1];this._coordinates=a,this._dimension=o,a===null&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var l=arguments[0],u=arguments[1];this._coordinates=new Array(l).fill(null),this._dimension=u;for(var c=0;c<l;c++)t._coordinates[c]=new L}}},hg={serialVersionUID:{configurable:!0}};ye.prototype.setOrdinate=function(t,e,n){switch(e){case Ft.X:this._coordinates[t].x=n;break;case Ft.Y:this._coordinates[t].y=n;break;case Ft.Z:this._coordinates[t].z=n;break;default:throw new oe("invalid ordinateIndex")}},ye.prototype.size=function(){return this._coordinates.length},ye.prototype.getOrdinate=function(t,e){switch(e){case Ft.X:return this._coordinates[t].x;case Ft.Y:return this._coordinates[t].y;case Ft.Z:return this._coordinates[t].z}return wt.NaN},ye.prototype.getCoordinate=function(){if(arguments.length===1){var t=arguments[0];return this._coordinates[t]}else if(arguments.length===2){var e=arguments[0],n=arguments[1];n.x=this._coordinates[e].x,n.y=this._coordinates[e].y,n.z=this._coordinates[e].z}},ye.prototype.getCoordinateCopy=function(t){return new L(this._coordinates[t])},ye.prototype.getDimension=function(){return this._dimension},ye.prototype.getX=function(t){return this._coordinates[t].x},ye.prototype.clone=function(){for(var t=this,e=new Array(this.size()).fill(null),n=0;n<this._coordinates.length;n++)e[n]=t._coordinates[n].clone();return new ye(e,this._dimension)},ye.prototype.expandEnvelope=function(t){for(var e=this,n=0;n<this._coordinates.length;n++)t.expandToInclude(e._coordinates[n]);return t},ye.prototype.copy=function(){for(var t=this,e=new Array(this.size()).fill(null),n=0;n<this._coordinates.length;n++)e[n]=t._coordinates[n].copy();return new ye(e,this._dimension)},ye.prototype.toString=function(){var t=this;if(this._coordinates.length>0){var e=new Vn(17*this._coordinates.length);e.append("("),e.append(this._coordinates[0]);for(var n=1;n<this._coordinates.length;n++)e.append(", "),e.append(t._coordinates[n]);return e.append(")"),e.toString()}else return"()"},ye.prototype.getY=function(t){return this._coordinates[t].y},ye.prototype.toCoordinateArray=function(){return this._coordinates},ye.prototype.interfaces_=function(){return[Ft,$r]},ye.prototype.getClass=function(){return ye},hg.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(ye,hg);var vi=function(){},qf={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};vi.prototype.readResolve=function(){return vi.instance()},vi.prototype.create=function(){if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return new ye(t)}else if(_t(arguments[0],Ft)){var e=arguments[0];return new ye(e)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return i>3&&(i=3),i<2?new ye(n):new ye(n,i)}},vi.prototype.interfaces_=function(){return[Kl,$r]},vi.prototype.getClass=function(){return vi},vi.instance=function(){return vi.instanceObject},qf.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},qf.instanceObject.get=function(){return new vi},Object.defineProperties(vi,qf);var cg=function(r){function t(){r.call(this),this.map_=new Map}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.get=function(n){return this.map_.get(n)||null},t.prototype.put=function(n,i){return this.map_.set(n,i),i},t.prototype.values=function(){for(var n=new Z,i=this.map_.values(),s=i.next();!s.done;)n.add(s.value),s=i.next();return n},t.prototype.entrySet=function(){var n=new zf;return this.map_.entries().forEach(function(i){return n.add(i)}),n},t.prototype.size=function(){return this.map_.size()},t}(za),Ut=function r(){if(this._modelType=null,this._scale=null,arguments.length===0)this._modelType=r.FLOATING;else if(arguments.length===1){if(arguments[0]instanceof Yn){var t=arguments[0];this._modelType=t,t===r.FIXED&&this.setScale(1)}else if(typeof arguments[0]=="number"){var e=arguments[0];this._modelType=r.FIXED,this.setScale(e)}else if(arguments[0]instanceof r){var n=arguments[0];this._modelType=n._modelType,this._scale=n._scale}}},Wf={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};Ut.prototype.equals=function(t){if(!(t instanceof Ut))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},Ut.prototype.compareTo=function(t){var e=t,n=this.getMaximumSignificantDigits(),i=e.getMaximumSignificantDigits();return new Un(n).compareTo(new Un(i))},Ut.prototype.getScale=function(){return this._scale},Ut.prototype.isFloating=function(){return this._modelType===Ut.FLOATING||this._modelType===Ut.FLOATING_SINGLE},Ut.prototype.getType=function(){return this._modelType},Ut.prototype.toString=function(){var t="UNKNOWN";return this._modelType===Ut.FLOATING?t="Floating":this._modelType===Ut.FLOATING_SINGLE?t="Floating-Single":this._modelType===Ut.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},Ut.prototype.makePrecise=function(){if(typeof arguments[0]=="number"){var t=arguments[0];if(wt.isNaN(t))return t;if(this._modelType===Ut.FLOATING_SINGLE){var e=t;return e}return this._modelType===Ut.FIXED?Math.round(t*this._scale)/this._scale:t}else if(arguments[0]instanceof L){var n=arguments[0];if(this._modelType===Ut.FLOATING)return null;n.x=this.makePrecise(n.x),n.y=this.makePrecise(n.y)}},Ut.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===Ut.FLOATING?t=16:this._modelType===Ut.FLOATING_SINGLE?t=6:this._modelType===Ut.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},Ut.prototype.setScale=function(t){this._scale=Math.abs(t)},Ut.prototype.interfaces_=function(){return[$r,Zr]},Ut.prototype.getClass=function(){return Ut},Ut.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},Wf.serialVersionUID.get=function(){return 7777263578777804e3},Wf.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(Ut,Wf);var Yn=function r(t){this._name=t||null,r.nameToTypeMap.put(t,this)},Hf={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};Yn.prototype.readResolve=function(){return Yn.nameToTypeMap.get(this._name)},Yn.prototype.toString=function(){return this._name},Yn.prototype.interfaces_=function(){return[$r]},Yn.prototype.getClass=function(){return Yn},Hf.serialVersionUID.get=function(){return-552860263173159e4},Hf.nameToTypeMap.get=function(){return new cg},Object.defineProperties(Yn,Hf),Ut.Type=Yn,Ut.FIXED=new Yn("FIXED"),Ut.FLOATING=new Yn("FLOATING"),Ut.FLOATING_SINGLE=new Yn("FLOATING SINGLE");var Dt=function r(){this._precisionModel=new Ut,this._SRID=0,this._coordinateSequenceFactory=r.getDefaultCoordinateSequenceFactory(),arguments.length===0||(arguments.length===1?_t(arguments[0],Kl)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof Ut&&(this._precisionModel=arguments[0]):arguments.length===2?(this._precisionModel=arguments[0],this._SRID=arguments[1]):arguments.length===3&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},fg={serialVersionUID:{configurable:!0}};Dt.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new L(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new L(t.getMinX(),t.getMinY()),new L(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new L(t.getMinX(),t.getMinY()),new L(t.getMinX(),t.getMaxY()),new L(t.getMaxX(),t.getMaxY()),new L(t.getMaxX(),t.getMinY()),new L(t.getMinX(),t.getMinY())]),null)},Dt.prototype.createLineString=function(t){if(t){if(t instanceof Array)return new pe(this.getCoordinateSequenceFactory().create(t),this);if(_t(t,Ft))return new pe(t,this)}else return new pe(this.getCoordinateSequenceFactory().create([]),this)},Dt.prototype.createMultiLineString=function(){if(arguments.length===0)return new ta(null,this);if(arguments.length===1){var t=arguments[0];return new ta(t,this)}},Dt.prototype.buildGeometry=function(t){for(var e=null,n=!1,i=!1,s=t.iterator();s.hasNext();){var a=s.next(),o=a.getClass();e===null&&(e=o),o!==e&&(n=!0),a.isGeometryCollectionOrDerived()&&(i=!0)}if(e===null)return this.createGeometryCollection();if(n||i)return this.createGeometryCollection(Dt.toGeometryArray(t));var l=t.iterator().next(),u=t.size()>1;if(u){if(l instanceof Ne)return this.createMultiPolygon(Dt.toPolygonArray(t));if(l instanceof pe)return this.createMultiLineString(Dt.toLineStringArray(t));if(l instanceof Nr)return this.createMultiPoint(Dt.toPointArray(t));Mt.shouldNeverReachHere("Unhandled class: "+l.getClass().getName())}return l},Dt.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(t!==null?this.getCoordinateSequenceFactory().create(t):null)},Dt.prototype.createPoint=function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof L){var t=arguments[0];return this.createPoint(t!==null?this.getCoordinateSequenceFactory().create([t]):null)}else if(_t(arguments[0],Ft)){var e=arguments[0];return new Nr(e,this)}}},Dt.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},Dt.prototype.createPolygon=function(){if(arguments.length===0)return new Ne(null,null,this);if(arguments.length===1){if(_t(arguments[0],Ft)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}else if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}else if(arguments[0]instanceof gi){var n=arguments[0];return this.createPolygon(n,null)}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];return new Ne(i,s,this)}},Dt.prototype.getSRID=function(){return this._SRID},Dt.prototype.createGeometryCollection=function(){if(arguments.length===0)return new er(null,this);if(arguments.length===1){var t=arguments[0];return new er(t,this)}},Dt.prototype.createGeometry=function(t){var e=new rn(this);return e.edit(t,{edit:function(){if(arguments.length===2){var n=arguments[0];return this._coordinateSequenceFactory.create(n)}}})},Dt.prototype.getPrecisionModel=function(){return this._precisionModel},Dt.prototype.createLinearRing=function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(t!==null?this.getCoordinateSequenceFactory().create(t):null)}else if(_t(arguments[0],Ft)){var e=arguments[0];return new gi(e,this)}}},Dt.prototype.createMultiPolygon=function(){if(arguments.length===0)return new mi(null,this);if(arguments.length===1){var t=arguments[0];return new mi(t,this)}},Dt.prototype.createMultiPoint=function(){var t=this;if(arguments.length===0)return new iu(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];return new iu(e,this)}else if(arguments[0]instanceof Array){var n=arguments[0];return this.createMultiPoint(n!==null?this.getCoordinateSequenceFactory().create(n):null)}else if(_t(arguments[0],Ft)){var i=arguments[0];if(i===null)return this.createMultiPoint(new Array(0).fill(null));for(var s=new Array(i.size()).fill(null),a=0;a<i.size();a++){var o=t.getCoordinateSequenceFactory().create(1,i.getDimension());ve.copy(i,a,o,0,1),s[a]=t.createPoint(o)}return this.createMultiPoint(s)}}},Dt.prototype.interfaces_=function(){return[$r]},Dt.prototype.getClass=function(){return Dt},Dt.toMultiPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},Dt.toGeometryArray=function(t){if(t===null)return null;var e=new Array(t.size()).fill(null);return t.toArray(e)},Dt.getDefaultCoordinateSequenceFactory=function(){return vi.instance()},Dt.toMultiLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},Dt.toLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},Dt.toMultiPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},Dt.toLinearRingArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},Dt.toPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},Dt.toPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},Dt.createPointFromInternalCoord=function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)},fg.serialVersionUID.get=function(){return-6820524753094096e3},Object.defineProperties(Dt,fg);var I_=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],fc=function(t){this.geometryFactory=t||new Dt};fc.prototype.read=function(t){var e;typeof t=="string"?e=JSON.parse(t):e=t;var n=e.type;if(!Jn[n])throw new Error("Unknown GeoJSON type: "+e.type);return I_.indexOf(n)!==-1?Jn[n].apply(this,[e.coordinates]):n==="GeometryCollection"?Jn[n].apply(this,[e.geometries]):Jn[n].apply(this,[e])},fc.prototype.write=function(t){var e=t.getGeometryType();if(!Hi[e])throw new Error("Geometry is not supported");return Hi[e].apply(this,[t])};var Jn={Feature:function(r){var t={};for(var e in r)t[e]=r[e];if(r.geometry){var n=r.geometry.type;if(!Jn[n])throw new Error("Unknown GeoJSON type: "+r.type);t.geometry=this.read(r.geometry)}return r.bbox&&(t.bbox=Jn.bbox.apply(this,[r.bbox])),t},FeatureCollection:function(r){var t=this,e={};if(r.features){e.features=[];for(var n=0;n<r.features.length;++n)e.features.push(t.read(r.features[n]))}return r.bbox&&(e.bbox=this.parse.bbox.apply(this,[r.bbox])),e},coordinates:function(r){for(var t=[],e=0;e<r.length;++e){var n=r[e];t.push(new L(n[0],n[1]))}return t},bbox:function(r){return this.geometryFactory.createLinearRing([new L(r[0],r[1]),new L(r[2],r[1]),new L(r[2],r[3]),new L(r[0],r[3]),new L(r[0],r[1])])},Point:function(r){var t=new L(r[0],r[1]);return this.geometryFactory.createPoint(t)},MultiPoint:function(r){for(var t=this,e=[],n=0;n<r.length;++n)e.push(Jn.Point.apply(t,[r[n]]));return this.geometryFactory.createMultiPoint(e)},LineString:function(r){var t=Jn.coordinates.apply(this,[r]);return this.geometryFactory.createLineString(t)},MultiLineString:function(r){for(var t=this,e=[],n=0;n<r.length;++n)e.push(Jn.LineString.apply(t,[r[n]]));return this.geometryFactory.createMultiLineString(e)},Polygon:function(r){for(var t=this,e=Jn.coordinates.apply(this,[r[0]]),n=this.geometryFactory.createLinearRing(e),i=[],s=1;s<r.length;++s){var a=r[s],o=Jn.coordinates.apply(t,[a]),l=t.geometryFactory.createLinearRing(o);i.push(l)}return this.geometryFactory.createPolygon(n,i)},MultiPolygon:function(r){for(var t=this,e=[],n=0;n<r.length;++n){var i=r[n];e.push(Jn.Polygon.apply(t,[i]))}return this.geometryFactory.createMultiPolygon(e)},GeometryCollection:function(r){for(var t=this,e=[],n=0;n<r.length;++n){var i=r[n];e.push(t.read(i))}return this.geometryFactory.createGeometryCollection(e)}},Hi={coordinate:function(r){return[r.x,r.y]},Point:function(r){var t=Hi.coordinate.apply(this,[r.getCoordinate()]);return{type:"Point",coordinates:t}},MultiPoint:function(r){for(var t=this,e=[],n=0;n<r._geometries.length;++n){var i=r._geometries[n],s=Hi.Point.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiPoint",coordinates:e}},LineString:function(r){for(var t=this,e=[],n=r.getCoordinates(),i=0;i<n.length;++i){var s=n[i];e.push(Hi.coordinate.apply(t,[s]))}return{type:"LineString",coordinates:e}},MultiLineString:function(r){for(var t=this,e=[],n=0;n<r._geometries.length;++n){var i=r._geometries[n],s=Hi.LineString.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiLineString",coordinates:e}},Polygon:function(r){var t=this,e=[],n=Hi.LineString.apply(this,[r._shell]);e.push(n.coordinates);for(var i=0;i<r._holes.length;++i){var s=r._holes[i],a=Hi.LineString.apply(t,[s]);e.push(a.coordinates)}return{type:"Polygon",coordinates:e}},MultiPolygon:function(r){for(var t=this,e=[],n=0;n<r._geometries.length;++n){var i=r._geometries[n],s=Hi.Polygon.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiPolygon",coordinates:e}},GeometryCollection:function(r){for(var t=this,e=[],n=0;n<r._geometries.length;++n){var i=r._geometries[n],s=i.getGeometryType();e.push(Hi[s].apply(t,[i]))}return{type:"GeometryCollection",geometries:e}}},Xf=function(t){this.geometryFactory=t||new Dt,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new fc(this.geometryFactory)};Xf.prototype.read=function(t){var e=this.parser.read(t);return this.precisionModel.getType()===Ut.FIXED&&this.reducePrecision(e),e},Xf.prototype.reducePrecision=function(t){var e=this,n,i;if(t.coordinate)this.precisionModel.makePrecise(t.coordinate);else if(t.points)for(n=0,i=t.points.length;n<i;n++)e.precisionModel.makePrecise(t.points[n]);else if(t.geometries)for(n=0,i=t.geometries.length;n<i;n++)e.reducePrecision(t.geometries[n])};var dg=function(){this.parser=new fc(this.geometryFactory)};dg.prototype.write=function(t){return this.parser.write(t)};var K=function(){},dc={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};K.prototype.interfaces_=function(){return[]},K.prototype.getClass=function(){return K},K.opposite=function(t){return t===K.LEFT?K.RIGHT:t===K.RIGHT?K.LEFT:t},dc.ON.get=function(){return 0},dc.LEFT.get=function(){return 1},dc.RIGHT.get=function(){return 2},Object.defineProperties(K,dc);function pc(r){this.message=r||""}pc.prototype=new Error,pc.prototype.name="EmptyStackException";function Kn(){this.array_=[]}Kn.prototype=new Pn,Kn.prototype.add=function(r){return this.array_.push(r),!0},Kn.prototype.get=function(r){if(r<0||r>=this.size())throw new Error;return this.array_[r]},Kn.prototype.push=function(r){return this.array_.push(r),r},Kn.prototype.pop=function(r){if(this.array_.length===0)throw new pc;return this.array_.pop()},Kn.prototype.peek=function(){if(this.array_.length===0)throw new pc;return this.array_[this.array_.length-1]},Kn.prototype.empty=function(){return this.array_.length===0},Kn.prototype.isEmpty=function(){return this.empty()},Kn.prototype.search=function(r){return this.array_.indexOf(r)},Kn.prototype.size=function(){return this.array_.length},Kn.prototype.toArray=function(){for(var r=this,t=[],e=0,n=this.array_.length;e<n;e++)t.push(r.array_[e]);return t};var Qn=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};Qn.prototype.getCoordinate=function(){return this._minCoord},Qn.prototype.getRightmostSide=function(t,e){var n=this.getRightmostSideOfSegment(t,e);return n<0&&(n=this.getRightmostSideOfSegment(t,e-1)),n<0&&(this._minCoord=null,this.checkForRightmostCoordinate(t)),n},Qn.prototype.findRightmostEdgeAtVertex=function(){var t=this._minDe.getEdge().getCoordinates();Mt.isTrue(this._minIndex>0&&this._minIndex<t.length,"rightmost point expected to be interior vertex of edge");var e=t[this._minIndex-1],n=t[this._minIndex+1],i=et.computeOrientation(this._minCoord,n,e),s=!1;(e.y<this._minCoord.y&&n.y<this._minCoord.y&&i===et.COUNTERCLOCKWISE||e.y>this._minCoord.y&&n.y>this._minCoord.y&&i===et.CLOCKWISE)&&(s=!0),s&&(this._minIndex=this._minIndex-1)},Qn.prototype.getRightmostSideOfSegment=function(t,e){var n=t.getEdge(),i=n.getCoordinates();if(e<0||e+1>=i.length||i[e].y===i[e+1].y)return-1;var s=K.LEFT;return i[e].y<i[e+1].y&&(s=K.RIGHT),s},Qn.prototype.getEdge=function(){return this._orientedDe},Qn.prototype.checkForRightmostCoordinate=function(t){for(var e=this,n=t.getEdge().getCoordinates(),i=0;i<n.length-1;i++)(e._minCoord===null||n[i].x>e._minCoord.x)&&(e._minDe=t,e._minIndex=i,e._minCoord=n[i])},Qn.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode(),e=t.getEdges();this._minDe=e.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},Qn.prototype.findEdge=function(t){for(var e=this,n=t.iterator();n.hasNext();){var i=n.next();i.isForward()&&e.checkForRightmostCoordinate(i)}Mt.isTrue(this._minIndex!==0||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),this._minIndex===0?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe;var s=this.getRightmostSide(this._minDe,this._minIndex);s===K.LEFT&&(this._orientedDe=this._minDe.getSym())},Qn.prototype.interfaces_=function(){return[]},Qn.prototype.getClass=function(){return Qn};var Xi=function(r){function t(e,n){r.call(this,t.msgWithCoord(e,n)),this.pt=n?new L(n):null,this.name="TopologyException"}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.getCoordinate=function(){return this.pt},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.msgWithCoord=function(n,i){return i?n:n+" [ "+i+" ]"},t}(zi),gc=function(){this.array_=[]};gc.prototype.addLast=function(t){this.array_.push(t)},gc.prototype.removeFirst=function(){return this.array_.shift()},gc.prototype.isEmpty=function(){return this.array_.length===0};var rr=function(){this._finder=null,this._dirEdgeList=new Z,this._nodes=new Z,this._rightMostCoord=null,this._env=null,this._finder=new Qn};rr.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.setVisited(!1)}},rr.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},rr.prototype.computeNodeDepth=function(t){for(var e=this,n=null,i=t.getEdges().iterator();i.hasNext();){var s=i.next();if(s.isVisited()||s.getSym().isVisited()){n=s;break}}if(n===null)throw new Xi("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(n);for(var a=t.getEdges().iterator();a.hasNext();){var o=a.next();o.setVisited(!0),e.copySymDepths(o)}},rr.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(K.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},rr.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},rr.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(K.RIGHT)>=1&&e.getDepth(K.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},rr.prototype.computeDepths=function(t){var e=this,n=new zf,i=new gc,s=t.getNode();for(i.addLast(s),n.add(s),t.setVisited(!0);!i.isEmpty();){var a=i.removeFirst();n.add(a),e.computeNodeDepth(a);for(var o=a.getEdges().iterator();o.hasNext();){var l=o.next(),u=l.getSym();if(!u.isVisited()){var c=u.getNode();n.contains(c)||(i.addLast(c),n.add(c))}}}},rr.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.x<e._rightMostCoord.x?-1:this._rightMostCoord.x>e._rightMostCoord.x?1:0},rr.prototype.getEnvelope=function(){if(this._env===null){for(var t=new dt,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next(),i=n.getEdge().getCoordinates(),s=0;s<i.length-1;s++)t.expandToInclude(i[s]);this._env=t}return this._env},rr.prototype.addReachable=function(t){var e=this,n=new Kn;for(n.add(t);!n.empty();){var i=n.pop();e.add(i,n)}},rr.prototype.copySymDepths=function(t){var e=t.getSym();e.setDepth(K.LEFT,t.getDepth(K.RIGHT)),e.setDepth(K.RIGHT,t.getDepth(K.LEFT))},rr.prototype.add=function(t,e){var n=this;t.setVisited(!0),this._nodes.add(t);for(var i=t.getEdges().iterator();i.hasNext();){var s=i.next();n._dirEdgeList.add(s);var a=s.getSym(),o=a.getNode();o.isVisited()||e.push(o)}},rr.prototype.getNodes=function(){return this._nodes},rr.prototype.getDirectedEdges=function(){return this._dirEdgeList},rr.prototype.interfaces_=function(){return[Zr]},rr.prototype.getClass=function(){return rr};var te=function r(){var t=this;if(this.location=null,arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];this.init(e.length)}else if(Number.isInteger(arguments[0])){var n=arguments[0];this.init(1),this.location[K.ON]=n}else if(arguments[0]instanceof r){var i=arguments[0];if(this.init(i.location.length),i!==null)for(var s=0;s<this.location.length;s++)t.location[s]=i.location[s]}}else if(arguments.length===3){var a=arguments[0],o=arguments[1],l=arguments[2];this.init(3),this.location[K.ON]=a,this.location[K.LEFT]=o,this.location[K.RIGHT]=l}};te.prototype.setAllLocations=function(t){for(var e=this,n=0;n<this.location.length;n++)e.location[n]=t},te.prototype.isNull=function(){for(var t=this,e=0;e<this.location.length;e++)if(t.location[e]!==F.NONE)return!1;return!0},te.prototype.setAllLocationsIfNull=function(t){for(var e=this,n=0;n<this.location.length;n++)e.location[n]===F.NONE&&(e.location[n]=t)},te.prototype.isLine=function(){return this.location.length===1},te.prototype.merge=function(t){var e=this;if(t.location.length>this.location.length){var n=new Array(3).fill(null);n[K.ON]=this.location[K.ON],n[K.LEFT]=F.NONE,n[K.RIGHT]=F.NONE,this.location=n}for(var i=0;i<this.location.length;i++)e.location[i]===F.NONE&&i<t.location.length&&(e.location[i]=t.location[i])},te.prototype.getLocations=function(){return this.location},te.prototype.flip=function(){if(this.location.length<=1)return null;var t=this.location[K.LEFT];this.location[K.LEFT]=this.location[K.RIGHT],this.location[K.RIGHT]=t},te.prototype.toString=function(){var t=new Vn;return this.location.length>1&&t.append(F.toLocationSymbol(this.location[K.LEFT])),t.append(F.toLocationSymbol(this.location[K.ON])),this.location.length>1&&t.append(F.toLocationSymbol(this.location[K.RIGHT])),t.toString()},te.prototype.setLocations=function(t,e,n){this.location[K.ON]=t,this.location[K.LEFT]=e,this.location[K.RIGHT]=n},te.prototype.get=function(t){return t<this.location.length?this.location[t]:F.NONE},te.prototype.isArea=function(){return this.location.length>1},te.prototype.isAnyNull=function(){for(var t=this,e=0;e<this.location.length;e++)if(t.location[e]===F.NONE)return!0;return!1},te.prototype.setLocation=function(){if(arguments.length===1){var t=arguments[0];this.setLocation(K.ON,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.location[e]=n}},te.prototype.init=function(t){this.location=new Array(t).fill(null),this.setAllLocations(F.NONE)},te.prototype.isEqualOnSide=function(t,e){return this.location[e]===t.location[e]},te.prototype.allPositionsEqual=function(t){for(var e=this,n=0;n<this.location.length;n++)if(e.location[n]!==t)return!1;return!0},te.prototype.interfaces_=function(){return[]},te.prototype.getClass=function(){return te};var Jt=function r(){if(this.elt=new Array(2).fill(null),arguments.length===1){if(Number.isInteger(arguments[0])){var t=arguments[0];this.elt[0]=new te(t),this.elt[1]=new te(t)}else if(arguments[0]instanceof r){var e=arguments[0];this.elt[0]=new te(e.elt[0]),this.elt[1]=new te(e.elt[1])}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.elt[0]=new te(F.NONE),this.elt[1]=new te(F.NONE),this.elt[n].setLocation(i)}else if(arguments.length===3){var s=arguments[0],a=arguments[1],o=arguments[2];this.elt[0]=new te(s,a,o),this.elt[1]=new te(s,a,o)}else if(arguments.length===4){var l=arguments[0],u=arguments[1],c=arguments[2],h=arguments[3];this.elt[0]=new te(F.NONE,F.NONE,F.NONE),this.elt[1]=new te(F.NONE,F.NONE,F.NONE),this.elt[l].setLocations(u,c,h)}};Jt.prototype.getGeometryCount=function(){var t=0;return this.elt[0].isNull()||t++,this.elt[1].isNull()||t++,t},Jt.prototype.setAllLocations=function(t,e){this.elt[t].setAllLocations(e)},Jt.prototype.isNull=function(t){return this.elt[t].isNull()},Jt.prototype.setAllLocationsIfNull=function(){if(arguments.length===1){var t=arguments[0];this.setAllLocationsIfNull(0,t),this.setAllLocationsIfNull(1,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.elt[e].setAllLocationsIfNull(n)}},Jt.prototype.isLine=function(t){return this.elt[t].isLine()},Jt.prototype.merge=function(t){for(var e=this,n=0;n<2;n++)e.elt[n]===null&&t.elt[n]!==null?e.elt[n]=new te(t.elt[n]):e.elt[n].merge(t.elt[n])},Jt.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},Jt.prototype.getLocation=function(){if(arguments.length===1){var t=arguments[0];return this.elt[t].get(K.ON)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return this.elt[e].get(n)}},Jt.prototype.toString=function(){var t=new Vn;return this.elt[0]!==null&&(t.append("A:"),t.append(this.elt[0].toString())),this.elt[1]!==null&&(t.append(" B:"),t.append(this.elt[1].toString())),t.toString()},Jt.prototype.isArea=function(){if(arguments.length===0)return this.elt[0].isArea()||this.elt[1].isArea();if(arguments.length===1){var t=arguments[0];return this.elt[t].isArea()}},Jt.prototype.isAnyNull=function(t){return this.elt[t].isAnyNull()},Jt.prototype.setLocation=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.elt[t].setLocation(K.ON,e)}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this.elt[n].setLocation(i,s)}},Jt.prototype.isEqualOnSide=function(t,e){return this.elt[0].isEqualOnSide(t.elt[0],e)&&this.elt[1].isEqualOnSide(t.elt[1],e)},Jt.prototype.allPositionsEqual=function(t,e){return this.elt[t].allPositionsEqual(e)},Jt.prototype.toLine=function(t){this.elt[t].isArea()&&(this.elt[t]=new te(this.elt[t].location[0]))},Jt.prototype.interfaces_=function(){return[]},Jt.prototype.getClass=function(){return Jt},Jt.toLineLabel=function(t){for(var e=new Jt(F.NONE),n=0;n<2;n++)e.setLocation(n,t.getLocation(n));return e};var Se=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new Z,this._pts=new Z,this._label=new Jt(F.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new Z,this._geometryFactory=null;var t=arguments[0],e=arguments[1];this._geometryFactory=e,this.computePoints(t),this.computeRing()};Se.prototype.computeRing=function(){var t=this;if(this._ring!==null)return null;for(var e=new Array(this._pts.size()).fill(null),n=0;n<this._pts.size();n++)e[n]=t._pts.get(n);this._ring=this._geometryFactory.createLinearRing(e),this._isHole=et.isCCW(this._ring.getCoordinates())},Se.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},Se.prototype.computePoints=function(t){var e=this;this._startDe=t;var n=t,i=!0;do{if(n===null)throw new Xi("Found null DirectedEdge");if(n.getEdgeRing()===e)throw new Xi("Directed Edge visited twice during ring-building at "+n.getCoordinate());e._edges.add(n);var s=n.getLabel();Mt.isTrue(s.isArea()),e.mergeLabel(s),e.addPoints(n.getEdge(),n.isForward(),i),i=!1,e.setEdgeRing(n,e),n=e.getNext(n)}while(n!==this._startDe)},Se.prototype.getLinearRing=function(){return this._ring},Se.prototype.getCoordinate=function(t){return this._pts.get(t)},Se.prototype.computeMaxNodeDegree=function(){var t=this;this._maxNodeDegree=0;var e=this._startDe;do{var n=e.getNode(),i=n.getEdges().getOutgoingDegree(t);i>t._maxNodeDegree&&(t._maxNodeDegree=i),e=t.getNext(e)}while(e!==this._startDe);this._maxNodeDegree*=2},Se.prototype.addPoints=function(t,e,n){var i=this,s=t.getCoordinates();if(e){var a=1;n&&(a=0);for(var o=a;o<s.length;o++)i._pts.add(s[o])}else{var l=s.length-2;n&&(l=s.length-1);for(var u=l;u>=0;u--)i._pts.add(s[u])}},Se.prototype.isHole=function(){return this._isHole},Se.prototype.setInResult=function(){var t=this._startDe;do t.getEdge().setInResult(!0),t=t.getNext();while(t!==this._startDe)},Se.prototype.containsPoint=function(t){var e=this.getLinearRing(),n=e.getEnvelopeInternal();if(!n.contains(t)||!et.isPointInRing(t,e.getCoordinates()))return!1;for(var i=this._holes.iterator();i.hasNext();){var s=i.next();if(s.containsPoint(t))return!1}return!0},Se.prototype.addHole=function(t){this._holes.add(t)},Se.prototype.isShell=function(){return this._shell===null},Se.prototype.getLabel=function(){return this._label},Se.prototype.getEdges=function(){return this._edges},Se.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},Se.prototype.getShell=function(){return this._shell},Se.prototype.mergeLabel=function(){if(arguments.length===1){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],i=e.getLocation(n,K.RIGHT);if(i===F.NONE)return null;if(this._label.getLocation(n)===F.NONE)return this._label.setLocation(n,i),null}},Se.prototype.setShell=function(t){this._shell=t,t!==null&&t.addHole(this)},Se.prototype.toPolygon=function(t){for(var e=this,n=new Array(this._holes.size()).fill(null),i=0;i<this._holes.size();i++)n[i]=e._holes.get(i).getLinearRing();var s=t.createPolygon(this.getLinearRing(),n);return s},Se.prototype.interfaces_=function(){return[]},Se.prototype.getClass=function(){return Se};var M_=function(r){function t(){var e=arguments[0],n=arguments[1];r.call(this,e,n)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.setEdgeRing=function(n,i){n.setMinEdgeRing(i)},t.prototype.getNext=function(n){return n.getNextMin()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Se),N_=function(r){function t(){var e=arguments[0],n=arguments[1];r.call(this,e,n)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.buildMinimalRings=function(){var n=this,i=new Z,s=this._startDe;do{if(s.getMinEdgeRing()===null){var a=new M_(s,n._geometryFactory);i.add(a)}s=s.getNext()}while(s!==this._startDe);return i},t.prototype.setEdgeRing=function(n,i){n.setEdgeRing(i)},t.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var n=this,i=this._startDe;do{var s=i.getNode();s.getEdges().linkMinimalDirectedEdges(n),i=i.getNext()}while(i!==this._startDe)},t.prototype.getNext=function(n){return n.getNext()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Se),zr=function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this._label=t}}};zr.prototype.setVisited=function(t){this._isVisited=t},zr.prototype.setInResult=function(t){this._isInResult=t},zr.prototype.isCovered=function(){return this._isCovered},zr.prototype.isCoveredSet=function(){return this._isCoveredSet},zr.prototype.setLabel=function(t){this._label=t},zr.prototype.getLabel=function(){return this._label},zr.prototype.setCovered=function(t){this._isCovered=t,this._isCoveredSet=!0},zr.prototype.updateIM=function(t){Mt.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(t)},zr.prototype.isInResult=function(){return this._isInResult},zr.prototype.isVisited=function(){return this._isVisited},zr.prototype.interfaces_=function(){return[]},zr.prototype.getClass=function(){return zr};var mc=function(r){function t(){r.call(this),this._coord=null,this._edges=null;var e=arguments[0],n=arguments[1];this._coord=e,this._edges=n,this._label=new Jt(0,F.NONE)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.isIncidentEdgeInResult=function(){for(var n=this.getEdges().getEdges().iterator();n.hasNext();){var i=n.next();if(i.getEdge().isInResult())return!0}return!1},t.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},t.prototype.getCoordinate=function(){return this._coord},t.prototype.print=function(n){n.println("node "+this._coord+" lbl: "+this._label)},t.prototype.computeIM=function(n){},t.prototype.computeMergedLocation=function(n,i){var s=F.NONE;if(s=this._label.getLocation(i),!n.isNull(i)){var a=n.getLocation(i);s!==F.BOUNDARY&&(s=a)}return s},t.prototype.setLabel=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1];this._label===null?this._label=new Jt(n,i):this._label.setLocation(n,i)}else return r.prototype.setLabel.apply(this,arguments)},t.prototype.getEdges=function(){return this._edges},t.prototype.mergeLabel=function(){var n=this;if(arguments[0]instanceof t){var i=arguments[0];this.mergeLabel(i._label)}else if(arguments[0]instanceof Jt)for(var s=arguments[0],a=0;a<2;a++){var o=n.computeMergedLocation(s,a),l=n._label.getLocation(a);l===F.NONE&&n._label.setLocation(a,o)}},t.prototype.add=function(n){this._edges.insert(n),n.setNode(this)},t.prototype.setLabelBoundary=function(n){if(this._label===null)return null;var i=F.NONE;this._label!==null&&(i=this._label.getLocation(n));var s=null;switch(i){case F.BOUNDARY:s=F.INTERIOR;break;case F.INTERIOR:s=F.BOUNDARY;break;default:s=F.BOUNDARY;break}this._label.setLocation(n,s)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(zr),Bn=function(){this.nodeMap=new Be,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};Bn.prototype.find=function(t){return this.nodeMap.get(t)},Bn.prototype.addNode=function(){if(arguments[0]instanceof L){var t=arguments[0],e=this.nodeMap.get(t);return e===null&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}else if(arguments[0]instanceof mc){var n=arguments[0],i=this.nodeMap.get(n.getCoordinate());return i===null?(this.nodeMap.put(n.getCoordinate(),n),n):(i.mergeLabel(n),i)}},Bn.prototype.print=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}},Bn.prototype.iterator=function(){return this.nodeMap.values().iterator()},Bn.prototype.values=function(){return this.nodeMap.values()},Bn.prototype.getBoundaryNodes=function(t){for(var e=new Z,n=this.iterator();n.hasNext();){var i=n.next();i.getLabel().getLocation(t)===F.BOUNDARY&&e.add(i)}return e},Bn.prototype.add=function(t){var e=t.getCoordinate(),n=this.addNode(e);n.add(t)},Bn.prototype.interfaces_=function(){return[]},Bn.prototype.getClass=function(){return Bn};var Qt=function(){},rh={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Qt.prototype.interfaces_=function(){return[]},Qt.prototype.getClass=function(){return Qt},Qt.isNorthern=function(t){return t===Qt.NE||t===Qt.NW},Qt.isOpposite=function(t,e){if(t===e)return!1;var n=(t-e+4)%4;return n===2},Qt.commonHalfPlane=function(t,e){if(t===e)return t;var n=(t-e+4)%4;if(n===2)return-1;var i=t<e?t:e,s=t>e?t:e;return i===0&&s===3?3:i},Qt.isInHalfPlane=function(t,e){return e===Qt.SE?t===Qt.SE||t===Qt.SW:t===e||t===e+1},Qt.quadrant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new oe("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?Qt.NE:Qt.SE:e>=0?Qt.NW:Qt.SW}else if(arguments[0]instanceof L&&arguments[1]instanceof L){var n=arguments[0],i=arguments[1];if(i.x===n.x&&i.y===n.y)throw new oe("Cannot compute the quadrant for two identical points "+n);return i.x>=n.x?i.y>=n.y?Qt.NE:Qt.SE:i.y>=n.y?Qt.NW:Qt.SW}},rh.NE.get=function(){return 0},rh.NW.get=function(){return 1},rh.SW.get=function(){return 2},rh.SE.get=function(){return 3},Object.defineProperties(Qt,rh);var Ze=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,arguments.length===1){var t=arguments[0];this._edge=t}else if(arguments.length===3){var e=arguments[0],n=arguments[1],i=arguments[2],s=null;this._edge=e,this.init(n,i),this._label=s}else if(arguments.length===4){var a=arguments[0],o=arguments[1],l=arguments[2],u=arguments[3];this._edge=a,this.init(o,l),this._label=u}};Ze.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant<t._quadrant?-1:et.computeOrientation(t._p0,t._p1,this._p1)},Ze.prototype.getDy=function(){return this._dy},Ze.prototype.getCoordinate=function(){return this._p0},Ze.prototype.setNode=function(t){this._node=t},Ze.prototype.print=function(t){var e=Math.atan2(this._dy,this._dx),n=this.getClass().getName(),i=n.lastIndexOf("."),s=n.substring(i+1);t.print(" "+s+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+" "+this._label)},Ze.prototype.compareTo=function(t){var e=t;return this.compareDirection(e)},Ze.prototype.getDirectedCoordinate=function(){return this._p1},Ze.prototype.getDx=function(){return this._dx},Ze.prototype.getLabel=function(){return this._label},Ze.prototype.getEdge=function(){return this._edge},Ze.prototype.getQuadrant=function(){return this._quadrant},Ze.prototype.getNode=function(){return this._node},Ze.prototype.toString=function(){var t=Math.atan2(this._dy,this._dx),e=this.getClass().getName(),n=e.lastIndexOf("."),i=e.substring(n+1);return" "+i+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+" "+this._label},Ze.prototype.computeLabel=function(t){},Ze.prototype.init=function(t,e){this._p0=t,this._p1=e,this._dx=e.x-t.x,this._dy=e.y-t.y,this._quadrant=Qt.quadrant(this._dx,this._dy),Mt.isTrue(!(this._dx===0&&this._dy===0),"EdgeEnd with identical endpoints found")},Ze.prototype.interfaces_=function(){return[Zr]},Ze.prototype.getClass=function(){return Ze};var Yf=function(r){function t(){var e=arguments[0],n=arguments[1];if(r.call(this,e),this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999],this._isForward=n,n)this.init(e.getCoordinate(0),e.getCoordinate(1));else{var i=e.getNumPoints()-1;this.init(e.getCoordinate(i),e.getCoordinate(i-1))}this.computeDirectedLabel()}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.getNextMin=function(){return this._nextMin},t.prototype.getDepth=function(n){return this._depth[n]},t.prototype.setVisited=function(n){this._isVisited=n},t.prototype.computeDirectedLabel=function(){this._label=new Jt(this._edge.getLabel()),this._isForward||this._label.flip()},t.prototype.getNext=function(){return this._next},t.prototype.setDepth=function(n,i){if(this._depth[n]!==-999&&this._depth[n]!==i)throw new Xi("assigned depths do not match",this.getCoordinate());this._depth[n]=i},t.prototype.isInteriorAreaEdge=function(){for(var n=this,i=!0,s=0;s<2;s++)n._label.isArea(s)&&n._label.getLocation(s,K.LEFT)===F.INTERIOR&&n._label.getLocation(s,K.RIGHT)===F.INTERIOR||(i=!1);return i},t.prototype.setNextMin=function(n){this._nextMin=n},t.prototype.print=function(n){r.prototype.print.call(this,n),n.print(" "+this._depth[K.LEFT]+"/"+this._depth[K.RIGHT]),n.print(" ("+this.getDepthDelta()+")"),this._isInResult&&n.print(" inResult")},t.prototype.setMinEdgeRing=function(n){this._minEdgeRing=n},t.prototype.isLineEdge=function(){var n=this._label.isLine(0)||this._label.isLine(1),i=!this._label.isArea(0)||this._label.allPositionsEqual(0,F.EXTERIOR),s=!this._label.isArea(1)||this._label.allPositionsEqual(1,F.EXTERIOR);return n&&i&&s},t.prototype.setEdgeRing=function(n){this._edgeRing=n},t.prototype.getMinEdgeRing=function(){return this._minEdgeRing},t.prototype.getDepthDelta=function(){var n=this._edge.getDepthDelta();return this._isForward||(n=-n),n},t.prototype.setInResult=function(n){this._isInResult=n},t.prototype.getSym=function(){return this._sym},t.prototype.isForward=function(){return this._isForward},t.prototype.getEdge=function(){return this._edge},t.prototype.printEdge=function(n){this.print(n),n.print(" "),this._isForward?this._edge.print(n):this._edge.printReverse(n)},t.prototype.setSym=function(n){this._sym=n},t.prototype.setVisitedEdge=function(n){this.setVisited(n),this._sym.setVisited(n)},t.prototype.setEdgeDepths=function(n,i){var s=this.getEdge().getDepthDelta();this._isForward||(s=-s);var a=1;n===K.LEFT&&(a=-1);var o=K.opposite(n),l=s*a,u=i+l;this.setDepth(n,i),this.setDepth(o,u)},t.prototype.getEdgeRing=function(){return this._edgeRing},t.prototype.isInResult=function(){return this._isInResult},t.prototype.setNext=function(n){this._next=n},t.prototype.isVisited=function(){return this._isVisited},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.depthFactor=function(n,i){return n===F.EXTERIOR&&i===F.INTERIOR?1:n===F.INTERIOR&&i===F.EXTERIOR?-1:0},t}(Ze),su=function(){};su.prototype.createNode=function(t){return new mc(t,null)},su.prototype.interfaces_=function(){return[]},su.prototype.getClass=function(){return su};var fe=function(){if(this._edges=new Z,this._nodes=null,this._edgeEndList=new Z,arguments.length===0)this._nodes=new Bn(new su);else if(arguments.length===1){var t=arguments[0];this._nodes=new Bn(t)}};fe.prototype.printEdges=function(t){var e=this;t.println("Edges:");for(var n=0;n<this._edges.size();n++){t.println("edge "+n+":");var i=e._edges.get(n);i.print(t),i.eiList.print(t)}},fe.prototype.find=function(t){return this._nodes.find(t)},fe.prototype.addNode=function(){if(arguments[0]instanceof mc){var t=arguments[0];return this._nodes.addNode(t)}else if(arguments[0]instanceof L){var e=arguments[0];return this._nodes.addNode(e)}},fe.prototype.getNodeIterator=function(){return this._nodes.iterator()},fe.prototype.linkResultDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){var e=t.next();e.getEdges().linkResultDirectedEdges()}},fe.prototype.debugPrintln=function(t){Ve.out.println(t)},fe.prototype.isBoundaryNode=function(t,e){var n=this._nodes.find(e);if(n===null)return!1;var i=n.getLabel();return i!==null&&i.getLocation(t)===F.BOUNDARY},fe.prototype.linkAllDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){var e=t.next();e.getEdges().linkAllDirectedEdges()}},fe.prototype.matchInSameDirection=function(t,e,n,i){return t.equals(n)?et.computeOrientation(t,e,i)===et.COLLINEAR&&Qt.quadrant(t,e)===Qt.quadrant(n,i):!1},fe.prototype.getEdgeEnds=function(){return this._edgeEndList},fe.prototype.debugPrint=function(t){Ve.out.print(t)},fe.prototype.getEdgeIterator=function(){return this._edges.iterator()},fe.prototype.findEdgeInSameDirection=function(t,e){for(var n=this,i=0;i<this._edges.size();i++){var s=n._edges.get(i),a=s.getCoordinates();if(n.matchInSameDirection(t,e,a[0],a[1])||n.matchInSameDirection(t,e,a[a.length-1],a[a.length-2]))return s}return null},fe.prototype.insertEdge=function(t){this._edges.add(t)},fe.prototype.findEdgeEnd=function(t){for(var e=this.getEdgeEnds().iterator();e.hasNext();){var n=e.next();if(n.getEdge()===t)return n}return null},fe.prototype.addEdges=function(t){for(var e=this,n=t.iterator();n.hasNext();){var i=n.next();e._edges.add(i);var s=new Yf(i,!0),a=new Yf(i,!1);s.setSym(a),a.setSym(s),e.add(s),e.add(a)}},fe.prototype.add=function(t){this._nodes.add(t),this._edgeEndList.add(t)},fe.prototype.getNodes=function(){return this._nodes.values()},fe.prototype.findEdge=function(t,e){for(var n=this,i=0;i<this._edges.size();i++){var s=n._edges.get(i),a=s.getCoordinates();if(t.equals(a[0])&&e.equals(a[1]))return s}return null},fe.prototype.interfaces_=function(){return[]},fe.prototype.getClass=function(){return fe},fe.linkResultDirectedEdges=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.getEdges().linkResultDirectedEdges()}};var br=function(){this._geometryFactory=null,this._shellList=new Z;var t=arguments[0];this._geometryFactory=t};br.prototype.sortShellsAndHoles=function(t,e,n){for(var i=t.iterator();i.hasNext();){var s=i.next();s.isHole()?n.add(s):e.add(s)}},br.prototype.computePolygons=function(t){for(var e=this,n=new Z,i=t.iterator();i.hasNext();){var s=i.next(),a=s.toPolygon(e._geometryFactory);n.add(a)}return n},br.prototype.placeFreeHoles=function(t,e){for(var n=this,i=e.iterator();i.hasNext();){var s=i.next();if(s.getShell()===null){var a=n.findEdgeRingContaining(s,t);if(a===null)throw new Xi("unable to assign hole to a shell",s.getCoordinate(0));s.setShell(a)}}},br.prototype.buildMinimalEdgeRings=function(t,e,n){for(var i=this,s=new Z,a=t.iterator();a.hasNext();){var o=a.next();if(o.getMaxNodeDegree()>2){o.linkDirectedEdgesForMinimalEdgeRings();var l=o.buildMinimalRings(),u=i.findShell(l);u!==null?(i.placePolygonHoles(u,l),e.add(u)):n.addAll(l)}else s.add(o)}return s},br.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();){var n=e.next();if(n.containsPoint(t))return!0}return!1},br.prototype.buildMaximalEdgeRings=function(t){for(var e=this,n=new Z,i=t.iterator();i.hasNext();){var s=i.next();if(s.isInResult()&&s.getLabel().isArea()&&s.getEdgeRing()===null){var a=new N_(s,e._geometryFactory);n.add(a),a.setInResult()}}return n},br.prototype.placePolygonHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next();i.isHole()&&i.setShell(t)}},br.prototype.getPolygons=function(){var t=this.computePolygons(this._shellList);return t},br.prototype.findEdgeRingContaining=function(t,e){for(var n=t.getLinearRing(),i=n.getEnvelopeInternal(),s=n.getCoordinateN(0),a=null,o=null,l=e.iterator();l.hasNext();){var u=l.next(),c=u.getLinearRing(),h=c.getEnvelopeInternal();a!==null&&(o=a.getLinearRing().getEnvelopeInternal());var f=!1;h.contains(i)&&et.isPointInRing(s,c.getCoordinates())&&(f=!0),f&&(a===null||o.contains(h))&&(a=u)}return a},br.prototype.findShell=function(t){for(var e=0,n=null,i=t.iterator();i.hasNext();){var s=i.next();s.isHole()||(n=s,e++)}return Mt.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),n},br.prototype.add=function(){if(arguments.length===1){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(arguments.length===2){var e=arguments[0],n=arguments[1];fe.linkResultDirectedEdges(n);var i=this.buildMaximalEdgeRings(e),s=new Z,a=this.buildMinimalEdgeRings(i,this._shellList,s);this.sortShellsAndHoles(a,this._shellList,s),this.placeFreeHoles(this._shellList,s)}},br.prototype.interfaces_=function(){return[]},br.prototype.getClass=function(){return br};var au=function(){};au.prototype.getBounds=function(){},au.prototype.interfaces_=function(){return[]},au.prototype.getClass=function(){return au};var Mn=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};Mn.prototype.getItem=function(){return this._item},Mn.prototype.getBounds=function(){return this._bounds},Mn.prototype.interfaces_=function(){return[au,$r]},Mn.prototype.getClass=function(){return Mn};var Yi=function(){this._size=null,this._items=null,this._size=0,this._items=new Z,this._items.add(null)};Yi.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},Yi.prototype.size=function(){return this._size},Yi.prototype.reorder=function(t){for(var e=this,n=null,i=this._items.get(t);t*2<=this._size&&(n=t*2,n!==e._size&&e._items.get(n+1).compareTo(e._items.get(n))<0&&n++,e._items.get(n).compareTo(i)<0);t=n)e._items.set(t,e._items.get(n));this._items.set(t,i)},Yi.prototype.clear=function(){this._size=0,this._items.clear()},Yi.prototype.isEmpty=function(){return this._size===0},Yi.prototype.add=function(t){var e=this;this._items.add(null),this._size+=1;var n=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(n/2)))<0;n/=2)e._items.set(n,e._items.get(Math.trunc(n/2)));this._items.set(n,t)},Yi.prototype.interfaces_=function(){return[]},Yi.prototype.getClass=function(){return Yi};var _s=function(){};_s.prototype.visitItem=function(t){},_s.prototype.interfaces_=function(){return[]},_s.prototype.getClass=function(){return _s};var Va=function(){};Va.prototype.insert=function(t,e){},Va.prototype.remove=function(t,e){},Va.prototype.query=function(){},Va.prototype.interfaces_=function(){return[]},Va.prototype.getClass=function(){return Va};var be=function(){if(this._childBoundables=new Z,this._bounds=null,this._level=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this._level=t}}},pg={serialVersionUID:{configurable:!0}};be.prototype.getLevel=function(){return this._level},be.prototype.size=function(){return this._childBoundables.size()},be.prototype.getChildBoundables=function(){return this._childBoundables},be.prototype.addChildBoundable=function(t){Mt.isTrue(this._bounds===null),this._childBoundables.add(t)},be.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},be.prototype.getBounds=function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds},be.prototype.interfaces_=function(){return[au,$r]},be.prototype.getClass=function(){return be},pg.serialVersionUID.get=function(){return 6493722185909574e3},Object.defineProperties(be,pg);var Nn=function(){};Nn.reverseOrder=function(){return{compare:function(e,n){return n.compareTo(e)}}},Nn.min=function(t){return Nn.sort(t),t.get(0)},Nn.sort=function(t,e){var n=t.toArray();e?js.sort(n,e):js.sort(n);for(var i=t.iterator(),s=0,a=n.length;s<a;s++)i.next(),i.set(n[s])},Nn.singletonList=function(t){var e=new Z;return e.add(t),e};var Pe=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var t=arguments[0],e=arguments[1],n=arguments[2];this._boundable1=t,this._boundable2=e,this._itemDistance=n,this._distance=this.distance()};Pe.prototype.expandToQueue=function(t,e){var n=Pe.isComposite(this._boundable1),i=Pe.isComposite(this._boundable2);if(n&&i)return Pe.area(this._boundable1)>Pe.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(n)return this.expand(this._boundable1,this._boundable2,t,e),null;if(i)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new oe("neither boundable is composite")},Pe.prototype.isLeaves=function(){return!(Pe.isComposite(this._boundable1)||Pe.isComposite(this._boundable2))},Pe.prototype.compareTo=function(t){var e=t;return this._distance<e._distance?-1:this._distance>e._distance?1:0},Pe.prototype.expand=function(t,e,n,i){for(var s=this,a=t.getChildBoundables(),o=a.iterator();o.hasNext();){var l=o.next(),u=new Pe(l,e,s._itemDistance);u.getDistance()<i&&n.add(u)}},Pe.prototype.getBoundable=function(t){return t===0?this._boundable1:this._boundable2},Pe.prototype.getDistance=function(){return this._distance},Pe.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},Pe.prototype.interfaces_=function(){return[Zr]},Pe.prototype.getClass=function(){return Pe},Pe.area=function(t){return t.getBounds().getArea()},Pe.isComposite=function(t){return t instanceof be};var Oe=function r(){if(this._root=null,this._built=!1,this._itemBoundables=new Z,this._nodeCapacity=null,arguments.length===0){var t=r.DEFAULT_NODE_CAPACITY;this._nodeCapacity=t}else if(arguments.length===1){var e=arguments[0];Mt.isTrue(e>1,"Node capacity must be greater than 1"),this._nodeCapacity=e}},vc={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};Oe.prototype.getNodeCapacity=function(){return this._nodeCapacity},Oe.prototype.lastNode=function(t){return t.get(t.size()-1)},Oe.prototype.size=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.size(this._root));if(arguments.length===1){for(var e=arguments[0],n=0,i=e.getChildBoundables().iterator();i.hasNext();){var s=i.next();s instanceof be?n+=t.size(s):s instanceof Mn&&(n+=1)}return n}},Oe.prototype.removeItem=function(t,e){for(var n=null,i=t.getChildBoundables().iterator();i.hasNext();){var s=i.next();s instanceof Mn&&s.getItem()===e&&(n=s)}return n!==null?(t.getChildBoundables().remove(n),!0):!1},Oe.prototype.itemsTree=function(){var t=this;if(arguments.length===0){this.build();var e=this.itemsTree(this._root);return e===null?new Z:e}else if(arguments.length===1){for(var n=arguments[0],i=new Z,s=n.getChildBoundables().iterator();s.hasNext();){var a=s.next();if(a instanceof be){var o=t.itemsTree(a);o!==null&&i.add(o)}else a instanceof Mn?i.add(a.getItem()):Mt.shouldNeverReachHere()}return i.size()<=0?null:i}},Oe.prototype.insert=function(t,e){Mt.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new Mn(t,e))},Oe.prototype.boundablesAtLevel=function(){var t=this;if(arguments.length===1){var e=arguments[0],n=new Z;return this.boundablesAtLevel(e,this._root,n),n}else if(arguments.length===3){var i=arguments[0],s=arguments[1],a=arguments[2];if(Mt.isTrue(i>-2),s.getLevel()===i)return a.add(s),null;for(var o=s.getChildBoundables().iterator();o.hasNext();){var l=o.next();l instanceof be?t.boundablesAtLevel(i,l,a):(Mt.isTrue(l instanceof Mn),i===-1&&a.add(l))}return null}},Oe.prototype.query=function(){var t=this;if(arguments.length===1){var e=arguments[0];this.build();var n=new Z;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.query(e,this._root,n),n}else if(arguments.length===2){var i=arguments[0],s=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),i)&&this.query(i,this._root,s)}else if(arguments.length===3){if(_t(arguments[2],_s)&&arguments[0]instanceof Object&&arguments[1]instanceof be)for(var a=arguments[0],o=arguments[1],l=arguments[2],u=o.getChildBoundables(),c=0;c<u.size();c++){var h=u.get(c);t.getIntersectsOp().intersects(h.getBounds(),a)&&(h instanceof be?t.query(a,h,l):h instanceof Mn?l.visitItem(h.getItem()):Mt.shouldNeverReachHere())}else if(_t(arguments[2],Pn)&&arguments[0]instanceof Object&&arguments[1]instanceof be)for(var f=arguments[0],g=arguments[1],m=arguments[2],_=g.getChildBoundables(),E=0;E<_.size();E++){var M=_.get(E);t.getIntersectsOp().intersects(M.getBounds(),f)&&(M instanceof be?t.query(f,M,m):M instanceof Mn?m.add(M.getItem()):Mt.shouldNeverReachHere())}}},Oe.prototype.build=function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0},Oe.prototype.getRoot=function(){return this.build(),this._root},Oe.prototype.remove=function(){var t=this;if(arguments.length===2){var e=arguments[0],n=arguments[1];return this.build(),this.getIntersectsOp().intersects(this._root.getBounds(),e)?this.remove(e,this._root,n):!1}else if(arguments.length===3){var i=arguments[0],s=arguments[1],a=arguments[2],o=this.removeItem(s,a);if(o)return!0;for(var l=null,u=s.getChildBoundables().iterator();u.hasNext();){var c=u.next();if(t.getIntersectsOp().intersects(c.getBounds(),i)&&c instanceof be&&(o=t.remove(i,c,a),o)){l=c;break}}return l!==null&&l.getChildBoundables().isEmpty()&&s.getChildBoundables().remove(l),o}},Oe.prototype.createHigherLevels=function(t,e){Mt.isTrue(!t.isEmpty());var n=this.createParentBoundables(t,e+1);return n.size()===1?n.get(0):this.createHigherLevels(n,e+1)},Oe.prototype.depth=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(arguments.length===1){for(var e=arguments[0],n=0,i=e.getChildBoundables().iterator();i.hasNext();){var s=i.next();if(s instanceof be){var a=t.depth(s);a>n&&(n=a)}}return n+1}},Oe.prototype.createParentBoundables=function(t,e){var n=this;Mt.isTrue(!t.isEmpty());var i=new Z;i.add(this.createNode(e));var s=new Z(t);Nn.sort(s,this.getComparator());for(var a=s.iterator();a.hasNext();){var o=a.next();n.lastNode(i).getChildBoundables().size()===n.getNodeCapacity()&&i.add(n.createNode(e)),n.lastNode(i).addChildBoundable(o)}return i},Oe.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},Oe.prototype.interfaces_=function(){return[$r]},Oe.prototype.getClass=function(){return Oe},Oe.compareDoubles=function(t,e){return t>e?1:t<e?-1:0},vc.IntersectsOp.get=function(){return b_},vc.serialVersionUID.get=function(){return-3886435814360241e3},vc.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(Oe,vc);var b_=function(){},ou=function(){};ou.prototype.distance=function(t,e){},ou.prototype.interfaces_=function(){return[]},ou.prototype.getClass=function(){return ou};var gg=function(r){function t(n){n=n||t.DEFAULT_NODE_CAPACITY,r.call(this,n)}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return t.prototype.createParentBoundablesFromVerticalSlices=function(i,s){var a=this;Mt.isTrue(i.length>0);for(var o=new Z,l=0;l<i.length;l++)o.addAll(a.createParentBoundablesFromVerticalSlice(i[l],s));return o},t.prototype.createNode=function(i){return new mg(i)},t.prototype.size=function(){return arguments.length===0?r.prototype.size.call(this):r.prototype.size.apply(this,arguments)},t.prototype.insert=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];if(i.isNull())return null;r.prototype.insert.call(this,i,s)}else return r.prototype.insert.apply(this,arguments)},t.prototype.getIntersectsOp=function(){return t.intersectsOp},t.prototype.verticalSlices=function(i,s){for(var a=Math.trunc(Math.ceil(i.size()/s)),o=new Array(s).fill(null),l=i.iterator(),u=0;u<s;u++){o[u]=new Z;for(var c=0;l.hasNext()&&c<a;){var h=l.next();o[u].add(h),c++}}return o},t.prototype.query=function(){if(arguments.length===1){var i=arguments[0];return r.prototype.query.call(this,i)}else if(arguments.length===2){var s=arguments[0],a=arguments[1];r.prototype.query.call(this,s,a)}else if(arguments.length===3){if(_t(arguments[2],_s)&&arguments[0]instanceof Object&&arguments[1]instanceof be){var o=arguments[0],l=arguments[1],u=arguments[2];r.prototype.query.call(this,o,l,u)}else if(_t(arguments[2],Pn)&&arguments[0]instanceof Object&&arguments[1]instanceof be){var c=arguments[0],h=arguments[1],f=arguments[2];r.prototype.query.call(this,c,h,f)}}},t.prototype.getComparator=function(){return t.yComparator},t.prototype.createParentBoundablesFromVerticalSlice=function(i,s){return r.prototype.createParentBoundables.call(this,i,s)},t.prototype.remove=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return r.prototype.remove.call(this,i,s)}else return r.prototype.remove.apply(this,arguments)},t.prototype.depth=function(){return arguments.length===0?r.prototype.depth.call(this):r.prototype.depth.apply(this,arguments)},t.prototype.createParentBoundables=function(i,s){Mt.isTrue(!i.isEmpty());var a=Math.trunc(Math.ceil(i.size()/this.getNodeCapacity())),o=new Z(i);Nn.sort(o,t.xComparator);var l=this.verticalSlices(o,Math.trunc(Math.ceil(Math.sqrt(a))));return this.createParentBoundablesFromVerticalSlices(l,s)},t.prototype.nearestNeighbour=function(){if(arguments.length===1){if(_t(arguments[0],ou)){var i=arguments[0],s=new Pe(this.getRoot(),this.getRoot(),i);return this.nearestNeighbour(s)}else if(arguments[0]instanceof Pe){var a=arguments[0];return this.nearestNeighbour(a,wt.POSITIVE_INFINITY)}}else if(arguments.length===2){if(arguments[0]instanceof t&&_t(arguments[1],ou)){var o=arguments[0],l=arguments[1],u=new Pe(this.getRoot(),o.getRoot(),l);return this.nearestNeighbour(u)}else if(arguments[0]instanceof Pe&&typeof arguments[1]=="number"){var c=arguments[0],h=arguments[1],f=h,g=null,m=new Yi;for(m.add(c);!m.isEmpty()&&f>0;){var _=m.poll(),E=_.getDistance();if(E>=f)break;_.isLeaves()?(f=E,g=_):_.expandToQueue(m,f)}return[g.getBoundable(0).getItem(),g.getBoundable(1).getItem()]}}else if(arguments.length===3){var M=arguments[0],y=arguments[1],w=arguments[2],v=new Mn(M,y),S=new Pe(this.getRoot(),v,w);return this.nearestNeighbour(S)[0]}},t.prototype.interfaces_=function(){return[Va,$r]},t.prototype.getClass=function(){return t},t.centreX=function(i){return t.avg(i.getMinX(),i.getMaxX())},t.avg=function(i,s){return(i+s)/2},t.centreY=function(i){return t.avg(i.getMinY(),i.getMaxY())},e.STRtreeNode.get=function(){return mg},e.serialVersionUID.get=function(){return 0x39920f7d5f261e0},e.xComparator.get=function(){return{interfaces_:function(){return[Jl]},compare:function(n,i){return r.compareDoubles(t.centreX(n.getBounds()),t.centreX(i.getBounds()))}}},e.yComparator.get=function(){return{interfaces_:function(){return[Jl]},compare:function(n,i){return r.compareDoubles(t.centreY(n.getBounds()),t.centreY(i.getBounds()))}}},e.intersectsOp.get=function(){return{interfaces_:function(){return[r.IntersectsOp]},intersects:function(n,i){return n.intersects(i)}}},e.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(t,e),t}(Oe),mg=function(r){function t(){var e=arguments[0];r.call(this,e)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.computeBounds=function(){for(var n=null,i=this.getChildBoundables().iterator();i.hasNext();){var s=i.next();n===null?n=new dt(s.getBounds()):n.expandToInclude(s.getBounds())}return n},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(be),fr=function(){};fr.prototype.interfaces_=function(){return[]},fr.prototype.getClass=function(){return fr},fr.relativeSign=function(t,e){return t<e?-1:t>e?1:0},fr.compare=function(t,e,n){if(e.equals2D(n))return 0;var i=fr.relativeSign(e.x,n.x),s=fr.relativeSign(e.y,n.y);switch(t){case 0:return fr.compareValue(i,s);case 1:return fr.compareValue(s,i);case 2:return fr.compareValue(s,-i);case 3:return fr.compareValue(-i,s);case 4:return fr.compareValue(-i,-s);case 5:return fr.compareValue(-s,-i);case 6:return fr.compareValue(-s,i);case 7:return fr.compareValue(i,-s)}return Mt.shouldNeverReachHere("invalid octant value"),0},fr.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var ws=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._segString=t,this.coord=new L(e),this.segmentIndex=n,this._segmentOctant=i,this._isInterior=!e.equals2D(t.getCoordinate(n))};ws.prototype.getCoordinate=function(){return this.coord},ws.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},ws.prototype.compareTo=function(t){var e=t;return this.segmentIndex<e.segmentIndex?-1:this.segmentIndex>e.segmentIndex?1:this.coord.equals2D(e.coord)?0:fr.compare(this._segmentOctant,this.coord,e.coord)},ws.prototype.isEndPoint=function(t){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===t},ws.prototype.isInterior=function(){return this._isInterior},ws.prototype.interfaces_=function(){return[Zr]},ws.prototype.getClass=function(){return ws};var nr=function(){this._nodeMap=new Be,this._edge=null;var t=arguments[0];this._edge=t};nr.prototype.getSplitCoordinates=function(){var t=this,e=new Ku;this.addEndpoints();for(var n=this.iterator(),i=n.next();n.hasNext();){var s=n.next();t.addEdgeCoordinates(i,s,e),i=s}return e.toCoordinateArray()},nr.prototype.addCollapsedNodes=function(){var t=this,e=new Z;this.findCollapsesFromInsertedNodes(e),this.findCollapsesFromExistingVertices(e);for(var n=e.iterator();n.hasNext();){var i=n.next().intValue();t.add(t._edge.getCoordinate(i),i)}},nr.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}},nr.prototype.findCollapsesFromExistingVertices=function(t){for(var e=this,n=0;n<this._edge.size()-2;n++){var i=e._edge.getCoordinate(n),s=e._edge.getCoordinate(n+2);i.equals2D(s)&&t.add(new Un(n+1))}},nr.prototype.addEdgeCoordinates=function(t,e,n){var i=this,s=this._edge.getCoordinate(e.segmentIndex),a=e.isInterior()||!e.coord.equals2D(s);n.add(new L(t.coord),!1);for(var o=t.segmentIndex+1;o<=e.segmentIndex;o++)n.add(i._edge.getCoordinate(o));a&&n.add(new L(e.coord))},nr.prototype.iterator=function(){return this._nodeMap.values().iterator()},nr.prototype.addSplitEdges=function(t){var e=this;this.addEndpoints(),this.addCollapsedNodes();for(var n=this.iterator(),i=n.next();n.hasNext();){var s=n.next(),a=e.createSplitEdge(i,s);t.add(a),i=s}},nr.prototype.findCollapseIndex=function(t,e,n){if(!t.coord.equals2D(e.coord))return!1;var i=e.segmentIndex-t.segmentIndex;return e.isInterior()||i--,i===1?(n[0]=t.segmentIndex+1,!0):!1},nr.prototype.findCollapsesFromInsertedNodes=function(t){for(var e=this,n=new Array(1).fill(null),i=this.iterator(),s=i.next();i.hasNext();){var a=i.next(),o=e.findCollapseIndex(s,a,n);o&&t.add(new Un(n[0])),s=a}},nr.prototype.getEdge=function(){return this._edge},nr.prototype.addEndpoints=function(){var t=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(t),t)},nr.prototype.createSplitEdge=function(t,e){var n=this,i=e.segmentIndex-t.segmentIndex+2,s=this._edge.getCoordinate(e.segmentIndex),a=e.isInterior()||!e.coord.equals2D(s);a||i--;var o=new Array(i).fill(null),l=0;o[l++]=new L(t.coord);for(var u=t.segmentIndex+1;u<=e.segmentIndex;u++)o[l++]=n._edge.getCoordinate(u);return a&&(o[l]=new L(e.coord)),new _e(o,this._edge.getData())},nr.prototype.add=function(t,e){var n=new ws(this._edge,t,e,this._edge.getSegmentOctant(e)),i=this._nodeMap.get(n);return i!==null?(Mt.isTrue(i.coord.equals2D(t),"Found equal nodes with different coordinates"),i):(this._nodeMap.put(n,n),n)},nr.prototype.checkSplitEdgesCorrectness=function(t){var e=this._edge.getCoordinates(),n=t.get(0),i=n.getCoordinate(0);if(!i.equals2D(e[0]))throw new zi("bad split edge start point at "+i);var s=t.get(t.size()-1),a=s.getCoordinates(),o=a[a.length-1];if(!o.equals2D(e[e.length-1]))throw new zi("bad split edge end point at "+o)},nr.prototype.interfaces_=function(){return[]},nr.prototype.getClass=function(){return nr};var Ua=function(){};Ua.prototype.interfaces_=function(){return[]},Ua.prototype.getClass=function(){return Ua},Ua.octant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new oe("Cannot compute the octant for point ( "+t+", "+e+" )");var n=Math.abs(t),i=Math.abs(e);return t>=0?e>=0?n>=i?0:1:n>=i?7:6:e>=0?n>=i?3:2:n>=i?4:5}else if(arguments[0]instanceof L&&arguments[1]instanceof L){var s=arguments[0],a=arguments[1],o=a.x-s.x,l=a.y-s.y;if(o===0&&l===0)throw new oe("Cannot compute the octant for two identical points "+s);return Ua.octant(o,l)}};var yi=function(){};yi.prototype.getCoordinates=function(){},yi.prototype.size=function(){},yi.prototype.getCoordinate=function(t){},yi.prototype.isClosed=function(){},yi.prototype.setData=function(t){},yi.prototype.getData=function(){},yi.prototype.interfaces_=function(){return[]},yi.prototype.getClass=function(){return yi};var nh=function(){};nh.prototype.addIntersection=function(t,e){},nh.prototype.interfaces_=function(){return[yi]},nh.prototype.getClass=function(){return nh};var _e=function(){this._nodeList=new nr(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};_e.prototype.getCoordinates=function(){return this._pts},_e.prototype.size=function(){return this._pts.length},_e.prototype.getCoordinate=function(t){return this._pts[t]},_e.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},_e.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},_e.prototype.setData=function(t){this._data=t},_e.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:Ua.octant(t,e)},_e.prototype.getData=function(){return this._data},_e.prototype.addIntersection=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(arguments.length===4){var n=arguments[0],i=arguments[1],s=arguments[3],a=new L(n.getIntersection(s));this.addIntersection(a,i)}},_e.prototype.toString=function(){return Sn.toLineString(new ye(this._pts))},_e.prototype.getNodeList=function(){return this._nodeList},_e.prototype.addIntersectionNode=function(t,e){var n=e,i=n+1;if(i<this._pts.length){var s=this._pts[i];t.equals2D(s)&&(n=i)}var a=this._nodeList.add(t,n);return a},_e.prototype.addIntersections=function(t,e,n){for(var i=this,s=0;s<t.getIntersectionNum();s++)i.addIntersection(t,e,n,s)},_e.prototype.interfaces_=function(){return[nh]},_e.prototype.getClass=function(){return _e},_e.getNodedSubstrings=function(){if(arguments.length===1){var t=arguments[0],e=new Z;return _e.getNodedSubstrings(t,e),e}else if(arguments.length===2)for(var n=arguments[0],i=arguments[1],s=n.iterator();s.hasNext();){var a=s.next();a.getNodeList().addSplitEdges(i)}};var pt=function(){if(this.p0=null,this.p1=null,arguments.length===0)this.p0=new L,this.p1=new L;else if(arguments.length===1){var t=arguments[0];this.p0=new L(t.p0),this.p1=new L(t.p1)}else if(arguments.length===2)this.p0=arguments[0],this.p1=arguments[1];else if(arguments.length===4){var e=arguments[0],n=arguments[1],i=arguments[2],s=arguments[3];this.p0=new L(e,n),this.p1=new L(i,s)}},vg={serialVersionUID:{configurable:!0}};pt.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},pt.prototype.orientationIndex=function(){if(arguments[0]instanceof pt){var t=arguments[0],e=et.orientationIndex(this.p0,this.p1,t.p0),n=et.orientationIndex(this.p0,this.p1,t.p1);return e>=0&&n>=0||e<=0&&n<=0?Math.max(e,n):0}else if(arguments[0]instanceof L){var i=arguments[0];return et.orientationIndex(this.p0,this.p1,i)}},pt.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},pt.prototype.isVertical=function(){return this.p0.x===this.p1.x},pt.prototype.equals=function(t){if(!(t instanceof pt))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},pt.prototype.intersection=function(t){var e=new Zs;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},pt.prototype.project=function(){if(arguments[0]instanceof L){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new L(t);var e=this.projectionFactor(t),n=new L;return n.x=this.p0.x+e*(this.p1.x-this.p0.x),n.y=this.p0.y+e*(this.p1.y-this.p0.y),n}else if(arguments[0]instanceof pt){var i=arguments[0],s=this.projectionFactor(i.p0),a=this.projectionFactor(i.p1);if(s>=1&&a>=1||s<=0&&a<=0)return null;var o=this.project(i.p0);s<0&&(o=this.p0),s>1&&(o=this.p1);var l=this.project(i.p1);return a<0&&(l=this.p0),a>1&&(l=this.p1),new pt(o,l)}},pt.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},pt.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},pt.prototype.getCoordinate=function(t){return t===0?this.p0:this.p1},pt.prototype.distancePerpendicular=function(t){return et.distancePointLinePerpendicular(t,this.p0,this.p1)},pt.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},pt.prototype.midPoint=function(){return pt.midPoint(this.p0,this.p1)},pt.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,i=e*e+n*n;if(i<=0)return wt.NaN;var s=((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/i;return s},pt.prototype.closestPoints=function(t){var e=this.intersection(t);if(e!==null)return[e,e];var n=new Array(2).fill(null),i=wt.MAX_VALUE,s=null,a=this.closestPoint(t.p0);i=a.distance(t.p0),n[0]=a,n[1]=t.p0;var o=this.closestPoint(t.p1);s=o.distance(t.p1),s<i&&(i=s,n[0]=o,n[1]=t.p1);var l=t.closestPoint(this.p0);s=l.distance(this.p0),s<i&&(i=s,n[0]=this.p0,n[1]=l);var u=t.closestPoint(this.p1);return s=u.distance(this.p1),s<i&&(i=s,n[0]=this.p1,n[1]=u),n},pt.prototype.closestPoint=function(t){var e=this.projectionFactor(t);if(e>0&&e<1)return this.project(t);var n=this.p0.distance(t),i=this.p1.distance(t);return n<i?this.p0:this.p1},pt.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},pt.prototype.getLength=function(){return this.p0.distance(this.p1)},pt.prototype.compareTo=function(t){var e=t,n=this.p0.compareTo(e.p0);return n!==0?n:this.p1.compareTo(e.p1)},pt.prototype.reverse=function(){var t=this.p0;this.p0=this.p1,this.p1=t},pt.prototype.equalsTopo=function(t){return this.p0.equals(t.p0)&&(this.p1.equals(t.p1)||this.p0.equals(t.p1))&&this.p1.equals(t.p0)},pt.prototype.lineIntersection=function(t){try{var e=En.intersection(this.p0,this.p1,t.p0,t.p1);return e}catch(n){if(!(n instanceof Ql))throw n}finally{}return null},pt.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},pt.prototype.pointAlongOffset=function(t,e){var n=this.p0.x+t*(this.p1.x-this.p0.x),i=this.p0.y+t*(this.p1.y-this.p0.y),s=this.p1.x-this.p0.x,a=this.p1.y-this.p0.y,o=Math.sqrt(s*s+a*a),l=0,u=0;if(e!==0){if(o<=0)throw new Error("Cannot compute offset from zero-length line segment");l=e*s/o,u=e*a/o}var c=n-u,h=i+l,f=new L(c,h);return f},pt.prototype.setCoordinates=function(){if(arguments.length===1){var t=arguments[0];this.setCoordinates(t.p0,t.p1)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.p0.x=e.x,this.p0.y=e.y,this.p1.x=n.x,this.p1.y=n.y}},pt.prototype.segmentFraction=function(t){var e=this.projectionFactor(t);return e<0?e=0:(e>1||wt.isNaN(e))&&(e=1),e},pt.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},pt.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},pt.prototype.distance=function(){if(arguments[0]instanceof pt){var t=arguments[0];return et.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}else if(arguments[0]instanceof L){var e=arguments[0];return et.distancePointLine(e,this.p0,this.p1)}},pt.prototype.pointAlong=function(t){var e=new L;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},pt.prototype.hashCode=function(){var t=wt.doubleToLongBits(this.p0.x);t^=wt.doubleToLongBits(this.p0.y)*31;var e=Math.trunc(t)^Math.trunc(t>>32),n=wt.doubleToLongBits(this.p1.x);n^=wt.doubleToLongBits(this.p1.y)*31;var i=Math.trunc(n)^Math.trunc(n>>32);return e^i},pt.prototype.interfaces_=function(){return[Zr,$r]},pt.prototype.getClass=function(){return pt},pt.midPoint=function(t,e){return new L((t.x+e.x)/2,(t.y+e.y)/2)},vg.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(pt,vg);var ih=function(){this.tempEnv1=new dt,this.tempEnv2=new dt,this._overlapSeg1=new pt,this._overlapSeg2=new pt};ih.prototype.overlap=function(){if(arguments.length!==2){if(arguments.length===4){var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];t.getLineSegment(e,this._overlapSeg1),n.getLineSegment(i,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}}},ih.prototype.interfaces_=function(){return[]},ih.prototype.getClass=function(){return ih};var Tr=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=i};Tr.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},Tr.prototype.computeSelect=function(t,e,n,i){var s=this._pts[e],a=this._pts[n];if(i.tempEnv1.init(s,a),n-e===1)return i.select(this,e),null;if(!t.intersects(i.tempEnv1))return null;var o=Math.trunc((e+n)/2);e<o&&this.computeSelect(t,e,o,i),o<n&&this.computeSelect(t,o,n,i)},Tr.prototype.getCoordinates=function(){for(var t=this,e=new Array(this._end-this._start+1).fill(null),n=0,i=this._start;i<=this._end;i++)e[n++]=t._pts[i];return e},Tr.prototype.computeOverlaps=function(t,e){this.computeOverlapsInternal(this._start,this._end,t,t._start,t._end,e)},Tr.prototype.setId=function(t){this._id=t},Tr.prototype.select=function(t,e){this.computeSelect(t,this._start,this._end,e)},Tr.prototype.getEnvelope=function(){if(this._env===null){var t=this._pts[this._start],e=this._pts[this._end];this._env=new dt(t,e)}return this._env},Tr.prototype.getEndIndex=function(){return this._end},Tr.prototype.getStartIndex=function(){return this._start},Tr.prototype.getContext=function(){return this._context},Tr.prototype.getId=function(){return this._id},Tr.prototype.computeOverlapsInternal=function(t,e,n,i,s,a){var o=this._pts[t],l=this._pts[e],u=n._pts[i],c=n._pts[s];if(e-t===1&&s-i===1)return a.overlap(this,t,n,i),null;if(a.tempEnv1.init(o,l),a.tempEnv2.init(u,c),!a.tempEnv1.intersects(a.tempEnv2))return null;var h=Math.trunc((t+e)/2),f=Math.trunc((i+s)/2);t<h&&(i<f&&this.computeOverlapsInternal(t,h,n,i,f,a),f<s&&this.computeOverlapsInternal(t,h,n,f,s,a)),h<e&&(i<f&&this.computeOverlapsInternal(h,e,n,i,f,a),f<s&&this.computeOverlapsInternal(h,e,n,f,s,a))},Tr.prototype.interfaces_=function(){return[]},Tr.prototype.getClass=function(){return Tr};var Zn=function(){};Zn.prototype.interfaces_=function(){return[]},Zn.prototype.getClass=function(){return Zn},Zn.getChainStartIndices=function(t){var e=0,n=new Z;n.add(new Un(e));do{var i=Zn.findChainEnd(t,e);n.add(new Un(i)),e=i}while(e<t.length-1);var s=Zn.toIntArray(n);return s},Zn.findChainEnd=function(t,e){for(var n=e;n<t.length-1&&t[n].equals2D(t[n+1]);)n++;if(n>=t.length-1)return t.length-1;for(var i=Qt.quadrant(t[n],t[n+1]),s=e+1;s<t.length;){if(!t[s-1].equals2D(t[s])){var a=Qt.quadrant(t[s-1],t[s]);if(a!==i)break}s++}return s-1},Zn.getChains=function(){if(arguments.length===1){var t=arguments[0];return Zn.getChains(t,null)}else if(arguments.length===2){for(var e=arguments[0],n=arguments[1],i=new Z,s=Zn.getChainStartIndices(e),a=0;a<s.length-1;a++){var o=new Tr(e,s[a],s[a+1],n);i.add(o)}return i}},Zn.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e};var ea=function(){};ea.prototype.computeNodes=function(t){},ea.prototype.getNodedSubstrings=function(){},ea.prototype.interfaces_=function(){return[]},ea.prototype.getClass=function(){return ea};var sh=function(){if(this._segInt=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setSegmentIntersector(t)}}};sh.prototype.setSegmentIntersector=function(t){this._segInt=t},sh.prototype.interfaces_=function(){return[ea]},sh.prototype.getClass=function(){return sh};var Jf=function(r){function t(n){n?r.call(this,n):r.call(this),this._monoChains=new Z,this._index=new gg,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={SegmentOverlapAction:{configurable:!0}};return t.prototype.getMonotoneChains=function(){return this._monoChains},t.prototype.getNodedSubstrings=function(){return _e.getNodedSubstrings(this._nodedSegStrings)},t.prototype.getIndex=function(){return this._index},t.prototype.add=function(i){for(var s=this,a=Zn.getChains(i.getCoordinates(),i),o=a.iterator();o.hasNext();){var l=o.next();l.setId(s._idCounter++),s._index.insert(l.getEnvelope(),l),s._monoChains.add(l)}},t.prototype.computeNodes=function(i){var s=this;this._nodedSegStrings=i;for(var a=i.iterator();a.hasNext();)s.add(a.next());this.intersectChains()},t.prototype.intersectChains=function(){for(var i=this,s=new yg(this._segInt),a=this._monoChains.iterator();a.hasNext();)for(var o=a.next(),l=i._index.query(o.getEnvelope()),u=l.iterator();u.hasNext();){var c=u.next();if(c.getId()>o.getId()&&(o.computeOverlaps(c,s),i._nOverlaps++),i._segInt.isDone())return null}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.SegmentOverlapAction.get=function(){return yg},Object.defineProperties(t,e),t}(sh),yg=function(r){function t(){r.call(this),this._si=null;var e=arguments[0];this._si=e}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.overlap=function(){if(arguments.length===4){var n=arguments[0],i=arguments[1],s=arguments[2],a=arguments[3],o=n.getContext(),l=s.getContext();this._si.processIntersections(o,i,l,a)}else return r.prototype.overlap.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(ih),qt=function r(){if(this._quadrantSegments=r.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=r.CAP_ROUND,this._joinStyle=r.JOIN_ROUND,this._mitreLimit=r.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=r.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setQuadrantSegments(t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.setQuadrantSegments(e),this.setEndCapStyle(n)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],a=arguments[2],o=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(s),this.setJoinStyle(a),this.setMitreLimit(o)}}},Ji={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};qt.prototype.getEndCapStyle=function(){return this._endCapStyle},qt.prototype.isSingleSided=function(){return this._isSingleSided},qt.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,this._quadrantSegments===0&&(this._joinStyle=qt.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=qt.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==qt.JOIN_ROUND&&(this._quadrantSegments=qt.DEFAULT_QUADRANT_SEGMENTS)},qt.prototype.getJoinStyle=function(){return this._joinStyle},qt.prototype.setJoinStyle=function(t){this._joinStyle=t},qt.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},qt.prototype.getSimplifyFactor=function(){return this._simplifyFactor},qt.prototype.getQuadrantSegments=function(){return this._quadrantSegments},qt.prototype.setEndCapStyle=function(t){this._endCapStyle=t},qt.prototype.getMitreLimit=function(){return this._mitreLimit},qt.prototype.setMitreLimit=function(t){this._mitreLimit=t},qt.prototype.setSingleSided=function(t){this._isSingleSided=t},qt.prototype.interfaces_=function(){return[]},qt.prototype.getClass=function(){return qt},qt.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},Ji.CAP_ROUND.get=function(){return 1},Ji.CAP_FLAT.get=function(){return 2},Ji.CAP_SQUARE.get=function(){return 3},Ji.JOIN_ROUND.get=function(){return 1},Ji.JOIN_MITRE.get=function(){return 2},Ji.JOIN_BEVEL.get=function(){return 3},Ji.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Ji.DEFAULT_MITRE_LIMIT.get=function(){return 5},Ji.DEFAULT_SIMPLIFY_FACTOR.get=function(){return .01},Object.defineProperties(qt,Ji);var ge=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=et.COUNTERCLOCKWISE,this._inputLine=t||null},ah={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};ge.prototype.isDeletable=function(t,e,n,i){var s=this._inputLine[t],a=this._inputLine[e],o=this._inputLine[n];return!this.isConcave(s,a,o)||!this.isShallow(s,a,o,i)?!1:this.isShallowSampled(s,a,t,n,i)},ge.prototype.deleteShallowConcavities=function(){for(var t=this,e=1,n=this.findNextNonDeletedIndex(e),i=this.findNextNonDeletedIndex(n),s=!1;i<this._inputLine.length;){var a=!1;t.isDeletable(e,n,i,t._distanceTol)&&(t._isDeleted[n]=ge.DELETE,a=!0,s=!0),a?e=i:e=n,n=t.findNextNonDeletedIndex(e),i=t.findNextNonDeletedIndex(n)}return s},ge.prototype.isShallowConcavity=function(t,e,n,i){var s=et.computeOrientation(t,e,n),a=s===this._angleOrientation;if(!a)return!1;var o=et.distancePointLine(e,t,n);return o<i},ge.prototype.isShallowSampled=function(t,e,n,i,s){var a=this,o=Math.trunc((i-n)/ge.NUM_PTS_TO_CHECK);o<=0&&(o=1);for(var l=n;l<i;l+=o)if(!a.isShallow(t,e,a._inputLine[l],s))return!1;return!0},ge.prototype.isConcave=function(t,e,n){var i=et.computeOrientation(t,e,n),s=i===this._angleOrientation;return s},ge.prototype.simplify=function(t){var e=this;this._distanceTol=Math.abs(t),t<0&&(this._angleOrientation=et.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var n=!1;do n=e.deleteShallowConcavities();while(n);return this.collapseLine()},ge.prototype.findNextNonDeletedIndex=function(t){for(var e=t+1;e<this._inputLine.length&&this._isDeleted[e]===ge.DELETE;)e++;return e},ge.prototype.isShallow=function(t,e,n,i){var s=et.distancePointLine(e,t,n);return s<i},ge.prototype.collapseLine=function(){for(var t=this,e=new Ku,n=0;n<this._inputLine.length;n++)t._isDeleted[n]!==ge.DELETE&&e.add(t._inputLine[n]);return e.toCoordinateArray()},ge.prototype.interfaces_=function(){return[]},ge.prototype.getClass=function(){return ge},ge.simplify=function(t,e){var n=new ge(t);return n.simplify(e)},ah.INIT.get=function(){return 0},ah.DELETE.get=function(){return 1},ah.KEEP.get=function(){return 1},ah.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(ge,ah);var Vr=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new Z},_g={COORDINATE_ARRAY_TYPE:{configurable:!0}};Vr.prototype.getCoordinates=function(){var t=this._ptList.toArray(Vr.COORDINATE_ARRAY_TYPE);return t},Vr.prototype.setPrecisionModel=function(t){this._precisionModel=t},Vr.prototype.addPt=function(t){var e=new L(t);if(this._precisionModel.makePrecise(e),this.isRedundant(e))return null;this._ptList.add(e)},Vr.prototype.revere=function(){},Vr.prototype.addPts=function(t,e){var n=this;if(e)for(var i=0;i<t.length;i++)n.addPt(t[i]);else for(var s=t.length-1;s>=0;s--)n.addPt(t[s])},Vr.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1),n=t.distance(e);return n<this._minimimVertexDistance},Vr.prototype.toString=function(){var t=new Dt,e=t.createLineString(this.getCoordinates());return e.toString()},Vr.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var t=new L(this._ptList.get(0)),e=this._ptList.get(this._ptList.size()-1);if(t.equals(e))return null;this._ptList.add(t)},Vr.prototype.setMinimumVertexDistance=function(t){this._minimimVertexDistance=t},Vr.prototype.interfaces_=function(){return[]},Vr.prototype.getClass=function(){return Vr},_g.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(Vr,_g);var Lt=function(){},qa={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};Lt.prototype.interfaces_=function(){return[]},Lt.prototype.getClass=function(){return Lt},Lt.toDegrees=function(t){return t*180/Math.PI},Lt.normalize=function(t){for(;t>Math.PI;)t-=Lt.PI_TIMES_2;for(;t<=-Math.PI;)t+=Lt.PI_TIMES_2;return t},Lt.angle=function(){if(arguments.length===1){var t=arguments[0];return Math.atan2(t.y,t.x)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],i=n.x-e.x,s=n.y-e.y;return Math.atan2(s,i)}},Lt.isAcute=function(t,e,n){var i=t.x-e.x,s=t.y-e.y,a=n.x-e.x,o=n.y-e.y,l=i*a+s*o;return l>0},Lt.isObtuse=function(t,e,n){var i=t.x-e.x,s=t.y-e.y,a=n.x-e.x,o=n.y-e.y,l=i*a+s*o;return l<0},Lt.interiorAngle=function(t,e,n){var i=Lt.angle(e,t),s=Lt.angle(e,n);return Math.abs(s-i)},Lt.normalizePositive=function(t){if(t<0){for(;t<0;)t+=Lt.PI_TIMES_2;t>=Lt.PI_TIMES_2&&(t=0)}else{for(;t>=Lt.PI_TIMES_2;)t-=Lt.PI_TIMES_2;t<0&&(t=0)}return t},Lt.angleBetween=function(t,e,n){var i=Lt.angle(e,t),s=Lt.angle(e,n);return Lt.diff(i,s)},Lt.diff=function(t,e){var n=null;return t<e?n=e-t:n=t-e,n>Math.PI&&(n=2*Math.PI-n),n},Lt.toRadians=function(t){return t*Math.PI/180},Lt.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?Lt.COUNTERCLOCKWISE:n<0?Lt.CLOCKWISE:Lt.NONE},Lt.angleBetweenOriented=function(t,e,n){var i=Lt.angle(e,t),s=Lt.angle(e,n),a=s-i;return a<=-Math.PI?a+Lt.PI_TIMES_2:a>Math.PI?a-Lt.PI_TIMES_2:a},qa.PI_TIMES_2.get=function(){return 2*Math.PI},qa.PI_OVER_2.get=function(){return Math.PI/2},qa.PI_OVER_4.get=function(){return Math.PI/4},qa.COUNTERCLOCKWISE.get=function(){return et.COUNTERCLOCKWISE},qa.CLOCKWISE.get=function(){return et.CLOCKWISE},qa.NONE.get=function(){return et.COLLINEAR},Object.defineProperties(Lt,qa);var ne=function r(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new pt,this._seg1=new pt,this._offset0=new pt,this._offset1=new pt,this._side=0,this._hasNarrowConcaveAngle=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._precisionModel=t,this._bufParams=e,this._li=new Zs,this._filletAngleQuantum=Math.PI/2/e.getQuadrantSegments(),e.getQuadrantSegments()>=8&&e.getJoinStyle()===qt.JOIN_ROUND&&(this._closingSegLengthFactor=r.MAX_CLOSING_SEG_LEN_FACTOR),this.init(n)},oh={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};ne.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=et.computeOrientation(this._s0,this._s1,this._s2),i=n===et.CLOCKWISE&&this._side===K.LEFT||n===et.COUNTERCLOCKWISE&&this._side===K.RIGHT;n===0?this.addCollinear(e):i?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)},ne.prototype.addLineEndCap=function(t,e){var n=new pt(t,e),i=new pt;this.computeOffsetSegment(n,K.LEFT,this._distance,i);var s=new pt;this.computeOffsetSegment(n,K.RIGHT,this._distance,s);var a=e.x-t.x,o=e.y-t.y,l=Math.atan2(o,a);switch(this._bufParams.getEndCapStyle()){case qt.CAP_ROUND:this._segList.addPt(i.p1),this.addFilletArc(e,l+Math.PI/2,l-Math.PI/2,et.CLOCKWISE,this._distance),this._segList.addPt(s.p1);break;case qt.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(s.p1);break;case qt.CAP_SQUARE:var u=new L;u.x=Math.abs(this._distance)*Math.cos(l),u.y=Math.abs(this._distance)*Math.sin(l);var c=new L(i.p1.x+u.x,i.p1.y+u.y),h=new L(s.p1.x+u.x,s.p1.y+u.y);this._segList.addPt(c),this._segList.addPt(h);break}},ne.prototype.getCoordinates=function(){var t=this._segList.getCoordinates();return t},ne.prototype.addMitreJoin=function(t,e,n,i){var s=!0,a=null;try{a=En.intersection(e.p0,e.p1,n.p0,n.p1);var o=i<=0?1:a.distance(t)/Math.abs(i);o>this._bufParams.getMitreLimit()&&(s=!1)}catch(l){if(l instanceof Ql)a=new L(0,0),s=!1;else throw l}finally{}s?this._segList.addPt(a):this.addLimitedMitreJoin(e,n,i,this._bufParams.getMitreLimit())},ne.prototype.addFilletCorner=function(t,e,n,i,s){var a=e.x-t.x,o=e.y-t.y,l=Math.atan2(o,a),u=n.x-t.x,c=n.y-t.y,h=Math.atan2(c,u);i===et.CLOCKWISE?l<=h&&(l+=2*Math.PI):l>=h&&(l-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,l,h,i,s),this._segList.addPt(n)},ne.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*ne.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===qt.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===qt.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(e&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,t,this._distance),this._segList.addPt(this._offset1.p0))},ne.prototype.createSquare=function(t){this._segList.addPt(new L(t.x+this._distance,t.y+this._distance)),this._segList.addPt(new L(t.x+this._distance,t.y-this._distance)),this._segList.addPt(new L(t.x-this._distance,t.y-this._distance)),this._segList.addPt(new L(t.x-this._distance,t.y+this._distance)),this._segList.closeRing()},ne.prototype.addSegments=function(t,e){this._segList.addPts(t,e)},ne.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},ne.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},ne.prototype.initSideSegments=function(t,e,n){this._s1=t,this._s2=e,this._side=n,this._seg1.setCoordinates(t,e),this.computeOffsetSegment(this._seg1,n,this._distance,this._offset1)},ne.prototype.addLimitedMitreJoin=function(t,e,n,i){var s=this._seg0.p1,a=Lt.angle(s,this._seg0.p0),o=Lt.angleBetweenOriented(this._seg0.p0,s,this._seg1.p1),l=o/2,u=Lt.normalize(a+l),c=Lt.normalize(u+Math.PI),h=i*n,f=h*Math.abs(Math.sin(l)),g=n-f,m=s.x+h*Math.cos(c),_=s.y+h*Math.sin(c),E=new L(m,_),M=new pt(s,E),y=M.pointAlongOffset(1,g),w=M.pointAlongOffset(1,-g);this._side===K.LEFT?(this._segList.addPt(y),this._segList.addPt(w)):(this._segList.addPt(w),this._segList.addPt(y))},ne.prototype.computeOffsetSegment=function(t,e,n,i){var s=e===K.LEFT?1:-1,a=t.p1.x-t.p0.x,o=t.p1.y-t.p0.y,l=Math.sqrt(a*a+o*o),u=s*n*a/l,c=s*n*o/l;i.p0.x=t.p0.x-c,i.p0.y=t.p0.y+u,i.p1.x=t.p1.x-c,i.p1.y=t.p1.y+u},ne.prototype.addFilletArc=function(t,e,n,i,s){var a=this,o=i===et.CLOCKWISE?-1:1,l=Math.abs(e-n),u=Math.trunc(l/this._filletAngleQuantum+.5);if(u<1)return null;for(var c=0,h=l/u,f=c,g=new L;f<l;){var m=e+o*f;g.x=t.x+s*Math.cos(m),g.y=t.y+s*Math.sin(m),a._segList.addPt(g),f+=h}},ne.prototype.addInsideTurn=function(t,e){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*ne.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var n=new L((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var i=new L((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(i)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},ne.prototype.createCircle=function(t){var e=new L(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},ne.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},ne.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new Vr,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*ne.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},ne.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2);var e=this._li.getIntersectionNum();e>=2&&(this._bufParams.getJoinStyle()===qt.JOIN_BEVEL||this._bufParams.getJoinStyle()===qt.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,et.CLOCKWISE,this._distance))},ne.prototype.closeRing=function(){this._segList.closeRing()},ne.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},ne.prototype.interfaces_=function(){return[]},ne.prototype.getClass=function(){return ne},oh.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return .001},oh.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return .001},oh.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},oh.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(ne,oh);var dr=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};dr.prototype.getOffsetCurve=function(t,e){if(this._distance=e,e===0)return null;var n=e<0,i=Math.abs(e),s=this.getSegGen(i);t.length<=1?this.computePointCurve(t[0],s):this.computeOffsetCurve(t,n,s);var a=s.getCoordinates();return n&&Tt.reverse(a),a},dr.prototype.computeSingleSidedBufferCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var s=ge.simplify(t,-i),a=s.length-1;n.initSideSegments(s[a],s[a-1],K.LEFT),n.addFirstSegment();for(var o=a-2;o>=0;o--)n.addNextSegment(s[o],!0)}else{n.addSegments(t,!1);var l=ge.simplify(t,i),u=l.length-1;n.initSideSegments(l[0],l[1],K.LEFT),n.addFirstSegment();for(var c=2;c<=u;c++)n.addNextSegment(l[c],!0)}n.addLastSegment(),n.closeRing()},dr.prototype.computeRingBufferCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);e===K.RIGHT&&(i=-i);var s=ge.simplify(t,i),a=s.length-1;n.initSideSegments(s[a-1],s[0],e);for(var o=1;o<=a;o++){var l=o!==1;n.addNextSegment(s[o],l)}n.closeRing()},dr.prototype.computeLineBufferCurve=function(t,e){var n=this.simplifyTolerance(this._distance),i=ge.simplify(t,n),s=i.length-1;e.initSideSegments(i[0],i[1],K.LEFT);for(var a=2;a<=s;a++)e.addNextSegment(i[a],!0);e.addLastSegment(),e.addLineEndCap(i[s-1],i[s]);var o=ge.simplify(t,-n),l=o.length-1;e.initSideSegments(o[l],o[l-1],K.LEFT);for(var u=l-2;u>=0;u--)e.addNextSegment(o[u],!0);e.addLastSegment(),e.addLineEndCap(o[1],o[0]),e.closeRing()},dr.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case qt.CAP_ROUND:e.createCircle(t);break;case qt.CAP_SQUARE:e.createSquare(t);break}},dr.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided()||e===0)return null;var n=Math.abs(e),i=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],i);else if(this._bufParams.isSingleSided()){var s=e<0;this.computeSingleSidedBufferCurve(t,s,i)}else this.computeLineBufferCurve(t,i);var a=i.getCoordinates();return a},dr.prototype.getBufferParameters=function(){return this._bufParams},dr.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()},dr.prototype.getRingCurve=function(t,e,n){if(this._distance=n,t.length<=2)return this.getLineCurve(t,n);if(n===0)return dr.copyCoordinates(t);var i=this.getSegGen(n);return this.computeRingBufferCurve(t,e,i),i.getCoordinates()},dr.prototype.computeOffsetCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);if(e){var s=ge.simplify(t,-i),a=s.length-1;n.initSideSegments(s[a],s[a-1],K.LEFT),n.addFirstSegment();for(var o=a-2;o>=0;o--)n.addNextSegment(s[o],!0)}else{var l=ge.simplify(t,i),u=l.length-1;n.initSideSegments(l[0],l[1],K.LEFT),n.addFirstSegment();for(var c=2;c<=u;c++)n.addNextSegment(l[c],!0)}n.addLastSegment()},dr.prototype.getSegGen=function(t){return new ne(this._precisionModel,this._bufParams,t)},dr.prototype.interfaces_=function(){return[]},dr.prototype.getClass=function(){return dr},dr.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),n=0;n<e.length;n++)e[n]=new L(t[n]);return e};var Wa=function(){this._subgraphs=null,this._seg=new pt,this._cga=new et;var t=arguments[0];this._subgraphs=t},wg={DepthSegment:{configurable:!0}};Wa.prototype.findStabbedSegments=function(){var t=this;if(arguments.length===1){for(var e=arguments[0],n=new Z,i=this._subgraphs.iterator();i.hasNext();){var s=i.next(),a=s.getEnvelope();e.y<a.getMinY()||e.y>a.getMaxY()||t.findStabbedSegments(e,s.getDirectedEdges(),n)}return n}else if(arguments.length===3){if(_t(arguments[2],Pn)&&arguments[0]instanceof L&&arguments[1]instanceof Yf)for(var o=arguments[0],l=arguments[1],u=arguments[2],c=l.getEdge().getCoordinates(),h=0;h<c.length-1;h++){t._seg.p0=c[h],t._seg.p1=c[h+1],t._seg.p0.y>t._seg.p1.y&&t._seg.reverse();var f=Math.max(t._seg.p0.x,t._seg.p1.x);if(!(f<o.x)&&!t._seg.isHorizontal()&&!(o.y<t._seg.p0.y||o.y>t._seg.p1.y)&&et.computeOrientation(t._seg.p0,t._seg.p1,o)!==et.RIGHT){var g=l.getDepth(K.LEFT);t._seg.p0.equals(c[h])||(g=l.getDepth(K.RIGHT));var m=new ra(t._seg,g);u.add(m)}}else if(_t(arguments[2],Pn)&&arguments[0]instanceof L&&_t(arguments[1],Pn))for(var _=arguments[0],E=arguments[1],M=arguments[2],y=E.iterator();y.hasNext();){var w=y.next();w.isForward()&&t.findStabbedSegments(_,w,M)}}},Wa.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);if(e.size()===0)return 0;var n=Nn.min(e);return n._leftDepth},Wa.prototype.interfaces_=function(){return[]},Wa.prototype.getClass=function(){return Wa},wg.DepthSegment.get=function(){return ra},Object.defineProperties(Wa,wg);var ra=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new pt(t),this._leftDepth=e};ra.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return n!==0||(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg),n!==0)?n:this._upwardSeg.compareTo(e._upwardSeg)},ra.prototype.compareX=function(t,e){var n=t.p0.compareTo(e.p0);return n!==0?n:t.p1.compareTo(e.p1)},ra.prototype.toString=function(){return this._upwardSeg.toString()},ra.prototype.interfaces_=function(){return[Zr]},ra.prototype.getClass=function(){return ra};var Wt=function(t,e,n){this.p0=t||null,this.p1=e||null,this.p2=n||null};Wt.prototype.area=function(){return Wt.area(this.p0,this.p1,this.p2)},Wt.prototype.signedArea=function(){return Wt.signedArea(this.p0,this.p1,this.p2)},Wt.prototype.interpolateZ=function(t){if(t===null)throw new oe("Supplied point is null.");return Wt.interpolateZ(t,this.p0,this.p1,this.p2)},Wt.prototype.longestSideLength=function(){return Wt.longestSideLength(this.p0,this.p1,this.p2)},Wt.prototype.isAcute=function(){return Wt.isAcute(this.p0,this.p1,this.p2)},Wt.prototype.circumcentre=function(){return Wt.circumcentre(this.p0,this.p1,this.p2)},Wt.prototype.area3D=function(){return Wt.area3D(this.p0,this.p1,this.p2)},Wt.prototype.centroid=function(){return Wt.centroid(this.p0,this.p1,this.p2)},Wt.prototype.inCentre=function(){return Wt.inCentre(this.p0,this.p1,this.p2)},Wt.prototype.interfaces_=function(){return[]},Wt.prototype.getClass=function(){return Wt},Wt.area=function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)},Wt.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2},Wt.det=function(t,e,n,i){return t*i-e*n},Wt.interpolateZ=function(t,e,n,i){var s=e.x,a=e.y,o=n.x-s,l=i.x-s,u=n.y-a,c=i.y-a,h=o*c-l*u,f=t.x-s,g=t.y-a,m=(c*f-l*g)/h,_=(-u*f+o*g)/h,E=e.z+m*(n.z-e.z)+_*(i.z-e.z);return E},Wt.longestSideLength=function(t,e,n){var i=t.distance(e),s=e.distance(n),a=n.distance(t),o=i;return s>o&&(o=s),a>o&&(o=a),o},Wt.isAcute=function(t,e,n){return!(!Lt.isAcute(t,e,n)||!Lt.isAcute(e,n,t)||!Lt.isAcute(n,t,e))},Wt.circumcentre=function(t,e,n){var i=n.x,s=n.y,a=t.x-i,o=t.y-s,l=e.x-i,u=e.y-s,c=2*Wt.det(a,o,l,u),h=Wt.det(o,a*a+o*o,u,l*l+u*u),f=Wt.det(a,a*a+o*o,l,l*l+u*u),g=i-h/c,m=s+f/c;return new L(g,m)},Wt.perpendicularBisector=function(t,e){var n=e.x-t.x,i=e.y-t.y,s=new En(t.x+n/2,t.y+i/2,1),a=new En(t.x-i+n/2,t.y+n+i/2,1);return new En(s,a)},Wt.angleBisector=function(t,e,n){var i=e.distance(t),s=e.distance(n),a=i/(i+s),o=n.x-t.x,l=n.y-t.y,u=new L(t.x+a*o,t.y+a*l);return u},Wt.area3D=function(t,e,n){var i=e.x-t.x,s=e.y-t.y,a=e.z-t.z,o=n.x-t.x,l=n.y-t.y,u=n.z-t.z,c=s*u-a*l,h=a*o-i*u,f=i*l-s*o,g=c*c+h*h+f*f,m=Math.sqrt(g)/2;return m},Wt.centroid=function(t,e,n){var i=(t.x+e.x+n.x)/3,s=(t.y+e.y+n.y)/3;return new L(i,s)},Wt.inCentre=function(t,e,n){var i=e.distance(n),s=t.distance(n),a=t.distance(e),o=i+s+a,l=(i*t.x+s*e.x+a*n.x)/o,u=(i*t.y+s*e.y+a*n.y)/o;return new L(l,u)};var nn=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new Z;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n};nn.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,F.EXTERIOR,F.INTERIOR)},nn.prototype.addPolygon=function(t){var e=this,n=this._distance,i=K.LEFT;this._distance<0&&(n=-this._distance,i=K.RIGHT);var s=t.getExteriorRing(),a=Tt.removeRepeatedPoints(s.getCoordinates());if(this._distance<0&&this.isErodedCompletely(s,this._distance)||this._distance<=0&&a.length<3)return null;this.addPolygonRing(a,n,i,F.EXTERIOR,F.INTERIOR);for(var o=0;o<t.getNumInteriorRing();o++){var l=t.getInteriorRingN(o),u=Tt.removeRepeatedPoints(l.getCoordinates());e._distance>0&&e.isErodedCompletely(l,-e._distance)||e.addPolygonRing(u,n,K.opposite(i),F.INTERIOR,F.EXTERIOR)}},nn.prototype.isTriangleErodedCompletely=function(t,e){var n=new Wt(t[0],t[1],t[2]),i=n.inCentre(),s=et.distancePointLine(i,n.p0,n.p1);return s<Math.abs(e)},nn.prototype.addLineString=function(t){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var e=Tt.removeRepeatedPoints(t.getCoordinates()),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,F.EXTERIOR,F.INTERIOR)},nn.prototype.addCurve=function(t,e,n){if(t===null||t.length<2)return null;var i=new _e(t,new Jt(0,F.BOUNDARY,e,n));this._curveList.add(i)},nn.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},nn.prototype.addPolygonRing=function(t,e,n,i,s){if(e===0&&t.length<gi.MINIMUM_VALID_SIZE)return null;var a=i,o=s;t.length>=gi.MINIMUM_VALID_SIZE&&et.isCCW(t)&&(a=s,o=i,n=K.opposite(n));var l=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(l,a,o)},nn.prototype.add=function(t){if(t.isEmpty())return null;t instanceof Ne?this.addPolygon(t):t instanceof pe?this.addLineString(t):t instanceof Nr?this.addPoint(t):t instanceof iu?this.addCollection(t):t instanceof ta?this.addCollection(t):t instanceof mi?this.addCollection(t):t instanceof er&&this.addCollection(t)},nn.prototype.isErodedCompletely=function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(n.length===4)return this.isTriangleErodedCompletely(n,e);var i=t.getEnvelopeInternal(),s=Math.min(i.getHeight(),i.getWidth());return e<0&&2*Math.abs(e)>s},nn.prototype.addCollection=function(t){for(var e=this,n=0;n<t.getNumGeometries();n++){var i=t.getGeometryN(n);e.add(i)}},nn.prototype.interfaces_=function(){return[]},nn.prototype.getClass=function(){return nn};var lu=function(){};lu.prototype.locate=function(t){},lu.prototype.interfaces_=function(){return[]},lu.prototype.getClass=function(){return lu};var _i=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var t=arguments[0];this._parent=t,this._atStart=!0,this._index=0,this._max=t.getNumGeometries()};_i.prototype.next=function(){if(this._atStart)return this._atStart=!1,_i.isAtomic(this._parent)&&this._index++,this._parent;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new ru;var t=this._parent.getGeometryN(this._index++);return t instanceof er?(this._subcollectionIterator=new _i(t),this._subcollectionIterator.next()):t},_i.prototype.remove=function(){throw new Error(this.getClass().getName())},_i.prototype.hasNext=function(){if(this._atStart)return!0;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},_i.prototype.interfaces_=function(){return[eu]},_i.prototype.getClass=function(){return _i},_i.isAtomic=function(t){return!(t instanceof er)};var Ur=function(){this._geom=null;var t=arguments[0];this._geom=t};Ur.prototype.locate=function(t){return Ur.locate(t,this._geom)},Ur.prototype.interfaces_=function(){return[lu]},Ur.prototype.getClass=function(){return Ur},Ur.isPointInRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?et.isPointInRing(t,e.getCoordinates()):!1},Ur.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!Ur.isPointInRing(t,n))return!1;for(var i=0;i<e.getNumInteriorRing();i++){var s=e.getInteriorRingN(i);if(Ur.isPointInRing(t,s))return!1}return!0},Ur.containsPoint=function(t,e){if(e instanceof Ne)return Ur.containsPointInPolygon(t,e);if(e instanceof er)for(var n=new _i(e);n.hasNext();){var i=n.next();if(i!==e&&Ur.containsPoint(t,i))return!0}return!1},Ur.locate=function(t,e){return e.isEmpty()?F.EXTERIOR:Ur.containsPoint(t,e)?F.INTERIOR:F.EXTERIOR};var $e=function(){this._edgeMap=new Be,this._edgeList=null,this._ptInAreaLocation=[F.NONE,F.NONE]};$e.prototype.getNextCW=function(t){this.getEdges();var e=this._edgeList.indexOf(t),n=e-1;return e===0&&(n=this._edgeList.size()-1),this._edgeList.get(n)},$e.prototype.propagateSideLabels=function(t){for(var e=F.NONE,n=this.iterator();n.hasNext();){var i=n.next(),s=i.getLabel();s.isArea(t)&&s.getLocation(t,K.LEFT)!==F.NONE&&(e=s.getLocation(t,K.LEFT))}if(e===F.NONE)return null;for(var a=e,o=this.iterator();o.hasNext();){var l=o.next(),u=l.getLabel();if(u.getLocation(t,K.ON)===F.NONE&&u.setLocation(t,K.ON,a),u.isArea(t)){var c=u.getLocation(t,K.LEFT),h=u.getLocation(t,K.RIGHT);if(h!==F.NONE){if(h!==a)throw new Xi("side location conflict",l.getCoordinate());c===F.NONE&&Mt.shouldNeverReachHere("found single null side (at "+l.getCoordinate()+")"),a=c}else Mt.isTrue(u.getLocation(t,K.LEFT)===F.NONE,"found single null side"),u.setLocation(t,K.RIGHT,a),u.setLocation(t,K.LEFT,a)}}},$e.prototype.getCoordinate=function(){var t=this.iterator();if(!t.hasNext())return null;var e=t.next();return e.getCoordinate()},$e.prototype.print=function(t){Ve.out.println("EdgeEndStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}},$e.prototype.isAreaLabelsConsistent=function(t){return this.computeEdgeEndLabels(t.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},$e.prototype.checkAreaLabelsConsistent=function(t){var e=this.getEdges();if(e.size()<=0)return!0;var n=e.size()-1,i=e.get(n).getLabel(),s=i.getLocation(t,K.LEFT);Mt.isTrue(s!==F.NONE,"Found unlabelled area edge");for(var a=s,o=this.iterator();o.hasNext();){var l=o.next(),u=l.getLabel();Mt.isTrue(u.isArea(t),"Found non-area edge");var c=u.getLocation(t,K.LEFT),h=u.getLocation(t,K.RIGHT);if(c===h||h!==a)return!1;a=c}return!0},$e.prototype.findIndex=function(t){var e=this;this.iterator();for(var n=0;n<this._edgeList.size();n++){var i=e._edgeList.get(n);if(i===t)return n}return-1},$e.prototype.iterator=function(){return this.getEdges().iterator()},$e.prototype.getEdges=function(){return this._edgeList===null&&(this._edgeList=new Z(this._edgeMap.values())),this._edgeList},$e.prototype.getLocation=function(t,e,n){return this._ptInAreaLocation[t]===F.NONE&&(this._ptInAreaLocation[t]=Ur.locate(e,n[t].getGeometry())),this._ptInAreaLocation[t]},$e.prototype.toString=function(){var t=new Vn;t.append("EdgeEndStar: "+this.getCoordinate()),t.append(`
|
|
24
|
+
`);var s=t+(e?" ":"│ ");r.left&&Tf(r.left,s,!1,n,i),r.right&&Tf(r.right,s,!0,n,i)}}var Df=function(){function r(t){t===void 0&&(t=Yy),this._root=null,this._size=0,this._comparator=t}return r.prototype.insert=function(t,e){return this._size++,this._root=bf(t,e,this._root,this._comparator)},r.prototype.add=function(t,e){var n=new Js(t,e);this._root===null&&(n.left=n.right=null,this._size++,this._root=n);var i=this._comparator,s=Ks(t,this._root,i),a=i(t,s.key);return a===0?this._root=s:(a<0?(n.left=s.left,n.right=s,s.left=null):a>0&&(n.right=s.right,n.left=s,s.right=null),this._size++,this._root=n),this._root},r.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},r.prototype._remove=function(t,e,n){var i;if(e===null)return null;e=Ks(t,e,n);var s=n(t,e.key);return s===0?(e.left===null?i=e.right:(i=Ks(t,e.left,n),i.right=e.right),this._size--,i):e},r.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=Ks(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},r.prototype.findStatic=function(t){for(var e=this._root,n=this._comparator;e;){var i=n(t,e.key);if(i===0)return e;i<0?e=e.left:e=e.right}return null},r.prototype.find=function(t){return this._root&&(this._root=Ks(t,this._root,this._comparator),this._comparator(t,this._root.key)!==0)?null:this._root},r.prototype.contains=function(t){for(var e=this._root,n=this._comparator;e;){var i=n(t,e.key);if(i===0)return!0;i<0?e=e.left:e=e.right}return!1},r.prototype.forEach=function(t,e){for(var n=this._root,i=[],s=!1;!s;)n!==null?(i.push(n),n=n.left):i.length!==0?(n=i.pop(),t.call(e,n),n=n.right):s=!0;return this},r.prototype.range=function(t,e,n,i){for(var s=[],a=this._comparator,o=this._root,l;s.length!==0||o;)if(o)s.push(o),o=o.left;else{if(o=s.pop(),l=a(o.key,e),l>0)break;if(a(o.key,t)>=0&&n.call(i,o))return this;o=o.right}return this},r.prototype.keys=function(){var t=[];return this.forEach(function(e){var n=e.key;return t.push(n)}),t},r.prototype.values=function(){var t=[];return this.forEach(function(e){var n=e.data;return t.push(n)}),t},r.prototype.min=function(){return this._root?this.minNode(this._root).key:null},r.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},r.prototype.minNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.left;)t=t.left;return t},r.prototype.maxNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.right;)t=t.right;return t},r.prototype.at=function(t){for(var e=this._root,n=!1,i=0,s=[];!n;)if(e)s.push(e),e=e.left;else if(s.length>0){if(e=s.pop(),i===t)return e;i++,e=e.right}else n=!0;return null},r.prototype.next=function(t){var e=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var i=this._comparator;e;){var s=i(t.key,e.key);if(s===0)break;s<0?(n=e,e=e.left):e=e.right}return n},r.prototype.prev=function(t){var e=this._root,n=null;if(t.left!==null){for(n=t.left;n.right;)n=n.right;return n}for(var i=this._comparator;e;){var s=i(t.key,e.key);if(s===0)break;s<0?e=e.left:(n=e,e=e.right)}return n},r.prototype.clear=function(){return this._root=null,this._size=0,this},r.prototype.toList=function(){return Qy(this._root)},r.prototype.load=function(t,e,n){e===void 0&&(e=[]),n===void 0&&(n=!1);var i=t.length,s=this._comparator;if(n&&Af(t,e,0,i-1,s),this._root===null)this._root=xf(t,e,0,i),this._size=i;else{var a=By(this.toList(),Ky(t,e),s);i=this._size+i,this._root=Of({head:a},0,i)}return this},r.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(r.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),r.prototype.toString=function(t){t===void 0&&(t=function(n){return String(n.key)});var e=[];return Tf(this._root,"",!0,function(n){return e.push(n)},t),e.join("")},r.prototype.update=function(t,e,n){var i=this._comparator,s=qp(t,this._root,i),a=s.left,o=s.right;i(t,e)<0?o=bf(e,n,o,i):a=bf(e,n,a,i),this._root=Jy(a,o,i)},r.prototype.split=function(t){return qp(t,this._root,this._comparator)},r.prototype[Symbol.iterator]=function(){var t,e,n;return Xy(this,function(i){switch(i.label){case 0:t=this._root,e=[],n=!1,i.label=1;case 1:return n?[3,6]:t===null?[3,2]:(e.push(t),t=t.left,[3,5]);case 2:return e.length===0?[3,4]:(t=e.pop(),[4,t]);case 3:return i.sent(),t=t.right,[3,5];case 4:n=!0,i.label=5;case 5:return[3,1];case 6:return[2]}})},r}();function xf(r,t,e,n){var i=n-e;if(i>0){var s=e+Math.floor(i/2),a=r[s],o=t[s],l=new Js(a,o);return l.left=xf(r,t,e,s),l.right=xf(r,t,s+1,n),l}return null}function Ky(r,t){for(var e=new Js(null,null),n=e,i=0;i<r.length;i++)n=n.next=new Js(r[i],t[i]);return n.next=null,e.next}function Qy(r){for(var t=r,e=[],n=!1,i=new Js(null,null),s=i;!n;)t?(e.push(t),t=t.left):e.length>0?(t=s=s.next=e.pop(),t=t.right):n=!0;return s.next=null,i.next}function Of(r,t,e){var n=e-t;if(n>0){var i=t+Math.floor(n/2),s=Of(r,t,i),a=r.head;return a.left=s,r.head=r.head.next,a.right=Of(r,i+1,e),a}return null}function By(r,t,e){for(var n=new Js(null,null),i=n,s=r,a=t;s!==null&&a!==null;)e(s.key,a.key)<0?(i.next=s,s=s.next):(i.next=a,a=a.next),i=i.next;return s!==null?i.next=s:a!==null&&(i.next=a),n.next}function Af(r,t,e,n,i){if(!(e>=n)){for(var s=r[e+n>>1],a=e-1,o=n+1;;){do a++;while(i(r[a],s)<0);do o--;while(i(r[o],s)>0);if(a>=o)break;var l=r[a];r[a]=r[o],r[o]=l,l=t[a],t[a]=t[o],t[o]=l}Af(r,t,e,o,i),Af(r,t,o+1,n,i)}}const ms=11102230246251565e-32,Ir=134217729,Zy=(3+8*ms)*ms;function Lf(r,t,e,n,i){let s,a,o,l,u=t[0],c=n[0],h=0,f=0;c>u==c>-u?(s=u,u=t[++h]):(s=c,c=n[++f]);let g=0;if(h<r&&f<e)for(c>u==c>-u?(a=u+s,o=s-(a-u),u=t[++h]):(a=c+s,o=s-(a-c),c=n[++f]),s=a,o!==0&&(i[g++]=o);h<r&&f<e;)c>u==c>-u?(a=s+u,l=a-s,o=s-(a-l)+(u-l),u=t[++h]):(a=s+c,l=a-s,o=s-(a-l)+(c-l),c=n[++f]),s=a,o!==0&&(i[g++]=o);for(;h<r;)a=s+u,l=a-s,o=s-(a-l)+(u-l),u=t[++h],s=a,o!==0&&(i[g++]=o);for(;f<e;)a=s+c,l=a-s,o=s-(a-l)+(c-l),c=n[++f],s=a,o!==0&&(i[g++]=o);return(s!==0||g===0)&&(i[g++]=s),g}function $y(r,t){let e=t[0];for(let n=1;n<r;n++)e+=t[n];return e}function qu(r){return new Float64Array(r)}const jy=(3+16*ms)*ms,t_=(2+12*ms)*ms,e_=(9+64*ms)*ms*ms,Yl=qu(4),Wp=qu(8),Hp=qu(12),Xp=qu(16),Fr=qu(4);function r_(r,t,e,n,i,s,a){let o,l,u,c,h,f,g,m,_,E,M,y,w,v,S,P,I,b;const D=r-i,O=e-i,T=t-s,x=n-s;v=D*x,f=Ir*D,g=f-(f-D),m=D-g,f=Ir*x,_=f-(f-x),E=x-_,S=m*E-(v-g*_-m*_-g*E),P=T*O,f=Ir*T,g=f-(f-T),m=T-g,f=Ir*O,_=f-(f-O),E=O-_,I=m*E-(P-g*_-m*_-g*E),M=S-I,h=S-M,Yl[0]=S-(M+h)+(h-I),y=v+M,h=y-v,w=v-(y-h)+(M-h),M=w-P,h=w-M,Yl[1]=w-(M+h)+(h-P),b=y+M,h=b-y,Yl[2]=y-(b-h)+(M-h),Yl[3]=b;let R=$y(4,Yl),z=t_*a;if(R>=z||-R>=z||(h=r-D,o=r-(D+h)+(h-i),h=e-O,u=e-(O+h)+(h-i),h=t-T,l=t-(T+h)+(h-s),h=n-x,c=n-(x+h)+(h-s),o===0&&l===0&&u===0&&c===0)||(z=e_*a+Zy*Math.abs(R),R+=D*c+x*o-(T*u+O*l),R>=z||-R>=z))return R;v=o*x,f=Ir*o,g=f-(f-o),m=o-g,f=Ir*x,_=f-(f-x),E=x-_,S=m*E-(v-g*_-m*_-g*E),P=l*O,f=Ir*l,g=f-(f-l),m=l-g,f=Ir*O,_=f-(f-O),E=O-_,I=m*E-(P-g*_-m*_-g*E),M=S-I,h=S-M,Fr[0]=S-(M+h)+(h-I),y=v+M,h=y-v,w=v-(y-h)+(M-h),M=w-P,h=w-M,Fr[1]=w-(M+h)+(h-P),b=y+M,h=b-y,Fr[2]=y-(b-h)+(M-h),Fr[3]=b;const rt=Lf(4,Yl,4,Fr,Wp);v=D*c,f=Ir*D,g=f-(f-D),m=D-g,f=Ir*c,_=f-(f-c),E=c-_,S=m*E-(v-g*_-m*_-g*E),P=T*u,f=Ir*T,g=f-(f-T),m=T-g,f=Ir*u,_=f-(f-u),E=u-_,I=m*E-(P-g*_-m*_-g*E),M=S-I,h=S-M,Fr[0]=S-(M+h)+(h-I),y=v+M,h=y-v,w=v-(y-h)+(M-h),M=w-P,h=w-M,Fr[1]=w-(M+h)+(h-P),b=y+M,h=b-y,Fr[2]=y-(b-h)+(M-h),Fr[3]=b;const B=Lf(rt,Wp,4,Fr,Hp);v=o*c,f=Ir*o,g=f-(f-o),m=o-g,f=Ir*c,_=f-(f-c),E=c-_,S=m*E-(v-g*_-m*_-g*E),P=l*u,f=Ir*l,g=f-(f-l),m=l-g,f=Ir*u,_=f-(f-u),E=u-_,I=m*E-(P-g*_-m*_-g*E),M=S-I,h=S-M,Fr[0]=S-(M+h)+(h-I),y=v+M,h=y-v,w=v-(y-h)+(M-h),M=w-P,h=w-M,Fr[1]=w-(M+h)+(h-P),b=y+M,h=b-y,Fr[2]=y-(b-h)+(M-h),Fr[3]=b;const ct=Lf(B,Hp,4,Fr,Xp);return Xp[ct-1]}function n_(r,t,e,n,i,s){const a=(t-s)*(e-i),o=(r-i)*(n-s),l=a-o,u=Math.abs(a+o);return Math.abs(l)>=jy*u?l:-r_(r,t,e,n,i,s,u)}const Wu=(r,t)=>r.ll.x<=t.x&&t.x<=r.ur.x&&r.ll.y<=t.y&&t.y<=r.ur.y,Rf=(r,t)=>{if(t.ur.x<r.ll.x||r.ur.x<t.ll.x||t.ur.y<r.ll.y||r.ur.y<t.ll.y)return null;const e=r.ll.x<t.ll.x?t.ll.x:r.ll.x,n=r.ur.x<t.ur.x?r.ur.x:t.ur.x,i=r.ll.y<t.ll.y?t.ll.y:r.ll.y,s=r.ur.y<t.ur.y?r.ur.y:t.ur.y;return{ll:{x:e,y:i},ur:{x:n,y:s}}};let Qs=Number.EPSILON;Qs===void 0&&(Qs=Math.pow(2,-52));const i_=Qs*Qs,Yp=(r,t)=>{if(-Qs<r&&r<Qs&&-Qs<t&&t<Qs)return 0;const e=r-t;return e*e<i_*r*t?0:r<t?-1:1};class s_{constructor(){this.reset()}reset(){this.xRounder=new Jp,this.yRounder=new Jp}round(t,e){return{x:this.xRounder.round(t),y:this.yRounder.round(e)}}}class Jp{constructor(){this.tree=new Df,this.round(0)}round(t){const e=this.tree.add(t),n=this.tree.prev(e);if(n!==null&&Yp(e.key,n.key)===0)return this.tree.remove(t),n.key;const i=this.tree.next(e);return i!==null&&Yp(e.key,i.key)===0?(this.tree.remove(t),i.key):t}}const Hu=new s_,ec=(r,t)=>r.x*t.y-r.y*t.x,Kp=(r,t)=>r.x*t.x+r.y*t.y,Qp=(r,t,e)=>{const n=n_(r.x,r.y,t.x,t.y,e.x,e.y);return n>0?-1:n<0?1:0},rc=r=>Math.sqrt(Kp(r,r)),a_=(r,t,e)=>{const n={x:t.x-r.x,y:t.y-r.y},i={x:e.x-r.x,y:e.y-r.y};return ec(i,n)/rc(i)/rc(n)},o_=(r,t,e)=>{const n={x:t.x-r.x,y:t.y-r.y},i={x:e.x-r.x,y:e.y-r.y};return Kp(i,n)/rc(i)/rc(n)},Bp=(r,t,e)=>t.y===0?null:{x:r.x+t.x/t.y*(e-r.y),y:e},Zp=(r,t,e)=>t.x===0?null:{x:e,y:r.y+t.y/t.x*(e-r.x)},l_=(r,t,e,n)=>{if(t.x===0)return Zp(e,n,r.x);if(n.x===0)return Zp(r,t,e.x);if(t.y===0)return Bp(e,n,r.y);if(n.y===0)return Bp(r,t,e.y);const i=ec(t,n);if(i==0)return null;const s={x:e.x-r.x,y:e.y-r.y},a=ec(s,t)/i,o=ec(s,n)/i,l=r.x+o*t.x,u=e.x+a*n.x,c=r.y+o*t.y,h=e.y+a*n.y,f=(l+u)/2,g=(c+h)/2;return{x:f,y:g}};class kn{static compare(t,e){const n=kn.comparePoints(t.point,e.point);return n!==0?n:(t.point!==e.point&&t.link(e),t.isLeft!==e.isLeft?t.isLeft?1:-1:Bs.compare(t.segment,e.segment))}static comparePoints(t,e){return t.x<e.x?-1:t.x>e.x?1:t.y<e.y?-1:t.y>e.y?1:0}constructor(t,e){t.events===void 0?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}link(t){if(t.point===this.point)throw new Error("Tried to link already linked events");const e=t.point.events;for(let n=0,i=e.length;n<i;n++){const s=e[n];this.point.events.push(s),s.point=this.point}this.checkForConsuming()}checkForConsuming(){const t=this.point.events.length;for(let e=0;e<t;e++){const n=this.point.events[e];if(n.segment.consumedBy===void 0)for(let i=e+1;i<t;i++){const s=this.point.events[i];s.consumedBy===void 0&&n.otherSE.point.events===s.otherSE.point.events&&n.segment.consume(s.segment)}}}getAvailableLinkedEvents(){const t=[];for(let e=0,n=this.point.events.length;e<n;e++){const i=this.point.events[e];i!==this&&!i.segment.ringOut&&i.segment.isInResult()&&t.push(i)}return t}getLeftmostComparator(t){const e=new Map,n=i=>{const s=i.otherSE;e.set(i,{sine:a_(this.point,t.point,s.point),cosine:o_(this.point,t.point,s.point)})};return(i,s)=>{e.has(i)||n(i),e.has(s)||n(s);const{sine:a,cosine:o}=e.get(i),{sine:l,cosine:u}=e.get(s);return a>=0&&l>=0?o<u?1:o>u?-1:0:a<0&&l<0?o<u?-1:o>u?1:0:l<a?-1:l>a?1:0}}}let u_=0;class Bs{static compare(t,e){const n=t.leftSE.point.x,i=e.leftSE.point.x,s=t.rightSE.point.x,a=e.rightSE.point.x;if(a<n)return 1;if(s<i)return-1;const o=t.leftSE.point.y,l=e.leftSE.point.y,u=t.rightSE.point.y,c=e.rightSE.point.y;if(n<i){if(l<o&&l<u)return 1;if(l>o&&l>u)return-1;const h=t.comparePoint(e.leftSE.point);if(h<0)return 1;if(h>0)return-1;const f=e.comparePoint(t.rightSE.point);return f!==0?f:-1}if(n>i){if(o<l&&o<c)return-1;if(o>l&&o>c)return 1;const h=e.comparePoint(t.leftSE.point);if(h!==0)return h;const f=t.comparePoint(e.rightSE.point);return f<0?1:f>0?-1:1}if(o<l)return-1;if(o>l)return 1;if(s<a){const h=e.comparePoint(t.rightSE.point);if(h!==0)return h}if(s>a){const h=t.comparePoint(e.rightSE.point);if(h<0)return 1;if(h>0)return-1}if(s!==a){const h=u-o,f=s-n,g=c-l,m=a-i;if(h>f&&g<m)return 1;if(h<f&&g>m)return-1}return s>a?1:s<a||u<c?-1:u>c?1:t.id<e.id?-1:t.id>e.id?1:0}constructor(t,e,n,i){this.id=++u_,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=n,this.windings=i}static fromRing(t,e,n){let i,s,a;const o=kn.comparePoints(t,e);if(o<0)i=t,s=e,a=1;else if(o>0)i=e,s=t,a=-1;else throw new Error(`Tried to create degenerate segment at [${t.x}, ${t.y}]`);const l=new kn(i,!0),u=new kn(s,!1);return new Bs(l,u,[n],[a])}replaceRightSE(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<e?t:e},ur:{x:this.rightSE.point.x,y:t>e?t:e}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}comparePoint(t){if(this.isAnEndpoint(t))return 0;const e=this.leftSE.point,n=this.rightSE.point,i=this.vector();if(e.x===n.x)return t.x===e.x?0:t.x<e.x?1:-1;const s=(t.y-e.y)/i.y,a=e.x+s*i.x;if(t.x===a)return 0;const o=(t.x-e.x)/i.x,l=e.y+o*i.y;return t.y===l?0:t.y<l?-1:1}getIntersection(t){const e=this.bbox(),n=t.bbox(),i=Rf(e,n);if(i===null)return null;const s=this.leftSE.point,a=this.rightSE.point,o=t.leftSE.point,l=t.rightSE.point,u=Wu(e,o)&&this.comparePoint(o)===0,c=Wu(n,s)&&t.comparePoint(s)===0,h=Wu(e,l)&&this.comparePoint(l)===0,f=Wu(n,a)&&t.comparePoint(a)===0;if(c&&u)return f&&!h?a:!f&&h?l:null;if(c)return h&&s.x===l.x&&s.y===l.y?null:s;if(u)return f&&a.x===o.x&&a.y===o.y?null:o;if(f&&h)return null;if(f)return a;if(h)return l;const g=l_(s,this.vector(),o,t.vector());return g===null||!Wu(i,g)?null:Hu.round(g.x,g.y)}split(t){const e=[],n=t.events!==void 0,i=new kn(t,!0),s=new kn(t,!1),a=this.rightSE;this.replaceRightSE(s),e.push(s),e.push(i);const o=new Bs(i,a,this.rings.slice(),this.windings.slice());return kn.comparePoints(o.leftSE.point,o.rightSE.point)>0&&o.swapEvents(),kn.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(i.checkForConsuming(),s.checkForConsuming()),e}swapEvents(){const t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let e=0,n=this.windings.length;e<n;e++)this.windings[e]*=-1}consume(t){let e=this,n=t;for(;e.consumedBy;)e=e.consumedBy;for(;n.consumedBy;)n=n.consumedBy;const i=Bs.compare(e,n);if(i!==0){if(i>0){const s=e;e=n,n=s}if(e.prev===n){const s=e;e=n,n=s}for(let s=0,a=n.rings.length;s<a;s++){const o=n.rings[s],l=n.windings[s],u=e.rings.indexOf(o);u===-1?(e.rings.push(o),e.windings.push(l)):e.windings[u]+=l}n.rings=null,n.windings=null,n.consumedBy=e,n.leftSE.consumedBy=e.leftSE,n.rightSE.consumedBy=e.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{const t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;const t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};const e=this._afterState.rings,n=this._afterState.windings,i=this._afterState.multiPolys;for(let o=0,l=this.rings.length;o<l;o++){const u=this.rings[o],c=this.windings[o],h=e.indexOf(u);h===-1?(e.push(u),n.push(c)):n[h]+=c}const s=[],a=[];for(let o=0,l=e.length;o<l;o++){if(n[o]===0)continue;const u=e[o],c=u.poly;if(a.indexOf(c)===-1)if(u.isExterior)s.push(c);else{a.indexOf(c)===-1&&a.push(c);const h=s.indexOf(u.poly);h!==-1&&s.splice(h,1)}}for(let o=0,l=s.length;o<l;o++){const u=s[o].multiPoly;i.indexOf(u)===-1&&i.push(u)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;const t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(fi.type){case"union":{const n=t.length===0,i=e.length===0;this._isInResult=n!==i;break}case"intersection":{let n,i;t.length<e.length?(n=t.length,i=e.length):(n=e.length,i=t.length),this._isInResult=i===fi.numMultiPolys&&n<i;break}case"xor":{const n=Math.abs(t.length-e.length);this._isInResult=n%2===1;break}case"difference":{const n=i=>i.length===1&&i[0].isSubject;this._isInResult=n(t)!==n(e);break}default:throw new Error(`Unrecognized operation type found ${fi.type}`)}return this._isInResult}}class $p{constructor(t,e,n){if(!Array.isArray(t)||t.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=n,this.segments=[],typeof t[0][0]!="number"||typeof t[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const i=Hu.round(t[0][0],t[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};let s=i;for(let a=1,o=t.length;a<o;a++){if(typeof t[a][0]!="number"||typeof t[a][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let l=Hu.round(t[a][0],t[a][1]);l.x===s.x&&l.y===s.y||(this.segments.push(Bs.fromRing(s,l,this)),l.x<this.bbox.ll.x&&(this.bbox.ll.x=l.x),l.y<this.bbox.ll.y&&(this.bbox.ll.y=l.y),l.x>this.bbox.ur.x&&(this.bbox.ur.x=l.x),l.y>this.bbox.ur.y&&(this.bbox.ur.y=l.y),s=l)}(i.x!==s.x||i.y!==s.y)&&this.segments.push(Bs.fromRing(s,i,this))}getSweepEvents(){const t=[];for(let e=0,n=this.segments.length;e<n;e++){const i=this.segments[e];t.push(i.leftSE),t.push(i.rightSE)}return t}}class h_{constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new $p(t[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let n=1,i=t.length;n<i;n++){const s=new $p(t[n],this,!1);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}this.multiPoly=e}getSweepEvents(){const t=this.exteriorRing.getSweepEvents();for(let e=0,n=this.interiorRings.length;e<n;e++){const i=this.interiorRings[e].getSweepEvents();for(let s=0,a=i.length;s<a;s++)t.push(i[s])}return t}}class jp{constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof t[0][0][0]=="number"&&(t=[t])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(let n=0,i=t.length;n<i;n++){const s=new h_(t[n],this);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}this.isSubject=e}getSweepEvents(){const t=[];for(let e=0,n=this.polys.length;e<n;e++){const i=this.polys[e].getSweepEvents();for(let s=0,a=i.length;s<a;s++)t.push(i[s])}return t}}class nc{static factory(t){const e=[];for(let n=0,i=t.length;n<i;n++){const s=t[n];if(!s.isInResult()||s.ringOut)continue;let a=null,o=s.leftSE,l=s.rightSE;const u=[o],c=o.point,h=[];for(;a=o,o=l,u.push(o),o.point!==c;)for(;;){const f=o.getAvailableLinkedEvents();if(f.length===0){const _=u[0].point,E=u[u.length-1].point;throw new Error(`Unable to complete output ring starting at [${_.x}, ${_.y}]. Last matching segment found ends at [${E.x}, ${E.y}].`)}if(f.length===1){l=f[0].otherSE;break}let g=null;for(let _=0,E=h.length;_<E;_++)if(h[_].point===o.point){g=_;break}if(g!==null){const _=h.splice(g)[0],E=u.splice(_.index);E.unshift(E[0].otherSE),e.push(new nc(E.reverse()));continue}h.push({index:u.length,point:o.point});const m=o.getLeftmostComparator(a);l=f.sort(m)[0].otherSE;break}e.push(new nc(u))}return e}constructor(t){this.events=t;for(let e=0,n=t.length;e<n;e++)t[e].segment.ringOut=this;this.poly=null}getGeom(){let t=this.events[0].point;const e=[t];for(let u=1,c=this.events.length-1;u<c;u++){const h=this.events[u].point,f=this.events[u+1].point;Qp(h,t,f)!==0&&(e.push(h),t=h)}if(e.length===1)return null;const n=e[0],i=e[1];Qp(n,t,i)===0&&e.shift(),e.push(e[0]);const s=this.isExteriorRing()?1:-1,a=this.isExteriorRing()?0:e.length-1,o=this.isExteriorRing()?e.length:-1,l=[];for(let u=a;u!=o;u+=s)l.push([e[u].x,e[u].y]);return l}isExteriorRing(){if(this._isExteriorRing===void 0){const t=this.enclosingRing();this._isExteriorRing=t?!t.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let t=this.events[0];for(let i=1,s=this.events.length;i<s;i++){const a=this.events[i];kn.compare(t,a)>0&&(t=a)}let e=t.segment.prevInResult(),n=e?e.prevInResult():null;for(;;){if(!e)return null;if(!n)return e.ringOut;if(n.ringOut!==e.ringOut)return n.ringOut.enclosingRing()!==e.ringOut?e.ringOut:e.ringOut.enclosingRing();e=n.prevInResult(),n=e?e.prevInResult():null}}}class tg{constructor(t){this.exteriorRing=t,t.poly=this,this.interiorRings=[]}addInterior(t){this.interiorRings.push(t),t.poly=this}getGeom(){const t=[this.exteriorRing.getGeom()];if(t[0]===null)return null;for(let e=0,n=this.interiorRings.length;e<n;e++){const i=this.interiorRings[e].getGeom();i!==null&&t.push(i)}return t}}class c_{constructor(t){this.rings=t,this.polys=this._composePolys(t)}getGeom(){const t=[];for(let e=0,n=this.polys.length;e<n;e++){const i=this.polys[e].getGeom();i!==null&&t.push(i)}return t}_composePolys(t){const e=[];for(let n=0,i=t.length;n<i;n++){const s=t[n];if(!s.poly)if(s.isExteriorRing())e.push(new tg(s));else{const a=s.enclosingRing();a.poly||e.push(new tg(a)),a.poly.addInterior(s)}}return e}}class f_{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Bs.compare;this.queue=t,this.tree=new Df(e),this.segments=[]}process(t){const e=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),n;const i=t.isLeft?this.tree.add(e):this.tree.find(e);if(!i)throw new Error(`Unable to find segment #${e.id} [${e.leftSE.point.x}, ${e.leftSE.point.y}] -> [${e.rightSE.point.x}, ${e.rightSE.point.y}] in SweepLine tree.`);let s=i,a=i,o,l;for(;o===void 0;)s=this.tree.prev(s),s===null?o=null:s.key.consumedBy===void 0&&(o=s.key);for(;l===void 0;)a=this.tree.next(a),a===null?l=null:a.key.consumedBy===void 0&&(l=a.key);if(t.isLeft){let u=null;if(o){const h=o.getIntersection(e);if(h!==null&&(e.isAnEndpoint(h)||(u=h),!o.isAnEndpoint(h))){const f=this._splitSafely(o,h);for(let g=0,m=f.length;g<m;g++)n.push(f[g])}}let c=null;if(l){const h=l.getIntersection(e);if(h!==null&&(e.isAnEndpoint(h)||(c=h),!l.isAnEndpoint(h))){const f=this._splitSafely(l,h);for(let g=0,m=f.length;g<m;g++)n.push(f[g])}}if(u!==null||c!==null){let h=null;u===null?h=c:c===null?h=u:h=kn.comparePoints(u,c)<=0?u:c,this.queue.remove(e.rightSE),n.push(e.rightSE);const f=e.split(h);for(let g=0,m=f.length;g<m;g++)n.push(f[g])}n.length>0?(this.tree.remove(e),n.push(t)):(this.segments.push(e),e.prev=o)}else{if(o&&l){const u=o.getIntersection(l);if(u!==null){if(!o.isAnEndpoint(u)){const c=this._splitSafely(o,u);for(let h=0,f=c.length;h<f;h++)n.push(c[h])}if(!l.isAnEndpoint(u)){const c=this._splitSafely(l,u);for(let h=0,f=c.length;h<f;h++)n.push(c[h])}}}this.tree.remove(e)}return n}_splitSafely(t,e){this.tree.remove(t);const n=t.rightSE;this.queue.remove(n);const i=t.split(e);return i.push(n),t.consumedBy===void 0&&this.tree.add(t),i}}const eg=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,d_=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class p_{run(t,e,n){fi.type=t,Hu.reset();const i=[new jp(e,!0)];for(let h=0,f=n.length;h<f;h++)i.push(new jp(n[h],!1));if(fi.numMultiPolys=i.length,fi.type==="difference"){const h=i[0];let f=1;for(;f<i.length;)Rf(i[f].bbox,h.bbox)!==null?f++:i.splice(f,1)}if(fi.type==="intersection")for(let h=0,f=i.length;h<f;h++){const g=i[h];for(let m=h+1,_=i.length;m<_;m++)if(Rf(g.bbox,i[m].bbox)===null)return[]}const s=new Df(kn.compare);for(let h=0,f=i.length;h<f;h++){const g=i[h].getSweepEvents();for(let m=0,_=g.length;m<_;m++)if(s.insert(g[m]),s.size>eg)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const a=new f_(s);let o=s.size,l=s.pop();for(;l;){const h=l.key;if(s.size===o){const g=h.segment;throw new Error(`Unable to pop() ${h.isLeft?"left":"right"} SweepEvent [${h.point.x}, ${h.point.y}] from segment #${g.id} [${g.leftSE.point.x}, ${g.leftSE.point.y}] -> [${g.rightSE.point.x}, ${g.rightSE.point.y}] from queue.`)}if(s.size>eg)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(a.segments.length>d_)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const f=a.process(h);for(let g=0,m=f.length;g<m;g++){const _=f[g];_.consumedBy===void 0&&s.insert(_)}o=s.size,l=s.pop()}Hu.reset();const u=nc.factory(a.segments);return new c_(u).getGeom()}}const fi=new p_;var Ff={union:function(r){for(var t=arguments.length,e=new Array(t>1?t-1:0),n=1;n<t;n++)e[n-1]=arguments[n];return fi.run("union",r,e)},intersection:function(r){for(var t=arguments.length,e=new Array(t>1?t-1:0),n=1;n<t;n++)e[n-1]=arguments[n];return fi.run("intersection",r,e)},xor:function(r){for(var t=arguments.length,e=new Array(t>1?t-1:0),n=1;n<t;n++)e[n-1]=arguments[n];return fi.run("xor",r,e)},difference:function(r){for(var t=arguments.length,e=new Array(t>1?t-1:0),n=1;n<t;n++)e[n-1]=arguments[n];return fi.run("difference",r,e)}};function g_(r,t){var e=_n(r),n=_n(t),i=r.properties||{},s=Ff.difference(e.coordinates,n.coordinates);return s.length===0?null:s.length===1?Pr(s[0],i):vf(s,i)}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(t){if(this===void 0||this===null)throw new TypeError(this+" is not an object");var e=Object(this),n=Math.max(Math.min(e.length,9007199254740991),0)||0,i=1 in arguments&&parseInt(Number(arguments[1]),10)||0;i=i<0?Math.max(n+i,0):Math.min(i,n);var s=2 in arguments&&arguments[2]!==void 0?parseInt(Number(arguments[2]),10)||0:n;for(s=s<0?Math.max(n+arguments[2],0):Math.min(s,n);i<s;)e[i]=t,++i;return e},writable:!0}),Number.isFinite=Number.isFinite||function(r){return typeof r=="number"&&isFinite(r)},Number.isInteger=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(r){return r!==r},Math.trunc=Math.trunc||function(r){return r<0?Math.ceil(r):Math.floor(r)};var La=function(){};La.prototype.interfaces_=function(){return[]},La.prototype.getClass=function(){return La},La.prototype.equalsWithTolerance=function(t,e,n){return Math.abs(t-e)<=n};var oe=function(r){function t(e){r.call(this,e),this.name="IllegalArgumentException",this.message=e,this.stack=new r().stack}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t}(Error),wt=function(){},rg={MAX_VALUE:{configurable:!0}};wt.isNaN=function(t){return Number.isNaN(t)},wt.doubleToLongBits=function(t){return t},wt.longBitsToDouble=function(t){return t},wt.isInfinite=function(t){return!Number.isFinite(t)},rg.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(wt,rg);var Zr=function(){},ic=function(){},Jl=function(){};function $r(){}var L=function r(){if(this.x=null,this.y=null,this.z=null,arguments.length===0)this.x=0,this.y=0,this.z=r.NULL_ORDINATE;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.z=t.z}else arguments.length===2?(this.x=arguments[0],this.y=arguments[1],this.z=r.NULL_ORDINATE):arguments.length===3&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},Ra={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};L.prototype.setOrdinate=function(t,e){switch(t){case L.X:this.x=e;break;case L.Y:this.y=e;break;case L.Z:this.z=e;break;default:throw new oe("Invalid ordinate index: "+t)}},L.prototype.equals2D=function(){if(arguments.length===1){var t=arguments[0];return!(this.x!==t.x||this.y!==t.y)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return!(!La.equalsWithTolerance(this.x,e.x,n)||!La.equalsWithTolerance(this.y,e.y,n))}},L.prototype.getOrdinate=function(t){switch(t){case L.X:return this.x;case L.Y:return this.y;case L.Z:return this.z}throw new oe("Invalid ordinate index: "+t)},L.prototype.equals3D=function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||wt.isNaN(this.z))&&wt.isNaN(t.z)},L.prototype.equals=function(t){return t instanceof L?this.equals2D(t):!1},L.prototype.equalInZ=function(t,e){return La.equalsWithTolerance(this.z,t.z,e)},L.prototype.compareTo=function(t){var e=t;return this.x<e.x?-1:this.x>e.x?1:this.y<e.y?-1:this.y>e.y?1:0},L.prototype.clone=function(){},L.prototype.copy=function(){return new L(this)},L.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},L.prototype.distance3D=function(t){var e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return Math.sqrt(e*e+n*n+i*i)},L.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},L.prototype.hashCode=function(){var t=17;return t=37*t+L.hashCode(this.x),t=37*t+L.hashCode(this.y),t},L.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},L.prototype.interfaces_=function(){return[Zr,ic,$r]},L.prototype.getClass=function(){return L},L.hashCode=function(){if(arguments.length===1){var t=arguments[0],e=wt.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},Ra.DimensionalComparator.get=function(){return vs},Ra.serialVersionUID.get=function(){return 6683108902428367e3},Ra.NULL_ORDINATE.get=function(){return wt.NaN},Ra.X.get=function(){return 0},Ra.Y.get=function(){return 1},Ra.Z.get=function(){return 2},Object.defineProperties(L,Ra);var vs=function(t){if(this._dimensionsToTest=2,arguments.length!==0){if(arguments.length===1){var e=arguments[0];if(e!==2&&e!==3)throw new oe("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}}};vs.prototype.compare=function(t,e){var n=t,i=e,s=vs.compare(n.x,i.x);if(s!==0)return s;var a=vs.compare(n.y,i.y);if(a!==0)return a;if(this._dimensionsToTest<=2)return 0;var o=vs.compare(n.z,i.z);return o},vs.prototype.interfaces_=function(){return[Jl]},vs.prototype.getClass=function(){return vs},vs.compare=function(t,e){return t<e?-1:t>e?1:wt.isNaN(t)?wt.isNaN(e)?0:-1:wt.isNaN(e)?1:0};var Kl=function(){};Kl.prototype.create=function(){},Kl.prototype.interfaces_=function(){return[]},Kl.prototype.getClass=function(){return Kl};var F=function(){},Xu={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};F.prototype.interfaces_=function(){return[]},F.prototype.getClass=function(){return F},F.toLocationSymbol=function(t){switch(t){case F.EXTERIOR:return"e";case F.BOUNDARY:return"b";case F.INTERIOR:return"i";case F.NONE:return"-"}throw new oe("Unknown location value: "+t)},Xu.INTERIOR.get=function(){return 0},Xu.BOUNDARY.get=function(){return 1},Xu.EXTERIOR.get=function(){return 2},Xu.NONE.get=function(){return-1},Object.defineProperties(F,Xu);var _t=function(r,t){return r.interfaces_&&r.interfaces_().indexOf(t)>-1},Gr=function(){},ng={LOG_10:{configurable:!0}};Gr.prototype.interfaces_=function(){return[]},Gr.prototype.getClass=function(){return Gr},Gr.log10=function(t){var e=Math.log(t);return wt.isInfinite(e)||wt.isNaN(e)?e:e/Gr.LOG_10},Gr.min=function(t,e,n,i){var s=t;return e<s&&(s=e),n<s&&(s=n),i<s&&(s=i),s},Gr.clamp=function(){if(typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1],n=arguments[2];return t<e?e:t>n?n:t}else if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var i=arguments[0],s=arguments[1],a=arguments[2];return i<s?s:i>a?a:i}},Gr.wrap=function(t,e){return t<0?e- -t%e:t%e},Gr.max=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],n=arguments[2],i=t;return e>i&&(i=e),n>i&&(i=n),i}else if(arguments.length===4){var s=arguments[0],a=arguments[1],o=arguments[2],l=arguments[3],u=s;return a>u&&(u=a),o>u&&(u=o),l>u&&(u=l),u}},Gr.average=function(t,e){return(t+e)/2},ng.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(Gr,ng);var zn=function(t){this.str=t};zn.prototype.append=function(t){this.str+=t},zn.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},zn.prototype.toString=function(t){return this.str};var Vn=function(t){this.value=t};Vn.prototype.intValue=function(){return this.value},Vn.prototype.compareTo=function(t){return this.value<t?-1:this.value>t?1:0},Vn.isNaN=function(t){return Number.isNaN(t)};var Yu=function(){};Yu.isWhitespace=function(t){return t<=32&&t>=0||t===127},Yu.toUpperCase=function(t){return t.toUpperCase()};var q=function r(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this.init(t)}else if(arguments[0]instanceof r){var e=arguments[0];this.init(e)}else if(typeof arguments[0]=="string"){var n=arguments[0];r.call(this,r.parse(n))}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.init(i,s)}},wn={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};q.prototype.le=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<=t._lo},q.prototype.extractSignificantDigits=function(t,e){var n=this.abs(),i=q.magnitude(n._hi),s=q.TEN.pow(i);n=n.divide(s),n.gt(q.TEN)?(n=n.divide(q.TEN),i+=1):n.lt(q.ONE)&&(n=n.multiply(q.TEN),i-=1);for(var a=i+1,o=new zn,l=q.MAX_PRINT_DIGITS-1,u=0;u<=l;u++){t&&u===a&&o.append(".");var c=Math.trunc(n._hi);if(c<0)break;var h=!1,f=0;c>9?(h=!0,f="9"):f="0"+c,o.append(f),n=n.subtract(q.valueOf(c)).multiply(q.TEN),h&&n.selfAdd(q.TEN);var g=!0,m=q.magnitude(n._hi);if(m<0&&Math.abs(m)>=l-u&&(g=!1),!g)break}return e[0]=i,o.toString()},q.prototype.sqr=function(){return this.multiply(this)},q.prototype.doubleValue=function(){return this._hi+this._lo},q.prototype.subtract=function(){if(arguments[0]instanceof q){var t=arguments[0];return this.add(t.negate())}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.add(-e)}},q.prototype.equals=function(){if(arguments.length===1){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},q.prototype.isZero=function(){return this._hi===0&&this._lo===0},q.prototype.selfSubtract=function(){if(arguments[0]instanceof q){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},q.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},q.prototype.min=function(t){return this.le(t)?this:t},q.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof q){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfDivide(e,0)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=null,a=null,o=null,l=null,u=null,c=null,h=null,f=null;return u=this._hi/n,c=q.SPLIT*u,s=c-u,f=q.SPLIT*n,s=c-s,a=u-s,o=f-n,h=u*n,o=f-o,l=n-o,f=s*o-h+s*l+a*o+a*l,c=(this._hi-h-f+this._lo-u*i)/n,f=u+c,this._hi=f,this._lo=u-f+c,this}},q.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},q.prototype.divide=function(){if(arguments[0]instanceof q){var t=arguments[0],e=null,n=null,i=null,s=null,a=null,o=null,l=null,u=null;a=this._hi/t._hi,o=q.SPLIT*a,e=o-a,u=q.SPLIT*t._hi,e=o-e,n=a-e,i=u-t._hi,l=a*t._hi,i=u-i,s=t._hi-i,u=e*i-l+e*s+n*i+n*s,o=(this._hi-l-u+this._lo-a*t._lo)/t._hi,u=a+o;var c=u,h=a-u+o;return new q(c,h)}else if(typeof arguments[0]=="number"){var f=arguments[0];return wt.isNaN(f)?q.createNaN():q.copy(this).selfDivide(f,0)}},q.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},q.prototype.pow=function(t){if(t===0)return q.valueOf(1);var e=new q(this),n=q.valueOf(1),i=Math.abs(t);if(i>1)for(;i>0;)i%2===1&&n.selfMultiply(e),i/=2,i>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n},q.prototype.ceil=function(){if(this.isNaN())return q.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new q(t,e)},q.prototype.compareTo=function(t){var e=t;return this._hi<e._hi?-1:this._hi>e._hi?1:this._lo<e._lo?-1:this._lo>e._lo?1:0},q.prototype.rint=function(){if(this.isNaN())return this;var t=this.add(.5);return t.floor()},q.prototype.setValue=function(){if(arguments[0]instanceof q){var t=arguments[0];return this.init(t),this}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.init(e),this}},q.prototype.max=function(t){return this.ge(t)?this:t},q.prototype.sqrt=function(){if(this.isZero())return q.valueOf(0);if(this.isNegative())return q.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=q.valueOf(e),i=this.subtract(n.sqr()),s=i._hi*(t*.5);return n.add(s)},q.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof q){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0],n=null,i=null,s=null,a=null,o=null,l=null;return s=this._hi+e,o=s-this._hi,a=s-o,a=e-o+(this._hi-a),l=a+this._lo,n=s+l,i=l+(s-n),this._hi=n+i,this._lo=i+(n-this._hi),this}}else if(arguments.length===2){var u=arguments[0],c=arguments[1],h=null,f=null,g=null,m=null,_=null,E=null,M=null,y=null;_=this._hi+u,g=this._lo+c,M=_-this._hi,y=g-this._lo,E=_-M,m=g-y,E=u-M+(this._hi-E),m=c-y+(this._lo-m),M=E+g,h=_+M,f=M+(_-h),M=m+f;var w=h+M,v=M+(h-w);return this._hi=w,this._lo=v,this}},q.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof q){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfMultiply(e,0)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=null,a=null,o=null,l=null,u=null,c=null;u=q.SPLIT*this._hi,s=u-this._hi,c=q.SPLIT*n,s=u-s,a=this._hi-s,o=c-n,u=this._hi*n,o=c-o,l=n-o,c=s*o-u+s*l+a*o+a*l+(this._hi*i+this._lo*n);var h=u+c;s=u-h;var f=c+s;return this._hi=h,this._lo=f,this}},q.prototype.selfSqr=function(){return this.selfMultiply(this)},q.prototype.floor=function(){if(this.isNaN())return q.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new q(t,e)},q.prototype.negate=function(){return this.isNaN()?this:new q(-this._hi,-this._lo)},q.prototype.clone=function(){},q.prototype.multiply=function(){if(arguments[0]instanceof q){var t=arguments[0];return t.isNaN()?q.createNaN():q.copy(this).selfMultiply(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return wt.isNaN(e)?q.createNaN():q.copy(this).selfMultiply(e,0)}},q.prototype.isNaN=function(){return wt.isNaN(this._hi)},q.prototype.intValue=function(){return Math.trunc(this._hi)},q.prototype.toString=function(){var t=q.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},q.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),i=e[0]+1,s=n;if(n.charAt(0)===".")s="0"+n;else if(i<0)s="0."+q.stringOfChar("0",-i)+n;else if(n.indexOf(".")===-1){var a=i-n.length,o=q.stringOfChar("0",a);s=n+o+".0"}return this.isNegative()?"-"+s:s},q.prototype.reciprocal=function(){var t=null,e=null,n=null,i=null,s=null,a=null,o=null,l=null;s=1/this._hi,a=q.SPLIT*s,t=a-s,l=q.SPLIT*this._hi,t=a-t,e=s-t,n=l-this._hi,o=s*this._hi,n=l-n,i=this._hi-n,l=t*n-o+t*i+e*n+e*i,a=(1-o-l-s*this._lo)/this._hi;var u=s+a,c=s-u+a;return new q(u,c)},q.prototype.toSciNotation=function(){if(this.isZero())return q.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),i=q.SCI_NOT_EXPONENT_CHAR+e[0];if(n.charAt(0)==="0")throw new Error("Found leading zero: "+n);var s="";n.length>1&&(s=n.substring(1));var a=n.charAt(0)+"."+s;return this.isNegative()?"-"+a+i:a+i},q.prototype.abs=function(){return this.isNaN()?q.NaN:this.isNegative()?this.negate():new q(this)},q.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0},q.prototype.lt=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<t._lo},q.prototype.add=function(){if(arguments[0]instanceof q){var t=arguments[0];return q.copy(this).selfAdd(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return q.copy(this).selfAdd(e)}},q.prototype.init=function(){if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this._hi=t,this._lo=0}else if(arguments[0]instanceof q){var e=arguments[0];this._hi=e._hi,this._lo=e._lo}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this._hi=n,this._lo=i}},q.prototype.gt=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>t._lo},q.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0},q.prototype.trunc=function(){return this.isNaN()?q.NaN:this.isPositive()?this.floor():this.ceil()},q.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},q.prototype.interfaces_=function(){return[$r,Zr,ic]},q.prototype.getClass=function(){return q},q.sqr=function(t){return q.valueOf(t).selfMultiply(t)},q.valueOf=function(){if(typeof arguments[0]=="string"){var t=arguments[0];return q.parse(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return new q(e)}},q.sqrt=function(t){return q.valueOf(t).sqrt()},q.parse=function(t){for(var e=0,n=t.length;Yu.isWhitespace(t.charAt(e));)e++;var i=!1;if(e<n){var s=t.charAt(e);(s==="-"||s==="+")&&(e++,s==="-"&&(i=!0))}for(var a=new q,o=0,l=0,u=0;!(e>=n);){var c=t.charAt(e);if(e++,Yu.isDigit(c)){var h=c-"0";a.selfMultiply(q.TEN),a.selfAdd(h),o++;continue}if(c==="."){l=o;continue}if(c==="e"||c==="E"){var f=t.substring(e);try{u=Vn.parseInt(f)}catch(M){throw M instanceof Error?new Error("Invalid exponent "+f+" in string "+t):M}finally{}break}throw new Error("Unexpected character '"+c+"' at position "+e+" in string "+t)}var g=a,m=o-l-u;if(m===0)g=a;else if(m>0){var _=q.TEN.pow(m);g=a.divide(_)}else if(m<0){var E=q.TEN.pow(-m);g=a.multiply(E)}return i?g.negate():g},q.createNaN=function(){return new q(wt.NaN,wt.NaN)},q.copy=function(t){return new q(t)},q.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),i=Math.trunc(Math.floor(n)),s=Math.pow(10,i);return s*10<=e&&(i+=1),i},q.stringOfChar=function(t,e){for(var n=new zn,i=0;i<e;i++)n.append(t);return n.toString()},wn.PI.get=function(){return new q(3.141592653589793,12246467991473532e-32)},wn.TWO_PI.get=function(){return new q(6.283185307179586,24492935982947064e-32)},wn.PI_2.get=function(){return new q(1.5707963267948966,6123233995736766e-32)},wn.E.get=function(){return new q(2.718281828459045,14456468917292502e-32)},wn.NaN.get=function(){return new q(wt.NaN,wt.NaN)},wn.EPS.get=function(){return 123259516440783e-46},wn.SPLIT.get=function(){return 134217729},wn.MAX_PRINT_DIGITS.get=function(){return 32},wn.TEN.get=function(){return q.valueOf(10)},wn.ONE.get=function(){return q.valueOf(1)},wn.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},wn.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(q,wn);var cr=function(){},ig={DP_SAFE_EPSILON:{configurable:!0}};cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr},cr.orientationIndex=function(t,e,n){var i=cr.orientationIndexFilter(t,e,n);if(i<=1)return i;var s=q.valueOf(e.x).selfAdd(-t.x),a=q.valueOf(e.y).selfAdd(-t.y),o=q.valueOf(n.x).selfAdd(-e.x),l=q.valueOf(n.y).selfAdd(-e.y);return s.selfMultiply(l).selfSubtract(a.selfMultiply(o)).signum()},cr.signOfDet2x2=function(t,e,n,i){var s=t.multiply(i).selfSubtract(e.multiply(n));return s.signum()},cr.intersection=function(t,e,n,i){var s=q.valueOf(i.y).selfSubtract(n.y).selfMultiply(q.valueOf(e.x).selfSubtract(t.x)),a=q.valueOf(i.x).selfSubtract(n.x).selfMultiply(q.valueOf(e.y).selfSubtract(t.y)),o=s.subtract(a),l=q.valueOf(i.x).selfSubtract(n.x).selfMultiply(q.valueOf(t.y).selfSubtract(n.y)),u=q.valueOf(i.y).selfSubtract(n.y).selfMultiply(q.valueOf(t.x).selfSubtract(n.x)),c=l.subtract(u),h=c.selfDivide(o).doubleValue(),f=q.valueOf(t.x).selfAdd(q.valueOf(e.x).selfSubtract(t.x).selfMultiply(h)).doubleValue(),g=q.valueOf(e.x).selfSubtract(t.x).selfMultiply(q.valueOf(t.y).selfSubtract(n.y)),m=q.valueOf(e.y).selfSubtract(t.y).selfMultiply(q.valueOf(t.x).selfSubtract(n.x)),_=g.subtract(m),E=_.selfDivide(o).doubleValue(),M=q.valueOf(n.y).selfAdd(q.valueOf(i.y).selfSubtract(n.y).selfMultiply(E)).doubleValue();return new L(f,M)},cr.orientationIndexFilter=function(t,e,n){var i=null,s=(t.x-n.x)*(e.y-n.y),a=(t.y-n.y)*(e.x-n.x),o=s-a;if(s>0){if(a<=0)return cr.signum(o);i=s+a}else if(s<0){if(a>=0)return cr.signum(o);i=-s-a}else return cr.signum(o);var l=cr.DP_SAFE_EPSILON*i;return o>=l||-o>=l?cr.signum(o):2},cr.signum=function(t){return t>0?1:t<0?-1:0},ig.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(cr,ig);var Ft=function(){},Ju={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};Ju.X.get=function(){return 0},Ju.Y.get=function(){return 1},Ju.Z.get=function(){return 2},Ju.M.get=function(){return 3},Ft.prototype.setOrdinate=function(t,e,n){},Ft.prototype.size=function(){},Ft.prototype.getOrdinate=function(t,e){},Ft.prototype.getCoordinate=function(){},Ft.prototype.getCoordinateCopy=function(t){},Ft.prototype.getDimension=function(){},Ft.prototype.getX=function(t){},Ft.prototype.clone=function(){},Ft.prototype.expandEnvelope=function(t){},Ft.prototype.copy=function(){},Ft.prototype.getY=function(t){},Ft.prototype.toCoordinateArray=function(){},Ft.prototype.interfaces_=function(){return[ic]},Ft.prototype.getClass=function(){return Ft},Object.defineProperties(Ft,Ju);var sg=function(){},Ql=function(r){function t(){r.call(this,"Projective point not representable on the Cartesian plane.")}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(sg),Ve=function(){};Ve.arraycopy=function(t,e,n,i,s){for(var a=0,o=e;o<e+s;o++)n[i+a]=t[o],a++},Ve.getProperty=function(t){return{"line.separator":`
|
|
25
|
+
`}[t]};var En=function r(){if(this.x=null,this.y=null,this.w=null,arguments.length===0)this.x=0,this.y=0,this.w=1;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.w=1}else if(arguments.length===2){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var e=arguments[0],n=arguments[1];this.x=e,this.y=n,this.w=1}else if(arguments[0]instanceof r&&arguments[1]instanceof r){var i=arguments[0],s=arguments[1];this.x=i.y*s.w-s.y*i.w,this.y=s.x*i.w-i.x*s.w,this.w=i.x*s.y-s.x*i.y}else if(arguments[0]instanceof L&&arguments[1]instanceof L){var a=arguments[0],o=arguments[1];this.x=a.y-o.y,this.y=o.x-a.x,this.w=a.x*o.y-o.x*a.y}}else if(arguments.length===3){var l=arguments[0],u=arguments[1],c=arguments[2];this.x=l,this.y=u,this.w=c}else if(arguments.length===4){var h=arguments[0],f=arguments[1],g=arguments[2],m=arguments[3],_=h.y-f.y,E=f.x-h.x,M=h.x*f.y-f.x*h.y,y=g.y-m.y,w=m.x-g.x,v=g.x*m.y-m.x*g.y;this.x=E*v-w*M,this.y=y*M-_*v,this.w=_*w-y*E}};En.prototype.getY=function(){var t=this.y/this.w;if(wt.isNaN(t)||wt.isInfinite(t))throw new Ql;return t},En.prototype.getX=function(){var t=this.x/this.w;if(wt.isNaN(t)||wt.isInfinite(t))throw new Ql;return t},En.prototype.getCoordinate=function(){var t=new L;return t.x=this.getX(),t.y=this.getY(),t},En.prototype.interfaces_=function(){return[]},En.prototype.getClass=function(){return En},En.intersection=function(t,e,n,i){var s=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,l=n.y-i.y,u=i.x-n.x,c=n.x*i.y-i.x*n.y,h=a*c-u*o,f=l*o-s*c,g=s*u-l*a,m=h/g,_=f/g;if(wt.isNaN(m)||wt.isInfinite(m)||wt.isNaN(_)||wt.isInfinite(_))throw new Ql;return new L(m,_)};var dt=function r(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,arguments.length===0)this.init();else if(arguments.length===1){if(arguments[0]instanceof L){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof r){var e=arguments[0];this.init(e)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.init(n.x,i.x,n.y,i.y)}else if(arguments.length===4){var s=arguments[0],a=arguments[1],o=arguments[2],l=arguments[3];this.init(s,a,o,l)}},ag={serialVersionUID:{configurable:!0}};dt.prototype.getArea=function(){return this.getWidth()*this.getHeight()},dt.prototype.equals=function(t){if(!(t instanceof dt))return!1;var e=t;return this.isNull()?e.isNull():this._maxx===e.getMaxX()&&this._maxy===e.getMaxY()&&this._minx===e.getMinX()&&this._miny===e.getMinY()},dt.prototype.intersection=function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new dt;var e=this._minx>t._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny,i=this._maxx<t._maxx?this._maxx:t._maxx,s=this._maxy<t._maxy?this._maxy:t._maxy;return new dt(e,i,n,s)},dt.prototype.isNull=function(){return this._maxx<this._minx},dt.prototype.getMaxX=function(){return this._maxx},dt.prototype.covers=function(){if(arguments.length===1){if(arguments[0]instanceof L){var t=arguments[0];return this.covers(t.x,t.y)}else if(arguments[0]instanceof dt){var e=arguments[0];return this.isNull()||e.isNull()?!1:e.getMinX()>=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.isNull()?!1:n>=this._minx&&n<=this._maxx&&i>=this._miny&&i<=this._maxy}},dt.prototype.intersects=function(){if(arguments.length===1){if(arguments[0]instanceof dt){var t=arguments[0];return this.isNull()||t.isNull()?!1:!(t._minx>this._maxx||t._maxx<this._minx||t._miny>this._maxy||t._maxy<this._miny)}else if(arguments[0]instanceof L){var e=arguments[0];return this.intersects(e.x,e.y)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.isNull()?!1:!(n>this._maxx||n<this._minx||i>this._maxy||i<this._miny)}},dt.prototype.getMinY=function(){return this._miny},dt.prototype.getMinX=function(){return this._minx},dt.prototype.expandToInclude=function(){if(arguments.length===1){if(arguments[0]instanceof L){var t=arguments[0];this.expandToInclude(t.x,t.y)}else if(arguments[0]instanceof dt){var e=arguments[0];if(e.isNull())return null;this.isNull()?(this._minx=e.getMinX(),this._maxx=e.getMaxX(),this._miny=e.getMinY(),this._maxy=e.getMaxY()):(e._minx<this._minx&&(this._minx=e._minx),e._maxx>this._maxx&&(this._maxx=e._maxx),e._miny<this._miny&&(this._miny=e._miny),e._maxy>this._maxy&&(this._maxy=e._maxy))}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=i,this._maxy=i):(n<this._minx&&(this._minx=n),n>this._maxx&&(this._maxx=n),i<this._miny&&(this._miny=i),i>this._maxy&&(this._maxy=i))}},dt.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t<e?t:e},dt.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},dt.prototype.compareTo=function(t){var e=t;return this.isNull()?e.isNull()?0:-1:e.isNull()?1:this._minx<e._minx?-1:this._minx>e._minx?1:this._miny<e._miny?-1:this._miny>e._miny?1:this._maxx<e._maxx?-1:this._maxx>e._maxx?1:this._maxy<e._maxy?-1:this._maxy>e._maxy?1:0},dt.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},dt.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},dt.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},dt.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},dt.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},dt.prototype.expandBy=function(){if(arguments.length===1){var t=arguments[0];this.expandBy(t,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},dt.prototype.contains=function(){if(arguments.length===1){if(arguments[0]instanceof dt){var t=arguments[0];return this.covers(t)}else if(arguments[0]instanceof L){var e=arguments[0];return this.covers(e)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.covers(n,i)}},dt.prototype.centre=function(){return this.isNull()?null:new L((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},dt.prototype.init=function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof L){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof dt){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.init(n.x,i.x,n.y,i.y)}else if(arguments.length===4){var s=arguments[0],a=arguments[1],o=arguments[2],l=arguments[3];s<a?(this._minx=s,this._maxx=a):(this._minx=a,this._maxx=s),o<l?(this._miny=o,this._maxy=l):(this._miny=l,this._maxy=o)}},dt.prototype.getMaxY=function(){return this._maxy},dt.prototype.distance=function(t){if(this.intersects(t))return 0;var e=0;this._maxx<t._minx?e=t._minx-this._maxx:this._minx>t._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxy<t._miny?n=t._miny-this._maxy:this._miny>t._maxy&&(n=this._miny-t._maxy),e===0?n:n===0?e:Math.sqrt(e*e+n*n)},dt.prototype.hashCode=function(){var t=17;return t=37*t+L.hashCode(this._minx),t=37*t+L.hashCode(this._maxx),t=37*t+L.hashCode(this._miny),t=37*t+L.hashCode(this._maxy),t},dt.prototype.interfaces_=function(){return[Zr,$r]},dt.prototype.getClass=function(){return dt},dt.intersects=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.x<e.x?t.x:e.x)&&n.x<=(t.x>e.x?t.x:e.x)&&n.y>=(t.y<e.y?t.y:e.y)&&n.y<=(t.y>e.y?t.y:e.y)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],a=arguments[2],o=arguments[3],l=Math.min(a.x,o.x),u=Math.max(a.x,o.x),c=Math.min(i.x,s.x),h=Math.max(i.x,s.x);return!(c>u||h<l||(l=Math.min(a.y,o.y),u=Math.max(a.y,o.y),c=Math.min(i.y,s.y),h=Math.max(i.y,s.y),c>u)||h<l)}},ag.serialVersionUID.get=function(){return 5873921885273102e3},Object.defineProperties(dt,ag);var Un={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,emptyTypeStr:/^\s*(\w+)\s*EMPTY\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},sc=function(t){this.geometryFactory=t||new Dt};sc.prototype.read=function(t){var e,n,i;t=t.replace(/[\n\r]/g," ");var s=Un.typeStr.exec(t);if(t.search("EMPTY")!==-1&&(s=Un.emptyTypeStr.exec(t),s[2]=void 0),s&&(n=s[1].toLowerCase(),i=s[2],Bl[n]&&(e=Bl[n].apply(this,[i]))),e===void 0)throw new Error("Could not parse WKT "+t);return e},sc.prototype.write=function(t){return this.extractGeometry(t)},sc.prototype.extractGeometry=function(t){var e=t.getGeometryType().toLowerCase();if(!ki[e])return null;var n=e.toUpperCase(),i;return t.isEmpty()?i=n+" EMPTY":i=n+"("+ki[e].apply(this,[t])+")",i};var ki={coordinate:function(t){return t.x+" "+t.y},point:function(t){return ki.coordinate.call(this,t._coordinates._coordinates[0])},multipoint:function(t){for(var e=this,n=[],i=0,s=t._geometries.length;i<s;++i)n.push("("+ki.point.apply(e,[t._geometries[i]])+")");return n.join(",")},linestring:function(t){for(var e=this,n=[],i=0,s=t._points._coordinates.length;i<s;++i)n.push(ki.coordinate.apply(e,[t._points._coordinates[i]]));return n.join(",")},linearring:function(t){for(var e=this,n=[],i=0,s=t._points._coordinates.length;i<s;++i)n.push(ki.coordinate.apply(e,[t._points._coordinates[i]]));return n.join(",")},multilinestring:function(t){for(var e=this,n=[],i=0,s=t._geometries.length;i<s;++i)n.push("("+ki.linestring.apply(e,[t._geometries[i]])+")");return n.join(",")},polygon:function(t){var e=this,n=[];n.push("("+ki.linestring.apply(this,[t._shell])+")");for(var i=0,s=t._holes.length;i<s;++i)n.push("("+ki.linestring.apply(e,[t._holes[i]])+")");return n.join(",")},multipolygon:function(t){for(var e=this,n=[],i=0,s=t._geometries.length;i<s;++i)n.push("("+ki.polygon.apply(e,[t._geometries[i]])+")");return n.join(",")},geometrycollection:function(t){for(var e=this,n=[],i=0,s=t._geometries.length;i<s;++i)n.push(e.extractGeometry(t._geometries[i]));return n.join(",")}},Bl={point:function(t){if(t===void 0)return this.geometryFactory.createPoint();var e=t.trim().split(Un.spaces);return this.geometryFactory.createPoint(new L(Number.parseFloat(e[0]),Number.parseFloat(e[1])))},multipoint:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiPoint();for(var n,i=t.trim().split(","),s=[],a=0,o=i.length;a<o;++a)n=i[a].replace(Un.trimParens,"$1"),s.push(Bl.point.apply(e,[n]));return this.geometryFactory.createMultiPoint(s)},linestring:function(t){if(t===void 0)return this.geometryFactory.createLineString();for(var e=t.trim().split(","),n=[],i,s=0,a=e.length;s<a;++s)i=e[s].trim().split(Un.spaces),n.push(new L(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLineString(n)},linearring:function(t){if(t===void 0)return this.geometryFactory.createLinearRing();for(var e=t.trim().split(","),n=[],i,s=0,a=e.length;s<a;++s)i=e[s].trim().split(Un.spaces),n.push(new L(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLinearRing(n)},multilinestring:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiLineString();for(var n,i=t.trim().split(Un.parenComma),s=[],a=0,o=i.length;a<o;++a)n=i[a].replace(Un.trimParens,"$1"),s.push(Bl.linestring.apply(e,[n]));return this.geometryFactory.createMultiLineString(s)},polygon:function(t){var e=this;if(t===void 0)return this.geometryFactory.createPolygon();for(var n,i,s,a=t.trim().split(Un.parenComma),o,l=[],u=0,c=a.length;u<c;++u)n=a[u].replace(Un.trimParens,"$1"),i=Bl.linestring.apply(e,[n]),s=e.geometryFactory.createLinearRing(i._points),u===0?o=s:l.push(s);return this.geometryFactory.createPolygon(o,l)},multipolygon:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiPolygon();for(var n,i=t.trim().split(Un.doubleParenComma),s=[],a=0,o=i.length;a<o;++a)n=i[a].replace(Un.trimParens,"$1"),s.push(Bl.polygon.apply(e,[n]));return this.geometryFactory.createMultiPolygon(s)},geometrycollection:function(t){var e=this;if(t===void 0)return this.geometryFactory.createGeometryCollection();t=t.replace(/,\s*([A-Za-z])/g,"|$1");for(var n=t.trim().split("|"),i=[],s=0,a=n.length;s<a;++s)i.push(e.read(n[s]));return this.geometryFactory.createGeometryCollection(i)}},Sn=function(t){this.parser=new sc(t)};Sn.prototype.write=function(t){return this.parser.write(t)},Sn.toLineString=function(t,e){if(arguments.length!==2)throw new Error("Not implemented");return"LINESTRING ( "+t.x+" "+t.y+", "+e.x+" "+e.y+" )"};var zi=function(r){function t(e){r.call(this,e),this.name="RuntimeException",this.message=e,this.stack=new r().stack}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t}(Error),ac=function(r){function t(){if(r.call(this),arguments.length===0)r.call(this);else if(arguments.length===1){var e=arguments[0];r.call(this,e)}}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(zi),Mt=function(){};Mt.prototype.interfaces_=function(){return[]},Mt.prototype.getClass=function(){return Mt},Mt.shouldNeverReachHere=function(){if(arguments.length===0)Mt.shouldNeverReachHere(null);else if(arguments.length===1){var t=arguments[0];throw new ac("Should never reach here"+(t!==null?": "+t:""))}},Mt.isTrue=function(){var t,e;if(arguments.length===1)t=arguments[0],Mt.isTrue(t,null);else if(arguments.length===2&&(t=arguments[0],e=arguments[1],!t))throw e===null?new ac:new ac(e)},Mt.equals=function(){var t,e,n;if(arguments.length===2)t=arguments[0],e=arguments[1],Mt.equals(t,e,null);else if(arguments.length===3&&(t=arguments[0],e=arguments[1],n=arguments[2],!e.equals(t)))throw new ac("Expected "+t+" but encountered "+e+(n!==null?": "+n:""))};var ce=function(){this._result=null,this._inputLines=Array(2).fill().map(function(){return Array(2)}),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new L,this._intPt[1]=new L,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},Fa={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};ce.prototype.getIndexAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intLineIndex[t][e]},ce.prototype.getTopologySummary=function(){var t=new zn;return this.isEndPoint()&&t.append(" endpoint"),this._isProper&&t.append(" proper"),this.isCollinear()&&t.append(" collinear"),t.toString()},ce.prototype.computeIntersection=function(t,e,n,i){this._inputLines[0][0]=t,this._inputLines[0][1]=e,this._inputLines[1][0]=n,this._inputLines[1][1]=i,this._result=this.computeIntersect(t,e,n,i)},ce.prototype.getIntersectionNum=function(){return this._result},ce.prototype.computeIntLineIndex=function(){if(arguments.length===0)this._intLineIndex===null&&(this._intLineIndex=Array(2).fill().map(function(){return Array(2)}),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(arguments.length===1){var t=arguments[0],e=this.getEdgeDistance(t,0),n=this.getEdgeDistance(t,1);e>n?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},ce.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},ce.prototype.setPrecisionModel=function(t){this._precisionModel=t},ce.prototype.isInteriorIntersection=function(){var t=this;if(arguments.length===0)return!!(this.isInteriorIntersection(0)||this.isInteriorIntersection(1));if(arguments.length===1){for(var e=arguments[0],n=0;n<this._result;n++)if(!(t._intPt[n].equals2D(t._inputLines[e][0])||t._intPt[n].equals2D(t._inputLines[e][1])))return!0;return!1}},ce.prototype.getIntersection=function(t){return this._intPt[t]},ce.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},ce.prototype.hasIntersection=function(){return this._result!==ce.NO_INTERSECTION},ce.prototype.getEdgeDistance=function(t,e){var n=ce.computeEdgeDistance(this._intPt[e],this._inputLines[t][0],this._inputLines[t][1]);return n},ce.prototype.isCollinear=function(){return this._result===ce.COLLINEAR_INTERSECTION},ce.prototype.toString=function(){return Sn.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+Sn.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},ce.prototype.getEndpoint=function(t,e){return this._inputLines[t][e]},ce.prototype.isIntersection=function(t){for(var e=this,n=0;n<this._result;n++)if(e._intPt[n].equals2D(t))return!0;return!1},ce.prototype.getIntersectionAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[t][e]]},ce.prototype.interfaces_=function(){return[]},ce.prototype.getClass=function(){return ce},ce.computeEdgeDistance=function(t,e,n){var i=Math.abs(n.x-e.x),s=Math.abs(n.y-e.y),a=-1;if(t.equals(e))a=0;else if(t.equals(n))i>s?a=i:a=s;else{var o=Math.abs(t.x-e.x),l=Math.abs(t.y-e.y);i>s?a=o:a=l,a===0&&!t.equals(e)&&(a=Math.max(o,l))}return Mt.isTrue(!(a===0&&!t.equals(e)),"Bad distance calculation"),a},ce.nonRobustComputeEdgeDistance=function(t,e,n){var i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s);return Mt.isTrue(!(a===0&&!t.equals(e)),"Invalid distance calculation"),a},Fa.DONT_INTERSECT.get=function(){return 0},Fa.DO_INTERSECT.get=function(){return 1},Fa.COLLINEAR.get=function(){return 2},Fa.NO_INTERSECTION.get=function(){return 0},Fa.POINT_INTERSECTION.get=function(){return 1},Fa.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(ce,Fa);var Zs=function(r){function t(){r.apply(this,arguments)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.isInSegmentEnvelopes=function(n){var i=new dt(this._inputLines[0][0],this._inputLines[0][1]),s=new dt(this._inputLines[1][0],this._inputLines[1][1]);return i.contains(n)&&s.contains(n)},t.prototype.computeIntersection=function(){if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];if(this._isProper=!1,dt.intersects(i,s,n)&&et.orientationIndex(i,s,n)===0&&et.orientationIndex(s,i,n)===0)return this._isProper=!0,(n.equals(i)||n.equals(s))&&(this._isProper=!1),this._result=r.POINT_INTERSECTION,null;this._result=r.NO_INTERSECTION}else return r.prototype.computeIntersection.apply(this,arguments)},t.prototype.normalizeToMinimum=function(n,i,s,a,o){o.x=this.smallestInAbsValue(n.x,i.x,s.x,a.x),o.y=this.smallestInAbsValue(n.y,i.y,s.y,a.y),n.x-=o.x,n.y-=o.y,i.x-=o.x,i.y-=o.y,s.x-=o.x,s.y-=o.y,a.x-=o.x,a.y-=o.y},t.prototype.safeHCoordinateIntersection=function(n,i,s,a){var o=null;try{o=En.intersection(n,i,s,a)}catch(l){if(l instanceof Ql)o=t.nearestEndpoint(n,i,s,a);else throw l}finally{}return o},t.prototype.intersection=function(n,i,s,a){var o=this.intersectionWithNormalization(n,i,s,a);return this.isInSegmentEnvelopes(o)||(o=new L(t.nearestEndpoint(n,i,s,a))),this._precisionModel!==null&&this._precisionModel.makePrecise(o),o},t.prototype.smallestInAbsValue=function(n,i,s,a){var o=n,l=Math.abs(o);return Math.abs(i)<l&&(o=i,l=Math.abs(i)),Math.abs(s)<l&&(o=s,l=Math.abs(s)),Math.abs(a)<l&&(o=a),o},t.prototype.checkDD=function(n,i,s,a,o){var l=cr.intersection(n,i,s,a),u=this.isInSegmentEnvelopes(l);Ve.out.println("DD in env = "+u+" --------------------- "+l),o.distance(l)>1e-4&&Ve.out.println("Distance = "+o.distance(l))},t.prototype.intersectionWithNormalization=function(n,i,s,a){var o=new L(n),l=new L(i),u=new L(s),c=new L(a),h=new L;this.normalizeToEnvCentre(o,l,u,c,h);var f=this.safeHCoordinateIntersection(o,l,u,c);return f.x+=h.x,f.y+=h.y,f},t.prototype.computeCollinearIntersection=function(n,i,s,a){var o=dt.intersects(n,i,s),l=dt.intersects(n,i,a),u=dt.intersects(s,a,n),c=dt.intersects(s,a,i);return o&&l?(this._intPt[0]=s,this._intPt[1]=a,r.COLLINEAR_INTERSECTION):u&&c?(this._intPt[0]=n,this._intPt[1]=i,r.COLLINEAR_INTERSECTION):o&&u?(this._intPt[0]=s,this._intPt[1]=n,s.equals(n)&&!l&&!c?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):o&&c?(this._intPt[0]=s,this._intPt[1]=i,s.equals(i)&&!l&&!u?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):l&&u?(this._intPt[0]=a,this._intPt[1]=n,a.equals(n)&&!o&&!c?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):l&&c?(this._intPt[0]=a,this._intPt[1]=i,a.equals(i)&&!o&&!u?r.POINT_INTERSECTION:r.COLLINEAR_INTERSECTION):r.NO_INTERSECTION},t.prototype.normalizeToEnvCentre=function(n,i,s,a,o){var l=n.x<i.x?n.x:i.x,u=n.y<i.y?n.y:i.y,c=n.x>i.x?n.x:i.x,h=n.y>i.y?n.y:i.y,f=s.x<a.x?s.x:a.x,g=s.y<a.y?s.y:a.y,m=s.x>a.x?s.x:a.x,_=s.y>a.y?s.y:a.y,E=l>f?l:f,M=c<m?c:m,y=u>g?u:g,w=h<_?h:_,v=(E+M)/2,S=(y+w)/2;o.x=v,o.y=S,n.x-=o.x,n.y-=o.y,i.x-=o.x,i.y-=o.y,s.x-=o.x,s.y-=o.y,a.x-=o.x,a.y-=o.y},t.prototype.computeIntersect=function(n,i,s,a){if(this._isProper=!1,!dt.intersects(n,i,s,a))return r.NO_INTERSECTION;var o=et.orientationIndex(n,i,s),l=et.orientationIndex(n,i,a);if(o>0&&l>0||o<0&&l<0)return r.NO_INTERSECTION;var u=et.orientationIndex(s,a,n),c=et.orientationIndex(s,a,i);if(u>0&&c>0||u<0&&c<0)return r.NO_INTERSECTION;var h=o===0&&l===0&&u===0&&c===0;return h?this.computeCollinearIntersection(n,i,s,a):(o===0||l===0||u===0||c===0?(this._isProper=!1,n.equals2D(s)||n.equals2D(a)?this._intPt[0]=n:i.equals2D(s)||i.equals2D(a)?this._intPt[0]=i:o===0?this._intPt[0]=new L(s):l===0?this._intPt[0]=new L(a):u===0?this._intPt[0]=new L(n):c===0&&(this._intPt[0]=new L(i))):(this._isProper=!0,this._intPt[0]=this.intersection(n,i,s,a)),r.POINT_INTERSECTION)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.nearestEndpoint=function(n,i,s,a){var o=n,l=et.distancePointLine(n,s,a),u=et.distancePointLine(i,s,a);return u<l&&(l=u,o=i),u=et.distancePointLine(s,n,i),u<l&&(l=u,o=s),u=et.distancePointLine(a,n,i),u<l&&(l=u,o=a),o},t}(ce),Ga=function(){};Ga.prototype.interfaces_=function(){return[]},Ga.prototype.getClass=function(){return Ga},Ga.orientationIndex=function(t,e,n){var i=e.x-t.x,s=e.y-t.y,a=n.x-e.x,o=n.y-e.y;return Ga.signOfDet2x2(i,s,a,o)},Ga.signOfDet2x2=function(t,e,n,i){var s=null,a=null,o=null;if(s=1,t===0||i===0)return e===0||n===0?0:e>0?n>0?-s:s:n>0?s:-s;if(e===0||n===0)return i>0?t>0?s:-s:t>0?-s:s;if(e>0?i>0?e<=i||(s=-s,a=t,t=n,n=a,a=e,e=i,i=a):e<=-i?(s=-s,n=-n,i=-i):(a=t,t=-n,n=a,a=e,e=-i,i=a):i>0?-e<=i?(s=-s,t=-t,e=-e):(a=-t,t=n,n=a,a=-e,e=i,i=a):e>=i?(t=-t,e=-e,n=-n,i=-i):(s=-s,a=-t,t=-n,n=a,a=-e,e=-i,i=a),t>0)if(n>0){if(!(t<=n))return s}else return s;else{if(n>0)return-s;if(t>=n)s=-s,t=-t,n=-n;else return-s}for(;;){if(o=Math.floor(n/t),n=n-o*t,i=i-o*e,i<0)return-s;if(i>e)return s;if(t>n+n){if(e<i+i)return s}else{if(e>i+i)return-s;n=t-n,i=e-i,s=-s}if(i===0)return n===0?0:-s;if(n===0||(o=Math.floor(t/n),t=t-o*n,e=e-o*i,e<0))return s;if(e>i)return-s;if(n>t+t){if(i<e+e)return-s}else{if(i>e+e)return s;t=n-t,e=i-e,s=-s}if(e===0)return t===0?0:s;if(t===0)return-s}};var qn=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};qn.prototype.countSegment=function(t,e){if(t.x<this._p.x&&e.x<this._p.x)return null;if(this._p.x===e.x&&this._p.y===e.y)return this._isPointOnSegment=!0,null;if(t.y===this._p.y&&e.y===this._p.y){var n=t.x,i=e.x;return n>i&&(n=e.x,i=t.x),this._p.x>=n&&this._p.x<=i&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var s=t.x-this._p.x,a=t.y-this._p.y,o=e.x-this._p.x,l=e.y-this._p.y,u=Ga.signOfDet2x2(s,a,o,l);if(u===0)return this._isPointOnSegment=!0,null;l<a&&(u=-u),u>0&&this._crossingCount++}},qn.prototype.isPointInPolygon=function(){return this.getLocation()!==F.EXTERIOR},qn.prototype.getLocation=function(){return this._isPointOnSegment?F.BOUNDARY:this._crossingCount%2===1?F.INTERIOR:F.EXTERIOR},qn.prototype.isOnSegment=function(){return this._isPointOnSegment},qn.prototype.interfaces_=function(){return[]},qn.prototype.getClass=function(){return qn},qn.locatePointInRing=function(){if(arguments[0]instanceof L&&_t(arguments[1],Ft)){for(var t=arguments[0],e=arguments[1],n=new qn(t),i=new L,s=new L,a=1;a<e.size();a++)if(e.getCoordinate(a,i),e.getCoordinate(a-1,s),n.countSegment(i,s),n.isOnSegment())return n.getLocation();return n.getLocation()}else if(arguments[0]instanceof L&&arguments[1]instanceof Array){for(var o=arguments[0],l=arguments[1],u=new qn(o),c=1;c<l.length;c++){var h=l[c],f=l[c-1];if(u.countSegment(h,f),u.isOnSegment())return u.getLocation()}return u.getLocation()}};var et=function(){},ka={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};et.prototype.interfaces_=function(){return[]},et.prototype.getClass=function(){return et},et.orientationIndex=function(t,e,n){return cr.orientationIndex(t,e,n)},et.signedArea=function(){if(arguments[0]instanceof Array){var t=arguments[0];if(t.length<3)return 0;for(var e=0,n=t[0].x,i=1;i<t.length-1;i++){var s=t[i].x-n,a=t[i+1].y,o=t[i-1].y;e+=s*(o-a)}return e/2}else if(_t(arguments[0],Ft)){var l=arguments[0],u=l.size();if(u<3)return 0;var c=new L,h=new L,f=new L;l.getCoordinate(0,h),l.getCoordinate(1,f);var g=h.x;f.x-=g;for(var m=0,_=1;_<u-1;_++)c.y=h.y,h.x=f.x,h.y=f.y,l.getCoordinate(_+1,f),f.x-=g,m+=h.x*(c.y-f.y);return m/2}},et.distanceLineLine=function(t,e,n,i){if(t.equals(e))return et.distancePointLine(t,n,i);if(n.equals(i))return et.distancePointLine(i,t,e);var s=!1;if(!dt.intersects(t,e,n,i))s=!0;else{var a=(e.x-t.x)*(i.y-n.y)-(e.y-t.y)*(i.x-n.x);if(a===0)s=!0;else{var o=(t.y-n.y)*(i.x-n.x)-(t.x-n.x)*(i.y-n.y),l=(t.y-n.y)*(e.x-t.x)-(t.x-n.x)*(e.y-t.y),u=l/a,c=o/a;(c<0||c>1||u<0||u>1)&&(s=!0)}}return s?Gr.min(et.distancePointLine(t,n,i),et.distancePointLine(e,n,i),et.distancePointLine(n,t,e),et.distancePointLine(i,t,e)):0},et.isPointInRing=function(t,e){return et.locatePointInRing(t,e)!==F.EXTERIOR},et.computeLength=function(t){var e=t.size();if(e<=1)return 0;var n=0,i=new L;t.getCoordinate(0,i);for(var s=i.x,a=i.y,o=1;o<e;o++){t.getCoordinate(o,i);var l=i.x,u=i.y,c=l-s,h=u-a;n+=Math.sqrt(c*c+h*h),s=l,a=u}return n},et.isCCW=function(t){var e=t.length-1;if(e<3)throw new oe("Ring has fewer than 4 points, so orientation cannot be determined");for(var n=t[0],i=0,s=1;s<=e;s++){var a=t[s];a.y>n.y&&(n=a,i=s)}var o=i;do o=o-1,o<0&&(o=e);while(t[o].equals2D(n)&&o!==i);var l=i;do l=(l+1)%e;while(t[l].equals2D(n)&&l!==i);var u=t[o],c=t[l];if(u.equals2D(n)||c.equals2D(n)||u.equals2D(c))return!1;var h=et.computeOrientation(u,n,c),f=!1;return h===0?f=u.x>c.x:f=h>0,f},et.locatePointInRing=function(t,e){return qn.locatePointInRing(t,e)},et.distancePointLinePerpendicular=function(t,e,n){var i=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),s=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/i;return Math.abs(s)*Math.sqrt(i)},et.computeOrientation=function(t,e,n){return et.orientationIndex(t,e,n)},et.distancePointLine=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(e.length===0)throw new oe("Line array must contain at least one vertex");for(var n=t.distance(e[0]),i=0;i<e.length-1;i++){var s=et.distancePointLine(t,e[i],e[i+1]);s<n&&(n=s)}return n}else if(arguments.length===3){var a=arguments[0],o=arguments[1],l=arguments[2];if(o.x===l.x&&o.y===l.y)return a.distance(o);var u=(l.x-o.x)*(l.x-o.x)+(l.y-o.y)*(l.y-o.y),c=((a.x-o.x)*(l.x-o.x)+(a.y-o.y)*(l.y-o.y))/u;if(c<=0)return a.distance(o);if(c>=1)return a.distance(l);var h=((o.y-a.y)*(l.x-o.x)-(o.x-a.x)*(l.y-o.y))/u;return Math.abs(h)*Math.sqrt(u)}},et.isOnLine=function(t,e){for(var n=new Zs,i=1;i<e.length;i++){var s=e[i-1],a=e[i];if(n.computeIntersection(t,s,a),n.hasIntersection())return!0}return!1},ka.CLOCKWISE.get=function(){return-1},ka.RIGHT.get=function(){return et.CLOCKWISE},ka.COUNTERCLOCKWISE.get=function(){return 1},ka.LEFT.get=function(){return et.COUNTERCLOCKWISE},ka.COLLINEAR.get=function(){return 0},ka.STRAIGHT.get=function(){return et.COLLINEAR},Object.defineProperties(et,ka);var Vi=function(){};Vi.prototype.filter=function(t){},Vi.prototype.interfaces_=function(){return[]},Vi.prototype.getClass=function(){return Vi};var yt=function(){var t=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=t,this._SRID=t.getSRID()},di={serialVersionUID:{configurable:!0},SORTINDEX_POINT:{configurable:!0},SORTINDEX_MULTIPOINT:{configurable:!0},SORTINDEX_LINESTRING:{configurable:!0},SORTINDEX_LINEARRING:{configurable:!0},SORTINDEX_MULTILINESTRING:{configurable:!0},SORTINDEX_POLYGON:{configurable:!0},SORTINDEX_MULTIPOLYGON:{configurable:!0},SORTINDEX_GEOMETRYCOLLECTION:{configurable:!0},geometryChangedFilter:{configurable:!0}};yt.prototype.isGeometryCollection=function(){return this.getSortIndex()===yt.SORTINDEX_GEOMETRYCOLLECTION},yt.prototype.getFactory=function(){return this._factory},yt.prototype.getGeometryN=function(t){return this},yt.prototype.getArea=function(){return 0},yt.prototype.isRectangle=function(){return!1},yt.prototype.equals=function(){if(arguments[0]instanceof yt){var t=arguments[0];return t===null?!1:this.equalsTopo(t)}else if(arguments[0]instanceof Object){var e=arguments[0];if(!(e instanceof yt))return!1;var n=e;return this.equalsExact(n)}},yt.prototype.equalsExact=function(t){return this===t||this.equalsExact(t,0)},yt.prototype.geometryChanged=function(){this.apply(yt.geometryChangedFilter)},yt.prototype.geometryChangedAction=function(){this._envelope=null},yt.prototype.equalsNorm=function(t){return t===null?!1:this.norm().equalsExact(t.norm())},yt.prototype.getLength=function(){return 0},yt.prototype.getNumGeometries=function(){return 1},yt.prototype.compareTo=function(){if(arguments.length===1){var t=arguments[0],e=t;return this.getSortIndex()!==e.getSortIndex()?this.getSortIndex()-e.getSortIndex():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t)}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.getSortIndex()!==n.getSortIndex()?this.getSortIndex()-n.getSortIndex():this.isEmpty()&&n.isEmpty()?0:this.isEmpty()?-1:n.isEmpty()?1:this.compareToSameClass(n,i)}},yt.prototype.getUserData=function(){return this._userData},yt.prototype.getSRID=function(){return this._SRID},yt.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},yt.prototype.checkNotGeometryCollection=function(t){if(t.getSortIndex()===yt.SORTINDEX_GEOMETRYCOLLECTION)throw new oe("This method does not support GeometryCollection arguments")},yt.prototype.equal=function(t,e,n){return n===0?t.equals(e):t.distance(e)<=n},yt.prototype.norm=function(){var t=this.copy();return t.normalize(),t},yt.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()},yt.prototype.getEnvelopeInternal=function(){return this._envelope===null&&(this._envelope=this.computeEnvelopeInternal()),new dt(this._envelope)},yt.prototype.setSRID=function(t){this._SRID=t},yt.prototype.setUserData=function(t){this._userData=t},yt.prototype.compare=function(t,e){for(var n=t.iterator(),i=e.iterator();n.hasNext()&&i.hasNext();){var s=n.next(),a=i.next(),o=s.compareTo(a);if(o!==0)return o}return n.hasNext()?1:i.hasNext()?-1:0},yt.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()},yt.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===yt.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===yt.SORTINDEX_MULTIPOINT||this.getSortIndex()===yt.SORTINDEX_MULTILINESTRING||this.getSortIndex()===yt.SORTINDEX_MULTIPOLYGON},yt.prototype.interfaces_=function(){return[ic,Zr,$r]},yt.prototype.getClass=function(){return yt},yt.hasNonEmptyElements=function(t){for(var e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1},yt.hasNullElements=function(t){for(var e=0;e<t.length;e++)if(t[e]===null)return!0;return!1},di.serialVersionUID.get=function(){return 8763622679187377e3},di.SORTINDEX_POINT.get=function(){return 0},di.SORTINDEX_MULTIPOINT.get=function(){return 1},di.SORTINDEX_LINESTRING.get=function(){return 2},di.SORTINDEX_LINEARRING.get=function(){return 3},di.SORTINDEX_MULTILINESTRING.get=function(){return 4},di.SORTINDEX_POLYGON.get=function(){return 5},di.SORTINDEX_MULTIPOLYGON.get=function(){return 6},di.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},di.geometryChangedFilter.get=function(){return Gf},Object.defineProperties(yt,di);var Gf=function(){};Gf.interfaces_=function(){return[Vi]},Gf.filter=function(t){t.geometryChangedAction()};var pi=function(){};pi.prototype.filter=function(t){},pi.prototype.interfaces_=function(){return[]},pi.prototype.getClass=function(){return pi};var jr=function(){},Ui={Mod2BoundaryNodeRule:{configurable:!0},EndPointBoundaryNodeRule:{configurable:!0},MultiValentEndPointBoundaryNodeRule:{configurable:!0},MonoValentEndPointBoundaryNodeRule:{configurable:!0},MOD2_BOUNDARY_RULE:{configurable:!0},ENDPOINT_BOUNDARY_RULE:{configurable:!0},MULTIVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},MONOVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},OGC_SFS_BOUNDARY_RULE:{configurable:!0}};jr.prototype.isInBoundary=function(t){},jr.prototype.interfaces_=function(){return[]},jr.prototype.getClass=function(){return jr},Ui.Mod2BoundaryNodeRule.get=function(){return Zl},Ui.EndPointBoundaryNodeRule.get=function(){return $l},Ui.MultiValentEndPointBoundaryNodeRule.get=function(){return jl},Ui.MonoValentEndPointBoundaryNodeRule.get=function(){return tu},Ui.MOD2_BOUNDARY_RULE.get=function(){return new Zl},Ui.ENDPOINT_BOUNDARY_RULE.get=function(){return new $l},Ui.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new jl},Ui.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new tu},Ui.OGC_SFS_BOUNDARY_RULE.get=function(){return jr.MOD2_BOUNDARY_RULE},Object.defineProperties(jr,Ui);var Zl=function(){};Zl.prototype.isInBoundary=function(t){return t%2===1},Zl.prototype.interfaces_=function(){return[jr]},Zl.prototype.getClass=function(){return Zl};var $l=function(){};$l.prototype.isInBoundary=function(t){return t>0},$l.prototype.interfaces_=function(){return[jr]},$l.prototype.getClass=function(){return $l};var jl=function(){};jl.prototype.isInBoundary=function(t){return t>1},jl.prototype.interfaces_=function(){return[jr]},jl.prototype.getClass=function(){return jl};var tu=function(){};tu.prototype.isInBoundary=function(t){return t===1},tu.prototype.interfaces_=function(){return[jr]},tu.prototype.getClass=function(){return tu};var Me=function(){};Me.prototype.add=function(){},Me.prototype.addAll=function(){},Me.prototype.isEmpty=function(){},Me.prototype.iterator=function(){},Me.prototype.size=function(){},Me.prototype.toArray=function(){},Me.prototype.remove=function(){};function kf(r){this.message=r||""}kf.prototype=new Error,kf.prototype.name="IndexOutOfBoundsException";var eu=function(){};eu.prototype.hasNext=function(){},eu.prototype.next=function(){},eu.prototype.remove=function(){};var Pn=function(r){function t(){r.apply(this,arguments)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.get=function(){},t.prototype.set=function(){},t.prototype.isEmpty=function(){},t}(Me);function ru(r){this.message=r||""}ru.prototype=new Error,ru.prototype.name="NoSuchElementException";var Z=function(r){function t(){r.call(this),this.array_=[],arguments[0]instanceof Me&&this.addAll(arguments[0])}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.ensureCapacity=function(){},t.prototype.interfaces_=function(){return[r,Me]},t.prototype.add=function(n){return arguments.length===1?this.array_.push(n):this.array_.splice(arguments[0],arguments[1]),!0},t.prototype.clear=function(){this.array_=[]},t.prototype.addAll=function(n){for(var i=this,s=n.iterator();s.hasNext();)i.add(s.next());return!0},t.prototype.set=function(n,i){var s=this.array_[n];return this.array_[n]=i,s},t.prototype.iterator=function(){return new m_(this)},t.prototype.get=function(n){if(n<0||n>=this.size())throw new kf;return this.array_[n]},t.prototype.isEmpty=function(){return this.array_.length===0},t.prototype.size=function(){return this.array_.length},t.prototype.toArray=function(){for(var n=this,i=[],s=0,a=this.array_.length;s<a;s++)i.push(n.array_[s]);return i},t.prototype.remove=function(n){for(var i=this,s=!1,a=0,o=this.array_.length;a<o;a++)if(i.array_[a]===n){i.array_.splice(a,1),s=!0;break}return s},t}(Pn),m_=function(r){function t(e){r.call(this),this.arrayList_=e,this.position_=0}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new ru;return this.arrayList_.get(this.position_++)},t.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},t.prototype.set=function(n){return this.arrayList_.set(this.position_-1,n)},t.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},t}(eu),Ku=function(r){function t(){if(r.call(this),arguments.length!==0){if(arguments.length===1){var n=arguments[0];this.ensureCapacity(n.length),this.add(n,!0)}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.ensureCapacity(i.length),this.add(i,s)}}}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={coordArrayType:{configurable:!0}};return e.coordArrayType.get=function(){return new Array(0).fill(null)},t.prototype.getCoordinate=function(i){return this.get(i)},t.prototype.addAll=function(){var i=this;if(arguments.length===2){for(var s=arguments[0],a=arguments[1],o=!1,l=s.iterator();l.hasNext();)i.add(l.next(),a),o=!0;return o}else return r.prototype.addAll.apply(this,arguments)},t.prototype.clone=function(){for(var i=this,s=r.prototype.clone.call(this),a=0;a<this.size();a++)s.add(a,i.get(a).copy());return s},t.prototype.toCoordinateArray=function(){return this.toArray(t.coordArrayType)},t.prototype.add=function(){var i=this;if(arguments.length===1){var s=arguments[0];r.prototype.add.call(this,s)}else if(arguments.length===2){if(arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var a=arguments[0],o=arguments[1];return this.add(a,o,!0),!0}else if(arguments[0]instanceof L&&typeof arguments[1]=="boolean"){var l=arguments[0],u=arguments[1];if(!u&&this.size()>=1){var c=this.get(this.size()-1);if(c.equals2D(l))return null}r.prototype.add.call(this,l)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var h=arguments[0],f=arguments[1];return this.add(h,f),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var g=arguments[0],m=arguments[1],_=arguments[2];if(_)for(var E=0;E<g.length;E++)i.add(g[E],m);else for(var M=g.length-1;M>=0;M--)i.add(g[M],m);return!0}else if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof L){var y=arguments[0],w=arguments[1],v=arguments[2];if(!v){var S=this.size();if(S>0){if(y>0){var P=this.get(y-1);if(P.equals2D(w))return null}if(y<S){var I=this.get(y);if(I.equals2D(w))return null}}}r.prototype.add.call(this,y,w)}}else if(arguments.length===4){var b=arguments[0],D=arguments[1],O=arguments[2],T=arguments[3],x=1;O>T&&(x=-1);for(var R=O;R!==T;R+=x)i.add(b[R],D);return!0}},t.prototype.closeRing=function(){this.size()>0&&this.add(new L(this.get(0)),!1)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},Object.defineProperties(t,e),t}(Z),Tt=function(){},oc={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};oc.ForwardComparator.get=function(){return Qu},oc.BidirectionalComparator.get=function(){return nu},oc.coordArrayType.get=function(){return new Array(0).fill(null)},Tt.prototype.interfaces_=function(){return[]},Tt.prototype.getClass=function(){return Tt},Tt.isRing=function(t){return!(t.length<4||!t[0].equals2D(t[t.length-1]))},Tt.ptNotInList=function(t,e){for(var n=0;n<t.length;n++){var i=t[n];if(Tt.indexOf(i,e)<0)return i}return null},Tt.scroll=function(t,e){var n=Tt.indexOf(e,t);if(n<0)return null;var i=new Array(t.length).fill(null);Ve.arraycopy(t,n,i,0,t.length-n),Ve.arraycopy(t,0,i,t.length-n,n),Ve.arraycopy(i,0,t,0,t.length)},Tt.equals=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(t===e)return!0;if(t===null||e===null||t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].equals(e[n]))return!1;return!0}else if(arguments.length===3){var i=arguments[0],s=arguments[1],a=arguments[2];if(i===s)return!0;if(i===null||s===null||i.length!==s.length)return!1;for(var o=0;o<i.length;o++)if(a.compare(i[o],s[o])!==0)return!1;return!0}},Tt.intersection=function(t,e){for(var n=new Ku,i=0;i<t.length;i++)e.intersects(t[i])&&n.add(t[i],!0);return n.toCoordinateArray()},Tt.hasRepeatedPoints=function(t){for(var e=1;e<t.length;e++)if(t[e-1].equals(t[e]))return!0;return!1},Tt.removeRepeatedPoints=function(t){if(!Tt.hasRepeatedPoints(t))return t;var e=new Ku(t,!1);return e.toCoordinateArray()},Tt.reverse=function(t){for(var e=t.length-1,n=Math.trunc(e/2),i=0;i<=n;i++){var s=t[i];t[i]=t[e-i],t[e-i]=s}},Tt.removeNull=function(t){for(var e=0,n=0;n<t.length;n++)t[n]!==null&&e++;var i=new Array(e).fill(null);if(e===0)return i;for(var s=0,a=0;a<t.length;a++)t[a]!==null&&(i[s++]=t[a]);return i},Tt.copyDeep=function(){if(arguments.length===1){for(var t=arguments[0],e=new Array(t.length).fill(null),n=0;n<t.length;n++)e[n]=new L(t[n]);return e}else if(arguments.length===5)for(var i=arguments[0],s=arguments[1],a=arguments[2],o=arguments[3],l=arguments[4],u=0;u<l;u++)a[o+u]=new L(i[s+u])},Tt.isEqualReversed=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],s=e[t.length-n-1];if(i.compareTo(s)!==0)return!1}return!0},Tt.envelope=function(t){for(var e=new dt,n=0;n<t.length;n++)e.expandToInclude(t[n]);return e},Tt.toCoordinateArray=function(t){return t.toArray(Tt.coordArrayType)},Tt.atLeastNCoordinatesOrNothing=function(t,e){return e.length>=t?e:[]},Tt.indexOf=function(t,e){for(var n=0;n<e.length;n++)if(t.equals(e[n]))return n;return-1},Tt.increasingDirection=function(t){for(var e=0;e<Math.trunc(t.length/2);e++){var n=t.length-1-e,i=t[e].compareTo(t[n]);if(i!==0)return i}return 1},Tt.compare=function(t,e){for(var n=0;n<t.length&&n<e.length;){var i=t[n].compareTo(e[n]);if(i!==0)return i;n++}return n<e.length?-1:n<t.length?1:0},Tt.minCoordinate=function(t){for(var e=null,n=0;n<t.length;n++)(e===null||e.compareTo(t[n])>0)&&(e=t[n]);return e},Tt.extract=function(t,e,n){e=Gr.clamp(e,0,t.length),n=Gr.clamp(n,-1,t.length);var i=n-e+1;n<0&&(i=0),e>=t.length&&(i=0),n<e&&(i=0);var s=new Array(i).fill(null);if(i===0)return s;for(var a=0,o=e;o<=n;o++)s[a++]=t[o];return s},Object.defineProperties(Tt,oc);var Qu=function(){};Qu.prototype.compare=function(t,e){var n=t,i=e;return Tt.compare(n,i)},Qu.prototype.interfaces_=function(){return[Jl]},Qu.prototype.getClass=function(){return Qu};var nu=function(){};nu.prototype.compare=function(t,e){var n=t,i=e;if(n.length<i.length)return-1;if(n.length>i.length)return 1;if(n.length===0)return 0;var s=Tt.compare(n,i),a=Tt.isEqualReversed(n,i);return a?0:s},nu.prototype.OLDcompare=function(t,e){var n=t,i=e;if(n.length<i.length)return-1;if(n.length>i.length)return 1;if(n.length===0)return 0;for(var s=Tt.increasingDirection(n),a=Tt.increasingDirection(i),o=s>0?0:n.length-1,l=a>0?0:n.length-1,u=0;u<n.length;u++){var c=n[o].compareTo(i[l]);if(c!==0)return c;o+=s,l+=a}return 0},nu.prototype.interfaces_=function(){return[Jl]},nu.prototype.getClass=function(){return nu};var za=function(){};za.prototype.get=function(){},za.prototype.put=function(){},za.prototype.size=function(){},za.prototype.values=function(){},za.prototype.entrySet=function(){};var v_=function(r){function t(){r.apply(this,arguments)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t}(za);function Bu(r){this.message=r||""}Bu.prototype=new Error,Bu.prototype.name="OperationNotSupported";function lc(){}lc.prototype=new Me,lc.prototype.contains=function(){};var zf=function(r){function t(){r.call(this),this.array_=[],arguments[0]instanceof Me&&this.addAll(arguments[0])}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.contains=function(n){for(var i=this,s=0,a=this.array_.length;s<a;s++){var o=i.array_[s];if(o===n)return!0}return!1},t.prototype.add=function(n){return this.contains(n)?!1:(this.array_.push(n),!0)},t.prototype.addAll=function(n){for(var i=this,s=n.iterator();s.hasNext();)i.add(s.next());return!0},t.prototype.remove=function(n){throw new Error},t.prototype.size=function(){return this.array_.length},t.prototype.isEmpty=function(){return this.array_.length===0},t.prototype.toArray=function(){for(var n=this,i=[],s=0,a=this.array_.length;s<a;s++)i.push(n.array_[s]);return i},t.prototype.iterator=function(){return new y_(this)},t}(lc),y_=function(r){function t(e){r.call(this),this.hashSet_=e,this.position_=0}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new ru;return this.hashSet_.array_[this.position_++]},t.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},t.prototype.remove=function(){throw new Bu},t}(eu),qi=0,$s=1;function og(r){return r===null?qi:r.color}function jt(r){return r===null?null:r.parent}function Wi(r,t){r!==null&&(r.color=t)}function Vf(r){return r===null?null:r.left}function lg(r){return r===null?null:r.right}function Be(){this.root_=null,this.size_=0}Be.prototype=new v_,Be.prototype.get=function(r){for(var t=this.root_;t!==null;){var e=r.compareTo(t.key);if(e<0)t=t.left;else if(e>0)t=t.right;else return t.value}return null},Be.prototype.put=function(r,t){if(this.root_===null)return this.root_={key:r,value:t,left:null,right:null,parent:null,color:qi,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var e=this.root_,n,i;do if(n=e,i=r.compareTo(e.key),i<0)e=e.left;else if(i>0)e=e.right;else{var s=e.value;return e.value=t,s}while(e!==null);var a={key:r,left:null,right:null,value:t,parent:n,color:qi,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?n.left=a:n.right=a,this.fixAfterInsertion(a),this.size_++,null},Be.prototype.fixAfterInsertion=function(r){var t=this;for(r.color=$s;r!=null&&r!==this.root_&&r.parent.color===$s;)if(jt(r)===Vf(jt(jt(r)))){var e=lg(jt(jt(r)));og(e)===$s?(Wi(jt(r),qi),Wi(e,qi),Wi(jt(jt(r)),$s),r=jt(jt(r))):(r===lg(jt(r))&&(r=jt(r),t.rotateLeft(r)),Wi(jt(r),qi),Wi(jt(jt(r)),$s),t.rotateRight(jt(jt(r))))}else{var n=Vf(jt(jt(r)));og(n)===$s?(Wi(jt(r),qi),Wi(n,qi),Wi(jt(jt(r)),$s),r=jt(jt(r))):(r===Vf(jt(r))&&(r=jt(r),t.rotateRight(r)),Wi(jt(r),qi),Wi(jt(jt(r)),$s),t.rotateLeft(jt(jt(r))))}this.root_.color=qi},Be.prototype.values=function(){var r=new Z,t=this.getFirstEntry();if(t!==null)for(r.add(t.value);(t=Be.successor(t))!==null;)r.add(t.value);return r},Be.prototype.entrySet=function(){var r=new zf,t=this.getFirstEntry();if(t!==null)for(r.add(t);(t=Be.successor(t))!==null;)r.add(t);return r},Be.prototype.rotateLeft=function(r){if(r!=null){var t=r.right;r.right=t.left,t.left!=null&&(t.left.parent=r),t.parent=r.parent,r.parent===null?this.root_=t:r.parent.left===r?r.parent.left=t:r.parent.right=t,t.left=r,r.parent=t}},Be.prototype.rotateRight=function(r){if(r!=null){var t=r.left;r.left=t.right,t.right!=null&&(t.right.parent=r),t.parent=r.parent,r.parent===null?this.root_=t:r.parent.right===r?r.parent.right=t:r.parent.left=t,t.right=r,r.parent=t}},Be.prototype.getFirstEntry=function(){var r=this.root_;if(r!=null)for(;r.left!=null;)r=r.left;return r},Be.successor=function(r){if(r===null)return null;if(r.right!==null){for(var t=r.right;t.left!==null;)t=t.left;return t}else{for(var e=r.parent,n=r;e!==null&&n===e.right;)n=e,e=e.parent;return e}},Be.prototype.size=function(){return this.size_};var Zu=function(){};Zu.prototype.interfaces_=function(){return[]},Zu.prototype.getClass=function(){return Zu};function ug(){}ug.prototype=new lc;function Wn(){this.array_=[],arguments[0]instanceof Me&&this.addAll(arguments[0])}Wn.prototype=new ug,Wn.prototype.contains=function(r){for(var t=this,e=0,n=this.array_.length;e<n;e++){var i=t.array_[e];if(i.compareTo(r)===0)return!0}return!1},Wn.prototype.add=function(r){var t=this;if(this.contains(r))return!1;for(var e=0,n=this.array_.length;e<n;e++){var i=t.array_[e];if(i.compareTo(r)===1)return t.array_.splice(e,0,r),!0}return this.array_.push(r),!0},Wn.prototype.addAll=function(r){for(var t=this,e=r.iterator();e.hasNext();)t.add(e.next());return!0},Wn.prototype.remove=function(r){throw new Bu},Wn.prototype.size=function(){return this.array_.length},Wn.prototype.isEmpty=function(){return this.array_.length===0},Wn.prototype.toArray=function(){for(var r=this,t=[],e=0,n=this.array_.length;e<n;e++)t.push(r.array_[e]);return t},Wn.prototype.iterator=function(){return new uc(this)};var uc=function(r){this.treeSet_=r,this.position_=0};uc.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new ru;return this.treeSet_.array_[this.position_++]},uc.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},uc.prototype.remove=function(){throw new Bu};var js=function(){};js.sort=function(){var t=arguments[0],e,n,i,s;if(arguments.length===1)s=function(o,l){return o.compareTo(l)},t.sort(s);else if(arguments.length===2)i=arguments[1],s=function(o,l){return i.compare(o,l)},t.sort(s);else if(arguments.length===3){n=t.slice(arguments[1],arguments[2]),n.sort();var a=t.slice(0,arguments[1]).concat(n,t.slice(arguments[2],t.length));for(t.splice(0,t.length),e=0;e<a.length;e++)t.push(a[e])}else if(arguments.length===4)for(n=t.slice(arguments[1],arguments[2]),i=arguments[3],s=function(o,l){return i.compare(o,l)},n.sort(s),a=t.slice(0,arguments[1]).concat(n,t.slice(arguments[2],t.length)),t.splice(0,t.length),e=0;e<a.length;e++)t.push(a[e])},js.asList=function(t){for(var e=new Z,n=0,i=t.length;n<i;n++)e.add(t[n]);return e};var Vt=function(){},Cn={P:{configurable:!0},L:{configurable:!0},A:{configurable:!0},FALSE:{configurable:!0},TRUE:{configurable:!0},DONTCARE:{configurable:!0},SYM_FALSE:{configurable:!0},SYM_TRUE:{configurable:!0},SYM_DONTCARE:{configurable:!0},SYM_P:{configurable:!0},SYM_L:{configurable:!0},SYM_A:{configurable:!0}};Cn.P.get=function(){return 0},Cn.L.get=function(){return 1},Cn.A.get=function(){return 2},Cn.FALSE.get=function(){return-1},Cn.TRUE.get=function(){return-2},Cn.DONTCARE.get=function(){return-3},Cn.SYM_FALSE.get=function(){return"F"},Cn.SYM_TRUE.get=function(){return"T"},Cn.SYM_DONTCARE.get=function(){return"*"},Cn.SYM_P.get=function(){return"0"},Cn.SYM_L.get=function(){return"1"},Cn.SYM_A.get=function(){return"2"},Vt.prototype.interfaces_=function(){return[]},Vt.prototype.getClass=function(){return Vt},Vt.toDimensionSymbol=function(t){switch(t){case Vt.FALSE:return Vt.SYM_FALSE;case Vt.TRUE:return Vt.SYM_TRUE;case Vt.DONTCARE:return Vt.SYM_DONTCARE;case Vt.P:return Vt.SYM_P;case Vt.L:return Vt.SYM_L;case Vt.A:return Vt.SYM_A}throw new oe("Unknown dimension value: "+t)},Vt.toDimensionValue=function(t){switch(Yu.toUpperCase(t)){case Vt.SYM_FALSE:return Vt.FALSE;case Vt.SYM_TRUE:return Vt.TRUE;case Vt.SYM_DONTCARE:return Vt.DONTCARE;case Vt.SYM_P:return Vt.P;case Vt.SYM_L:return Vt.L;case Vt.SYM_A:return Vt.A}throw new oe("Unknown dimension symbol: "+t)},Object.defineProperties(Vt,Cn);var Hn=function(){};Hn.prototype.filter=function(t){},Hn.prototype.interfaces_=function(){return[]},Hn.prototype.getClass=function(){return Hn};var In=function(){};In.prototype.filter=function(t,e){},In.prototype.isDone=function(){},In.prototype.isGeometryChanged=function(){},In.prototype.interfaces_=function(){return[]},In.prototype.getClass=function(){return In};var er=function(r){function t(n,i){if(r.call(this,i),this._geometries=n||[],r.hasNullElements(this._geometries))throw new oe("geometries must not contain null elements")}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){for(var i=this,s=new dt,a=0;a<this._geometries.length;a++)s.expandToInclude(i._geometries[a].getEnvelopeInternal());return s},t.prototype.getGeometryN=function(i){return this._geometries[i]},t.prototype.getSortIndex=function(){return r.SORTINDEX_GEOMETRYCOLLECTION},t.prototype.getCoordinates=function(){for(var i=this,s=new Array(this.getNumPoints()).fill(null),a=-1,o=0;o<this._geometries.length;o++)for(var l=i._geometries[o].getCoordinates(),u=0;u<l.length;u++)a++,s[a]=l[u];return s},t.prototype.getArea=function(){for(var i=this,s=0,a=0;a<this._geometries.length;a++)s+=i._geometries[a].getArea();return s},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],a=arguments[1];if(!this.isEquivalentClass(s))return!1;var o=s;if(this._geometries.length!==o._geometries.length)return!1;for(var l=0;l<this._geometries.length;l++)if(!i._geometries[l].equalsExact(o._geometries[l],a))return!1;return!0}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var i=this,s=0;s<this._geometries.length;s++)i._geometries[s].normalize();js.sort(this._geometries)},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},t.prototype.getBoundaryDimension=function(){for(var i=this,s=Vt.FALSE,a=0;a<this._geometries.length;a++)s=Math.max(s,i._geometries[a].getBoundaryDimension());return s},t.prototype.getDimension=function(){for(var i=this,s=Vt.FALSE,a=0;a<this._geometries.length;a++)s=Math.max(s,i._geometries[a].getDimension());return s},t.prototype.getLength=function(){for(var i=this,s=0,a=0;a<this._geometries.length;a++)s+=i._geometries[a].getLength();return s},t.prototype.getNumPoints=function(){for(var i=this,s=0,a=0;a<this._geometries.length;a++)s+=i._geometries[a].getNumPoints();return s},t.prototype.getNumGeometries=function(){return this._geometries.length},t.prototype.reverse=function(){for(var i=this,s=this._geometries.length,a=new Array(s).fill(null),o=0;o<this._geometries.length;o++)a[o]=i._geometries[o].reverse();return this.getFactory().createGeometryCollection(a)},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var s=arguments[0],a=new Wn(js.asList(this._geometries)),o=new Wn(js.asList(s._geometries));return this.compare(a,o)}else if(arguments.length===2){for(var l=arguments[0],u=arguments[1],c=l,h=this.getNumGeometries(),f=c.getNumGeometries(),g=0;g<h&&g<f;){var m=i.getGeometryN(g),_=c.getGeometryN(g),E=m.compareToSameClass(_,u);if(E!==0)return E;g++}return g<h?1:g<f?-1:0}},t.prototype.apply=function(){var i=this;if(_t(arguments[0],pi))for(var s=arguments[0],a=0;a<this._geometries.length;a++)i._geometries[a].apply(s);else if(_t(arguments[0],In)){var o=arguments[0];if(this._geometries.length===0)return null;for(var l=0;l<this._geometries.length&&(i._geometries[l].apply(o),!o.isDone());l++);o.isGeometryChanged()&&this.geometryChanged()}else if(_t(arguments[0],Hn)){var u=arguments[0];u.filter(this);for(var c=0;c<this._geometries.length;c++)i._geometries[c].apply(u)}else if(_t(arguments[0],Vi)){var h=arguments[0];h.filter(this);for(var f=0;f<this._geometries.length;f++)i._geometries[f].apply(h)}},t.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),Mt.shouldNeverReachHere(),null},t.prototype.clone=function(){var i=this,s=r.prototype.clone.call(this);s._geometries=new Array(this._geometries.length).fill(null);for(var a=0;a<this._geometries.length;a++)s._geometries[a]=i._geometries[a].clone();return s},t.prototype.getGeometryType=function(){return"GeometryCollection"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),a=0;a<s.length;a++)s[a]=i._geometries[a].copy();return new t(s,this._factory)},t.prototype.isEmpty=function(){for(var i=this,s=0;s<this._geometries.length;s++)if(!i._geometries[s].isEmpty())return!1;return!0},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-5694727726395021e3},Object.defineProperties(t,e),t}(yt),ta=function(r){function t(){r.apply(this,arguments)}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return yt.SORTINDEX_MULTILINESTRING},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?r.prototype.equalsExact.call(this,i,s):!1}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?Vt.FALSE:0},t.prototype.isClosed=function(){var i=this;if(this.isEmpty())return!1;for(var s=0;s<this._geometries.length;s++)if(!i._geometries[s].isClosed())return!1;return!0},t.prototype.getDimension=function(){return 1},t.prototype.reverse=function(){for(var i=this,s=this._geometries.length,a=new Array(s).fill(null),o=0;o<this._geometries.length;o++)a[s-1-o]=i._geometries[o].reverse();return this.getFactory().createMultiLineString(a)},t.prototype.getBoundary=function(){return new tn(this).getBoundary()},t.prototype.getGeometryType=function(){return"MultiLineString"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),a=0;a<s.length;a++)s[a]=i._geometries[a].copy();return new t(s,this._factory)},t.prototype.interfaces_=function(){return[Zu]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 8166665132445434e3},Object.defineProperties(t,e),t}(er),tn=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,arguments.length===1){var t=arguments[0],e=jr.MOD2_BOUNDARY_RULE;this._geom=t,this._geomFact=t.getFactory(),this._bnRule=e}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this._geom=n,this._geomFact=n.getFactory(),this._bnRule=i}};tn.prototype.boundaryMultiLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var e=this.computeBoundaryCoordinates(t);return e.length===1?this._geomFact.createPoint(e[0]):this._geomFact.createMultiPointFromCoords(e)},tn.prototype.getBoundary=function(){return this._geom instanceof pe?this.boundaryLineString(this._geom):this._geom instanceof ta?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},tn.prototype.boundaryLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();if(t.isClosed()){var e=this._bnRule.isInBoundary(2);return e?t.getStartPoint():this._geomFact.createMultiPoint()}return this._geomFact.createMultiPoint([t.getStartPoint(),t.getEndPoint()])},tn.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()},tn.prototype.computeBoundaryCoordinates=function(t){var e=this,n=new Z;this._endpointMap=new Be;for(var i=0;i<t.getNumGeometries();i++){var s=t.getGeometryN(i);s.getNumPoints()!==0&&(e.addEndpoint(s.getCoordinateN(0)),e.addEndpoint(s.getCoordinateN(s.getNumPoints()-1)))}for(var a=this._endpointMap.entrySet().iterator();a.hasNext();){var o=a.next(),l=o.getValue(),u=l.count;e._bnRule.isInBoundary(u)&&n.add(o.getKey())}return Tt.toCoordinateArray(n)},tn.prototype.addEndpoint=function(t){var e=this._endpointMap.get(t);e===null&&(e=new hc,this._endpointMap.put(t,e)),e.count++},tn.prototype.interfaces_=function(){return[]},tn.prototype.getClass=function(){return tn},tn.getBoundary=function(){if(arguments.length===1){var t=arguments[0],e=new tn(t);return e.getBoundary()}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=new tn(n,i);return s.getBoundary()}};var hc=function(){this.count=null};hc.prototype.interfaces_=function(){return[]},hc.prototype.getClass=function(){return hc};function __(){}function w_(){}var E_=function(){};function S_(){}function P_(){}function C_(){}var en=function(){},Uf={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};en.prototype.interfaces_=function(){return[]},en.prototype.getClass=function(){return en},en.chars=function(t,e){for(var n=new Array(e).fill(null),i=0;i<e;i++)n[i]=t;return String(n)},en.getStackTrace=function(){if(arguments.length===1){var t=arguments[0],e=new S_,n=new __;return t.printStackTrace(n),e.toString()}else if(arguments.length===2){var i=arguments[0],s=arguments[1],a="";new w_(en.getStackTrace(i));for(var o=new C_,l=0;l<s;l++)try{a+=o.readLine()+en.NEWLINE}catch(u){if(u instanceof P_)Mt.shouldNeverReachHere();else throw u}finally{}return a}},en.split=function(t,e){for(var n=e.length,i=new Z,s=""+t,a=s.indexOf(e);a>=0;){var o=s.substring(0,a);i.add(o),s=s.substring(a+n),a=s.indexOf(e)}s.length>0&&i.add(s);for(var l=new Array(i.size()).fill(null),u=0;u<l.length;u++)l[u]=i.get(u);return l},en.toString=function(){if(arguments.length===1){var t=arguments[0];return en.SIMPLE_ORDINATE_FORMAT.format(t)}},en.spaces=function(t){return en.chars(" ",t)},Uf.NEWLINE.get=function(){return Ve.getProperty("line.separator")},Uf.SIMPLE_ORDINATE_FORMAT.get=function(){return new E_},Object.defineProperties(en,Uf);var ve=function(){};ve.prototype.interfaces_=function(){return[]},ve.prototype.getClass=function(){return ve},ve.copyCoord=function(t,e,n,i){for(var s=Math.min(t.getDimension(),n.getDimension()),a=0;a<s;a++)n.setOrdinate(i,a,t.getOrdinate(e,a))},ve.isRing=function(t){var e=t.size();return e===0?!0:e<=3?!1:t.getOrdinate(0,Ft.X)===t.getOrdinate(e-1,Ft.X)&&t.getOrdinate(0,Ft.Y)===t.getOrdinate(e-1,Ft.Y)},ve.isEqual=function(t,e){var n=t.size(),i=e.size();if(n!==i)return!1;for(var s=Math.min(t.getDimension(),e.getDimension()),a=0;a<n;a++)for(var o=0;o<s;o++){var l=t.getOrdinate(a,o),u=e.getOrdinate(a,o);if(t.getOrdinate(a,o)!==e.getOrdinate(a,o)&&!(wt.isNaN(l)&&wt.isNaN(u)))return!1}return!0},ve.extend=function(t,e,n){var i=t.create(n,e.getDimension()),s=e.size();if(ve.copy(e,0,i,0,s),s>0)for(var a=s;a<n;a++)ve.copy(e,s-1,i,a,1);return i},ve.reverse=function(t){for(var e=t.size()-1,n=Math.trunc(e/2),i=0;i<=n;i++)ve.swap(t,i,e-i)},ve.swap=function(t,e,n){if(e===n)return null;for(var i=0;i<t.getDimension();i++){var s=t.getOrdinate(e,i);t.setOrdinate(e,i,t.getOrdinate(n,i)),t.setOrdinate(n,i,s)}},ve.copy=function(t,e,n,i,s){for(var a=0;a<s;a++)ve.copyCoord(t,e+a,n,i+a)},ve.toString=function(){if(arguments.length===1){var t=arguments[0],e=t.size();if(e===0)return"()";var n=t.getDimension(),i=new zn;i.append("(");for(var s=0;s<e;s++){s>0&&i.append(" ");for(var a=0;a<n;a++)a>0&&i.append(","),i.append(en.toString(t.getOrdinate(s,a)))}return i.append(")"),i.toString()}},ve.ensureValidRing=function(t,e){var n=e.size();if(n===0)return e;if(n<=3)return ve.createClosedRing(t,e,4);var i=e.getOrdinate(0,Ft.X)===e.getOrdinate(n-1,Ft.X)&&e.getOrdinate(0,Ft.Y)===e.getOrdinate(n-1,Ft.Y);return i?e:ve.createClosedRing(t,e,n+1)},ve.createClosedRing=function(t,e,n){var i=t.create(n,e.getDimension()),s=e.size();ve.copy(e,0,i,0,s);for(var a=s;a<n;a++)ve.copy(e,0,i,a,1);return i};var pe=function(r){function t(n,i){r.call(this,i),this._points=null,this.init(n)}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new dt:this._points.expandEnvelope(new dt)},t.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},t.prototype.getSortIndex=function(){return r.SORTINDEX_LINESTRING},t.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],a=arguments[1];if(!this.isEquivalentClass(s))return!1;var o=s;if(this._points.size()!==o._points.size())return!1;for(var l=0;l<this._points.size();l++)if(!i.equal(i._points.getCoordinate(l),o._points.getCoordinate(l),a))return!1;return!0}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var i=this,s=0;s<Math.trunc(this._points.size()/2);s++){var a=i._points.size()-1-s;if(!i._points.getCoordinate(s).equals(i._points.getCoordinate(a)))return i._points.getCoordinate(s).compareTo(i._points.getCoordinate(a))>0&&ve.reverse(i._points),null}},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?Vt.FALSE:0},t.prototype.isClosed=function(){return this.isEmpty()?!1:this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},t.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},t.prototype.getDimension=function(){return 1},t.prototype.getLength=function(){return et.computeLength(this._points)},t.prototype.getNumPoints=function(){return this._points.size()},t.prototype.reverse=function(){var i=this._points.copy();ve.reverse(i);var s=this.getFactory().createLineString(i);return s},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){for(var s=arguments[0],a=s,o=0,l=0;o<this._points.size()&&l<a._points.size();){var u=i._points.getCoordinate(o).compareTo(a._points.getCoordinate(l));if(u!==0)return u;o++,l++}return o<this._points.size()?1:l<a._points.size()?-1:0}else if(arguments.length===2){var c=arguments[0],h=arguments[1],f=c;return h.compare(this._points,f._points)}},t.prototype.apply=function(){var i=this;if(_t(arguments[0],pi))for(var s=arguments[0],a=0;a<this._points.size();a++)s.filter(i._points.getCoordinate(a));else if(_t(arguments[0],In)){var o=arguments[0];if(this._points.size()===0)return null;for(var l=0;l<this._points.size()&&(o.filter(i._points,l),!o.isDone());l++);o.isGeometryChanged()&&this.geometryChanged()}else if(_t(arguments[0],Hn)){var u=arguments[0];u.filter(this)}else if(_t(arguments[0],Vi)){var c=arguments[0];c.filter(this)}},t.prototype.getBoundary=function(){return new tn(this).getBoundary()},t.prototype.isEquivalentClass=function(i){return i instanceof t},t.prototype.clone=function(){var i=r.prototype.clone.call(this);return i._points=this._points.clone(),i},t.prototype.getCoordinateN=function(i){return this._points.getCoordinate(i)},t.prototype.getGeometryType=function(){return"LineString"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._points},t.prototype.isEmpty=function(){return this._points.size()===0},t.prototype.init=function(i){if(i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),i.size()===1)throw new oe("Invalid number of points in LineString (found "+i.size()+" - must be 0 or >= 2)");this._points=i},t.prototype.isCoordinate=function(i){for(var s=this,a=0;a<this._points.size();a++)if(s._points.getCoordinate(a).equals(i))return!0;return!1},t.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},t.prototype.getPointN=function(i){return this.getFactory().createPoint(this._points.getCoordinate(i))},t.prototype.interfaces_=function(){return[Zu]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(t,e),t}(yt),$u=function(){};$u.prototype.interfaces_=function(){return[]},$u.prototype.getClass=function(){return $u};var Mr=function(r){function t(n,i){r.call(this,i),this._coordinates=n||null,this.init(this._coordinates)}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new dt;var i=new dt;return i.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),i},t.prototype.getSortIndex=function(){return r.SORTINDEX_POINT},t.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?this.isEmpty()&&i.isEmpty()?!0:this.isEmpty()!==i.isEmpty()?!1:this.equal(i.getCoordinate(),this.getCoordinate(),s):!1}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){},t.prototype.getCoordinate=function(){return this._coordinates.size()!==0?this._coordinates.getCoordinate(0):null},t.prototype.getBoundaryDimension=function(){return Vt.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getNumPoints=function(){return this.isEmpty()?0:1},t.prototype.reverse=function(){return this.copy()},t.prototype.getX=function(){if(this.getCoordinate()===null)throw new Error("getX called on empty Point");return this.getCoordinate().x},t.prototype.compareToSameClass=function(){if(arguments.length===1){var i=arguments[0],s=i;return this.getCoordinate().compareTo(s.getCoordinate())}else if(arguments.length===2){var a=arguments[0],o=arguments[1],l=a;return o.compare(this._coordinates,l._coordinates)}},t.prototype.apply=function(){if(_t(arguments[0],pi)){var i=arguments[0];if(this.isEmpty())return null;i.filter(this.getCoordinate())}else if(_t(arguments[0],In)){var s=arguments[0];if(this.isEmpty())return null;s.filter(this._coordinates,0),s.isGeometryChanged()&&this.geometryChanged()}else if(_t(arguments[0],Hn)){var a=arguments[0];a.filter(this)}else if(_t(arguments[0],Vi)){var o=arguments[0];o.filter(this)}},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.clone=function(){var i=r.prototype.clone.call(this);return i._coordinates=this._coordinates.clone(),i},t.prototype.getGeometryType=function(){return"Point"},t.prototype.copy=function(){return new t(this._coordinates.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._coordinates},t.prototype.getY=function(){if(this.getCoordinate()===null)throw new Error("getY called on empty Point");return this.getCoordinate().y},t.prototype.isEmpty=function(){return this._coordinates.size()===0},t.prototype.init=function(i){i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),Mt.isTrue(i.size()<=1),this._coordinates=i},t.prototype.isSimple=function(){return!0},t.prototype.interfaces_=function(){return[$u]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 4902022702746615e3},Object.defineProperties(t,e),t}(yt),ys=function(){};ys.prototype.interfaces_=function(){return[]},ys.prototype.getClass=function(){return ys};var Ne=function(r){function t(n,i,s){if(r.call(this,s),this._shell=null,this._holes=null,n===null&&(n=this.getFactory().createLinearRing()),i===null&&(i=[]),r.hasNullElements(i))throw new oe("holes must not contain null elements");if(n.isEmpty()&&r.hasNonEmptyElements(i))throw new oe("shell is empty but holes are not");this._shell=n,this._holes=i}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},t.prototype.getSortIndex=function(){return r.SORTINDEX_POLYGON},t.prototype.getCoordinates=function(){var i=this;if(this.isEmpty())return[];for(var s=new Array(this.getNumPoints()).fill(null),a=-1,o=this._shell.getCoordinates(),l=0;l<o.length;l++)a++,s[a]=o[l];for(var u=0;u<this._holes.length;u++)for(var c=i._holes[u].getCoordinates(),h=0;h<c.length;h++)a++,s[a]=c[h];return s},t.prototype.getArea=function(){var i=this,s=0;s+=Math.abs(et.signedArea(this._shell.getCoordinateSequence()));for(var a=0;a<this._holes.length;a++)s-=Math.abs(et.signedArea(i._holes[a].getCoordinateSequence()));return s},t.prototype.isRectangle=function(){if(this.getNumInteriorRing()!==0||this._shell===null||this._shell.getNumPoints()!==5)return!1;for(var i=this._shell.getCoordinateSequence(),s=this.getEnvelopeInternal(),a=0;a<5;a++){var o=i.getX(a);if(!(o===s.getMinX()||o===s.getMaxX()))return!1;var l=i.getY(a);if(!(l===s.getMinY()||l===s.getMaxY()))return!1}for(var u=i.getX(0),c=i.getY(0),h=1;h<=4;h++){var f=i.getX(h),g=i.getY(h),m=f!==u,_=g!==c;if(m===_)return!1;u=f,c=g}return!0},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],a=arguments[1];if(!this.isEquivalentClass(s))return!1;var o=s,l=this._shell,u=o._shell;if(!l.equalsExact(u,a)||this._holes.length!==o._holes.length)return!1;for(var c=0;c<this._holes.length;c++)if(!i._holes[c].equalsExact(o._holes[c],a))return!1;return!0}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){var i=this;if(arguments.length===0){this.normalize(this._shell,!0);for(var s=0;s<this._holes.length;s++)i.normalize(i._holes[s],!1);js.sort(this._holes)}else if(arguments.length===2){var a=arguments[0],o=arguments[1];if(a.isEmpty())return null;var l=new Array(a.getCoordinates().length-1).fill(null);Ve.arraycopy(a.getCoordinates(),0,l,0,l.length);var u=Tt.minCoordinate(a.getCoordinates());Tt.scroll(l,u),Ve.arraycopy(l,0,a.getCoordinates(),0,l.length),a.getCoordinates()[l.length]=l[0],et.isCCW(a.getCoordinates())===o&&Tt.reverse(a.getCoordinates())}},t.prototype.getCoordinate=function(){return this._shell.getCoordinate()},t.prototype.getNumInteriorRing=function(){return this._holes.length},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.getLength=function(){var i=this,s=0;s+=this._shell.getLength();for(var a=0;a<this._holes.length;a++)s+=i._holes[a].getLength();return s},t.prototype.getNumPoints=function(){for(var i=this,s=this._shell.getNumPoints(),a=0;a<this._holes.length;a++)s+=i._holes[a].getNumPoints();return s},t.prototype.reverse=function(){var i=this,s=this.copy();s._shell=this._shell.copy().reverse(),s._holes=new Array(this._holes.length).fill(null);for(var a=0;a<this._holes.length;a++)s._holes[a]=i._holes[a].copy().reverse();return s},t.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var s=arguments[0],a=this._shell,o=s._shell;return a.compareToSameClass(o)}else if(arguments.length===2){var l=arguments[0],u=arguments[1],c=l,h=this._shell,f=c._shell,g=h.compareToSameClass(f,u);if(g!==0)return g;for(var m=this.getNumInteriorRing(),_=c.getNumInteriorRing(),E=0;E<m&&E<_;){var M=i.getInteriorRingN(E),y=c.getInteriorRingN(E),w=M.compareToSameClass(y,u);if(w!==0)return w;E++}return E<m?1:E<_?-1:0}},t.prototype.apply=function(i){var s=this;if(_t(i,pi)){this._shell.apply(i);for(var a=0;a<this._holes.length;a++)s._holes[a].apply(i)}else if(_t(i,In)){if(this._shell.apply(i),!i.isDone())for(var o=0;o<this._holes.length&&(s._holes[o].apply(i),!i.isDone());o++);i.isGeometryChanged()&&this.geometryChanged()}else if(_t(i,Hn))i.filter(this);else if(_t(i,Vi)){i.filter(this),this._shell.apply(i);for(var l=0;l<this._holes.length;l++)s._holes[l].apply(i)}},t.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();var s=new Array(this._holes.length+1).fill(null);s[0]=this._shell;for(var a=0;a<this._holes.length;a++)s[a+1]=i._holes[a];return s.length<=1?this.getFactory().createLinearRing(s[0].getCoordinateSequence()):this.getFactory().createMultiLineString(s)},t.prototype.clone=function(){var i=this,s=r.prototype.clone.call(this);s._shell=this._shell.clone(),s._holes=new Array(this._holes.length).fill(null);for(var a=0;a<this._holes.length;a++)s._holes[a]=i._holes[a].clone();return s},t.prototype.getGeometryType=function(){return"Polygon"},t.prototype.copy=function(){for(var i=this,s=this._shell.copy(),a=new Array(this._holes.length).fill(null),o=0;o<a.length;o++)a[o]=i._holes[o].copy();return new t(s,a,this._factory)},t.prototype.getExteriorRing=function(){return this._shell},t.prototype.isEmpty=function(){return this._shell.isEmpty()},t.prototype.getInteriorRingN=function(i){return this._holes[i]},t.prototype.interfaces_=function(){return[ys]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(t,e),t}(yt),iu=function(r){function t(){r.apply(this,arguments)}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return yt.SORTINDEX_MULTIPOINT},t.prototype.isValid=function(){return!0},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?r.prototype.equalsExact.call(this,i,s):!1}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.getCoordinate=function(){if(arguments.length===1){var i=arguments[0];return this._geometries[i].getCoordinate()}else return r.prototype.getCoordinate.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return Vt.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.getGeometryType=function(){return"MultiPoint"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),a=0;a<s.length;a++)s[a]=i._geometries[a].copy();return new t(s,this._factory)},t.prototype.interfaces_=function(){return[$u]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-8048474874175356e3},Object.defineProperties(t,e),t}(er),gi=function(r){function t(n,i){n instanceof L&&i instanceof Dt&&(n=i.getCoordinateSequenceFactory().create(n)),r.call(this,n,i),this.validateConstruction()}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return yt.SORTINDEX_LINEARRING},t.prototype.getBoundaryDimension=function(){return Vt.FALSE},t.prototype.isClosed=function(){return this.isEmpty()?!0:r.prototype.isClosed.call(this)},t.prototype.reverse=function(){var i=this._points.copy();ve.reverse(i);var s=this.getFactory().createLinearRing(i);return s},t.prototype.validateConstruction=function(){if(!this.isEmpty()&&!r.prototype.isClosed.call(this))throw new oe("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<t.MINIMUM_VALID_SIZE)throw new oe("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},t.prototype.getGeometryType=function(){return"LinearRing"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.MINIMUM_VALID_SIZE.get=function(){return 4},e.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(t,e),t}(pe),mi=function(r){function t(){r.apply(this,arguments)}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return yt.SORTINDEX_MULTIPOLYGON},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?r.prototype.equalsExact.call(this,i,s):!1}else return r.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.reverse=function(){for(var i=this,s=this._geometries.length,a=new Array(s).fill(null),o=0;o<this._geometries.length;o++)a[o]=i._geometries[o].reverse();return this.getFactory().createMultiPolygon(a)},t.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();for(var s=new Z,a=0;a<this._geometries.length;a++)for(var o=i._geometries[a],l=o.getBoundary(),u=0;u<l.getNumGeometries();u++)s.add(l.getGeometryN(u));var c=new Array(s.size()).fill(null);return this.getFactory().createMultiLineString(s.toArray(c))},t.prototype.getGeometryType=function(){return"MultiPolygon"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),a=0;a<s.length;a++)s[a]=i._geometries[a].copy();return new t(s,this._factory)},t.prototype.interfaces_=function(){return[ys]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(t,e),t}(er),rn=function(t){this._factory=t||null,this._isUserDataCopied=!1},cc={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};rn.prototype.setCopyUserData=function(t){this._isUserDataCopied=t},rn.prototype.edit=function(t,e){if(t===null)return null;var n=this.editInternal(t,e);return this._isUserDataCopied&&n.setUserData(t.getUserData()),n},rn.prototype.editInternal=function(t,e){return this._factory===null&&(this._factory=t.getFactory()),t instanceof er?this.editGeometryCollection(t,e):t instanceof Ne?this.editPolygon(t,e):t instanceof Mr?e.edit(t,this._factory):t instanceof pe?e.edit(t,this._factory):(Mt.shouldNeverReachHere("Unsupported Geometry class: "+t.getClass().getName()),null)},rn.prototype.editGeometryCollection=function(t,e){for(var n=this,i=e.edit(t,this._factory),s=new Z,a=0;a<i.getNumGeometries();a++){var o=n.edit(i.getGeometryN(a),e);o===null||o.isEmpty()||s.add(o)}return i.getClass()===iu?this._factory.createMultiPoint(s.toArray([])):i.getClass()===ta?this._factory.createMultiLineString(s.toArray([])):i.getClass()===mi?this._factory.createMultiPolygon(s.toArray([])):this._factory.createGeometryCollection(s.toArray([]))},rn.prototype.editPolygon=function(t,e){var n=this,i=e.edit(t,this._factory);if(i===null&&(i=this._factory.createPolygon(null)),i.isEmpty())return i;var s=this.edit(i.getExteriorRing(),e);if(s===null||s.isEmpty())return this._factory.createPolygon();for(var a=new Z,o=0;o<i.getNumInteriorRing();o++){var l=n.edit(i.getInteriorRingN(o),e);l===null||l.isEmpty()||a.add(l)}return this._factory.createPolygon(s,a.toArray([]))},rn.prototype.interfaces_=function(){return[]},rn.prototype.getClass=function(){return rn},rn.GeometryEditorOperation=function(){},cc.NoOpGeometryOperation.get=function(){return ju},cc.CoordinateOperation.get=function(){return th},cc.CoordinateSequenceOperation.get=function(){return eh},Object.defineProperties(rn,cc);var ju=function(){};ju.prototype.edit=function(t,e){return t},ju.prototype.interfaces_=function(){return[rn.GeometryEditorOperation]},ju.prototype.getClass=function(){return ju};var th=function(){};th.prototype.edit=function(t,e){var n=this.editCoordinates(t.getCoordinates(),t);return n===null?t:t instanceof gi?e.createLinearRing(n):t instanceof pe?e.createLineString(n):t instanceof Mr?n.length>0?e.createPoint(n[0]):e.createPoint():t},th.prototype.interfaces_=function(){return[rn.GeometryEditorOperation]},th.prototype.getClass=function(){return th};var eh=function(){};eh.prototype.edit=function(t,e){return t instanceof gi?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof pe?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof Mr?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},eh.prototype.interfaces_=function(){return[rn.GeometryEditorOperation]},eh.prototype.getClass=function(){return eh};var ye=function(){var t=this;if(this._dimension=3,this._coordinates=null,arguments.length===1){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var e=arguments[0];this._coordinates=new Array(e).fill(null);for(var n=0;n<e;n++)t._coordinates[n]=new L}else if(_t(arguments[0],Ft)){var i=arguments[0];if(i===null)return this._coordinates=new Array(0).fill(null),null;this._dimension=i.getDimension(),this._coordinates=new Array(i.size()).fill(null);for(var s=0;s<this._coordinates.length;s++)t._coordinates[s]=i.getCoordinateCopy(s)}}else if(arguments.length===2){if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var a=arguments[0],o=arguments[1];this._coordinates=a,this._dimension=o,a===null&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var l=arguments[0],u=arguments[1];this._coordinates=new Array(l).fill(null),this._dimension=u;for(var c=0;c<l;c++)t._coordinates[c]=new L}}},hg={serialVersionUID:{configurable:!0}};ye.prototype.setOrdinate=function(t,e,n){switch(e){case Ft.X:this._coordinates[t].x=n;break;case Ft.Y:this._coordinates[t].y=n;break;case Ft.Z:this._coordinates[t].z=n;break;default:throw new oe("invalid ordinateIndex")}},ye.prototype.size=function(){return this._coordinates.length},ye.prototype.getOrdinate=function(t,e){switch(e){case Ft.X:return this._coordinates[t].x;case Ft.Y:return this._coordinates[t].y;case Ft.Z:return this._coordinates[t].z}return wt.NaN},ye.prototype.getCoordinate=function(){if(arguments.length===1){var t=arguments[0];return this._coordinates[t]}else if(arguments.length===2){var e=arguments[0],n=arguments[1];n.x=this._coordinates[e].x,n.y=this._coordinates[e].y,n.z=this._coordinates[e].z}},ye.prototype.getCoordinateCopy=function(t){return new L(this._coordinates[t])},ye.prototype.getDimension=function(){return this._dimension},ye.prototype.getX=function(t){return this._coordinates[t].x},ye.prototype.clone=function(){for(var t=this,e=new Array(this.size()).fill(null),n=0;n<this._coordinates.length;n++)e[n]=t._coordinates[n].clone();return new ye(e,this._dimension)},ye.prototype.expandEnvelope=function(t){for(var e=this,n=0;n<this._coordinates.length;n++)t.expandToInclude(e._coordinates[n]);return t},ye.prototype.copy=function(){for(var t=this,e=new Array(this.size()).fill(null),n=0;n<this._coordinates.length;n++)e[n]=t._coordinates[n].copy();return new ye(e,this._dimension)},ye.prototype.toString=function(){var t=this;if(this._coordinates.length>0){var e=new zn(17*this._coordinates.length);e.append("("),e.append(this._coordinates[0]);for(var n=1;n<this._coordinates.length;n++)e.append(", "),e.append(t._coordinates[n]);return e.append(")"),e.toString()}else return"()"},ye.prototype.getY=function(t){return this._coordinates[t].y},ye.prototype.toCoordinateArray=function(){return this._coordinates},ye.prototype.interfaces_=function(){return[Ft,$r]},ye.prototype.getClass=function(){return ye},hg.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(ye,hg);var vi=function(){},qf={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};vi.prototype.readResolve=function(){return vi.instance()},vi.prototype.create=function(){if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return new ye(t)}else if(_t(arguments[0],Ft)){var e=arguments[0];return new ye(e)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return i>3&&(i=3),i<2?new ye(n):new ye(n,i)}},vi.prototype.interfaces_=function(){return[Kl,$r]},vi.prototype.getClass=function(){return vi},vi.instance=function(){return vi.instanceObject},qf.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},qf.instanceObject.get=function(){return new vi},Object.defineProperties(vi,qf);var cg=function(r){function t(){r.call(this),this.map_=new Map}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.get=function(n){return this.map_.get(n)||null},t.prototype.put=function(n,i){return this.map_.set(n,i),i},t.prototype.values=function(){for(var n=new Z,i=this.map_.values(),s=i.next();!s.done;)n.add(s.value),s=i.next();return n},t.prototype.entrySet=function(){var n=new zf;return this.map_.entries().forEach(function(i){return n.add(i)}),n},t.prototype.size=function(){return this.map_.size()},t}(za),Ut=function r(){if(this._modelType=null,this._scale=null,arguments.length===0)this._modelType=r.FLOATING;else if(arguments.length===1){if(arguments[0]instanceof Xn){var t=arguments[0];this._modelType=t,t===r.FIXED&&this.setScale(1)}else if(typeof arguments[0]=="number"){var e=arguments[0];this._modelType=r.FIXED,this.setScale(e)}else if(arguments[0]instanceof r){var n=arguments[0];this._modelType=n._modelType,this._scale=n._scale}}},Wf={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};Ut.prototype.equals=function(t){if(!(t instanceof Ut))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},Ut.prototype.compareTo=function(t){var e=t,n=this.getMaximumSignificantDigits(),i=e.getMaximumSignificantDigits();return new Vn(n).compareTo(new Vn(i))},Ut.prototype.getScale=function(){return this._scale},Ut.prototype.isFloating=function(){return this._modelType===Ut.FLOATING||this._modelType===Ut.FLOATING_SINGLE},Ut.prototype.getType=function(){return this._modelType},Ut.prototype.toString=function(){var t="UNKNOWN";return this._modelType===Ut.FLOATING?t="Floating":this._modelType===Ut.FLOATING_SINGLE?t="Floating-Single":this._modelType===Ut.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},Ut.prototype.makePrecise=function(){if(typeof arguments[0]=="number"){var t=arguments[0];if(wt.isNaN(t))return t;if(this._modelType===Ut.FLOATING_SINGLE){var e=t;return e}return this._modelType===Ut.FIXED?Math.round(t*this._scale)/this._scale:t}else if(arguments[0]instanceof L){var n=arguments[0];if(this._modelType===Ut.FLOATING)return null;n.x=this.makePrecise(n.x),n.y=this.makePrecise(n.y)}},Ut.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===Ut.FLOATING?t=16:this._modelType===Ut.FLOATING_SINGLE?t=6:this._modelType===Ut.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},Ut.prototype.setScale=function(t){this._scale=Math.abs(t)},Ut.prototype.interfaces_=function(){return[$r,Zr]},Ut.prototype.getClass=function(){return Ut},Ut.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},Wf.serialVersionUID.get=function(){return 7777263578777804e3},Wf.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(Ut,Wf);var Xn=function r(t){this._name=t||null,r.nameToTypeMap.put(t,this)},Hf={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};Xn.prototype.readResolve=function(){return Xn.nameToTypeMap.get(this._name)},Xn.prototype.toString=function(){return this._name},Xn.prototype.interfaces_=function(){return[$r]},Xn.prototype.getClass=function(){return Xn},Hf.serialVersionUID.get=function(){return-552860263173159e4},Hf.nameToTypeMap.get=function(){return new cg},Object.defineProperties(Xn,Hf),Ut.Type=Xn,Ut.FIXED=new Xn("FIXED"),Ut.FLOATING=new Xn("FLOATING"),Ut.FLOATING_SINGLE=new Xn("FLOATING SINGLE");var Dt=function r(){this._precisionModel=new Ut,this._SRID=0,this._coordinateSequenceFactory=r.getDefaultCoordinateSequenceFactory(),arguments.length===0||(arguments.length===1?_t(arguments[0],Kl)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof Ut&&(this._precisionModel=arguments[0]):arguments.length===2?(this._precisionModel=arguments[0],this._SRID=arguments[1]):arguments.length===3&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},fg={serialVersionUID:{configurable:!0}};Dt.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new L(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new L(t.getMinX(),t.getMinY()),new L(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new L(t.getMinX(),t.getMinY()),new L(t.getMinX(),t.getMaxY()),new L(t.getMaxX(),t.getMaxY()),new L(t.getMaxX(),t.getMinY()),new L(t.getMinX(),t.getMinY())]),null)},Dt.prototype.createLineString=function(t){if(t){if(t instanceof Array)return new pe(this.getCoordinateSequenceFactory().create(t),this);if(_t(t,Ft))return new pe(t,this)}else return new pe(this.getCoordinateSequenceFactory().create([]),this)},Dt.prototype.createMultiLineString=function(){if(arguments.length===0)return new ta(null,this);if(arguments.length===1){var t=arguments[0];return new ta(t,this)}},Dt.prototype.buildGeometry=function(t){for(var e=null,n=!1,i=!1,s=t.iterator();s.hasNext();){var a=s.next(),o=a.getClass();e===null&&(e=o),o!==e&&(n=!0),a.isGeometryCollectionOrDerived()&&(i=!0)}if(e===null)return this.createGeometryCollection();if(n||i)return this.createGeometryCollection(Dt.toGeometryArray(t));var l=t.iterator().next(),u=t.size()>1;if(u){if(l instanceof Ne)return this.createMultiPolygon(Dt.toPolygonArray(t));if(l instanceof pe)return this.createMultiLineString(Dt.toLineStringArray(t));if(l instanceof Mr)return this.createMultiPoint(Dt.toPointArray(t));Mt.shouldNeverReachHere("Unhandled class: "+l.getClass().getName())}return l},Dt.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(t!==null?this.getCoordinateSequenceFactory().create(t):null)},Dt.prototype.createPoint=function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof L){var t=arguments[0];return this.createPoint(t!==null?this.getCoordinateSequenceFactory().create([t]):null)}else if(_t(arguments[0],Ft)){var e=arguments[0];return new Mr(e,this)}}},Dt.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},Dt.prototype.createPolygon=function(){if(arguments.length===0)return new Ne(null,null,this);if(arguments.length===1){if(_t(arguments[0],Ft)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}else if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}else if(arguments[0]instanceof gi){var n=arguments[0];return this.createPolygon(n,null)}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];return new Ne(i,s,this)}},Dt.prototype.getSRID=function(){return this._SRID},Dt.prototype.createGeometryCollection=function(){if(arguments.length===0)return new er(null,this);if(arguments.length===1){var t=arguments[0];return new er(t,this)}},Dt.prototype.createGeometry=function(t){var e=new rn(this);return e.edit(t,{edit:function(){if(arguments.length===2){var n=arguments[0];return this._coordinateSequenceFactory.create(n)}}})},Dt.prototype.getPrecisionModel=function(){return this._precisionModel},Dt.prototype.createLinearRing=function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(t!==null?this.getCoordinateSequenceFactory().create(t):null)}else if(_t(arguments[0],Ft)){var e=arguments[0];return new gi(e,this)}}},Dt.prototype.createMultiPolygon=function(){if(arguments.length===0)return new mi(null,this);if(arguments.length===1){var t=arguments[0];return new mi(t,this)}},Dt.prototype.createMultiPoint=function(){var t=this;if(arguments.length===0)return new iu(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];return new iu(e,this)}else if(arguments[0]instanceof Array){var n=arguments[0];return this.createMultiPoint(n!==null?this.getCoordinateSequenceFactory().create(n):null)}else if(_t(arguments[0],Ft)){var i=arguments[0];if(i===null)return this.createMultiPoint(new Array(0).fill(null));for(var s=new Array(i.size()).fill(null),a=0;a<i.size();a++){var o=t.getCoordinateSequenceFactory().create(1,i.getDimension());ve.copy(i,a,o,0,1),s[a]=t.createPoint(o)}return this.createMultiPoint(s)}}},Dt.prototype.interfaces_=function(){return[$r]},Dt.prototype.getClass=function(){return Dt},Dt.toMultiPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},Dt.toGeometryArray=function(t){if(t===null)return null;var e=new Array(t.size()).fill(null);return t.toArray(e)},Dt.getDefaultCoordinateSequenceFactory=function(){return vi.instance()},Dt.toMultiLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},Dt.toLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},Dt.toMultiPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},Dt.toLinearRingArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},Dt.toPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},Dt.toPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},Dt.createPointFromInternalCoord=function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)},fg.serialVersionUID.get=function(){return-6820524753094096e3},Object.defineProperties(Dt,fg);var I_=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],fc=function(t){this.geometryFactory=t||new Dt};fc.prototype.read=function(t){var e;typeof t=="string"?e=JSON.parse(t):e=t;var n=e.type;if(!Yn[n])throw new Error("Unknown GeoJSON type: "+e.type);return I_.indexOf(n)!==-1?Yn[n].apply(this,[e.coordinates]):n==="GeometryCollection"?Yn[n].apply(this,[e.geometries]):Yn[n].apply(this,[e])},fc.prototype.write=function(t){var e=t.getGeometryType();if(!Hi[e])throw new Error("Geometry is not supported");return Hi[e].apply(this,[t])};var Yn={Feature:function(r){var t={};for(var e in r)t[e]=r[e];if(r.geometry){var n=r.geometry.type;if(!Yn[n])throw new Error("Unknown GeoJSON type: "+r.type);t.geometry=this.read(r.geometry)}return r.bbox&&(t.bbox=Yn.bbox.apply(this,[r.bbox])),t},FeatureCollection:function(r){var t=this,e={};if(r.features){e.features=[];for(var n=0;n<r.features.length;++n)e.features.push(t.read(r.features[n]))}return r.bbox&&(e.bbox=this.parse.bbox.apply(this,[r.bbox])),e},coordinates:function(r){for(var t=[],e=0;e<r.length;++e){var n=r[e];t.push(new L(n[0],n[1]))}return t},bbox:function(r){return this.geometryFactory.createLinearRing([new L(r[0],r[1]),new L(r[2],r[1]),new L(r[2],r[3]),new L(r[0],r[3]),new L(r[0],r[1])])},Point:function(r){var t=new L(r[0],r[1]);return this.geometryFactory.createPoint(t)},MultiPoint:function(r){for(var t=this,e=[],n=0;n<r.length;++n)e.push(Yn.Point.apply(t,[r[n]]));return this.geometryFactory.createMultiPoint(e)},LineString:function(r){var t=Yn.coordinates.apply(this,[r]);return this.geometryFactory.createLineString(t)},MultiLineString:function(r){for(var t=this,e=[],n=0;n<r.length;++n)e.push(Yn.LineString.apply(t,[r[n]]));return this.geometryFactory.createMultiLineString(e)},Polygon:function(r){for(var t=this,e=Yn.coordinates.apply(this,[r[0]]),n=this.geometryFactory.createLinearRing(e),i=[],s=1;s<r.length;++s){var a=r[s],o=Yn.coordinates.apply(t,[a]),l=t.geometryFactory.createLinearRing(o);i.push(l)}return this.geometryFactory.createPolygon(n,i)},MultiPolygon:function(r){for(var t=this,e=[],n=0;n<r.length;++n){var i=r[n];e.push(Yn.Polygon.apply(t,[i]))}return this.geometryFactory.createMultiPolygon(e)},GeometryCollection:function(r){for(var t=this,e=[],n=0;n<r.length;++n){var i=r[n];e.push(t.read(i))}return this.geometryFactory.createGeometryCollection(e)}},Hi={coordinate:function(r){return[r.x,r.y]},Point:function(r){var t=Hi.coordinate.apply(this,[r.getCoordinate()]);return{type:"Point",coordinates:t}},MultiPoint:function(r){for(var t=this,e=[],n=0;n<r._geometries.length;++n){var i=r._geometries[n],s=Hi.Point.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiPoint",coordinates:e}},LineString:function(r){for(var t=this,e=[],n=r.getCoordinates(),i=0;i<n.length;++i){var s=n[i];e.push(Hi.coordinate.apply(t,[s]))}return{type:"LineString",coordinates:e}},MultiLineString:function(r){for(var t=this,e=[],n=0;n<r._geometries.length;++n){var i=r._geometries[n],s=Hi.LineString.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiLineString",coordinates:e}},Polygon:function(r){var t=this,e=[],n=Hi.LineString.apply(this,[r._shell]);e.push(n.coordinates);for(var i=0;i<r._holes.length;++i){var s=r._holes[i],a=Hi.LineString.apply(t,[s]);e.push(a.coordinates)}return{type:"Polygon",coordinates:e}},MultiPolygon:function(r){for(var t=this,e=[],n=0;n<r._geometries.length;++n){var i=r._geometries[n],s=Hi.Polygon.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiPolygon",coordinates:e}},GeometryCollection:function(r){for(var t=this,e=[],n=0;n<r._geometries.length;++n){var i=r._geometries[n],s=i.getGeometryType();e.push(Hi[s].apply(t,[i]))}return{type:"GeometryCollection",geometries:e}}},Xf=function(t){this.geometryFactory=t||new Dt,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new fc(this.geometryFactory)};Xf.prototype.read=function(t){var e=this.parser.read(t);return this.precisionModel.getType()===Ut.FIXED&&this.reducePrecision(e),e},Xf.prototype.reducePrecision=function(t){var e=this,n,i;if(t.coordinate)this.precisionModel.makePrecise(t.coordinate);else if(t.points)for(n=0,i=t.points.length;n<i;n++)e.precisionModel.makePrecise(t.points[n]);else if(t.geometries)for(n=0,i=t.geometries.length;n<i;n++)e.reducePrecision(t.geometries[n])};var dg=function(){this.parser=new fc(this.geometryFactory)};dg.prototype.write=function(t){return this.parser.write(t)};var K=function(){},dc={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};K.prototype.interfaces_=function(){return[]},K.prototype.getClass=function(){return K},K.opposite=function(t){return t===K.LEFT?K.RIGHT:t===K.RIGHT?K.LEFT:t},dc.ON.get=function(){return 0},dc.LEFT.get=function(){return 1},dc.RIGHT.get=function(){return 2},Object.defineProperties(K,dc);function pc(r){this.message=r||""}pc.prototype=new Error,pc.prototype.name="EmptyStackException";function Jn(){this.array_=[]}Jn.prototype=new Pn,Jn.prototype.add=function(r){return this.array_.push(r),!0},Jn.prototype.get=function(r){if(r<0||r>=this.size())throw new Error;return this.array_[r]},Jn.prototype.push=function(r){return this.array_.push(r),r},Jn.prototype.pop=function(r){if(this.array_.length===0)throw new pc;return this.array_.pop()},Jn.prototype.peek=function(){if(this.array_.length===0)throw new pc;return this.array_[this.array_.length-1]},Jn.prototype.empty=function(){return this.array_.length===0},Jn.prototype.isEmpty=function(){return this.empty()},Jn.prototype.search=function(r){return this.array_.indexOf(r)},Jn.prototype.size=function(){return this.array_.length},Jn.prototype.toArray=function(){for(var r=this,t=[],e=0,n=this.array_.length;e<n;e++)t.push(r.array_[e]);return t};var Kn=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};Kn.prototype.getCoordinate=function(){return this._minCoord},Kn.prototype.getRightmostSide=function(t,e){var n=this.getRightmostSideOfSegment(t,e);return n<0&&(n=this.getRightmostSideOfSegment(t,e-1)),n<0&&(this._minCoord=null,this.checkForRightmostCoordinate(t)),n},Kn.prototype.findRightmostEdgeAtVertex=function(){var t=this._minDe.getEdge().getCoordinates();Mt.isTrue(this._minIndex>0&&this._minIndex<t.length,"rightmost point expected to be interior vertex of edge");var e=t[this._minIndex-1],n=t[this._minIndex+1],i=et.computeOrientation(this._minCoord,n,e),s=!1;(e.y<this._minCoord.y&&n.y<this._minCoord.y&&i===et.COUNTERCLOCKWISE||e.y>this._minCoord.y&&n.y>this._minCoord.y&&i===et.CLOCKWISE)&&(s=!0),s&&(this._minIndex=this._minIndex-1)},Kn.prototype.getRightmostSideOfSegment=function(t,e){var n=t.getEdge(),i=n.getCoordinates();if(e<0||e+1>=i.length||i[e].y===i[e+1].y)return-1;var s=K.LEFT;return i[e].y<i[e+1].y&&(s=K.RIGHT),s},Kn.prototype.getEdge=function(){return this._orientedDe},Kn.prototype.checkForRightmostCoordinate=function(t){for(var e=this,n=t.getEdge().getCoordinates(),i=0;i<n.length-1;i++)(e._minCoord===null||n[i].x>e._minCoord.x)&&(e._minDe=t,e._minIndex=i,e._minCoord=n[i])},Kn.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode(),e=t.getEdges();this._minDe=e.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},Kn.prototype.findEdge=function(t){for(var e=this,n=t.iterator();n.hasNext();){var i=n.next();i.isForward()&&e.checkForRightmostCoordinate(i)}Mt.isTrue(this._minIndex!==0||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),this._minIndex===0?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe;var s=this.getRightmostSide(this._minDe,this._minIndex);s===K.LEFT&&(this._orientedDe=this._minDe.getSym())},Kn.prototype.interfaces_=function(){return[]},Kn.prototype.getClass=function(){return Kn};var Xi=function(r){function t(e,n){r.call(this,t.msgWithCoord(e,n)),this.pt=n?new L(n):null,this.name="TopologyException"}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.getCoordinate=function(){return this.pt},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.msgWithCoord=function(n,i){return i?n:n+" [ "+i+" ]"},t}(zi),gc=function(){this.array_=[]};gc.prototype.addLast=function(t){this.array_.push(t)},gc.prototype.removeFirst=function(){return this.array_.shift()},gc.prototype.isEmpty=function(){return this.array_.length===0};var rr=function(){this._finder=null,this._dirEdgeList=new Z,this._nodes=new Z,this._rightMostCoord=null,this._env=null,this._finder=new Kn};rr.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.setVisited(!1)}},rr.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},rr.prototype.computeNodeDepth=function(t){for(var e=this,n=null,i=t.getEdges().iterator();i.hasNext();){var s=i.next();if(s.isVisited()||s.getSym().isVisited()){n=s;break}}if(n===null)throw new Xi("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(n);for(var a=t.getEdges().iterator();a.hasNext();){var o=a.next();o.setVisited(!0),e.copySymDepths(o)}},rr.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(K.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},rr.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},rr.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(K.RIGHT)>=1&&e.getDepth(K.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},rr.prototype.computeDepths=function(t){var e=this,n=new zf,i=new gc,s=t.getNode();for(i.addLast(s),n.add(s),t.setVisited(!0);!i.isEmpty();){var a=i.removeFirst();n.add(a),e.computeNodeDepth(a);for(var o=a.getEdges().iterator();o.hasNext();){var l=o.next(),u=l.getSym();if(!u.isVisited()){var c=u.getNode();n.contains(c)||(i.addLast(c),n.add(c))}}}},rr.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.x<e._rightMostCoord.x?-1:this._rightMostCoord.x>e._rightMostCoord.x?1:0},rr.prototype.getEnvelope=function(){if(this._env===null){for(var t=new dt,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next(),i=n.getEdge().getCoordinates(),s=0;s<i.length-1;s++)t.expandToInclude(i[s]);this._env=t}return this._env},rr.prototype.addReachable=function(t){var e=this,n=new Jn;for(n.add(t);!n.empty();){var i=n.pop();e.add(i,n)}},rr.prototype.copySymDepths=function(t){var e=t.getSym();e.setDepth(K.LEFT,t.getDepth(K.RIGHT)),e.setDepth(K.RIGHT,t.getDepth(K.LEFT))},rr.prototype.add=function(t,e){var n=this;t.setVisited(!0),this._nodes.add(t);for(var i=t.getEdges().iterator();i.hasNext();){var s=i.next();n._dirEdgeList.add(s);var a=s.getSym(),o=a.getNode();o.isVisited()||e.push(o)}},rr.prototype.getNodes=function(){return this._nodes},rr.prototype.getDirectedEdges=function(){return this._dirEdgeList},rr.prototype.interfaces_=function(){return[Zr]},rr.prototype.getClass=function(){return rr};var te=function r(){var t=this;if(this.location=null,arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];this.init(e.length)}else if(Number.isInteger(arguments[0])){var n=arguments[0];this.init(1),this.location[K.ON]=n}else if(arguments[0]instanceof r){var i=arguments[0];if(this.init(i.location.length),i!==null)for(var s=0;s<this.location.length;s++)t.location[s]=i.location[s]}}else if(arguments.length===3){var a=arguments[0],o=arguments[1],l=arguments[2];this.init(3),this.location[K.ON]=a,this.location[K.LEFT]=o,this.location[K.RIGHT]=l}};te.prototype.setAllLocations=function(t){for(var e=this,n=0;n<this.location.length;n++)e.location[n]=t},te.prototype.isNull=function(){for(var t=this,e=0;e<this.location.length;e++)if(t.location[e]!==F.NONE)return!1;return!0},te.prototype.setAllLocationsIfNull=function(t){for(var e=this,n=0;n<this.location.length;n++)e.location[n]===F.NONE&&(e.location[n]=t)},te.prototype.isLine=function(){return this.location.length===1},te.prototype.merge=function(t){var e=this;if(t.location.length>this.location.length){var n=new Array(3).fill(null);n[K.ON]=this.location[K.ON],n[K.LEFT]=F.NONE,n[K.RIGHT]=F.NONE,this.location=n}for(var i=0;i<this.location.length;i++)e.location[i]===F.NONE&&i<t.location.length&&(e.location[i]=t.location[i])},te.prototype.getLocations=function(){return this.location},te.prototype.flip=function(){if(this.location.length<=1)return null;var t=this.location[K.LEFT];this.location[K.LEFT]=this.location[K.RIGHT],this.location[K.RIGHT]=t},te.prototype.toString=function(){var t=new zn;return this.location.length>1&&t.append(F.toLocationSymbol(this.location[K.LEFT])),t.append(F.toLocationSymbol(this.location[K.ON])),this.location.length>1&&t.append(F.toLocationSymbol(this.location[K.RIGHT])),t.toString()},te.prototype.setLocations=function(t,e,n){this.location[K.ON]=t,this.location[K.LEFT]=e,this.location[K.RIGHT]=n},te.prototype.get=function(t){return t<this.location.length?this.location[t]:F.NONE},te.prototype.isArea=function(){return this.location.length>1},te.prototype.isAnyNull=function(){for(var t=this,e=0;e<this.location.length;e++)if(t.location[e]===F.NONE)return!0;return!1},te.prototype.setLocation=function(){if(arguments.length===1){var t=arguments[0];this.setLocation(K.ON,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.location[e]=n}},te.prototype.init=function(t){this.location=new Array(t).fill(null),this.setAllLocations(F.NONE)},te.prototype.isEqualOnSide=function(t,e){return this.location[e]===t.location[e]},te.prototype.allPositionsEqual=function(t){for(var e=this,n=0;n<this.location.length;n++)if(e.location[n]!==t)return!1;return!0},te.prototype.interfaces_=function(){return[]},te.prototype.getClass=function(){return te};var Jt=function r(){if(this.elt=new Array(2).fill(null),arguments.length===1){if(Number.isInteger(arguments[0])){var t=arguments[0];this.elt[0]=new te(t),this.elt[1]=new te(t)}else if(arguments[0]instanceof r){var e=arguments[0];this.elt[0]=new te(e.elt[0]),this.elt[1]=new te(e.elt[1])}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.elt[0]=new te(F.NONE),this.elt[1]=new te(F.NONE),this.elt[n].setLocation(i)}else if(arguments.length===3){var s=arguments[0],a=arguments[1],o=arguments[2];this.elt[0]=new te(s,a,o),this.elt[1]=new te(s,a,o)}else if(arguments.length===4){var l=arguments[0],u=arguments[1],c=arguments[2],h=arguments[3];this.elt[0]=new te(F.NONE,F.NONE,F.NONE),this.elt[1]=new te(F.NONE,F.NONE,F.NONE),this.elt[l].setLocations(u,c,h)}};Jt.prototype.getGeometryCount=function(){var t=0;return this.elt[0].isNull()||t++,this.elt[1].isNull()||t++,t},Jt.prototype.setAllLocations=function(t,e){this.elt[t].setAllLocations(e)},Jt.prototype.isNull=function(t){return this.elt[t].isNull()},Jt.prototype.setAllLocationsIfNull=function(){if(arguments.length===1){var t=arguments[0];this.setAllLocationsIfNull(0,t),this.setAllLocationsIfNull(1,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.elt[e].setAllLocationsIfNull(n)}},Jt.prototype.isLine=function(t){return this.elt[t].isLine()},Jt.prototype.merge=function(t){for(var e=this,n=0;n<2;n++)e.elt[n]===null&&t.elt[n]!==null?e.elt[n]=new te(t.elt[n]):e.elt[n].merge(t.elt[n])},Jt.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},Jt.prototype.getLocation=function(){if(arguments.length===1){var t=arguments[0];return this.elt[t].get(K.ON)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return this.elt[e].get(n)}},Jt.prototype.toString=function(){var t=new zn;return this.elt[0]!==null&&(t.append("A:"),t.append(this.elt[0].toString())),this.elt[1]!==null&&(t.append(" B:"),t.append(this.elt[1].toString())),t.toString()},Jt.prototype.isArea=function(){if(arguments.length===0)return this.elt[0].isArea()||this.elt[1].isArea();if(arguments.length===1){var t=arguments[0];return this.elt[t].isArea()}},Jt.prototype.isAnyNull=function(t){return this.elt[t].isAnyNull()},Jt.prototype.setLocation=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.elt[t].setLocation(K.ON,e)}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this.elt[n].setLocation(i,s)}},Jt.prototype.isEqualOnSide=function(t,e){return this.elt[0].isEqualOnSide(t.elt[0],e)&&this.elt[1].isEqualOnSide(t.elt[1],e)},Jt.prototype.allPositionsEqual=function(t,e){return this.elt[t].allPositionsEqual(e)},Jt.prototype.toLine=function(t){this.elt[t].isArea()&&(this.elt[t]=new te(this.elt[t].location[0]))},Jt.prototype.interfaces_=function(){return[]},Jt.prototype.getClass=function(){return Jt},Jt.toLineLabel=function(t){for(var e=new Jt(F.NONE),n=0;n<2;n++)e.setLocation(n,t.getLocation(n));return e};var Se=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new Z,this._pts=new Z,this._label=new Jt(F.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new Z,this._geometryFactory=null;var t=arguments[0],e=arguments[1];this._geometryFactory=e,this.computePoints(t),this.computeRing()};Se.prototype.computeRing=function(){var t=this;if(this._ring!==null)return null;for(var e=new Array(this._pts.size()).fill(null),n=0;n<this._pts.size();n++)e[n]=t._pts.get(n);this._ring=this._geometryFactory.createLinearRing(e),this._isHole=et.isCCW(this._ring.getCoordinates())},Se.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},Se.prototype.computePoints=function(t){var e=this;this._startDe=t;var n=t,i=!0;do{if(n===null)throw new Xi("Found null DirectedEdge");if(n.getEdgeRing()===e)throw new Xi("Directed Edge visited twice during ring-building at "+n.getCoordinate());e._edges.add(n);var s=n.getLabel();Mt.isTrue(s.isArea()),e.mergeLabel(s),e.addPoints(n.getEdge(),n.isForward(),i),i=!1,e.setEdgeRing(n,e),n=e.getNext(n)}while(n!==this._startDe)},Se.prototype.getLinearRing=function(){return this._ring},Se.prototype.getCoordinate=function(t){return this._pts.get(t)},Se.prototype.computeMaxNodeDegree=function(){var t=this;this._maxNodeDegree=0;var e=this._startDe;do{var n=e.getNode(),i=n.getEdges().getOutgoingDegree(t);i>t._maxNodeDegree&&(t._maxNodeDegree=i),e=t.getNext(e)}while(e!==this._startDe);this._maxNodeDegree*=2},Se.prototype.addPoints=function(t,e,n){var i=this,s=t.getCoordinates();if(e){var a=1;n&&(a=0);for(var o=a;o<s.length;o++)i._pts.add(s[o])}else{var l=s.length-2;n&&(l=s.length-1);for(var u=l;u>=0;u--)i._pts.add(s[u])}},Se.prototype.isHole=function(){return this._isHole},Se.prototype.setInResult=function(){var t=this._startDe;do t.getEdge().setInResult(!0),t=t.getNext();while(t!==this._startDe)},Se.prototype.containsPoint=function(t){var e=this.getLinearRing(),n=e.getEnvelopeInternal();if(!n.contains(t)||!et.isPointInRing(t,e.getCoordinates()))return!1;for(var i=this._holes.iterator();i.hasNext();){var s=i.next();if(s.containsPoint(t))return!1}return!0},Se.prototype.addHole=function(t){this._holes.add(t)},Se.prototype.isShell=function(){return this._shell===null},Se.prototype.getLabel=function(){return this._label},Se.prototype.getEdges=function(){return this._edges},Se.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},Se.prototype.getShell=function(){return this._shell},Se.prototype.mergeLabel=function(){if(arguments.length===1){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],i=e.getLocation(n,K.RIGHT);if(i===F.NONE)return null;if(this._label.getLocation(n)===F.NONE)return this._label.setLocation(n,i),null}},Se.prototype.setShell=function(t){this._shell=t,t!==null&&t.addHole(this)},Se.prototype.toPolygon=function(t){for(var e=this,n=new Array(this._holes.size()).fill(null),i=0;i<this._holes.size();i++)n[i]=e._holes.get(i).getLinearRing();var s=t.createPolygon(this.getLinearRing(),n);return s},Se.prototype.interfaces_=function(){return[]},Se.prototype.getClass=function(){return Se};var M_=function(r){function t(){var e=arguments[0],n=arguments[1];r.call(this,e,n)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.setEdgeRing=function(n,i){n.setMinEdgeRing(i)},t.prototype.getNext=function(n){return n.getNextMin()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Se),N_=function(r){function t(){var e=arguments[0],n=arguments[1];r.call(this,e,n)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.buildMinimalRings=function(){var n=this,i=new Z,s=this._startDe;do{if(s.getMinEdgeRing()===null){var a=new M_(s,n._geometryFactory);i.add(a)}s=s.getNext()}while(s!==this._startDe);return i},t.prototype.setEdgeRing=function(n,i){n.setEdgeRing(i)},t.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var n=this,i=this._startDe;do{var s=i.getNode();s.getEdges().linkMinimalDirectedEdges(n),i=i.getNext()}while(i!==this._startDe)},t.prototype.getNext=function(n){return n.getNext()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Se),kr=function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this._label=t}}};kr.prototype.setVisited=function(t){this._isVisited=t},kr.prototype.setInResult=function(t){this._isInResult=t},kr.prototype.isCovered=function(){return this._isCovered},kr.prototype.isCoveredSet=function(){return this._isCoveredSet},kr.prototype.setLabel=function(t){this._label=t},kr.prototype.getLabel=function(){return this._label},kr.prototype.setCovered=function(t){this._isCovered=t,this._isCoveredSet=!0},kr.prototype.updateIM=function(t){Mt.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(t)},kr.prototype.isInResult=function(){return this._isInResult},kr.prototype.isVisited=function(){return this._isVisited},kr.prototype.interfaces_=function(){return[]},kr.prototype.getClass=function(){return kr};var mc=function(r){function t(){r.call(this),this._coord=null,this._edges=null;var e=arguments[0],n=arguments[1];this._coord=e,this._edges=n,this._label=new Jt(0,F.NONE)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.isIncidentEdgeInResult=function(){for(var n=this.getEdges().getEdges().iterator();n.hasNext();){var i=n.next();if(i.getEdge().isInResult())return!0}return!1},t.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},t.prototype.getCoordinate=function(){return this._coord},t.prototype.print=function(n){n.println("node "+this._coord+" lbl: "+this._label)},t.prototype.computeIM=function(n){},t.prototype.computeMergedLocation=function(n,i){var s=F.NONE;if(s=this._label.getLocation(i),!n.isNull(i)){var a=n.getLocation(i);s!==F.BOUNDARY&&(s=a)}return s},t.prototype.setLabel=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1];this._label===null?this._label=new Jt(n,i):this._label.setLocation(n,i)}else return r.prototype.setLabel.apply(this,arguments)},t.prototype.getEdges=function(){return this._edges},t.prototype.mergeLabel=function(){var n=this;if(arguments[0]instanceof t){var i=arguments[0];this.mergeLabel(i._label)}else if(arguments[0]instanceof Jt)for(var s=arguments[0],a=0;a<2;a++){var o=n.computeMergedLocation(s,a),l=n._label.getLocation(a);l===F.NONE&&n._label.setLocation(a,o)}},t.prototype.add=function(n){this._edges.insert(n),n.setNode(this)},t.prototype.setLabelBoundary=function(n){if(this._label===null)return null;var i=F.NONE;this._label!==null&&(i=this._label.getLocation(n));var s=null;switch(i){case F.BOUNDARY:s=F.INTERIOR;break;case F.INTERIOR:s=F.BOUNDARY;break;default:s=F.BOUNDARY;break}this._label.setLocation(n,s)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(kr),Qn=function(){this.nodeMap=new Be,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};Qn.prototype.find=function(t){return this.nodeMap.get(t)},Qn.prototype.addNode=function(){if(arguments[0]instanceof L){var t=arguments[0],e=this.nodeMap.get(t);return e===null&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}else if(arguments[0]instanceof mc){var n=arguments[0],i=this.nodeMap.get(n.getCoordinate());return i===null?(this.nodeMap.put(n.getCoordinate(),n),n):(i.mergeLabel(n),i)}},Qn.prototype.print=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}},Qn.prototype.iterator=function(){return this.nodeMap.values().iterator()},Qn.prototype.values=function(){return this.nodeMap.values()},Qn.prototype.getBoundaryNodes=function(t){for(var e=new Z,n=this.iterator();n.hasNext();){var i=n.next();i.getLabel().getLocation(t)===F.BOUNDARY&&e.add(i)}return e},Qn.prototype.add=function(t){var e=t.getCoordinate(),n=this.addNode(e);n.add(t)},Qn.prototype.interfaces_=function(){return[]},Qn.prototype.getClass=function(){return Qn};var Qt=function(){},rh={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Qt.prototype.interfaces_=function(){return[]},Qt.prototype.getClass=function(){return Qt},Qt.isNorthern=function(t){return t===Qt.NE||t===Qt.NW},Qt.isOpposite=function(t,e){if(t===e)return!1;var n=(t-e+4)%4;return n===2},Qt.commonHalfPlane=function(t,e){if(t===e)return t;var n=(t-e+4)%4;if(n===2)return-1;var i=t<e?t:e,s=t>e?t:e;return i===0&&s===3?3:i},Qt.isInHalfPlane=function(t,e){return e===Qt.SE?t===Qt.SE||t===Qt.SW:t===e||t===e+1},Qt.quadrant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new oe("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?Qt.NE:Qt.SE:e>=0?Qt.NW:Qt.SW}else if(arguments[0]instanceof L&&arguments[1]instanceof L){var n=arguments[0],i=arguments[1];if(i.x===n.x&&i.y===n.y)throw new oe("Cannot compute the quadrant for two identical points "+n);return i.x>=n.x?i.y>=n.y?Qt.NE:Qt.SE:i.y>=n.y?Qt.NW:Qt.SW}},rh.NE.get=function(){return 0},rh.NW.get=function(){return 1},rh.SW.get=function(){return 2},rh.SE.get=function(){return 3},Object.defineProperties(Qt,rh);var Ze=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,arguments.length===1){var t=arguments[0];this._edge=t}else if(arguments.length===3){var e=arguments[0],n=arguments[1],i=arguments[2],s=null;this._edge=e,this.init(n,i),this._label=s}else if(arguments.length===4){var a=arguments[0],o=arguments[1],l=arguments[2],u=arguments[3];this._edge=a,this.init(o,l),this._label=u}};Ze.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant<t._quadrant?-1:et.computeOrientation(t._p0,t._p1,this._p1)},Ze.prototype.getDy=function(){return this._dy},Ze.prototype.getCoordinate=function(){return this._p0},Ze.prototype.setNode=function(t){this._node=t},Ze.prototype.print=function(t){var e=Math.atan2(this._dy,this._dx),n=this.getClass().getName(),i=n.lastIndexOf("."),s=n.substring(i+1);t.print(" "+s+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+" "+this._label)},Ze.prototype.compareTo=function(t){var e=t;return this.compareDirection(e)},Ze.prototype.getDirectedCoordinate=function(){return this._p1},Ze.prototype.getDx=function(){return this._dx},Ze.prototype.getLabel=function(){return this._label},Ze.prototype.getEdge=function(){return this._edge},Ze.prototype.getQuadrant=function(){return this._quadrant},Ze.prototype.getNode=function(){return this._node},Ze.prototype.toString=function(){var t=Math.atan2(this._dy,this._dx),e=this.getClass().getName(),n=e.lastIndexOf("."),i=e.substring(n+1);return" "+i+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+" "+this._label},Ze.prototype.computeLabel=function(t){},Ze.prototype.init=function(t,e){this._p0=t,this._p1=e,this._dx=e.x-t.x,this._dy=e.y-t.y,this._quadrant=Qt.quadrant(this._dx,this._dy),Mt.isTrue(!(this._dx===0&&this._dy===0),"EdgeEnd with identical endpoints found")},Ze.prototype.interfaces_=function(){return[Zr]},Ze.prototype.getClass=function(){return Ze};var Yf=function(r){function t(){var e=arguments[0],n=arguments[1];if(r.call(this,e),this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999],this._isForward=n,n)this.init(e.getCoordinate(0),e.getCoordinate(1));else{var i=e.getNumPoints()-1;this.init(e.getCoordinate(i),e.getCoordinate(i-1))}this.computeDirectedLabel()}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.getNextMin=function(){return this._nextMin},t.prototype.getDepth=function(n){return this._depth[n]},t.prototype.setVisited=function(n){this._isVisited=n},t.prototype.computeDirectedLabel=function(){this._label=new Jt(this._edge.getLabel()),this._isForward||this._label.flip()},t.prototype.getNext=function(){return this._next},t.prototype.setDepth=function(n,i){if(this._depth[n]!==-999&&this._depth[n]!==i)throw new Xi("assigned depths do not match",this.getCoordinate());this._depth[n]=i},t.prototype.isInteriorAreaEdge=function(){for(var n=this,i=!0,s=0;s<2;s++)n._label.isArea(s)&&n._label.getLocation(s,K.LEFT)===F.INTERIOR&&n._label.getLocation(s,K.RIGHT)===F.INTERIOR||(i=!1);return i},t.prototype.setNextMin=function(n){this._nextMin=n},t.prototype.print=function(n){r.prototype.print.call(this,n),n.print(" "+this._depth[K.LEFT]+"/"+this._depth[K.RIGHT]),n.print(" ("+this.getDepthDelta()+")"),this._isInResult&&n.print(" inResult")},t.prototype.setMinEdgeRing=function(n){this._minEdgeRing=n},t.prototype.isLineEdge=function(){var n=this._label.isLine(0)||this._label.isLine(1),i=!this._label.isArea(0)||this._label.allPositionsEqual(0,F.EXTERIOR),s=!this._label.isArea(1)||this._label.allPositionsEqual(1,F.EXTERIOR);return n&&i&&s},t.prototype.setEdgeRing=function(n){this._edgeRing=n},t.prototype.getMinEdgeRing=function(){return this._minEdgeRing},t.prototype.getDepthDelta=function(){var n=this._edge.getDepthDelta();return this._isForward||(n=-n),n},t.prototype.setInResult=function(n){this._isInResult=n},t.prototype.getSym=function(){return this._sym},t.prototype.isForward=function(){return this._isForward},t.prototype.getEdge=function(){return this._edge},t.prototype.printEdge=function(n){this.print(n),n.print(" "),this._isForward?this._edge.print(n):this._edge.printReverse(n)},t.prototype.setSym=function(n){this._sym=n},t.prototype.setVisitedEdge=function(n){this.setVisited(n),this._sym.setVisited(n)},t.prototype.setEdgeDepths=function(n,i){var s=this.getEdge().getDepthDelta();this._isForward||(s=-s);var a=1;n===K.LEFT&&(a=-1);var o=K.opposite(n),l=s*a,u=i+l;this.setDepth(n,i),this.setDepth(o,u)},t.prototype.getEdgeRing=function(){return this._edgeRing},t.prototype.isInResult=function(){return this._isInResult},t.prototype.setNext=function(n){this._next=n},t.prototype.isVisited=function(){return this._isVisited},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.depthFactor=function(n,i){return n===F.EXTERIOR&&i===F.INTERIOR?1:n===F.INTERIOR&&i===F.EXTERIOR?-1:0},t}(Ze),su=function(){};su.prototype.createNode=function(t){return new mc(t,null)},su.prototype.interfaces_=function(){return[]},su.prototype.getClass=function(){return su};var fe=function(){if(this._edges=new Z,this._nodes=null,this._edgeEndList=new Z,arguments.length===0)this._nodes=new Qn(new su);else if(arguments.length===1){var t=arguments[0];this._nodes=new Qn(t)}};fe.prototype.printEdges=function(t){var e=this;t.println("Edges:");for(var n=0;n<this._edges.size();n++){t.println("edge "+n+":");var i=e._edges.get(n);i.print(t),i.eiList.print(t)}},fe.prototype.find=function(t){return this._nodes.find(t)},fe.prototype.addNode=function(){if(arguments[0]instanceof mc){var t=arguments[0];return this._nodes.addNode(t)}else if(arguments[0]instanceof L){var e=arguments[0];return this._nodes.addNode(e)}},fe.prototype.getNodeIterator=function(){return this._nodes.iterator()},fe.prototype.linkResultDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){var e=t.next();e.getEdges().linkResultDirectedEdges()}},fe.prototype.debugPrintln=function(t){Ve.out.println(t)},fe.prototype.isBoundaryNode=function(t,e){var n=this._nodes.find(e);if(n===null)return!1;var i=n.getLabel();return i!==null&&i.getLocation(t)===F.BOUNDARY},fe.prototype.linkAllDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){var e=t.next();e.getEdges().linkAllDirectedEdges()}},fe.prototype.matchInSameDirection=function(t,e,n,i){return t.equals(n)?et.computeOrientation(t,e,i)===et.COLLINEAR&&Qt.quadrant(t,e)===Qt.quadrant(n,i):!1},fe.prototype.getEdgeEnds=function(){return this._edgeEndList},fe.prototype.debugPrint=function(t){Ve.out.print(t)},fe.prototype.getEdgeIterator=function(){return this._edges.iterator()},fe.prototype.findEdgeInSameDirection=function(t,e){for(var n=this,i=0;i<this._edges.size();i++){var s=n._edges.get(i),a=s.getCoordinates();if(n.matchInSameDirection(t,e,a[0],a[1])||n.matchInSameDirection(t,e,a[a.length-1],a[a.length-2]))return s}return null},fe.prototype.insertEdge=function(t){this._edges.add(t)},fe.prototype.findEdgeEnd=function(t){for(var e=this.getEdgeEnds().iterator();e.hasNext();){var n=e.next();if(n.getEdge()===t)return n}return null},fe.prototype.addEdges=function(t){for(var e=this,n=t.iterator();n.hasNext();){var i=n.next();e._edges.add(i);var s=new Yf(i,!0),a=new Yf(i,!1);s.setSym(a),a.setSym(s),e.add(s),e.add(a)}},fe.prototype.add=function(t){this._nodes.add(t),this._edgeEndList.add(t)},fe.prototype.getNodes=function(){return this._nodes.values()},fe.prototype.findEdge=function(t,e){for(var n=this,i=0;i<this._edges.size();i++){var s=n._edges.get(i),a=s.getCoordinates();if(t.equals(a[0])&&e.equals(a[1]))return s}return null},fe.prototype.interfaces_=function(){return[]},fe.prototype.getClass=function(){return fe},fe.linkResultDirectedEdges=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.getEdges().linkResultDirectedEdges()}};var Nr=function(){this._geometryFactory=null,this._shellList=new Z;var t=arguments[0];this._geometryFactory=t};Nr.prototype.sortShellsAndHoles=function(t,e,n){for(var i=t.iterator();i.hasNext();){var s=i.next();s.isHole()?n.add(s):e.add(s)}},Nr.prototype.computePolygons=function(t){for(var e=this,n=new Z,i=t.iterator();i.hasNext();){var s=i.next(),a=s.toPolygon(e._geometryFactory);n.add(a)}return n},Nr.prototype.placeFreeHoles=function(t,e){for(var n=this,i=e.iterator();i.hasNext();){var s=i.next();if(s.getShell()===null){var a=n.findEdgeRingContaining(s,t);if(a===null)throw new Xi("unable to assign hole to a shell",s.getCoordinate(0));s.setShell(a)}}},Nr.prototype.buildMinimalEdgeRings=function(t,e,n){for(var i=this,s=new Z,a=t.iterator();a.hasNext();){var o=a.next();if(o.getMaxNodeDegree()>2){o.linkDirectedEdgesForMinimalEdgeRings();var l=o.buildMinimalRings(),u=i.findShell(l);u!==null?(i.placePolygonHoles(u,l),e.add(u)):n.addAll(l)}else s.add(o)}return s},Nr.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();){var n=e.next();if(n.containsPoint(t))return!0}return!1},Nr.prototype.buildMaximalEdgeRings=function(t){for(var e=this,n=new Z,i=t.iterator();i.hasNext();){var s=i.next();if(s.isInResult()&&s.getLabel().isArea()&&s.getEdgeRing()===null){var a=new N_(s,e._geometryFactory);n.add(a),a.setInResult()}}return n},Nr.prototype.placePolygonHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next();i.isHole()&&i.setShell(t)}},Nr.prototype.getPolygons=function(){var t=this.computePolygons(this._shellList);return t},Nr.prototype.findEdgeRingContaining=function(t,e){for(var n=t.getLinearRing(),i=n.getEnvelopeInternal(),s=n.getCoordinateN(0),a=null,o=null,l=e.iterator();l.hasNext();){var u=l.next(),c=u.getLinearRing(),h=c.getEnvelopeInternal();a!==null&&(o=a.getLinearRing().getEnvelopeInternal());var f=!1;h.contains(i)&&et.isPointInRing(s,c.getCoordinates())&&(f=!0),f&&(a===null||o.contains(h))&&(a=u)}return a},Nr.prototype.findShell=function(t){for(var e=0,n=null,i=t.iterator();i.hasNext();){var s=i.next();s.isHole()||(n=s,e++)}return Mt.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),n},Nr.prototype.add=function(){if(arguments.length===1){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(arguments.length===2){var e=arguments[0],n=arguments[1];fe.linkResultDirectedEdges(n);var i=this.buildMaximalEdgeRings(e),s=new Z,a=this.buildMinimalEdgeRings(i,this._shellList,s);this.sortShellsAndHoles(a,this._shellList,s),this.placeFreeHoles(this._shellList,s)}},Nr.prototype.interfaces_=function(){return[]},Nr.prototype.getClass=function(){return Nr};var au=function(){};au.prototype.getBounds=function(){},au.prototype.interfaces_=function(){return[]},au.prototype.getClass=function(){return au};var Mn=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};Mn.prototype.getItem=function(){return this._item},Mn.prototype.getBounds=function(){return this._bounds},Mn.prototype.interfaces_=function(){return[au,$r]},Mn.prototype.getClass=function(){return Mn};var Yi=function(){this._size=null,this._items=null,this._size=0,this._items=new Z,this._items.add(null)};Yi.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},Yi.prototype.size=function(){return this._size},Yi.prototype.reorder=function(t){for(var e=this,n=null,i=this._items.get(t);t*2<=this._size&&(n=t*2,n!==e._size&&e._items.get(n+1).compareTo(e._items.get(n))<0&&n++,e._items.get(n).compareTo(i)<0);t=n)e._items.set(t,e._items.get(n));this._items.set(t,i)},Yi.prototype.clear=function(){this._size=0,this._items.clear()},Yi.prototype.isEmpty=function(){return this._size===0},Yi.prototype.add=function(t){var e=this;this._items.add(null),this._size+=1;var n=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(n/2)))<0;n/=2)e._items.set(n,e._items.get(Math.trunc(n/2)));this._items.set(n,t)},Yi.prototype.interfaces_=function(){return[]},Yi.prototype.getClass=function(){return Yi};var _s=function(){};_s.prototype.visitItem=function(t){},_s.prototype.interfaces_=function(){return[]},_s.prototype.getClass=function(){return _s};var Va=function(){};Va.prototype.insert=function(t,e){},Va.prototype.remove=function(t,e){},Va.prototype.query=function(){},Va.prototype.interfaces_=function(){return[]},Va.prototype.getClass=function(){return Va};var be=function(){if(this._childBoundables=new Z,this._bounds=null,this._level=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this._level=t}}},pg={serialVersionUID:{configurable:!0}};be.prototype.getLevel=function(){return this._level},be.prototype.size=function(){return this._childBoundables.size()},be.prototype.getChildBoundables=function(){return this._childBoundables},be.prototype.addChildBoundable=function(t){Mt.isTrue(this._bounds===null),this._childBoundables.add(t)},be.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},be.prototype.getBounds=function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds},be.prototype.interfaces_=function(){return[au,$r]},be.prototype.getClass=function(){return be},pg.serialVersionUID.get=function(){return 6493722185909574e3},Object.defineProperties(be,pg);var Nn=function(){};Nn.reverseOrder=function(){return{compare:function(e,n){return n.compareTo(e)}}},Nn.min=function(t){return Nn.sort(t),t.get(0)},Nn.sort=function(t,e){var n=t.toArray();e?js.sort(n,e):js.sort(n);for(var i=t.iterator(),s=0,a=n.length;s<a;s++)i.next(),i.set(n[s])},Nn.singletonList=function(t){var e=new Z;return e.add(t),e};var Pe=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var t=arguments[0],e=arguments[1],n=arguments[2];this._boundable1=t,this._boundable2=e,this._itemDistance=n,this._distance=this.distance()};Pe.prototype.expandToQueue=function(t,e){var n=Pe.isComposite(this._boundable1),i=Pe.isComposite(this._boundable2);if(n&&i)return Pe.area(this._boundable1)>Pe.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(n)return this.expand(this._boundable1,this._boundable2,t,e),null;if(i)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new oe("neither boundable is composite")},Pe.prototype.isLeaves=function(){return!(Pe.isComposite(this._boundable1)||Pe.isComposite(this._boundable2))},Pe.prototype.compareTo=function(t){var e=t;return this._distance<e._distance?-1:this._distance>e._distance?1:0},Pe.prototype.expand=function(t,e,n,i){for(var s=this,a=t.getChildBoundables(),o=a.iterator();o.hasNext();){var l=o.next(),u=new Pe(l,e,s._itemDistance);u.getDistance()<i&&n.add(u)}},Pe.prototype.getBoundable=function(t){return t===0?this._boundable1:this._boundable2},Pe.prototype.getDistance=function(){return this._distance},Pe.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},Pe.prototype.interfaces_=function(){return[Zr]},Pe.prototype.getClass=function(){return Pe},Pe.area=function(t){return t.getBounds().getArea()},Pe.isComposite=function(t){return t instanceof be};var Oe=function r(){if(this._root=null,this._built=!1,this._itemBoundables=new Z,this._nodeCapacity=null,arguments.length===0){var t=r.DEFAULT_NODE_CAPACITY;this._nodeCapacity=t}else if(arguments.length===1){var e=arguments[0];Mt.isTrue(e>1,"Node capacity must be greater than 1"),this._nodeCapacity=e}},vc={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};Oe.prototype.getNodeCapacity=function(){return this._nodeCapacity},Oe.prototype.lastNode=function(t){return t.get(t.size()-1)},Oe.prototype.size=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.size(this._root));if(arguments.length===1){for(var e=arguments[0],n=0,i=e.getChildBoundables().iterator();i.hasNext();){var s=i.next();s instanceof be?n+=t.size(s):s instanceof Mn&&(n+=1)}return n}},Oe.prototype.removeItem=function(t,e){for(var n=null,i=t.getChildBoundables().iterator();i.hasNext();){var s=i.next();s instanceof Mn&&s.getItem()===e&&(n=s)}return n!==null?(t.getChildBoundables().remove(n),!0):!1},Oe.prototype.itemsTree=function(){var t=this;if(arguments.length===0){this.build();var e=this.itemsTree(this._root);return e===null?new Z:e}else if(arguments.length===1){for(var n=arguments[0],i=new Z,s=n.getChildBoundables().iterator();s.hasNext();){var a=s.next();if(a instanceof be){var o=t.itemsTree(a);o!==null&&i.add(o)}else a instanceof Mn?i.add(a.getItem()):Mt.shouldNeverReachHere()}return i.size()<=0?null:i}},Oe.prototype.insert=function(t,e){Mt.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new Mn(t,e))},Oe.prototype.boundablesAtLevel=function(){var t=this;if(arguments.length===1){var e=arguments[0],n=new Z;return this.boundablesAtLevel(e,this._root,n),n}else if(arguments.length===3){var i=arguments[0],s=arguments[1],a=arguments[2];if(Mt.isTrue(i>-2),s.getLevel()===i)return a.add(s),null;for(var o=s.getChildBoundables().iterator();o.hasNext();){var l=o.next();l instanceof be?t.boundablesAtLevel(i,l,a):(Mt.isTrue(l instanceof Mn),i===-1&&a.add(l))}return null}},Oe.prototype.query=function(){var t=this;if(arguments.length===1){var e=arguments[0];this.build();var n=new Z;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.query(e,this._root,n),n}else if(arguments.length===2){var i=arguments[0],s=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),i)&&this.query(i,this._root,s)}else if(arguments.length===3){if(_t(arguments[2],_s)&&arguments[0]instanceof Object&&arguments[1]instanceof be)for(var a=arguments[0],o=arguments[1],l=arguments[2],u=o.getChildBoundables(),c=0;c<u.size();c++){var h=u.get(c);t.getIntersectsOp().intersects(h.getBounds(),a)&&(h instanceof be?t.query(a,h,l):h instanceof Mn?l.visitItem(h.getItem()):Mt.shouldNeverReachHere())}else if(_t(arguments[2],Pn)&&arguments[0]instanceof Object&&arguments[1]instanceof be)for(var f=arguments[0],g=arguments[1],m=arguments[2],_=g.getChildBoundables(),E=0;E<_.size();E++){var M=_.get(E);t.getIntersectsOp().intersects(M.getBounds(),f)&&(M instanceof be?t.query(f,M,m):M instanceof Mn?m.add(M.getItem()):Mt.shouldNeverReachHere())}}},Oe.prototype.build=function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0},Oe.prototype.getRoot=function(){return this.build(),this._root},Oe.prototype.remove=function(){var t=this;if(arguments.length===2){var e=arguments[0],n=arguments[1];return this.build(),this.getIntersectsOp().intersects(this._root.getBounds(),e)?this.remove(e,this._root,n):!1}else if(arguments.length===3){var i=arguments[0],s=arguments[1],a=arguments[2],o=this.removeItem(s,a);if(o)return!0;for(var l=null,u=s.getChildBoundables().iterator();u.hasNext();){var c=u.next();if(t.getIntersectsOp().intersects(c.getBounds(),i)&&c instanceof be&&(o=t.remove(i,c,a),o)){l=c;break}}return l!==null&&l.getChildBoundables().isEmpty()&&s.getChildBoundables().remove(l),o}},Oe.prototype.createHigherLevels=function(t,e){Mt.isTrue(!t.isEmpty());var n=this.createParentBoundables(t,e+1);return n.size()===1?n.get(0):this.createHigherLevels(n,e+1)},Oe.prototype.depth=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(arguments.length===1){for(var e=arguments[0],n=0,i=e.getChildBoundables().iterator();i.hasNext();){var s=i.next();if(s instanceof be){var a=t.depth(s);a>n&&(n=a)}}return n+1}},Oe.prototype.createParentBoundables=function(t,e){var n=this;Mt.isTrue(!t.isEmpty());var i=new Z;i.add(this.createNode(e));var s=new Z(t);Nn.sort(s,this.getComparator());for(var a=s.iterator();a.hasNext();){var o=a.next();n.lastNode(i).getChildBoundables().size()===n.getNodeCapacity()&&i.add(n.createNode(e)),n.lastNode(i).addChildBoundable(o)}return i},Oe.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},Oe.prototype.interfaces_=function(){return[$r]},Oe.prototype.getClass=function(){return Oe},Oe.compareDoubles=function(t,e){return t>e?1:t<e?-1:0},vc.IntersectsOp.get=function(){return b_},vc.serialVersionUID.get=function(){return-3886435814360241e3},vc.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(Oe,vc);var b_=function(){},ou=function(){};ou.prototype.distance=function(t,e){},ou.prototype.interfaces_=function(){return[]},ou.prototype.getClass=function(){return ou};var gg=function(r){function t(n){n=n||t.DEFAULT_NODE_CAPACITY,r.call(this,n)}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return t.prototype.createParentBoundablesFromVerticalSlices=function(i,s){var a=this;Mt.isTrue(i.length>0);for(var o=new Z,l=0;l<i.length;l++)o.addAll(a.createParentBoundablesFromVerticalSlice(i[l],s));return o},t.prototype.createNode=function(i){return new mg(i)},t.prototype.size=function(){return arguments.length===0?r.prototype.size.call(this):r.prototype.size.apply(this,arguments)},t.prototype.insert=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];if(i.isNull())return null;r.prototype.insert.call(this,i,s)}else return r.prototype.insert.apply(this,arguments)},t.prototype.getIntersectsOp=function(){return t.intersectsOp},t.prototype.verticalSlices=function(i,s){for(var a=Math.trunc(Math.ceil(i.size()/s)),o=new Array(s).fill(null),l=i.iterator(),u=0;u<s;u++){o[u]=new Z;for(var c=0;l.hasNext()&&c<a;){var h=l.next();o[u].add(h),c++}}return o},t.prototype.query=function(){if(arguments.length===1){var i=arguments[0];return r.prototype.query.call(this,i)}else if(arguments.length===2){var s=arguments[0],a=arguments[1];r.prototype.query.call(this,s,a)}else if(arguments.length===3){if(_t(arguments[2],_s)&&arguments[0]instanceof Object&&arguments[1]instanceof be){var o=arguments[0],l=arguments[1],u=arguments[2];r.prototype.query.call(this,o,l,u)}else if(_t(arguments[2],Pn)&&arguments[0]instanceof Object&&arguments[1]instanceof be){var c=arguments[0],h=arguments[1],f=arguments[2];r.prototype.query.call(this,c,h,f)}}},t.prototype.getComparator=function(){return t.yComparator},t.prototype.createParentBoundablesFromVerticalSlice=function(i,s){return r.prototype.createParentBoundables.call(this,i,s)},t.prototype.remove=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return r.prototype.remove.call(this,i,s)}else return r.prototype.remove.apply(this,arguments)},t.prototype.depth=function(){return arguments.length===0?r.prototype.depth.call(this):r.prototype.depth.apply(this,arguments)},t.prototype.createParentBoundables=function(i,s){Mt.isTrue(!i.isEmpty());var a=Math.trunc(Math.ceil(i.size()/this.getNodeCapacity())),o=new Z(i);Nn.sort(o,t.xComparator);var l=this.verticalSlices(o,Math.trunc(Math.ceil(Math.sqrt(a))));return this.createParentBoundablesFromVerticalSlices(l,s)},t.prototype.nearestNeighbour=function(){if(arguments.length===1){if(_t(arguments[0],ou)){var i=arguments[0],s=new Pe(this.getRoot(),this.getRoot(),i);return this.nearestNeighbour(s)}else if(arguments[0]instanceof Pe){var a=arguments[0];return this.nearestNeighbour(a,wt.POSITIVE_INFINITY)}}else if(arguments.length===2){if(arguments[0]instanceof t&&_t(arguments[1],ou)){var o=arguments[0],l=arguments[1],u=new Pe(this.getRoot(),o.getRoot(),l);return this.nearestNeighbour(u)}else if(arguments[0]instanceof Pe&&typeof arguments[1]=="number"){var c=arguments[0],h=arguments[1],f=h,g=null,m=new Yi;for(m.add(c);!m.isEmpty()&&f>0;){var _=m.poll(),E=_.getDistance();if(E>=f)break;_.isLeaves()?(f=E,g=_):_.expandToQueue(m,f)}return[g.getBoundable(0).getItem(),g.getBoundable(1).getItem()]}}else if(arguments.length===3){var M=arguments[0],y=arguments[1],w=arguments[2],v=new Mn(M,y),S=new Pe(this.getRoot(),v,w);return this.nearestNeighbour(S)[0]}},t.prototype.interfaces_=function(){return[Va,$r]},t.prototype.getClass=function(){return t},t.centreX=function(i){return t.avg(i.getMinX(),i.getMaxX())},t.avg=function(i,s){return(i+s)/2},t.centreY=function(i){return t.avg(i.getMinY(),i.getMaxY())},e.STRtreeNode.get=function(){return mg},e.serialVersionUID.get=function(){return 0x39920f7d5f261e0},e.xComparator.get=function(){return{interfaces_:function(){return[Jl]},compare:function(n,i){return r.compareDoubles(t.centreX(n.getBounds()),t.centreX(i.getBounds()))}}},e.yComparator.get=function(){return{interfaces_:function(){return[Jl]},compare:function(n,i){return r.compareDoubles(t.centreY(n.getBounds()),t.centreY(i.getBounds()))}}},e.intersectsOp.get=function(){return{interfaces_:function(){return[r.IntersectsOp]},intersects:function(n,i){return n.intersects(i)}}},e.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(t,e),t}(Oe),mg=function(r){function t(){var e=arguments[0];r.call(this,e)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.computeBounds=function(){for(var n=null,i=this.getChildBoundables().iterator();i.hasNext();){var s=i.next();n===null?n=new dt(s.getBounds()):n.expandToInclude(s.getBounds())}return n},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(be),fr=function(){};fr.prototype.interfaces_=function(){return[]},fr.prototype.getClass=function(){return fr},fr.relativeSign=function(t,e){return t<e?-1:t>e?1:0},fr.compare=function(t,e,n){if(e.equals2D(n))return 0;var i=fr.relativeSign(e.x,n.x),s=fr.relativeSign(e.y,n.y);switch(t){case 0:return fr.compareValue(i,s);case 1:return fr.compareValue(s,i);case 2:return fr.compareValue(s,-i);case 3:return fr.compareValue(-i,s);case 4:return fr.compareValue(-i,-s);case 5:return fr.compareValue(-s,-i);case 6:return fr.compareValue(-s,i);case 7:return fr.compareValue(i,-s)}return Mt.shouldNeverReachHere("invalid octant value"),0},fr.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var ws=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._segString=t,this.coord=new L(e),this.segmentIndex=n,this._segmentOctant=i,this._isInterior=!e.equals2D(t.getCoordinate(n))};ws.prototype.getCoordinate=function(){return this.coord},ws.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},ws.prototype.compareTo=function(t){var e=t;return this.segmentIndex<e.segmentIndex?-1:this.segmentIndex>e.segmentIndex?1:this.coord.equals2D(e.coord)?0:fr.compare(this._segmentOctant,this.coord,e.coord)},ws.prototype.isEndPoint=function(t){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===t},ws.prototype.isInterior=function(){return this._isInterior},ws.prototype.interfaces_=function(){return[Zr]},ws.prototype.getClass=function(){return ws};var nr=function(){this._nodeMap=new Be,this._edge=null;var t=arguments[0];this._edge=t};nr.prototype.getSplitCoordinates=function(){var t=this,e=new Ku;this.addEndpoints();for(var n=this.iterator(),i=n.next();n.hasNext();){var s=n.next();t.addEdgeCoordinates(i,s,e),i=s}return e.toCoordinateArray()},nr.prototype.addCollapsedNodes=function(){var t=this,e=new Z;this.findCollapsesFromInsertedNodes(e),this.findCollapsesFromExistingVertices(e);for(var n=e.iterator();n.hasNext();){var i=n.next().intValue();t.add(t._edge.getCoordinate(i),i)}},nr.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}},nr.prototype.findCollapsesFromExistingVertices=function(t){for(var e=this,n=0;n<this._edge.size()-2;n++){var i=e._edge.getCoordinate(n),s=e._edge.getCoordinate(n+2);i.equals2D(s)&&t.add(new Vn(n+1))}},nr.prototype.addEdgeCoordinates=function(t,e,n){var i=this,s=this._edge.getCoordinate(e.segmentIndex),a=e.isInterior()||!e.coord.equals2D(s);n.add(new L(t.coord),!1);for(var o=t.segmentIndex+1;o<=e.segmentIndex;o++)n.add(i._edge.getCoordinate(o));a&&n.add(new L(e.coord))},nr.prototype.iterator=function(){return this._nodeMap.values().iterator()},nr.prototype.addSplitEdges=function(t){var e=this;this.addEndpoints(),this.addCollapsedNodes();for(var n=this.iterator(),i=n.next();n.hasNext();){var s=n.next(),a=e.createSplitEdge(i,s);t.add(a),i=s}},nr.prototype.findCollapseIndex=function(t,e,n){if(!t.coord.equals2D(e.coord))return!1;var i=e.segmentIndex-t.segmentIndex;return e.isInterior()||i--,i===1?(n[0]=t.segmentIndex+1,!0):!1},nr.prototype.findCollapsesFromInsertedNodes=function(t){for(var e=this,n=new Array(1).fill(null),i=this.iterator(),s=i.next();i.hasNext();){var a=i.next(),o=e.findCollapseIndex(s,a,n);o&&t.add(new Vn(n[0])),s=a}},nr.prototype.getEdge=function(){return this._edge},nr.prototype.addEndpoints=function(){var t=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(t),t)},nr.prototype.createSplitEdge=function(t,e){var n=this,i=e.segmentIndex-t.segmentIndex+2,s=this._edge.getCoordinate(e.segmentIndex),a=e.isInterior()||!e.coord.equals2D(s);a||i--;var o=new Array(i).fill(null),l=0;o[l++]=new L(t.coord);for(var u=t.segmentIndex+1;u<=e.segmentIndex;u++)o[l++]=n._edge.getCoordinate(u);return a&&(o[l]=new L(e.coord)),new _e(o,this._edge.getData())},nr.prototype.add=function(t,e){var n=new ws(this._edge,t,e,this._edge.getSegmentOctant(e)),i=this._nodeMap.get(n);return i!==null?(Mt.isTrue(i.coord.equals2D(t),"Found equal nodes with different coordinates"),i):(this._nodeMap.put(n,n),n)},nr.prototype.checkSplitEdgesCorrectness=function(t){var e=this._edge.getCoordinates(),n=t.get(0),i=n.getCoordinate(0);if(!i.equals2D(e[0]))throw new zi("bad split edge start point at "+i);var s=t.get(t.size()-1),a=s.getCoordinates(),o=a[a.length-1];if(!o.equals2D(e[e.length-1]))throw new zi("bad split edge end point at "+o)},nr.prototype.interfaces_=function(){return[]},nr.prototype.getClass=function(){return nr};var Ua=function(){};Ua.prototype.interfaces_=function(){return[]},Ua.prototype.getClass=function(){return Ua},Ua.octant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new oe("Cannot compute the octant for point ( "+t+", "+e+" )");var n=Math.abs(t),i=Math.abs(e);return t>=0?e>=0?n>=i?0:1:n>=i?7:6:e>=0?n>=i?3:2:n>=i?4:5}else if(arguments[0]instanceof L&&arguments[1]instanceof L){var s=arguments[0],a=arguments[1],o=a.x-s.x,l=a.y-s.y;if(o===0&&l===0)throw new oe("Cannot compute the octant for two identical points "+s);return Ua.octant(o,l)}};var yi=function(){};yi.prototype.getCoordinates=function(){},yi.prototype.size=function(){},yi.prototype.getCoordinate=function(t){},yi.prototype.isClosed=function(){},yi.prototype.setData=function(t){},yi.prototype.getData=function(){},yi.prototype.interfaces_=function(){return[]},yi.prototype.getClass=function(){return yi};var nh=function(){};nh.prototype.addIntersection=function(t,e){},nh.prototype.interfaces_=function(){return[yi]},nh.prototype.getClass=function(){return nh};var _e=function(){this._nodeList=new nr(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};_e.prototype.getCoordinates=function(){return this._pts},_e.prototype.size=function(){return this._pts.length},_e.prototype.getCoordinate=function(t){return this._pts[t]},_e.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},_e.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},_e.prototype.setData=function(t){this._data=t},_e.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:Ua.octant(t,e)},_e.prototype.getData=function(){return this._data},_e.prototype.addIntersection=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(arguments.length===4){var n=arguments[0],i=arguments[1],s=arguments[3],a=new L(n.getIntersection(s));this.addIntersection(a,i)}},_e.prototype.toString=function(){return Sn.toLineString(new ye(this._pts))},_e.prototype.getNodeList=function(){return this._nodeList},_e.prototype.addIntersectionNode=function(t,e){var n=e,i=n+1;if(i<this._pts.length){var s=this._pts[i];t.equals2D(s)&&(n=i)}var a=this._nodeList.add(t,n);return a},_e.prototype.addIntersections=function(t,e,n){for(var i=this,s=0;s<t.getIntersectionNum();s++)i.addIntersection(t,e,n,s)},_e.prototype.interfaces_=function(){return[nh]},_e.prototype.getClass=function(){return _e},_e.getNodedSubstrings=function(){if(arguments.length===1){var t=arguments[0],e=new Z;return _e.getNodedSubstrings(t,e),e}else if(arguments.length===2)for(var n=arguments[0],i=arguments[1],s=n.iterator();s.hasNext();){var a=s.next();a.getNodeList().addSplitEdges(i)}};var pt=function(){if(this.p0=null,this.p1=null,arguments.length===0)this.p0=new L,this.p1=new L;else if(arguments.length===1){var t=arguments[0];this.p0=new L(t.p0),this.p1=new L(t.p1)}else if(arguments.length===2)this.p0=arguments[0],this.p1=arguments[1];else if(arguments.length===4){var e=arguments[0],n=arguments[1],i=arguments[2],s=arguments[3];this.p0=new L(e,n),this.p1=new L(i,s)}},vg={serialVersionUID:{configurable:!0}};pt.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},pt.prototype.orientationIndex=function(){if(arguments[0]instanceof pt){var t=arguments[0],e=et.orientationIndex(this.p0,this.p1,t.p0),n=et.orientationIndex(this.p0,this.p1,t.p1);return e>=0&&n>=0||e<=0&&n<=0?Math.max(e,n):0}else if(arguments[0]instanceof L){var i=arguments[0];return et.orientationIndex(this.p0,this.p1,i)}},pt.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},pt.prototype.isVertical=function(){return this.p0.x===this.p1.x},pt.prototype.equals=function(t){if(!(t instanceof pt))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},pt.prototype.intersection=function(t){var e=new Zs;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},pt.prototype.project=function(){if(arguments[0]instanceof L){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new L(t);var e=this.projectionFactor(t),n=new L;return n.x=this.p0.x+e*(this.p1.x-this.p0.x),n.y=this.p0.y+e*(this.p1.y-this.p0.y),n}else if(arguments[0]instanceof pt){var i=arguments[0],s=this.projectionFactor(i.p0),a=this.projectionFactor(i.p1);if(s>=1&&a>=1||s<=0&&a<=0)return null;var o=this.project(i.p0);s<0&&(o=this.p0),s>1&&(o=this.p1);var l=this.project(i.p1);return a<0&&(l=this.p0),a>1&&(l=this.p1),new pt(o,l)}},pt.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},pt.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},pt.prototype.getCoordinate=function(t){return t===0?this.p0:this.p1},pt.prototype.distancePerpendicular=function(t){return et.distancePointLinePerpendicular(t,this.p0,this.p1)},pt.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},pt.prototype.midPoint=function(){return pt.midPoint(this.p0,this.p1)},pt.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,i=e*e+n*n;if(i<=0)return wt.NaN;var s=((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/i;return s},pt.prototype.closestPoints=function(t){var e=this.intersection(t);if(e!==null)return[e,e];var n=new Array(2).fill(null),i=wt.MAX_VALUE,s=null,a=this.closestPoint(t.p0);i=a.distance(t.p0),n[0]=a,n[1]=t.p0;var o=this.closestPoint(t.p1);s=o.distance(t.p1),s<i&&(i=s,n[0]=o,n[1]=t.p1);var l=t.closestPoint(this.p0);s=l.distance(this.p0),s<i&&(i=s,n[0]=this.p0,n[1]=l);var u=t.closestPoint(this.p1);return s=u.distance(this.p1),s<i&&(i=s,n[0]=this.p1,n[1]=u),n},pt.prototype.closestPoint=function(t){var e=this.projectionFactor(t);if(e>0&&e<1)return this.project(t);var n=this.p0.distance(t),i=this.p1.distance(t);return n<i?this.p0:this.p1},pt.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},pt.prototype.getLength=function(){return this.p0.distance(this.p1)},pt.prototype.compareTo=function(t){var e=t,n=this.p0.compareTo(e.p0);return n!==0?n:this.p1.compareTo(e.p1)},pt.prototype.reverse=function(){var t=this.p0;this.p0=this.p1,this.p1=t},pt.prototype.equalsTopo=function(t){return this.p0.equals(t.p0)&&(this.p1.equals(t.p1)||this.p0.equals(t.p1))&&this.p1.equals(t.p0)},pt.prototype.lineIntersection=function(t){try{var e=En.intersection(this.p0,this.p1,t.p0,t.p1);return e}catch(n){if(!(n instanceof Ql))throw n}finally{}return null},pt.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},pt.prototype.pointAlongOffset=function(t,e){var n=this.p0.x+t*(this.p1.x-this.p0.x),i=this.p0.y+t*(this.p1.y-this.p0.y),s=this.p1.x-this.p0.x,a=this.p1.y-this.p0.y,o=Math.sqrt(s*s+a*a),l=0,u=0;if(e!==0){if(o<=0)throw new Error("Cannot compute offset from zero-length line segment");l=e*s/o,u=e*a/o}var c=n-u,h=i+l,f=new L(c,h);return f},pt.prototype.setCoordinates=function(){if(arguments.length===1){var t=arguments[0];this.setCoordinates(t.p0,t.p1)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.p0.x=e.x,this.p0.y=e.y,this.p1.x=n.x,this.p1.y=n.y}},pt.prototype.segmentFraction=function(t){var e=this.projectionFactor(t);return e<0?e=0:(e>1||wt.isNaN(e))&&(e=1),e},pt.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},pt.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},pt.prototype.distance=function(){if(arguments[0]instanceof pt){var t=arguments[0];return et.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}else if(arguments[0]instanceof L){var e=arguments[0];return et.distancePointLine(e,this.p0,this.p1)}},pt.prototype.pointAlong=function(t){var e=new L;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},pt.prototype.hashCode=function(){var t=wt.doubleToLongBits(this.p0.x);t^=wt.doubleToLongBits(this.p0.y)*31;var e=Math.trunc(t)^Math.trunc(t>>32),n=wt.doubleToLongBits(this.p1.x);n^=wt.doubleToLongBits(this.p1.y)*31;var i=Math.trunc(n)^Math.trunc(n>>32);return e^i},pt.prototype.interfaces_=function(){return[Zr,$r]},pt.prototype.getClass=function(){return pt},pt.midPoint=function(t,e){return new L((t.x+e.x)/2,(t.y+e.y)/2)},vg.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(pt,vg);var ih=function(){this.tempEnv1=new dt,this.tempEnv2=new dt,this._overlapSeg1=new pt,this._overlapSeg2=new pt};ih.prototype.overlap=function(){if(arguments.length!==2){if(arguments.length===4){var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];t.getLineSegment(e,this._overlapSeg1),n.getLineSegment(i,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}}},ih.prototype.interfaces_=function(){return[]},ih.prototype.getClass=function(){return ih};var br=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=i};br.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},br.prototype.computeSelect=function(t,e,n,i){var s=this._pts[e],a=this._pts[n];if(i.tempEnv1.init(s,a),n-e===1)return i.select(this,e),null;if(!t.intersects(i.tempEnv1))return null;var o=Math.trunc((e+n)/2);e<o&&this.computeSelect(t,e,o,i),o<n&&this.computeSelect(t,o,n,i)},br.prototype.getCoordinates=function(){for(var t=this,e=new Array(this._end-this._start+1).fill(null),n=0,i=this._start;i<=this._end;i++)e[n++]=t._pts[i];return e},br.prototype.computeOverlaps=function(t,e){this.computeOverlapsInternal(this._start,this._end,t,t._start,t._end,e)},br.prototype.setId=function(t){this._id=t},br.prototype.select=function(t,e){this.computeSelect(t,this._start,this._end,e)},br.prototype.getEnvelope=function(){if(this._env===null){var t=this._pts[this._start],e=this._pts[this._end];this._env=new dt(t,e)}return this._env},br.prototype.getEndIndex=function(){return this._end},br.prototype.getStartIndex=function(){return this._start},br.prototype.getContext=function(){return this._context},br.prototype.getId=function(){return this._id},br.prototype.computeOverlapsInternal=function(t,e,n,i,s,a){var o=this._pts[t],l=this._pts[e],u=n._pts[i],c=n._pts[s];if(e-t===1&&s-i===1)return a.overlap(this,t,n,i),null;if(a.tempEnv1.init(o,l),a.tempEnv2.init(u,c),!a.tempEnv1.intersects(a.tempEnv2))return null;var h=Math.trunc((t+e)/2),f=Math.trunc((i+s)/2);t<h&&(i<f&&this.computeOverlapsInternal(t,h,n,i,f,a),f<s&&this.computeOverlapsInternal(t,h,n,f,s,a)),h<e&&(i<f&&this.computeOverlapsInternal(h,e,n,i,f,a),f<s&&this.computeOverlapsInternal(h,e,n,f,s,a))},br.prototype.interfaces_=function(){return[]},br.prototype.getClass=function(){return br};var Bn=function(){};Bn.prototype.interfaces_=function(){return[]},Bn.prototype.getClass=function(){return Bn},Bn.getChainStartIndices=function(t){var e=0,n=new Z;n.add(new Vn(e));do{var i=Bn.findChainEnd(t,e);n.add(new Vn(i)),e=i}while(e<t.length-1);var s=Bn.toIntArray(n);return s},Bn.findChainEnd=function(t,e){for(var n=e;n<t.length-1&&t[n].equals2D(t[n+1]);)n++;if(n>=t.length-1)return t.length-1;for(var i=Qt.quadrant(t[n],t[n+1]),s=e+1;s<t.length;){if(!t[s-1].equals2D(t[s])){var a=Qt.quadrant(t[s-1],t[s]);if(a!==i)break}s++}return s-1},Bn.getChains=function(){if(arguments.length===1){var t=arguments[0];return Bn.getChains(t,null)}else if(arguments.length===2){for(var e=arguments[0],n=arguments[1],i=new Z,s=Bn.getChainStartIndices(e),a=0;a<s.length-1;a++){var o=new br(e,s[a],s[a+1],n);i.add(o)}return i}},Bn.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e};var ea=function(){};ea.prototype.computeNodes=function(t){},ea.prototype.getNodedSubstrings=function(){},ea.prototype.interfaces_=function(){return[]},ea.prototype.getClass=function(){return ea};var sh=function(){if(this._segInt=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setSegmentIntersector(t)}}};sh.prototype.setSegmentIntersector=function(t){this._segInt=t},sh.prototype.interfaces_=function(){return[ea]},sh.prototype.getClass=function(){return sh};var Jf=function(r){function t(n){n?r.call(this,n):r.call(this),this._monoChains=new Z,this._index=new gg,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t;var e={SegmentOverlapAction:{configurable:!0}};return t.prototype.getMonotoneChains=function(){return this._monoChains},t.prototype.getNodedSubstrings=function(){return _e.getNodedSubstrings(this._nodedSegStrings)},t.prototype.getIndex=function(){return this._index},t.prototype.add=function(i){for(var s=this,a=Bn.getChains(i.getCoordinates(),i),o=a.iterator();o.hasNext();){var l=o.next();l.setId(s._idCounter++),s._index.insert(l.getEnvelope(),l),s._monoChains.add(l)}},t.prototype.computeNodes=function(i){var s=this;this._nodedSegStrings=i;for(var a=i.iterator();a.hasNext();)s.add(a.next());this.intersectChains()},t.prototype.intersectChains=function(){for(var i=this,s=new yg(this._segInt),a=this._monoChains.iterator();a.hasNext();)for(var o=a.next(),l=i._index.query(o.getEnvelope()),u=l.iterator();u.hasNext();){var c=u.next();if(c.getId()>o.getId()&&(o.computeOverlaps(c,s),i._nOverlaps++),i._segInt.isDone())return null}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.SegmentOverlapAction.get=function(){return yg},Object.defineProperties(t,e),t}(sh),yg=function(r){function t(){r.call(this),this._si=null;var e=arguments[0];this._si=e}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.overlap=function(){if(arguments.length===4){var n=arguments[0],i=arguments[1],s=arguments[2],a=arguments[3],o=n.getContext(),l=s.getContext();this._si.processIntersections(o,i,l,a)}else return r.prototype.overlap.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(ih),qt=function r(){if(this._quadrantSegments=r.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=r.CAP_ROUND,this._joinStyle=r.JOIN_ROUND,this._mitreLimit=r.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=r.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setQuadrantSegments(t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.setQuadrantSegments(e),this.setEndCapStyle(n)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],a=arguments[2],o=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(s),this.setJoinStyle(a),this.setMitreLimit(o)}}},Ji={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};qt.prototype.getEndCapStyle=function(){return this._endCapStyle},qt.prototype.isSingleSided=function(){return this._isSingleSided},qt.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,this._quadrantSegments===0&&(this._joinStyle=qt.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=qt.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==qt.JOIN_ROUND&&(this._quadrantSegments=qt.DEFAULT_QUADRANT_SEGMENTS)},qt.prototype.getJoinStyle=function(){return this._joinStyle},qt.prototype.setJoinStyle=function(t){this._joinStyle=t},qt.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},qt.prototype.getSimplifyFactor=function(){return this._simplifyFactor},qt.prototype.getQuadrantSegments=function(){return this._quadrantSegments},qt.prototype.setEndCapStyle=function(t){this._endCapStyle=t},qt.prototype.getMitreLimit=function(){return this._mitreLimit},qt.prototype.setMitreLimit=function(t){this._mitreLimit=t},qt.prototype.setSingleSided=function(t){this._isSingleSided=t},qt.prototype.interfaces_=function(){return[]},qt.prototype.getClass=function(){return qt},qt.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},Ji.CAP_ROUND.get=function(){return 1},Ji.CAP_FLAT.get=function(){return 2},Ji.CAP_SQUARE.get=function(){return 3},Ji.JOIN_ROUND.get=function(){return 1},Ji.JOIN_MITRE.get=function(){return 2},Ji.JOIN_BEVEL.get=function(){return 3},Ji.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Ji.DEFAULT_MITRE_LIMIT.get=function(){return 5},Ji.DEFAULT_SIMPLIFY_FACTOR.get=function(){return .01},Object.defineProperties(qt,Ji);var ge=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=et.COUNTERCLOCKWISE,this._inputLine=t||null},ah={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};ge.prototype.isDeletable=function(t,e,n,i){var s=this._inputLine[t],a=this._inputLine[e],o=this._inputLine[n];return!this.isConcave(s,a,o)||!this.isShallow(s,a,o,i)?!1:this.isShallowSampled(s,a,t,n,i)},ge.prototype.deleteShallowConcavities=function(){for(var t=this,e=1,n=this.findNextNonDeletedIndex(e),i=this.findNextNonDeletedIndex(n),s=!1;i<this._inputLine.length;){var a=!1;t.isDeletable(e,n,i,t._distanceTol)&&(t._isDeleted[n]=ge.DELETE,a=!0,s=!0),a?e=i:e=n,n=t.findNextNonDeletedIndex(e),i=t.findNextNonDeletedIndex(n)}return s},ge.prototype.isShallowConcavity=function(t,e,n,i){var s=et.computeOrientation(t,e,n),a=s===this._angleOrientation;if(!a)return!1;var o=et.distancePointLine(e,t,n);return o<i},ge.prototype.isShallowSampled=function(t,e,n,i,s){var a=this,o=Math.trunc((i-n)/ge.NUM_PTS_TO_CHECK);o<=0&&(o=1);for(var l=n;l<i;l+=o)if(!a.isShallow(t,e,a._inputLine[l],s))return!1;return!0},ge.prototype.isConcave=function(t,e,n){var i=et.computeOrientation(t,e,n),s=i===this._angleOrientation;return s},ge.prototype.simplify=function(t){var e=this;this._distanceTol=Math.abs(t),t<0&&(this._angleOrientation=et.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var n=!1;do n=e.deleteShallowConcavities();while(n);return this.collapseLine()},ge.prototype.findNextNonDeletedIndex=function(t){for(var e=t+1;e<this._inputLine.length&&this._isDeleted[e]===ge.DELETE;)e++;return e},ge.prototype.isShallow=function(t,e,n,i){var s=et.distancePointLine(e,t,n);return s<i},ge.prototype.collapseLine=function(){for(var t=this,e=new Ku,n=0;n<this._inputLine.length;n++)t._isDeleted[n]!==ge.DELETE&&e.add(t._inputLine[n]);return e.toCoordinateArray()},ge.prototype.interfaces_=function(){return[]},ge.prototype.getClass=function(){return ge},ge.simplify=function(t,e){var n=new ge(t);return n.simplify(e)},ah.INIT.get=function(){return 0},ah.DELETE.get=function(){return 1},ah.KEEP.get=function(){return 1},ah.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(ge,ah);var zr=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new Z},_g={COORDINATE_ARRAY_TYPE:{configurable:!0}};zr.prototype.getCoordinates=function(){var t=this._ptList.toArray(zr.COORDINATE_ARRAY_TYPE);return t},zr.prototype.setPrecisionModel=function(t){this._precisionModel=t},zr.prototype.addPt=function(t){var e=new L(t);if(this._precisionModel.makePrecise(e),this.isRedundant(e))return null;this._ptList.add(e)},zr.prototype.revere=function(){},zr.prototype.addPts=function(t,e){var n=this;if(e)for(var i=0;i<t.length;i++)n.addPt(t[i]);else for(var s=t.length-1;s>=0;s--)n.addPt(t[s])},zr.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1),n=t.distance(e);return n<this._minimimVertexDistance},zr.prototype.toString=function(){var t=new Dt,e=t.createLineString(this.getCoordinates());return e.toString()},zr.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var t=new L(this._ptList.get(0)),e=this._ptList.get(this._ptList.size()-1);if(t.equals(e))return null;this._ptList.add(t)},zr.prototype.setMinimumVertexDistance=function(t){this._minimimVertexDistance=t},zr.prototype.interfaces_=function(){return[]},zr.prototype.getClass=function(){return zr},_g.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(zr,_g);var Lt=function(){},qa={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};Lt.prototype.interfaces_=function(){return[]},Lt.prototype.getClass=function(){return Lt},Lt.toDegrees=function(t){return t*180/Math.PI},Lt.normalize=function(t){for(;t>Math.PI;)t-=Lt.PI_TIMES_2;for(;t<=-Math.PI;)t+=Lt.PI_TIMES_2;return t},Lt.angle=function(){if(arguments.length===1){var t=arguments[0];return Math.atan2(t.y,t.x)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],i=n.x-e.x,s=n.y-e.y;return Math.atan2(s,i)}},Lt.isAcute=function(t,e,n){var i=t.x-e.x,s=t.y-e.y,a=n.x-e.x,o=n.y-e.y,l=i*a+s*o;return l>0},Lt.isObtuse=function(t,e,n){var i=t.x-e.x,s=t.y-e.y,a=n.x-e.x,o=n.y-e.y,l=i*a+s*o;return l<0},Lt.interiorAngle=function(t,e,n){var i=Lt.angle(e,t),s=Lt.angle(e,n);return Math.abs(s-i)},Lt.normalizePositive=function(t){if(t<0){for(;t<0;)t+=Lt.PI_TIMES_2;t>=Lt.PI_TIMES_2&&(t=0)}else{for(;t>=Lt.PI_TIMES_2;)t-=Lt.PI_TIMES_2;t<0&&(t=0)}return t},Lt.angleBetween=function(t,e,n){var i=Lt.angle(e,t),s=Lt.angle(e,n);return Lt.diff(i,s)},Lt.diff=function(t,e){var n=null;return t<e?n=e-t:n=t-e,n>Math.PI&&(n=2*Math.PI-n),n},Lt.toRadians=function(t){return t*Math.PI/180},Lt.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?Lt.COUNTERCLOCKWISE:n<0?Lt.CLOCKWISE:Lt.NONE},Lt.angleBetweenOriented=function(t,e,n){var i=Lt.angle(e,t),s=Lt.angle(e,n),a=s-i;return a<=-Math.PI?a+Lt.PI_TIMES_2:a>Math.PI?a-Lt.PI_TIMES_2:a},qa.PI_TIMES_2.get=function(){return 2*Math.PI},qa.PI_OVER_2.get=function(){return Math.PI/2},qa.PI_OVER_4.get=function(){return Math.PI/4},qa.COUNTERCLOCKWISE.get=function(){return et.COUNTERCLOCKWISE},qa.CLOCKWISE.get=function(){return et.CLOCKWISE},qa.NONE.get=function(){return et.COLLINEAR},Object.defineProperties(Lt,qa);var ne=function r(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new pt,this._seg1=new pt,this._offset0=new pt,this._offset1=new pt,this._side=0,this._hasNarrowConcaveAngle=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._precisionModel=t,this._bufParams=e,this._li=new Zs,this._filletAngleQuantum=Math.PI/2/e.getQuadrantSegments(),e.getQuadrantSegments()>=8&&e.getJoinStyle()===qt.JOIN_ROUND&&(this._closingSegLengthFactor=r.MAX_CLOSING_SEG_LEN_FACTOR),this.init(n)},oh={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};ne.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=et.computeOrientation(this._s0,this._s1,this._s2),i=n===et.CLOCKWISE&&this._side===K.LEFT||n===et.COUNTERCLOCKWISE&&this._side===K.RIGHT;n===0?this.addCollinear(e):i?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)},ne.prototype.addLineEndCap=function(t,e){var n=new pt(t,e),i=new pt;this.computeOffsetSegment(n,K.LEFT,this._distance,i);var s=new pt;this.computeOffsetSegment(n,K.RIGHT,this._distance,s);var a=e.x-t.x,o=e.y-t.y,l=Math.atan2(o,a);switch(this._bufParams.getEndCapStyle()){case qt.CAP_ROUND:this._segList.addPt(i.p1),this.addFilletArc(e,l+Math.PI/2,l-Math.PI/2,et.CLOCKWISE,this._distance),this._segList.addPt(s.p1);break;case qt.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(s.p1);break;case qt.CAP_SQUARE:var u=new L;u.x=Math.abs(this._distance)*Math.cos(l),u.y=Math.abs(this._distance)*Math.sin(l);var c=new L(i.p1.x+u.x,i.p1.y+u.y),h=new L(s.p1.x+u.x,s.p1.y+u.y);this._segList.addPt(c),this._segList.addPt(h);break}},ne.prototype.getCoordinates=function(){var t=this._segList.getCoordinates();return t},ne.prototype.addMitreJoin=function(t,e,n,i){var s=!0,a=null;try{a=En.intersection(e.p0,e.p1,n.p0,n.p1);var o=i<=0?1:a.distance(t)/Math.abs(i);o>this._bufParams.getMitreLimit()&&(s=!1)}catch(l){if(l instanceof Ql)a=new L(0,0),s=!1;else throw l}finally{}s?this._segList.addPt(a):this.addLimitedMitreJoin(e,n,i,this._bufParams.getMitreLimit())},ne.prototype.addFilletCorner=function(t,e,n,i,s){var a=e.x-t.x,o=e.y-t.y,l=Math.atan2(o,a),u=n.x-t.x,c=n.y-t.y,h=Math.atan2(c,u);i===et.CLOCKWISE?l<=h&&(l+=2*Math.PI):l>=h&&(l-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,l,h,i,s),this._segList.addPt(n)},ne.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*ne.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===qt.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===qt.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(e&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,t,this._distance),this._segList.addPt(this._offset1.p0))},ne.prototype.createSquare=function(t){this._segList.addPt(new L(t.x+this._distance,t.y+this._distance)),this._segList.addPt(new L(t.x+this._distance,t.y-this._distance)),this._segList.addPt(new L(t.x-this._distance,t.y-this._distance)),this._segList.addPt(new L(t.x-this._distance,t.y+this._distance)),this._segList.closeRing()},ne.prototype.addSegments=function(t,e){this._segList.addPts(t,e)},ne.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},ne.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},ne.prototype.initSideSegments=function(t,e,n){this._s1=t,this._s2=e,this._side=n,this._seg1.setCoordinates(t,e),this.computeOffsetSegment(this._seg1,n,this._distance,this._offset1)},ne.prototype.addLimitedMitreJoin=function(t,e,n,i){var s=this._seg0.p1,a=Lt.angle(s,this._seg0.p0),o=Lt.angleBetweenOriented(this._seg0.p0,s,this._seg1.p1),l=o/2,u=Lt.normalize(a+l),c=Lt.normalize(u+Math.PI),h=i*n,f=h*Math.abs(Math.sin(l)),g=n-f,m=s.x+h*Math.cos(c),_=s.y+h*Math.sin(c),E=new L(m,_),M=new pt(s,E),y=M.pointAlongOffset(1,g),w=M.pointAlongOffset(1,-g);this._side===K.LEFT?(this._segList.addPt(y),this._segList.addPt(w)):(this._segList.addPt(w),this._segList.addPt(y))},ne.prototype.computeOffsetSegment=function(t,e,n,i){var s=e===K.LEFT?1:-1,a=t.p1.x-t.p0.x,o=t.p1.y-t.p0.y,l=Math.sqrt(a*a+o*o),u=s*n*a/l,c=s*n*o/l;i.p0.x=t.p0.x-c,i.p0.y=t.p0.y+u,i.p1.x=t.p1.x-c,i.p1.y=t.p1.y+u},ne.prototype.addFilletArc=function(t,e,n,i,s){var a=this,o=i===et.CLOCKWISE?-1:1,l=Math.abs(e-n),u=Math.trunc(l/this._filletAngleQuantum+.5);if(u<1)return null;for(var c=0,h=l/u,f=c,g=new L;f<l;){var m=e+o*f;g.x=t.x+s*Math.cos(m),g.y=t.y+s*Math.sin(m),a._segList.addPt(g),f+=h}},ne.prototype.addInsideTurn=function(t,e){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*ne.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var n=new L((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var i=new L((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(i)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},ne.prototype.createCircle=function(t){var e=new L(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},ne.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},ne.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new zr,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*ne.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},ne.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2);var e=this._li.getIntersectionNum();e>=2&&(this._bufParams.getJoinStyle()===qt.JOIN_BEVEL||this._bufParams.getJoinStyle()===qt.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,et.CLOCKWISE,this._distance))},ne.prototype.closeRing=function(){this._segList.closeRing()},ne.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},ne.prototype.interfaces_=function(){return[]},ne.prototype.getClass=function(){return ne},oh.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return .001},oh.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return .001},oh.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},oh.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(ne,oh);var dr=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};dr.prototype.getOffsetCurve=function(t,e){if(this._distance=e,e===0)return null;var n=e<0,i=Math.abs(e),s=this.getSegGen(i);t.length<=1?this.computePointCurve(t[0],s):this.computeOffsetCurve(t,n,s);var a=s.getCoordinates();return n&&Tt.reverse(a),a},dr.prototype.computeSingleSidedBufferCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var s=ge.simplify(t,-i),a=s.length-1;n.initSideSegments(s[a],s[a-1],K.LEFT),n.addFirstSegment();for(var o=a-2;o>=0;o--)n.addNextSegment(s[o],!0)}else{n.addSegments(t,!1);var l=ge.simplify(t,i),u=l.length-1;n.initSideSegments(l[0],l[1],K.LEFT),n.addFirstSegment();for(var c=2;c<=u;c++)n.addNextSegment(l[c],!0)}n.addLastSegment(),n.closeRing()},dr.prototype.computeRingBufferCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);e===K.RIGHT&&(i=-i);var s=ge.simplify(t,i),a=s.length-1;n.initSideSegments(s[a-1],s[0],e);for(var o=1;o<=a;o++){var l=o!==1;n.addNextSegment(s[o],l)}n.closeRing()},dr.prototype.computeLineBufferCurve=function(t,e){var n=this.simplifyTolerance(this._distance),i=ge.simplify(t,n),s=i.length-1;e.initSideSegments(i[0],i[1],K.LEFT);for(var a=2;a<=s;a++)e.addNextSegment(i[a],!0);e.addLastSegment(),e.addLineEndCap(i[s-1],i[s]);var o=ge.simplify(t,-n),l=o.length-1;e.initSideSegments(o[l],o[l-1],K.LEFT);for(var u=l-2;u>=0;u--)e.addNextSegment(o[u],!0);e.addLastSegment(),e.addLineEndCap(o[1],o[0]),e.closeRing()},dr.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case qt.CAP_ROUND:e.createCircle(t);break;case qt.CAP_SQUARE:e.createSquare(t);break}},dr.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided()||e===0)return null;var n=Math.abs(e),i=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],i);else if(this._bufParams.isSingleSided()){var s=e<0;this.computeSingleSidedBufferCurve(t,s,i)}else this.computeLineBufferCurve(t,i);var a=i.getCoordinates();return a},dr.prototype.getBufferParameters=function(){return this._bufParams},dr.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()},dr.prototype.getRingCurve=function(t,e,n){if(this._distance=n,t.length<=2)return this.getLineCurve(t,n);if(n===0)return dr.copyCoordinates(t);var i=this.getSegGen(n);return this.computeRingBufferCurve(t,e,i),i.getCoordinates()},dr.prototype.computeOffsetCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);if(e){var s=ge.simplify(t,-i),a=s.length-1;n.initSideSegments(s[a],s[a-1],K.LEFT),n.addFirstSegment();for(var o=a-2;o>=0;o--)n.addNextSegment(s[o],!0)}else{var l=ge.simplify(t,i),u=l.length-1;n.initSideSegments(l[0],l[1],K.LEFT),n.addFirstSegment();for(var c=2;c<=u;c++)n.addNextSegment(l[c],!0)}n.addLastSegment()},dr.prototype.getSegGen=function(t){return new ne(this._precisionModel,this._bufParams,t)},dr.prototype.interfaces_=function(){return[]},dr.prototype.getClass=function(){return dr},dr.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),n=0;n<e.length;n++)e[n]=new L(t[n]);return e};var Wa=function(){this._subgraphs=null,this._seg=new pt,this._cga=new et;var t=arguments[0];this._subgraphs=t},wg={DepthSegment:{configurable:!0}};Wa.prototype.findStabbedSegments=function(){var t=this;if(arguments.length===1){for(var e=arguments[0],n=new Z,i=this._subgraphs.iterator();i.hasNext();){var s=i.next(),a=s.getEnvelope();e.y<a.getMinY()||e.y>a.getMaxY()||t.findStabbedSegments(e,s.getDirectedEdges(),n)}return n}else if(arguments.length===3){if(_t(arguments[2],Pn)&&arguments[0]instanceof L&&arguments[1]instanceof Yf)for(var o=arguments[0],l=arguments[1],u=arguments[2],c=l.getEdge().getCoordinates(),h=0;h<c.length-1;h++){t._seg.p0=c[h],t._seg.p1=c[h+1],t._seg.p0.y>t._seg.p1.y&&t._seg.reverse();var f=Math.max(t._seg.p0.x,t._seg.p1.x);if(!(f<o.x)&&!t._seg.isHorizontal()&&!(o.y<t._seg.p0.y||o.y>t._seg.p1.y)&&et.computeOrientation(t._seg.p0,t._seg.p1,o)!==et.RIGHT){var g=l.getDepth(K.LEFT);t._seg.p0.equals(c[h])||(g=l.getDepth(K.RIGHT));var m=new ra(t._seg,g);u.add(m)}}else if(_t(arguments[2],Pn)&&arguments[0]instanceof L&&_t(arguments[1],Pn))for(var _=arguments[0],E=arguments[1],M=arguments[2],y=E.iterator();y.hasNext();){var w=y.next();w.isForward()&&t.findStabbedSegments(_,w,M)}}},Wa.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);if(e.size()===0)return 0;var n=Nn.min(e);return n._leftDepth},Wa.prototype.interfaces_=function(){return[]},Wa.prototype.getClass=function(){return Wa},wg.DepthSegment.get=function(){return ra},Object.defineProperties(Wa,wg);var ra=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new pt(t),this._leftDepth=e};ra.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return n!==0||(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg),n!==0)?n:this._upwardSeg.compareTo(e._upwardSeg)},ra.prototype.compareX=function(t,e){var n=t.p0.compareTo(e.p0);return n!==0?n:t.p1.compareTo(e.p1)},ra.prototype.toString=function(){return this._upwardSeg.toString()},ra.prototype.interfaces_=function(){return[Zr]},ra.prototype.getClass=function(){return ra};var Wt=function(t,e,n){this.p0=t||null,this.p1=e||null,this.p2=n||null};Wt.prototype.area=function(){return Wt.area(this.p0,this.p1,this.p2)},Wt.prototype.signedArea=function(){return Wt.signedArea(this.p0,this.p1,this.p2)},Wt.prototype.interpolateZ=function(t){if(t===null)throw new oe("Supplied point is null.");return Wt.interpolateZ(t,this.p0,this.p1,this.p2)},Wt.prototype.longestSideLength=function(){return Wt.longestSideLength(this.p0,this.p1,this.p2)},Wt.prototype.isAcute=function(){return Wt.isAcute(this.p0,this.p1,this.p2)},Wt.prototype.circumcentre=function(){return Wt.circumcentre(this.p0,this.p1,this.p2)},Wt.prototype.area3D=function(){return Wt.area3D(this.p0,this.p1,this.p2)},Wt.prototype.centroid=function(){return Wt.centroid(this.p0,this.p1,this.p2)},Wt.prototype.inCentre=function(){return Wt.inCentre(this.p0,this.p1,this.p2)},Wt.prototype.interfaces_=function(){return[]},Wt.prototype.getClass=function(){return Wt},Wt.area=function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)},Wt.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2},Wt.det=function(t,e,n,i){return t*i-e*n},Wt.interpolateZ=function(t,e,n,i){var s=e.x,a=e.y,o=n.x-s,l=i.x-s,u=n.y-a,c=i.y-a,h=o*c-l*u,f=t.x-s,g=t.y-a,m=(c*f-l*g)/h,_=(-u*f+o*g)/h,E=e.z+m*(n.z-e.z)+_*(i.z-e.z);return E},Wt.longestSideLength=function(t,e,n){var i=t.distance(e),s=e.distance(n),a=n.distance(t),o=i;return s>o&&(o=s),a>o&&(o=a),o},Wt.isAcute=function(t,e,n){return!(!Lt.isAcute(t,e,n)||!Lt.isAcute(e,n,t)||!Lt.isAcute(n,t,e))},Wt.circumcentre=function(t,e,n){var i=n.x,s=n.y,a=t.x-i,o=t.y-s,l=e.x-i,u=e.y-s,c=2*Wt.det(a,o,l,u),h=Wt.det(o,a*a+o*o,u,l*l+u*u),f=Wt.det(a,a*a+o*o,l,l*l+u*u),g=i-h/c,m=s+f/c;return new L(g,m)},Wt.perpendicularBisector=function(t,e){var n=e.x-t.x,i=e.y-t.y,s=new En(t.x+n/2,t.y+i/2,1),a=new En(t.x-i+n/2,t.y+n+i/2,1);return new En(s,a)},Wt.angleBisector=function(t,e,n){var i=e.distance(t),s=e.distance(n),a=i/(i+s),o=n.x-t.x,l=n.y-t.y,u=new L(t.x+a*o,t.y+a*l);return u},Wt.area3D=function(t,e,n){var i=e.x-t.x,s=e.y-t.y,a=e.z-t.z,o=n.x-t.x,l=n.y-t.y,u=n.z-t.z,c=s*u-a*l,h=a*o-i*u,f=i*l-s*o,g=c*c+h*h+f*f,m=Math.sqrt(g)/2;return m},Wt.centroid=function(t,e,n){var i=(t.x+e.x+n.x)/3,s=(t.y+e.y+n.y)/3;return new L(i,s)},Wt.inCentre=function(t,e,n){var i=e.distance(n),s=t.distance(n),a=t.distance(e),o=i+s+a,l=(i*t.x+s*e.x+a*n.x)/o,u=(i*t.y+s*e.y+a*n.y)/o;return new L(l,u)};var nn=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new Z;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n};nn.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,F.EXTERIOR,F.INTERIOR)},nn.prototype.addPolygon=function(t){var e=this,n=this._distance,i=K.LEFT;this._distance<0&&(n=-this._distance,i=K.RIGHT);var s=t.getExteriorRing(),a=Tt.removeRepeatedPoints(s.getCoordinates());if(this._distance<0&&this.isErodedCompletely(s,this._distance)||this._distance<=0&&a.length<3)return null;this.addPolygonRing(a,n,i,F.EXTERIOR,F.INTERIOR);for(var o=0;o<t.getNumInteriorRing();o++){var l=t.getInteriorRingN(o),u=Tt.removeRepeatedPoints(l.getCoordinates());e._distance>0&&e.isErodedCompletely(l,-e._distance)||e.addPolygonRing(u,n,K.opposite(i),F.INTERIOR,F.EXTERIOR)}},nn.prototype.isTriangleErodedCompletely=function(t,e){var n=new Wt(t[0],t[1],t[2]),i=n.inCentre(),s=et.distancePointLine(i,n.p0,n.p1);return s<Math.abs(e)},nn.prototype.addLineString=function(t){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var e=Tt.removeRepeatedPoints(t.getCoordinates()),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,F.EXTERIOR,F.INTERIOR)},nn.prototype.addCurve=function(t,e,n){if(t===null||t.length<2)return null;var i=new _e(t,new Jt(0,F.BOUNDARY,e,n));this._curveList.add(i)},nn.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},nn.prototype.addPolygonRing=function(t,e,n,i,s){if(e===0&&t.length<gi.MINIMUM_VALID_SIZE)return null;var a=i,o=s;t.length>=gi.MINIMUM_VALID_SIZE&&et.isCCW(t)&&(a=s,o=i,n=K.opposite(n));var l=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(l,a,o)},nn.prototype.add=function(t){if(t.isEmpty())return null;t instanceof Ne?this.addPolygon(t):t instanceof pe?this.addLineString(t):t instanceof Mr?this.addPoint(t):t instanceof iu?this.addCollection(t):t instanceof ta?this.addCollection(t):t instanceof mi?this.addCollection(t):t instanceof er&&this.addCollection(t)},nn.prototype.isErodedCompletely=function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(n.length===4)return this.isTriangleErodedCompletely(n,e);var i=t.getEnvelopeInternal(),s=Math.min(i.getHeight(),i.getWidth());return e<0&&2*Math.abs(e)>s},nn.prototype.addCollection=function(t){for(var e=this,n=0;n<t.getNumGeometries();n++){var i=t.getGeometryN(n);e.add(i)}},nn.prototype.interfaces_=function(){return[]},nn.prototype.getClass=function(){return nn};var lu=function(){};lu.prototype.locate=function(t){},lu.prototype.interfaces_=function(){return[]},lu.prototype.getClass=function(){return lu};var _i=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var t=arguments[0];this._parent=t,this._atStart=!0,this._index=0,this._max=t.getNumGeometries()};_i.prototype.next=function(){if(this._atStart)return this._atStart=!1,_i.isAtomic(this._parent)&&this._index++,this._parent;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new ru;var t=this._parent.getGeometryN(this._index++);return t instanceof er?(this._subcollectionIterator=new _i(t),this._subcollectionIterator.next()):t},_i.prototype.remove=function(){throw new Error(this.getClass().getName())},_i.prototype.hasNext=function(){if(this._atStart)return!0;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},_i.prototype.interfaces_=function(){return[eu]},_i.prototype.getClass=function(){return _i},_i.isAtomic=function(t){return!(t instanceof er)};var Vr=function(){this._geom=null;var t=arguments[0];this._geom=t};Vr.prototype.locate=function(t){return Vr.locate(t,this._geom)},Vr.prototype.interfaces_=function(){return[lu]},Vr.prototype.getClass=function(){return Vr},Vr.isPointInRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?et.isPointInRing(t,e.getCoordinates()):!1},Vr.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!Vr.isPointInRing(t,n))return!1;for(var i=0;i<e.getNumInteriorRing();i++){var s=e.getInteriorRingN(i);if(Vr.isPointInRing(t,s))return!1}return!0},Vr.containsPoint=function(t,e){if(e instanceof Ne)return Vr.containsPointInPolygon(t,e);if(e instanceof er)for(var n=new _i(e);n.hasNext();){var i=n.next();if(i!==e&&Vr.containsPoint(t,i))return!0}return!1},Vr.locate=function(t,e){return e.isEmpty()?F.EXTERIOR:Vr.containsPoint(t,e)?F.INTERIOR:F.EXTERIOR};var $e=function(){this._edgeMap=new Be,this._edgeList=null,this._ptInAreaLocation=[F.NONE,F.NONE]};$e.prototype.getNextCW=function(t){this.getEdges();var e=this._edgeList.indexOf(t),n=e-1;return e===0&&(n=this._edgeList.size()-1),this._edgeList.get(n)},$e.prototype.propagateSideLabels=function(t){for(var e=F.NONE,n=this.iterator();n.hasNext();){var i=n.next(),s=i.getLabel();s.isArea(t)&&s.getLocation(t,K.LEFT)!==F.NONE&&(e=s.getLocation(t,K.LEFT))}if(e===F.NONE)return null;for(var a=e,o=this.iterator();o.hasNext();){var l=o.next(),u=l.getLabel();if(u.getLocation(t,K.ON)===F.NONE&&u.setLocation(t,K.ON,a),u.isArea(t)){var c=u.getLocation(t,K.LEFT),h=u.getLocation(t,K.RIGHT);if(h!==F.NONE){if(h!==a)throw new Xi("side location conflict",l.getCoordinate());c===F.NONE&&Mt.shouldNeverReachHere("found single null side (at "+l.getCoordinate()+")"),a=c}else Mt.isTrue(u.getLocation(t,K.LEFT)===F.NONE,"found single null side"),u.setLocation(t,K.RIGHT,a),u.setLocation(t,K.LEFT,a)}}},$e.prototype.getCoordinate=function(){var t=this.iterator();if(!t.hasNext())return null;var e=t.next();return e.getCoordinate()},$e.prototype.print=function(t){Ve.out.println("EdgeEndStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}},$e.prototype.isAreaLabelsConsistent=function(t){return this.computeEdgeEndLabels(t.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},$e.prototype.checkAreaLabelsConsistent=function(t){var e=this.getEdges();if(e.size()<=0)return!0;var n=e.size()-1,i=e.get(n).getLabel(),s=i.getLocation(t,K.LEFT);Mt.isTrue(s!==F.NONE,"Found unlabelled area edge");for(var a=s,o=this.iterator();o.hasNext();){var l=o.next(),u=l.getLabel();Mt.isTrue(u.isArea(t),"Found non-area edge");var c=u.getLocation(t,K.LEFT),h=u.getLocation(t,K.RIGHT);if(c===h||h!==a)return!1;a=c}return!0},$e.prototype.findIndex=function(t){var e=this;this.iterator();for(var n=0;n<this._edgeList.size();n++){var i=e._edgeList.get(n);if(i===t)return n}return-1},$e.prototype.iterator=function(){return this.getEdges().iterator()},$e.prototype.getEdges=function(){return this._edgeList===null&&(this._edgeList=new Z(this._edgeMap.values())),this._edgeList},$e.prototype.getLocation=function(t,e,n){return this._ptInAreaLocation[t]===F.NONE&&(this._ptInAreaLocation[t]=Vr.locate(e,n[t].getGeometry())),this._ptInAreaLocation[t]},$e.prototype.toString=function(){var t=new zn;t.append("EdgeEndStar: "+this.getCoordinate()),t.append(`
|
|
26
26
|
`);for(var e=this.iterator();e.hasNext();){var n=e.next();t.append(n),t.append(`
|
|
27
|
-
`)}return t.toString()},$e.prototype.computeEdgeEndLabels=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();n.computeLabel(t)}},$e.prototype.computeLabelling=function(t){var e=this;this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var n=[!1,!1],i=this.iterator();i.hasNext();)for(var s=i.next(),a=s.getLabel(),o=0;o<2;o++)a.isLine(o)&&a.getLocation(o)===F.BOUNDARY&&(n[o]=!0);for(var l=this.iterator();l.hasNext();)for(var u=l.next(),c=u.getLabel(),h=0;h<2;h++)if(c.isAnyNull(h)){var f=F.NONE;if(n[h])f=F.EXTERIOR;else{var g=u.getCoordinate();f=e.getLocation(h,g,t)}c.setAllLocationsIfNull(h,f)}},$e.prototype.getDegree=function(){return this._edgeMap.size()},$e.prototype.insertEdgeEnd=function(t,e){this._edgeMap.put(t,e),this._edgeList=null},$e.prototype.interfaces_=function(){return[]},$e.prototype.getClass=function(){return $e};var T_=function(r){function t(){r.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.linkResultDirectedEdges=function(){var n=this;this.getResultAreaEdges();for(var i=null,s=null,a=this._SCANNING_FOR_INCOMING,o=0;o<this._resultAreaEdgeList.size();o++){var l=n._resultAreaEdgeList.get(o),u=l.getSym();if(l.getLabel().isArea())switch(i===null&&l.isInResult()&&(i=l),a){case n._SCANNING_FOR_INCOMING:if(!u.isInResult())continue;s=u,a=n._LINKING_TO_OUTGOING;break;case n._LINKING_TO_OUTGOING:if(!l.isInResult())continue;s.setNext(l),a=n._SCANNING_FOR_INCOMING;break}}if(a===this._LINKING_TO_OUTGOING){if(i===null)throw new Xi("no outgoing dirEdge found",this.getCoordinate());Mt.isTrue(i.isInResult(),"unable to link last incoming dirEdge"),s.setNext(i)}},t.prototype.insert=function(n){var i=n;this.insertEdgeEnd(i,i)},t.prototype.getRightmostEdge=function(){var n=this.getEdges(),i=n.size();if(i<1)return null;var s=n.get(0);if(i===1)return s;var a=n.get(i-1),o=s.getQuadrant(),l=a.getQuadrant();return Qt.isNorthern(o)&&Qt.isNorthern(l)?s:!Qt.isNorthern(o)&&!Qt.isNorthern(l)?a:s.getDy()!==0?s:a.getDy()!==0?a:(Mt.shouldNeverReachHere("found two horizontal edges incident on node"),null)},t.prototype.print=function(n){Ve.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var i=this.iterator();i.hasNext();){var s=i.next();n.print("out "),s.print(n),n.println(),n.print("in "),s.getSym().print(n),n.println()}},t.prototype.getResultAreaEdges=function(){var n=this;if(this._resultAreaEdgeList!==null)return this._resultAreaEdgeList;this._resultAreaEdgeList=new Z;for(var i=this.iterator();i.hasNext();){var s=i.next();(s.isInResult()||s.getSym().isInResult())&&n._resultAreaEdgeList.add(s)}return this._resultAreaEdgeList},t.prototype.updateLabelling=function(n){for(var i=this.iterator();i.hasNext();){var s=i.next(),a=s.getLabel();a.setAllLocationsIfNull(0,n.getLocation(0)),a.setAllLocationsIfNull(1,n.getLocation(1))}},t.prototype.linkAllDirectedEdges=function(){var n=this;this.getEdges();for(var i=null,s=null,a=this._edgeList.size()-1;a>=0;a--){var o=n._edgeList.get(a),l=o.getSym();s===null&&(s=l),i!==null&&l.setNext(i),i=o}s.setNext(i)},t.prototype.computeDepths=function(){var n=this;if(arguments.length===1){var i=arguments[0],s=this.findIndex(i),a=i.getDepth(K.LEFT),o=i.getDepth(K.RIGHT),l=this.computeDepths(s+1,this._edgeList.size(),a),u=this.computeDepths(0,s,l);if(u!==o)throw new Xi("depth mismatch at "+i.getCoordinate())}else if(arguments.length===3){for(var c=arguments[0],h=arguments[1],f=arguments[2],g=f,m=c;m<h;m++){var _=n._edgeList.get(m);_.setEdgeDepths(K.RIGHT,g),g=_.getDepth(K.LEFT)}return g}},t.prototype.mergeSymLabels=function(){for(var n=this.iterator();n.hasNext();){var i=n.next(),s=i.getLabel();s.merge(i.getSym().getLabel())}},t.prototype.linkMinimalDirectedEdges=function(n){for(var i=this,s=null,a=null,o=this._SCANNING_FOR_INCOMING,l=this._resultAreaEdgeList.size()-1;l>=0;l--){var u=i._resultAreaEdgeList.get(l),c=u.getSym();switch(s===null&&u.getEdgeRing()===n&&(s=u),o){case i._SCANNING_FOR_INCOMING:if(c.getEdgeRing()!==n)continue;a=c,o=i._LINKING_TO_OUTGOING;break;case i._LINKING_TO_OUTGOING:if(u.getEdgeRing()!==n)continue;a.setNextMin(u),o=i._SCANNING_FOR_INCOMING;break}}o===this._LINKING_TO_OUTGOING&&(Mt.isTrue(s!==null,"found null for first outgoing dirEdge"),Mt.isTrue(s.getEdgeRing()===n,"unable to link last incoming dirEdge"),a.setNextMin(s))},t.prototype.getOutgoingDegree=function(){if(arguments.length===0){for(var n=0,i=this.iterator();i.hasNext();){var s=i.next();s.isInResult()&&n++}return n}else if(arguments.length===1){for(var a=arguments[0],o=0,l=this.iterator();l.hasNext();){var u=l.next();u.getEdgeRing()===a&&o++}return o}},t.prototype.getLabel=function(){return this._label},t.prototype.findCoveredLineEdges=function(){for(var n=F.NONE,i=this.iterator();i.hasNext();){var s=i.next(),a=s.getSym();if(!s.isLineEdge()){if(s.isInResult()){n=F.INTERIOR;break}if(a.isInResult()){n=F.EXTERIOR;break}}}if(n===F.NONE)return null;for(var o=n,l=this.iterator();l.hasNext();){var u=l.next(),c=u.getSym();u.isLineEdge()?u.getEdge().setCovered(o===F.INTERIOR):(u.isInResult()&&(o=F.EXTERIOR),c.isInResult()&&(o=F.INTERIOR))}},t.prototype.computeLabelling=function(n){var i=this;r.prototype.computeLabelling.call(this,n),this._label=new Jt(F.NONE);for(var s=this.iterator();s.hasNext();)for(var a=s.next(),o=a.getEdge(),l=o.getLabel(),u=0;u<2;u++){var c=l.getLocation(u);(c===F.INTERIOR||c===F.BOUNDARY)&&i._label.setLocation(u,F.INTERIOR)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}($e),Eg=function(r){function t(){r.apply(this,arguments)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.createNode=function(n){return new mc(n,new T_)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(su),Es=function r(){this._pts=null,this._orientation=null;var t=arguments[0];this._pts=t,this._orientation=r.orientation(t)};Es.prototype.compareTo=function(t){var e=t,n=Es.compareOriented(this._pts,this._orientation,e._pts,e._orientation);return n},Es.prototype.interfaces_=function(){return[Zr]},Es.prototype.getClass=function(){return Es},Es.orientation=function(t){return Tt.increasingDirection(t)===1},Es.compareOriented=function(t,e,n,i){for(var s=e?1:-1,a=i?1:-1,o=e?t.length:-1,l=i?n.length:-1,u=e?0:t.length-1,c=i?0:n.length-1;;){var h=t[u].compareTo(n[c]);if(h!==0)return h;u+=s,c+=a;var f=u===o,g=c===l;if(f&&!g)return-1;if(!f&&g)return 1;if(f&&g)return 0}};var bn=function(){this._edges=new Z,this._ocaMap=new Be};bn.prototype.print=function(t){var e=this;t.print("MULTILINESTRING ( ");for(var n=0;n<this._edges.size();n++){var i=e._edges.get(n);n>0&&t.print(","),t.print("(");for(var s=i.getCoordinates(),a=0;a<s.length;a++)a>0&&t.print(","),t.print(s[a].x+" "+s[a].y);t.println(")")}t.print(") ")},bn.prototype.addAll=function(t){for(var e=this,n=t.iterator();n.hasNext();)e.add(n.next())},bn.prototype.findEdgeIndex=function(t){for(var e=this,n=0;n<this._edges.size();n++)if(e._edges.get(n).equals(t))return n;return-1},bn.prototype.iterator=function(){return this._edges.iterator()},bn.prototype.getEdges=function(){return this._edges},bn.prototype.get=function(t){return this._edges.get(t)},bn.prototype.findEqualEdge=function(t){var e=new Es(t.getCoordinates()),n=this._ocaMap.get(e);return n},bn.prototype.add=function(t){this._edges.add(t);var e=new Es(t.getCoordinates());this._ocaMap.put(e,t)},bn.prototype.interfaces_=function(){return[]},bn.prototype.getClass=function(){return bn};var na=function(){};na.prototype.processIntersections=function(t,e,n,i){},na.prototype.isDone=function(){},na.prototype.interfaces_=function(){return[]},na.prototype.getClass=function(){return na};var qr=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var t=arguments[0];this._li=t};qr.prototype.isTrivialIntersection=function(t,e,n,i){if(t===n&&this._li.getIntersectionNum()===1){if(qr.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var s=t.size()-1;if(e===0&&i===s||i===0&&e===s)return!0}}return!1},qr.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},qr.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},qr.prototype.getLineIntersector=function(){return this._li},qr.prototype.hasProperIntersection=function(){return this._hasProper},qr.prototype.processIntersections=function(t,e,n,i){if(t===n&&e===i)return null;this.numTests++;var s=t.getCoordinates()[e],a=t.getCoordinates()[e+1],o=n.getCoordinates()[i],l=n.getCoordinates()[i+1];this._li.computeIntersection(s,a,o,l),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(t,e,n,i)||(this._hasIntersection=!0,t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},qr.prototype.hasIntersection=function(){return this._hasIntersection},qr.prototype.isDone=function(){return!1},qr.prototype.hasInteriorIntersection=function(){return this._hasInterior},qr.prototype.interfaces_=function(){return[na]},qr.prototype.getClass=function(){return qr},qr.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var $n=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],e=arguments[1],n=arguments[2];this.coord=new L(t),this.segmentIndex=e,this.dist=n};$n.prototype.getSegmentIndex=function(){return this.segmentIndex},$n.prototype.getCoordinate=function(){return this.coord},$n.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex),t.println(" dist = "+this.dist)},$n.prototype.compareTo=function(t){var e=t;return this.compare(e.segmentIndex,e.dist)},$n.prototype.isEndPoint=function(t){return this.segmentIndex===0&&this.dist===0||this.segmentIndex===t},$n.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},$n.prototype.getDistance=function(){return this.dist},$n.prototype.compare=function(t,e){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<e?-1:this.dist>e?1:0},$n.prototype.interfaces_=function(){return[Zr]},$n.prototype.getClass=function(){return $n};var wi=function(){this._nodeMap=new Be,this.edge=null;var t=arguments[0];this.edge=t};wi.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}},wi.prototype.iterator=function(){return this._nodeMap.values().iterator()},wi.prototype.addSplitEdges=function(t){var e=this;this.addEndpoints();for(var n=this.iterator(),i=n.next();n.hasNext();){var s=n.next(),a=e.createSplitEdge(i,s);t.add(a),i=s}},wi.prototype.addEndpoints=function(){var t=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[t],t,0)},wi.prototype.createSplitEdge=function(t,e){var n=this,i=e.segmentIndex-t.segmentIndex+2,s=this.edge.pts[e.segmentIndex],a=e.dist>0||!e.coord.equals2D(s);a||i--;var o=new Array(i).fill(null),l=0;o[l++]=new L(t.coord);for(var u=t.segmentIndex+1;u<=e.segmentIndex;u++)o[l++]=n.edge.pts[u];return a&&(o[l]=e.coord),new yc(o,new Jt(this.edge._label))},wi.prototype.add=function(t,e,n){var i=new $n(t,e,n),s=this._nodeMap.get(i);return s!==null?s:(this._nodeMap.put(i,i),i)},wi.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();if(n.coord.equals(t))return!0}return!1},wi.prototype.interfaces_=function(){return[]},wi.prototype.getClass=function(){return wi};var ia=function(){};ia.prototype.getChainStartIndices=function(t){var e=this,n=0,i=new Z;i.add(new Un(n));do{var s=e.findChainEnd(t,n);i.add(new Un(s)),n=s}while(n<t.length-1);var a=ia.toIntArray(i);return a},ia.prototype.findChainEnd=function(t,e){for(var n=Qt.quadrant(t[e],t[e+1]),i=e+1;i<t.length;){var s=Qt.quadrant(t[i-1],t[i]);if(s!==n)break;i++}return i-1},ia.prototype.interfaces_=function(){return[]},ia.prototype.getClass=function(){return ia},ia.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e};var Ki=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new dt,this.env2=new dt;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var e=new ia;this.startIndex=e.getChainStartIndices(this.pts)};Ki.prototype.getCoordinates=function(){return this.pts},Ki.prototype.getMaxX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e>n?e:n},Ki.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e<n?e:n},Ki.prototype.computeIntersectsForChain=function(){if(arguments.length===4){var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],e,e.startIndex[n],e.startIndex[n+1],i)}else if(arguments.length===6){var s=arguments[0],a=arguments[1],o=arguments[2],l=arguments[3],u=arguments[4],c=arguments[5],h=this.pts[s],f=this.pts[a],g=o.pts[l],m=o.pts[u];if(a-s===1&&u-l===1)return c.addIntersections(this.e,s,o.e,l),null;if(this.env1.init(h,f),this.env2.init(g,m),!this.env1.intersects(this.env2))return null;var _=Math.trunc((s+a)/2),E=Math.trunc((l+u)/2);s<_&&(l<E&&this.computeIntersectsForChain(s,_,o,l,E,c),E<u&&this.computeIntersectsForChain(s,_,o,E,u,c)),_<a&&(l<E&&this.computeIntersectsForChain(_,a,o,l,E,c),E<u&&this.computeIntersectsForChain(_,a,o,E,u,c))}},Ki.prototype.getStartIndexes=function(){return this.startIndex},Ki.prototype.computeIntersects=function(t,e){for(var n=this,i=0;i<this.startIndex.length-1;i++)for(var s=0;s<t.startIndex.length-1;s++)n.computeIntersectsForChain(i,t,s,e)},Ki.prototype.interfaces_=function(){return[]},Ki.prototype.getClass=function(){return Ki};var Ue=function r(){var t=this;this._depth=Array(2).fill().map(function(){return Array(3)});for(var e=0;e<2;e++)for(var n=0;n<3;n++)t._depth[e][n]=r.NULL_VALUE},Sg={NULL_VALUE:{configurable:!0}};Ue.prototype.getDepth=function(t,e){return this._depth[t][e]},Ue.prototype.setDepth=function(t,e,n){this._depth[t][e]=n},Ue.prototype.isNull=function(){var t=this;if(arguments.length===0){for(var e=0;e<2;e++)for(var n=0;n<3;n++)if(t._depth[e][n]!==Ue.NULL_VALUE)return!1;return!0}else if(arguments.length===1){var i=arguments[0];return this._depth[i][1]===Ue.NULL_VALUE}else if(arguments.length===2){var s=arguments[0],a=arguments[1];return this._depth[s][a]===Ue.NULL_VALUE}},Ue.prototype.normalize=function(){for(var t=this,e=0;e<2;e++)if(!t.isNull(e)){var n=t._depth[e][1];t._depth[e][2]<n&&(n=t._depth[e][2]),n<0&&(n=0);for(var i=1;i<3;i++){var s=0;t._depth[e][i]>n&&(s=1),t._depth[e][i]=s}}},Ue.prototype.getDelta=function(t){return this._depth[t][K.RIGHT]-this._depth[t][K.LEFT]},Ue.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?F.EXTERIOR:F.INTERIOR},Ue.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},Ue.prototype.add=function(){var t=this;if(arguments.length===1)for(var e=arguments[0],n=0;n<2;n++)for(var i=1;i<3;i++){var s=e.getLocation(n,i);(s===F.EXTERIOR||s===F.INTERIOR)&&(t.isNull(n,i)?t._depth[n][i]=Ue.depthAtLocation(s):t._depth[n][i]+=Ue.depthAtLocation(s))}else if(arguments.length===3){var a=arguments[0],o=arguments[1],l=arguments[2];l===F.INTERIOR&&this._depth[a][o]++}},Ue.prototype.interfaces_=function(){return[]},Ue.prototype.getClass=function(){return Ue},Ue.depthAtLocation=function(t){return t===F.EXTERIOR?0:t===F.INTERIOR?1:Ue.NULL_VALUE},Sg.NULL_VALUE.get=function(){return-1},Object.defineProperties(Ue,Sg);var yc=function(r){function t(){if(r.call(this),this.pts=null,this._env=null,this.eiList=new wi(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new Ue,this._depthDelta=0,arguments.length===1){var e=arguments[0];t.call(this,e,null)}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.pts=n,this._label=i}}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.getDepth=function(){return this._depth},t.prototype.getCollapsedEdge=function(){var n=new Array(2).fill(null);n[0]=this.pts[0],n[1]=this.pts[1];var i=new t(n,Jt.toLineLabel(this._label));return i},t.prototype.isIsolated=function(){return this._isIsolated},t.prototype.getCoordinates=function(){return this.pts},t.prototype.setIsolated=function(n){this._isIsolated=n},t.prototype.setName=function(n){this._name=n},t.prototype.equals=function(n){var i=this;if(!(n instanceof t))return!1;var s=n;if(this.pts.length!==s.pts.length)return!1;for(var a=!0,o=!0,l=this.pts.length,u=0;u<this.pts.length;u++)if(i.pts[u].equals2D(s.pts[u])||(a=!1),i.pts[u].equals2D(s.pts[--l])||(o=!1),!a&&!o)return!1;return!0},t.prototype.getCoordinate=function(){if(arguments.length===0)return this.pts.length>0?this.pts[0]:null;if(arguments.length===1){var n=arguments[0];return this.pts[n]}},t.prototype.print=function(n){var i=this;n.print("edge "+this._name+": "),n.print("LINESTRING (");for(var s=0;s<this.pts.length;s++)s>0&&n.print(","),n.print(i.pts[s].x+" "+i.pts[s].y);n.print(") "+this._label+" "+this._depthDelta)},t.prototype.computeIM=function(n){t.updateIM(this._label,n)},t.prototype.isCollapsed=function(){return!this._label.isArea()||this.pts.length!==3?!1:!!this.pts[0].equals(this.pts[2])},t.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},t.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},t.prototype.getDepthDelta=function(){return this._depthDelta},t.prototype.getNumPoints=function(){return this.pts.length},t.prototype.printReverse=function(n){var i=this;n.print("edge "+this._name+": ");for(var s=this.pts.length-1;s>=0;s--)n.print(i.pts[s]+" ");n.println("")},t.prototype.getMonotoneChainEdge=function(){return this._mce===null&&(this._mce=new Ki(this)),this._mce},t.prototype.getEnvelope=function(){var n=this;if(this._env===null){this._env=new dt;for(var i=0;i<this.pts.length;i++)n._env.expandToInclude(n.pts[i])}return this._env},t.prototype.addIntersection=function(n,i,s,a){var o=new L(n.getIntersection(a)),l=i,u=n.getEdgeDistance(s,a),c=l+1;if(c<this.pts.length){var h=this.pts[c];o.equals2D(h)&&(l=c,u=0)}this.eiList.add(o,l,u)},t.prototype.toString=function(){var n=this,i=new Vn;i.append("edge "+this._name+": "),i.append("LINESTRING (");for(var s=0;s<this.pts.length;s++)s>0&&i.append(","),i.append(n.pts[s].x+" "+n.pts[s].y);return i.append(") "+this._label+" "+this._depthDelta),i.toString()},t.prototype.isPointwiseEqual=function(n){var i=this;if(this.pts.length!==n.pts.length)return!1;for(var s=0;s<this.pts.length;s++)if(!i.pts[s].equals2D(n.pts[s]))return!1;return!0},t.prototype.setDepthDelta=function(n){this._depthDelta=n},t.prototype.getEdgeIntersectionList=function(){return this.eiList},t.prototype.addIntersections=function(n,i,s){for(var a=this,o=0;o<n.getIntersectionNum();o++)a.addIntersection(n,i,s,o)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.updateIM=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1];i.setAtLeastIfValid(n.getLocation(0,K.ON),n.getLocation(1,K.ON),1),n.isArea()&&(i.setAtLeastIfValid(n.getLocation(0,K.LEFT),n.getLocation(1,K.LEFT),2),i.setAtLeastIfValid(n.getLocation(0,K.RIGHT),n.getLocation(1,K.RIGHT),2))}else return r.prototype.updateIM.apply(this,arguments)},t}(zr),ir=function(t){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new bn,this._bufParams=t||null};ir.prototype.setWorkingPrecisionModel=function(t){this._workingPrecisionModel=t},ir.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(e!==null){var n=e.getLabel(),i=t.getLabel();e.isPointwiseEqual(t)||(i=new Jt(t.getLabel()),i.flip()),n.merge(i);var s=ir.depthDelta(i),a=e.getDepthDelta(),o=a+s;e.setDepthDelta(o)}else this._edgeList.add(t),t.setDepthDelta(ir.depthDelta(t.getLabel()))},ir.prototype.buildSubgraphs=function(t,e){for(var n=new Z,i=t.iterator();i.hasNext();){var s=i.next(),a=s.getRightmostCoordinate(),o=new Wa(n),l=o.getDepth(a);s.computeDepth(l),s.findResultEdges(),n.add(s),e.add(s.getDirectedEdges(),s.getNodes())}},ir.prototype.createSubgraphs=function(t){for(var e=new Z,n=t.getNodes().iterator();n.hasNext();){var i=n.next();if(!i.isVisited()){var s=new rr;s.create(i),e.add(s)}}return Nn.sort(e,Nn.reverseOrder()),e},ir.prototype.createEmptyResultGeometry=function(){var t=this._geomFact.createPolygon();return t},ir.prototype.getNoder=function(t){if(this._workingNoder!==null)return this._workingNoder;var e=new Jf,n=new Zs;return n.setPrecisionModel(t),e.setSegmentIntersector(new qr(n)),e},ir.prototype.buffer=function(t,e){var n=this._workingPrecisionModel;n===null&&(n=t.getPrecisionModel()),this._geomFact=t.getFactory();var i=new dr(n,this._bufParams),s=new nn(t,e,i),a=s.getCurves();if(a.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(a,n),this._graph=new fe(new Eg),this._graph.addEdges(this._edgeList.getEdges());var o=this.createSubgraphs(this._graph),l=new br(this._geomFact);this.buildSubgraphs(o,l);var u=l.getPolygons();if(u.size()<=0)return this.createEmptyResultGeometry();var c=this._geomFact.buildGeometry(u);return c},ir.prototype.computeNodedEdges=function(t,e){var n=this,i=this.getNoder(e);i.computeNodes(t);for(var s=i.getNodedSubstrings(),a=s.iterator();a.hasNext();){var o=a.next(),l=o.getCoordinates();if(!(l.length===2&&l[0].equals2D(l[1]))){var u=o.getData(),c=new yc(o.getCoordinates(),new Jt(u));n.insertUniqueEdge(c)}}},ir.prototype.setNoder=function(t){this._workingNoder=t},ir.prototype.interfaces_=function(){return[]},ir.prototype.getClass=function(){return ir},ir.depthDelta=function(t){var e=t.getLocation(0,K.LEFT),n=t.getLocation(0,K.RIGHT);return e===F.INTERIOR&&n===F.EXTERIOR?1:e===F.EXTERIOR&&n===F.INTERIOR?-1:0},ir.convertSegStrings=function(t){for(var e=new Dt,n=new Z;t.hasNext();){var i=t.next(),s=e.createLineString(i.getCoordinates());n.add(s)}return e.buildGeometry(n)};var Ss=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,arguments.length===2){var t=arguments[0],e=arguments[1];this._noder=t,this._scaleFactor=e,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(arguments.length===4){var n=arguments[0],i=arguments[1],s=arguments[2],a=arguments[3];this._noder=n,this._scaleFactor=i,this._offsetX=s,this._offsetY=a,this._isScaled=!this.isIntegerPrecision()}};Ss.prototype.rescale=function(){var t=this;if(_t(arguments[0],Me))for(var e=arguments[0],n=e.iterator();n.hasNext();){var i=n.next();t.rescale(i.getCoordinates())}else if(arguments[0]instanceof Array){for(var s=arguments[0],a=0;a<s.length;a++)s[a].x=s[a].x/t._scaleFactor+t._offsetX,s[a].y=s[a].y/t._scaleFactor+t._offsetY;s.length===2&&s[0].equals2D(s[1])&&Ve.out.println(s)}},Ss.prototype.scale=function(){var t=this;if(_t(arguments[0],Me)){for(var e=arguments[0],n=new Z,i=e.iterator();i.hasNext();){var s=i.next();n.add(new _e(t.scale(s.getCoordinates()),s.getData()))}return n}else if(arguments[0]instanceof Array){for(var a=arguments[0],o=new Array(a.length).fill(null),l=0;l<a.length;l++)o[l]=new L(Math.round((a[l].x-t._offsetX)*t._scaleFactor),Math.round((a[l].y-t._offsetY)*t._scaleFactor),a[l].z);var u=Tt.removeRepeatedPoints(o);return u}},Ss.prototype.isIntegerPrecision=function(){return this._scaleFactor===1},Ss.prototype.getNodedSubstrings=function(){var t=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(t),t},Ss.prototype.computeNodes=function(t){var e=t;this._isScaled&&(e=this.scale(t)),this._noder.computeNodes(e)},Ss.prototype.interfaces_=function(){return[ea]},Ss.prototype.getClass=function(){return Ss};var jn=function(){this._li=new Zs,this._segStrings=null;var t=arguments[0];this._segStrings=t},Pg={fact:{configurable:!0}};jn.prototype.checkEndPtVertexIntersections=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();){var n=e.next(),i=n.getCoordinates();t.checkEndPtVertexIntersections(i[0],t._segStrings),t.checkEndPtVertexIntersections(i[i.length-1],t._segStrings)}else if(arguments.length===2){for(var s=arguments[0],a=arguments[1],o=a.iterator();o.hasNext();)for(var l=o.next(),u=l.getCoordinates(),c=1;c<u.length-1;c++)if(u[c].equals(s))throw new zi("found endpt/interior pt intersection at index "+c+" :pt "+s)}},jn.prototype.checkInteriorIntersections=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();)for(var n=e.next(),i=this._segStrings.iterator();i.hasNext();){var s=i.next();t.checkInteriorIntersections(n,s)}else if(arguments.length===2)for(var a=arguments[0],o=arguments[1],l=a.getCoordinates(),u=o.getCoordinates(),c=0;c<l.length-1;c++)for(var h=0;h<u.length-1;h++)t.checkInteriorIntersections(a,c,o,h);else if(arguments.length===4){var f=arguments[0],g=arguments[1],m=arguments[2],_=arguments[3];if(f===m&&g===_)return null;var E=f.getCoordinates()[g],M=f.getCoordinates()[g+1],y=m.getCoordinates()[_],w=m.getCoordinates()[_+1];if(this._li.computeIntersection(E,M,y,w),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,E,M)||this.hasInteriorIntersection(this._li,y,w)))throw new zi("found non-noded intersection at "+E+"-"+M+" and "+y+"-"+w)}},jn.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},jn.prototype.checkCollapses=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();){var n=e.next();t.checkCollapses(n)}else if(arguments.length===1)for(var i=arguments[0],s=i.getCoordinates(),a=0;a<s.length-2;a++)t.checkCollapse(s[a],s[a+1],s[a+2])},jn.prototype.hasInteriorIntersection=function(t,e,n){for(var i=0;i<t.getIntersectionNum();i++){var s=t.getIntersection(i);if(!(s.equals(e)||s.equals(n)))return!0}return!1},jn.prototype.checkCollapse=function(t,e,n){if(t.equals(n))throw new zi("found non-noded collapse at "+jn.fact.createLineString([t,e,n]))},jn.prototype.interfaces_=function(){return[]},jn.prototype.getClass=function(){return jn},Pg.fact.get=function(){return new Dt},Object.defineProperties(jn,Pg);var pr=function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var t=arguments[0],e=arguments[1],n=arguments[2];if(this._originalPt=t,this._pt=t,this._scaleFactor=e,this._li=n,e<=0)throw new oe("Scale factor must be non-zero");e!==1&&(this._pt=new L(this.scale(t.x),this.scale(t.y)),this._p0Scaled=new L,this._p1Scaled=new L),this.initCorners(this._pt)},Cg={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};pr.prototype.intersectsScaled=function(t,e){var n=Math.min(t.x,e.x),i=Math.max(t.x,e.x),s=Math.min(t.y,e.y),a=Math.max(t.y,e.y),o=this._maxx<n||this._minx>i||this._maxy<s||this._miny>a;if(o)return!1;var l=this.intersectsToleranceSquare(t,e);return Mt.isTrue(!(o&&l),"Found bad envelope test"),l},pr.prototype.initCorners=function(t){var e=.5;this._minx=t.x-e,this._maxx=t.x+e,this._miny=t.y-e,this._maxy=t.y+e,this._corner[0]=new L(this._maxx,this._maxy),this._corner[1]=new L(this._minx,this._maxy),this._corner[2]=new L(this._minx,this._miny),this._corner[3]=new L(this._maxx,this._miny)},pr.prototype.intersects=function(t,e){return this._scaleFactor===1?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},pr.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},pr.prototype.getCoordinate=function(){return this._originalPt},pr.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},pr.prototype.getSafeEnvelope=function(){if(this._safeEnv===null){var t=pr.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new dt(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},pr.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.hasIntersection()))},pr.prototype.intersectsToleranceSquare=function(t,e){var n=!1,i=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.isProper())||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.isProper())||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.isProper())||n&&i||t.equals(this._pt)||e.equals(this._pt))},pr.prototype.addSnappedNode=function(t,e){var n=t.getCoordinate(e),i=t.getCoordinate(e+1);return this.intersects(n,i)?(t.addIntersection(this.getCoordinate(),e),!0):!1},pr.prototype.interfaces_=function(){return[]},pr.prototype.getClass=function(){return pr},Cg.SAFE_ENV_EXPANSION_FACTOR.get=function(){return .75},Object.defineProperties(pr,Cg);var lh=function(){this.tempEnv1=new dt,this.selectedSegment=new pt};lh.prototype.select=function(){if(arguments.length!==1){if(arguments.length===2){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}}},lh.prototype.interfaces_=function(){return[]},lh.prototype.getClass=function(){return lh};var uu=function(){this._index=null;var t=arguments[0];this._index=t},Ig={HotPixelSnapAction:{configurable:!0}};uu.prototype.snap=function(){if(arguments.length===1){var t=arguments[0];return this.snap(t,null,-1)}else if(arguments.length===3){var e=arguments[0],n=arguments[1],i=arguments[2],s=e.getSafeEnvelope(),a=new Mg(e,n,i);return this._index.query(s,{interfaces_:function(){return[_s]},visitItem:function(o){var l=o;l.select(s,a)}}),a.isNodeAdded()}},uu.prototype.interfaces_=function(){return[]},uu.prototype.getClass=function(){return uu},Ig.HotPixelSnapAction.get=function(){return Mg},Object.defineProperties(uu,Ig);var Mg=function(r){function t(){r.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],n=arguments[1],i=arguments[2];this._hotPixel=e,this._parentEdge=n,this._hotPixelVertexIndex=i}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.isNodeAdded=function(){return this._isNodeAdded},t.prototype.select=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1],s=n.getContext();if(this._parentEdge!==null&&s===this._parentEdge&&i===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(s,i)}else return r.prototype.select.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(lh),Ha=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new Z};Ha.prototype.processIntersections=function(t,e,n,i){var s=this;if(t===n&&e===i)return null;var a=t.getCoordinates()[e],o=t.getCoordinates()[e+1],l=n.getCoordinates()[i],u=n.getCoordinates()[i+1];if(this._li.computeIntersection(a,o,l,u),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var c=0;c<this._li.getIntersectionNum();c++)s._interiorIntersections.add(s._li.getIntersection(c));t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1)}},Ha.prototype.isDone=function(){return!1},Ha.prototype.getInteriorIntersections=function(){return this._interiorIntersections},Ha.prototype.interfaces_=function(){return[na]},Ha.prototype.getClass=function(){return Ha};var Ei=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var t=arguments[0];this._pm=t,this._li=new Zs,this._li.setPrecisionModel(t),this._scaleFactor=t.getScale()};Ei.prototype.checkCorrectness=function(t){var e=_e.getNodedSubstrings(t),n=new jn(e);try{n.checkValid()}catch(i){if(i instanceof sg)i.printStackTrace();else throw i}finally{}},Ei.prototype.getNodedSubstrings=function(){return _e.getNodedSubstrings(this._nodedSegStrings)},Ei.prototype.snapRound=function(t,e){var n=this.findInteriorIntersections(t,e);this.computeIntersectionSnaps(n),this.computeVertexSnaps(t)},Ei.prototype.findInteriorIntersections=function(t,e){var n=new Ha(e);return this._noder.setSegmentIntersector(n),this._noder.computeNodes(t),n.getInteriorIntersections()},Ei.prototype.computeVertexSnaps=function(){var t=this;if(_t(arguments[0],Me))for(var e=arguments[0],n=e.iterator();n.hasNext();){var i=n.next();t.computeVertexSnaps(i)}else if(arguments[0]instanceof _e)for(var s=arguments[0],a=s.getCoordinates(),o=0;o<a.length;o++){var l=new pr(a[o],t._scaleFactor,t._li),u=t._pointSnapper.snap(l,s,o);u&&s.addIntersection(a[o],o)}},Ei.prototype.computeNodes=function(t){this._nodedSegStrings=t,this._noder=new Jf,this._pointSnapper=new uu(this._noder.getIndex()),this.snapRound(t,this._li)},Ei.prototype.computeIntersectionSnaps=function(t){for(var e=this,n=t.iterator();n.hasNext();){var i=n.next(),s=new pr(i,e._scaleFactor,e._li);e._pointSnapper.snap(s)}},Ei.prototype.interfaces_=function(){return[ea]},Ei.prototype.getClass=function(){return Ei};var qe=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new qt,this._resultGeometry=null,this._saveException=null,arguments.length===1){var t=arguments[0];this._argGeom=t}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this._argGeom=e,this._bufParams=n}},hu={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};qe.prototype.bufferFixedPrecision=function(t){var e=new Ss(new Ei(new Ut(1)),t.getScale()),n=new ir(this._bufParams);n.setWorkingPrecisionModel(t),n.setNoder(e),this._resultGeometry=n.buffer(this._argGeom,this._distance)},qe.prototype.bufferReducedPrecision=function(){var t=this;if(arguments.length===0){for(var e=qe.MAX_PRECISION_DIGITS;e>=0;e--){try{t.bufferReducedPrecision(e)}catch(a){if(a instanceof Xi)t._saveException=a;else throw a}finally{}if(t._resultGeometry!==null)return null}throw this._saveException}else if(arguments.length===1){var n=arguments[0],i=qe.precisionScaleFactor(this._argGeom,this._distance,n),s=new Ut(i);this.bufferFixedPrecision(s)}},qe.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===Ut.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},qe.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},qe.prototype.bufferOriginalPrecision=function(){try{var t=new ir(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(e){if(e instanceof zi)this._saveException=e;else throw e}finally{}},qe.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},qe.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},qe.prototype.interfaces_=function(){return[]},qe.prototype.getClass=function(){return qe},qe.bufferOp=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new qe(t),i=n.getResultGeometry(e);return i}else if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof yt&&typeof arguments[1]=="number"){var s=arguments[0],a=arguments[1],o=arguments[2],l=new qe(s);l.setQuadrantSegments(o);var u=l.getResultGeometry(a);return u}else if(arguments[2]instanceof qt&&arguments[0]instanceof yt&&typeof arguments[1]=="number"){var c=arguments[0],h=arguments[1],f=arguments[2],g=new qe(c,f),m=g.getResultGeometry(h);return m}}else if(arguments.length===4){var _=arguments[0],E=arguments[1],M=arguments[2],y=arguments[3],w=new qe(_);w.setQuadrantSegments(M),w.setEndCapStyle(y);var v=w.getResultGeometry(E);return v}},qe.precisionScaleFactor=function(t,e,n){var i=t.getEnvelopeInternal(),s=kr.max(Math.abs(i.getMaxX()),Math.abs(i.getMaxY()),Math.abs(i.getMinX()),Math.abs(i.getMinY())),a=e>0?e:0,o=s+2*a,l=Math.trunc(Math.log(o)/Math.log(10)+1),u=n-l,c=Math.pow(10,u);return c},hu.CAP_ROUND.get=function(){return qt.CAP_ROUND},hu.CAP_BUTT.get=function(){return qt.CAP_FLAT},hu.CAP_FLAT.get=function(){return qt.CAP_FLAT},hu.CAP_SQUARE.get=function(){return qt.CAP_SQUARE},hu.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(qe,hu);var sr=function(){this._pt=[new L,new L],this._distance=wt.NaN,this._isNull=!0};sr.prototype.getCoordinates=function(){return this._pt},sr.prototype.getCoordinate=function(t){return this._pt[t]},sr.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i<this._distance&&this.initialize(e,n,i)}},sr.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(i),this._distance=s,this._isNull=!1}},sr.prototype.getDistance=function(){return this._distance},sr.prototype.setMaximum=function(){if(arguments.length===1){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i>this._distance&&this.initialize(e,n,i)}},sr.prototype.interfaces_=function(){return[]},sr.prototype.getClass=function(){return sr};var Si=function(){};Si.prototype.interfaces_=function(){return[]},Si.prototype.getClass=function(){return Si},Si.computeDistance=function(){if(arguments[2]instanceof sr&&arguments[0]instanceof pe&&arguments[1]instanceof L)for(var t=arguments[0],e=arguments[1],n=arguments[2],i=t.getCoordinates(),s=new pt,a=0;a<i.length-1;a++){s.setCoordinates(i[a],i[a+1]);var o=s.closestPoint(e);n.setMinimum(o,e)}else if(arguments[2]instanceof sr&&arguments[0]instanceof Ne&&arguments[1]instanceof L){var l=arguments[0],u=arguments[1],c=arguments[2];Si.computeDistance(l.getExteriorRing(),u,c);for(var h=0;h<l.getNumInteriorRing();h++)Si.computeDistance(l.getInteriorRingN(h),u,c)}else if(arguments[2]instanceof sr&&arguments[0]instanceof yt&&arguments[1]instanceof L){var f=arguments[0],g=arguments[1],m=arguments[2];if(f instanceof pe)Si.computeDistance(f,g,m);else if(f instanceof Ne)Si.computeDistance(f,g,m);else if(f instanceof er)for(var _=f,E=0;E<_.getNumGeometries();E++){var M=_.getGeometryN(E);Si.computeDistance(M,g,m)}else m.setMinimum(f.getCoordinate(),g)}else if(arguments[2]instanceof sr&&arguments[0]instanceof pt&&arguments[1]instanceof L){var y=arguments[0],w=arguments[1],v=arguments[2],S=y.closestPoint(w);v.setMinimum(S,w)}};var sa=function(t){this._maxPtDist=new sr,this._inputGeom=t||null},Kf={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};sa.prototype.computeMaxMidpointDistance=function(t){var e=new Ps(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},sa.prototype.computeMaxVertexDistance=function(t){var e=new Xa(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},sa.prototype.findDistance=function(t){return this.computeMaxVertexDistance(t),this.computeMaxMidpointDistance(t),this._maxPtDist.getDistance()},sa.prototype.getDistancePoints=function(){return this._maxPtDist},sa.prototype.interfaces_=function(){return[]},sa.prototype.getClass=function(){return sa},Kf.MaxPointDistanceFilter.get=function(){return Xa},Kf.MaxMidpointDistanceFilter.get=function(){return Ps},Object.defineProperties(sa,Kf);var Xa=function(t){this._maxPtDist=new sr,this._minPtDist=new sr,this._geom=t||null};Xa.prototype.filter=function(t){this._minPtDist.initialize(),Si.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Xa.prototype.getMaxPointDistance=function(){return this._maxPtDist},Xa.prototype.interfaces_=function(){return[pi]},Xa.prototype.getClass=function(){return Xa};var Ps=function(t){this._maxPtDist=new sr,this._minPtDist=new sr,this._geom=t||null};Ps.prototype.filter=function(t,e){if(e===0)return null;var n=t.getCoordinate(e-1),i=t.getCoordinate(e),s=new L((n.x+i.x)/2,(n.y+i.y)/2);this._minPtDist.initialize(),Si.computeDistance(this._geom,s,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Ps.prototype.isDone=function(){return!1},Ps.prototype.isGeometryChanged=function(){return!1},Ps.prototype.getMaxPointDistance=function(){return this._maxPtDist},Ps.prototype.interfaces_=function(){return[In]},Ps.prototype.getClass=function(){return Ps};var Qi=function(t){this._comps=t||null};Qi.prototype.filter=function(t){t instanceof Ne&&this._comps.add(t)},Qi.prototype.interfaces_=function(){return[Xn]},Qi.prototype.getClass=function(){return Qi},Qi.getPolygons=function(){if(arguments.length===1){var t=arguments[0];return Qi.getPolygons(t,new Z)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return e instanceof Ne?n.add(e):e instanceof er&&e.apply(new Qi(n)),n}};var We=function(){if(this._lines=null,this._isForcedToLineString=!1,arguments.length===1){var t=arguments[0];this._lines=t}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this._lines=e,this._isForcedToLineString=n}};We.prototype.filter=function(t){if(this._isForcedToLineString&&t instanceof gi){var e=t.getFactory().createLineString(t.getCoordinateSequence());return this._lines.add(e),null}t instanceof pe&&this._lines.add(t)},We.prototype.setForceToLineString=function(t){this._isForcedToLineString=t},We.prototype.interfaces_=function(){return[Vi]},We.prototype.getClass=function(){return We},We.getGeometry=function(){if(arguments.length===1){var t=arguments[0];return t.getFactory().buildGeometry(We.getLines(t))}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return e.getFactory().buildGeometry(We.getLines(e,n))}},We.getLines=function(){if(arguments.length===1){var t=arguments[0];return We.getLines(t,!1)}else if(arguments.length===2){if(_t(arguments[0],Me)&&_t(arguments[1],Me)){for(var e=arguments[0],n=arguments[1],i=e.iterator();i.hasNext();){var s=i.next();We.getLines(s,n)}return n}else if(arguments[0]instanceof yt&&typeof arguments[1]=="boolean"){var a=arguments[0],o=arguments[1],l=new Z;return a.apply(new We(l,o)),l}else if(arguments[0]instanceof yt&&_t(arguments[1],Me)){var u=arguments[0],c=arguments[1];return u instanceof pe?c.add(u):u.apply(new We(c)),c}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&_t(arguments[0],Me)&&_t(arguments[1],Me)){for(var h=arguments[0],f=arguments[1],g=arguments[2],m=h.iterator();m.hasNext();){var _=m.next();We.getLines(_,f,g)}return f}else if(typeof arguments[2]=="boolean"&&arguments[0]instanceof yt&&_t(arguments[1],Me)){var E=arguments[0],M=arguments[1],y=arguments[2];return E.apply(new We(M,y)),M}}};var Tn=function(){if(this._boundaryRule=jr.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];if(t===null)throw new oe("Rule must be non-null");this._boundaryRule=t}}};Tn.prototype.locateInternal=function(){var t=this;if(arguments[0]instanceof L&&arguments[1]instanceof Ne){var e=arguments[0],n=arguments[1];if(n.isEmpty())return F.EXTERIOR;var i=n.getExteriorRing(),s=this.locateInPolygonRing(e,i);if(s===F.EXTERIOR)return F.EXTERIOR;if(s===F.BOUNDARY)return F.BOUNDARY;for(var a=0;a<n.getNumInteriorRing();a++){var o=n.getInteriorRingN(a),l=t.locateInPolygonRing(e,o);if(l===F.INTERIOR)return F.EXTERIOR;if(l===F.BOUNDARY)return F.BOUNDARY}return F.INTERIOR}else if(arguments[0]instanceof L&&arguments[1]instanceof pe){var u=arguments[0],c=arguments[1];if(!c.getEnvelopeInternal().intersects(u))return F.EXTERIOR;var h=c.getCoordinates();return!c.isClosed()&&(u.equals(h[0])||u.equals(h[h.length-1]))?F.BOUNDARY:et.isOnLine(u,h)?F.INTERIOR:F.EXTERIOR}else if(arguments[0]instanceof L&&arguments[1]instanceof Nr){var f=arguments[0],g=arguments[1],m=g.getCoordinate();return m.equals2D(f)?F.INTERIOR:F.EXTERIOR}},Tn.prototype.locateInPolygonRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?et.locatePointInRing(t,e.getCoordinates()):F.EXTERIOR},Tn.prototype.intersects=function(t,e){return this.locate(t,e)!==F.EXTERIOR},Tn.prototype.updateLocationInfo=function(t){t===F.INTERIOR&&(this._isIn=!0),t===F.BOUNDARY&&this._numBoundaries++},Tn.prototype.computeLocation=function(t,e){var n=this;if(e instanceof Nr&&this.updateLocationInfo(this.locateInternal(t,e)),e instanceof pe)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Ne)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof ta)for(var i=e,s=0;s<i.getNumGeometries();s++){var a=i.getGeometryN(s);n.updateLocationInfo(n.locateInternal(t,a))}else if(e instanceof mi)for(var o=e,l=0;l<o.getNumGeometries();l++){var u=o.getGeometryN(l);n.updateLocationInfo(n.locateInternal(t,u))}else if(e instanceof er)for(var c=new _i(e);c.hasNext();){var h=c.next();h!==e&&n.computeLocation(t,h)}},Tn.prototype.locate=function(t,e){return e.isEmpty()?F.EXTERIOR:e instanceof pe?this.locateInternal(t,e):e instanceof Ne?this.locateInternal(t,e):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(t,e),this._boundaryRule.isInBoundary(this._numBoundaries)?F.BOUNDARY:this._numBoundaries>0||this._isIn?F.INTERIOR:F.EXTERIOR)},Tn.prototype.interfaces_=function(){return[]},Tn.prototype.getClass=function(){return Tn};var ar=function r(){if(this._component=null,this._segIndex=null,this._pt=null,arguments.length===2){var t=arguments[0],e=arguments[1];r.call(this,t,r.INSIDE_AREA,e)}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._component=n,this._segIndex=i,this._pt=s}},Ng={INSIDE_AREA:{configurable:!0}};ar.prototype.isInsideArea=function(){return this._segIndex===ar.INSIDE_AREA},ar.prototype.getCoordinate=function(){return this._pt},ar.prototype.getGeometryComponent=function(){return this._component},ar.prototype.getSegmentIndex=function(){return this._segIndex},ar.prototype.interfaces_=function(){return[]},ar.prototype.getClass=function(){return ar},Ng.INSIDE_AREA.get=function(){return-1},Object.defineProperties(ar,Ng);var Cs=function(t){this._pts=t||null};Cs.prototype.filter=function(t){t instanceof Nr&&this._pts.add(t)},Cs.prototype.interfaces_=function(){return[Xn]},Cs.prototype.getClass=function(){return Cs},Cs.getPoints=function(){if(arguments.length===1){var t=arguments[0];return t instanceof Nr?Nn.singletonList(t):Cs.getPoints(t,new Z)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return e instanceof Nr?n.add(e):e instanceof er&&e.apply(new Cs(n)),n}};var Ya=function(){this._locations=null;var t=arguments[0];this._locations=t};Ya.prototype.filter=function(t){(t instanceof Nr||t instanceof pe||t instanceof Ne)&&this._locations.add(new ar(t,0,t.getCoordinate()))},Ya.prototype.interfaces_=function(){return[Xn]},Ya.prototype.getClass=function(){return Ya},Ya.getLocations=function(t){var e=new Z;return t.apply(new Ya(e)),e};var He=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Tn,this._minDistanceLocation=null,this._minDistance=wt.MAX_VALUE,arguments.length===2){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=i,this._terminateDistance=s}};He.prototype.computeContainmentDistance=function(){var t=this;if(arguments.length===0){var e=new Array(2).fill(null);if(this.computeContainmentDistance(0,e),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,e)}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=1-n,a=Qi.getPolygons(this._geom[n]);if(a.size()>0){var o=Ya.getLocations(this._geom[s]);if(this.computeContainmentDistance(o,a,i),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[s]=i[0],this._minDistanceLocation[n]=i[1],null}}else if(arguments.length===3){if(arguments[2]instanceof Array&&_t(arguments[0],Pn)&&_t(arguments[1],Pn)){for(var l=arguments[0],u=arguments[1],c=arguments[2],h=0;h<l.size();h++)for(var f=l.get(h),g=0;g<u.size();g++)if(t.computeContainmentDistance(f,u.get(g),c),t._minDistance<=t._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof ar&&arguments[1]instanceof Ne){var m=arguments[0],_=arguments[1],E=arguments[2],M=m.getCoordinate();if(F.EXTERIOR!==this._ptLocator.locate(M,_))return this._minDistance=0,E[0]=m,E[1]=new ar(_,M),null}}},He.prototype.computeMinDistanceLinesPoints=function(t,e,n){for(var i=this,s=0;s<t.size();s++)for(var a=t.get(s),o=0;o<e.size();o++){var l=e.get(o);if(i.computeMinDistance(a,l,n),i._minDistance<=i._terminateDistance)return null}},He.prototype.computeFacetDistance=function(){var t=new Array(2).fill(null),e=We.getLines(this._geom[0]),n=We.getLines(this._geom[1]),i=Cs.getPoints(this._geom[0]),s=Cs.getPoints(this._geom[1]);if(this.computeMinDistanceLines(e,n,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(e,s,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance)||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(n,i,t),this.updateMinDistance(t,!0),this._minDistance<=this._terminateDistance))return null;t[0]=null,t[1]=null,this.computeMinDistancePoints(i,s,t),this.updateMinDistance(t,!1)},He.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},He.prototype.updateMinDistance=function(t,e){if(t[0]===null)return null;e?(this._minDistanceLocation[0]=t[1],this._minDistanceLocation[1]=t[0]):(this._minDistanceLocation[0]=t[0],this._minDistanceLocation[1]=t[1])},He.prototype.nearestPoints=function(){this.computeMinDistance();var t=[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()];return t},He.prototype.computeMinDistance=function(){var t=this;if(arguments.length===0){if(this._minDistanceLocation!==null||(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance))return null;this.computeFacetDistance()}else if(arguments.length===3){if(arguments[2]instanceof Array&&arguments[0]instanceof pe&&arguments[1]instanceof Nr){var e=arguments[0],n=arguments[1],i=arguments[2];if(e.getEnvelopeInternal().distance(n.getEnvelopeInternal())>this._minDistance)return null;for(var s=e.getCoordinates(),a=n.getCoordinate(),o=0;o<s.length-1;o++){var l=et.distancePointLine(a,s[o],s[o+1]);if(l<t._minDistance){t._minDistance=l;var u=new pt(s[o],s[o+1]),c=u.closestPoint(a);i[0]=new ar(e,o,c),i[1]=new ar(n,0,a)}if(t._minDistance<=t._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof pe&&arguments[1]instanceof pe){var h=arguments[0],f=arguments[1],g=arguments[2];if(h.getEnvelopeInternal().distance(f.getEnvelopeInternal())>this._minDistance)return null;for(var m=h.getCoordinates(),_=f.getCoordinates(),E=0;E<m.length-1;E++)for(var M=0;M<_.length-1;M++){var y=et.distanceLineLine(m[E],m[E+1],_[M],_[M+1]);if(y<t._minDistance){t._minDistance=y;var w=new pt(m[E],m[E+1]),v=new pt(_[M],_[M+1]),S=w.closestPoints(v);g[0]=new ar(h,E,S[0]),g[1]=new ar(f,M,S[1])}if(t._minDistance<=t._terminateDistance)return null}}}},He.prototype.computeMinDistancePoints=function(t,e,n){for(var i=this,s=0;s<t.size();s++)for(var a=t.get(s),o=0;o<e.size();o++){var l=e.get(o),u=a.getCoordinate().distance(l.getCoordinate());if(u<i._minDistance&&(i._minDistance=u,n[0]=new ar(a,0,a.getCoordinate()),n[1]=new ar(l,0,l.getCoordinate())),i._minDistance<=i._terminateDistance)return null}},He.prototype.distance=function(){if(this._geom[0]===null||this._geom[1]===null)throw new oe("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},He.prototype.computeMinDistanceLines=function(t,e,n){for(var i=this,s=0;s<t.size();s++)for(var a=t.get(s),o=0;o<e.size();o++){var l=e.get(o);if(i.computeMinDistance(a,l,n),i._minDistance<=i._terminateDistance)return null}},He.prototype.interfaces_=function(){return[]},He.prototype.getClass=function(){return He},He.distance=function(t,e){var n=new He(t,e);return n.distance()},He.isWithinDistance=function(t,e,n){var i=new He(t,e,n);return i.distance()<=n},He.nearestPoints=function(t,e){var n=new He(t,e);return n.nearestPoints()};var je=function(){this._pt=[new L,new L],this._distance=wt.NaN,this._isNull=!0};je.prototype.getCoordinates=function(){return this._pt},je.prototype.getCoordinate=function(t){return this._pt[t]},je.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i<this._distance&&this.initialize(e,n,i)}},je.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(i),this._distance=s,this._isNull=!1}},je.prototype.toString=function(){return Sn.toLineString(this._pt[0],this._pt[1])},je.prototype.getDistance=function(){return this._distance},je.prototype.setMaximum=function(){if(arguments.length===1){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i>this._distance&&this.initialize(e,n,i)}},je.prototype.interfaces_=function(){return[]},je.prototype.getClass=function(){return je};var ti=function(){};ti.prototype.interfaces_=function(){return[]},ti.prototype.getClass=function(){return ti},ti.computeDistance=function(){if(arguments[2]instanceof je&&arguments[0]instanceof pe&&arguments[1]instanceof L)for(var t=arguments[0],e=arguments[1],n=arguments[2],i=new pt,s=t.getCoordinates(),a=0;a<s.length-1;a++){i.setCoordinates(s[a],s[a+1]);var o=i.closestPoint(e);n.setMinimum(o,e)}else if(arguments[2]instanceof je&&arguments[0]instanceof Ne&&arguments[1]instanceof L){var l=arguments[0],u=arguments[1],c=arguments[2];ti.computeDistance(l.getExteriorRing(),u,c);for(var h=0;h<l.getNumInteriorRing();h++)ti.computeDistance(l.getInteriorRingN(h),u,c)}else if(arguments[2]instanceof je&&arguments[0]instanceof yt&&arguments[1]instanceof L){var f=arguments[0],g=arguments[1],m=arguments[2];if(f instanceof pe)ti.computeDistance(f,g,m);else if(f instanceof Ne)ti.computeDistance(f,g,m);else if(f instanceof er)for(var _=f,E=0;E<_.getNumGeometries();E++){var M=_.getGeometryN(E);ti.computeDistance(M,g,m)}else m.setMinimum(f.getCoordinate(),g)}else if(arguments[2]instanceof je&&arguments[0]instanceof pt&&arguments[1]instanceof L){var y=arguments[0],w=arguments[1],v=arguments[2],S=y.closestPoint(w);v.setMinimum(S,w)}};var sn=function(){this._g0=null,this._g1=null,this._ptDist=new je,this._densifyFrac=0;var t=arguments[0],e=arguments[1];this._g0=t,this._g1=e},Qf={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};sn.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},sn.prototype.setDensifyFraction=function(t){if(t>1||t<=0)throw new oe("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},sn.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},sn.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},sn.prototype.computeOrientedDistance=function(t,e,n){var i=new Ja(e);if(t.apply(i),n.setMaximum(i.getMaxPointDistance()),this._densifyFrac>0){var s=new Is(e,this._densifyFrac);t.apply(s),n.setMaximum(s.getMaxPointDistance())}},sn.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},sn.prototype.interfaces_=function(){return[]},sn.prototype.getClass=function(){return sn},sn.distance=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new sn(t,e);return n.distance()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],a=arguments[2],o=new sn(i,s);return o.setDensifyFraction(a),o.distance()}},Qf.MaxPointDistanceFilter.get=function(){return Ja},Qf.MaxDensifiedByFractionDistanceFilter.get=function(){return Is},Object.defineProperties(sn,Qf);var Ja=function(){this._maxPtDist=new je,this._minPtDist=new je,this._euclideanDist=new ti,this._geom=null;var t=arguments[0];this._geom=t};Ja.prototype.filter=function(t){this._minPtDist.initialize(),ti.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Ja.prototype.getMaxPointDistance=function(){return this._maxPtDist},Ja.prototype.interfaces_=function(){return[pi]},Ja.prototype.getClass=function(){return Ja};var Is=function(){this._maxPtDist=new je,this._minPtDist=new je,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};Is.prototype.filter=function(t,e){var n=this;if(e===0)return null;for(var i=t.getCoordinate(e-1),s=t.getCoordinate(e),a=(s.x-i.x)/this._numSubSegs,o=(s.y-i.y)/this._numSubSegs,l=0;l<this._numSubSegs;l++){var u=i.x+l*a,c=i.y+l*o,h=new L(u,c);n._minPtDist.initialize(),ti.computeDistance(n._geom,h,n._minPtDist),n._maxPtDist.setMaximum(n._minPtDist)}},Is.prototype.isDone=function(){return!1},Is.prototype.isGeometryChanged=function(){return!1},Is.prototype.getMaxPointDistance=function(){return this._maxPtDist},Is.prototype.interfaces_=function(){return[In]},Is.prototype.getClass=function(){return Is};var Dr=function(t,e,n){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._bufDistance=e||null,this._result=n||null},Bf={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};Dr.prototype.checkMaximumDistance=function(t,e,n){var i=new sn(e,t);if(i.setDensifyFraction(.25),this._maxDistanceFound=i.orientedDistance(),this._maxDistanceFound>n){this._isValid=!1;var s=i.getCoordinates();this._errorLocation=s[1],this._errorIndicator=t.getFactory().createLineString(s),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+Sn.toLineString(s[0],s[1])+")"}},Dr.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=Dr.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,this._input.isEmpty()||this._result.isEmpty()?!0:(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Dr.VERBOSE&&Ve.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},Dr.prototype.checkNegativeValid=function(){if(!(this._input instanceof Ne||this._input instanceof mi||this._input instanceof er))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)},Dr.prototype.getErrorIndicator=function(){return this._errorIndicator},Dr.prototype.checkMinimumDistance=function(t,e,n){var i=new He(t,e,n);if(this._minDistanceFound=i.distance(),this._minDistanceFound<n){this._isValid=!1;var s=i.nearestPoints();this._errorLocation=i.nearestPoints()[1],this._errorIndicator=t.getFactory().createLineString(s),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+Sn.toLineString(s[0],s[1])+" )"}},Dr.prototype.checkPositiveValid=function(){var t=this._result.getBoundary();if(this.checkMinimumDistance(this._input,t,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,t,this._maxValidDistance)},Dr.prototype.getErrorLocation=function(){return this._errorLocation},Dr.prototype.getPolygonLines=function(t){for(var e=new Z,n=new We(e),i=Qi.getPolygons(t),s=i.iterator();s.hasNext();){var a=s.next();a.apply(n)}return t.getFactory().buildGeometry(e)},Dr.prototype.getErrorMessage=function(){return this._errMsg},Dr.prototype.interfaces_=function(){return[]},Dr.prototype.getClass=function(){return Dr},Bf.VERBOSE.get=function(){return!1},Bf.MAX_DISTANCE_DIFF_FRAC.get=function(){return .012},Object.defineProperties(Dr,Bf);var Xe=function(t,e,n){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._distance=e||null,this._result=n||null},Zf={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};Xe.prototype.isValid=function(){return this.checkPolygonal(),this._isValid?(this.checkExpectedEmpty(),this._isValid?(this.checkEnvelope(),this._isValid?(this.checkArea(),this._isValid?(this.checkDistance(),this._isValid):this._isValid):this._isValid):this._isValid):this._isValid},Xe.prototype.checkEnvelope=function(){if(this._distance<0)return null;var t=this._distance*Xe.MAX_ENV_DIFF_FRAC;t===0&&(t=.001);var e=new dt(this._input.getEnvelopeInternal());e.expandBy(this._distance);var n=new dt(this._result.getEnvelopeInternal());n.expandBy(t),n.contains(e)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(n)),this.report("Envelope")},Xe.prototype.checkDistance=function(){var t=new Dr(this._input,this._distance,this._result);t.isValid()||(this._isValid=!1,this._errorMsg=t.getErrorMessage(),this._errorLocation=t.getErrorLocation(),this._errorIndicator=t.getErrorIndicator()),this.report("Distance")},Xe.prototype.checkArea=function(){var t=this._input.getArea(),e=this._result.getArea();this._distance>0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t<e&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")},Xe.prototype.checkPolygonal=function(){this._result instanceof Ne||this._result instanceof mi||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")},Xe.prototype.getErrorIndicator=function(){return this._errorIndicator},Xe.prototype.getErrorLocation=function(){return this._errorLocation},Xe.prototype.checkExpectedEmpty=function(){if(this._input.getDimension()>=2||this._distance>0)return null;this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),this.report("ExpectedEmpty")},Xe.prototype.report=function(t){if(!Xe.VERBOSE)return null;Ve.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))},Xe.prototype.getErrorMessage=function(){return this._errorMsg},Xe.prototype.interfaces_=function(){return[]},Xe.prototype.getClass=function(){return Xe},Xe.isValidMsg=function(t,e,n){var i=new Xe(t,e,n);return i.isValid()?null:i.getErrorMessage()},Xe.isValid=function(t,e,n){var i=new Xe(t,e,n);return!!i.isValid()},Zf.VERBOSE.get=function(){return!1},Zf.MAX_ENV_DIFF_FRAC.get=function(){return .012},Object.defineProperties(Xe,Zf);var ei=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};ei.prototype.getCoordinates=function(){return this._pts},ei.prototype.size=function(){return this._pts.length},ei.prototype.getCoordinate=function(t){return this._pts[t]},ei.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},ei.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:Ua.octant(this.getCoordinate(t),this.getCoordinate(t+1))},ei.prototype.setData=function(t){this._data=t},ei.prototype.getData=function(){return this._data},ei.prototype.toString=function(){return Sn.toLineString(new ye(this._pts))},ei.prototype.interfaces_=function(){return[yi]},ei.prototype.getClass=function(){return ei};var Ae=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new Z,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};Ae.prototype.getInteriorIntersection=function(){return this._interiorIntersection},Ae.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},Ae.prototype.getIntersectionSegments=function(){return this._intSegments},Ae.prototype.count=function(){return this._intersectionCount},Ae.prototype.getIntersections=function(){return this._intersections},Ae.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Ae.prototype.setKeepIntersections=function(t){this._keepIntersections=t},Ae.prototype.processIntersections=function(t,e,n,i){if(!this._findAllIntersections&&this.hasIntersection()||t===n&&e===i)return null;if(this._isCheckEndSegmentsOnly){var s=this.isEndSegment(t,e)||this.isEndSegment(n,i);if(!s)return null}var a=t.getCoordinates()[e],o=t.getCoordinates()[e+1],l=n.getCoordinates()[i],u=n.getCoordinates()[i+1];this._li.computeIntersection(a,o,l,u),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=a,this._intSegments[1]=o,this._intSegments[2]=l,this._intSegments[3]=u,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},Ae.prototype.isEndSegment=function(t,e){return e===0||e>=t.size()-2},Ae.prototype.hasIntersection=function(){return this._interiorIntersection!==null},Ae.prototype.isDone=function(){return this._findAllIntersections?!1:this._interiorIntersection!==null},Ae.prototype.interfaces_=function(){return[na]},Ae.prototype.getClass=function(){return Ae},Ae.createAllIntersectionsFinder=function(t){var e=new Ae(t);return e.setFindAllIntersections(!0),e},Ae.createAnyIntersectionFinder=function(t){return new Ae(t)},Ae.createIntersectionCounter=function(t){var e=new Ae(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var Dn=function(){this._li=new Zs,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};Dn.prototype.execute=function(){if(this._segInt!==null)return null;this.checkInteriorIntersections()},Dn.prototype.getIntersections=function(){return this._segInt.getIntersections()},Dn.prototype.isValid=function(){return this.execute(),this._isValid},Dn.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Dn.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new Ae(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new Jf;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},Dn.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Xi(this.getErrorMessage(),this._segInt.getInteriorIntersection())},Dn.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+Sn.toLineString(t[0],t[1])+" and "+Sn.toLineString(t[2],t[3])},Dn.prototype.interfaces_=function(){return[]},Dn.prototype.getClass=function(){return Dn},Dn.computeIntersections=function(t){var e=new Dn(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var aa=function r(){this._nv=null;var t=arguments[0];this._nv=new Dn(r.toSegmentStrings(t))};aa.prototype.checkValid=function(){this._nv.checkValid()},aa.prototype.interfaces_=function(){return[]},aa.prototype.getClass=function(){return aa},aa.toSegmentStrings=function(t){for(var e=new Z,n=t.iterator();n.hasNext();){var i=n.next();e.add(new ei(i.getCoordinates(),i))}return e},aa.checkValid=function(t){var e=new aa(t);e.checkValid()};var Ka=function(t){this._mapOp=t};Ka.prototype.map=function(t){for(var e=this,n=new Z,i=0;i<t.getNumGeometries();i++){var s=e._mapOp.map(t.getGeometryN(i));s.isEmpty()||n.add(s)}return t.getFactory().createGeometryCollection(Dt.toGeometryArray(n))},Ka.prototype.interfaces_=function(){return[]},Ka.prototype.getClass=function(){return Ka},Ka.map=function(t,e){var n=new Ka(e);return n.map(t)};var ri=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new Z,this._resultLineList=new Z;var t=arguments[0],e=arguments[1],n=arguments[2];this._op=t,this._geometryFactory=e,this._ptLocator=n};ri.prototype.collectLines=function(t){for(var e=this,n=this._op.getGraph().getEdgeEnds().iterator();n.hasNext();){var i=n.next();e.collectLineEdge(i,t,e._lineEdgesList),e.collectBoundaryTouchEdge(i,t,e._lineEdgesList)}},ri.prototype.labelIsolatedLine=function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._op.getArgGeometry(e));t.getLabel().setLocation(e,n)},ri.prototype.build=function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this._resultLineList},ri.prototype.collectLineEdge=function(t,e,n){var i=t.getLabel(),s=t.getEdge();t.isLineEdge()&&!t.isVisited()&&Ct.isResultOfOp(i,e)&&!s.isCovered()&&(n.add(s),t.setVisitedEdge(!0))},ri.prototype.findCoveredLineEdges=function(){for(var t=this,e=this._op.getGraph().getNodes().iterator();e.hasNext();){var n=e.next();n.getEdges().findCoveredLineEdges()}for(var i=this._op.getGraph().getEdgeEnds().iterator();i.hasNext();){var s=i.next(),a=s.getEdge();if(s.isLineEdge()&&!a.isCoveredSet()){var o=t._op.isCoveredByA(s.getCoordinate());a.setCovered(o)}}},ri.prototype.labelIsolatedLines=function(t){for(var e=this,n=t.iterator();n.hasNext();){var i=n.next(),s=i.getLabel();i.isIsolated()&&(s.isNull(0)?e.labelIsolatedLine(i,0):e.labelIsolatedLine(i,1))}},ri.prototype.buildLines=function(t){for(var e=this,n=this._lineEdgesList.iterator();n.hasNext();){var i=n.next(),s=e._geometryFactory.createLineString(i.getCoordinates());e._resultLineList.add(s),i.setInResult(!0)}},ri.prototype.collectBoundaryTouchEdge=function(t,e,n){var i=t.getLabel();if(t.isLineEdge()||t.isVisited()||t.isInteriorAreaEdge()||t.getEdge().isInResult())return null;Mt.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),Ct.isResultOfOp(i,e)&&e===Ct.INTERSECTION&&(n.add(t.getEdge()),t.setVisitedEdge(!0))},ri.prototype.interfaces_=function(){return[]},ri.prototype.getClass=function(){return ri};var Qa=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new Z;var t=arguments[0],e=arguments[1];this._op=t,this._geometryFactory=e};Qa.prototype.filterCoveredNodeToPoint=function(t){var e=t.getCoordinate();if(!this._op.isCoveredByLA(e)){var n=this._geometryFactory.createPoint(e);this._resultPointList.add(n)}},Qa.prototype.extractNonCoveredResultNodes=function(t){for(var e=this,n=this._op.getGraph().getNodes().iterator();n.hasNext();){var i=n.next();if(!i.isInResult()&&!i.isIncidentEdgeInResult()&&(i.getEdges().getDegree()===0||t===Ct.INTERSECTION)){var s=i.getLabel();Ct.isResultOfOp(s,t)&&e.filterCoveredNodeToPoint(i)}}},Qa.prototype.build=function(t){return this.extractNonCoveredResultNodes(t),this._resultPointList},Qa.prototype.interfaces_=function(){return[]},Qa.prototype.getClass=function(){return Qa};var gr=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};gr.prototype.transformPoint=function(t,e){return this._factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))},gr.prototype.transformPolygon=function(t,e){var n=this,i=!0,s=this.transformLinearRing(t.getExteriorRing(),t);(s===null||!(s instanceof gi)||s.isEmpty())&&(i=!1);for(var a=new Z,o=0;o<t.getNumInteriorRing();o++){var l=n.transformLinearRing(t.getInteriorRingN(o),t);l===null||l.isEmpty()||(l instanceof gi||(i=!1),a.add(l))}if(i)return this._factory.createPolygon(s,a.toArray([]));var u=new Z;return s!==null&&u.add(s),u.addAll(a),this._factory.buildGeometry(u)},gr.prototype.createCoordinateSequence=function(t){return this._factory.getCoordinateSequenceFactory().create(t)},gr.prototype.getInputGeometry=function(){return this._inputGeom},gr.prototype.transformMultiLineString=function(t,e){for(var n=this,i=new Z,s=0;s<t.getNumGeometries();s++){var a=n.transformLineString(t.getGeometryN(s),t);a!==null&&(a.isEmpty()||i.add(a))}return this._factory.buildGeometry(i)},gr.prototype.transformCoordinates=function(t,e){return this.copy(t)},gr.prototype.transformLineString=function(t,e){return this._factory.createLineString(this.transformCoordinates(t.getCoordinateSequence(),t))},gr.prototype.transformMultiPoint=function(t,e){for(var n=this,i=new Z,s=0;s<t.getNumGeometries();s++){var a=n.transformPoint(t.getGeometryN(s),t);a!==null&&(a.isEmpty()||i.add(a))}return this._factory.buildGeometry(i)},gr.prototype.transformMultiPolygon=function(t,e){for(var n=this,i=new Z,s=0;s<t.getNumGeometries();s++){var a=n.transformPolygon(t.getGeometryN(s),t);a!==null&&(a.isEmpty()||i.add(a))}return this._factory.buildGeometry(i)},gr.prototype.copy=function(t){return t.copy()},gr.prototype.transformGeometryCollection=function(t,e){for(var n=this,i=new Z,s=0;s<t.getNumGeometries();s++){var a=n.transform(t.getGeometryN(s));a!==null&&(n._pruneEmptyGeometry&&a.isEmpty()||i.add(a))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(Dt.toGeometryArray(i)):this._factory.buildGeometry(i)},gr.prototype.transform=function(t){if(this._inputGeom=t,this._factory=t.getFactory(),t instanceof Nr)return this.transformPoint(t,null);if(t instanceof iu)return this.transformMultiPoint(t,null);if(t instanceof gi)return this.transformLinearRing(t,null);if(t instanceof pe)return this.transformLineString(t,null);if(t instanceof ta)return this.transformMultiLineString(t,null);if(t instanceof Ne)return this.transformPolygon(t,null);if(t instanceof mi)return this.transformMultiPolygon(t,null);if(t instanceof er)return this.transformGeometryCollection(t,null);throw new oe("Unknown Geometry subtype: "+t.getClass().getName())},gr.prototype.transformLinearRing=function(t,e){var n=this.transformCoordinates(t.getCoordinateSequence(),t);if(n===null)return this._factory.createLinearRing(null);var i=n.size();return i>0&&i<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)},gr.prototype.interfaces_=function(){return[]},gr.prototype.getClass=function(){return gr};var Pi=function r(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new pt,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof pe&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];r.call(this,t.getCoordinates(),e)}else if(arguments[0]instanceof Array&&typeof arguments[1]=="number"){var n=arguments[0],i=arguments[1];this._srcPts=n,this._isClosed=r.isClosed(n),this._snapTolerance=i}};Pi.prototype.snapVertices=function(t,e){for(var n=this,i=this._isClosed?t.size()-1:t.size(),s=0;s<i;s++){var a=t.get(s),o=n.findSnapForVertex(a,e);o!==null&&(t.set(s,new L(o)),s===0&&n._isClosed&&t.set(t.size()-1,new L(o)))}},Pi.prototype.findSnapForVertex=function(t,e){for(var n=this,i=0;i<e.length;i++){if(t.equals2D(e[i]))return null;if(t.distance(e[i])<n._snapTolerance)return e[i]}return null},Pi.prototype.snapTo=function(t){var e=new Ku(this._srcPts);this.snapVertices(e,t),this.snapSegments(e,t);var n=e.toCoordinateArray();return n},Pi.prototype.snapSegments=function(t,e){var n=this;if(e.length===0)return null;var i=e.length;e[0].equals2D(e[e.length-1])&&(i=e.length-1);for(var s=0;s<i;s++){var a=e[s],o=n.findSegmentIndexToSnap(a,t);o>=0&&t.add(o+1,new L(a),!1)}},Pi.prototype.findSegmentIndexToSnap=function(t,e){for(var n=this,i=wt.MAX_VALUE,s=-1,a=0;a<e.size()-1;a++){if(n._seg.p0=e.get(a),n._seg.p1=e.get(a+1),n._seg.p0.equals2D(t)||n._seg.p1.equals2D(t)){if(n._allowSnappingToSourceVertices)continue;return-1}var o=n._seg.distance(t);o<n._snapTolerance&&o<i&&(i=o,s=a)}return s},Pi.prototype.setAllowSnappingToSourceVertices=function(t){this._allowSnappingToSourceVertices=t},Pi.prototype.interfaces_=function(){return[]},Pi.prototype.getClass=function(){return Pi},Pi.isClosed=function(t){return t.length<=1?!1:t[0].equals2D(t[t.length-1])};var we=function(t){this._srcGeom=t||null},bg={SNAP_PRECISION_FACTOR:{configurable:!0}};we.prototype.snapTo=function(t,e){var n=this.extractTargetCoordinates(t),i=new Tg(e,n);return i.transform(this._srcGeom)},we.prototype.snapToSelf=function(t,e){var n=this.extractTargetCoordinates(this._srcGeom),i=new Tg(t,n,!0),s=i.transform(this._srcGeom),a=s;return e&&_t(a,ys)&&(a=s.buffer(0)),a},we.prototype.computeSnapTolerance=function(t){var e=this.computeMinimumSegmentLength(t),n=e/10;return n},we.prototype.extractTargetCoordinates=function(t){for(var e=new Hn,n=t.getCoordinates(),i=0;i<n.length;i++)e.add(n[i]);return e.toArray(new Array(0).fill(null))},we.prototype.computeMinimumSegmentLength=function(t){for(var e=wt.MAX_VALUE,n=0;n<t.length-1;n++){var i=t[n].distance(t[n+1]);i<e&&(e=i)}return e},we.prototype.interfaces_=function(){return[]},we.prototype.getClass=function(){return we},we.snap=function(t,e,n){var i=new Array(2).fill(null),s=new we(t);i[0]=s.snapTo(e,n);var a=new we(e);return i[1]=a.snapTo(i[0],n),i},we.computeOverlaySnapTolerance=function(){if(arguments.length===1){var t=arguments[0],e=we.computeSizeBasedSnapTolerance(t),n=t.getPrecisionModel();if(n.getType()===Ut.FIXED){var i=1/n.getScale()*2/1.415;i>e&&(e=i)}return e}else if(arguments.length===2){var s=arguments[0],a=arguments[1];return Math.min(we.computeOverlaySnapTolerance(s),we.computeOverlaySnapTolerance(a))}},we.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal(),n=Math.min(e.getHeight(),e.getWidth()),i=n*we.SNAP_PRECISION_FACTOR;return i},we.snapToSelf=function(t,e,n){var i=new we(t);return i.snapToSelf(e,n)},bg.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(we,bg);var Tg=function(r){function t(e,n,i){r.call(this),this._snapTolerance=e||null,this._snapPts=n||null,this._isSelfSnap=i!==void 0?i:!1}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.snapLine=function(n,i){var s=new Pi(n,this._snapTolerance);return s.setAllowSnappingToSourceVertices(this._isSelfSnap),s.snapTo(i)},t.prototype.transformCoordinates=function(n,i){var s=n.toCoordinateArray(),a=this.snapLine(s,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(a)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(gr),or=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};or.prototype.getCommon=function(){return wt.longBitsToDouble(this._commonBits)},or.prototype.add=function(t){var e=wt.doubleToLongBits(t);if(this._isFirst)return this._commonBits=e,this._commonSignExp=or.signExpBits(this._commonBits),this._isFirst=!1,null;var n=or.signExpBits(e);if(n!==this._commonSignExp)return this._commonBits=0,null;this._commonMantissaBitsCount=or.numCommonMostSigMantissaBits(this._commonBits,e),this._commonBits=or.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))},or.prototype.toString=function(){if(arguments.length===1){var t=arguments[0],e=wt.longBitsToDouble(t),n=wt.toBinaryString(t),i="0000000000000000000000000000000000000000000000000000000000000000"+n,s=i.substring(i.length-64),a=s.substring(0,1)+" "+s.substring(1,12)+"(exp) "+s.substring(12)+" [ "+e+" ]";return a}},or.prototype.interfaces_=function(){return[]},or.prototype.getClass=function(){return or},or.getBit=function(t,e){var n=1<<e;return(t&n)!==0?1:0},or.signExpBits=function(t){return t>>52},or.zeroLowerBits=function(t,e){var n=(1<<e)-1,i=~n,s=t&i;return s},or.numCommonMostSigMantissaBits=function(t,e){for(var n=0,i=52;i>=0;i--){if(or.getBit(t,i)!==or.getBit(e,i))return n;n++}return 52};var Ms=function(){this._commonCoord=null,this._ccFilter=new Ba},$f={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};Ms.prototype.addCommonBits=function(t){var e=new Ns(this._commonCoord);t.apply(e),t.geometryChanged()},Ms.prototype.removeCommonBits=function(t){if(this._commonCoord.x===0&&this._commonCoord.y===0)return t;var e=new L(this._commonCoord);e.x=-e.x,e.y=-e.y;var n=new Ns(e);return t.apply(n),t.geometryChanged(),t},Ms.prototype.getCommonCoordinate=function(){return this._commonCoord},Ms.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},Ms.prototype.interfaces_=function(){return[]},Ms.prototype.getClass=function(){return Ms},$f.CommonCoordinateFilter.get=function(){return Ba},$f.Translater.get=function(){return Ns},Object.defineProperties(Ms,$f);var Ba=function(){this._commonBitsX=new or,this._commonBitsY=new or};Ba.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},Ba.prototype.getCommonCoordinate=function(){return new L(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},Ba.prototype.interfaces_=function(){return[pi]},Ba.prototype.getClass=function(){return Ba};var Ns=function(){this.trans=null;var t=arguments[0];this.trans=t};Ns.prototype.filter=function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,i=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,i)},Ns.prototype.isDone=function(){return!1},Ns.prototype.isGeometryChanged=function(){return!0},Ns.prototype.interfaces_=function(){return[In]},Ns.prototype.getClass=function(){return Ns};var Le=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};Le.prototype.selfSnap=function(t){var e=new we(t),n=e.snapTo(t,this._snapTolerance);return n},Le.prototype.removeCommonBits=function(t){this._cbr=new Ms,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},Le.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},Le.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),n=Ct.overlayOp(e[0],e[1],t);return this.prepareResult(n)},Le.prototype.checkValid=function(t){t.isValid()||Ve.out.println("Snapped geometry is invalid")},Le.prototype.computeSnapTolerance=function(){this._snapTolerance=we.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},Le.prototype.snap=function(t){var e=this.removeCommonBits(t),n=we.snap(e[0],e[1],this._snapTolerance);return n},Le.prototype.interfaces_=function(){return[]},Le.prototype.getClass=function(){return Le},Le.overlayOp=function(t,e,n){var i=new Le(t,e);return i.getResultGeometry(n)},Le.union=function(t,e){return Le.overlayOp(t,e,Ct.UNION)},Le.intersection=function(t,e){return Le.overlayOp(t,e,Ct.INTERSECTION)},Le.symDifference=function(t,e){return Le.overlayOp(t,e,Ct.SYMDIFFERENCE)},Le.difference=function(t,e){return Le.overlayOp(t,e,Ct.DIFFERENCE)};var lr=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};lr.prototype.getResultGeometry=function(t){var e=null,n=!1,i=null;try{e=Ct.overlayOp(this._geom[0],this._geom[1],t);var s=!0;s&&(n=!0)}catch(a){if(a instanceof zi)i=a;else throw a}finally{}if(!n)try{e=Le.overlayOp(this._geom[0],this._geom[1],t)}catch(a){throw a instanceof zi?i:a}finally{}return e},lr.prototype.interfaces_=function(){return[]},lr.prototype.getClass=function(){return lr},lr.overlayOp=function(t,e,n){var i=new lr(t,e);return i.getResultGeometry(n)},lr.union=function(t,e){return lr.overlayOp(t,e,Ct.UNION)},lr.intersection=function(t,e){return lr.overlayOp(t,e,Ct.INTERSECTION)},lr.symDifference=function(t,e){return lr.overlayOp(t,e,Ct.SYMDIFFERENCE)},lr.difference=function(t,e){return lr.overlayOp(t,e,Ct.DIFFERENCE)};var uh=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};uh.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},uh.prototype.interfaces_=function(){return[]},uh.prototype.getClass=function(){return uh};var xr=function r(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,arguments.length===2){var t=arguments[0],e=arguments[1];this._eventType=r.DELETE,this._xValue=t,this._insertEvent=e}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._eventType=r.INSERT,this._label=n,this._xValue=i,this._obj=s}},jf={INSERT:{configurable:!0},DELETE:{configurable:!0}};xr.prototype.isDelete=function(){return this._eventType===xr.DELETE},xr.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},xr.prototype.getObject=function(){return this._obj},xr.prototype.compareTo=function(t){var e=t;return this._xValue<e._xValue?-1:this._xValue>e._xValue?1:this._eventType<e._eventType?-1:this._eventType>e._eventType?1:0},xr.prototype.getInsertEvent=function(){return this._insertEvent},xr.prototype.isInsert=function(){return this._eventType===xr.INSERT},xr.prototype.isSameLabel=function(t){return this._label===null?!1:this._label===t._label},xr.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},xr.prototype.interfaces_=function(){return[Zr]},xr.prototype.getClass=function(){return xr},jf.INSERT.get=function(){return 1},jf.DELETE.get=function(){return 2},Object.defineProperties(xr,jf);var _c=function(){};_c.prototype.interfaces_=function(){return[]},_c.prototype.getClass=function(){return _c};var Ye=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=n};Ye.prototype.isTrivialIntersection=function(t,e,n,i){if(t===n&&this._li.getIntersectionNum()===1){if(Ye.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var s=t.getNumPoints()-1;if(e===0&&i===s||i===0&&e===s)return!0}}return!1},Ye.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Ye.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},Ye.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Ye.prototype.isBoundaryPointInternal=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next(),s=i.getCoordinate();if(t.isIntersection(s))return!0}return!1},Ye.prototype.hasProperIntersection=function(){return this._hasProper},Ye.prototype.hasIntersection=function(){return this._hasIntersection},Ye.prototype.isDone=function(){return this._isDone},Ye.prototype.isBoundaryPoint=function(t,e){return e===null?!1:!!(this.isBoundaryPointInternal(t,e[0])||this.isBoundaryPointInternal(t,e[1]))},Ye.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},Ye.prototype.addIntersections=function(t,e,n,i){if(t===n&&e===i)return null;this.numTests++;var s=t.getCoordinates()[e],a=t.getCoordinates()[e+1],o=n.getCoordinates()[i],l=n.getCoordinates()[i+1];this._li.computeIntersection(s,a,o,l),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,i)||(this._hasIntersection=!0,(this._includeProper||!this._li.isProper())&&(t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},Ye.prototype.interfaces_=function(){return[]},Ye.prototype.getClass=function(){return Ye},Ye.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var D_=function(r){function t(){r.call(this),this.events=new Z,this.nOverlaps=null}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.prepareEvents=function(){var n=this;Nn.sort(this.events);for(var i=0;i<this.events.size();i++){var s=n.events.get(i);s.isDelete()&&s.getInsertEvent().setDeleteEventIndex(i)}},t.prototype.computeIntersections=function(){var n=this;if(arguments.length===1){var i=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var s=0;s<this.events.size();s++){var a=n.events.get(s);if(a.isInsert()&&n.processOverlaps(s,a.getDeleteEventIndex(),a,i),i.isDone())break}}else if(arguments.length===3){if(arguments[2]instanceof Ye&&_t(arguments[0],Pn)&&_t(arguments[1],Pn)){var o=arguments[0],l=arguments[1],u=arguments[2];this.addEdges(o,o),this.addEdges(l,l),this.computeIntersections(u)}else if(typeof arguments[2]=="boolean"&&_t(arguments[0],Pn)&&arguments[1]instanceof Ye){var c=arguments[0],h=arguments[1],f=arguments[2];f?this.addEdges(c,null):this.addEdges(c),this.computeIntersections(h)}}},t.prototype.addEdge=function(n,i){for(var s=this,a=n.getMonotoneChainEdge(),o=a.getStartIndexes(),l=0;l<o.length-1;l++){var u=new uh(a,l),c=new xr(i,a.getMinX(l),u);s.events.add(c),s.events.add(new xr(a.getMaxX(l),c))}},t.prototype.processOverlaps=function(n,i,s,a){for(var o=this,l=s.getObject(),u=n;u<i;u++){var c=o.events.get(u);if(c.isInsert()){var h=c.getObject();s.isSameLabel(c)||(l.computeIntersections(h,a),o.nOverlaps++)}}},t.prototype.addEdges=function(){var n=this;if(arguments.length===1)for(var i=arguments[0],s=i.iterator();s.hasNext();){var a=s.next();n.addEdge(a,a)}else if(arguments.length===2)for(var o=arguments[0],l=arguments[1],u=o.iterator();u.hasNext();){var c=u.next();n.addEdge(c,l)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(_c),Ci=function(){this._min=wt.POSITIVE_INFINITY,this._max=wt.NEGATIVE_INFINITY},Dg={NodeComparator:{configurable:!0}};Ci.prototype.getMin=function(){return this._min},Ci.prototype.intersects=function(t,e){return!(this._min>e||this._max<t)},Ci.prototype.getMax=function(){return this._max},Ci.prototype.toString=function(){return Sn.toLineString(new L(this._min,0),new L(this._max,0))},Ci.prototype.interfaces_=function(){return[]},Ci.prototype.getClass=function(){return Ci},Dg.NodeComparator.get=function(){return hh},Object.defineProperties(Ci,Dg);var hh=function(){};hh.prototype.compare=function(t,e){var n=t,i=e,s=(n._min+n._max)/2,a=(i._min+i._max)/2;return s<a?-1:s>a?1:0},hh.prototype.interfaces_=function(){return[Jl]},hh.prototype.getClass=function(){return hh};var x_=function(r){function t(){r.call(this),this._item=null;var e=arguments[0],n=arguments[1],i=arguments[2];this._min=e,this._max=n,this._item=i}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.query=function(n,i,s){if(!this.intersects(n,i))return null;s.visitItem(this._item)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Ci),O_=function(r){function t(){r.call(this),this._node1=null,this._node2=null;var e=arguments[0],n=arguments[1];this._node1=e,this._node2=n,this.buildExtent(this._node1,this._node2)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.buildExtent=function(n,i){this._min=Math.min(n._min,i._min),this._max=Math.max(n._max,i._max)},t.prototype.query=function(n,i,s){if(!this.intersects(n,i))return null;this._node1!==null&&this._node1.query(n,i,s),this._node2!==null&&this._node2.query(n,i,s)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Ci),Ii=function(){this._leaves=new Z,this._root=null,this._level=0};Ii.prototype.buildTree=function(){var t=this;Nn.sort(this._leaves,new Ci.NodeComparator);for(var e=this._leaves,n=null,i=new Z;;){if(t.buildLevel(e,i),i.size()===1)return i.get(0);n=e,e=i,i=n}},Ii.prototype.insert=function(t,e,n){if(this._root!==null)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new x_(t,e,n))},Ii.prototype.query=function(t,e,n){this.init(),this._root.query(t,e,n)},Ii.prototype.buildRoot=function(){if(this._root!==null)return null;this._root=this.buildTree()},Ii.prototype.printNode=function(t){Ve.out.println(Sn.toLineString(new L(t._min,this._level),new L(t._max,this._level)))},Ii.prototype.init=function(){if(this._root!==null)return null;this.buildRoot()},Ii.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var n=0;n<t.size();n+=2){var i=t.get(n),s=n+1<t.size()?t.get(n):null;if(s===null)e.add(i);else{var a=new O_(t.get(n),t.get(n+1));e.add(a)}}},Ii.prototype.interfaces_=function(){return[]},Ii.prototype.getClass=function(){return Ii};var cu=function(){this._items=new Z};cu.prototype.visitItem=function(t){this._items.add(t)},cu.prototype.getItems=function(){return this._items},cu.prototype.interfaces_=function(){return[_s]},cu.prototype.getClass=function(){return cu};var fu=function(){this._index=null;var t=arguments[0];if(!_t(t,ys))throw new oe("Argument must be Polygonal");this._index=new oa(t)},td={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};fu.prototype.locate=function(t){var e=new Wn(t),n=new du(e);return this._index.query(t.y,t.y,n),e.getLocation()},fu.prototype.interfaces_=function(){return[lu]},fu.prototype.getClass=function(){return fu},td.SegmentVisitor.get=function(){return du},td.IntervalIndexedGeometry.get=function(){return oa},Object.defineProperties(fu,td);var du=function(){this._counter=null;var t=arguments[0];this._counter=t};du.prototype.visitItem=function(t){var e=t;this._counter.countSegment(e.getCoordinate(0),e.getCoordinate(1))},du.prototype.interfaces_=function(){return[_s]},du.prototype.getClass=function(){return du};var oa=function(){this._index=new Ii;var t=arguments[0];this.init(t)};oa.prototype.init=function(t){for(var e=this,n=We.getLines(t),i=n.iterator();i.hasNext();){var s=i.next(),a=s.getCoordinates();e.addLine(a)}},oa.prototype.addLine=function(t){for(var e=this,n=1;n<t.length;n++){var i=new pt(t[n-1],t[n]),s=Math.min(i.p0.y,i.p1.y),a=Math.max(i.p0.y,i.p1.y);e._index.insert(s,a,i)}},oa.prototype.query=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new cu;return this._index.query(t,e,n),n.getItems()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],a=arguments[2];this._index.query(i,s,a)}},oa.prototype.interfaces_=function(){return[]},oa.prototype.getClass=function(){return oa};var ch=function(r){function t(){if(r.call(this),this._parentGeom=null,this._lineEdgeMap=new cg,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new Tn,arguments.length===2){var e=arguments[0],n=arguments[1],i=jr.OGC_SFS_BOUNDARY_RULE;this._argIndex=e,this._parentGeom=n,this._boundaryNodeRule=i,n!==null&&this.add(n)}else if(arguments.length===3){var s=arguments[0],a=arguments[1],o=arguments[2];this._argIndex=s,this._parentGeom=a,this._boundaryNodeRule=o,a!==null&&this.add(a)}}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.insertBoundaryPoint=function(n,i){var s=this._nodes.addNode(i),a=s.getLabel(),o=1,l=F.NONE;l=a.getLocation(n,K.ON),l===F.BOUNDARY&&o++;var u=t.determineBoundary(this._boundaryNodeRule,o);a.setLocation(n,u)},t.prototype.computeSelfNodes=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.computeSelfNodes(n,i,!1)}else if(arguments.length===3){var s=arguments[0],a=arguments[1],o=arguments[2],l=new Ye(s,!0,!1);l.setIsDoneIfProperInt(o);var u=this.createEdgeSetIntersector(),c=this._parentGeom instanceof gi||this._parentGeom instanceof Ne||this._parentGeom instanceof mi,h=a||!c;return u.computeIntersections(this._edges,l,h),this.addSelfIntersectionNodes(this._argIndex),l}},t.prototype.computeSplitEdges=function(n){for(var i=this._edges.iterator();i.hasNext();){var s=i.next();s.eiList.addSplitEdges(n)}},t.prototype.computeEdgeIntersections=function(n,i,s){var a=new Ye(i,s,!0);a.setBoundaryNodes(this.getBoundaryNodes(),n.getBoundaryNodes());var o=this.createEdgeSetIntersector();return o.computeIntersections(this._edges,n._edges,a),a},t.prototype.getGeometry=function(){return this._parentGeom},t.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},t.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},t.prototype.addPoint=function(){if(arguments[0]instanceof Nr){var n=arguments[0],i=n.getCoordinate();this.insertPoint(this._argIndex,i,F.INTERIOR)}else if(arguments[0]instanceof L){var s=arguments[0];this.insertPoint(this._argIndex,s,F.INTERIOR)}},t.prototype.addPolygon=function(n){var i=this;this.addPolygonRing(n.getExteriorRing(),F.EXTERIOR,F.INTERIOR);for(var s=0;s<n.getNumInteriorRing();s++){var a=n.getInteriorRingN(s);i.addPolygonRing(a,F.INTERIOR,F.EXTERIOR)}},t.prototype.addEdge=function(n){this.insertEdge(n);var i=n.getCoordinates();this.insertPoint(this._argIndex,i[0],F.BOUNDARY),this.insertPoint(this._argIndex,i[i.length-1],F.BOUNDARY)},t.prototype.addLineString=function(n){var i=Tt.removeRepeatedPoints(n.getCoordinates());if(i.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;var s=new yc(i,new Jt(this._argIndex,F.INTERIOR));this._lineEdgeMap.put(n,s),this.insertEdge(s),Mt.isTrue(i.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,i[0]),this.insertBoundaryPoint(this._argIndex,i[i.length-1])},t.prototype.getInvalidPoint=function(){return this._invalidPoint},t.prototype.getBoundaryPoints=function(){for(var n=this.getBoundaryNodes(),i=new Array(n.size()).fill(null),s=0,a=n.iterator();a.hasNext();){var o=a.next();i[s++]=o.getCoordinate().copy()}return i},t.prototype.getBoundaryNodes=function(){return this._boundaryNodes===null&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},t.prototype.addSelfIntersectionNode=function(n,i,s){if(this.isBoundaryNode(n,i))return null;s===F.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(n,i):this.insertPoint(n,i,s)},t.prototype.addPolygonRing=function(n,i,s){if(n.isEmpty())return null;var a=Tt.removeRepeatedPoints(n.getCoordinates());if(a.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=a[0],null;var o=i,l=s;et.isCCW(a)&&(o=s,l=i);var u=new yc(a,new Jt(this._argIndex,F.BOUNDARY,o,l));this._lineEdgeMap.put(n,u),this.insertEdge(u),this.insertPoint(this._argIndex,a[0],F.BOUNDARY)},t.prototype.insertPoint=function(n,i,s){var a=this._nodes.addNode(i),o=a.getLabel();o===null?a._label=new Jt(n,s):o.setLocation(n,s)},t.prototype.createEdgeSetIntersector=function(){return new D_},t.prototype.addSelfIntersectionNodes=function(n){for(var i=this,s=this._edges.iterator();s.hasNext();)for(var a=s.next(),o=a.getLabel().getLocation(n),l=a.eiList.iterator();l.hasNext();){var u=l.next();i.addSelfIntersectionNode(n,u.coord,o)}},t.prototype.add=function(){if(arguments.length===1){var n=arguments[0];if(n.isEmpty())return null;if(n instanceof mi&&(this._useBoundaryDeterminationRule=!1),n instanceof Ne)this.addPolygon(n);else if(n instanceof pe)this.addLineString(n);else if(n instanceof Nr)this.addPoint(n);else if(n instanceof iu)this.addCollection(n);else if(n instanceof ta)this.addCollection(n);else if(n instanceof mi)this.addCollection(n);else if(n instanceof er)this.addCollection(n);else throw new Error(n.getClass().getName())}else return r.prototype.add.apply(this,arguments)},t.prototype.addCollection=function(n){for(var i=this,s=0;s<n.getNumGeometries();s++){var a=n.getGeometryN(s);i.add(a)}},t.prototype.locate=function(n){return _t(this._parentGeom,ys)&&this._parentGeom.getNumGeometries()>50?(this._areaPtLocator===null&&(this._areaPtLocator=new fu(this._parentGeom)),this._areaPtLocator.locate(n)):this._ptLocator.locate(n,this._parentGeom)},t.prototype.findEdge=function(){if(arguments.length===1){var n=arguments[0];return this._lineEdgeMap.get(n)}else return r.prototype.findEdge.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.determineBoundary=function(n,i){return n.isInBoundary(i)?F.BOUNDARY:F.INTERIOR},t}(fe),pu=function(){if(this._li=new Zs,this._resultPrecisionModel=null,this._arg=null,arguments.length===1){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new ch(0,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],i=jr.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new ch(0,e,i),this._arg[1]=new ch(1,n,i)}else if(arguments.length===3){var s=arguments[0],a=arguments[1],o=arguments[2];s.getPrecisionModel().compareTo(a.getPrecisionModel())>=0?this.setComputationPrecision(s.getPrecisionModel()):this.setComputationPrecision(a.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new ch(0,s,o),this._arg[1]=new ch(1,a,o)}};pu.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},pu.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},pu.prototype.interfaces_=function(){return[]},pu.prototype.getClass=function(){return pu};var la=function(){};la.prototype.interfaces_=function(){return[]},la.prototype.getClass=function(){return la},la.map=function(){if(arguments[0]instanceof yt&&_t(arguments[1],la.MapOp)){for(var t=arguments[0],e=arguments[1],n=new Z,i=0;i<t.getNumGeometries();i++){var s=e.map(t.getGeometryN(i));s!==null&&n.add(s)}return t.getFactory().buildGeometry(n)}else if(_t(arguments[0],Me)&&_t(arguments[1],la.MapOp)){for(var a=arguments[0],o=arguments[1],l=new Z,u=a.iterator();u.hasNext();){var c=u.next(),h=o.map(c);h!==null&&l.add(h)}return l}},la.MapOp=function(){};var Ct=function(r){function t(){var e=arguments[0],n=arguments[1];r.call(this,e,n),this._ptLocator=new Tn,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new bn,this._resultPolyList=new Z,this._resultLineList=new Z,this._resultPointList=new Z,this._graph=new fe(new Eg),this._geomFact=e.getFactory()}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.insertUniqueEdge=function(n){var i=this._edgeList.findEqualEdge(n);if(i!==null){var s=i.getLabel(),a=n.getLabel();i.isPointwiseEqual(n)||(a=new Jt(n.getLabel()),a.flip());var o=i.getDepth();o.isNull()&&o.add(s),o.add(a),s.merge(a)}else this._edgeList.add(n)},t.prototype.getGraph=function(){return this._graph},t.prototype.cancelDuplicateResultEdges=function(){for(var n=this._graph.getEdgeEnds().iterator();n.hasNext();){var i=n.next(),s=i.getSym();i.isInResult()&&s.isInResult()&&(i.setInResult(!1),s.setInResult(!1))}},t.prototype.isCoveredByLA=function(n){return!!(this.isCovered(n,this._resultLineList)||this.isCovered(n,this._resultPolyList))},t.prototype.computeGeometry=function(n,i,s,a){var o=new Z;return o.addAll(n),o.addAll(i),o.addAll(s),o.isEmpty()?t.createEmptyResult(a,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(o)},t.prototype.mergeSymLabels=function(){for(var n=this._graph.getNodes().iterator();n.hasNext();){var i=n.next();i.getEdges().mergeSymLabels()}},t.prototype.isCovered=function(n,i){for(var s=this,a=i.iterator();a.hasNext();){var o=a.next(),l=s._ptLocator.locate(n,o);if(l!==F.EXTERIOR)return!0}return!1},t.prototype.replaceCollapsedEdges=function(){for(var n=new Z,i=this._edgeList.iterator();i.hasNext();){var s=i.next();s.isCollapsed()&&(i.remove(),n.add(s.getCollapsedEdge()))}this._edgeList.addAll(n)},t.prototype.updateNodeLabelling=function(){for(var n=this._graph.getNodes().iterator();n.hasNext();){var i=n.next(),s=i.getEdges().getLabel();i.getLabel().merge(s)}},t.prototype.getResultGeometry=function(n){return this.computeOverlay(n),this._resultGeom},t.prototype.insertUniqueEdges=function(n){for(var i=this,s=n.iterator();s.hasNext();){var a=s.next();i.insertUniqueEdge(a)}},t.prototype.computeOverlay=function(n){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var i=new Z;this._arg[0].computeSplitEdges(i),this._arg[1].computeSplitEdges(i),this.insertUniqueEdges(i),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),aa.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(n),this.cancelDuplicateResultEdges();var s=new br(this._geomFact);s.add(this._graph),this._resultPolyList=s.getPolygons();var a=new ri(this,this._geomFact,this._ptLocator);this._resultLineList=a.build(n);var o=new Qa(this,this._geomFact,this._ptLocator);this._resultPointList=o.build(n),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,n)},t.prototype.labelIncompleteNode=function(n,i){var s=this._ptLocator.locate(n.getCoordinate(),this._arg[i].getGeometry());n.getLabel().setLocation(i,s)},t.prototype.copyPoints=function(n){for(var i=this,s=this._arg[n].getNodeIterator();s.hasNext();){var a=s.next(),o=i._graph.addNode(a.getCoordinate());o.setLabel(n,a.getLabel().getLocation(n))}},t.prototype.findResultAreaEdges=function(n){for(var i=this._graph.getEdgeEnds().iterator();i.hasNext();){var s=i.next(),a=s.getLabel();a.isArea()&&!s.isInteriorAreaEdge()&&t.isResultOfOp(a.getLocation(0,K.RIGHT),a.getLocation(1,K.RIGHT),n)&&s.setInResult(!0)}},t.prototype.computeLabelsFromDepths=function(){for(var n=this._edgeList.iterator();n.hasNext();){var i=n.next(),s=i.getLabel(),a=i.getDepth();if(!a.isNull()){a.normalize();for(var o=0;o<2;o++)!s.isNull(o)&&s.isArea()&&!a.isNull(o)&&(a.getDelta(o)===0?s.toLine(o):(Mt.isTrue(!a.isNull(o,K.LEFT),"depth of LEFT side has not been initialized"),s.setLocation(o,K.LEFT,a.getLocation(o,K.LEFT)),Mt.isTrue(!a.isNull(o,K.RIGHT),"depth of RIGHT side has not been initialized"),s.setLocation(o,K.RIGHT,a.getLocation(o,K.RIGHT))))}}},t.prototype.computeLabelling=function(){for(var n=this,i=this._graph.getNodes().iterator();i.hasNext();){var s=i.next();s.getEdges().computeLabelling(n._arg)}this.mergeSymLabels(),this.updateNodeLabelling()},t.prototype.labelIncompleteNodes=function(){for(var n=this,i=this._graph.getNodes().iterator();i.hasNext();){var s=i.next(),a=s.getLabel();s.isIsolated()&&(a.isNull(0)?n.labelIncompleteNode(s,0):n.labelIncompleteNode(s,1)),s.getEdges().updateLabelling(a)}},t.prototype.isCoveredByA=function(n){return!!this.isCovered(n,this._resultPolyList)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(pu);Ct.overlayOp=function(r,t,e){var n=new Ct(r,t),i=n.getResultGeometry(e);return i},Ct.intersection=function(r,t){if(r.isEmpty()||t.isEmpty())return Ct.createEmptyResult(Ct.INTERSECTION,r,t,r.getFactory());if(r.isGeometryCollection()){var e=t;return Ka.map(r,{interfaces_:function(){return[la.MapOp]},map:function(n){return n.intersection(e)}})}return r.checkNotGeometryCollection(r),r.checkNotGeometryCollection(t),lr.overlayOp(r,t,Ct.INTERSECTION)},Ct.symDifference=function(r,t){if(r.isEmpty()||t.isEmpty()){if(r.isEmpty()&&t.isEmpty())return Ct.createEmptyResult(Ct.SYMDIFFERENCE,r,t,r.getFactory());if(r.isEmpty())return t.copy();if(t.isEmpty())return r.copy()}return r.checkNotGeometryCollection(r),r.checkNotGeometryCollection(t),lr.overlayOp(r,t,Ct.SYMDIFFERENCE)},Ct.resultDimension=function(r,t,e){var n=t.getDimension(),i=e.getDimension(),s=-1;switch(r){case Ct.INTERSECTION:s=Math.min(n,i);break;case Ct.UNION:s=Math.max(n,i);break;case Ct.DIFFERENCE:s=n;break;case Ct.SYMDIFFERENCE:s=Math.max(n,i);break}return s},Ct.createEmptyResult=function(r,t,e,n){var i=null;switch(Ct.resultDimension(r,t,e)){case-1:i=n.createGeometryCollection(new Array(0).fill(null));break;case 0:i=n.createPoint();break;case 1:i=n.createLineString();break;case 2:i=n.createPolygon();break}return i},Ct.difference=function(r,t){return r.isEmpty()?Ct.createEmptyResult(Ct.DIFFERENCE,r,t,r.getFactory()):t.isEmpty()?r.copy():(r.checkNotGeometryCollection(r),r.checkNotGeometryCollection(t),lr.overlayOp(r,t,Ct.DIFFERENCE))},Ct.isResultOfOp=function(){if(arguments.length===2){var r=arguments[0],t=arguments[1],e=r.getLocation(0),n=r.getLocation(1);return Ct.isResultOfOp(e,n,t)}else if(arguments.length===3){var i=arguments[0],s=arguments[1],a=arguments[2];switch(i===F.BOUNDARY&&(i=F.INTERIOR),s===F.BOUNDARY&&(s=F.INTERIOR),a){case Ct.INTERSECTION:return i===F.INTERIOR&&s===F.INTERIOR;case Ct.UNION:return i===F.INTERIOR||s===F.INTERIOR;case Ct.DIFFERENCE:return i===F.INTERIOR&&s!==F.INTERIOR;case Ct.SYMDIFFERENCE:return i===F.INTERIOR&&s!==F.INTERIOR||i!==F.INTERIOR&&s===F.INTERIOR}return!1}},Ct.INTERSECTION=1,Ct.UNION=2,Ct.DIFFERENCE=3,Ct.SYMDIFFERENCE=4;var bs=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new Tn,this._seg=new pt;var t=arguments[0],e=arguments[1];this._g=t,this._boundaryDistanceTolerance=e,this._linework=this.extractLinework(t)};bs.prototype.isWithinToleranceOfBoundary=function(t){for(var e=this,n=0;n<this._linework.getNumGeometries();n++)for(var i=e._linework.getGeometryN(n),s=i.getCoordinateSequence(),a=0;a<s.size()-1;a++){s.getCoordinate(a,e._seg.p0),s.getCoordinate(a+1,e._seg.p1);var o=e._seg.distance(t);if(o<=e._boundaryDistanceTolerance)return!0}return!1},bs.prototype.getLocation=function(t){return this.isWithinToleranceOfBoundary(t)?F.BOUNDARY:this._ptLocator.locate(t,this._g)},bs.prototype.extractLinework=function(t){var e=new gu;t.apply(e);var n=e.getLinework(),i=Dt.toLineStringArray(n);return t.getFactory().createMultiLineString(i)},bs.prototype.interfaces_=function(){return[]},bs.prototype.getClass=function(){return bs};var gu=function(){this._linework=null,this._linework=new Z};gu.prototype.getLinework=function(){return this._linework},gu.prototype.filter=function(t){var e=this;if(t instanceof Ne){var n=t;this._linework.add(n.getExteriorRing());for(var i=0;i<n.getNumInteriorRing();i++)e._linework.add(n.getInteriorRingN(i))}},gu.prototype.interfaces_=function(){return[Xn]},gu.prototype.getClass=function(){return gu};var ua=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var t=arguments[0];this._g=t};ua.prototype.extractPoints=function(t,e,n){for(var i=this,s=t.getCoordinates(),a=0;a<s.length-1;a++)i.computeOffsetPoints(s[a],s[a+1],e,n)},ua.prototype.setSidesToGenerate=function(t,e){this._doLeft=t,this._doRight=e},ua.prototype.getPoints=function(t){for(var e=this,n=new Z,i=We.getLines(this._g),s=i.iterator();s.hasNext();){var a=s.next();e.extractPoints(a,t,n)}return n},ua.prototype.computeOffsetPoints=function(t,e,n,i){var s=e.x-t.x,a=e.y-t.y,o=Math.sqrt(s*s+a*a),l=n*s/o,u=n*a/o,c=(e.x+t.x)/2,h=(e.y+t.y)/2;if(this._doLeft){var f=new L(c-u,h+l);i.add(f)}if(this._doRight){var g=new L(c+u,h-l);i.add(g)}},ua.prototype.interfaces_=function(){return[]},ua.prototype.getClass=function(){return ua};var Wr=function r(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=r.TOLERANCE,this._testCoords=new Z;var t=arguments[0],e=arguments[1],n=arguments[2];this._boundaryDistanceTolerance=r.computeBoundaryDistanceTolerance(t,e),this._geom=[t,e,n],this._locFinder=[new bs(this._geom[0],this._boundaryDistanceTolerance),new bs(this._geom[1],this._boundaryDistanceTolerance),new bs(this._geom[2],this._boundaryDistanceTolerance)]},xg={TOLERANCE:{configurable:!0}};Wr.prototype.reportResult=function(t,e,n){Ve.out.println("Overlay result invalid - A:"+F.toLocationSymbol(e[0])+" B:"+F.toLocationSymbol(e[1])+" expected:"+(n?"i":"e")+" actual:"+F.toLocationSymbol(e[2]))},Wr.prototype.isValid=function(t){this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]);var e=this.checkValid(t);return e},Wr.prototype.checkValid=function(){var t=this;if(arguments.length===1){for(var e=arguments[0],n=0;n<this._testCoords.size();n++){var i=t._testCoords.get(n);if(!t.checkValid(e,i))return t._invalidLocation=i,!1}return!0}else if(arguments.length===2){var s=arguments[0],a=arguments[1];return this._location[0]=this._locFinder[0].getLocation(a),this._location[1]=this._locFinder[1].getLocation(a),this._location[2]=this._locFinder[2].getLocation(a),Wr.hasLocation(this._location,F.BOUNDARY)?!0:this.isValidResult(s,this._location)}},Wr.prototype.addTestPts=function(t){var e=new ua(t);this._testCoords.addAll(e.getPoints(5*this._boundaryDistanceTolerance))},Wr.prototype.isValidResult=function(t,e){var n=Ct.isResultOfOp(e[0],e[1],t),i=e[2]===F.INTERIOR,s=!(n^i);return s||this.reportResult(t,e,n),s},Wr.prototype.getInvalidLocation=function(){return this._invalidLocation},Wr.prototype.interfaces_=function(){return[]},Wr.prototype.getClass=function(){return Wr},Wr.hasLocation=function(t,e){for(var n=0;n<3;n++)if(t[n]===e)return!0;return!1},Wr.computeBoundaryDistanceTolerance=function(t,e){return Math.min(we.computeSizeBasedSnapTolerance(t),we.computeSizeBasedSnapTolerance(e))},Wr.isValid=function(t,e,n,i){var s=new Wr(t,e,i);return s.isValid(n)},xg.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(Wr,xg);var Hr=function r(t){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=r.extractFactory(t),this._inputGeoms=t};Hr.prototype.extractElements=function(t,e){var n=this;if(t===null)return null;for(var i=0;i<t.getNumGeometries();i++){var s=t.getGeometryN(i);n._skipEmpty&&s.isEmpty()||e.add(s)}},Hr.prototype.combine=function(){for(var t=this,e=new Z,n=this._inputGeoms.iterator();n.hasNext();){var i=n.next();t.extractElements(i,e)}return e.size()===0?this._geomFactory!==null?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(e)},Hr.prototype.interfaces_=function(){return[]},Hr.prototype.getClass=function(){return Hr},Hr.combine=function(){if(arguments.length===1){var t=arguments[0],e=new Hr(t);return e.combine()}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=new Hr(Hr.createList(n,i));return s.combine()}else if(arguments.length===3){var a=arguments[0],o=arguments[1],l=arguments[2],u=new Hr(Hr.createList(a,o,l));return u.combine()}},Hr.extractFactory=function(t){return t.isEmpty()?null:t.iterator().next().getFactory()},Hr.createList=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new Z;return n.add(t),n.add(e),n}else if(arguments.length===3){var i=arguments[0],s=arguments[1],a=arguments[2],o=new Z;return o.add(i),o.add(s),o.add(a),o}};var Ce=function(){this._inputPolys=null,this._geomFactory=null;var t=arguments[0];this._inputPolys=t,this._inputPolys===null&&(this._inputPolys=new Z)},Og={STRTREE_NODE_CAPACITY:{configurable:!0}};Ce.prototype.reduceToGeometries=function(t){for(var e=this,n=new Z,i=t.iterator();i.hasNext();){var s=i.next(),a=null;_t(s,Pn)?a=e.unionTree(s):s instanceof yt&&(a=s),n.add(a)}return n},Ce.prototype.extractByEnvelope=function(t,e,n){for(var i=new Z,s=0;s<e.getNumGeometries();s++){var a=e.getGeometryN(s);a.getEnvelopeInternal().intersects(t)?i.add(a):n.add(a)}return this._geomFactory.buildGeometry(i)},Ce.prototype.unionOptimized=function(t,e){var n=t.getEnvelopeInternal(),i=e.getEnvelopeInternal();if(!n.intersects(i)){var s=Hr.combine(t,e);return s}if(t.getNumGeometries()<=1&&e.getNumGeometries()<=1)return this.unionActual(t,e);var a=n.intersection(i);return this.unionUsingEnvelopeIntersection(t,e,a)},Ce.prototype.union=function(){if(this._inputPolys===null)throw new Error("union() method cannot be called twice");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var t=new gg(Ce.STRTREE_NODE_CAPACITY),e=this._inputPolys.iterator();e.hasNext();){var n=e.next();t.insert(n.getEnvelopeInternal(),n)}this._inputPolys=null;var i=t.itemsTree(),s=this.unionTree(i);return s},Ce.prototype.binaryUnion=function(){if(arguments.length===1){var t=arguments[0];return this.binaryUnion(t,0,t.size())}else if(arguments.length===3){var e=arguments[0],n=arguments[1],i=arguments[2];if(i-n<=1){var s=Ce.getGeometry(e,n);return this.unionSafe(s,null)}else{if(i-n===2)return this.unionSafe(Ce.getGeometry(e,n),Ce.getGeometry(e,n+1));var a=Math.trunc((i+n)/2),o=this.binaryUnion(e,n,a),l=this.binaryUnion(e,a,i);return this.unionSafe(o,l)}}},Ce.prototype.repeatedUnion=function(t){for(var e=null,n=t.iterator();n.hasNext();){var i=n.next();e===null?e=i.copy():e=e.union(i)}return e},Ce.prototype.unionSafe=function(t,e){return t===null&&e===null?null:t===null?e.copy():e===null?t.copy():this.unionOptimized(t,e)},Ce.prototype.unionActual=function(t,e){return Ce.restrictToPolygons(t.union(e))},Ce.prototype.unionTree=function(t){var e=this.reduceToGeometries(t),n=this.binaryUnion(e);return n},Ce.prototype.unionUsingEnvelopeIntersection=function(t,e,n){var i=new Z,s=this.extractByEnvelope(n,t,i),a=this.extractByEnvelope(n,e,i),o=this.unionActual(s,a);i.add(o);var l=Hr.combine(i);return l},Ce.prototype.bufferUnion=function(){if(arguments.length===1){var t=arguments[0],e=t.get(0).getFactory(),n=e.buildGeometry(t),i=n.buffer(0);return i}else if(arguments.length===2){var s=arguments[0],a=arguments[1],o=s.getFactory(),l=o.createGeometryCollection([s,a]),u=l.buffer(0);return u}},Ce.prototype.interfaces_=function(){return[]},Ce.prototype.getClass=function(){return Ce},Ce.restrictToPolygons=function(t){if(_t(t,ys))return t;var e=Qi.getPolygons(t);return e.size()===1?e.get(0):t.getFactory().createMultiPolygon(Dt.toPolygonArray(e))},Ce.getGeometry=function(t,e){return e>=t.size()?null:t.get(e)},Ce.union=function(t){var e=new Ce(t);return e.union()},Og.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Ce,Og);var wc=function(){};wc.prototype.interfaces_=function(){return[]},wc.prototype.getClass=function(){return wc},wc.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Ct.createEmptyResult(Ct.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),lr.overlayOp(t,e,Ct.UNION)};function ha(){return new Ec}function Ec(){this.reset()}Ec.prototype={constructor:Ec,reset:function(){this.s=this.t=0},add:function(r){Ag(Sc,r,this.t),Ag(this,Sc.s,this.s),this.s?this.t+=Sc.t:this.s=Sc.t},valueOf:function(){return this.s}};var Sc=new Ec;function Ag(r,t,e){var n=r.s=t+e,i=n-t,s=n-i;r.t=t-s+(e-i)}var Ie=1e-6,Bt=Math.PI,Bi=Bt/2,Lg=Bt/4,Zi=Bt*2,ca=180/Bt,ni=Bt/180,ur=Math.abs,A_=Math.atan,mu=Math.atan2,Te=Math.cos,De=Math.sin,vu=Math.sqrt;function Rg(r){return r>1?0:r<-1?Bt:Math.acos(r)}function Za(r){return r>1?Bi:r<-1?-Bi:Math.asin(r)}function fh(){}function Pc(r,t){r&&Gg.hasOwnProperty(r.type)&&Gg[r.type](r,t)}var Fg={Feature:function(r,t){Pc(r.geometry,t)},FeatureCollection:function(r,t){for(var e=r.features,n=-1,i=e.length;++n<i;)Pc(e[n].geometry,t)}},Gg={Sphere:function(r,t){t.sphere()},Point:function(r,t){r=r.coordinates,t.point(r[0],r[1],r[2])},MultiPoint:function(r,t){for(var e=r.coordinates,n=-1,i=e.length;++n<i;)r=e[n],t.point(r[0],r[1],r[2])},LineString:function(r,t){ed(r.coordinates,t,0)},MultiLineString:function(r,t){for(var e=r.coordinates,n=-1,i=e.length;++n<i;)ed(e[n],t,0)},Polygon:function(r,t){kg(r.coordinates,t)},MultiPolygon:function(r,t){for(var e=r.coordinates,n=-1,i=e.length;++n<i;)kg(e[n],t)},GeometryCollection:function(r,t){for(var e=r.geometries,n=-1,i=e.length;++n<i;)Pc(e[n],t)}};function ed(r,t,e){var n=-1,i=r.length-e,s;for(t.lineStart();++n<i;)s=r[n],t.point(s[0],s[1],s[2]);t.lineEnd()}function kg(r,t){var e=-1,n=r.length;for(t.polygonStart();++e<n;)ed(r[e],t,1);t.polygonEnd()}function L_(r,t){r&&Fg.hasOwnProperty(r.type)?Fg[r.type](r,t):Pc(r,t)}ha(),ha();function rd(r){return[mu(r[1],r[0]),Za(r[2])]}function yu(r){var t=r[0],e=r[1],n=Te(e);return[n*Te(t),n*De(t),De(e)]}function Cc(r,t){return r[0]*t[0]+r[1]*t[1]+r[2]*t[2]}function Ic(r,t){return[r[1]*t[2]-r[2]*t[1],r[2]*t[0]-r[0]*t[2],r[0]*t[1]-r[1]*t[0]]}function nd(r,t){r[0]+=t[0],r[1]+=t[1],r[2]+=t[2]}function Mc(r,t){return[r[0]*t,r[1]*t,r[2]*t]}function id(r){var t=vu(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);r[0]/=t,r[1]/=t,r[2]/=t}ha();function zg(r,t){function e(n,i){return n=r(n,i),t(n[0],n[1])}return r.invert&&t.invert&&(e.invert=function(n,i){return n=t.invert(n,i),n&&r.invert(n[0],n[1])}),e}function sd(r,t){return[r>Bt?r-Zi:r<-Bt?r+Zi:r,t]}sd.invert=sd;function R_(r,t,e){return(r%=Zi)?t||e?zg(Ug(r),qg(t,e)):Ug(r):t||e?qg(t,e):sd}function Vg(r){return function(t,e){return t+=r,[t>Bt?t-Zi:t<-Bt?t+Zi:t,e]}}function Ug(r){var t=Vg(r);return t.invert=Vg(-r),t}function qg(r,t){var e=Te(r),n=De(r),i=Te(t),s=De(t);function a(o,l){var u=Te(l),c=Te(o)*u,h=De(o)*u,f=De(l),g=f*e+c*n;return[mu(h*i-g*s,c*e-f*n),Za(g*i+h*s)]}return a.invert=function(o,l){var u=Te(l),c=Te(o)*u,h=De(o)*u,f=De(l),g=f*i-h*s;return[mu(h*i+f*s,c*e+g*n),Za(g*e-c*n)]},a}function F_(r,t,e,n,i,s){if(e){var a=Te(t),o=De(t),l=n*e;i==null?(i=t+n*Zi,s=t-l/2):(i=Wg(a,i),s=Wg(a,s),(n>0?i<s:i>s)&&(i+=n*Zi));for(var u,c=i;n>0?c>s:c<s;c-=l)u=rd([a,-o*Te(c),-o*De(c)]),r.point(u[0],u[1])}}function Wg(r,t){t=yu(t),t[0]-=r,id(t);var e=Rg(-t[1]);return((-t[2]<0?-e:e)+Zi-Ie)%Zi}function Hg(){var r=[],t;return{point:function(e,n){t.push([e,n])},lineStart:function(){r.push(t=[])},lineEnd:fh,rejoin:function(){r.length>1&&r.push(r.pop().concat(r.shift()))},result:function(){var e=r;return r=[],t=null,e}}}function G_(r,t,e,n,i,s){var a=r[0],o=r[1],l=t[0],u=t[1],c=0,h=1,f=l-a,g=u-o,m;if(m=e-a,!(!f&&m>0)){if(m/=f,f<0){if(m<c)return;m<h&&(h=m)}else if(f>0){if(m>h)return;m>c&&(c=m)}if(m=i-a,!(!f&&m<0)){if(m/=f,f<0){if(m>h)return;m>c&&(c=m)}else if(f>0){if(m<c)return;m<h&&(h=m)}if(m=n-o,!(!g&&m>0)){if(m/=g,g<0){if(m<c)return;m<h&&(h=m)}else if(g>0){if(m>h)return;m>c&&(c=m)}if(m=s-o,!(!g&&m<0)){if(m/=g,g<0){if(m>h)return;m>c&&(c=m)}else if(g>0){if(m<c)return;m<h&&(h=m)}return c>0&&(r[0]=a+c*f,r[1]=o+c*g),h<1&&(t[0]=a+h*f,t[1]=o+h*g),!0}}}}}function Nc(r,t){return ur(r[0]-t[0])<Ie&&ur(r[1]-t[1])<Ie}function bc(r,t,e,n){this.x=r,this.z=t,this.o=e,this.e=n,this.v=!1,this.n=this.p=null}function Xg(r,t,e,n,i){var s=[],a=[],o,l;if(r.forEach(function(m){if(!((_=m.length-1)<=0)){var _,E=m[0],M=m[_],y;if(Nc(E,M)){for(i.lineStart(),o=0;o<_;++o)i.point((E=m[o])[0],E[1]);i.lineEnd();return}s.push(y=new bc(E,m,null,!0)),a.push(y.o=new bc(E,null,y,!1)),s.push(y=new bc(M,m,null,!1)),a.push(y.o=new bc(M,null,y,!0))}}),!!s.length){for(a.sort(t),Yg(s),Yg(a),o=0,l=a.length;o<l;++o)a[o].e=e=!e;for(var u=s[0],c,h;;){for(var f=u,g=!0;f.v;)if((f=f.n)===u)return;c=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(g)for(o=0,l=c.length;o<l;++o)i.point((h=c[o])[0],h[1]);else n(f.x,f.n.x,1,i);f=f.n}else{if(g)for(c=f.p.z,o=c.length-1;o>=0;--o)i.point((h=c[o])[0],h[1]);else n(f.x,f.p.x,-1,i);f=f.p}f=f.o,c=f.z,g=!g}while(!f.v);i.lineEnd()}}}function Yg(r){if(t=r.length){for(var t,e=0,n=r[0],i;++e<t;)n.n=i=r[e],i.p=n,n=i;n.n=i=r[0],i.p=n}}function Jg(r,t){return r<t?-1:r>t?1:r>=t?0:NaN}function k_(r){return r.length===1&&(r=z_(r)),{left:function(t,e,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var s=n+i>>>1;r(t[s],e)<0?n=s+1:i=s}return n},right:function(t,e,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var s=n+i>>>1;r(t[s],e)>0?i=s:n=s+1}return n}}}function z_(r){return function(t,e){return Jg(r(t),e)}}k_(Jg);function Kg(r){for(var t=r.length,e,n=-1,i=0,s,a;++n<t;)i+=r[n].length;for(s=new Array(i);--t>=0;)for(a=r[t],e=a.length;--e>=0;)s[--i]=a[e];return s}var Tc=1e9,Dc=-1e9;function V_(r,t,e,n){function i(u,c){return r<=u&&u<=e&&t<=c&&c<=n}function s(u,c,h,f){var g=0,m=0;if(u==null||(g=a(u,h))!==(m=a(c,h))||l(u,c)<0^h>0)do f.point(g===0||g===3?r:e,g>1?n:t);while((g=(g+h+4)%4)!==m);else f.point(c[0],c[1])}function a(u,c){return ur(u[0]-r)<Ie?c>0?0:3:ur(u[0]-e)<Ie?c>0?2:1:ur(u[1]-t)<Ie?c>0?1:0:c>0?3:2}function o(u,c){return l(u.x,c.x)}function l(u,c){var h=a(u,1),f=a(c,1);return h!==f?h-f:h===0?c[1]-u[1]:h===1?u[0]-c[0]:h===2?u[1]-c[1]:c[0]-u[0]}return function(u){var c=u,h=Hg(),f,g,m,_,E,M,y,w,v,S,P,I={point:b,lineStart:x,lineEnd:R,polygonStart:O,polygonEnd:T};function b(rt,B){i(rt,B)&&c.point(rt,B)}function D(){for(var rt=0,B=0,ct=g.length;B<ct;++B)for(var G=g[B],X=1,k=G.length,V=G[0],A,W,J=V[0],ot=V[1];X<k;++X)A=J,W=ot,V=G[X],J=V[0],ot=V[1],W<=n?ot>n&&(J-A)*(n-W)>(ot-W)*(r-A)&&++rt:ot<=n&&(J-A)*(n-W)<(ot-W)*(r-A)&&--rt;return rt}function O(){c=h,f=[],g=[],P=!0}function T(){var rt=D(),B=P&&rt,ct=(f=Kg(f)).length;(B||ct)&&(u.polygonStart(),B&&(u.lineStart(),s(null,null,1,u),u.lineEnd()),ct&&Xg(f,o,rt,s,u),u.polygonEnd()),c=u,f=g=m=null}function x(){I.point=z,g&&g.push(m=[]),S=!0,v=!1,y=w=NaN}function R(){f&&(z(_,E),M&&v&&h.rejoin(),f.push(h.result())),I.point=b,v&&c.lineEnd()}function z(rt,B){var ct=i(rt,B);if(g&&m.push([rt,B]),S)_=rt,E=B,M=ct,S=!1,ct&&(c.lineStart(),c.point(rt,B));else if(ct&&v)c.point(rt,B);else{var G=[y=Math.max(Dc,Math.min(Tc,y)),w=Math.max(Dc,Math.min(Tc,w))],X=[rt=Math.max(Dc,Math.min(Tc,rt)),B=Math.max(Dc,Math.min(Tc,B))];G_(G,X,r,t,e,n)?(v||(c.lineStart(),c.point(G[0],G[1])),c.point(X[0],X[1]),ct||c.lineEnd(),P=!1):ct&&(c.lineStart(),c.point(rt,B),P=!1)}y=rt,w=B,v=ct}return I}}var ad=ha();function U_(r,t){var e=t[0],n=t[1],i=[De(e),-Te(e),0],s=0,a=0;ad.reset();for(var o=0,l=r.length;o<l;++o)if(c=(u=r[o]).length)for(var u,c,h=u[c-1],f=h[0],g=h[1]/2+Lg,m=De(g),_=Te(g),E=0;E<c;++E,f=y,m=v,_=S,h=M){var M=u[E],y=M[0],w=M[1]/2+Lg,v=De(w),S=Te(w),P=y-f,I=P>=0?1:-1,b=I*P,D=b>Bt,O=m*v;if(ad.add(mu(O*I*De(b),_*S+O*Te(b))),s+=D?P+I*Zi:P,D^f>=e^y>=e){var T=Ic(yu(h),yu(M));id(T);var x=Ic(i,T);id(x);var R=(D^P>=0?-1:1)*Za(x[2]);(n>R||n===R&&(T[0]||T[1]))&&(a+=D^P>=0?1:-1)}}return(s<-1e-6||s<Ie&&ad<-1e-6)^a&1}ha();function Qg(r){return r}ha(),ha();var _u=1/0,xc=_u,dh=-_u,Oc=dh,Bg={point:q_,lineStart:fh,lineEnd:fh,polygonStart:fh,polygonEnd:fh,result:function(){var r=[[_u,xc],[dh,Oc]];return dh=Oc=-(xc=_u=1/0),r}};function q_(r,t){r<_u&&(_u=r),r>dh&&(dh=r),t<xc&&(xc=t),t>Oc&&(Oc=t)}ha();function Zg(r,t,e,n){return function(i,s){var a=t(s),o=i.invert(n[0],n[1]),l=Hg(),u=t(l),c=!1,h,f,g,m={point:_,lineStart:M,lineEnd:y,polygonStart:function(){m.point=w,m.lineStart=v,m.lineEnd=S,f=[],h=[]},polygonEnd:function(){m.point=_,m.lineStart=M,m.lineEnd=y,f=Kg(f);var P=U_(h,o);f.length?(c||(s.polygonStart(),c=!0),Xg(f,H_,P,e,s)):P&&(c||(s.polygonStart(),c=!0),s.lineStart(),e(null,null,1,s),s.lineEnd()),c&&(s.polygonEnd(),c=!1),f=h=null},sphere:function(){s.polygonStart(),s.lineStart(),e(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function _(P,I){var b=i(P,I);r(P=b[0],I=b[1])&&s.point(P,I)}function E(P,I){var b=i(P,I);a.point(b[0],b[1])}function M(){m.point=E,a.lineStart()}function y(){m.point=_,a.lineEnd()}function w(P,I){g.push([P,I]);var b=i(P,I);u.point(b[0],b[1])}function v(){u.lineStart(),g=[]}function S(){w(g[0][0],g[0][1]),u.lineEnd();var P=u.clean(),I=l.result(),b,D=I.length,O,T,x;if(g.pop(),h.push(g),g=null,!!D){if(P&1){if(T=I[0],(O=T.length-1)>0){for(c||(s.polygonStart(),c=!0),s.lineStart(),b=0;b<O;++b)s.point((x=T[b])[0],x[1]);s.lineEnd()}return}D>1&&P&2&&I.push(I.pop().concat(I.shift())),f.push(I.filter(W_))}}return m}}function W_(r){return r.length>1}function H_(r,t){return((r=r.x)[0]<0?r[1]-Bi-Ie:Bi-r[1])-((t=t.x)[0]<0?t[1]-Bi-Ie:Bi-t[1])}const $g=Zg(function(){return!0},X_,J_,[-Bt,-Bi]);function X_(r){var t=NaN,e=NaN,n=NaN,i;return{lineStart:function(){r.lineStart(),i=1},point:function(s,a){var o=s>0?Bt:-Bt,l=ur(s-t);ur(l-Bt)<Ie?(r.point(t,e=(e+a)/2>0?Bi:-Bi),r.point(n,e),r.lineEnd(),r.lineStart(),r.point(o,e),r.point(s,e),i=0):n!==o&&l>=Bt&&(ur(t-n)<Ie&&(t-=n*Ie),ur(s-o)<Ie&&(s-=o*Ie),e=Y_(t,e,s,a),r.point(n,e),r.lineEnd(),r.lineStart(),r.point(o,e),i=0),r.point(t=s,e=a),n=o},lineEnd:function(){r.lineEnd(),t=e=NaN},clean:function(){return 2-i}}}function Y_(r,t,e,n){var i,s,a=De(r-e);return ur(a)>Ie?A_((De(t)*(s=Te(n))*De(e)-De(n)*(i=Te(t))*De(r))/(i*s*a)):(t+n)/2}function J_(r,t,e,n){var i;if(r==null)i=e*Bi,n.point(-Bt,i),n.point(0,i),n.point(Bt,i),n.point(Bt,0),n.point(Bt,-i),n.point(0,-i),n.point(-Bt,-i),n.point(-Bt,0),n.point(-Bt,i);else if(ur(r[0]-t[0])>Ie){var s=r[0]<t[0]?Bt:-Bt;i=e*s/2,n.point(-s,i),n.point(0,i),n.point(s,i)}else n.point(t[0],t[1])}function K_(r,t){var e=Te(r),n=e>0,i=ur(e)>Ie;function s(c,h,f,g){F_(g,r,t,f,c,h)}function a(c,h){return Te(c)*Te(h)>e}function o(c){var h,f,g,m,_;return{lineStart:function(){m=g=!1,_=1},point:function(E,M){var y=[E,M],w,v=a(E,M),S=n?v?0:u(E,M):v?u(E+(E<0?Bt:-Bt),M):0;if(!h&&(m=g=v)&&c.lineStart(),v!==g&&(w=l(h,y),(!w||Nc(h,w)||Nc(y,w))&&(y[0]+=Ie,y[1]+=Ie,v=a(y[0],y[1]))),v!==g)_=0,v?(c.lineStart(),w=l(y,h),c.point(w[0],w[1])):(w=l(h,y),c.point(w[0],w[1]),c.lineEnd()),h=w;else if(i&&h&&n^v){var P;!(S&f)&&(P=l(y,h,!0))&&(_=0,n?(c.lineStart(),c.point(P[0][0],P[0][1]),c.point(P[1][0],P[1][1]),c.lineEnd()):(c.point(P[1][0],P[1][1]),c.lineEnd(),c.lineStart(),c.point(P[0][0],P[0][1])))}v&&(!h||!Nc(h,y))&&c.point(y[0],y[1]),h=y,g=v,f=S},lineEnd:function(){g&&c.lineEnd(),h=null},clean:function(){return _|(m&&g)<<1}}}function l(c,h,f){var g=yu(c),m=yu(h),_=[1,0,0],E=Ic(g,m),M=Cc(E,E),y=E[0],w=M-y*y;if(!w)return!f&&c;var v=e*M/w,S=-e*y/w,P=Ic(_,E),I=Mc(_,v),b=Mc(E,S);nd(I,b);var D=P,O=Cc(I,D),T=Cc(D,D),x=O*O-T*(Cc(I,I)-1);if(!(x<0)){var R=vu(x),z=Mc(D,(-O-R)/T);if(nd(z,I),z=rd(z),!f)return z;var rt=c[0],B=h[0],ct=c[1],G=h[1],X;B<rt&&(X=rt,rt=B,B=X);var k=B-rt,V=ur(k-Bt)<Ie,A=V||k<Ie;if(!V&&G<ct&&(X=ct,ct=G,G=X),A?V?ct+G>0^z[1]<(ur(z[0]-rt)<Ie?ct:G):ct<=z[1]&&z[1]<=G:k>Bt^(rt<=z[0]&&z[0]<=B)){var W=Mc(D,(-O+R)/T);return nd(W,I),[z,rd(W)]}}}function u(c,h){var f=n?r:Bt-r,g=0;return c<-f?g|=1:c>f&&(g|=2),h<-f?g|=4:h>f&&(g|=8),g}return Zg(a,o,s,n?[0,-r]:[-Bt,r-Bt])}function jg(r){return function(t){var e=new od;for(var n in r)e[n]=r[n];return e.stream=t,e}}function od(){}od.prototype={constructor:od,point:function(r,t){this.stream.point(r,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function tm(r,t,e){var n=t[1][0]-t[0][0],i=t[1][1]-t[0][1],s=r.clipExtent&&r.clipExtent();r.scale(150).translate([0,0]),s!=null&&r.clipExtent(null),L_(e,r.stream(Bg));var a=Bg.result(),o=Math.min(n/(a[1][0]-a[0][0]),i/(a[1][1]-a[0][1])),l=+t[0][0]+(n-o*(a[1][0]+a[0][0]))/2,u=+t[0][1]+(i-o*(a[1][1]+a[0][1]))/2;return s!=null&&r.clipExtent(s),r.scale(o*150).translate([l,u])}function Q_(r,t,e){return tm(r,[[0,0],t],e)}var em=16,B_=Te(30*ni);function rm(r,t){return+t?$_(r,t):Z_(r)}function Z_(r){return jg({point:function(t,e){t=r(t,e),this.stream.point(t[0],t[1])}})}function $_(r,t){function e(n,i,s,a,o,l,u,c,h,f,g,m,_,E){var M=u-n,y=c-i,w=M*M+y*y;if(w>4*t&&_--){var v=a+f,S=o+g,P=l+m,I=vu(v*v+S*S+P*P),b=Za(P/=I),D=ur(ur(P)-1)<Ie||ur(s-h)<Ie?(s+h)/2:mu(S,v),O=r(D,b),T=O[0],x=O[1],R=T-n,z=x-i,rt=y*R-M*z;(rt*rt/w>t||ur((M*R+y*z)/w-.5)>.3||a*f+o*g+l*m<B_)&&(e(n,i,s,a,o,l,T,x,D,v/=I,S/=I,P,_,E),E.point(T,x),e(T,x,D,v,S,P,u,c,h,f,g,m,_,E))}}return function(n){var i,s,a,o,l,u,c,h,f,g,m,_,E={point:M,lineStart:y,lineEnd:v,polygonStart:function(){n.polygonStart(),E.lineStart=S},polygonEnd:function(){n.polygonEnd(),E.lineStart=y}};function M(b,D){b=r(b,D),n.point(b[0],b[1])}function y(){h=NaN,E.point=w,n.lineStart()}function w(b,D){var O=yu([b,D]),T=r(b,D);e(h,f,c,g,m,_,h=T[0],f=T[1],c=b,g=O[0],m=O[1],_=O[2],em,n),n.point(h,f)}function v(){E.point=M,n.lineEnd()}function S(){y(),E.point=P,E.lineEnd=I}function P(b,D){w(i=b,D),s=h,a=f,o=g,l=m,u=_,E.point=w}function I(){e(h,f,c,g,m,_,s,a,i,o,l,u,em,n),E.lineEnd=v,v()}return E}}var j_=jg({point:function(r,t){this.stream.point(r*ni,t*ni)}});function t1(r){return e1(function(){return r})()}function e1(r){var t,e=150,n=480,i=250,s,a,o=0,l=0,u=0,c=0,h=0,f,g,m=null,_=$g,E=null,M,y,w,v=Qg,S=.5,P=rm(T,S),I,b;function D(z){return z=g(z[0]*ni,z[1]*ni),[z[0]*e+s,a-z[1]*e]}function O(z){return z=g.invert((z[0]-s)/e,(a-z[1])/e),z&&[z[0]*ca,z[1]*ca]}function T(z,rt){return z=t(z,rt),[z[0]*e+s,a-z[1]*e]}D.stream=function(z){return I&&b===z?I:I=j_(_(f,P(v(b=z))))},D.clipAngle=function(z){return arguments.length?(_=+z?K_(m=z*ni,6*ni):(m=null,$g),R()):m*ca},D.clipExtent=function(z){return arguments.length?(v=z==null?(E=M=y=w=null,Qg):V_(E=+z[0][0],M=+z[0][1],y=+z[1][0],w=+z[1][1]),R()):E==null?null:[[E,M],[y,w]]},D.scale=function(z){return arguments.length?(e=+z,x()):e},D.translate=function(z){return arguments.length?(n=+z[0],i=+z[1],x()):[n,i]},D.center=function(z){return arguments.length?(o=z[0]%360*ni,l=z[1]%360*ni,x()):[o*ca,l*ca]},D.rotate=function(z){return arguments.length?(u=z[0]%360*ni,c=z[1]%360*ni,h=z.length>2?z[2]%360*ni:0,x()):[u*ca,c*ca,h*ca]},D.precision=function(z){return arguments.length?(P=rm(T,S=z*z),R()):vu(S)},D.fitExtent=function(z,rt){return tm(D,z,rt)},D.fitSize=function(z,rt){return Q_(D,z,rt)};function x(){g=zg(f=R_(u,c,h),t);var z=t(o,l);return s=n-z[0]*e,a=i+z[1]*e,R()}function R(){return I=b=null,D}return function(){return t=r.apply(this,arguments),D.invert=t.invert&&O,x()}}function nm(r){return function(t,e){var n=Te(t),i=Te(e),s=r(n*i);return[s*i*De(t),s*De(e)]}}function im(r){return function(t,e){var n=vu(t*t+e*e),i=r(n),s=De(i),a=Te(i);return[mu(t*s,n*a),Za(n&&e*s/n)]}}var r1=nm(function(r){return vu(2/(1+r))});r1.invert=im(function(r){return 2*Za(r/2)});var sm=nm(function(r){return(r=Rg(r))&&r/De(r)});sm.invert=im(function(r){return r});function n1(){return t1(sm).scale(79.4188).clipAngle(179.999)}function am(r,t){return[r,t]}am.invert=am;function i1(r,t,e){e=e||{};var n=e.units||"kilometers",i=e.steps||8;if(!r)throw new Error("geojson is required");if(typeof e!="object")throw new Error("options must be an object");if(typeof i!="number")throw new Error("steps must be an number");if(t===void 0)throw new Error("radius is required");if(i<=0)throw new Error("steps must be greater than 0");var s=[];switch(r.type){case"GeometryCollection":return Bh(r,function(a){var o=Ac(a,t,n,i);o&&s.push(o)}),Wl(s);case"FeatureCollection":return Qh(r,function(a){var o=Ac(a,t,n,i);o&&Qh(o,function(l){l&&s.push(l)})}),Wl(s)}return Ac(r,t,n,i)}function Ac(r,t,e,n){var i=r.properties||{},s=r.type==="Feature"?r.geometry:r;if(s.type==="GeometryCollection"){var a=[];return Bh(r,function(_){var E=Ac(_,t,e,n);E&&a.push(E)}),Wl(a)}var o=s1(s),l={type:s.type,coordinates:lm(s.coordinates,o)},u=new Xf,c=u.read(l),h=yf(_f(t,e),"meters"),f=qe.bufferOp(c,h,n),g=new dg;if(f=g.write(f),!om(f.coordinates)){var m={type:f.type,coordinates:um(f.coordinates,o)};return ui(m,i)}}function om(r){return Array.isArray(r[0])?om(r[0]):isNaN(r[0])}function lm(r,t){return typeof r[0]!="object"?t(r):r.map(function(e){return lm(e,t)})}function um(r,t){return typeof r[0]!="object"?t.invert(r):r.map(function(e){return um(e,t)})}function s1(r){var t=ly(r).geometry.coordinates,e=[-t[0],-t[1]];return n1().rotate(e).scale(hr)}function a1(r,t,e){e===void 0&&(e={});var n=_n(r),i=_n(t),s=Ff.union(n.coordinates,i.coordinates);return s.length===0?null:s.length===1?Cr(s[0],e.properties):vf(s,e.properties)}function o1(r,t,e){e===void 0&&(e={});var n=_n(r),i=_n(t),s=Ff.intersection(n.coordinates,i.coordinates);return s.length===0?null:s.length===1?Cr(s[0],e.properties):vf(s,e.properties)}function l1(r,t){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1])&&r.push(r[0]);const e=ae(t),n=Cr([r]);return kn(e,n)}function u1(r,t){const e=hi(r);return Sy(e,t,{units:"meters"}).geometry.coordinates}function ld(r){if((r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),r.length<=3)return 0;const t=Cr([r]);return wy(t)}function h1(r){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]);const t=Cr([r]),n=Pp(t).geometry.coordinates;return[n[0],n[1],n[2]??r[0][2]??0]}function c1(r,t,e,n){const[i,s,a]=r,o=Xl(ae([i,s]),t,e,{units:"meters"});if(!(!o||!o.geometry||!o.geometry.coordinates))return n=n||[0,0,0],n[0]=o.geometry.coordinates[0],n[1]=o.geometry.coordinates[1],n[2]=a,n}function ud(r,t){return ps(ae(r),ae(t),{units:"meters"})}function Lc(r,t){return Uu(ae(r),ae(t))}function f1(r,t){return xp(hi(r),hi(t))}function d1(r,t){const e=ae(r),n=ae(t),i=oy(e,n),s=(r[2]+t[2])/2;return[...i.geometry.coordinates,s]}function p1(r,t){const e=ae(t),n=hi(r);return my(n,e,{units:"meters"})}function g1(r,t){const e=ae(r),n=hi(t);return yy(e,n,{units:"meters"})}function m1(r,t,e,n){const[i,s,a]=r,o=Ly(ae([i,s]),t,e,{units:"meters"});if(!(!o||!o.geometry||!o.geometry.coordinates))return n=n||[0,0,0],n[0]=o.geometry.coordinates[0],n[1]=o.geometry.coordinates[1],n[2]=a,n}function hm(r,t){return Ap(ae(r),ae(t),{units:"meters"})}function v1(r,t){return Ay(ae(r),ae(t))}function cm(r,t){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=o1(Cr([r]),Cr([t]));if(e)return e.geometry.coordinates}function fm(r,t){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=a1(Cr([r]),Cr([t]));if(e)return e.geometry.coordinates}function dm(r,t=500,e="meters"){const n=i1(hi(r),t,{units:e});if(n)return n.geometry.coordinates}function pm(r,t){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=g_(Cr([r]),Cr([t]));if(e)return e.geometry.coordinates}function gm(r,t,e=10,n="meters"){return sy(r,t,{steps:e,units:n}).geometry.coordinates}function hd(r,t){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=Cr([r]),n=Cr([t]);return Fy(e,n)?"oneBig":Cy(e,n)?"twoBig":!1}function mm(r){const t=d.min(d.objsIterator(r,["0"])),e=d.min(d.objsIterator(r,["1"])),n=d.min(d.objsIterator(r,["2"])),i=d.max(d.objsIterator(r,["0"])),s=d.max(d.objsIterator(r,["1"])),a=d.max(d.objsIterator(r,["2"]));return{minPos:[t,e,n],maxPos:[i,s,a],center:[(t+i)*.5,(e+s)*.5,(n+a)*.5]}}function y1(r){const{minPos:t,maxPos:e,center:n}=mm(r);if(t.some(o=>!Number.isFinite(o)||e.some(l=>!Number.isFinite(l))||n.some(l=>!Number.isFinite(l)))){console.warn("geoCenterAndRadiusFromPositions error: minPos.some(e => !Number.isFinite(e) || maxPos.some(e => !Number.isFinite(e)) || center.some(e => !Number.isFinite(e))");return}const i=ud(t,e);let s=i*.5;const a=Math.abs(t[2]-e[2]);return a!=0&&(s=Math.sqrt(i*i+a*a)*.5),{center:n,radius:s}}function _1(r){r("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),r("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),r("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var t=1;t<=60;++t)r("EPSG:"+(32600+t),"+proj=utm +zone="+t+" +datum=WGS84 +units=m"),r("EPSG:"+(32700+t),"+proj=utm +zone="+t+" +south +datum=WGS84 +units=m");r.WGS84=r["EPSG:4326"],r["EPSG:3785"]=r["EPSG:3857"],r.GOOGLE=r["EPSG:3857"],r["EPSG:900913"]=r["EPSG:3857"],r["EPSG:102113"]=r["EPSG:3857"]}var $a=1,ja=2,wu=3,w1=4,cd=5,vm=6378137,E1=6356752314e-3,ym=.0066943799901413165,ph=484813681109536e-20,Q=Math.PI/2,S1=.16666666666666666,P1=.04722222222222222,C1=.022156084656084655,st=1e-10,de=.017453292519943295,$i=57.29577951308232,ee=Math.PI/4,gh=Math.PI*2,mr=3.14159265359,an={};an.greenwich=0,an.lisbon=-9.131906111111,an.paris=2.337229166667,an.bogota=-74.080916666667,an.madrid=-3.687938888889,an.rome=12.452333333333,an.bern=7.439583333333,an.jakarta=106.807719444444,an.ferro=-17.666666666667,an.brussels=4.367975,an.stockholm=18.058277777778,an.athens=23.7163375,an.oslo=10.722916666667;const I1={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}};var _m=/[\s_\-\/\(\)]/g;function fa(r,t){if(r[t])return r[t];for(var e=Object.keys(r),n=t.toLowerCase().replace(_m,""),i=-1,s,a;++i<e.length;)if(s=e[i],a=s.toLowerCase().replace(_m,""),a===n)return r[s]}function fd(r){var t={},e=r.split("+").map(function(o){return o.trim()}).filter(function(o){return o}).reduce(function(o,l){var u=l.split("=");return u.push(!0),o[u[0].toLowerCase()]=u[1],o},{}),n,i,s,a={proj:"projName",datum:"datumCode",rf:function(o){t.rf=parseFloat(o)},lat_0:function(o){t.lat0=o*de},lat_1:function(o){t.lat1=o*de},lat_2:function(o){t.lat2=o*de},lat_ts:function(o){t.lat_ts=o*de},lon_0:function(o){t.long0=o*de},lon_1:function(o){t.long1=o*de},lon_2:function(o){t.long2=o*de},alpha:function(o){t.alpha=parseFloat(o)*de},gamma:function(o){t.rectified_grid_angle=parseFloat(o)*de},lonc:function(o){t.longc=o*de},x_0:function(o){t.x0=parseFloat(o)},y_0:function(o){t.y0=parseFloat(o)},k_0:function(o){t.k0=parseFloat(o)},k:function(o){t.k0=parseFloat(o)},a:function(o){t.a=parseFloat(o)},b:function(o){t.b=parseFloat(o)},r:function(o){t.a=t.b=parseFloat(o)},r_a:function(){t.R_A=!0},zone:function(o){t.zone=parseInt(o,10)},south:function(){t.utmSouth=!0},towgs84:function(o){t.datum_params=o.split(",").map(function(l){return parseFloat(l)})},to_meter:function(o){t.to_meter=parseFloat(o)},units:function(o){t.units=o;var l=fa(I1,o);l&&(t.to_meter=l.to_meter)},from_greenwich:function(o){t.from_greenwich=o*de},pm:function(o){var l=fa(an,o);t.from_greenwich=(l||parseFloat(o))*de},nadgrids:function(o){o==="@null"?t.datumCode="none":t.nadgrids=o},axis:function(o){var l="ewnsud";o.length===3&&l.indexOf(o.substr(0,1))!==-1&&l.indexOf(o.substr(1,1))!==-1&&l.indexOf(o.substr(2,1))!==-1&&(t.axis=o)},approx:function(){t.approx=!0}};for(n in e)i=e[n],n in a?(s=a[n],typeof s=="function"?s(i):t[s]=i):t[n]=i;return typeof t.datumCode=="string"&&t.datumCode!=="WGS84"&&(t.datumCode=t.datumCode.toLowerCase()),t}class wm{static getId(t){const e=t.find(n=>Array.isArray(n)&&n[0]==="ID");return e&&e.length>=3?{authority:e[1],code:parseInt(e[2],10)}:null}static convertUnit(t,e="unit"){if(!t||t.length<3)return{type:e,name:"unknown",conversion_factor:null};const n=t[1],i=parseFloat(t[2])||null,s=t.find(o=>Array.isArray(o)&&o[0]==="ID"),a=s?{authority:s[1],code:parseInt(s[2],10)}:null;return{type:e,name:n,conversion_factor:i,id:a}}static convertAxis(t){const e=t[1]||"Unknown";let n;const i=e.match(/^\((.)\)$/);if(i){const u=i[1].toUpperCase();if(u==="E")n="east";else if(u==="N")n="north";else if(u==="U")n="up";else throw new Error(`Unknown axis abbreviation: ${u}`)}else n=t[2]?t[2].toLowerCase():"unknown";const s=t.find(u=>Array.isArray(u)&&u[0]==="ORDER"),a=s?parseInt(s[1],10):null,o=t.find(u=>Array.isArray(u)&&(u[0]==="LENGTHUNIT"||u[0]==="ANGLEUNIT"||u[0]==="SCALEUNIT")),l=this.convertUnit(o);return{name:e,direction:n,unit:l,order:a}}static extractAxes(t){return t.filter(e=>Array.isArray(e)&&e[0]==="AXIS").map(e=>this.convertAxis(e)).sort((e,n)=>(e.order||0)-(n.order||0))}static convert(t,e={}){switch(t[0]){case"PROJCRS":e.type="ProjectedCRS",e.name=t[1],e.base_crs=t.find(f=>Array.isArray(f)&&f[0]==="BASEGEOGCRS")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="BASEGEOGCRS")):null,e.conversion=t.find(f=>Array.isArray(f)&&f[0]==="CONVERSION")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="CONVERSION")):null;const n=t.find(f=>Array.isArray(f)&&f[0]==="CS");n&&(e.coordinate_system={type:n[1],axis:this.extractAxes(t)});const i=t.find(f=>Array.isArray(f)&&f[0]==="LENGTHUNIT");if(i){const f=this.convertUnit(i);e.coordinate_system.unit=f}e.id=this.getId(t);break;case"BASEGEOGCRS":case"GEOGCRS":e.type="GeographicCRS",e.name=t[1];const s=t.find(f=>Array.isArray(f)&&(f[0]==="DATUM"||f[0]==="ENSEMBLE"));if(s){const f=this.convert(s);s[0]==="ENSEMBLE"?e.datum_ensemble=f:e.datum=f;const g=t.find(m=>Array.isArray(m)&&m[0]==="PRIMEM");g&&g[1]!=="Greenwich"&&(f.prime_meridian={name:g[1],longitude:parseFloat(g[2])})}e.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(t)},e.id=this.getId(t);break;case"DATUM":e.type="GeodeticReferenceFrame",e.name=t[1],e.ellipsoid=t.find(f=>Array.isArray(f)&&f[0]==="ELLIPSOID")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="ELLIPSOID")):null;break;case"ENSEMBLE":e.type="DatumEnsemble",e.name=t[1],e.members=t.filter(f=>Array.isArray(f)&&f[0]==="MEMBER").map(f=>({type:"DatumEnsembleMember",name:f[1],id:this.getId(f)}));const a=t.find(f=>Array.isArray(f)&&f[0]==="ENSEMBLEACCURACY");a&&(e.accuracy=parseFloat(a[1]));const o=t.find(f=>Array.isArray(f)&&f[0]==="ELLIPSOID");o&&(e.ellipsoid=this.convert(o)),e.id=this.getId(t);break;case"ELLIPSOID":e.type="Ellipsoid",e.name=t[1],e.semi_major_axis=parseFloat(t[2]),e.inverse_flattening=parseFloat(t[3]),t.find(f=>Array.isArray(f)&&f[0]==="LENGTHUNIT")&&this.convert(t.find(f=>Array.isArray(f)&&f[0]==="LENGTHUNIT"),e);break;case"CONVERSION":e.type="Conversion",e.name=t[1],e.method=t.find(f=>Array.isArray(f)&&f[0]==="METHOD")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="METHOD")):null,e.parameters=t.filter(f=>Array.isArray(f)&&f[0]==="PARAMETER").map(f=>this.convert(f));break;case"METHOD":e.type="Method",e.name=t[1],e.id=this.getId(t);break;case"PARAMETER":e.type="Parameter",e.name=t[1],e.value=parseFloat(t[2]),e.unit=this.convertUnit(t.find(f=>Array.isArray(f)&&(f[0]==="LENGTHUNIT"||f[0]==="ANGLEUNIT"||f[0]==="SCALEUNIT"))),e.id=this.getId(t);break;case"BOUNDCRS":e.type="BoundCRS";const l=t.find(f=>Array.isArray(f)&&f[0]==="SOURCECRS");if(l){const f=l.find(g=>Array.isArray(g));e.source_crs=f?this.convert(f):null}const u=t.find(f=>Array.isArray(f)&&f[0]==="TARGETCRS");if(u){const f=u.find(g=>Array.isArray(g));e.target_crs=f?this.convert(f):null}const c=t.find(f=>Array.isArray(f)&&f[0]==="ABRIDGEDTRANSFORMATION");c?e.transformation=this.convert(c):e.transformation=null;break;case"ABRIDGEDTRANSFORMATION":if(e.type="Transformation",e.name=t[1],e.method=t.find(f=>Array.isArray(f)&&f[0]==="METHOD")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="METHOD")):null,e.parameters=t.filter(f=>Array.isArray(f)&&(f[0]==="PARAMETER"||f[0]==="PARAMETERFILE")).map(f=>{if(f[0]==="PARAMETER")return this.convert(f);if(f[0]==="PARAMETERFILE")return{name:f[1],value:f[2],id:{authority:"EPSG",code:8656}}}),e.parameters.length===7){const f=e.parameters[6];f.name==="Scale difference"&&(f.value=Math.round((f.value-1)*1e12)/1e6)}e.id=this.getId(t);break;case"AXIS":e.coordinate_system||(e.coordinate_system={type:"unspecified",axis:[]}),e.coordinate_system.axis.push(this.convertAxis(t));break;case"LENGTHUNIT":const h=this.convertUnit(t,"LinearUnit");e.coordinate_system&&e.coordinate_system.axis&&e.coordinate_system.axis.forEach(f=>{f.unit||(f.unit=h)}),h.conversion_factor&&h.conversion_factor!==1&&e.semi_major_axis&&(e.semi_major_axis={value:e.semi_major_axis,unit:h});break;default:e.keyword=t[0];break}return e}}class M1 extends wm{static convert(t,e={}){return super.convert(t,e),e.coordinate_system&&e.coordinate_system.subtype==="Cartesian"&&delete e.coordinate_system,e.usage&&delete e.usage,e}}class N1 extends wm{static convert(t,e={}){super.convert(t,e);const n=t.find(s=>Array.isArray(s)&&s[0]==="CS");n&&(e.coordinate_system={subtype:n[1],axis:this.extractAxes(t)});const i=t.find(s=>Array.isArray(s)&&s[0]==="USAGE");if(i){const s=i.find(l=>Array.isArray(l)&&l[0]==="SCOPE"),a=i.find(l=>Array.isArray(l)&&l[0]==="AREA"),o=i.find(l=>Array.isArray(l)&&l[0]==="BBOX");e.usage={},s&&(e.usage.scope=s[1]),a&&(e.usage.area=a[1]),o&&(e.usage.bbox=o.slice(1))}return e}}function b1(r){return r.find(t=>Array.isArray(t)&&t[0]==="USAGE")?"2019":(r.find(t=>Array.isArray(t)&&t[0]==="CS")||r[0]==="BOUNDCRS"||r[0]==="PROJCRS"||r[0]==="GEOGCRS","2015")}function T1(r){return(b1(r)==="2019"?N1:M1).convert(r)}function D1(r){const t=r.toUpperCase();return t.includes("PROJCRS")||t.includes("GEOGCRS")||t.includes("BOUNDCRS")||t.includes("VERTCRS")||t.includes("LENGTHUNIT")||t.includes("ANGLEUNIT")||t.includes("SCALEUNIT")?"WKT2":(t.includes("PROJCS")||t.includes("GEOGCS")||t.includes("LOCAL_CS")||t.includes("VERT_CS")||t.includes("UNIT"),"WKT1")}var mh=1,Em=2,Sm=3,Rc=4,Pm=5,dd=-1,x1=/\s/,O1=/[A-Za-z]/,A1=/[A-Za-z84_]/,Fc=/[,\]]/,Cm=/[\d\.E\-\+]/;function Ts(r){if(typeof r!="string")throw new Error("not a string");this.text=r.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=mh}Ts.prototype.readCharicter=function(){var r=this.text[this.place++];if(this.state!==Rc)for(;x1.test(r);){if(this.place>=this.text.length)return;r=this.text[this.place++]}switch(this.state){case mh:return this.neutral(r);case Em:return this.keyword(r);case Rc:return this.quoted(r);case Pm:return this.afterquote(r);case Sm:return this.number(r);case dd:return}},Ts.prototype.afterquote=function(r){if(r==='"'){this.word+='"',this.state=Rc;return}if(Fc.test(r)){this.word=this.word.trim(),this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in afterquote yet, index '+this.place)},Ts.prototype.afterItem=function(r){if(r===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=mh;return}if(r==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=mh,this.currentObject=this.stack.pop(),this.currentObject||(this.state=dd);return}},Ts.prototype.number=function(r){if(Cm.test(r)){this.word+=r;return}if(Fc.test(r)){this.word=parseFloat(this.word),this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in number yet, index '+this.place)},Ts.prototype.quoted=function(r){if(r==='"'){this.state=Pm;return}this.word+=r},Ts.prototype.keyword=function(r){if(A1.test(r)){this.word+=r;return}if(r==="["){var t=[];t.push(this.word),this.level++,this.root===null?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,this.state=mh;return}if(Fc.test(r)){this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in keyword yet, index '+this.place)},Ts.prototype.neutral=function(r){if(O1.test(r)){this.word=r,this.state=Em;return}if(r==='"'){this.word="",this.state=Rc;return}if(Cm.test(r)){this.word=r,this.state=Sm;return}if(Fc.test(r)){this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in neutral yet, index '+this.place)},Ts.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===dd)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function L1(r){var t=new Ts(r);return t.output()}function pd(r,t,e){Array.isArray(t)&&(e.unshift(t),t=null);var n=t?{}:r,i=e.reduce(function(s,a){return Eu(a,s),s},n);t&&(r[t]=i)}function Eu(r,t){if(!Array.isArray(r)){t[r]=!0;return}var e=r.shift();if(e==="PARAMETER"&&(e=r.shift()),r.length===1){if(Array.isArray(r[0])){t[e]={},Eu(r[0],t[e]);return}t[e]=r[0];return}if(!r.length){t[e]=!0;return}if(e==="TOWGS84"){t[e]=r;return}if(e==="AXIS"){e in t||(t[e]=[]),t[e].push(r);return}Array.isArray(e)||(t[e]={});var n;switch(e){case"UNIT":case"PRIMEM":case"VERT_DATUM":t[e]={name:r[0].toLowerCase(),convert:r[1]},r.length===3&&Eu(r[2],t[e]);return;case"SPHEROID":case"ELLIPSOID":t[e]={name:r[0],a:r[1],rf:r[2]},r.length===4&&Eu(r[3],t[e]);return;case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":r[0]=["name",r[0]],pd(t,e,r);return;case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":r[0]=["name",r[0]],pd(t,e,r),t[e].type=e;return;default:for(n=-1;++n<r.length;)if(!Array.isArray(r[n]))return Eu(r,t[e]);return pd(t,e,r)}}var R1=.017453292519943295;function Mi(r){return r*R1}function Im(r){const t=(r.projName||"").toLowerCase().replace(/_/g," ");!r.long0&&r.longc&&(t==="albers conic equal area"||t==="lambert azimuthal equal area")&&(r.long0=r.longc),!r.lat_ts&&r.lat1&&(t==="stereographic south pole"||t==="polar stereographic (variant b)")?(r.lat0=Mi(r.lat1>0?90:-90),r.lat_ts=r.lat1,delete r.lat1):!r.lat_ts&&r.lat0&&(t==="polar stereographic"||t==="polar stereographic (variant a)")&&(r.lat_ts=r.lat0,r.lat0=Mi(r.lat0>0?90:-90),delete r.lat1)}function Mm(r){let t={units:null,to_meter:void 0};return typeof r=="string"?(t.units=r.toLowerCase(),t.units==="metre"&&(t.units="meter"),t.units==="meter"&&(t.to_meter=1)):r&&r.name&&(t.units=r.name.toLowerCase(),t.units==="metre"&&(t.units="meter"),t.to_meter=r.conversion_factor),t}function Nm(r){return typeof r=="object"?r.value*r.unit.conversion_factor:r}function bm(r,t){r.ellipsoid.radius?(t.a=r.ellipsoid.radius,t.rf=0):(t.a=Nm(r.ellipsoid.semi_major_axis),r.ellipsoid.inverse_flattening!==void 0?t.rf=r.ellipsoid.inverse_flattening:r.ellipsoid.semi_major_axis!==void 0&&r.ellipsoid.semi_minor_axis!==void 0&&(t.rf=t.a/(t.a-Nm(r.ellipsoid.semi_minor_axis))))}function Gc(r,t={}){return!r||typeof r!="object"?r:r.type==="BoundCRS"?(Gc(r.source_crs,t),r.transformation&&(r.transformation.method&&r.transformation.method.name==="NTv2"?t.nadgrids=r.transformation.parameters[0].value:t.datum_params=r.transformation.parameters.map(e=>e.value)),t):(Object.keys(r).forEach(e=>{const n=r[e];if(n!==null)switch(e){case"name":if(t.srsCode)break;t.name=n,t.srsCode=n;break;case"type":n==="GeographicCRS"?t.projName="longlat":n==="ProjectedCRS"&&r.conversion&&r.conversion.method&&(t.projName=r.conversion.method.name);break;case"datum":case"datum_ensemble":n.ellipsoid&&(t.ellps=n.ellipsoid.name,bm(n,t)),n.prime_meridian&&(t.from_greenwich=n.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":t.ellps=n.name,bm(n,t);break;case"prime_meridian":t.long0=(n.longitude||0)*Math.PI/180;break;case"coordinate_system":if(n.axis){if(t.axis=n.axis.map(i=>{const s=i.direction;if(s==="east")return"e";if(s==="north")return"n";if(s==="west")return"w";if(s==="south")return"s";throw new Error(`Unknown axis direction: ${s}`)}).join("")+"u",n.unit){const{units:i,to_meter:s}=Mm(n.unit);t.units=i,t.to_meter=s}else if(n.axis[0]&&n.axis[0].unit){const{units:i,to_meter:s}=Mm(n.axis[0].unit);t.units=i,t.to_meter=s}}break;case"id":n.authority&&n.code&&(t.title=n.authority+":"+n.code);break;case"conversion":n.method&&n.method.name&&(t.projName=n.method.name),n.parameters&&n.parameters.forEach(i=>{const s=i.name.toLowerCase().replace(/\s+/g,"_"),a=i.value;i.unit&&i.unit.conversion_factor?t[s]=a*i.unit.conversion_factor:i.unit==="degree"?t[s]=a*Math.PI/180:t[s]=a});break;case"unit":n.name&&(t.units=n.name.toLowerCase(),t.units==="metre"&&(t.units="meter")),n.conversion_factor&&(t.to_meter=n.conversion_factor);break;case"base_crs":Gc(n,t),t.datumCode=n.id?n.id.authority+"_"+n.id.code:n.name;break}}),t.latitude_of_false_origin!==void 0&&(t.lat0=t.latitude_of_false_origin),t.longitude_of_false_origin!==void 0&&(t.long0=t.longitude_of_false_origin),t.latitude_of_standard_parallel!==void 0&&(t.lat0=t.latitude_of_standard_parallel,t.lat1=t.latitude_of_standard_parallel),t.latitude_of_1st_standard_parallel!==void 0&&(t.lat1=t.latitude_of_1st_standard_parallel),t.latitude_of_2nd_standard_parallel!==void 0&&(t.lat2=t.latitude_of_2nd_standard_parallel),t.latitude_of_projection_centre!==void 0&&(t.lat0=t.latitude_of_projection_centre),t.longitude_of_projection_centre!==void 0&&(t.longc=t.longitude_of_projection_centre),t.easting_at_false_origin!==void 0&&(t.x0=t.easting_at_false_origin),t.northing_at_false_origin!==void 0&&(t.y0=t.northing_at_false_origin),t.latitude_of_natural_origin!==void 0&&(t.lat0=t.latitude_of_natural_origin),t.longitude_of_natural_origin!==void 0&&(t.long0=t.longitude_of_natural_origin),t.longitude_of_origin!==void 0&&(t.long0=t.longitude_of_origin),t.false_easting!==void 0&&(t.x0=t.false_easting),t.easting_at_projection_centre&&(t.x0=t.easting_at_projection_centre),t.false_northing!==void 0&&(t.y0=t.false_northing),t.northing_at_projection_centre&&(t.y0=t.northing_at_projection_centre),t.standard_parallel_1!==void 0&&(t.lat1=t.standard_parallel_1),t.standard_parallel_2!==void 0&&(t.lat2=t.standard_parallel_2),t.scale_factor_at_natural_origin!==void 0&&(t.k0=t.scale_factor_at_natural_origin),t.scale_factor_at_projection_centre!==void 0&&(t.k0=t.scale_factor_at_projection_centre),t.scale_factor_on_pseudo_standard_parallel!==void 0&&(t.k0=t.scale_factor_on_pseudo_standard_parallel),t.azimuth!==void 0&&(t.alpha=t.azimuth),t.azimuth_at_projection_centre!==void 0&&(t.alpha=t.azimuth_at_projection_centre),t.angle_from_rectified_to_skew_grid&&(t.rectified_grid_angle=t.angle_from_rectified_to_skew_grid),Im(t),t)}var F1=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function G1(r,t){var e=t[0],n=t[1];!(e in r)&&n in r&&(r[e]=r[n],t.length===3&&(r[e]=t[2](r[e])))}function Tm(r){for(var t=Object.keys(r),e=0,n=t.length;e<n;++e){var i=t[e];F1.indexOf(i)!==-1&&k1(r[i]),typeof r[i]=="object"&&Tm(r[i])}}function k1(r){if(r.AUTHORITY){var t=Object.keys(r.AUTHORITY)[0];t&&t in r.AUTHORITY&&(r.title=t+":"+r.AUTHORITY[t])}if(r.type==="GEOGCS"?r.projName="longlat":r.type==="LOCAL_CS"?(r.projName="identity",r.local=!0):typeof r.PROJECTION=="object"?r.projName=Object.keys(r.PROJECTION)[0]:r.projName=r.PROJECTION,r.AXIS){for(var e="",n=0,i=r.AXIS.length;n<i;++n){var s=[r.AXIS[n][0].toLowerCase(),r.AXIS[n][1].toLowerCase()];s[0].indexOf("north")!==-1||(s[0]==="y"||s[0]==="lat")&&s[1]==="north"?e+="n":s[0].indexOf("south")!==-1||(s[0]==="y"||s[0]==="lat")&&s[1]==="south"?e+="s":s[0].indexOf("east")!==-1||(s[0]==="x"||s[0]==="lon")&&s[1]==="east"?e+="e":(s[0].indexOf("west")!==-1||(s[0]==="x"||s[0]==="lon")&&s[1]==="west")&&(e+="w")}e.length===2&&(e+="u"),e.length===3&&(r.axis=e)}r.UNIT&&(r.units=r.UNIT.name.toLowerCase(),r.units==="metre"&&(r.units="meter"),r.UNIT.convert&&(r.type==="GEOGCS"?r.DATUM&&r.DATUM.SPHEROID&&(r.to_meter=r.UNIT.convert*r.DATUM.SPHEROID.a):r.to_meter=r.UNIT.convert));var a=r.GEOGCS;r.type==="GEOGCS"&&(a=r),a&&(a.DATUM?r.datumCode=a.DATUM.name.toLowerCase():r.datumCode=a.name.toLowerCase(),r.datumCode.slice(0,2)==="d_"&&(r.datumCode=r.datumCode.slice(2)),r.datumCode==="new_zealand_1949"&&(r.datumCode="nzgd49"),(r.datumCode==="wgs_1984"||r.datumCode==="world_geodetic_system_1984")&&(r.PROJECTION==="Mercator_Auxiliary_Sphere"&&(r.sphere=!0),r.datumCode="wgs84"),r.datumCode==="belge_1972"&&(r.datumCode="rnb72"),a.DATUM&&a.DATUM.SPHEROID&&(r.ellps=a.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),r.ellps.toLowerCase().slice(0,13)==="international"&&(r.ellps="intl"),r.a=a.DATUM.SPHEROID.a,r.rf=parseFloat(a.DATUM.SPHEROID.rf,10)),a.DATUM&&a.DATUM.TOWGS84&&(r.datum_params=a.DATUM.TOWGS84),~r.datumCode.indexOf("osgb_1936")&&(r.datumCode="osgb36"),~r.datumCode.indexOf("osni_1952")&&(r.datumCode="osni52"),(~r.datumCode.indexOf("tm65")||~r.datumCode.indexOf("geodetic_datum_of_1965"))&&(r.datumCode="ire65"),r.datumCode==="ch1903+"&&(r.datumCode="ch1903"),~r.datumCode.indexOf("israel")&&(r.datumCode="isr93")),r.b&&!isFinite(r.b)&&(r.b=r.a),r.rectified_grid_angle&&(r.rectified_grid_angle=Mi(r.rectified_grid_angle));function o(c){var h=r.to_meter||1;return c*h}var l=function(c){return G1(r,c)},u=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",Mi],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",Mi],["x0","false_easting",o],["y0","false_northing",o],["long0","central_meridian",Mi],["lat0","latitude_of_origin",Mi],["lat0","standard_parallel_1",Mi],["lat1","standard_parallel_1",Mi],["lat2","standard_parallel_2",Mi],["azimuth","Azimuth"],["alpha","azimuth",Mi],["srsCode","name"]];u.forEach(l),Im(r)}function gd(r){if(typeof r=="object")return Gc(r);const t=D1(r);var e=L1(r);if(t==="WKT2"){const s=T1(e);return Gc(s)}var n=e[0],i={};return Eu(e,i),Tm(i),i[n]}function Xr(r){var t=this;if(arguments.length===2){var e=arguments[1];typeof e=="string"?e.charAt(0)==="+"?Xr[r]=fd(arguments[1]):Xr[r]=gd(arguments[1]):Xr[r]=e}else if(arguments.length===1){if(Array.isArray(r))return r.map(function(n){Array.isArray(n)?Xr.apply(t,n):Xr(n)});if(typeof r=="string"){if(r in Xr)return Xr[r]}else"EPSG"in r?Xr["EPSG:"+r.EPSG]=r:"ESRI"in r?Xr["ESRI:"+r.ESRI]=r:"IAU2000"in r?Xr["IAU2000:"+r.IAU2000]=r:console.log(r);return}}_1(Xr);function z1(r){return typeof r=="string"}function V1(r){return r in Xr}function U1(r){return r.indexOf("+")!==0&&r.indexOf("[")!==-1||typeof r=="object"&&!("srsCode"in r)}var q1=["3857","900913","3785","102113"];function W1(r){var t=fa(r,"authority");if(t){var e=fa(t,"epsg");return e&&q1.indexOf(e)>-1}}function H1(r){var t=fa(r,"extension");if(t)return fa(t,"proj4")}function X1(r){return r[0]==="+"}function Y1(r){if(z1(r)){if(V1(r))return Xr[r];if(U1(r)){var t=gd(r);if(W1(t))return Xr["EPSG:3857"];var e=H1(t);return e?fd(e):t}if(X1(r))return fd(r)}else return r.projName?r:gd(r)}function Dm(r,t){r=r||{};var e,n;if(!t)return r;for(n in t)e=t[n],e!==void 0&&(r[n]=e);return r}function ji(r,t,e){var n=r*t;return e/Math.sqrt(1-n*n)}function vh(r){return r<0?-1:1}function ht(r){return Math.abs(r)<=mr?r:r-vh(r)*gh}function Ni(r,t,e){var n=r*e,i=.5*r;return n=Math.pow((1-n)/(1+n),i),Math.tan(.5*(Q-t))/n}function yh(r,t){for(var e=.5*r,n,i,s=Q-2*Math.atan(t),a=0;a<=15;a++)if(n=r*Math.sin(s),i=Q-2*Math.atan(t*Math.pow((1-n)/(1+n),e))-s,s+=i,Math.abs(i)<=1e-10)return s;return-9999}function J1(){var r=this.b/this.a;this.es=1-r*r,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=ji(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function K1(r){var t=r.x,e=r.y;if(e*$i>90&&e*$i<-90&&t*$i>180&&t*$i<-180)return null;var n,i;if(Math.abs(Math.abs(e)-Q)<=st)return null;if(this.sphere)n=this.x0+this.a*this.k0*ht(t-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(ee+.5*e));else{var s=Math.sin(e),a=Ni(this.e,e,s);n=this.x0+this.a*this.k0*ht(t-this.long0),i=this.y0-this.a*this.k0*Math.log(a)}return r.x=n,r.y=i,r}function Q1(r){var t=r.x-this.x0,e=r.y-this.y0,n,i;if(this.sphere)i=Q-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var s=Math.exp(-e/(this.a*this.k0));if(i=yh(this.e,s),i===-9999)return null}return n=ht(this.long0+t/(this.a*this.k0)),r.x=n,r.y=i,r}var B1=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"];const Z1={init:J1,forward:K1,inverse:Q1,names:B1};function $1(){}function xm(r){return r}var j1=["longlat","identity"],tw=[Z1,{init:$1,forward:xm,inverse:xm,names:j1}],to={},Su=[];function Om(r,t){var e=Su.length;return r.names?(Su[e]=r,r.names.forEach(function(n){to[n.toLowerCase()]=e}),this):(console.log(t),!0)}function Am(r){return r.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}function ew(r){if(!r)return!1;var t=r.toLowerCase();if(typeof to[t]<"u"&&Su[to[t]]||(t=Am(t),t in to&&Su[to[t]]))return Su[to[t]]}function rw(){tw.forEach(Om)}const nw={start:rw,add:Om,get:ew};var Lm={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"},andrae:{a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"},clrk80:{a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:63558348467e-4,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};const iw=Lm.WGS84;function sw(r,t,e,n){var i=r*r,s=t*t,a=(i-s)/i,o=0;n?(r*=1-a*(S1+a*(P1+a*C1)),i=r*r,a=0):o=Math.sqrt(a);var l=(i-s)/s;return{es:a,e:o,ep2:l}}function aw(r,t,e,n,i){if(!r){var s=fa(Lm,n);s||(s=iw),r=s.a,t=s.b,e=s.rf}return e&&!t&&(t=(1-1/e)*r),(e===0||Math.abs(r-t)<st)&&(i=!0,t=r),{a:r,b:t,rf:e,sphere:i}}var kc={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.0276,-0.2167,0.2147,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-1.91514,1.60363,-9.09546,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243649,-1.158827,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,32.39344,-153.25684,-96.2266,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-8.393,0.749,-10.276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,1.25033e-7,4.6785e-8,5.6529e-8,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"61.55,-10.87,-40.19,39.4924,32.7221,32.8979,-9.994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.3092483,0.32482185,0.49729934,5.68906266"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"374,150,588"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"}};for(var ow in kc){var md=kc[ow];md.datumName&&(kc[md.datumName]=md)}function lw(r,t,e,n,i,s,a){var o={};return r===void 0||r==="none"?o.datum_type=cd:o.datum_type=w1,t&&(o.datum_params=t.map(parseFloat),(o.datum_params[0]!==0||o.datum_params[1]!==0||o.datum_params[2]!==0)&&(o.datum_type=$a),o.datum_params.length>3&&(o.datum_params[3]!==0||o.datum_params[4]!==0||o.datum_params[5]!==0||o.datum_params[6]!==0)&&(o.datum_type=ja,o.datum_params[3]*=ph,o.datum_params[4]*=ph,o.datum_params[5]*=ph,o.datum_params[6]=o.datum_params[6]/1e6+1)),a&&(o.datum_type=wu,o.grids=a),o.a=e,o.b=n,o.es=i,o.ep2=s,o}var vd={};function uw(r,t,e){return t instanceof ArrayBuffer?hw(r,t,e):{ready:cw(r,t)}}function hw(r,t,e){var n=!0;e!==void 0&&e.includeErrorFields===!1&&(n=!1);var i=new DataView(t),s=pw(i),a=gw(i,s),o=mw(i,a,s,n),l={header:a,subgrids:o};return vd[r]=l,l}async function cw(r,t){for(var e=[],n=await t.getImageCount(),i=n-1;i>=0;i--){var s=await t.getImage(i),a=await s.readRasters(),o=a,l=[s.getWidth(),s.getHeight()],u=s.getBoundingBox().map(Rm),c=[s.fileDirectory.ModelPixelScale[0],s.fileDirectory.ModelPixelScale[1]].map(Rm),h=u[0]+(l[0]-1)*c[0],f=u[3]-(l[1]-1)*c[1],g=o[0],m=o[1],_=[];for(let y=l[1]-1;y>=0;y--)for(let w=l[0]-1;w>=0;w--){var E=y*l[0]+w;_.push([-da(m[E]),da(g[E])])}e.push({del:c,lim:l,ll:[-h,f],cvs:_})}var M={header:{nSubgrids:n},subgrids:e};return vd[r]=M,M}function fw(r){if(r===void 0)return null;var t=r.split(",");return t.map(dw)}function dw(r){if(r.length===0)return null;var t=r[0]==="@";return t&&(r=r.slice(1)),r==="null"?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:r,mandatory:!t,grid:vd[r]||null,isNull:!1}}function Rm(r){return r*Math.PI/180}function da(r){return r/3600*Math.PI/180}function pw(r){var t=r.getInt32(8,!1);return t===11?!1:(t=r.getInt32(8,!0),t!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function gw(r,t){return{nFields:r.getInt32(8,t),nSubgridFields:r.getInt32(24,t),nSubgrids:r.getInt32(40,t),shiftType:yd(r,56,64).trim(),fromSemiMajorAxis:r.getFloat64(120,t),fromSemiMinorAxis:r.getFloat64(136,t),toSemiMajorAxis:r.getFloat64(152,t),toSemiMinorAxis:r.getFloat64(168,t)}}function yd(r,t,e){return String.fromCharCode.apply(null,new Uint8Array(r.buffer.slice(t,e)))}function mw(r,t,e,n){for(var i=176,s=[],a=0;a<t.nSubgrids;a++){var o=yw(r,i,e),l=_w(r,i,o,e,n),u=Math.round(1+(o.upperLongitude-o.lowerLongitude)/o.longitudeInterval),c=Math.round(1+(o.upperLatitude-o.lowerLatitude)/o.latitudeInterval);s.push({ll:[da(o.lowerLongitude),da(o.lowerLatitude)],del:[da(o.longitudeInterval),da(o.latitudeInterval)],lim:[u,c],count:o.gridNodeCount,cvs:vw(l)});var h=16;n===!1&&(h=8),i+=176+o.gridNodeCount*h}return s}function vw(r){return r.map(function(t){return[da(t.longitudeShift),da(t.latitudeShift)]})}function yw(r,t,e){return{name:yd(r,t+8,t+16).trim(),parent:yd(r,t+24,t+24+8).trim(),lowerLatitude:r.getFloat64(t+72,e),upperLatitude:r.getFloat64(t+88,e),lowerLongitude:r.getFloat64(t+104,e),upperLongitude:r.getFloat64(t+120,e),latitudeInterval:r.getFloat64(t+136,e),longitudeInterval:r.getFloat64(t+152,e),gridNodeCount:r.getInt32(t+168,e)}}function _w(r,t,e,n,i){var s=t+176,a=16;i===!1&&(a=8);for(var o=[],l=0;l<e.gridNodeCount;l++){var u={latitudeShift:r.getFloat32(s+l*a,n),longitudeShift:r.getFloat32(s+l*a+4,n)};i!==!1&&(u.latitudeAccuracy=r.getFloat32(s+l*a+8,n),u.longitudeAccuracy=r.getFloat32(s+l*a+12,n)),o.push(u)}return o}function ts(r,t){if(!(this instanceof ts))return new ts(r);t=t||function(u){if(u)throw u};var e=Y1(r);if(typeof e!="object"){t("Could not parse to valid json: "+r);return}var n=ts.projections.get(e.projName);if(!n){t("Could not get projection name from: "+r);return}if(e.datumCode&&e.datumCode!=="none"){var i=fa(kc,e.datumCode);i&&(e.datum_params=e.datum_params||(i.towgs84?i.towgs84.split(","):null),e.ellps=i.ellipse,e.datumName=i.datumName?i.datumName:e.datumCode)}e.k0=e.k0||1,e.axis=e.axis||"enu",e.ellps=e.ellps||"wgs84",e.lat1=e.lat1||e.lat0;var s=aw(e.a,e.b,e.rf,e.ellps,e.sphere),a=sw(s.a,s.b,s.rf,e.R_A),o=fw(e.nadgrids),l=e.datum||lw(e.datumCode,e.datum_params,s.a,s.b,a.es,a.ep2,o);Dm(this,e),Dm(this,n),this.a=s.a,this.b=s.b,this.rf=s.rf,this.sphere=s.sphere,this.es=a.es,this.e=a.e,this.ep2=a.ep2,this.datum=l,this.init(),t(null,this)}ts.projections=nw,ts.projections.start();function ww(r,t){return r.datum_type!==t.datum_type||r.a!==t.a||Math.abs(r.es-t.es)>5e-11?!1:r.datum_type===$a?r.datum_params[0]===t.datum_params[0]&&r.datum_params[1]===t.datum_params[1]&&r.datum_params[2]===t.datum_params[2]:r.datum_type===ja?r.datum_params[0]===t.datum_params[0]&&r.datum_params[1]===t.datum_params[1]&&r.datum_params[2]===t.datum_params[2]&&r.datum_params[3]===t.datum_params[3]&&r.datum_params[4]===t.datum_params[4]&&r.datum_params[5]===t.datum_params[5]&&r.datum_params[6]===t.datum_params[6]:!0}function Fm(r,t,e){var n=r.x,i=r.y,s=r.z?r.z:0,a,o,l,u;if(i<-Q&&i>-1.001*Q)i=-Q;else if(i>Q&&i<1.001*Q)i=Q;else{if(i<-Q)return{x:-1/0,y:-1/0,z:r.z};if(i>Q)return{x:1/0,y:1/0,z:r.z}}return n>Math.PI&&(n-=2*Math.PI),o=Math.sin(i),u=Math.cos(i),l=o*o,a=e/Math.sqrt(1-t*l),{x:(a+s)*u*Math.cos(n),y:(a+s)*u*Math.sin(n),z:(a*(1-t)+s)*o}}function Gm(r,t,e,n){var i=1e-12,s=i*i,a=30,o,l,u,c,h,f,g,m,_,E,M,y,w,v=r.x,S=r.y,P=r.z?r.z:0,I,b,D;if(o=Math.sqrt(v*v+S*S),l=Math.sqrt(v*v+S*S+P*P),o/e<i){if(I=0,l/e<i)return b=Q,D=-n,{x:r.x,y:r.y,z:r.z}}else I=Math.atan2(S,v);u=P/l,c=o/l,h=1/Math.sqrt(1-t*(2-t)*c*c),m=c*(1-t)*h,_=u*h,w=0;do w++,g=e/Math.sqrt(1-t*_*_),D=o*m+P*_-g*(1-t*_*_),f=t*g/(g+D),h=1/Math.sqrt(1-f*(2-f)*c*c),E=c*(1-f)*h,M=u*h,y=M*m-E*_,m=E,_=M;while(y*y>s&&w<a);return b=Math.atan(M/Math.abs(E)),{x:I,y:b,z:D}}function Ew(r,t,e){if(t===$a)return{x:r.x+e[0],y:r.y+e[1],z:r.z+e[2]};if(t===ja){var n=e[0],i=e[1],s=e[2],a=e[3],o=e[4],l=e[5],u=e[6];return{x:u*(r.x-l*r.y+o*r.z)+n,y:u*(l*r.x+r.y-a*r.z)+i,z:u*(-o*r.x+a*r.y+r.z)+s}}}function Sw(r,t,e){if(t===$a)return{x:r.x-e[0],y:r.y-e[1],z:r.z-e[2]};if(t===ja){var n=e[0],i=e[1],s=e[2],a=e[3],o=e[4],l=e[5],u=e[6],c=(r.x-n)/u,h=(r.y-i)/u,f=(r.z-s)/u;return{x:c+l*h-o*f,y:-l*c+h+a*f,z:o*c-a*h+f}}}function zc(r){return r===$a||r===ja}function Pw(r,t,e){if(ww(r,t)||r.datum_type===cd||t.datum_type===cd)return e;var n=r.a,i=r.es;if(r.datum_type===wu){var s=km(r,!1,e);if(s!==0)return;n=vm,i=ym}var a=t.a,o=t.b,l=t.es;if(t.datum_type===wu&&(a=vm,o=E1,l=ym),i===l&&n===a&&!zc(r.datum_type)&&!zc(t.datum_type))return e;if(e=Fm(e,i,n),zc(r.datum_type)&&(e=Ew(e,r.datum_type,r.datum_params)),zc(t.datum_type)&&(e=Sw(e,t.datum_type,t.datum_params)),e=Gm(e,l,a,o),t.datum_type===wu){var u=km(t,!0,e);if(u!==0)return}return e}function km(r,t,e){if(r.grids===null||r.grids.length===0)return console.log("Grid shift grids not found"),-1;var n={x:-e.x,y:e.y},i={x:Number.NaN,y:Number.NaN},s=[];t:for(var a=0;a<r.grids.length;a++){var o=r.grids[a];if(s.push(o.name),o.isNull){i=n;break}if(o.grid===null){if(o.mandatory)return console.log("Unable to find mandatory grid '"+o.name+"'"),-1;continue}for(var l=o.grid.subgrids,u=0,c=l.length;u<c;u++){var h=l[u],f=(Math.abs(h.del[1])+Math.abs(h.del[0]))/1e4,g=h.ll[0]-f,m=h.ll[1]-f,_=h.ll[0]+(h.lim[0]-1)*h.del[0]+f,E=h.ll[1]+(h.lim[1]-1)*h.del[1]+f;if(!(m>n.y||g>n.x||E<n.y||_<n.x)&&(i=Cw(n,t,h),!isNaN(i.x)))break t}}return isNaN(i.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*$i+" "+n.y*$i+" tried: '"+s+"'"),-1):(e.x=-i.x,e.y=i.y,0)}function Cw(r,t,e){var n={x:Number.NaN,y:Number.NaN};if(isNaN(r.x))return n;var i={x:r.x,y:r.y};i.x-=e.ll[0],i.y-=e.ll[1],i.x=ht(i.x-Math.PI)+Math.PI;var s=zm(i,e);if(t){if(isNaN(s.x))return n;s.x=i.x-s.x,s.y=i.y-s.y;var a=9,o=1e-12,l,u;do{if(u=zm(s,e),isNaN(u.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}l={x:i.x-(u.x+s.x),y:i.y-(u.y+s.y)},s.x+=l.x,s.y+=l.y}while(a--&&Math.abs(l.x)>o&&Math.abs(l.y)>o);if(a<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=ht(s.x+e.ll[0]),n.y=s.y+e.ll[1]}else isNaN(s.x)||(n.x=r.x+s.x,n.y=r.y+s.y);return n}function zm(r,t){var e={x:r.x/t.del[0],y:r.y/t.del[1]},n={x:Math.floor(e.x),y:Math.floor(e.y)},i={x:e.x-1*n.x,y:e.y-1*n.y},s={x:Number.NaN,y:Number.NaN},a;if(n.x<0||n.x>=t.lim[0]||n.y<0||n.y>=t.lim[1])return s;a=n.y*t.lim[0]+n.x;var o={x:t.cvs[a][0],y:t.cvs[a][1]};a++;var l={x:t.cvs[a][0],y:t.cvs[a][1]};a+=t.lim[0];var u={x:t.cvs[a][0],y:t.cvs[a][1]};a--;var c={x:t.cvs[a][0],y:t.cvs[a][1]},h=i.x*i.y,f=i.x*(1-i.y),g=(1-i.x)*(1-i.y),m=(1-i.x)*i.y;return s.x=g*o.x+f*l.x+m*c.x+h*u.x,s.y=g*o.y+f*l.y+m*c.y+h*u.y,s}function Vm(r,t,e){var n=e.x,i=e.y,s=e.z||0,a,o,l,u={};for(l=0;l<3;l++)if(!(t&&l===2&&e.z===void 0))switch(l===0?(a=n,"ew".indexOf(r.axis[l])!==-1?o="x":o="y"):l===1?(a=i,"ns".indexOf(r.axis[l])!==-1?o="y":o="x"):(a=s,o="z"),r.axis[l]){case"e":u[o]=a;break;case"w":u[o]=-a;break;case"n":u[o]=a;break;case"s":u[o]=-a;break;case"u":e[o]!==void 0&&(u.z=a);break;case"d":e[o]!==void 0&&(u.z=-a);break;default:return null}return u}function Um(r){var t={x:r[0],y:r[1]};return r.length>2&&(t.z=r[2]),r.length>3&&(t.m=r[3]),t}function Iw(r){qm(r.x),qm(r.y)}function qm(r){if(typeof Number.isFinite=="function"){if(Number.isFinite(r))return;throw new TypeError("coordinates must be finite numbers")}if(typeof r!="number"||r!==r||!isFinite(r))throw new TypeError("coordinates must be finite numbers")}function Mw(r,t){return(r.datum.datum_type===$a||r.datum.datum_type===ja||r.datum.datum_type===wu)&&t.datumCode!=="WGS84"||(t.datum.datum_type===$a||t.datum.datum_type===ja||t.datum.datum_type===wu)&&r.datumCode!=="WGS84"}function Vc(r,t,e,n){var i;Array.isArray(e)?e=Um(e):e={x:e.x,y:e.y,z:e.z,m:e.m};var s=e.z!==void 0;if(Iw(e),r.datum&&t.datum&&Mw(r,t)&&(i=new ts("WGS84"),e=Vc(r,i,e,n),r=i),n&&r.axis!=="enu"&&(e=Vm(r,!1,e)),r.projName==="longlat")e={x:e.x*de,y:e.y*de,z:e.z||0};else if(r.to_meter&&(e={x:e.x*r.to_meter,y:e.y*r.to_meter,z:e.z||0}),e=r.inverse(e),!e)return;if(r.from_greenwich&&(e.x+=r.from_greenwich),e=Pw(r.datum,t.datum,e),!!e)return t.from_greenwich&&(e={x:e.x-t.from_greenwich,y:e.y,z:e.z||0}),t.projName==="longlat"?e={x:e.x*$i,y:e.y*$i,z:e.z||0}:(e=t.forward(e),t.to_meter&&(e={x:e.x/t.to_meter,y:e.y/t.to_meter,z:e.z||0})),n&&t.axis!=="enu"?Vm(t,!0,e):(e&&!s&&delete e.z,e)}var Wm=ts("WGS84");function _d(r,t,e,n){var i,s,a;return Array.isArray(e)?(i=Vc(r,t,e,n)||{x:NaN,y:NaN},e.length>2?typeof r.name<"u"&&r.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"?typeof i.z=="number"?[i.x,i.y,i.z].concat(e.slice(3)):[i.x,i.y,e[2]].concat(e.slice(3)):[i.x,i.y].concat(e.slice(2)):[i.x,i.y]):(s=Vc(r,t,e,n),a=Object.keys(e),a.length===2||a.forEach(function(o){if(typeof r.name<"u"&&r.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"){if(o==="x"||o==="y"||o==="z")return}else if(o==="x"||o==="y")return;s[o]=e[o]}),s)}function Hm(r){return r instanceof ts?r:r.oProj?r.oProj:ts(r)}function on(r,t,e){r=Hm(r);var n=!1,i;return typeof t>"u"?(t=r,r=Wm,n=!0):(typeof t.x<"u"||Array.isArray(t))&&(e=t,t=r,r=Wm,n=!0),t=Hm(t),e?_d(r,t,e):(i={forward:function(s,a){return _d(r,t,s,a)},inverse:function(s,a){return _d(t,r,s,a)}},n&&(i.oProj=t),i)}var Xm=6,Ym="AJSAJS",Jm="AFAFAF",Pu=65,ln=73,ii=79,_h=86,wh=90;const Nw={forward:Km,inverse:bw,toPoint:Qm};function Km(r,t){return t=t||5,xw(Tw({lat:r[1],lon:r[0]}),t)}function bw(r){var t=Ed($m(r.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function Qm(r){var t=Ed($m(r.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function wd(r){return r*(Math.PI/180)}function Bm(r){return 180*(r/Math.PI)}function Tw(r){var t=r.lat,e=r.lon,n=6378137,i=.00669438,s=.9996,a,o,l,u,c,h,f,g=wd(t),m=wd(e),_,E;E=Math.floor((e+180)/6)+1,e===180&&(E=60),t>=56&&t<64&&e>=3&&e<12&&(E=32),t>=72&&t<84&&(e>=0&&e<9?E=31:e>=9&&e<21?E=33:e>=21&&e<33?E=35:e>=33&&e<42&&(E=37)),a=(E-1)*6-180+3,_=wd(a),o=i/(1-i),l=n/Math.sqrt(1-i*Math.sin(g)*Math.sin(g)),u=Math.tan(g)*Math.tan(g),c=o*Math.cos(g)*Math.cos(g),h=Math.cos(g)*(m-_),f=n*((1-i/4-3*i*i/64-5*i*i*i/256)*g-(3*i/8+3*i*i/32+45*i*i*i/1024)*Math.sin(2*g)+(15*i*i/256+45*i*i*i/1024)*Math.sin(4*g)-35*i*i*i/3072*Math.sin(6*g));var M=s*l*(h+(1-u+c)*h*h*h/6+(5-18*u+u*u+72*c-58*o)*h*h*h*h*h/120)+5e5,y=s*(f+l*Math.tan(g)*(h*h/2+(5-u+9*c+4*c*c)*h*h*h*h/24+(61-58*u+u*u+600*c-330*o)*h*h*h*h*h*h/720));return t<0&&(y+=1e7),{northing:Math.round(y),easting:Math.round(M),zoneNumber:E,zoneLetter:Dw(t)}}function Ed(r){var t=r.northing,e=r.easting,n=r.zoneLetter,i=r.zoneNumber;if(i<0||i>60)return null;var s=.9996,a=6378137,o=.00669438,l,u=(1-Math.sqrt(1-o))/(1+Math.sqrt(1-o)),c,h,f,g,m,_,E,M,y,w=e-5e5,v=t;n<"N"&&(v-=1e7),E=(i-1)*6-180+3,l=o/(1-o),_=v/s,M=_/(a*(1-o/4-3*o*o/64-5*o*o*o/256)),y=M+(3*u/2-27*u*u*u/32)*Math.sin(2*M)+(21*u*u/16-55*u*u*u*u/32)*Math.sin(4*M)+151*u*u*u/96*Math.sin(6*M),c=a/Math.sqrt(1-o*Math.sin(y)*Math.sin(y)),h=Math.tan(y)*Math.tan(y),f=l*Math.cos(y)*Math.cos(y),g=a*(1-o)/Math.pow(1-o*Math.sin(y)*Math.sin(y),1.5),m=w/(c*s);var S=y-c*Math.tan(y)/g*(m*m/2-(5+3*h+10*f-4*f*f-9*l)*m*m*m*m/24+(61+90*h+298*f+45*h*h-252*l-3*f*f)*m*m*m*m*m*m/720);S=Bm(S);var P=(m-(1+2*h+f)*m*m*m/6+(5-2*f+28*h-3*f*f+8*l+24*h*h)*m*m*m*m*m/120)/Math.cos(y);P=E+Bm(P);var I;if(r.accuracy){var b=Ed({northing:r.northing+r.accuracy,easting:r.easting+r.accuracy,zoneLetter:r.zoneLetter,zoneNumber:r.zoneNumber});I={top:b.lat,right:b.lon,bottom:S,left:P}}else I={lat:S,lon:P};return I}function Dw(r){var t="Z";return 84>=r&&r>=72?t="X":72>r&&r>=64?t="W":64>r&&r>=56?t="V":56>r&&r>=48?t="U":48>r&&r>=40?t="T":40>r&&r>=32?t="S":32>r&&r>=24?t="R":24>r&&r>=16?t="Q":16>r&&r>=8?t="P":8>r&&r>=0?t="N":0>r&&r>=-8?t="M":-8>r&&r>=-16?t="L":-16>r&&r>=-24?t="K":-24>r&&r>=-32?t="J":-32>r&&r>=-40?t="H":-40>r&&r>=-48?t="G":-48>r&&r>=-56?t="F":-56>r&&r>=-64?t="E":-64>r&&r>=-72?t="D":-72>r&&r>=-80&&(t="C"),t}function xw(r,t){var e="00000"+r.easting,n="00000"+r.northing;return r.zoneNumber+r.zoneLetter+Ow(r.easting,r.northing,r.zoneNumber)+e.substr(e.length-5,t)+n.substr(n.length-5,t)}function Ow(r,t,e){var n=Zm(e),i=Math.floor(r/1e5),s=Math.floor(t/1e5)%20;return Aw(i,s,n)}function Zm(r){var t=r%Xm;return t===0&&(t=Xm),t}function Aw(r,t,e){var n=e-1,i=Ym.charCodeAt(n),s=Jm.charCodeAt(n),a=i+r-1,o=s+t,l=!1;a>wh&&(a=a-wh+Pu-1,l=!0),(a===ln||i<ln&&a>ln||(a>ln||i<ln)&&l)&&a++,(a===ii||i<ii&&a>ii||(a>ii||i<ii)&&l)&&(a++,a===ln&&a++),a>wh&&(a=a-wh+Pu-1),o>_h?(o=o-_h+Pu-1,l=!0):l=!1,(o===ln||s<ln&&o>ln||(o>ln||s<ln)&&l)&&o++,(o===ii||s<ii&&o>ii||(o>ii||s<ii)&&l)&&(o++,o===ln&&o++),o>_h&&(o=o-_h+Pu-1);var u=String.fromCharCode(a)+String.fromCharCode(o);return u}function $m(r){if(r&&r.length===0)throw"MGRSPoint coverting from nothing";for(var t=r.length,e=null,n="",i,s=0;!/[A-Z]/.test(i=r.charAt(s));){if(s>=2)throw"MGRSPoint bad conversion from: "+r;n+=i,s++}var a=parseInt(n,10);if(s===0||s+3>t)throw"MGRSPoint bad conversion from: "+r;var o=r.charAt(s++);if(o<="A"||o==="B"||o==="Y"||o>="Z"||o==="I"||o==="O")throw"MGRSPoint zone letter "+o+" not handled: "+r;e=r.substring(s,s+=2);for(var l=Zm(a),u=Lw(e.charAt(0),l),c=Rw(e.charAt(1),l);c<Fw(o);)c+=2e6;var h=t-s;if(h%2!==0)throw`MGRSPoint has to have an even number
|
|
27
|
+
`)}return t.toString()},$e.prototype.computeEdgeEndLabels=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();n.computeLabel(t)}},$e.prototype.computeLabelling=function(t){var e=this;this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var n=[!1,!1],i=this.iterator();i.hasNext();)for(var s=i.next(),a=s.getLabel(),o=0;o<2;o++)a.isLine(o)&&a.getLocation(o)===F.BOUNDARY&&(n[o]=!0);for(var l=this.iterator();l.hasNext();)for(var u=l.next(),c=u.getLabel(),h=0;h<2;h++)if(c.isAnyNull(h)){var f=F.NONE;if(n[h])f=F.EXTERIOR;else{var g=u.getCoordinate();f=e.getLocation(h,g,t)}c.setAllLocationsIfNull(h,f)}},$e.prototype.getDegree=function(){return this._edgeMap.size()},$e.prototype.insertEdgeEnd=function(t,e){this._edgeMap.put(t,e),this._edgeList=null},$e.prototype.interfaces_=function(){return[]},$e.prototype.getClass=function(){return $e};var T_=function(r){function t(){r.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.linkResultDirectedEdges=function(){var n=this;this.getResultAreaEdges();for(var i=null,s=null,a=this._SCANNING_FOR_INCOMING,o=0;o<this._resultAreaEdgeList.size();o++){var l=n._resultAreaEdgeList.get(o),u=l.getSym();if(l.getLabel().isArea())switch(i===null&&l.isInResult()&&(i=l),a){case n._SCANNING_FOR_INCOMING:if(!u.isInResult())continue;s=u,a=n._LINKING_TO_OUTGOING;break;case n._LINKING_TO_OUTGOING:if(!l.isInResult())continue;s.setNext(l),a=n._SCANNING_FOR_INCOMING;break}}if(a===this._LINKING_TO_OUTGOING){if(i===null)throw new Xi("no outgoing dirEdge found",this.getCoordinate());Mt.isTrue(i.isInResult(),"unable to link last incoming dirEdge"),s.setNext(i)}},t.prototype.insert=function(n){var i=n;this.insertEdgeEnd(i,i)},t.prototype.getRightmostEdge=function(){var n=this.getEdges(),i=n.size();if(i<1)return null;var s=n.get(0);if(i===1)return s;var a=n.get(i-1),o=s.getQuadrant(),l=a.getQuadrant();return Qt.isNorthern(o)&&Qt.isNorthern(l)?s:!Qt.isNorthern(o)&&!Qt.isNorthern(l)?a:s.getDy()!==0?s:a.getDy()!==0?a:(Mt.shouldNeverReachHere("found two horizontal edges incident on node"),null)},t.prototype.print=function(n){Ve.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var i=this.iterator();i.hasNext();){var s=i.next();n.print("out "),s.print(n),n.println(),n.print("in "),s.getSym().print(n),n.println()}},t.prototype.getResultAreaEdges=function(){var n=this;if(this._resultAreaEdgeList!==null)return this._resultAreaEdgeList;this._resultAreaEdgeList=new Z;for(var i=this.iterator();i.hasNext();){var s=i.next();(s.isInResult()||s.getSym().isInResult())&&n._resultAreaEdgeList.add(s)}return this._resultAreaEdgeList},t.prototype.updateLabelling=function(n){for(var i=this.iterator();i.hasNext();){var s=i.next(),a=s.getLabel();a.setAllLocationsIfNull(0,n.getLocation(0)),a.setAllLocationsIfNull(1,n.getLocation(1))}},t.prototype.linkAllDirectedEdges=function(){var n=this;this.getEdges();for(var i=null,s=null,a=this._edgeList.size()-1;a>=0;a--){var o=n._edgeList.get(a),l=o.getSym();s===null&&(s=l),i!==null&&l.setNext(i),i=o}s.setNext(i)},t.prototype.computeDepths=function(){var n=this;if(arguments.length===1){var i=arguments[0],s=this.findIndex(i),a=i.getDepth(K.LEFT),o=i.getDepth(K.RIGHT),l=this.computeDepths(s+1,this._edgeList.size(),a),u=this.computeDepths(0,s,l);if(u!==o)throw new Xi("depth mismatch at "+i.getCoordinate())}else if(arguments.length===3){for(var c=arguments[0],h=arguments[1],f=arguments[2],g=f,m=c;m<h;m++){var _=n._edgeList.get(m);_.setEdgeDepths(K.RIGHT,g),g=_.getDepth(K.LEFT)}return g}},t.prototype.mergeSymLabels=function(){for(var n=this.iterator();n.hasNext();){var i=n.next(),s=i.getLabel();s.merge(i.getSym().getLabel())}},t.prototype.linkMinimalDirectedEdges=function(n){for(var i=this,s=null,a=null,o=this._SCANNING_FOR_INCOMING,l=this._resultAreaEdgeList.size()-1;l>=0;l--){var u=i._resultAreaEdgeList.get(l),c=u.getSym();switch(s===null&&u.getEdgeRing()===n&&(s=u),o){case i._SCANNING_FOR_INCOMING:if(c.getEdgeRing()!==n)continue;a=c,o=i._LINKING_TO_OUTGOING;break;case i._LINKING_TO_OUTGOING:if(u.getEdgeRing()!==n)continue;a.setNextMin(u),o=i._SCANNING_FOR_INCOMING;break}}o===this._LINKING_TO_OUTGOING&&(Mt.isTrue(s!==null,"found null for first outgoing dirEdge"),Mt.isTrue(s.getEdgeRing()===n,"unable to link last incoming dirEdge"),a.setNextMin(s))},t.prototype.getOutgoingDegree=function(){if(arguments.length===0){for(var n=0,i=this.iterator();i.hasNext();){var s=i.next();s.isInResult()&&n++}return n}else if(arguments.length===1){for(var a=arguments[0],o=0,l=this.iterator();l.hasNext();){var u=l.next();u.getEdgeRing()===a&&o++}return o}},t.prototype.getLabel=function(){return this._label},t.prototype.findCoveredLineEdges=function(){for(var n=F.NONE,i=this.iterator();i.hasNext();){var s=i.next(),a=s.getSym();if(!s.isLineEdge()){if(s.isInResult()){n=F.INTERIOR;break}if(a.isInResult()){n=F.EXTERIOR;break}}}if(n===F.NONE)return null;for(var o=n,l=this.iterator();l.hasNext();){var u=l.next(),c=u.getSym();u.isLineEdge()?u.getEdge().setCovered(o===F.INTERIOR):(u.isInResult()&&(o=F.EXTERIOR),c.isInResult()&&(o=F.INTERIOR))}},t.prototype.computeLabelling=function(n){var i=this;r.prototype.computeLabelling.call(this,n),this._label=new Jt(F.NONE);for(var s=this.iterator();s.hasNext();)for(var a=s.next(),o=a.getEdge(),l=o.getLabel(),u=0;u<2;u++){var c=l.getLocation(u);(c===F.INTERIOR||c===F.BOUNDARY)&&i._label.setLocation(u,F.INTERIOR)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}($e),Eg=function(r){function t(){r.apply(this,arguments)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.createNode=function(n){return new mc(n,new T_)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(su),Es=function r(){this._pts=null,this._orientation=null;var t=arguments[0];this._pts=t,this._orientation=r.orientation(t)};Es.prototype.compareTo=function(t){var e=t,n=Es.compareOriented(this._pts,this._orientation,e._pts,e._orientation);return n},Es.prototype.interfaces_=function(){return[Zr]},Es.prototype.getClass=function(){return Es},Es.orientation=function(t){return Tt.increasingDirection(t)===1},Es.compareOriented=function(t,e,n,i){for(var s=e?1:-1,a=i?1:-1,o=e?t.length:-1,l=i?n.length:-1,u=e?0:t.length-1,c=i?0:n.length-1;;){var h=t[u].compareTo(n[c]);if(h!==0)return h;u+=s,c+=a;var f=u===o,g=c===l;if(f&&!g)return-1;if(!f&&g)return 1;if(f&&g)return 0}};var bn=function(){this._edges=new Z,this._ocaMap=new Be};bn.prototype.print=function(t){var e=this;t.print("MULTILINESTRING ( ");for(var n=0;n<this._edges.size();n++){var i=e._edges.get(n);n>0&&t.print(","),t.print("(");for(var s=i.getCoordinates(),a=0;a<s.length;a++)a>0&&t.print(","),t.print(s[a].x+" "+s[a].y);t.println(")")}t.print(") ")},bn.prototype.addAll=function(t){for(var e=this,n=t.iterator();n.hasNext();)e.add(n.next())},bn.prototype.findEdgeIndex=function(t){for(var e=this,n=0;n<this._edges.size();n++)if(e._edges.get(n).equals(t))return n;return-1},bn.prototype.iterator=function(){return this._edges.iterator()},bn.prototype.getEdges=function(){return this._edges},bn.prototype.get=function(t){return this._edges.get(t)},bn.prototype.findEqualEdge=function(t){var e=new Es(t.getCoordinates()),n=this._ocaMap.get(e);return n},bn.prototype.add=function(t){this._edges.add(t);var e=new Es(t.getCoordinates());this._ocaMap.put(e,t)},bn.prototype.interfaces_=function(){return[]},bn.prototype.getClass=function(){return bn};var na=function(){};na.prototype.processIntersections=function(t,e,n,i){},na.prototype.isDone=function(){},na.prototype.interfaces_=function(){return[]},na.prototype.getClass=function(){return na};var Ur=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var t=arguments[0];this._li=t};Ur.prototype.isTrivialIntersection=function(t,e,n,i){if(t===n&&this._li.getIntersectionNum()===1){if(Ur.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var s=t.size()-1;if(e===0&&i===s||i===0&&e===s)return!0}}return!1},Ur.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Ur.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Ur.prototype.getLineIntersector=function(){return this._li},Ur.prototype.hasProperIntersection=function(){return this._hasProper},Ur.prototype.processIntersections=function(t,e,n,i){if(t===n&&e===i)return null;this.numTests++;var s=t.getCoordinates()[e],a=t.getCoordinates()[e+1],o=n.getCoordinates()[i],l=n.getCoordinates()[i+1];this._li.computeIntersection(s,a,o,l),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(t,e,n,i)||(this._hasIntersection=!0,t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},Ur.prototype.hasIntersection=function(){return this._hasIntersection},Ur.prototype.isDone=function(){return!1},Ur.prototype.hasInteriorIntersection=function(){return this._hasInterior},Ur.prototype.interfaces_=function(){return[na]},Ur.prototype.getClass=function(){return Ur},Ur.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var Zn=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],e=arguments[1],n=arguments[2];this.coord=new L(t),this.segmentIndex=e,this.dist=n};Zn.prototype.getSegmentIndex=function(){return this.segmentIndex},Zn.prototype.getCoordinate=function(){return this.coord},Zn.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex),t.println(" dist = "+this.dist)},Zn.prototype.compareTo=function(t){var e=t;return this.compare(e.segmentIndex,e.dist)},Zn.prototype.isEndPoint=function(t){return this.segmentIndex===0&&this.dist===0||this.segmentIndex===t},Zn.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},Zn.prototype.getDistance=function(){return this.dist},Zn.prototype.compare=function(t,e){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<e?-1:this.dist>e?1:0},Zn.prototype.interfaces_=function(){return[Zr]},Zn.prototype.getClass=function(){return Zn};var wi=function(){this._nodeMap=new Be,this.edge=null;var t=arguments[0];this.edge=t};wi.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}},wi.prototype.iterator=function(){return this._nodeMap.values().iterator()},wi.prototype.addSplitEdges=function(t){var e=this;this.addEndpoints();for(var n=this.iterator(),i=n.next();n.hasNext();){var s=n.next(),a=e.createSplitEdge(i,s);t.add(a),i=s}},wi.prototype.addEndpoints=function(){var t=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[t],t,0)},wi.prototype.createSplitEdge=function(t,e){var n=this,i=e.segmentIndex-t.segmentIndex+2,s=this.edge.pts[e.segmentIndex],a=e.dist>0||!e.coord.equals2D(s);a||i--;var o=new Array(i).fill(null),l=0;o[l++]=new L(t.coord);for(var u=t.segmentIndex+1;u<=e.segmentIndex;u++)o[l++]=n.edge.pts[u];return a&&(o[l]=e.coord),new yc(o,new Jt(this.edge._label))},wi.prototype.add=function(t,e,n){var i=new Zn(t,e,n),s=this._nodeMap.get(i);return s!==null?s:(this._nodeMap.put(i,i),i)},wi.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();if(n.coord.equals(t))return!0}return!1},wi.prototype.interfaces_=function(){return[]},wi.prototype.getClass=function(){return wi};var ia=function(){};ia.prototype.getChainStartIndices=function(t){var e=this,n=0,i=new Z;i.add(new Vn(n));do{var s=e.findChainEnd(t,n);i.add(new Vn(s)),n=s}while(n<t.length-1);var a=ia.toIntArray(i);return a},ia.prototype.findChainEnd=function(t,e){for(var n=Qt.quadrant(t[e],t[e+1]),i=e+1;i<t.length;){var s=Qt.quadrant(t[i-1],t[i]);if(s!==n)break;i++}return i-1},ia.prototype.interfaces_=function(){return[]},ia.prototype.getClass=function(){return ia},ia.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e};var Ki=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new dt,this.env2=new dt;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var e=new ia;this.startIndex=e.getChainStartIndices(this.pts)};Ki.prototype.getCoordinates=function(){return this.pts},Ki.prototype.getMaxX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e>n?e:n},Ki.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e<n?e:n},Ki.prototype.computeIntersectsForChain=function(){if(arguments.length===4){var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],e,e.startIndex[n],e.startIndex[n+1],i)}else if(arguments.length===6){var s=arguments[0],a=arguments[1],o=arguments[2],l=arguments[3],u=arguments[4],c=arguments[5],h=this.pts[s],f=this.pts[a],g=o.pts[l],m=o.pts[u];if(a-s===1&&u-l===1)return c.addIntersections(this.e,s,o.e,l),null;if(this.env1.init(h,f),this.env2.init(g,m),!this.env1.intersects(this.env2))return null;var _=Math.trunc((s+a)/2),E=Math.trunc((l+u)/2);s<_&&(l<E&&this.computeIntersectsForChain(s,_,o,l,E,c),E<u&&this.computeIntersectsForChain(s,_,o,E,u,c)),_<a&&(l<E&&this.computeIntersectsForChain(_,a,o,l,E,c),E<u&&this.computeIntersectsForChain(_,a,o,E,u,c))}},Ki.prototype.getStartIndexes=function(){return this.startIndex},Ki.prototype.computeIntersects=function(t,e){for(var n=this,i=0;i<this.startIndex.length-1;i++)for(var s=0;s<t.startIndex.length-1;s++)n.computeIntersectsForChain(i,t,s,e)},Ki.prototype.interfaces_=function(){return[]},Ki.prototype.getClass=function(){return Ki};var Ue=function r(){var t=this;this._depth=Array(2).fill().map(function(){return Array(3)});for(var e=0;e<2;e++)for(var n=0;n<3;n++)t._depth[e][n]=r.NULL_VALUE},Sg={NULL_VALUE:{configurable:!0}};Ue.prototype.getDepth=function(t,e){return this._depth[t][e]},Ue.prototype.setDepth=function(t,e,n){this._depth[t][e]=n},Ue.prototype.isNull=function(){var t=this;if(arguments.length===0){for(var e=0;e<2;e++)for(var n=0;n<3;n++)if(t._depth[e][n]!==Ue.NULL_VALUE)return!1;return!0}else if(arguments.length===1){var i=arguments[0];return this._depth[i][1]===Ue.NULL_VALUE}else if(arguments.length===2){var s=arguments[0],a=arguments[1];return this._depth[s][a]===Ue.NULL_VALUE}},Ue.prototype.normalize=function(){for(var t=this,e=0;e<2;e++)if(!t.isNull(e)){var n=t._depth[e][1];t._depth[e][2]<n&&(n=t._depth[e][2]),n<0&&(n=0);for(var i=1;i<3;i++){var s=0;t._depth[e][i]>n&&(s=1),t._depth[e][i]=s}}},Ue.prototype.getDelta=function(t){return this._depth[t][K.RIGHT]-this._depth[t][K.LEFT]},Ue.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?F.EXTERIOR:F.INTERIOR},Ue.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},Ue.prototype.add=function(){var t=this;if(arguments.length===1)for(var e=arguments[0],n=0;n<2;n++)for(var i=1;i<3;i++){var s=e.getLocation(n,i);(s===F.EXTERIOR||s===F.INTERIOR)&&(t.isNull(n,i)?t._depth[n][i]=Ue.depthAtLocation(s):t._depth[n][i]+=Ue.depthAtLocation(s))}else if(arguments.length===3){var a=arguments[0],o=arguments[1],l=arguments[2];l===F.INTERIOR&&this._depth[a][o]++}},Ue.prototype.interfaces_=function(){return[]},Ue.prototype.getClass=function(){return Ue},Ue.depthAtLocation=function(t){return t===F.EXTERIOR?0:t===F.INTERIOR?1:Ue.NULL_VALUE},Sg.NULL_VALUE.get=function(){return-1},Object.defineProperties(Ue,Sg);var yc=function(r){function t(){if(r.call(this),this.pts=null,this._env=null,this.eiList=new wi(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new Ue,this._depthDelta=0,arguments.length===1){var e=arguments[0];t.call(this,e,null)}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.pts=n,this._label=i}}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.getDepth=function(){return this._depth},t.prototype.getCollapsedEdge=function(){var n=new Array(2).fill(null);n[0]=this.pts[0],n[1]=this.pts[1];var i=new t(n,Jt.toLineLabel(this._label));return i},t.prototype.isIsolated=function(){return this._isIsolated},t.prototype.getCoordinates=function(){return this.pts},t.prototype.setIsolated=function(n){this._isIsolated=n},t.prototype.setName=function(n){this._name=n},t.prototype.equals=function(n){var i=this;if(!(n instanceof t))return!1;var s=n;if(this.pts.length!==s.pts.length)return!1;for(var a=!0,o=!0,l=this.pts.length,u=0;u<this.pts.length;u++)if(i.pts[u].equals2D(s.pts[u])||(a=!1),i.pts[u].equals2D(s.pts[--l])||(o=!1),!a&&!o)return!1;return!0},t.prototype.getCoordinate=function(){if(arguments.length===0)return this.pts.length>0?this.pts[0]:null;if(arguments.length===1){var n=arguments[0];return this.pts[n]}},t.prototype.print=function(n){var i=this;n.print("edge "+this._name+": "),n.print("LINESTRING (");for(var s=0;s<this.pts.length;s++)s>0&&n.print(","),n.print(i.pts[s].x+" "+i.pts[s].y);n.print(") "+this._label+" "+this._depthDelta)},t.prototype.computeIM=function(n){t.updateIM(this._label,n)},t.prototype.isCollapsed=function(){return!this._label.isArea()||this.pts.length!==3?!1:!!this.pts[0].equals(this.pts[2])},t.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},t.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},t.prototype.getDepthDelta=function(){return this._depthDelta},t.prototype.getNumPoints=function(){return this.pts.length},t.prototype.printReverse=function(n){var i=this;n.print("edge "+this._name+": ");for(var s=this.pts.length-1;s>=0;s--)n.print(i.pts[s]+" ");n.println("")},t.prototype.getMonotoneChainEdge=function(){return this._mce===null&&(this._mce=new Ki(this)),this._mce},t.prototype.getEnvelope=function(){var n=this;if(this._env===null){this._env=new dt;for(var i=0;i<this.pts.length;i++)n._env.expandToInclude(n.pts[i])}return this._env},t.prototype.addIntersection=function(n,i,s,a){var o=new L(n.getIntersection(a)),l=i,u=n.getEdgeDistance(s,a),c=l+1;if(c<this.pts.length){var h=this.pts[c];o.equals2D(h)&&(l=c,u=0)}this.eiList.add(o,l,u)},t.prototype.toString=function(){var n=this,i=new zn;i.append("edge "+this._name+": "),i.append("LINESTRING (");for(var s=0;s<this.pts.length;s++)s>0&&i.append(","),i.append(n.pts[s].x+" "+n.pts[s].y);return i.append(") "+this._label+" "+this._depthDelta),i.toString()},t.prototype.isPointwiseEqual=function(n){var i=this;if(this.pts.length!==n.pts.length)return!1;for(var s=0;s<this.pts.length;s++)if(!i.pts[s].equals2D(n.pts[s]))return!1;return!0},t.prototype.setDepthDelta=function(n){this._depthDelta=n},t.prototype.getEdgeIntersectionList=function(){return this.eiList},t.prototype.addIntersections=function(n,i,s){for(var a=this,o=0;o<n.getIntersectionNum();o++)a.addIntersection(n,i,s,o)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.updateIM=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1];i.setAtLeastIfValid(n.getLocation(0,K.ON),n.getLocation(1,K.ON),1),n.isArea()&&(i.setAtLeastIfValid(n.getLocation(0,K.LEFT),n.getLocation(1,K.LEFT),2),i.setAtLeastIfValid(n.getLocation(0,K.RIGHT),n.getLocation(1,K.RIGHT),2))}else return r.prototype.updateIM.apply(this,arguments)},t}(kr),ir=function(t){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new bn,this._bufParams=t||null};ir.prototype.setWorkingPrecisionModel=function(t){this._workingPrecisionModel=t},ir.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(e!==null){var n=e.getLabel(),i=t.getLabel();e.isPointwiseEqual(t)||(i=new Jt(t.getLabel()),i.flip()),n.merge(i);var s=ir.depthDelta(i),a=e.getDepthDelta(),o=a+s;e.setDepthDelta(o)}else this._edgeList.add(t),t.setDepthDelta(ir.depthDelta(t.getLabel()))},ir.prototype.buildSubgraphs=function(t,e){for(var n=new Z,i=t.iterator();i.hasNext();){var s=i.next(),a=s.getRightmostCoordinate(),o=new Wa(n),l=o.getDepth(a);s.computeDepth(l),s.findResultEdges(),n.add(s),e.add(s.getDirectedEdges(),s.getNodes())}},ir.prototype.createSubgraphs=function(t){for(var e=new Z,n=t.getNodes().iterator();n.hasNext();){var i=n.next();if(!i.isVisited()){var s=new rr;s.create(i),e.add(s)}}return Nn.sort(e,Nn.reverseOrder()),e},ir.prototype.createEmptyResultGeometry=function(){var t=this._geomFact.createPolygon();return t},ir.prototype.getNoder=function(t){if(this._workingNoder!==null)return this._workingNoder;var e=new Jf,n=new Zs;return n.setPrecisionModel(t),e.setSegmentIntersector(new Ur(n)),e},ir.prototype.buffer=function(t,e){var n=this._workingPrecisionModel;n===null&&(n=t.getPrecisionModel()),this._geomFact=t.getFactory();var i=new dr(n,this._bufParams),s=new nn(t,e,i),a=s.getCurves();if(a.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(a,n),this._graph=new fe(new Eg),this._graph.addEdges(this._edgeList.getEdges());var o=this.createSubgraphs(this._graph),l=new Nr(this._geomFact);this.buildSubgraphs(o,l);var u=l.getPolygons();if(u.size()<=0)return this.createEmptyResultGeometry();var c=this._geomFact.buildGeometry(u);return c},ir.prototype.computeNodedEdges=function(t,e){var n=this,i=this.getNoder(e);i.computeNodes(t);for(var s=i.getNodedSubstrings(),a=s.iterator();a.hasNext();){var o=a.next(),l=o.getCoordinates();if(!(l.length===2&&l[0].equals2D(l[1]))){var u=o.getData(),c=new yc(o.getCoordinates(),new Jt(u));n.insertUniqueEdge(c)}}},ir.prototype.setNoder=function(t){this._workingNoder=t},ir.prototype.interfaces_=function(){return[]},ir.prototype.getClass=function(){return ir},ir.depthDelta=function(t){var e=t.getLocation(0,K.LEFT),n=t.getLocation(0,K.RIGHT);return e===F.INTERIOR&&n===F.EXTERIOR?1:e===F.EXTERIOR&&n===F.INTERIOR?-1:0},ir.convertSegStrings=function(t){for(var e=new Dt,n=new Z;t.hasNext();){var i=t.next(),s=e.createLineString(i.getCoordinates());n.add(s)}return e.buildGeometry(n)};var Ss=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,arguments.length===2){var t=arguments[0],e=arguments[1];this._noder=t,this._scaleFactor=e,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(arguments.length===4){var n=arguments[0],i=arguments[1],s=arguments[2],a=arguments[3];this._noder=n,this._scaleFactor=i,this._offsetX=s,this._offsetY=a,this._isScaled=!this.isIntegerPrecision()}};Ss.prototype.rescale=function(){var t=this;if(_t(arguments[0],Me))for(var e=arguments[0],n=e.iterator();n.hasNext();){var i=n.next();t.rescale(i.getCoordinates())}else if(arguments[0]instanceof Array){for(var s=arguments[0],a=0;a<s.length;a++)s[a].x=s[a].x/t._scaleFactor+t._offsetX,s[a].y=s[a].y/t._scaleFactor+t._offsetY;s.length===2&&s[0].equals2D(s[1])&&Ve.out.println(s)}},Ss.prototype.scale=function(){var t=this;if(_t(arguments[0],Me)){for(var e=arguments[0],n=new Z,i=e.iterator();i.hasNext();){var s=i.next();n.add(new _e(t.scale(s.getCoordinates()),s.getData()))}return n}else if(arguments[0]instanceof Array){for(var a=arguments[0],o=new Array(a.length).fill(null),l=0;l<a.length;l++)o[l]=new L(Math.round((a[l].x-t._offsetX)*t._scaleFactor),Math.round((a[l].y-t._offsetY)*t._scaleFactor),a[l].z);var u=Tt.removeRepeatedPoints(o);return u}},Ss.prototype.isIntegerPrecision=function(){return this._scaleFactor===1},Ss.prototype.getNodedSubstrings=function(){var t=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(t),t},Ss.prototype.computeNodes=function(t){var e=t;this._isScaled&&(e=this.scale(t)),this._noder.computeNodes(e)},Ss.prototype.interfaces_=function(){return[ea]},Ss.prototype.getClass=function(){return Ss};var $n=function(){this._li=new Zs,this._segStrings=null;var t=arguments[0];this._segStrings=t},Pg={fact:{configurable:!0}};$n.prototype.checkEndPtVertexIntersections=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();){var n=e.next(),i=n.getCoordinates();t.checkEndPtVertexIntersections(i[0],t._segStrings),t.checkEndPtVertexIntersections(i[i.length-1],t._segStrings)}else if(arguments.length===2){for(var s=arguments[0],a=arguments[1],o=a.iterator();o.hasNext();)for(var l=o.next(),u=l.getCoordinates(),c=1;c<u.length-1;c++)if(u[c].equals(s))throw new zi("found endpt/interior pt intersection at index "+c+" :pt "+s)}},$n.prototype.checkInteriorIntersections=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();)for(var n=e.next(),i=this._segStrings.iterator();i.hasNext();){var s=i.next();t.checkInteriorIntersections(n,s)}else if(arguments.length===2)for(var a=arguments[0],o=arguments[1],l=a.getCoordinates(),u=o.getCoordinates(),c=0;c<l.length-1;c++)for(var h=0;h<u.length-1;h++)t.checkInteriorIntersections(a,c,o,h);else if(arguments.length===4){var f=arguments[0],g=arguments[1],m=arguments[2],_=arguments[3];if(f===m&&g===_)return null;var E=f.getCoordinates()[g],M=f.getCoordinates()[g+1],y=m.getCoordinates()[_],w=m.getCoordinates()[_+1];if(this._li.computeIntersection(E,M,y,w),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,E,M)||this.hasInteriorIntersection(this._li,y,w)))throw new zi("found non-noded intersection at "+E+"-"+M+" and "+y+"-"+w)}},$n.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},$n.prototype.checkCollapses=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();){var n=e.next();t.checkCollapses(n)}else if(arguments.length===1)for(var i=arguments[0],s=i.getCoordinates(),a=0;a<s.length-2;a++)t.checkCollapse(s[a],s[a+1],s[a+2])},$n.prototype.hasInteriorIntersection=function(t,e,n){for(var i=0;i<t.getIntersectionNum();i++){var s=t.getIntersection(i);if(!(s.equals(e)||s.equals(n)))return!0}return!1},$n.prototype.checkCollapse=function(t,e,n){if(t.equals(n))throw new zi("found non-noded collapse at "+$n.fact.createLineString([t,e,n]))},$n.prototype.interfaces_=function(){return[]},$n.prototype.getClass=function(){return $n},Pg.fact.get=function(){return new Dt},Object.defineProperties($n,Pg);var pr=function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var t=arguments[0],e=arguments[1],n=arguments[2];if(this._originalPt=t,this._pt=t,this._scaleFactor=e,this._li=n,e<=0)throw new oe("Scale factor must be non-zero");e!==1&&(this._pt=new L(this.scale(t.x),this.scale(t.y)),this._p0Scaled=new L,this._p1Scaled=new L),this.initCorners(this._pt)},Cg={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};pr.prototype.intersectsScaled=function(t,e){var n=Math.min(t.x,e.x),i=Math.max(t.x,e.x),s=Math.min(t.y,e.y),a=Math.max(t.y,e.y),o=this._maxx<n||this._minx>i||this._maxy<s||this._miny>a;if(o)return!1;var l=this.intersectsToleranceSquare(t,e);return Mt.isTrue(!(o&&l),"Found bad envelope test"),l},pr.prototype.initCorners=function(t){var e=.5;this._minx=t.x-e,this._maxx=t.x+e,this._miny=t.y-e,this._maxy=t.y+e,this._corner[0]=new L(this._maxx,this._maxy),this._corner[1]=new L(this._minx,this._maxy),this._corner[2]=new L(this._minx,this._miny),this._corner[3]=new L(this._maxx,this._miny)},pr.prototype.intersects=function(t,e){return this._scaleFactor===1?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},pr.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},pr.prototype.getCoordinate=function(){return this._originalPt},pr.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},pr.prototype.getSafeEnvelope=function(){if(this._safeEnv===null){var t=pr.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new dt(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},pr.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.hasIntersection()))},pr.prototype.intersectsToleranceSquare=function(t,e){var n=!1,i=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.isProper())||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.isProper())||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.isProper())||n&&i||t.equals(this._pt)||e.equals(this._pt))},pr.prototype.addSnappedNode=function(t,e){var n=t.getCoordinate(e),i=t.getCoordinate(e+1);return this.intersects(n,i)?(t.addIntersection(this.getCoordinate(),e),!0):!1},pr.prototype.interfaces_=function(){return[]},pr.prototype.getClass=function(){return pr},Cg.SAFE_ENV_EXPANSION_FACTOR.get=function(){return .75},Object.defineProperties(pr,Cg);var lh=function(){this.tempEnv1=new dt,this.selectedSegment=new pt};lh.prototype.select=function(){if(arguments.length!==1){if(arguments.length===2){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}}},lh.prototype.interfaces_=function(){return[]},lh.prototype.getClass=function(){return lh};var uu=function(){this._index=null;var t=arguments[0];this._index=t},Ig={HotPixelSnapAction:{configurable:!0}};uu.prototype.snap=function(){if(arguments.length===1){var t=arguments[0];return this.snap(t,null,-1)}else if(arguments.length===3){var e=arguments[0],n=arguments[1],i=arguments[2],s=e.getSafeEnvelope(),a=new Mg(e,n,i);return this._index.query(s,{interfaces_:function(){return[_s]},visitItem:function(o){var l=o;l.select(s,a)}}),a.isNodeAdded()}},uu.prototype.interfaces_=function(){return[]},uu.prototype.getClass=function(){return uu},Ig.HotPixelSnapAction.get=function(){return Mg},Object.defineProperties(uu,Ig);var Mg=function(r){function t(){r.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],n=arguments[1],i=arguments[2];this._hotPixel=e,this._parentEdge=n,this._hotPixelVertexIndex=i}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.isNodeAdded=function(){return this._isNodeAdded},t.prototype.select=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1],s=n.getContext();if(this._parentEdge!==null&&s===this._parentEdge&&i===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(s,i)}else return r.prototype.select.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(lh),Ha=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new Z};Ha.prototype.processIntersections=function(t,e,n,i){var s=this;if(t===n&&e===i)return null;var a=t.getCoordinates()[e],o=t.getCoordinates()[e+1],l=n.getCoordinates()[i],u=n.getCoordinates()[i+1];if(this._li.computeIntersection(a,o,l,u),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var c=0;c<this._li.getIntersectionNum();c++)s._interiorIntersections.add(s._li.getIntersection(c));t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1)}},Ha.prototype.isDone=function(){return!1},Ha.prototype.getInteriorIntersections=function(){return this._interiorIntersections},Ha.prototype.interfaces_=function(){return[na]},Ha.prototype.getClass=function(){return Ha};var Ei=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var t=arguments[0];this._pm=t,this._li=new Zs,this._li.setPrecisionModel(t),this._scaleFactor=t.getScale()};Ei.prototype.checkCorrectness=function(t){var e=_e.getNodedSubstrings(t),n=new $n(e);try{n.checkValid()}catch(i){if(i instanceof sg)i.printStackTrace();else throw i}finally{}},Ei.prototype.getNodedSubstrings=function(){return _e.getNodedSubstrings(this._nodedSegStrings)},Ei.prototype.snapRound=function(t,e){var n=this.findInteriorIntersections(t,e);this.computeIntersectionSnaps(n),this.computeVertexSnaps(t)},Ei.prototype.findInteriorIntersections=function(t,e){var n=new Ha(e);return this._noder.setSegmentIntersector(n),this._noder.computeNodes(t),n.getInteriorIntersections()},Ei.prototype.computeVertexSnaps=function(){var t=this;if(_t(arguments[0],Me))for(var e=arguments[0],n=e.iterator();n.hasNext();){var i=n.next();t.computeVertexSnaps(i)}else if(arguments[0]instanceof _e)for(var s=arguments[0],a=s.getCoordinates(),o=0;o<a.length;o++){var l=new pr(a[o],t._scaleFactor,t._li),u=t._pointSnapper.snap(l,s,o);u&&s.addIntersection(a[o],o)}},Ei.prototype.computeNodes=function(t){this._nodedSegStrings=t,this._noder=new Jf,this._pointSnapper=new uu(this._noder.getIndex()),this.snapRound(t,this._li)},Ei.prototype.computeIntersectionSnaps=function(t){for(var e=this,n=t.iterator();n.hasNext();){var i=n.next(),s=new pr(i,e._scaleFactor,e._li);e._pointSnapper.snap(s)}},Ei.prototype.interfaces_=function(){return[ea]},Ei.prototype.getClass=function(){return Ei};var qe=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new qt,this._resultGeometry=null,this._saveException=null,arguments.length===1){var t=arguments[0];this._argGeom=t}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this._argGeom=e,this._bufParams=n}},hu={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};qe.prototype.bufferFixedPrecision=function(t){var e=new Ss(new Ei(new Ut(1)),t.getScale()),n=new ir(this._bufParams);n.setWorkingPrecisionModel(t),n.setNoder(e),this._resultGeometry=n.buffer(this._argGeom,this._distance)},qe.prototype.bufferReducedPrecision=function(){var t=this;if(arguments.length===0){for(var e=qe.MAX_PRECISION_DIGITS;e>=0;e--){try{t.bufferReducedPrecision(e)}catch(a){if(a instanceof Xi)t._saveException=a;else throw a}finally{}if(t._resultGeometry!==null)return null}throw this._saveException}else if(arguments.length===1){var n=arguments[0],i=qe.precisionScaleFactor(this._argGeom,this._distance,n),s=new Ut(i);this.bufferFixedPrecision(s)}},qe.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===Ut.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},qe.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},qe.prototype.bufferOriginalPrecision=function(){try{var t=new ir(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(e){if(e instanceof zi)this._saveException=e;else throw e}finally{}},qe.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},qe.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},qe.prototype.interfaces_=function(){return[]},qe.prototype.getClass=function(){return qe},qe.bufferOp=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new qe(t),i=n.getResultGeometry(e);return i}else if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof yt&&typeof arguments[1]=="number"){var s=arguments[0],a=arguments[1],o=arguments[2],l=new qe(s);l.setQuadrantSegments(o);var u=l.getResultGeometry(a);return u}else if(arguments[2]instanceof qt&&arguments[0]instanceof yt&&typeof arguments[1]=="number"){var c=arguments[0],h=arguments[1],f=arguments[2],g=new qe(c,f),m=g.getResultGeometry(h);return m}}else if(arguments.length===4){var _=arguments[0],E=arguments[1],M=arguments[2],y=arguments[3],w=new qe(_);w.setQuadrantSegments(M),w.setEndCapStyle(y);var v=w.getResultGeometry(E);return v}},qe.precisionScaleFactor=function(t,e,n){var i=t.getEnvelopeInternal(),s=Gr.max(Math.abs(i.getMaxX()),Math.abs(i.getMaxY()),Math.abs(i.getMinX()),Math.abs(i.getMinY())),a=e>0?e:0,o=s+2*a,l=Math.trunc(Math.log(o)/Math.log(10)+1),u=n-l,c=Math.pow(10,u);return c},hu.CAP_ROUND.get=function(){return qt.CAP_ROUND},hu.CAP_BUTT.get=function(){return qt.CAP_FLAT},hu.CAP_FLAT.get=function(){return qt.CAP_FLAT},hu.CAP_SQUARE.get=function(){return qt.CAP_SQUARE},hu.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(qe,hu);var sr=function(){this._pt=[new L,new L],this._distance=wt.NaN,this._isNull=!0};sr.prototype.getCoordinates=function(){return this._pt},sr.prototype.getCoordinate=function(t){return this._pt[t]},sr.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i<this._distance&&this.initialize(e,n,i)}},sr.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(i),this._distance=s,this._isNull=!1}},sr.prototype.getDistance=function(){return this._distance},sr.prototype.setMaximum=function(){if(arguments.length===1){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i>this._distance&&this.initialize(e,n,i)}},sr.prototype.interfaces_=function(){return[]},sr.prototype.getClass=function(){return sr};var Si=function(){};Si.prototype.interfaces_=function(){return[]},Si.prototype.getClass=function(){return Si},Si.computeDistance=function(){if(arguments[2]instanceof sr&&arguments[0]instanceof pe&&arguments[1]instanceof L)for(var t=arguments[0],e=arguments[1],n=arguments[2],i=t.getCoordinates(),s=new pt,a=0;a<i.length-1;a++){s.setCoordinates(i[a],i[a+1]);var o=s.closestPoint(e);n.setMinimum(o,e)}else if(arguments[2]instanceof sr&&arguments[0]instanceof Ne&&arguments[1]instanceof L){var l=arguments[0],u=arguments[1],c=arguments[2];Si.computeDistance(l.getExteriorRing(),u,c);for(var h=0;h<l.getNumInteriorRing();h++)Si.computeDistance(l.getInteriorRingN(h),u,c)}else if(arguments[2]instanceof sr&&arguments[0]instanceof yt&&arguments[1]instanceof L){var f=arguments[0],g=arguments[1],m=arguments[2];if(f instanceof pe)Si.computeDistance(f,g,m);else if(f instanceof Ne)Si.computeDistance(f,g,m);else if(f instanceof er)for(var _=f,E=0;E<_.getNumGeometries();E++){var M=_.getGeometryN(E);Si.computeDistance(M,g,m)}else m.setMinimum(f.getCoordinate(),g)}else if(arguments[2]instanceof sr&&arguments[0]instanceof pt&&arguments[1]instanceof L){var y=arguments[0],w=arguments[1],v=arguments[2],S=y.closestPoint(w);v.setMinimum(S,w)}};var sa=function(t){this._maxPtDist=new sr,this._inputGeom=t||null},Kf={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};sa.prototype.computeMaxMidpointDistance=function(t){var e=new Ps(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},sa.prototype.computeMaxVertexDistance=function(t){var e=new Xa(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},sa.prototype.findDistance=function(t){return this.computeMaxVertexDistance(t),this.computeMaxMidpointDistance(t),this._maxPtDist.getDistance()},sa.prototype.getDistancePoints=function(){return this._maxPtDist},sa.prototype.interfaces_=function(){return[]},sa.prototype.getClass=function(){return sa},Kf.MaxPointDistanceFilter.get=function(){return Xa},Kf.MaxMidpointDistanceFilter.get=function(){return Ps},Object.defineProperties(sa,Kf);var Xa=function(t){this._maxPtDist=new sr,this._minPtDist=new sr,this._geom=t||null};Xa.prototype.filter=function(t){this._minPtDist.initialize(),Si.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Xa.prototype.getMaxPointDistance=function(){return this._maxPtDist},Xa.prototype.interfaces_=function(){return[pi]},Xa.prototype.getClass=function(){return Xa};var Ps=function(t){this._maxPtDist=new sr,this._minPtDist=new sr,this._geom=t||null};Ps.prototype.filter=function(t,e){if(e===0)return null;var n=t.getCoordinate(e-1),i=t.getCoordinate(e),s=new L((n.x+i.x)/2,(n.y+i.y)/2);this._minPtDist.initialize(),Si.computeDistance(this._geom,s,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Ps.prototype.isDone=function(){return!1},Ps.prototype.isGeometryChanged=function(){return!1},Ps.prototype.getMaxPointDistance=function(){return this._maxPtDist},Ps.prototype.interfaces_=function(){return[In]},Ps.prototype.getClass=function(){return Ps};var Qi=function(t){this._comps=t||null};Qi.prototype.filter=function(t){t instanceof Ne&&this._comps.add(t)},Qi.prototype.interfaces_=function(){return[Hn]},Qi.prototype.getClass=function(){return Qi},Qi.getPolygons=function(){if(arguments.length===1){var t=arguments[0];return Qi.getPolygons(t,new Z)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return e instanceof Ne?n.add(e):e instanceof er&&e.apply(new Qi(n)),n}};var We=function(){if(this._lines=null,this._isForcedToLineString=!1,arguments.length===1){var t=arguments[0];this._lines=t}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this._lines=e,this._isForcedToLineString=n}};We.prototype.filter=function(t){if(this._isForcedToLineString&&t instanceof gi){var e=t.getFactory().createLineString(t.getCoordinateSequence());return this._lines.add(e),null}t instanceof pe&&this._lines.add(t)},We.prototype.setForceToLineString=function(t){this._isForcedToLineString=t},We.prototype.interfaces_=function(){return[Vi]},We.prototype.getClass=function(){return We},We.getGeometry=function(){if(arguments.length===1){var t=arguments[0];return t.getFactory().buildGeometry(We.getLines(t))}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return e.getFactory().buildGeometry(We.getLines(e,n))}},We.getLines=function(){if(arguments.length===1){var t=arguments[0];return We.getLines(t,!1)}else if(arguments.length===2){if(_t(arguments[0],Me)&&_t(arguments[1],Me)){for(var e=arguments[0],n=arguments[1],i=e.iterator();i.hasNext();){var s=i.next();We.getLines(s,n)}return n}else if(arguments[0]instanceof yt&&typeof arguments[1]=="boolean"){var a=arguments[0],o=arguments[1],l=new Z;return a.apply(new We(l,o)),l}else if(arguments[0]instanceof yt&&_t(arguments[1],Me)){var u=arguments[0],c=arguments[1];return u instanceof pe?c.add(u):u.apply(new We(c)),c}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&_t(arguments[0],Me)&&_t(arguments[1],Me)){for(var h=arguments[0],f=arguments[1],g=arguments[2],m=h.iterator();m.hasNext();){var _=m.next();We.getLines(_,f,g)}return f}else if(typeof arguments[2]=="boolean"&&arguments[0]instanceof yt&&_t(arguments[1],Me)){var E=arguments[0],M=arguments[1],y=arguments[2];return E.apply(new We(M,y)),M}}};var Tn=function(){if(this._boundaryRule=jr.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];if(t===null)throw new oe("Rule must be non-null");this._boundaryRule=t}}};Tn.prototype.locateInternal=function(){var t=this;if(arguments[0]instanceof L&&arguments[1]instanceof Ne){var e=arguments[0],n=arguments[1];if(n.isEmpty())return F.EXTERIOR;var i=n.getExteriorRing(),s=this.locateInPolygonRing(e,i);if(s===F.EXTERIOR)return F.EXTERIOR;if(s===F.BOUNDARY)return F.BOUNDARY;for(var a=0;a<n.getNumInteriorRing();a++){var o=n.getInteriorRingN(a),l=t.locateInPolygonRing(e,o);if(l===F.INTERIOR)return F.EXTERIOR;if(l===F.BOUNDARY)return F.BOUNDARY}return F.INTERIOR}else if(arguments[0]instanceof L&&arguments[1]instanceof pe){var u=arguments[0],c=arguments[1];if(!c.getEnvelopeInternal().intersects(u))return F.EXTERIOR;var h=c.getCoordinates();return!c.isClosed()&&(u.equals(h[0])||u.equals(h[h.length-1]))?F.BOUNDARY:et.isOnLine(u,h)?F.INTERIOR:F.EXTERIOR}else if(arguments[0]instanceof L&&arguments[1]instanceof Mr){var f=arguments[0],g=arguments[1],m=g.getCoordinate();return m.equals2D(f)?F.INTERIOR:F.EXTERIOR}},Tn.prototype.locateInPolygonRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?et.locatePointInRing(t,e.getCoordinates()):F.EXTERIOR},Tn.prototype.intersects=function(t,e){return this.locate(t,e)!==F.EXTERIOR},Tn.prototype.updateLocationInfo=function(t){t===F.INTERIOR&&(this._isIn=!0),t===F.BOUNDARY&&this._numBoundaries++},Tn.prototype.computeLocation=function(t,e){var n=this;if(e instanceof Mr&&this.updateLocationInfo(this.locateInternal(t,e)),e instanceof pe)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Ne)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof ta)for(var i=e,s=0;s<i.getNumGeometries();s++){var a=i.getGeometryN(s);n.updateLocationInfo(n.locateInternal(t,a))}else if(e instanceof mi)for(var o=e,l=0;l<o.getNumGeometries();l++){var u=o.getGeometryN(l);n.updateLocationInfo(n.locateInternal(t,u))}else if(e instanceof er)for(var c=new _i(e);c.hasNext();){var h=c.next();h!==e&&n.computeLocation(t,h)}},Tn.prototype.locate=function(t,e){return e.isEmpty()?F.EXTERIOR:e instanceof pe?this.locateInternal(t,e):e instanceof Ne?this.locateInternal(t,e):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(t,e),this._boundaryRule.isInBoundary(this._numBoundaries)?F.BOUNDARY:this._numBoundaries>0||this._isIn?F.INTERIOR:F.EXTERIOR)},Tn.prototype.interfaces_=function(){return[]},Tn.prototype.getClass=function(){return Tn};var ar=function r(){if(this._component=null,this._segIndex=null,this._pt=null,arguments.length===2){var t=arguments[0],e=arguments[1];r.call(this,t,r.INSIDE_AREA,e)}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._component=n,this._segIndex=i,this._pt=s}},Ng={INSIDE_AREA:{configurable:!0}};ar.prototype.isInsideArea=function(){return this._segIndex===ar.INSIDE_AREA},ar.prototype.getCoordinate=function(){return this._pt},ar.prototype.getGeometryComponent=function(){return this._component},ar.prototype.getSegmentIndex=function(){return this._segIndex},ar.prototype.interfaces_=function(){return[]},ar.prototype.getClass=function(){return ar},Ng.INSIDE_AREA.get=function(){return-1},Object.defineProperties(ar,Ng);var Cs=function(t){this._pts=t||null};Cs.prototype.filter=function(t){t instanceof Mr&&this._pts.add(t)},Cs.prototype.interfaces_=function(){return[Hn]},Cs.prototype.getClass=function(){return Cs},Cs.getPoints=function(){if(arguments.length===1){var t=arguments[0];return t instanceof Mr?Nn.singletonList(t):Cs.getPoints(t,new Z)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return e instanceof Mr?n.add(e):e instanceof er&&e.apply(new Cs(n)),n}};var Ya=function(){this._locations=null;var t=arguments[0];this._locations=t};Ya.prototype.filter=function(t){(t instanceof Mr||t instanceof pe||t instanceof Ne)&&this._locations.add(new ar(t,0,t.getCoordinate()))},Ya.prototype.interfaces_=function(){return[Hn]},Ya.prototype.getClass=function(){return Ya},Ya.getLocations=function(t){var e=new Z;return t.apply(new Ya(e)),e};var He=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Tn,this._minDistanceLocation=null,this._minDistance=wt.MAX_VALUE,arguments.length===2){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=i,this._terminateDistance=s}};He.prototype.computeContainmentDistance=function(){var t=this;if(arguments.length===0){var e=new Array(2).fill(null);if(this.computeContainmentDistance(0,e),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,e)}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=1-n,a=Qi.getPolygons(this._geom[n]);if(a.size()>0){var o=Ya.getLocations(this._geom[s]);if(this.computeContainmentDistance(o,a,i),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[s]=i[0],this._minDistanceLocation[n]=i[1],null}}else if(arguments.length===3){if(arguments[2]instanceof Array&&_t(arguments[0],Pn)&&_t(arguments[1],Pn)){for(var l=arguments[0],u=arguments[1],c=arguments[2],h=0;h<l.size();h++)for(var f=l.get(h),g=0;g<u.size();g++)if(t.computeContainmentDistance(f,u.get(g),c),t._minDistance<=t._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof ar&&arguments[1]instanceof Ne){var m=arguments[0],_=arguments[1],E=arguments[2],M=m.getCoordinate();if(F.EXTERIOR!==this._ptLocator.locate(M,_))return this._minDistance=0,E[0]=m,E[1]=new ar(_,M),null}}},He.prototype.computeMinDistanceLinesPoints=function(t,e,n){for(var i=this,s=0;s<t.size();s++)for(var a=t.get(s),o=0;o<e.size();o++){var l=e.get(o);if(i.computeMinDistance(a,l,n),i._minDistance<=i._terminateDistance)return null}},He.prototype.computeFacetDistance=function(){var t=new Array(2).fill(null),e=We.getLines(this._geom[0]),n=We.getLines(this._geom[1]),i=Cs.getPoints(this._geom[0]),s=Cs.getPoints(this._geom[1]);if(this.computeMinDistanceLines(e,n,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(e,s,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance)||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(n,i,t),this.updateMinDistance(t,!0),this._minDistance<=this._terminateDistance))return null;t[0]=null,t[1]=null,this.computeMinDistancePoints(i,s,t),this.updateMinDistance(t,!1)},He.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},He.prototype.updateMinDistance=function(t,e){if(t[0]===null)return null;e?(this._minDistanceLocation[0]=t[1],this._minDistanceLocation[1]=t[0]):(this._minDistanceLocation[0]=t[0],this._minDistanceLocation[1]=t[1])},He.prototype.nearestPoints=function(){this.computeMinDistance();var t=[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()];return t},He.prototype.computeMinDistance=function(){var t=this;if(arguments.length===0){if(this._minDistanceLocation!==null||(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance))return null;this.computeFacetDistance()}else if(arguments.length===3){if(arguments[2]instanceof Array&&arguments[0]instanceof pe&&arguments[1]instanceof Mr){var e=arguments[0],n=arguments[1],i=arguments[2];if(e.getEnvelopeInternal().distance(n.getEnvelopeInternal())>this._minDistance)return null;for(var s=e.getCoordinates(),a=n.getCoordinate(),o=0;o<s.length-1;o++){var l=et.distancePointLine(a,s[o],s[o+1]);if(l<t._minDistance){t._minDistance=l;var u=new pt(s[o],s[o+1]),c=u.closestPoint(a);i[0]=new ar(e,o,c),i[1]=new ar(n,0,a)}if(t._minDistance<=t._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof pe&&arguments[1]instanceof pe){var h=arguments[0],f=arguments[1],g=arguments[2];if(h.getEnvelopeInternal().distance(f.getEnvelopeInternal())>this._minDistance)return null;for(var m=h.getCoordinates(),_=f.getCoordinates(),E=0;E<m.length-1;E++)for(var M=0;M<_.length-1;M++){var y=et.distanceLineLine(m[E],m[E+1],_[M],_[M+1]);if(y<t._minDistance){t._minDistance=y;var w=new pt(m[E],m[E+1]),v=new pt(_[M],_[M+1]),S=w.closestPoints(v);g[0]=new ar(h,E,S[0]),g[1]=new ar(f,M,S[1])}if(t._minDistance<=t._terminateDistance)return null}}}},He.prototype.computeMinDistancePoints=function(t,e,n){for(var i=this,s=0;s<t.size();s++)for(var a=t.get(s),o=0;o<e.size();o++){var l=e.get(o),u=a.getCoordinate().distance(l.getCoordinate());if(u<i._minDistance&&(i._minDistance=u,n[0]=new ar(a,0,a.getCoordinate()),n[1]=new ar(l,0,l.getCoordinate())),i._minDistance<=i._terminateDistance)return null}},He.prototype.distance=function(){if(this._geom[0]===null||this._geom[1]===null)throw new oe("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},He.prototype.computeMinDistanceLines=function(t,e,n){for(var i=this,s=0;s<t.size();s++)for(var a=t.get(s),o=0;o<e.size();o++){var l=e.get(o);if(i.computeMinDistance(a,l,n),i._minDistance<=i._terminateDistance)return null}},He.prototype.interfaces_=function(){return[]},He.prototype.getClass=function(){return He},He.distance=function(t,e){var n=new He(t,e);return n.distance()},He.isWithinDistance=function(t,e,n){var i=new He(t,e,n);return i.distance()<=n},He.nearestPoints=function(t,e){var n=new He(t,e);return n.nearestPoints()};var je=function(){this._pt=[new L,new L],this._distance=wt.NaN,this._isNull=!0};je.prototype.getCoordinates=function(){return this._pt},je.prototype.getCoordinate=function(t){return this._pt[t]},je.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i<this._distance&&this.initialize(e,n,i)}},je.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(i),this._distance=s,this._isNull=!1}},je.prototype.toString=function(){return Sn.toLineString(this._pt[0],this._pt[1])},je.prototype.getDistance=function(){return this._distance},je.prototype.setMaximum=function(){if(arguments.length===1){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i>this._distance&&this.initialize(e,n,i)}},je.prototype.interfaces_=function(){return[]},je.prototype.getClass=function(){return je};var jn=function(){};jn.prototype.interfaces_=function(){return[]},jn.prototype.getClass=function(){return jn},jn.computeDistance=function(){if(arguments[2]instanceof je&&arguments[0]instanceof pe&&arguments[1]instanceof L)for(var t=arguments[0],e=arguments[1],n=arguments[2],i=new pt,s=t.getCoordinates(),a=0;a<s.length-1;a++){i.setCoordinates(s[a],s[a+1]);var o=i.closestPoint(e);n.setMinimum(o,e)}else if(arguments[2]instanceof je&&arguments[0]instanceof Ne&&arguments[1]instanceof L){var l=arguments[0],u=arguments[1],c=arguments[2];jn.computeDistance(l.getExteriorRing(),u,c);for(var h=0;h<l.getNumInteriorRing();h++)jn.computeDistance(l.getInteriorRingN(h),u,c)}else if(arguments[2]instanceof je&&arguments[0]instanceof yt&&arguments[1]instanceof L){var f=arguments[0],g=arguments[1],m=arguments[2];if(f instanceof pe)jn.computeDistance(f,g,m);else if(f instanceof Ne)jn.computeDistance(f,g,m);else if(f instanceof er)for(var _=f,E=0;E<_.getNumGeometries();E++){var M=_.getGeometryN(E);jn.computeDistance(M,g,m)}else m.setMinimum(f.getCoordinate(),g)}else if(arguments[2]instanceof je&&arguments[0]instanceof pt&&arguments[1]instanceof L){var y=arguments[0],w=arguments[1],v=arguments[2],S=y.closestPoint(w);v.setMinimum(S,w)}};var sn=function(){this._g0=null,this._g1=null,this._ptDist=new je,this._densifyFrac=0;var t=arguments[0],e=arguments[1];this._g0=t,this._g1=e},Qf={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};sn.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},sn.prototype.setDensifyFraction=function(t){if(t>1||t<=0)throw new oe("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},sn.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},sn.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},sn.prototype.computeOrientedDistance=function(t,e,n){var i=new Ja(e);if(t.apply(i),n.setMaximum(i.getMaxPointDistance()),this._densifyFrac>0){var s=new Is(e,this._densifyFrac);t.apply(s),n.setMaximum(s.getMaxPointDistance())}},sn.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},sn.prototype.interfaces_=function(){return[]},sn.prototype.getClass=function(){return sn},sn.distance=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new sn(t,e);return n.distance()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],a=arguments[2],o=new sn(i,s);return o.setDensifyFraction(a),o.distance()}},Qf.MaxPointDistanceFilter.get=function(){return Ja},Qf.MaxDensifiedByFractionDistanceFilter.get=function(){return Is},Object.defineProperties(sn,Qf);var Ja=function(){this._maxPtDist=new je,this._minPtDist=new je,this._euclideanDist=new jn,this._geom=null;var t=arguments[0];this._geom=t};Ja.prototype.filter=function(t){this._minPtDist.initialize(),jn.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Ja.prototype.getMaxPointDistance=function(){return this._maxPtDist},Ja.prototype.interfaces_=function(){return[pi]},Ja.prototype.getClass=function(){return Ja};var Is=function(){this._maxPtDist=new je,this._minPtDist=new je,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};Is.prototype.filter=function(t,e){var n=this;if(e===0)return null;for(var i=t.getCoordinate(e-1),s=t.getCoordinate(e),a=(s.x-i.x)/this._numSubSegs,o=(s.y-i.y)/this._numSubSegs,l=0;l<this._numSubSegs;l++){var u=i.x+l*a,c=i.y+l*o,h=new L(u,c);n._minPtDist.initialize(),jn.computeDistance(n._geom,h,n._minPtDist),n._maxPtDist.setMaximum(n._minPtDist)}},Is.prototype.isDone=function(){return!1},Is.prototype.isGeometryChanged=function(){return!1},Is.prototype.getMaxPointDistance=function(){return this._maxPtDist},Is.prototype.interfaces_=function(){return[In]},Is.prototype.getClass=function(){return Is};var Tr=function(t,e,n){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._bufDistance=e||null,this._result=n||null},Bf={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};Tr.prototype.checkMaximumDistance=function(t,e,n){var i=new sn(e,t);if(i.setDensifyFraction(.25),this._maxDistanceFound=i.orientedDistance(),this._maxDistanceFound>n){this._isValid=!1;var s=i.getCoordinates();this._errorLocation=s[1],this._errorIndicator=t.getFactory().createLineString(s),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+Sn.toLineString(s[0],s[1])+")"}},Tr.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=Tr.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,this._input.isEmpty()||this._result.isEmpty()?!0:(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Tr.VERBOSE&&Ve.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},Tr.prototype.checkNegativeValid=function(){if(!(this._input instanceof Ne||this._input instanceof mi||this._input instanceof er))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)},Tr.prototype.getErrorIndicator=function(){return this._errorIndicator},Tr.prototype.checkMinimumDistance=function(t,e,n){var i=new He(t,e,n);if(this._minDistanceFound=i.distance(),this._minDistanceFound<n){this._isValid=!1;var s=i.nearestPoints();this._errorLocation=i.nearestPoints()[1],this._errorIndicator=t.getFactory().createLineString(s),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+Sn.toLineString(s[0],s[1])+" )"}},Tr.prototype.checkPositiveValid=function(){var t=this._result.getBoundary();if(this.checkMinimumDistance(this._input,t,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,t,this._maxValidDistance)},Tr.prototype.getErrorLocation=function(){return this._errorLocation},Tr.prototype.getPolygonLines=function(t){for(var e=new Z,n=new We(e),i=Qi.getPolygons(t),s=i.iterator();s.hasNext();){var a=s.next();a.apply(n)}return t.getFactory().buildGeometry(e)},Tr.prototype.getErrorMessage=function(){return this._errMsg},Tr.prototype.interfaces_=function(){return[]},Tr.prototype.getClass=function(){return Tr},Bf.VERBOSE.get=function(){return!1},Bf.MAX_DISTANCE_DIFF_FRAC.get=function(){return .012},Object.defineProperties(Tr,Bf);var Xe=function(t,e,n){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._distance=e||null,this._result=n||null},Zf={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};Xe.prototype.isValid=function(){return this.checkPolygonal(),this._isValid?(this.checkExpectedEmpty(),this._isValid?(this.checkEnvelope(),this._isValid?(this.checkArea(),this._isValid?(this.checkDistance(),this._isValid):this._isValid):this._isValid):this._isValid):this._isValid},Xe.prototype.checkEnvelope=function(){if(this._distance<0)return null;var t=this._distance*Xe.MAX_ENV_DIFF_FRAC;t===0&&(t=.001);var e=new dt(this._input.getEnvelopeInternal());e.expandBy(this._distance);var n=new dt(this._result.getEnvelopeInternal());n.expandBy(t),n.contains(e)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(n)),this.report("Envelope")},Xe.prototype.checkDistance=function(){var t=new Tr(this._input,this._distance,this._result);t.isValid()||(this._isValid=!1,this._errorMsg=t.getErrorMessage(),this._errorLocation=t.getErrorLocation(),this._errorIndicator=t.getErrorIndicator()),this.report("Distance")},Xe.prototype.checkArea=function(){var t=this._input.getArea(),e=this._result.getArea();this._distance>0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t<e&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")},Xe.prototype.checkPolygonal=function(){this._result instanceof Ne||this._result instanceof mi||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")},Xe.prototype.getErrorIndicator=function(){return this._errorIndicator},Xe.prototype.getErrorLocation=function(){return this._errorLocation},Xe.prototype.checkExpectedEmpty=function(){if(this._input.getDimension()>=2||this._distance>0)return null;this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),this.report("ExpectedEmpty")},Xe.prototype.report=function(t){if(!Xe.VERBOSE)return null;Ve.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))},Xe.prototype.getErrorMessage=function(){return this._errorMsg},Xe.prototype.interfaces_=function(){return[]},Xe.prototype.getClass=function(){return Xe},Xe.isValidMsg=function(t,e,n){var i=new Xe(t,e,n);return i.isValid()?null:i.getErrorMessage()},Xe.isValid=function(t,e,n){var i=new Xe(t,e,n);return!!i.isValid()},Zf.VERBOSE.get=function(){return!1},Zf.MAX_ENV_DIFF_FRAC.get=function(){return .012},Object.defineProperties(Xe,Zf);var ti=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};ti.prototype.getCoordinates=function(){return this._pts},ti.prototype.size=function(){return this._pts.length},ti.prototype.getCoordinate=function(t){return this._pts[t]},ti.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},ti.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:Ua.octant(this.getCoordinate(t),this.getCoordinate(t+1))},ti.prototype.setData=function(t){this._data=t},ti.prototype.getData=function(){return this._data},ti.prototype.toString=function(){return Sn.toLineString(new ye(this._pts))},ti.prototype.interfaces_=function(){return[yi]},ti.prototype.getClass=function(){return ti};var Ae=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new Z,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};Ae.prototype.getInteriorIntersection=function(){return this._interiorIntersection},Ae.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},Ae.prototype.getIntersectionSegments=function(){return this._intSegments},Ae.prototype.count=function(){return this._intersectionCount},Ae.prototype.getIntersections=function(){return this._intersections},Ae.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Ae.prototype.setKeepIntersections=function(t){this._keepIntersections=t},Ae.prototype.processIntersections=function(t,e,n,i){if(!this._findAllIntersections&&this.hasIntersection()||t===n&&e===i)return null;if(this._isCheckEndSegmentsOnly){var s=this.isEndSegment(t,e)||this.isEndSegment(n,i);if(!s)return null}var a=t.getCoordinates()[e],o=t.getCoordinates()[e+1],l=n.getCoordinates()[i],u=n.getCoordinates()[i+1];this._li.computeIntersection(a,o,l,u),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=a,this._intSegments[1]=o,this._intSegments[2]=l,this._intSegments[3]=u,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},Ae.prototype.isEndSegment=function(t,e){return e===0||e>=t.size()-2},Ae.prototype.hasIntersection=function(){return this._interiorIntersection!==null},Ae.prototype.isDone=function(){return this._findAllIntersections?!1:this._interiorIntersection!==null},Ae.prototype.interfaces_=function(){return[na]},Ae.prototype.getClass=function(){return Ae},Ae.createAllIntersectionsFinder=function(t){var e=new Ae(t);return e.setFindAllIntersections(!0),e},Ae.createAnyIntersectionFinder=function(t){return new Ae(t)},Ae.createIntersectionCounter=function(t){var e=new Ae(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var Dn=function(){this._li=new Zs,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};Dn.prototype.execute=function(){if(this._segInt!==null)return null;this.checkInteriorIntersections()},Dn.prototype.getIntersections=function(){return this._segInt.getIntersections()},Dn.prototype.isValid=function(){return this.execute(),this._isValid},Dn.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Dn.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new Ae(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new Jf;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},Dn.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Xi(this.getErrorMessage(),this._segInt.getInteriorIntersection())},Dn.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+Sn.toLineString(t[0],t[1])+" and "+Sn.toLineString(t[2],t[3])},Dn.prototype.interfaces_=function(){return[]},Dn.prototype.getClass=function(){return Dn},Dn.computeIntersections=function(t){var e=new Dn(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var aa=function r(){this._nv=null;var t=arguments[0];this._nv=new Dn(r.toSegmentStrings(t))};aa.prototype.checkValid=function(){this._nv.checkValid()},aa.prototype.interfaces_=function(){return[]},aa.prototype.getClass=function(){return aa},aa.toSegmentStrings=function(t){for(var e=new Z,n=t.iterator();n.hasNext();){var i=n.next();e.add(new ti(i.getCoordinates(),i))}return e},aa.checkValid=function(t){var e=new aa(t);e.checkValid()};var Ka=function(t){this._mapOp=t};Ka.prototype.map=function(t){for(var e=this,n=new Z,i=0;i<t.getNumGeometries();i++){var s=e._mapOp.map(t.getGeometryN(i));s.isEmpty()||n.add(s)}return t.getFactory().createGeometryCollection(Dt.toGeometryArray(n))},Ka.prototype.interfaces_=function(){return[]},Ka.prototype.getClass=function(){return Ka},Ka.map=function(t,e){var n=new Ka(e);return n.map(t)};var ei=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new Z,this._resultLineList=new Z;var t=arguments[0],e=arguments[1],n=arguments[2];this._op=t,this._geometryFactory=e,this._ptLocator=n};ei.prototype.collectLines=function(t){for(var e=this,n=this._op.getGraph().getEdgeEnds().iterator();n.hasNext();){var i=n.next();e.collectLineEdge(i,t,e._lineEdgesList),e.collectBoundaryTouchEdge(i,t,e._lineEdgesList)}},ei.prototype.labelIsolatedLine=function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._op.getArgGeometry(e));t.getLabel().setLocation(e,n)},ei.prototype.build=function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this._resultLineList},ei.prototype.collectLineEdge=function(t,e,n){var i=t.getLabel(),s=t.getEdge();t.isLineEdge()&&!t.isVisited()&&Ct.isResultOfOp(i,e)&&!s.isCovered()&&(n.add(s),t.setVisitedEdge(!0))},ei.prototype.findCoveredLineEdges=function(){for(var t=this,e=this._op.getGraph().getNodes().iterator();e.hasNext();){var n=e.next();n.getEdges().findCoveredLineEdges()}for(var i=this._op.getGraph().getEdgeEnds().iterator();i.hasNext();){var s=i.next(),a=s.getEdge();if(s.isLineEdge()&&!a.isCoveredSet()){var o=t._op.isCoveredByA(s.getCoordinate());a.setCovered(o)}}},ei.prototype.labelIsolatedLines=function(t){for(var e=this,n=t.iterator();n.hasNext();){var i=n.next(),s=i.getLabel();i.isIsolated()&&(s.isNull(0)?e.labelIsolatedLine(i,0):e.labelIsolatedLine(i,1))}},ei.prototype.buildLines=function(t){for(var e=this,n=this._lineEdgesList.iterator();n.hasNext();){var i=n.next(),s=e._geometryFactory.createLineString(i.getCoordinates());e._resultLineList.add(s),i.setInResult(!0)}},ei.prototype.collectBoundaryTouchEdge=function(t,e,n){var i=t.getLabel();if(t.isLineEdge()||t.isVisited()||t.isInteriorAreaEdge()||t.getEdge().isInResult())return null;Mt.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),Ct.isResultOfOp(i,e)&&e===Ct.INTERSECTION&&(n.add(t.getEdge()),t.setVisitedEdge(!0))},ei.prototype.interfaces_=function(){return[]},ei.prototype.getClass=function(){return ei};var Qa=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new Z;var t=arguments[0],e=arguments[1];this._op=t,this._geometryFactory=e};Qa.prototype.filterCoveredNodeToPoint=function(t){var e=t.getCoordinate();if(!this._op.isCoveredByLA(e)){var n=this._geometryFactory.createPoint(e);this._resultPointList.add(n)}},Qa.prototype.extractNonCoveredResultNodes=function(t){for(var e=this,n=this._op.getGraph().getNodes().iterator();n.hasNext();){var i=n.next();if(!i.isInResult()&&!i.isIncidentEdgeInResult()&&(i.getEdges().getDegree()===0||t===Ct.INTERSECTION)){var s=i.getLabel();Ct.isResultOfOp(s,t)&&e.filterCoveredNodeToPoint(i)}}},Qa.prototype.build=function(t){return this.extractNonCoveredResultNodes(t),this._resultPointList},Qa.prototype.interfaces_=function(){return[]},Qa.prototype.getClass=function(){return Qa};var gr=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};gr.prototype.transformPoint=function(t,e){return this._factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))},gr.prototype.transformPolygon=function(t,e){var n=this,i=!0,s=this.transformLinearRing(t.getExteriorRing(),t);(s===null||!(s instanceof gi)||s.isEmpty())&&(i=!1);for(var a=new Z,o=0;o<t.getNumInteriorRing();o++){var l=n.transformLinearRing(t.getInteriorRingN(o),t);l===null||l.isEmpty()||(l instanceof gi||(i=!1),a.add(l))}if(i)return this._factory.createPolygon(s,a.toArray([]));var u=new Z;return s!==null&&u.add(s),u.addAll(a),this._factory.buildGeometry(u)},gr.prototype.createCoordinateSequence=function(t){return this._factory.getCoordinateSequenceFactory().create(t)},gr.prototype.getInputGeometry=function(){return this._inputGeom},gr.prototype.transformMultiLineString=function(t,e){for(var n=this,i=new Z,s=0;s<t.getNumGeometries();s++){var a=n.transformLineString(t.getGeometryN(s),t);a!==null&&(a.isEmpty()||i.add(a))}return this._factory.buildGeometry(i)},gr.prototype.transformCoordinates=function(t,e){return this.copy(t)},gr.prototype.transformLineString=function(t,e){return this._factory.createLineString(this.transformCoordinates(t.getCoordinateSequence(),t))},gr.prototype.transformMultiPoint=function(t,e){for(var n=this,i=new Z,s=0;s<t.getNumGeometries();s++){var a=n.transformPoint(t.getGeometryN(s),t);a!==null&&(a.isEmpty()||i.add(a))}return this._factory.buildGeometry(i)},gr.prototype.transformMultiPolygon=function(t,e){for(var n=this,i=new Z,s=0;s<t.getNumGeometries();s++){var a=n.transformPolygon(t.getGeometryN(s),t);a!==null&&(a.isEmpty()||i.add(a))}return this._factory.buildGeometry(i)},gr.prototype.copy=function(t){return t.copy()},gr.prototype.transformGeometryCollection=function(t,e){for(var n=this,i=new Z,s=0;s<t.getNumGeometries();s++){var a=n.transform(t.getGeometryN(s));a!==null&&(n._pruneEmptyGeometry&&a.isEmpty()||i.add(a))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(Dt.toGeometryArray(i)):this._factory.buildGeometry(i)},gr.prototype.transform=function(t){if(this._inputGeom=t,this._factory=t.getFactory(),t instanceof Mr)return this.transformPoint(t,null);if(t instanceof iu)return this.transformMultiPoint(t,null);if(t instanceof gi)return this.transformLinearRing(t,null);if(t instanceof pe)return this.transformLineString(t,null);if(t instanceof ta)return this.transformMultiLineString(t,null);if(t instanceof Ne)return this.transformPolygon(t,null);if(t instanceof mi)return this.transformMultiPolygon(t,null);if(t instanceof er)return this.transformGeometryCollection(t,null);throw new oe("Unknown Geometry subtype: "+t.getClass().getName())},gr.prototype.transformLinearRing=function(t,e){var n=this.transformCoordinates(t.getCoordinateSequence(),t);if(n===null)return this._factory.createLinearRing(null);var i=n.size();return i>0&&i<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)},gr.prototype.interfaces_=function(){return[]},gr.prototype.getClass=function(){return gr};var Pi=function r(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new pt,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof pe&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];r.call(this,t.getCoordinates(),e)}else if(arguments[0]instanceof Array&&typeof arguments[1]=="number"){var n=arguments[0],i=arguments[1];this._srcPts=n,this._isClosed=r.isClosed(n),this._snapTolerance=i}};Pi.prototype.snapVertices=function(t,e){for(var n=this,i=this._isClosed?t.size()-1:t.size(),s=0;s<i;s++){var a=t.get(s),o=n.findSnapForVertex(a,e);o!==null&&(t.set(s,new L(o)),s===0&&n._isClosed&&t.set(t.size()-1,new L(o)))}},Pi.prototype.findSnapForVertex=function(t,e){for(var n=this,i=0;i<e.length;i++){if(t.equals2D(e[i]))return null;if(t.distance(e[i])<n._snapTolerance)return e[i]}return null},Pi.prototype.snapTo=function(t){var e=new Ku(this._srcPts);this.snapVertices(e,t),this.snapSegments(e,t);var n=e.toCoordinateArray();return n},Pi.prototype.snapSegments=function(t,e){var n=this;if(e.length===0)return null;var i=e.length;e[0].equals2D(e[e.length-1])&&(i=e.length-1);for(var s=0;s<i;s++){var a=e[s],o=n.findSegmentIndexToSnap(a,t);o>=0&&t.add(o+1,new L(a),!1)}},Pi.prototype.findSegmentIndexToSnap=function(t,e){for(var n=this,i=wt.MAX_VALUE,s=-1,a=0;a<e.size()-1;a++){if(n._seg.p0=e.get(a),n._seg.p1=e.get(a+1),n._seg.p0.equals2D(t)||n._seg.p1.equals2D(t)){if(n._allowSnappingToSourceVertices)continue;return-1}var o=n._seg.distance(t);o<n._snapTolerance&&o<i&&(i=o,s=a)}return s},Pi.prototype.setAllowSnappingToSourceVertices=function(t){this._allowSnappingToSourceVertices=t},Pi.prototype.interfaces_=function(){return[]},Pi.prototype.getClass=function(){return Pi},Pi.isClosed=function(t){return t.length<=1?!1:t[0].equals2D(t[t.length-1])};var we=function(t){this._srcGeom=t||null},bg={SNAP_PRECISION_FACTOR:{configurable:!0}};we.prototype.snapTo=function(t,e){var n=this.extractTargetCoordinates(t),i=new Tg(e,n);return i.transform(this._srcGeom)},we.prototype.snapToSelf=function(t,e){var n=this.extractTargetCoordinates(this._srcGeom),i=new Tg(t,n,!0),s=i.transform(this._srcGeom),a=s;return e&&_t(a,ys)&&(a=s.buffer(0)),a},we.prototype.computeSnapTolerance=function(t){var e=this.computeMinimumSegmentLength(t),n=e/10;return n},we.prototype.extractTargetCoordinates=function(t){for(var e=new Wn,n=t.getCoordinates(),i=0;i<n.length;i++)e.add(n[i]);return e.toArray(new Array(0).fill(null))},we.prototype.computeMinimumSegmentLength=function(t){for(var e=wt.MAX_VALUE,n=0;n<t.length-1;n++){var i=t[n].distance(t[n+1]);i<e&&(e=i)}return e},we.prototype.interfaces_=function(){return[]},we.prototype.getClass=function(){return we},we.snap=function(t,e,n){var i=new Array(2).fill(null),s=new we(t);i[0]=s.snapTo(e,n);var a=new we(e);return i[1]=a.snapTo(i[0],n),i},we.computeOverlaySnapTolerance=function(){if(arguments.length===1){var t=arguments[0],e=we.computeSizeBasedSnapTolerance(t),n=t.getPrecisionModel();if(n.getType()===Ut.FIXED){var i=1/n.getScale()*2/1.415;i>e&&(e=i)}return e}else if(arguments.length===2){var s=arguments[0],a=arguments[1];return Math.min(we.computeOverlaySnapTolerance(s),we.computeOverlaySnapTolerance(a))}},we.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal(),n=Math.min(e.getHeight(),e.getWidth()),i=n*we.SNAP_PRECISION_FACTOR;return i},we.snapToSelf=function(t,e,n){var i=new we(t);return i.snapToSelf(e,n)},bg.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(we,bg);var Tg=function(r){function t(e,n,i){r.call(this),this._snapTolerance=e||null,this._snapPts=n||null,this._isSelfSnap=i!==void 0?i:!1}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.snapLine=function(n,i){var s=new Pi(n,this._snapTolerance);return s.setAllowSnappingToSourceVertices(this._isSelfSnap),s.snapTo(i)},t.prototype.transformCoordinates=function(n,i){var s=n.toCoordinateArray(),a=this.snapLine(s,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(a)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(gr),or=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};or.prototype.getCommon=function(){return wt.longBitsToDouble(this._commonBits)},or.prototype.add=function(t){var e=wt.doubleToLongBits(t);if(this._isFirst)return this._commonBits=e,this._commonSignExp=or.signExpBits(this._commonBits),this._isFirst=!1,null;var n=or.signExpBits(e);if(n!==this._commonSignExp)return this._commonBits=0,null;this._commonMantissaBitsCount=or.numCommonMostSigMantissaBits(this._commonBits,e),this._commonBits=or.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))},or.prototype.toString=function(){if(arguments.length===1){var t=arguments[0],e=wt.longBitsToDouble(t),n=wt.toBinaryString(t),i="0000000000000000000000000000000000000000000000000000000000000000"+n,s=i.substring(i.length-64),a=s.substring(0,1)+" "+s.substring(1,12)+"(exp) "+s.substring(12)+" [ "+e+" ]";return a}},or.prototype.interfaces_=function(){return[]},or.prototype.getClass=function(){return or},or.getBit=function(t,e){var n=1<<e;return(t&n)!==0?1:0},or.signExpBits=function(t){return t>>52},or.zeroLowerBits=function(t,e){var n=(1<<e)-1,i=~n,s=t&i;return s},or.numCommonMostSigMantissaBits=function(t,e){for(var n=0,i=52;i>=0;i--){if(or.getBit(t,i)!==or.getBit(e,i))return n;n++}return 52};var Ms=function(){this._commonCoord=null,this._ccFilter=new Ba},$f={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};Ms.prototype.addCommonBits=function(t){var e=new Ns(this._commonCoord);t.apply(e),t.geometryChanged()},Ms.prototype.removeCommonBits=function(t){if(this._commonCoord.x===0&&this._commonCoord.y===0)return t;var e=new L(this._commonCoord);e.x=-e.x,e.y=-e.y;var n=new Ns(e);return t.apply(n),t.geometryChanged(),t},Ms.prototype.getCommonCoordinate=function(){return this._commonCoord},Ms.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},Ms.prototype.interfaces_=function(){return[]},Ms.prototype.getClass=function(){return Ms},$f.CommonCoordinateFilter.get=function(){return Ba},$f.Translater.get=function(){return Ns},Object.defineProperties(Ms,$f);var Ba=function(){this._commonBitsX=new or,this._commonBitsY=new or};Ba.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},Ba.prototype.getCommonCoordinate=function(){return new L(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},Ba.prototype.interfaces_=function(){return[pi]},Ba.prototype.getClass=function(){return Ba};var Ns=function(){this.trans=null;var t=arguments[0];this.trans=t};Ns.prototype.filter=function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,i=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,i)},Ns.prototype.isDone=function(){return!1},Ns.prototype.isGeometryChanged=function(){return!0},Ns.prototype.interfaces_=function(){return[In]},Ns.prototype.getClass=function(){return Ns};var Le=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};Le.prototype.selfSnap=function(t){var e=new we(t),n=e.snapTo(t,this._snapTolerance);return n},Le.prototype.removeCommonBits=function(t){this._cbr=new Ms,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},Le.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},Le.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),n=Ct.overlayOp(e[0],e[1],t);return this.prepareResult(n)},Le.prototype.checkValid=function(t){t.isValid()||Ve.out.println("Snapped geometry is invalid")},Le.prototype.computeSnapTolerance=function(){this._snapTolerance=we.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},Le.prototype.snap=function(t){var e=this.removeCommonBits(t),n=we.snap(e[0],e[1],this._snapTolerance);return n},Le.prototype.interfaces_=function(){return[]},Le.prototype.getClass=function(){return Le},Le.overlayOp=function(t,e,n){var i=new Le(t,e);return i.getResultGeometry(n)},Le.union=function(t,e){return Le.overlayOp(t,e,Ct.UNION)},Le.intersection=function(t,e){return Le.overlayOp(t,e,Ct.INTERSECTION)},Le.symDifference=function(t,e){return Le.overlayOp(t,e,Ct.SYMDIFFERENCE)},Le.difference=function(t,e){return Le.overlayOp(t,e,Ct.DIFFERENCE)};var lr=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};lr.prototype.getResultGeometry=function(t){var e=null,n=!1,i=null;try{e=Ct.overlayOp(this._geom[0],this._geom[1],t);var s=!0;s&&(n=!0)}catch(a){if(a instanceof zi)i=a;else throw a}finally{}if(!n)try{e=Le.overlayOp(this._geom[0],this._geom[1],t)}catch(a){throw a instanceof zi?i:a}finally{}return e},lr.prototype.interfaces_=function(){return[]},lr.prototype.getClass=function(){return lr},lr.overlayOp=function(t,e,n){var i=new lr(t,e);return i.getResultGeometry(n)},lr.union=function(t,e){return lr.overlayOp(t,e,Ct.UNION)},lr.intersection=function(t,e){return lr.overlayOp(t,e,Ct.INTERSECTION)},lr.symDifference=function(t,e){return lr.overlayOp(t,e,Ct.SYMDIFFERENCE)},lr.difference=function(t,e){return lr.overlayOp(t,e,Ct.DIFFERENCE)};var uh=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};uh.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},uh.prototype.interfaces_=function(){return[]},uh.prototype.getClass=function(){return uh};var Dr=function r(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,arguments.length===2){var t=arguments[0],e=arguments[1];this._eventType=r.DELETE,this._xValue=t,this._insertEvent=e}else if(arguments.length===3){var n=arguments[0],i=arguments[1],s=arguments[2];this._eventType=r.INSERT,this._label=n,this._xValue=i,this._obj=s}},jf={INSERT:{configurable:!0},DELETE:{configurable:!0}};Dr.prototype.isDelete=function(){return this._eventType===Dr.DELETE},Dr.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},Dr.prototype.getObject=function(){return this._obj},Dr.prototype.compareTo=function(t){var e=t;return this._xValue<e._xValue?-1:this._xValue>e._xValue?1:this._eventType<e._eventType?-1:this._eventType>e._eventType?1:0},Dr.prototype.getInsertEvent=function(){return this._insertEvent},Dr.prototype.isInsert=function(){return this._eventType===Dr.INSERT},Dr.prototype.isSameLabel=function(t){return this._label===null?!1:this._label===t._label},Dr.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},Dr.prototype.interfaces_=function(){return[Zr]},Dr.prototype.getClass=function(){return Dr},jf.INSERT.get=function(){return 1},jf.DELETE.get=function(){return 2},Object.defineProperties(Dr,jf);var _c=function(){};_c.prototype.interfaces_=function(){return[]},_c.prototype.getClass=function(){return _c};var Ye=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=n};Ye.prototype.isTrivialIntersection=function(t,e,n,i){if(t===n&&this._li.getIntersectionNum()===1){if(Ye.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var s=t.getNumPoints()-1;if(e===0&&i===s||i===0&&e===s)return!0}}return!1},Ye.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Ye.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},Ye.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Ye.prototype.isBoundaryPointInternal=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next(),s=i.getCoordinate();if(t.isIntersection(s))return!0}return!1},Ye.prototype.hasProperIntersection=function(){return this._hasProper},Ye.prototype.hasIntersection=function(){return this._hasIntersection},Ye.prototype.isDone=function(){return this._isDone},Ye.prototype.isBoundaryPoint=function(t,e){return e===null?!1:!!(this.isBoundaryPointInternal(t,e[0])||this.isBoundaryPointInternal(t,e[1]))},Ye.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},Ye.prototype.addIntersections=function(t,e,n,i){if(t===n&&e===i)return null;this.numTests++;var s=t.getCoordinates()[e],a=t.getCoordinates()[e+1],o=n.getCoordinates()[i],l=n.getCoordinates()[i+1];this._li.computeIntersection(s,a,o,l),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,i)||(this._hasIntersection=!0,(this._includeProper||!this._li.isProper())&&(t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},Ye.prototype.interfaces_=function(){return[]},Ye.prototype.getClass=function(){return Ye},Ye.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var D_=function(r){function t(){r.call(this),this.events=new Z,this.nOverlaps=null}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.prepareEvents=function(){var n=this;Nn.sort(this.events);for(var i=0;i<this.events.size();i++){var s=n.events.get(i);s.isDelete()&&s.getInsertEvent().setDeleteEventIndex(i)}},t.prototype.computeIntersections=function(){var n=this;if(arguments.length===1){var i=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var s=0;s<this.events.size();s++){var a=n.events.get(s);if(a.isInsert()&&n.processOverlaps(s,a.getDeleteEventIndex(),a,i),i.isDone())break}}else if(arguments.length===3){if(arguments[2]instanceof Ye&&_t(arguments[0],Pn)&&_t(arguments[1],Pn)){var o=arguments[0],l=arguments[1],u=arguments[2];this.addEdges(o,o),this.addEdges(l,l),this.computeIntersections(u)}else if(typeof arguments[2]=="boolean"&&_t(arguments[0],Pn)&&arguments[1]instanceof Ye){var c=arguments[0],h=arguments[1],f=arguments[2];f?this.addEdges(c,null):this.addEdges(c),this.computeIntersections(h)}}},t.prototype.addEdge=function(n,i){for(var s=this,a=n.getMonotoneChainEdge(),o=a.getStartIndexes(),l=0;l<o.length-1;l++){var u=new uh(a,l),c=new Dr(i,a.getMinX(l),u);s.events.add(c),s.events.add(new Dr(a.getMaxX(l),c))}},t.prototype.processOverlaps=function(n,i,s,a){for(var o=this,l=s.getObject(),u=n;u<i;u++){var c=o.events.get(u);if(c.isInsert()){var h=c.getObject();s.isSameLabel(c)||(l.computeIntersections(h,a),o.nOverlaps++)}}},t.prototype.addEdges=function(){var n=this;if(arguments.length===1)for(var i=arguments[0],s=i.iterator();s.hasNext();){var a=s.next();n.addEdge(a,a)}else if(arguments.length===2)for(var o=arguments[0],l=arguments[1],u=o.iterator();u.hasNext();){var c=u.next();n.addEdge(c,l)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(_c),Ci=function(){this._min=wt.POSITIVE_INFINITY,this._max=wt.NEGATIVE_INFINITY},Dg={NodeComparator:{configurable:!0}};Ci.prototype.getMin=function(){return this._min},Ci.prototype.intersects=function(t,e){return!(this._min>e||this._max<t)},Ci.prototype.getMax=function(){return this._max},Ci.prototype.toString=function(){return Sn.toLineString(new L(this._min,0),new L(this._max,0))},Ci.prototype.interfaces_=function(){return[]},Ci.prototype.getClass=function(){return Ci},Dg.NodeComparator.get=function(){return hh},Object.defineProperties(Ci,Dg);var hh=function(){};hh.prototype.compare=function(t,e){var n=t,i=e,s=(n._min+n._max)/2,a=(i._min+i._max)/2;return s<a?-1:s>a?1:0},hh.prototype.interfaces_=function(){return[Jl]},hh.prototype.getClass=function(){return hh};var x_=function(r){function t(){r.call(this),this._item=null;var e=arguments[0],n=arguments[1],i=arguments[2];this._min=e,this._max=n,this._item=i}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.query=function(n,i,s){if(!this.intersects(n,i))return null;s.visitItem(this._item)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Ci),O_=function(r){function t(){r.call(this),this._node1=null,this._node2=null;var e=arguments[0],n=arguments[1];this._node1=e,this._node2=n,this.buildExtent(this._node1,this._node2)}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.buildExtent=function(n,i){this._min=Math.min(n._min,i._min),this._max=Math.max(n._max,i._max)},t.prototype.query=function(n,i,s){if(!this.intersects(n,i))return null;this._node1!==null&&this._node1.query(n,i,s),this._node2!==null&&this._node2.query(n,i,s)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Ci),Ii=function(){this._leaves=new Z,this._root=null,this._level=0};Ii.prototype.buildTree=function(){var t=this;Nn.sort(this._leaves,new Ci.NodeComparator);for(var e=this._leaves,n=null,i=new Z;;){if(t.buildLevel(e,i),i.size()===1)return i.get(0);n=e,e=i,i=n}},Ii.prototype.insert=function(t,e,n){if(this._root!==null)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new x_(t,e,n))},Ii.prototype.query=function(t,e,n){this.init(),this._root.query(t,e,n)},Ii.prototype.buildRoot=function(){if(this._root!==null)return null;this._root=this.buildTree()},Ii.prototype.printNode=function(t){Ve.out.println(Sn.toLineString(new L(t._min,this._level),new L(t._max,this._level)))},Ii.prototype.init=function(){if(this._root!==null)return null;this.buildRoot()},Ii.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var n=0;n<t.size();n+=2){var i=t.get(n),s=n+1<t.size()?t.get(n):null;if(s===null)e.add(i);else{var a=new O_(t.get(n),t.get(n+1));e.add(a)}}},Ii.prototype.interfaces_=function(){return[]},Ii.prototype.getClass=function(){return Ii};var cu=function(){this._items=new Z};cu.prototype.visitItem=function(t){this._items.add(t)},cu.prototype.getItems=function(){return this._items},cu.prototype.interfaces_=function(){return[_s]},cu.prototype.getClass=function(){return cu};var fu=function(){this._index=null;var t=arguments[0];if(!_t(t,ys))throw new oe("Argument must be Polygonal");this._index=new oa(t)},td={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};fu.prototype.locate=function(t){var e=new qn(t),n=new du(e);return this._index.query(t.y,t.y,n),e.getLocation()},fu.prototype.interfaces_=function(){return[lu]},fu.prototype.getClass=function(){return fu},td.SegmentVisitor.get=function(){return du},td.IntervalIndexedGeometry.get=function(){return oa},Object.defineProperties(fu,td);var du=function(){this._counter=null;var t=arguments[0];this._counter=t};du.prototype.visitItem=function(t){var e=t;this._counter.countSegment(e.getCoordinate(0),e.getCoordinate(1))},du.prototype.interfaces_=function(){return[_s]},du.prototype.getClass=function(){return du};var oa=function(){this._index=new Ii;var t=arguments[0];this.init(t)};oa.prototype.init=function(t){for(var e=this,n=We.getLines(t),i=n.iterator();i.hasNext();){var s=i.next(),a=s.getCoordinates();e.addLine(a)}},oa.prototype.addLine=function(t){for(var e=this,n=1;n<t.length;n++){var i=new pt(t[n-1],t[n]),s=Math.min(i.p0.y,i.p1.y),a=Math.max(i.p0.y,i.p1.y);e._index.insert(s,a,i)}},oa.prototype.query=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new cu;return this._index.query(t,e,n),n.getItems()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],a=arguments[2];this._index.query(i,s,a)}},oa.prototype.interfaces_=function(){return[]},oa.prototype.getClass=function(){return oa};var ch=function(r){function t(){if(r.call(this),this._parentGeom=null,this._lineEdgeMap=new cg,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new Tn,arguments.length===2){var e=arguments[0],n=arguments[1],i=jr.OGC_SFS_BOUNDARY_RULE;this._argIndex=e,this._parentGeom=n,this._boundaryNodeRule=i,n!==null&&this.add(n)}else if(arguments.length===3){var s=arguments[0],a=arguments[1],o=arguments[2];this._argIndex=s,this._parentGeom=a,this._boundaryNodeRule=o,a!==null&&this.add(a)}}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.insertBoundaryPoint=function(n,i){var s=this._nodes.addNode(i),a=s.getLabel(),o=1,l=F.NONE;l=a.getLocation(n,K.ON),l===F.BOUNDARY&&o++;var u=t.determineBoundary(this._boundaryNodeRule,o);a.setLocation(n,u)},t.prototype.computeSelfNodes=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.computeSelfNodes(n,i,!1)}else if(arguments.length===3){var s=arguments[0],a=arguments[1],o=arguments[2],l=new Ye(s,!0,!1);l.setIsDoneIfProperInt(o);var u=this.createEdgeSetIntersector(),c=this._parentGeom instanceof gi||this._parentGeom instanceof Ne||this._parentGeom instanceof mi,h=a||!c;return u.computeIntersections(this._edges,l,h),this.addSelfIntersectionNodes(this._argIndex),l}},t.prototype.computeSplitEdges=function(n){for(var i=this._edges.iterator();i.hasNext();){var s=i.next();s.eiList.addSplitEdges(n)}},t.prototype.computeEdgeIntersections=function(n,i,s){var a=new Ye(i,s,!0);a.setBoundaryNodes(this.getBoundaryNodes(),n.getBoundaryNodes());var o=this.createEdgeSetIntersector();return o.computeIntersections(this._edges,n._edges,a),a},t.prototype.getGeometry=function(){return this._parentGeom},t.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},t.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},t.prototype.addPoint=function(){if(arguments[0]instanceof Mr){var n=arguments[0],i=n.getCoordinate();this.insertPoint(this._argIndex,i,F.INTERIOR)}else if(arguments[0]instanceof L){var s=arguments[0];this.insertPoint(this._argIndex,s,F.INTERIOR)}},t.prototype.addPolygon=function(n){var i=this;this.addPolygonRing(n.getExteriorRing(),F.EXTERIOR,F.INTERIOR);for(var s=0;s<n.getNumInteriorRing();s++){var a=n.getInteriorRingN(s);i.addPolygonRing(a,F.INTERIOR,F.EXTERIOR)}},t.prototype.addEdge=function(n){this.insertEdge(n);var i=n.getCoordinates();this.insertPoint(this._argIndex,i[0],F.BOUNDARY),this.insertPoint(this._argIndex,i[i.length-1],F.BOUNDARY)},t.prototype.addLineString=function(n){var i=Tt.removeRepeatedPoints(n.getCoordinates());if(i.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;var s=new yc(i,new Jt(this._argIndex,F.INTERIOR));this._lineEdgeMap.put(n,s),this.insertEdge(s),Mt.isTrue(i.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,i[0]),this.insertBoundaryPoint(this._argIndex,i[i.length-1])},t.prototype.getInvalidPoint=function(){return this._invalidPoint},t.prototype.getBoundaryPoints=function(){for(var n=this.getBoundaryNodes(),i=new Array(n.size()).fill(null),s=0,a=n.iterator();a.hasNext();){var o=a.next();i[s++]=o.getCoordinate().copy()}return i},t.prototype.getBoundaryNodes=function(){return this._boundaryNodes===null&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},t.prototype.addSelfIntersectionNode=function(n,i,s){if(this.isBoundaryNode(n,i))return null;s===F.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(n,i):this.insertPoint(n,i,s)},t.prototype.addPolygonRing=function(n,i,s){if(n.isEmpty())return null;var a=Tt.removeRepeatedPoints(n.getCoordinates());if(a.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=a[0],null;var o=i,l=s;et.isCCW(a)&&(o=s,l=i);var u=new yc(a,new Jt(this._argIndex,F.BOUNDARY,o,l));this._lineEdgeMap.put(n,u),this.insertEdge(u),this.insertPoint(this._argIndex,a[0],F.BOUNDARY)},t.prototype.insertPoint=function(n,i,s){var a=this._nodes.addNode(i),o=a.getLabel();o===null?a._label=new Jt(n,s):o.setLocation(n,s)},t.prototype.createEdgeSetIntersector=function(){return new D_},t.prototype.addSelfIntersectionNodes=function(n){for(var i=this,s=this._edges.iterator();s.hasNext();)for(var a=s.next(),o=a.getLabel().getLocation(n),l=a.eiList.iterator();l.hasNext();){var u=l.next();i.addSelfIntersectionNode(n,u.coord,o)}},t.prototype.add=function(){if(arguments.length===1){var n=arguments[0];if(n.isEmpty())return null;if(n instanceof mi&&(this._useBoundaryDeterminationRule=!1),n instanceof Ne)this.addPolygon(n);else if(n instanceof pe)this.addLineString(n);else if(n instanceof Mr)this.addPoint(n);else if(n instanceof iu)this.addCollection(n);else if(n instanceof ta)this.addCollection(n);else if(n instanceof mi)this.addCollection(n);else if(n instanceof er)this.addCollection(n);else throw new Error(n.getClass().getName())}else return r.prototype.add.apply(this,arguments)},t.prototype.addCollection=function(n){for(var i=this,s=0;s<n.getNumGeometries();s++){var a=n.getGeometryN(s);i.add(a)}},t.prototype.locate=function(n){return _t(this._parentGeom,ys)&&this._parentGeom.getNumGeometries()>50?(this._areaPtLocator===null&&(this._areaPtLocator=new fu(this._parentGeom)),this._areaPtLocator.locate(n)):this._ptLocator.locate(n,this._parentGeom)},t.prototype.findEdge=function(){if(arguments.length===1){var n=arguments[0];return this._lineEdgeMap.get(n)}else return r.prototype.findEdge.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.determineBoundary=function(n,i){return n.isInBoundary(i)?F.BOUNDARY:F.INTERIOR},t}(fe),pu=function(){if(this._li=new Zs,this._resultPrecisionModel=null,this._arg=null,arguments.length===1){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new ch(0,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],i=jr.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new ch(0,e,i),this._arg[1]=new ch(1,n,i)}else if(arguments.length===3){var s=arguments[0],a=arguments[1],o=arguments[2];s.getPrecisionModel().compareTo(a.getPrecisionModel())>=0?this.setComputationPrecision(s.getPrecisionModel()):this.setComputationPrecision(a.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new ch(0,s,o),this._arg[1]=new ch(1,a,o)}};pu.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},pu.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},pu.prototype.interfaces_=function(){return[]},pu.prototype.getClass=function(){return pu};var la=function(){};la.prototype.interfaces_=function(){return[]},la.prototype.getClass=function(){return la},la.map=function(){if(arguments[0]instanceof yt&&_t(arguments[1],la.MapOp)){for(var t=arguments[0],e=arguments[1],n=new Z,i=0;i<t.getNumGeometries();i++){var s=e.map(t.getGeometryN(i));s!==null&&n.add(s)}return t.getFactory().buildGeometry(n)}else if(_t(arguments[0],Me)&&_t(arguments[1],la.MapOp)){for(var a=arguments[0],o=arguments[1],l=new Z,u=a.iterator();u.hasNext();){var c=u.next(),h=o.map(c);h!==null&&l.add(h)}return l}},la.MapOp=function(){};var Ct=function(r){function t(){var e=arguments[0],n=arguments[1];r.call(this,e,n),this._ptLocator=new Tn,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new bn,this._resultPolyList=new Z,this._resultLineList=new Z,this._resultPointList=new Z,this._graph=new fe(new Eg),this._geomFact=e.getFactory()}return r&&(t.__proto__=r),t.prototype=Object.create(r&&r.prototype),t.prototype.constructor=t,t.prototype.insertUniqueEdge=function(n){var i=this._edgeList.findEqualEdge(n);if(i!==null){var s=i.getLabel(),a=n.getLabel();i.isPointwiseEqual(n)||(a=new Jt(n.getLabel()),a.flip());var o=i.getDepth();o.isNull()&&o.add(s),o.add(a),s.merge(a)}else this._edgeList.add(n)},t.prototype.getGraph=function(){return this._graph},t.prototype.cancelDuplicateResultEdges=function(){for(var n=this._graph.getEdgeEnds().iterator();n.hasNext();){var i=n.next(),s=i.getSym();i.isInResult()&&s.isInResult()&&(i.setInResult(!1),s.setInResult(!1))}},t.prototype.isCoveredByLA=function(n){return!!(this.isCovered(n,this._resultLineList)||this.isCovered(n,this._resultPolyList))},t.prototype.computeGeometry=function(n,i,s,a){var o=new Z;return o.addAll(n),o.addAll(i),o.addAll(s),o.isEmpty()?t.createEmptyResult(a,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(o)},t.prototype.mergeSymLabels=function(){for(var n=this._graph.getNodes().iterator();n.hasNext();){var i=n.next();i.getEdges().mergeSymLabels()}},t.prototype.isCovered=function(n,i){for(var s=this,a=i.iterator();a.hasNext();){var o=a.next(),l=s._ptLocator.locate(n,o);if(l!==F.EXTERIOR)return!0}return!1},t.prototype.replaceCollapsedEdges=function(){for(var n=new Z,i=this._edgeList.iterator();i.hasNext();){var s=i.next();s.isCollapsed()&&(i.remove(),n.add(s.getCollapsedEdge()))}this._edgeList.addAll(n)},t.prototype.updateNodeLabelling=function(){for(var n=this._graph.getNodes().iterator();n.hasNext();){var i=n.next(),s=i.getEdges().getLabel();i.getLabel().merge(s)}},t.prototype.getResultGeometry=function(n){return this.computeOverlay(n),this._resultGeom},t.prototype.insertUniqueEdges=function(n){for(var i=this,s=n.iterator();s.hasNext();){var a=s.next();i.insertUniqueEdge(a)}},t.prototype.computeOverlay=function(n){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var i=new Z;this._arg[0].computeSplitEdges(i),this._arg[1].computeSplitEdges(i),this.insertUniqueEdges(i),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),aa.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(n),this.cancelDuplicateResultEdges();var s=new Nr(this._geomFact);s.add(this._graph),this._resultPolyList=s.getPolygons();var a=new ei(this,this._geomFact,this._ptLocator);this._resultLineList=a.build(n);var o=new Qa(this,this._geomFact,this._ptLocator);this._resultPointList=o.build(n),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,n)},t.prototype.labelIncompleteNode=function(n,i){var s=this._ptLocator.locate(n.getCoordinate(),this._arg[i].getGeometry());n.getLabel().setLocation(i,s)},t.prototype.copyPoints=function(n){for(var i=this,s=this._arg[n].getNodeIterator();s.hasNext();){var a=s.next(),o=i._graph.addNode(a.getCoordinate());o.setLabel(n,a.getLabel().getLocation(n))}},t.prototype.findResultAreaEdges=function(n){for(var i=this._graph.getEdgeEnds().iterator();i.hasNext();){var s=i.next(),a=s.getLabel();a.isArea()&&!s.isInteriorAreaEdge()&&t.isResultOfOp(a.getLocation(0,K.RIGHT),a.getLocation(1,K.RIGHT),n)&&s.setInResult(!0)}},t.prototype.computeLabelsFromDepths=function(){for(var n=this._edgeList.iterator();n.hasNext();){var i=n.next(),s=i.getLabel(),a=i.getDepth();if(!a.isNull()){a.normalize();for(var o=0;o<2;o++)!s.isNull(o)&&s.isArea()&&!a.isNull(o)&&(a.getDelta(o)===0?s.toLine(o):(Mt.isTrue(!a.isNull(o,K.LEFT),"depth of LEFT side has not been initialized"),s.setLocation(o,K.LEFT,a.getLocation(o,K.LEFT)),Mt.isTrue(!a.isNull(o,K.RIGHT),"depth of RIGHT side has not been initialized"),s.setLocation(o,K.RIGHT,a.getLocation(o,K.RIGHT))))}}},t.prototype.computeLabelling=function(){for(var n=this,i=this._graph.getNodes().iterator();i.hasNext();){var s=i.next();s.getEdges().computeLabelling(n._arg)}this.mergeSymLabels(),this.updateNodeLabelling()},t.prototype.labelIncompleteNodes=function(){for(var n=this,i=this._graph.getNodes().iterator();i.hasNext();){var s=i.next(),a=s.getLabel();s.isIsolated()&&(a.isNull(0)?n.labelIncompleteNode(s,0):n.labelIncompleteNode(s,1)),s.getEdges().updateLabelling(a)}},t.prototype.isCoveredByA=function(n){return!!this.isCovered(n,this._resultPolyList)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(pu);Ct.overlayOp=function(r,t,e){var n=new Ct(r,t),i=n.getResultGeometry(e);return i},Ct.intersection=function(r,t){if(r.isEmpty()||t.isEmpty())return Ct.createEmptyResult(Ct.INTERSECTION,r,t,r.getFactory());if(r.isGeometryCollection()){var e=t;return Ka.map(r,{interfaces_:function(){return[la.MapOp]},map:function(n){return n.intersection(e)}})}return r.checkNotGeometryCollection(r),r.checkNotGeometryCollection(t),lr.overlayOp(r,t,Ct.INTERSECTION)},Ct.symDifference=function(r,t){if(r.isEmpty()||t.isEmpty()){if(r.isEmpty()&&t.isEmpty())return Ct.createEmptyResult(Ct.SYMDIFFERENCE,r,t,r.getFactory());if(r.isEmpty())return t.copy();if(t.isEmpty())return r.copy()}return r.checkNotGeometryCollection(r),r.checkNotGeometryCollection(t),lr.overlayOp(r,t,Ct.SYMDIFFERENCE)},Ct.resultDimension=function(r,t,e){var n=t.getDimension(),i=e.getDimension(),s=-1;switch(r){case Ct.INTERSECTION:s=Math.min(n,i);break;case Ct.UNION:s=Math.max(n,i);break;case Ct.DIFFERENCE:s=n;break;case Ct.SYMDIFFERENCE:s=Math.max(n,i);break}return s},Ct.createEmptyResult=function(r,t,e,n){var i=null;switch(Ct.resultDimension(r,t,e)){case-1:i=n.createGeometryCollection(new Array(0).fill(null));break;case 0:i=n.createPoint();break;case 1:i=n.createLineString();break;case 2:i=n.createPolygon();break}return i},Ct.difference=function(r,t){return r.isEmpty()?Ct.createEmptyResult(Ct.DIFFERENCE,r,t,r.getFactory()):t.isEmpty()?r.copy():(r.checkNotGeometryCollection(r),r.checkNotGeometryCollection(t),lr.overlayOp(r,t,Ct.DIFFERENCE))},Ct.isResultOfOp=function(){if(arguments.length===2){var r=arguments[0],t=arguments[1],e=r.getLocation(0),n=r.getLocation(1);return Ct.isResultOfOp(e,n,t)}else if(arguments.length===3){var i=arguments[0],s=arguments[1],a=arguments[2];switch(i===F.BOUNDARY&&(i=F.INTERIOR),s===F.BOUNDARY&&(s=F.INTERIOR),a){case Ct.INTERSECTION:return i===F.INTERIOR&&s===F.INTERIOR;case Ct.UNION:return i===F.INTERIOR||s===F.INTERIOR;case Ct.DIFFERENCE:return i===F.INTERIOR&&s!==F.INTERIOR;case Ct.SYMDIFFERENCE:return i===F.INTERIOR&&s!==F.INTERIOR||i!==F.INTERIOR&&s===F.INTERIOR}return!1}},Ct.INTERSECTION=1,Ct.UNION=2,Ct.DIFFERENCE=3,Ct.SYMDIFFERENCE=4;var bs=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new Tn,this._seg=new pt;var t=arguments[0],e=arguments[1];this._g=t,this._boundaryDistanceTolerance=e,this._linework=this.extractLinework(t)};bs.prototype.isWithinToleranceOfBoundary=function(t){for(var e=this,n=0;n<this._linework.getNumGeometries();n++)for(var i=e._linework.getGeometryN(n),s=i.getCoordinateSequence(),a=0;a<s.size()-1;a++){s.getCoordinate(a,e._seg.p0),s.getCoordinate(a+1,e._seg.p1);var o=e._seg.distance(t);if(o<=e._boundaryDistanceTolerance)return!0}return!1},bs.prototype.getLocation=function(t){return this.isWithinToleranceOfBoundary(t)?F.BOUNDARY:this._ptLocator.locate(t,this._g)},bs.prototype.extractLinework=function(t){var e=new gu;t.apply(e);var n=e.getLinework(),i=Dt.toLineStringArray(n);return t.getFactory().createMultiLineString(i)},bs.prototype.interfaces_=function(){return[]},bs.prototype.getClass=function(){return bs};var gu=function(){this._linework=null,this._linework=new Z};gu.prototype.getLinework=function(){return this._linework},gu.prototype.filter=function(t){var e=this;if(t instanceof Ne){var n=t;this._linework.add(n.getExteriorRing());for(var i=0;i<n.getNumInteriorRing();i++)e._linework.add(n.getInteriorRingN(i))}},gu.prototype.interfaces_=function(){return[Hn]},gu.prototype.getClass=function(){return gu};var ua=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var t=arguments[0];this._g=t};ua.prototype.extractPoints=function(t,e,n){for(var i=this,s=t.getCoordinates(),a=0;a<s.length-1;a++)i.computeOffsetPoints(s[a],s[a+1],e,n)},ua.prototype.setSidesToGenerate=function(t,e){this._doLeft=t,this._doRight=e},ua.prototype.getPoints=function(t){for(var e=this,n=new Z,i=We.getLines(this._g),s=i.iterator();s.hasNext();){var a=s.next();e.extractPoints(a,t,n)}return n},ua.prototype.computeOffsetPoints=function(t,e,n,i){var s=e.x-t.x,a=e.y-t.y,o=Math.sqrt(s*s+a*a),l=n*s/o,u=n*a/o,c=(e.x+t.x)/2,h=(e.y+t.y)/2;if(this._doLeft){var f=new L(c-u,h+l);i.add(f)}if(this._doRight){var g=new L(c+u,h-l);i.add(g)}},ua.prototype.interfaces_=function(){return[]},ua.prototype.getClass=function(){return ua};var qr=function r(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=r.TOLERANCE,this._testCoords=new Z;var t=arguments[0],e=arguments[1],n=arguments[2];this._boundaryDistanceTolerance=r.computeBoundaryDistanceTolerance(t,e),this._geom=[t,e,n],this._locFinder=[new bs(this._geom[0],this._boundaryDistanceTolerance),new bs(this._geom[1],this._boundaryDistanceTolerance),new bs(this._geom[2],this._boundaryDistanceTolerance)]},xg={TOLERANCE:{configurable:!0}};qr.prototype.reportResult=function(t,e,n){Ve.out.println("Overlay result invalid - A:"+F.toLocationSymbol(e[0])+" B:"+F.toLocationSymbol(e[1])+" expected:"+(n?"i":"e")+" actual:"+F.toLocationSymbol(e[2]))},qr.prototype.isValid=function(t){this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]);var e=this.checkValid(t);return e},qr.prototype.checkValid=function(){var t=this;if(arguments.length===1){for(var e=arguments[0],n=0;n<this._testCoords.size();n++){var i=t._testCoords.get(n);if(!t.checkValid(e,i))return t._invalidLocation=i,!1}return!0}else if(arguments.length===2){var s=arguments[0],a=arguments[1];return this._location[0]=this._locFinder[0].getLocation(a),this._location[1]=this._locFinder[1].getLocation(a),this._location[2]=this._locFinder[2].getLocation(a),qr.hasLocation(this._location,F.BOUNDARY)?!0:this.isValidResult(s,this._location)}},qr.prototype.addTestPts=function(t){var e=new ua(t);this._testCoords.addAll(e.getPoints(5*this._boundaryDistanceTolerance))},qr.prototype.isValidResult=function(t,e){var n=Ct.isResultOfOp(e[0],e[1],t),i=e[2]===F.INTERIOR,s=!(n^i);return s||this.reportResult(t,e,n),s},qr.prototype.getInvalidLocation=function(){return this._invalidLocation},qr.prototype.interfaces_=function(){return[]},qr.prototype.getClass=function(){return qr},qr.hasLocation=function(t,e){for(var n=0;n<3;n++)if(t[n]===e)return!0;return!1},qr.computeBoundaryDistanceTolerance=function(t,e){return Math.min(we.computeSizeBasedSnapTolerance(t),we.computeSizeBasedSnapTolerance(e))},qr.isValid=function(t,e,n,i){var s=new qr(t,e,i);return s.isValid(n)},xg.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(qr,xg);var Wr=function r(t){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=r.extractFactory(t),this._inputGeoms=t};Wr.prototype.extractElements=function(t,e){var n=this;if(t===null)return null;for(var i=0;i<t.getNumGeometries();i++){var s=t.getGeometryN(i);n._skipEmpty&&s.isEmpty()||e.add(s)}},Wr.prototype.combine=function(){for(var t=this,e=new Z,n=this._inputGeoms.iterator();n.hasNext();){var i=n.next();t.extractElements(i,e)}return e.size()===0?this._geomFactory!==null?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(e)},Wr.prototype.interfaces_=function(){return[]},Wr.prototype.getClass=function(){return Wr},Wr.combine=function(){if(arguments.length===1){var t=arguments[0],e=new Wr(t);return e.combine()}else if(arguments.length===2){var n=arguments[0],i=arguments[1],s=new Wr(Wr.createList(n,i));return s.combine()}else if(arguments.length===3){var a=arguments[0],o=arguments[1],l=arguments[2],u=new Wr(Wr.createList(a,o,l));return u.combine()}},Wr.extractFactory=function(t){return t.isEmpty()?null:t.iterator().next().getFactory()},Wr.createList=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new Z;return n.add(t),n.add(e),n}else if(arguments.length===3){var i=arguments[0],s=arguments[1],a=arguments[2],o=new Z;return o.add(i),o.add(s),o.add(a),o}};var Ce=function(){this._inputPolys=null,this._geomFactory=null;var t=arguments[0];this._inputPolys=t,this._inputPolys===null&&(this._inputPolys=new Z)},Og={STRTREE_NODE_CAPACITY:{configurable:!0}};Ce.prototype.reduceToGeometries=function(t){for(var e=this,n=new Z,i=t.iterator();i.hasNext();){var s=i.next(),a=null;_t(s,Pn)?a=e.unionTree(s):s instanceof yt&&(a=s),n.add(a)}return n},Ce.prototype.extractByEnvelope=function(t,e,n){for(var i=new Z,s=0;s<e.getNumGeometries();s++){var a=e.getGeometryN(s);a.getEnvelopeInternal().intersects(t)?i.add(a):n.add(a)}return this._geomFactory.buildGeometry(i)},Ce.prototype.unionOptimized=function(t,e){var n=t.getEnvelopeInternal(),i=e.getEnvelopeInternal();if(!n.intersects(i)){var s=Wr.combine(t,e);return s}if(t.getNumGeometries()<=1&&e.getNumGeometries()<=1)return this.unionActual(t,e);var a=n.intersection(i);return this.unionUsingEnvelopeIntersection(t,e,a)},Ce.prototype.union=function(){if(this._inputPolys===null)throw new Error("union() method cannot be called twice");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var t=new gg(Ce.STRTREE_NODE_CAPACITY),e=this._inputPolys.iterator();e.hasNext();){var n=e.next();t.insert(n.getEnvelopeInternal(),n)}this._inputPolys=null;var i=t.itemsTree(),s=this.unionTree(i);return s},Ce.prototype.binaryUnion=function(){if(arguments.length===1){var t=arguments[0];return this.binaryUnion(t,0,t.size())}else if(arguments.length===3){var e=arguments[0],n=arguments[1],i=arguments[2];if(i-n<=1){var s=Ce.getGeometry(e,n);return this.unionSafe(s,null)}else{if(i-n===2)return this.unionSafe(Ce.getGeometry(e,n),Ce.getGeometry(e,n+1));var a=Math.trunc((i+n)/2),o=this.binaryUnion(e,n,a),l=this.binaryUnion(e,a,i);return this.unionSafe(o,l)}}},Ce.prototype.repeatedUnion=function(t){for(var e=null,n=t.iterator();n.hasNext();){var i=n.next();e===null?e=i.copy():e=e.union(i)}return e},Ce.prototype.unionSafe=function(t,e){return t===null&&e===null?null:t===null?e.copy():e===null?t.copy():this.unionOptimized(t,e)},Ce.prototype.unionActual=function(t,e){return Ce.restrictToPolygons(t.union(e))},Ce.prototype.unionTree=function(t){var e=this.reduceToGeometries(t),n=this.binaryUnion(e);return n},Ce.prototype.unionUsingEnvelopeIntersection=function(t,e,n){var i=new Z,s=this.extractByEnvelope(n,t,i),a=this.extractByEnvelope(n,e,i),o=this.unionActual(s,a);i.add(o);var l=Wr.combine(i);return l},Ce.prototype.bufferUnion=function(){if(arguments.length===1){var t=arguments[0],e=t.get(0).getFactory(),n=e.buildGeometry(t),i=n.buffer(0);return i}else if(arguments.length===2){var s=arguments[0],a=arguments[1],o=s.getFactory(),l=o.createGeometryCollection([s,a]),u=l.buffer(0);return u}},Ce.prototype.interfaces_=function(){return[]},Ce.prototype.getClass=function(){return Ce},Ce.restrictToPolygons=function(t){if(_t(t,ys))return t;var e=Qi.getPolygons(t);return e.size()===1?e.get(0):t.getFactory().createMultiPolygon(Dt.toPolygonArray(e))},Ce.getGeometry=function(t,e){return e>=t.size()?null:t.get(e)},Ce.union=function(t){var e=new Ce(t);return e.union()},Og.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Ce,Og);var wc=function(){};wc.prototype.interfaces_=function(){return[]},wc.prototype.getClass=function(){return wc},wc.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Ct.createEmptyResult(Ct.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),lr.overlayOp(t,e,Ct.UNION)};function ha(){return new Ec}function Ec(){this.reset()}Ec.prototype={constructor:Ec,reset:function(){this.s=this.t=0},add:function(r){Ag(Sc,r,this.t),Ag(this,Sc.s,this.s),this.s?this.t+=Sc.t:this.s=Sc.t},valueOf:function(){return this.s}};var Sc=new Ec;function Ag(r,t,e){var n=r.s=t+e,i=n-t,s=n-i;r.t=t-s+(e-i)}var Ie=1e-6,Bt=Math.PI,Bi=Bt/2,Lg=Bt/4,Zi=Bt*2,ca=180/Bt,ri=Bt/180,ur=Math.abs,A_=Math.atan,mu=Math.atan2,Te=Math.cos,De=Math.sin,vu=Math.sqrt;function Rg(r){return r>1?0:r<-1?Bt:Math.acos(r)}function Za(r){return r>1?Bi:r<-1?-Bi:Math.asin(r)}function fh(){}function Pc(r,t){r&&Gg.hasOwnProperty(r.type)&&Gg[r.type](r,t)}var Fg={Feature:function(r,t){Pc(r.geometry,t)},FeatureCollection:function(r,t){for(var e=r.features,n=-1,i=e.length;++n<i;)Pc(e[n].geometry,t)}},Gg={Sphere:function(r,t){t.sphere()},Point:function(r,t){r=r.coordinates,t.point(r[0],r[1],r[2])},MultiPoint:function(r,t){for(var e=r.coordinates,n=-1,i=e.length;++n<i;)r=e[n],t.point(r[0],r[1],r[2])},LineString:function(r,t){ed(r.coordinates,t,0)},MultiLineString:function(r,t){for(var e=r.coordinates,n=-1,i=e.length;++n<i;)ed(e[n],t,0)},Polygon:function(r,t){kg(r.coordinates,t)},MultiPolygon:function(r,t){for(var e=r.coordinates,n=-1,i=e.length;++n<i;)kg(e[n],t)},GeometryCollection:function(r,t){for(var e=r.geometries,n=-1,i=e.length;++n<i;)Pc(e[n],t)}};function ed(r,t,e){var n=-1,i=r.length-e,s;for(t.lineStart();++n<i;)s=r[n],t.point(s[0],s[1],s[2]);t.lineEnd()}function kg(r,t){var e=-1,n=r.length;for(t.polygonStart();++e<n;)ed(r[e],t,1);t.polygonEnd()}function L_(r,t){r&&Fg.hasOwnProperty(r.type)?Fg[r.type](r,t):Pc(r,t)}ha(),ha();function rd(r){return[mu(r[1],r[0]),Za(r[2])]}function yu(r){var t=r[0],e=r[1],n=Te(e);return[n*Te(t),n*De(t),De(e)]}function Cc(r,t){return r[0]*t[0]+r[1]*t[1]+r[2]*t[2]}function Ic(r,t){return[r[1]*t[2]-r[2]*t[1],r[2]*t[0]-r[0]*t[2],r[0]*t[1]-r[1]*t[0]]}function nd(r,t){r[0]+=t[0],r[1]+=t[1],r[2]+=t[2]}function Mc(r,t){return[r[0]*t,r[1]*t,r[2]*t]}function id(r){var t=vu(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);r[0]/=t,r[1]/=t,r[2]/=t}ha();function zg(r,t){function e(n,i){return n=r(n,i),t(n[0],n[1])}return r.invert&&t.invert&&(e.invert=function(n,i){return n=t.invert(n,i),n&&r.invert(n[0],n[1])}),e}function sd(r,t){return[r>Bt?r-Zi:r<-Bt?r+Zi:r,t]}sd.invert=sd;function R_(r,t,e){return(r%=Zi)?t||e?zg(Ug(r),qg(t,e)):Ug(r):t||e?qg(t,e):sd}function Vg(r){return function(t,e){return t+=r,[t>Bt?t-Zi:t<-Bt?t+Zi:t,e]}}function Ug(r){var t=Vg(r);return t.invert=Vg(-r),t}function qg(r,t){var e=Te(r),n=De(r),i=Te(t),s=De(t);function a(o,l){var u=Te(l),c=Te(o)*u,h=De(o)*u,f=De(l),g=f*e+c*n;return[mu(h*i-g*s,c*e-f*n),Za(g*i+h*s)]}return a.invert=function(o,l){var u=Te(l),c=Te(o)*u,h=De(o)*u,f=De(l),g=f*i-h*s;return[mu(h*i+f*s,c*e+g*n),Za(g*e-c*n)]},a}function F_(r,t,e,n,i,s){if(e){var a=Te(t),o=De(t),l=n*e;i==null?(i=t+n*Zi,s=t-l/2):(i=Wg(a,i),s=Wg(a,s),(n>0?i<s:i>s)&&(i+=n*Zi));for(var u,c=i;n>0?c>s:c<s;c-=l)u=rd([a,-o*Te(c),-o*De(c)]),r.point(u[0],u[1])}}function Wg(r,t){t=yu(t),t[0]-=r,id(t);var e=Rg(-t[1]);return((-t[2]<0?-e:e)+Zi-Ie)%Zi}function Hg(){var r=[],t;return{point:function(e,n){t.push([e,n])},lineStart:function(){r.push(t=[])},lineEnd:fh,rejoin:function(){r.length>1&&r.push(r.pop().concat(r.shift()))},result:function(){var e=r;return r=[],t=null,e}}}function G_(r,t,e,n,i,s){var a=r[0],o=r[1],l=t[0],u=t[1],c=0,h=1,f=l-a,g=u-o,m;if(m=e-a,!(!f&&m>0)){if(m/=f,f<0){if(m<c)return;m<h&&(h=m)}else if(f>0){if(m>h)return;m>c&&(c=m)}if(m=i-a,!(!f&&m<0)){if(m/=f,f<0){if(m>h)return;m>c&&(c=m)}else if(f>0){if(m<c)return;m<h&&(h=m)}if(m=n-o,!(!g&&m>0)){if(m/=g,g<0){if(m<c)return;m<h&&(h=m)}else if(g>0){if(m>h)return;m>c&&(c=m)}if(m=s-o,!(!g&&m<0)){if(m/=g,g<0){if(m>h)return;m>c&&(c=m)}else if(g>0){if(m<c)return;m<h&&(h=m)}return c>0&&(r[0]=a+c*f,r[1]=o+c*g),h<1&&(t[0]=a+h*f,t[1]=o+h*g),!0}}}}}function Nc(r,t){return ur(r[0]-t[0])<Ie&&ur(r[1]-t[1])<Ie}function bc(r,t,e,n){this.x=r,this.z=t,this.o=e,this.e=n,this.v=!1,this.n=this.p=null}function Xg(r,t,e,n,i){var s=[],a=[],o,l;if(r.forEach(function(m){if(!((_=m.length-1)<=0)){var _,E=m[0],M=m[_],y;if(Nc(E,M)){for(i.lineStart(),o=0;o<_;++o)i.point((E=m[o])[0],E[1]);i.lineEnd();return}s.push(y=new bc(E,m,null,!0)),a.push(y.o=new bc(E,null,y,!1)),s.push(y=new bc(M,m,null,!1)),a.push(y.o=new bc(M,null,y,!0))}}),!!s.length){for(a.sort(t),Yg(s),Yg(a),o=0,l=a.length;o<l;++o)a[o].e=e=!e;for(var u=s[0],c,h;;){for(var f=u,g=!0;f.v;)if((f=f.n)===u)return;c=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(g)for(o=0,l=c.length;o<l;++o)i.point((h=c[o])[0],h[1]);else n(f.x,f.n.x,1,i);f=f.n}else{if(g)for(c=f.p.z,o=c.length-1;o>=0;--o)i.point((h=c[o])[0],h[1]);else n(f.x,f.p.x,-1,i);f=f.p}f=f.o,c=f.z,g=!g}while(!f.v);i.lineEnd()}}}function Yg(r){if(t=r.length){for(var t,e=0,n=r[0],i;++e<t;)n.n=i=r[e],i.p=n,n=i;n.n=i=r[0],i.p=n}}function Jg(r,t){return r<t?-1:r>t?1:r>=t?0:NaN}function k_(r){return r.length===1&&(r=z_(r)),{left:function(t,e,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var s=n+i>>>1;r(t[s],e)<0?n=s+1:i=s}return n},right:function(t,e,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var s=n+i>>>1;r(t[s],e)>0?i=s:n=s+1}return n}}}function z_(r){return function(t,e){return Jg(r(t),e)}}k_(Jg);function Kg(r){for(var t=r.length,e,n=-1,i=0,s,a;++n<t;)i+=r[n].length;for(s=new Array(i);--t>=0;)for(a=r[t],e=a.length;--e>=0;)s[--i]=a[e];return s}var Tc=1e9,Dc=-1e9;function V_(r,t,e,n){function i(u,c){return r<=u&&u<=e&&t<=c&&c<=n}function s(u,c,h,f){var g=0,m=0;if(u==null||(g=a(u,h))!==(m=a(c,h))||l(u,c)<0^h>0)do f.point(g===0||g===3?r:e,g>1?n:t);while((g=(g+h+4)%4)!==m);else f.point(c[0],c[1])}function a(u,c){return ur(u[0]-r)<Ie?c>0?0:3:ur(u[0]-e)<Ie?c>0?2:1:ur(u[1]-t)<Ie?c>0?1:0:c>0?3:2}function o(u,c){return l(u.x,c.x)}function l(u,c){var h=a(u,1),f=a(c,1);return h!==f?h-f:h===0?c[1]-u[1]:h===1?u[0]-c[0]:h===2?u[1]-c[1]:c[0]-u[0]}return function(u){var c=u,h=Hg(),f,g,m,_,E,M,y,w,v,S,P,I={point:b,lineStart:x,lineEnd:R,polygonStart:O,polygonEnd:T};function b(rt,B){i(rt,B)&&c.point(rt,B)}function D(){for(var rt=0,B=0,ct=g.length;B<ct;++B)for(var G=g[B],X=1,k=G.length,V=G[0],A,W,J=V[0],ot=V[1];X<k;++X)A=J,W=ot,V=G[X],J=V[0],ot=V[1],W<=n?ot>n&&(J-A)*(n-W)>(ot-W)*(r-A)&&++rt:ot<=n&&(J-A)*(n-W)<(ot-W)*(r-A)&&--rt;return rt}function O(){c=h,f=[],g=[],P=!0}function T(){var rt=D(),B=P&&rt,ct=(f=Kg(f)).length;(B||ct)&&(u.polygonStart(),B&&(u.lineStart(),s(null,null,1,u),u.lineEnd()),ct&&Xg(f,o,rt,s,u),u.polygonEnd()),c=u,f=g=m=null}function x(){I.point=z,g&&g.push(m=[]),S=!0,v=!1,y=w=NaN}function R(){f&&(z(_,E),M&&v&&h.rejoin(),f.push(h.result())),I.point=b,v&&c.lineEnd()}function z(rt,B){var ct=i(rt,B);if(g&&m.push([rt,B]),S)_=rt,E=B,M=ct,S=!1,ct&&(c.lineStart(),c.point(rt,B));else if(ct&&v)c.point(rt,B);else{var G=[y=Math.max(Dc,Math.min(Tc,y)),w=Math.max(Dc,Math.min(Tc,w))],X=[rt=Math.max(Dc,Math.min(Tc,rt)),B=Math.max(Dc,Math.min(Tc,B))];G_(G,X,r,t,e,n)?(v||(c.lineStart(),c.point(G[0],G[1])),c.point(X[0],X[1]),ct||c.lineEnd(),P=!1):ct&&(c.lineStart(),c.point(rt,B),P=!1)}y=rt,w=B,v=ct}return I}}var ad=ha();function U_(r,t){var e=t[0],n=t[1],i=[De(e),-Te(e),0],s=0,a=0;ad.reset();for(var o=0,l=r.length;o<l;++o)if(c=(u=r[o]).length)for(var u,c,h=u[c-1],f=h[0],g=h[1]/2+Lg,m=De(g),_=Te(g),E=0;E<c;++E,f=y,m=v,_=S,h=M){var M=u[E],y=M[0],w=M[1]/2+Lg,v=De(w),S=Te(w),P=y-f,I=P>=0?1:-1,b=I*P,D=b>Bt,O=m*v;if(ad.add(mu(O*I*De(b),_*S+O*Te(b))),s+=D?P+I*Zi:P,D^f>=e^y>=e){var T=Ic(yu(h),yu(M));id(T);var x=Ic(i,T);id(x);var R=(D^P>=0?-1:1)*Za(x[2]);(n>R||n===R&&(T[0]||T[1]))&&(a+=D^P>=0?1:-1)}}return(s<-1e-6||s<Ie&&ad<-1e-6)^a&1}ha();function Qg(r){return r}ha(),ha();var _u=1/0,xc=_u,dh=-_u,Oc=dh,Bg={point:q_,lineStart:fh,lineEnd:fh,polygonStart:fh,polygonEnd:fh,result:function(){var r=[[_u,xc],[dh,Oc]];return dh=Oc=-(xc=_u=1/0),r}};function q_(r,t){r<_u&&(_u=r),r>dh&&(dh=r),t<xc&&(xc=t),t>Oc&&(Oc=t)}ha();function Zg(r,t,e,n){return function(i,s){var a=t(s),o=i.invert(n[0],n[1]),l=Hg(),u=t(l),c=!1,h,f,g,m={point:_,lineStart:M,lineEnd:y,polygonStart:function(){m.point=w,m.lineStart=v,m.lineEnd=S,f=[],h=[]},polygonEnd:function(){m.point=_,m.lineStart=M,m.lineEnd=y,f=Kg(f);var P=U_(h,o);f.length?(c||(s.polygonStart(),c=!0),Xg(f,H_,P,e,s)):P&&(c||(s.polygonStart(),c=!0),s.lineStart(),e(null,null,1,s),s.lineEnd()),c&&(s.polygonEnd(),c=!1),f=h=null},sphere:function(){s.polygonStart(),s.lineStart(),e(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function _(P,I){var b=i(P,I);r(P=b[0],I=b[1])&&s.point(P,I)}function E(P,I){var b=i(P,I);a.point(b[0],b[1])}function M(){m.point=E,a.lineStart()}function y(){m.point=_,a.lineEnd()}function w(P,I){g.push([P,I]);var b=i(P,I);u.point(b[0],b[1])}function v(){u.lineStart(),g=[]}function S(){w(g[0][0],g[0][1]),u.lineEnd();var P=u.clean(),I=l.result(),b,D=I.length,O,T,x;if(g.pop(),h.push(g),g=null,!!D){if(P&1){if(T=I[0],(O=T.length-1)>0){for(c||(s.polygonStart(),c=!0),s.lineStart(),b=0;b<O;++b)s.point((x=T[b])[0],x[1]);s.lineEnd()}return}D>1&&P&2&&I.push(I.pop().concat(I.shift())),f.push(I.filter(W_))}}return m}}function W_(r){return r.length>1}function H_(r,t){return((r=r.x)[0]<0?r[1]-Bi-Ie:Bi-r[1])-((t=t.x)[0]<0?t[1]-Bi-Ie:Bi-t[1])}const $g=Zg(function(){return!0},X_,J_,[-Bt,-Bi]);function X_(r){var t=NaN,e=NaN,n=NaN,i;return{lineStart:function(){r.lineStart(),i=1},point:function(s,a){var o=s>0?Bt:-Bt,l=ur(s-t);ur(l-Bt)<Ie?(r.point(t,e=(e+a)/2>0?Bi:-Bi),r.point(n,e),r.lineEnd(),r.lineStart(),r.point(o,e),r.point(s,e),i=0):n!==o&&l>=Bt&&(ur(t-n)<Ie&&(t-=n*Ie),ur(s-o)<Ie&&(s-=o*Ie),e=Y_(t,e,s,a),r.point(n,e),r.lineEnd(),r.lineStart(),r.point(o,e),i=0),r.point(t=s,e=a),n=o},lineEnd:function(){r.lineEnd(),t=e=NaN},clean:function(){return 2-i}}}function Y_(r,t,e,n){var i,s,a=De(r-e);return ur(a)>Ie?A_((De(t)*(s=Te(n))*De(e)-De(n)*(i=Te(t))*De(r))/(i*s*a)):(t+n)/2}function J_(r,t,e,n){var i;if(r==null)i=e*Bi,n.point(-Bt,i),n.point(0,i),n.point(Bt,i),n.point(Bt,0),n.point(Bt,-i),n.point(0,-i),n.point(-Bt,-i),n.point(-Bt,0),n.point(-Bt,i);else if(ur(r[0]-t[0])>Ie){var s=r[0]<t[0]?Bt:-Bt;i=e*s/2,n.point(-s,i),n.point(0,i),n.point(s,i)}else n.point(t[0],t[1])}function K_(r,t){var e=Te(r),n=e>0,i=ur(e)>Ie;function s(c,h,f,g){F_(g,r,t,f,c,h)}function a(c,h){return Te(c)*Te(h)>e}function o(c){var h,f,g,m,_;return{lineStart:function(){m=g=!1,_=1},point:function(E,M){var y=[E,M],w,v=a(E,M),S=n?v?0:u(E,M):v?u(E+(E<0?Bt:-Bt),M):0;if(!h&&(m=g=v)&&c.lineStart(),v!==g&&(w=l(h,y),(!w||Nc(h,w)||Nc(y,w))&&(y[0]+=Ie,y[1]+=Ie,v=a(y[0],y[1]))),v!==g)_=0,v?(c.lineStart(),w=l(y,h),c.point(w[0],w[1])):(w=l(h,y),c.point(w[0],w[1]),c.lineEnd()),h=w;else if(i&&h&&n^v){var P;!(S&f)&&(P=l(y,h,!0))&&(_=0,n?(c.lineStart(),c.point(P[0][0],P[0][1]),c.point(P[1][0],P[1][1]),c.lineEnd()):(c.point(P[1][0],P[1][1]),c.lineEnd(),c.lineStart(),c.point(P[0][0],P[0][1])))}v&&(!h||!Nc(h,y))&&c.point(y[0],y[1]),h=y,g=v,f=S},lineEnd:function(){g&&c.lineEnd(),h=null},clean:function(){return _|(m&&g)<<1}}}function l(c,h,f){var g=yu(c),m=yu(h),_=[1,0,0],E=Ic(g,m),M=Cc(E,E),y=E[0],w=M-y*y;if(!w)return!f&&c;var v=e*M/w,S=-e*y/w,P=Ic(_,E),I=Mc(_,v),b=Mc(E,S);nd(I,b);var D=P,O=Cc(I,D),T=Cc(D,D),x=O*O-T*(Cc(I,I)-1);if(!(x<0)){var R=vu(x),z=Mc(D,(-O-R)/T);if(nd(z,I),z=rd(z),!f)return z;var rt=c[0],B=h[0],ct=c[1],G=h[1],X;B<rt&&(X=rt,rt=B,B=X);var k=B-rt,V=ur(k-Bt)<Ie,A=V||k<Ie;if(!V&&G<ct&&(X=ct,ct=G,G=X),A?V?ct+G>0^z[1]<(ur(z[0]-rt)<Ie?ct:G):ct<=z[1]&&z[1]<=G:k>Bt^(rt<=z[0]&&z[0]<=B)){var W=Mc(D,(-O+R)/T);return nd(W,I),[z,rd(W)]}}}function u(c,h){var f=n?r:Bt-r,g=0;return c<-f?g|=1:c>f&&(g|=2),h<-f?g|=4:h>f&&(g|=8),g}return Zg(a,o,s,n?[0,-r]:[-Bt,r-Bt])}function jg(r){return function(t){var e=new od;for(var n in r)e[n]=r[n];return e.stream=t,e}}function od(){}od.prototype={constructor:od,point:function(r,t){this.stream.point(r,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function tm(r,t,e){var n=t[1][0]-t[0][0],i=t[1][1]-t[0][1],s=r.clipExtent&&r.clipExtent();r.scale(150).translate([0,0]),s!=null&&r.clipExtent(null),L_(e,r.stream(Bg));var a=Bg.result(),o=Math.min(n/(a[1][0]-a[0][0]),i/(a[1][1]-a[0][1])),l=+t[0][0]+(n-o*(a[1][0]+a[0][0]))/2,u=+t[0][1]+(i-o*(a[1][1]+a[0][1]))/2;return s!=null&&r.clipExtent(s),r.scale(o*150).translate([l,u])}function Q_(r,t,e){return tm(r,[[0,0],t],e)}var em=16,B_=Te(30*ri);function rm(r,t){return+t?$_(r,t):Z_(r)}function Z_(r){return jg({point:function(t,e){t=r(t,e),this.stream.point(t[0],t[1])}})}function $_(r,t){function e(n,i,s,a,o,l,u,c,h,f,g,m,_,E){var M=u-n,y=c-i,w=M*M+y*y;if(w>4*t&&_--){var v=a+f,S=o+g,P=l+m,I=vu(v*v+S*S+P*P),b=Za(P/=I),D=ur(ur(P)-1)<Ie||ur(s-h)<Ie?(s+h)/2:mu(S,v),O=r(D,b),T=O[0],x=O[1],R=T-n,z=x-i,rt=y*R-M*z;(rt*rt/w>t||ur((M*R+y*z)/w-.5)>.3||a*f+o*g+l*m<B_)&&(e(n,i,s,a,o,l,T,x,D,v/=I,S/=I,P,_,E),E.point(T,x),e(T,x,D,v,S,P,u,c,h,f,g,m,_,E))}}return function(n){var i,s,a,o,l,u,c,h,f,g,m,_,E={point:M,lineStart:y,lineEnd:v,polygonStart:function(){n.polygonStart(),E.lineStart=S},polygonEnd:function(){n.polygonEnd(),E.lineStart=y}};function M(b,D){b=r(b,D),n.point(b[0],b[1])}function y(){h=NaN,E.point=w,n.lineStart()}function w(b,D){var O=yu([b,D]),T=r(b,D);e(h,f,c,g,m,_,h=T[0],f=T[1],c=b,g=O[0],m=O[1],_=O[2],em,n),n.point(h,f)}function v(){E.point=M,n.lineEnd()}function S(){y(),E.point=P,E.lineEnd=I}function P(b,D){w(i=b,D),s=h,a=f,o=g,l=m,u=_,E.point=w}function I(){e(h,f,c,g,m,_,s,a,i,o,l,u,em,n),E.lineEnd=v,v()}return E}}var j_=jg({point:function(r,t){this.stream.point(r*ri,t*ri)}});function t1(r){return e1(function(){return r})()}function e1(r){var t,e=150,n=480,i=250,s,a,o=0,l=0,u=0,c=0,h=0,f,g,m=null,_=$g,E=null,M,y,w,v=Qg,S=.5,P=rm(T,S),I,b;function D(z){return z=g(z[0]*ri,z[1]*ri),[z[0]*e+s,a-z[1]*e]}function O(z){return z=g.invert((z[0]-s)/e,(a-z[1])/e),z&&[z[0]*ca,z[1]*ca]}function T(z,rt){return z=t(z,rt),[z[0]*e+s,a-z[1]*e]}D.stream=function(z){return I&&b===z?I:I=j_(_(f,P(v(b=z))))},D.clipAngle=function(z){return arguments.length?(_=+z?K_(m=z*ri,6*ri):(m=null,$g),R()):m*ca},D.clipExtent=function(z){return arguments.length?(v=z==null?(E=M=y=w=null,Qg):V_(E=+z[0][0],M=+z[0][1],y=+z[1][0],w=+z[1][1]),R()):E==null?null:[[E,M],[y,w]]},D.scale=function(z){return arguments.length?(e=+z,x()):e},D.translate=function(z){return arguments.length?(n=+z[0],i=+z[1],x()):[n,i]},D.center=function(z){return arguments.length?(o=z[0]%360*ri,l=z[1]%360*ri,x()):[o*ca,l*ca]},D.rotate=function(z){return arguments.length?(u=z[0]%360*ri,c=z[1]%360*ri,h=z.length>2?z[2]%360*ri:0,x()):[u*ca,c*ca,h*ca]},D.precision=function(z){return arguments.length?(P=rm(T,S=z*z),R()):vu(S)},D.fitExtent=function(z,rt){return tm(D,z,rt)},D.fitSize=function(z,rt){return Q_(D,z,rt)};function x(){g=zg(f=R_(u,c,h),t);var z=t(o,l);return s=n-z[0]*e,a=i+z[1]*e,R()}function R(){return I=b=null,D}return function(){return t=r.apply(this,arguments),D.invert=t.invert&&O,x()}}function nm(r){return function(t,e){var n=Te(t),i=Te(e),s=r(n*i);return[s*i*De(t),s*De(e)]}}function im(r){return function(t,e){var n=vu(t*t+e*e),i=r(n),s=De(i),a=Te(i);return[mu(t*s,n*a),Za(n&&e*s/n)]}}var r1=nm(function(r){return vu(2/(1+r))});r1.invert=im(function(r){return 2*Za(r/2)});var sm=nm(function(r){return(r=Rg(r))&&r/De(r)});sm.invert=im(function(r){return r});function n1(){return t1(sm).scale(79.4188).clipAngle(179.999)}function am(r,t){return[r,t]}am.invert=am;function i1(r,t,e){e=e||{};var n=e.units||"kilometers",i=e.steps||8;if(!r)throw new Error("geojson is required");if(typeof e!="object")throw new Error("options must be an object");if(typeof i!="number")throw new Error("steps must be an number");if(t===void 0)throw new Error("radius is required");if(i<=0)throw new Error("steps must be greater than 0");var s=[];switch(r.type){case"GeometryCollection":return Bh(r,function(a){var o=Ac(a,t,n,i);o&&s.push(o)}),Wl(s);case"FeatureCollection":return Qh(r,function(a){var o=Ac(a,t,n,i);o&&Qh(o,function(l){l&&s.push(l)})}),Wl(s)}return Ac(r,t,n,i)}function Ac(r,t,e,n){var i=r.properties||{},s=r.type==="Feature"?r.geometry:r;if(s.type==="GeometryCollection"){var a=[];return Bh(r,function(_){var E=Ac(_,t,e,n);E&&a.push(E)}),Wl(a)}var o=s1(s),l={type:s.type,coordinates:lm(s.coordinates,o)},u=new Xf,c=u.read(l),h=yf(_f(t,e),"meters"),f=qe.bufferOp(c,h,n),g=new dg;if(f=g.write(f),!om(f.coordinates)){var m={type:f.type,coordinates:um(f.coordinates,o)};return ui(m,i)}}function om(r){return Array.isArray(r[0])?om(r[0]):isNaN(r[0])}function lm(r,t){return typeof r[0]!="object"?t(r):r.map(function(e){return lm(e,t)})}function um(r,t){return typeof r[0]!="object"?t.invert(r):r.map(function(e){return um(e,t)})}function s1(r){var t=ly(r).geometry.coordinates,e=[-t[0],-t[1]];return n1().rotate(e).scale(hr)}function a1(r,t,e){e===void 0&&(e={});var n=_n(r),i=_n(t),s=Ff.union(n.coordinates,i.coordinates);return s.length===0?null:s.length===1?Pr(s[0],e.properties):vf(s,e.properties)}function o1(r,t,e){e===void 0&&(e={});var n=_n(r),i=_n(t),s=Ff.intersection(n.coordinates,i.coordinates);return s.length===0?null:s.length===1?Pr(s[0],e.properties):vf(s,e.properties)}function l1(r,t){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1])&&r.push(r[0]);const e=ae(t),n=Pr([r]);return Gn(e,n)}function u1(r,t){const e=hi(r);return Sy(e,t,{units:"meters"}).geometry.coordinates}function ld(r){if((r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),r.length<=3)return 0;const t=Pr([r]);return wy(t)}function h1(r){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]);const t=Pr([r]),n=Pp(t).geometry.coordinates;return[n[0],n[1],n[2]??r[0][2]??0]}function c1(r,t,e,n){const[i,s,a]=r,o=Xl(ae([i,s]),t,e,{units:"meters"});if(!(!o||!o.geometry||!o.geometry.coordinates))return n=n||[0,0,0],n[0]=o.geometry.coordinates[0],n[1]=o.geometry.coordinates[1],n[2]=a,n}function ud(r,t){return ps(ae(r),ae(t),{units:"meters"})}function Lc(r,t){return Uu(ae(r),ae(t))}function f1(r,t){return xp(hi(r),hi(t))}function d1(r,t){const e=ae(r),n=ae(t),i=oy(e,n),s=(r[2]+t[2])/2;return[...i.geometry.coordinates,s]}function p1(r,t){const e=ae(t),n=hi(r);return my(n,e,{units:"meters"})}function g1(r,t){const e=ae(r),n=hi(t);return yy(e,n,{units:"meters"})}function m1(r,t,e,n){const[i,s,a]=r,o=Ly(ae([i,s]),t,e,{units:"meters"});if(!(!o||!o.geometry||!o.geometry.coordinates))return n=n||[0,0,0],n[0]=o.geometry.coordinates[0],n[1]=o.geometry.coordinates[1],n[2]=a,n}function hm(r,t){return Ap(ae(r),ae(t),{units:"meters"})}function v1(r,t){return Ay(ae(r),ae(t))}function cm(r,t){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=o1(Pr([r]),Pr([t]));if(e)return e.geometry.coordinates}function fm(r,t){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=a1(Pr([r]),Pr([t]));if(e)return e.geometry.coordinates}function dm(r,t=500,e="meters"){const n=i1(hi(r),t,{units:e});if(n)return n.geometry.coordinates}function pm(r,t){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=g_(Pr([r]),Pr([t]));if(e)return e.geometry.coordinates}function gm(r,t,e=10,n="meters"){return sy(r,t,{steps:e,units:n}).geometry.coordinates}function hd(r,t){(r[0][0]!==r[r.length-1][0]||r[0][1]!==r[r.length-1][1]||r[0][2]!==r[r.length-1][2])&&r.push(r[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=Pr([r]),n=Pr([t]);return Fy(e,n)?"oneBig":Cy(e,n)?"twoBig":!1}function mm(r){const t=d.min(d.objsIterator(r,["0"])),e=d.min(d.objsIterator(r,["1"])),n=d.min(d.objsIterator(r,["2"])),i=d.max(d.objsIterator(r,["0"])),s=d.max(d.objsIterator(r,["1"])),a=d.max(d.objsIterator(r,["2"]));return{minPos:[t,e,n],maxPos:[i,s,a],center:[(t+i)*.5,(e+s)*.5,(n+a)*.5]}}function y1(r){const{minPos:t,maxPos:e,center:n}=mm(r);if(t.some(o=>!Number.isFinite(o)||e.some(l=>!Number.isFinite(l))||n.some(l=>!Number.isFinite(l)))){console.warn("geoCenterAndRadiusFromPositions error: minPos.some(e => !Number.isFinite(e) || maxPos.some(e => !Number.isFinite(e)) || center.some(e => !Number.isFinite(e))");return}const i=ud(t,e);let s=i*.5;const a=Math.abs(t[2]-e[2]);return a!=0&&(s=Math.sqrt(i*i+a*a)*.5),{center:n,radius:s}}function _1(r){r("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),r("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),r("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var t=1;t<=60;++t)r("EPSG:"+(32600+t),"+proj=utm +zone="+t+" +datum=WGS84 +units=m"),r("EPSG:"+(32700+t),"+proj=utm +zone="+t+" +south +datum=WGS84 +units=m");r.WGS84=r["EPSG:4326"],r["EPSG:3785"]=r["EPSG:3857"],r.GOOGLE=r["EPSG:3857"],r["EPSG:900913"]=r["EPSG:3857"],r["EPSG:102113"]=r["EPSG:3857"]}var $a=1,ja=2,wu=3,w1=4,cd=5,vm=6378137,E1=6356752314e-3,ym=.0066943799901413165,ph=484813681109536e-20,Q=Math.PI/2,S1=.16666666666666666,P1=.04722222222222222,C1=.022156084656084655,st=1e-10,de=.017453292519943295,$i=57.29577951308232,ee=Math.PI/4,gh=Math.PI*2,mr=3.14159265359,an={};an.greenwich=0,an.lisbon=-9.131906111111,an.paris=2.337229166667,an.bogota=-74.080916666667,an.madrid=-3.687938888889,an.rome=12.452333333333,an.bern=7.439583333333,an.jakarta=106.807719444444,an.ferro=-17.666666666667,an.brussels=4.367975,an.stockholm=18.058277777778,an.athens=23.7163375,an.oslo=10.722916666667;const I1={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}};var _m=/[\s_\-\/\(\)]/g;function fa(r,t){if(r[t])return r[t];for(var e=Object.keys(r),n=t.toLowerCase().replace(_m,""),i=-1,s,a;++i<e.length;)if(s=e[i],a=s.toLowerCase().replace(_m,""),a===n)return r[s]}function fd(r){var t={},e=r.split("+").map(function(o){return o.trim()}).filter(function(o){return o}).reduce(function(o,l){var u=l.split("=");return u.push(!0),o[u[0].toLowerCase()]=u[1],o},{}),n,i,s,a={proj:"projName",datum:"datumCode",rf:function(o){t.rf=parseFloat(o)},lat_0:function(o){t.lat0=o*de},lat_1:function(o){t.lat1=o*de},lat_2:function(o){t.lat2=o*de},lat_ts:function(o){t.lat_ts=o*de},lon_0:function(o){t.long0=o*de},lon_1:function(o){t.long1=o*de},lon_2:function(o){t.long2=o*de},alpha:function(o){t.alpha=parseFloat(o)*de},gamma:function(o){t.rectified_grid_angle=parseFloat(o)*de},lonc:function(o){t.longc=o*de},x_0:function(o){t.x0=parseFloat(o)},y_0:function(o){t.y0=parseFloat(o)},k_0:function(o){t.k0=parseFloat(o)},k:function(o){t.k0=parseFloat(o)},a:function(o){t.a=parseFloat(o)},b:function(o){t.b=parseFloat(o)},r:function(o){t.a=t.b=parseFloat(o)},r_a:function(){t.R_A=!0},zone:function(o){t.zone=parseInt(o,10)},south:function(){t.utmSouth=!0},towgs84:function(o){t.datum_params=o.split(",").map(function(l){return parseFloat(l)})},to_meter:function(o){t.to_meter=parseFloat(o)},units:function(o){t.units=o;var l=fa(I1,o);l&&(t.to_meter=l.to_meter)},from_greenwich:function(o){t.from_greenwich=o*de},pm:function(o){var l=fa(an,o);t.from_greenwich=(l||parseFloat(o))*de},nadgrids:function(o){o==="@null"?t.datumCode="none":t.nadgrids=o},axis:function(o){var l="ewnsud";o.length===3&&l.indexOf(o.substr(0,1))!==-1&&l.indexOf(o.substr(1,1))!==-1&&l.indexOf(o.substr(2,1))!==-1&&(t.axis=o)},approx:function(){t.approx=!0}};for(n in e)i=e[n],n in a?(s=a[n],typeof s=="function"?s(i):t[s]=i):t[n]=i;return typeof t.datumCode=="string"&&t.datumCode!=="WGS84"&&(t.datumCode=t.datumCode.toLowerCase()),t}class wm{static getId(t){const e=t.find(n=>Array.isArray(n)&&n[0]==="ID");return e&&e.length>=3?{authority:e[1],code:parseInt(e[2],10)}:null}static convertUnit(t,e="unit"){if(!t||t.length<3)return{type:e,name:"unknown",conversion_factor:null};const n=t[1],i=parseFloat(t[2])||null,s=t.find(o=>Array.isArray(o)&&o[0]==="ID"),a=s?{authority:s[1],code:parseInt(s[2],10)}:null;return{type:e,name:n,conversion_factor:i,id:a}}static convertAxis(t){const e=t[1]||"Unknown";let n;const i=e.match(/^\((.)\)$/);if(i){const u=i[1].toUpperCase();if(u==="E")n="east";else if(u==="N")n="north";else if(u==="U")n="up";else throw new Error(`Unknown axis abbreviation: ${u}`)}else n=t[2]?t[2].toLowerCase():"unknown";const s=t.find(u=>Array.isArray(u)&&u[0]==="ORDER"),a=s?parseInt(s[1],10):null,o=t.find(u=>Array.isArray(u)&&(u[0]==="LENGTHUNIT"||u[0]==="ANGLEUNIT"||u[0]==="SCALEUNIT")),l=this.convertUnit(o);return{name:e,direction:n,unit:l,order:a}}static extractAxes(t){return t.filter(e=>Array.isArray(e)&&e[0]==="AXIS").map(e=>this.convertAxis(e)).sort((e,n)=>(e.order||0)-(n.order||0))}static convert(t,e={}){switch(t[0]){case"PROJCRS":e.type="ProjectedCRS",e.name=t[1],e.base_crs=t.find(f=>Array.isArray(f)&&f[0]==="BASEGEOGCRS")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="BASEGEOGCRS")):null,e.conversion=t.find(f=>Array.isArray(f)&&f[0]==="CONVERSION")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="CONVERSION")):null;const n=t.find(f=>Array.isArray(f)&&f[0]==="CS");n&&(e.coordinate_system={type:n[1],axis:this.extractAxes(t)});const i=t.find(f=>Array.isArray(f)&&f[0]==="LENGTHUNIT");if(i){const f=this.convertUnit(i);e.coordinate_system.unit=f}e.id=this.getId(t);break;case"BASEGEOGCRS":case"GEOGCRS":e.type="GeographicCRS",e.name=t[1];const s=t.find(f=>Array.isArray(f)&&(f[0]==="DATUM"||f[0]==="ENSEMBLE"));if(s){const f=this.convert(s);s[0]==="ENSEMBLE"?e.datum_ensemble=f:e.datum=f;const g=t.find(m=>Array.isArray(m)&&m[0]==="PRIMEM");g&&g[1]!=="Greenwich"&&(f.prime_meridian={name:g[1],longitude:parseFloat(g[2])})}e.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(t)},e.id=this.getId(t);break;case"DATUM":e.type="GeodeticReferenceFrame",e.name=t[1],e.ellipsoid=t.find(f=>Array.isArray(f)&&f[0]==="ELLIPSOID")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="ELLIPSOID")):null;break;case"ENSEMBLE":e.type="DatumEnsemble",e.name=t[1],e.members=t.filter(f=>Array.isArray(f)&&f[0]==="MEMBER").map(f=>({type:"DatumEnsembleMember",name:f[1],id:this.getId(f)}));const a=t.find(f=>Array.isArray(f)&&f[0]==="ENSEMBLEACCURACY");a&&(e.accuracy=parseFloat(a[1]));const o=t.find(f=>Array.isArray(f)&&f[0]==="ELLIPSOID");o&&(e.ellipsoid=this.convert(o)),e.id=this.getId(t);break;case"ELLIPSOID":e.type="Ellipsoid",e.name=t[1],e.semi_major_axis=parseFloat(t[2]),e.inverse_flattening=parseFloat(t[3]),t.find(f=>Array.isArray(f)&&f[0]==="LENGTHUNIT")&&this.convert(t.find(f=>Array.isArray(f)&&f[0]==="LENGTHUNIT"),e);break;case"CONVERSION":e.type="Conversion",e.name=t[1],e.method=t.find(f=>Array.isArray(f)&&f[0]==="METHOD")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="METHOD")):null,e.parameters=t.filter(f=>Array.isArray(f)&&f[0]==="PARAMETER").map(f=>this.convert(f));break;case"METHOD":e.type="Method",e.name=t[1],e.id=this.getId(t);break;case"PARAMETER":e.type="Parameter",e.name=t[1],e.value=parseFloat(t[2]),e.unit=this.convertUnit(t.find(f=>Array.isArray(f)&&(f[0]==="LENGTHUNIT"||f[0]==="ANGLEUNIT"||f[0]==="SCALEUNIT"))),e.id=this.getId(t);break;case"BOUNDCRS":e.type="BoundCRS";const l=t.find(f=>Array.isArray(f)&&f[0]==="SOURCECRS");if(l){const f=l.find(g=>Array.isArray(g));e.source_crs=f?this.convert(f):null}const u=t.find(f=>Array.isArray(f)&&f[0]==="TARGETCRS");if(u){const f=u.find(g=>Array.isArray(g));e.target_crs=f?this.convert(f):null}const c=t.find(f=>Array.isArray(f)&&f[0]==="ABRIDGEDTRANSFORMATION");c?e.transformation=this.convert(c):e.transformation=null;break;case"ABRIDGEDTRANSFORMATION":if(e.type="Transformation",e.name=t[1],e.method=t.find(f=>Array.isArray(f)&&f[0]==="METHOD")?this.convert(t.find(f=>Array.isArray(f)&&f[0]==="METHOD")):null,e.parameters=t.filter(f=>Array.isArray(f)&&(f[0]==="PARAMETER"||f[0]==="PARAMETERFILE")).map(f=>{if(f[0]==="PARAMETER")return this.convert(f);if(f[0]==="PARAMETERFILE")return{name:f[1],value:f[2],id:{authority:"EPSG",code:8656}}}),e.parameters.length===7){const f=e.parameters[6];f.name==="Scale difference"&&(f.value=Math.round((f.value-1)*1e12)/1e6)}e.id=this.getId(t);break;case"AXIS":e.coordinate_system||(e.coordinate_system={type:"unspecified",axis:[]}),e.coordinate_system.axis.push(this.convertAxis(t));break;case"LENGTHUNIT":const h=this.convertUnit(t,"LinearUnit");e.coordinate_system&&e.coordinate_system.axis&&e.coordinate_system.axis.forEach(f=>{f.unit||(f.unit=h)}),h.conversion_factor&&h.conversion_factor!==1&&e.semi_major_axis&&(e.semi_major_axis={value:e.semi_major_axis,unit:h});break;default:e.keyword=t[0];break}return e}}class M1 extends wm{static convert(t,e={}){return super.convert(t,e),e.coordinate_system&&e.coordinate_system.subtype==="Cartesian"&&delete e.coordinate_system,e.usage&&delete e.usage,e}}class N1 extends wm{static convert(t,e={}){super.convert(t,e);const n=t.find(s=>Array.isArray(s)&&s[0]==="CS");n&&(e.coordinate_system={subtype:n[1],axis:this.extractAxes(t)});const i=t.find(s=>Array.isArray(s)&&s[0]==="USAGE");if(i){const s=i.find(l=>Array.isArray(l)&&l[0]==="SCOPE"),a=i.find(l=>Array.isArray(l)&&l[0]==="AREA"),o=i.find(l=>Array.isArray(l)&&l[0]==="BBOX");e.usage={},s&&(e.usage.scope=s[1]),a&&(e.usage.area=a[1]),o&&(e.usage.bbox=o.slice(1))}return e}}function b1(r){return r.find(t=>Array.isArray(t)&&t[0]==="USAGE")?"2019":(r.find(t=>Array.isArray(t)&&t[0]==="CS")||r[0]==="BOUNDCRS"||r[0]==="PROJCRS"||r[0]==="GEOGCRS","2015")}function T1(r){return(b1(r)==="2019"?N1:M1).convert(r)}function D1(r){const t=r.toUpperCase();return t.includes("PROJCRS")||t.includes("GEOGCRS")||t.includes("BOUNDCRS")||t.includes("VERTCRS")||t.includes("LENGTHUNIT")||t.includes("ANGLEUNIT")||t.includes("SCALEUNIT")?"WKT2":(t.includes("PROJCS")||t.includes("GEOGCS")||t.includes("LOCAL_CS")||t.includes("VERT_CS")||t.includes("UNIT"),"WKT1")}var mh=1,Em=2,Sm=3,Rc=4,Pm=5,dd=-1,x1=/\s/,O1=/[A-Za-z]/,A1=/[A-Za-z84_]/,Fc=/[,\]]/,Cm=/[\d\.E\-\+]/;function Ts(r){if(typeof r!="string")throw new Error("not a string");this.text=r.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=mh}Ts.prototype.readCharicter=function(){var r=this.text[this.place++];if(this.state!==Rc)for(;x1.test(r);){if(this.place>=this.text.length)return;r=this.text[this.place++]}switch(this.state){case mh:return this.neutral(r);case Em:return this.keyword(r);case Rc:return this.quoted(r);case Pm:return this.afterquote(r);case Sm:return this.number(r);case dd:return}},Ts.prototype.afterquote=function(r){if(r==='"'){this.word+='"',this.state=Rc;return}if(Fc.test(r)){this.word=this.word.trim(),this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in afterquote yet, index '+this.place)},Ts.prototype.afterItem=function(r){if(r===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=mh;return}if(r==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=mh,this.currentObject=this.stack.pop(),this.currentObject||(this.state=dd);return}},Ts.prototype.number=function(r){if(Cm.test(r)){this.word+=r;return}if(Fc.test(r)){this.word=parseFloat(this.word),this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in number yet, index '+this.place)},Ts.prototype.quoted=function(r){if(r==='"'){this.state=Pm;return}this.word+=r},Ts.prototype.keyword=function(r){if(A1.test(r)){this.word+=r;return}if(r==="["){var t=[];t.push(this.word),this.level++,this.root===null?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,this.state=mh;return}if(Fc.test(r)){this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in keyword yet, index '+this.place)},Ts.prototype.neutral=function(r){if(O1.test(r)){this.word=r,this.state=Em;return}if(r==='"'){this.word="",this.state=Rc;return}if(Cm.test(r)){this.word=r,this.state=Sm;return}if(Fc.test(r)){this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in neutral yet, index '+this.place)},Ts.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===dd)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function L1(r){var t=new Ts(r);return t.output()}function pd(r,t,e){Array.isArray(t)&&(e.unshift(t),t=null);var n=t?{}:r,i=e.reduce(function(s,a){return Eu(a,s),s},n);t&&(r[t]=i)}function Eu(r,t){if(!Array.isArray(r)){t[r]=!0;return}var e=r.shift();if(e==="PARAMETER"&&(e=r.shift()),r.length===1){if(Array.isArray(r[0])){t[e]={},Eu(r[0],t[e]);return}t[e]=r[0];return}if(!r.length){t[e]=!0;return}if(e==="TOWGS84"){t[e]=r;return}if(e==="AXIS"){e in t||(t[e]=[]),t[e].push(r);return}Array.isArray(e)||(t[e]={});var n;switch(e){case"UNIT":case"PRIMEM":case"VERT_DATUM":t[e]={name:r[0].toLowerCase(),convert:r[1]},r.length===3&&Eu(r[2],t[e]);return;case"SPHEROID":case"ELLIPSOID":t[e]={name:r[0],a:r[1],rf:r[2]},r.length===4&&Eu(r[3],t[e]);return;case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":r[0]=["name",r[0]],pd(t,e,r);return;case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":r[0]=["name",r[0]],pd(t,e,r),t[e].type=e;return;default:for(n=-1;++n<r.length;)if(!Array.isArray(r[n]))return Eu(r,t[e]);return pd(t,e,r)}}var R1=.017453292519943295;function Mi(r){return r*R1}function Im(r){const t=(r.projName||"").toLowerCase().replace(/_/g," ");!r.long0&&r.longc&&(t==="albers conic equal area"||t==="lambert azimuthal equal area")&&(r.long0=r.longc),!r.lat_ts&&r.lat1&&(t==="stereographic south pole"||t==="polar stereographic (variant b)")?(r.lat0=Mi(r.lat1>0?90:-90),r.lat_ts=r.lat1,delete r.lat1):!r.lat_ts&&r.lat0&&(t==="polar stereographic"||t==="polar stereographic (variant a)")&&(r.lat_ts=r.lat0,r.lat0=Mi(r.lat0>0?90:-90),delete r.lat1)}function Mm(r){let t={units:null,to_meter:void 0};return typeof r=="string"?(t.units=r.toLowerCase(),t.units==="metre"&&(t.units="meter"),t.units==="meter"&&(t.to_meter=1)):r&&r.name&&(t.units=r.name.toLowerCase(),t.units==="metre"&&(t.units="meter"),t.to_meter=r.conversion_factor),t}function Nm(r){return typeof r=="object"?r.value*r.unit.conversion_factor:r}function bm(r,t){r.ellipsoid.radius?(t.a=r.ellipsoid.radius,t.rf=0):(t.a=Nm(r.ellipsoid.semi_major_axis),r.ellipsoid.inverse_flattening!==void 0?t.rf=r.ellipsoid.inverse_flattening:r.ellipsoid.semi_major_axis!==void 0&&r.ellipsoid.semi_minor_axis!==void 0&&(t.rf=t.a/(t.a-Nm(r.ellipsoid.semi_minor_axis))))}function Gc(r,t={}){return!r||typeof r!="object"?r:r.type==="BoundCRS"?(Gc(r.source_crs,t),r.transformation&&(r.transformation.method&&r.transformation.method.name==="NTv2"?t.nadgrids=r.transformation.parameters[0].value:t.datum_params=r.transformation.parameters.map(e=>e.value)),t):(Object.keys(r).forEach(e=>{const n=r[e];if(n!==null)switch(e){case"name":if(t.srsCode)break;t.name=n,t.srsCode=n;break;case"type":n==="GeographicCRS"?t.projName="longlat":n==="ProjectedCRS"&&r.conversion&&r.conversion.method&&(t.projName=r.conversion.method.name);break;case"datum":case"datum_ensemble":n.ellipsoid&&(t.ellps=n.ellipsoid.name,bm(n,t)),n.prime_meridian&&(t.from_greenwich=n.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":t.ellps=n.name,bm(n,t);break;case"prime_meridian":t.long0=(n.longitude||0)*Math.PI/180;break;case"coordinate_system":if(n.axis){if(t.axis=n.axis.map(i=>{const s=i.direction;if(s==="east")return"e";if(s==="north")return"n";if(s==="west")return"w";if(s==="south")return"s";throw new Error(`Unknown axis direction: ${s}`)}).join("")+"u",n.unit){const{units:i,to_meter:s}=Mm(n.unit);t.units=i,t.to_meter=s}else if(n.axis[0]&&n.axis[0].unit){const{units:i,to_meter:s}=Mm(n.axis[0].unit);t.units=i,t.to_meter=s}}break;case"id":n.authority&&n.code&&(t.title=n.authority+":"+n.code);break;case"conversion":n.method&&n.method.name&&(t.projName=n.method.name),n.parameters&&n.parameters.forEach(i=>{const s=i.name.toLowerCase().replace(/\s+/g,"_"),a=i.value;i.unit&&i.unit.conversion_factor?t[s]=a*i.unit.conversion_factor:i.unit==="degree"?t[s]=a*Math.PI/180:t[s]=a});break;case"unit":n.name&&(t.units=n.name.toLowerCase(),t.units==="metre"&&(t.units="meter")),n.conversion_factor&&(t.to_meter=n.conversion_factor);break;case"base_crs":Gc(n,t),t.datumCode=n.id?n.id.authority+"_"+n.id.code:n.name;break}}),t.latitude_of_false_origin!==void 0&&(t.lat0=t.latitude_of_false_origin),t.longitude_of_false_origin!==void 0&&(t.long0=t.longitude_of_false_origin),t.latitude_of_standard_parallel!==void 0&&(t.lat0=t.latitude_of_standard_parallel,t.lat1=t.latitude_of_standard_parallel),t.latitude_of_1st_standard_parallel!==void 0&&(t.lat1=t.latitude_of_1st_standard_parallel),t.latitude_of_2nd_standard_parallel!==void 0&&(t.lat2=t.latitude_of_2nd_standard_parallel),t.latitude_of_projection_centre!==void 0&&(t.lat0=t.latitude_of_projection_centre),t.longitude_of_projection_centre!==void 0&&(t.longc=t.longitude_of_projection_centre),t.easting_at_false_origin!==void 0&&(t.x0=t.easting_at_false_origin),t.northing_at_false_origin!==void 0&&(t.y0=t.northing_at_false_origin),t.latitude_of_natural_origin!==void 0&&(t.lat0=t.latitude_of_natural_origin),t.longitude_of_natural_origin!==void 0&&(t.long0=t.longitude_of_natural_origin),t.longitude_of_origin!==void 0&&(t.long0=t.longitude_of_origin),t.false_easting!==void 0&&(t.x0=t.false_easting),t.easting_at_projection_centre&&(t.x0=t.easting_at_projection_centre),t.false_northing!==void 0&&(t.y0=t.false_northing),t.northing_at_projection_centre&&(t.y0=t.northing_at_projection_centre),t.standard_parallel_1!==void 0&&(t.lat1=t.standard_parallel_1),t.standard_parallel_2!==void 0&&(t.lat2=t.standard_parallel_2),t.scale_factor_at_natural_origin!==void 0&&(t.k0=t.scale_factor_at_natural_origin),t.scale_factor_at_projection_centre!==void 0&&(t.k0=t.scale_factor_at_projection_centre),t.scale_factor_on_pseudo_standard_parallel!==void 0&&(t.k0=t.scale_factor_on_pseudo_standard_parallel),t.azimuth!==void 0&&(t.alpha=t.azimuth),t.azimuth_at_projection_centre!==void 0&&(t.alpha=t.azimuth_at_projection_centre),t.angle_from_rectified_to_skew_grid&&(t.rectified_grid_angle=t.angle_from_rectified_to_skew_grid),Im(t),t)}var F1=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function G1(r,t){var e=t[0],n=t[1];!(e in r)&&n in r&&(r[e]=r[n],t.length===3&&(r[e]=t[2](r[e])))}function Tm(r){for(var t=Object.keys(r),e=0,n=t.length;e<n;++e){var i=t[e];F1.indexOf(i)!==-1&&k1(r[i]),typeof r[i]=="object"&&Tm(r[i])}}function k1(r){if(r.AUTHORITY){var t=Object.keys(r.AUTHORITY)[0];t&&t in r.AUTHORITY&&(r.title=t+":"+r.AUTHORITY[t])}if(r.type==="GEOGCS"?r.projName="longlat":r.type==="LOCAL_CS"?(r.projName="identity",r.local=!0):typeof r.PROJECTION=="object"?r.projName=Object.keys(r.PROJECTION)[0]:r.projName=r.PROJECTION,r.AXIS){for(var e="",n=0,i=r.AXIS.length;n<i;++n){var s=[r.AXIS[n][0].toLowerCase(),r.AXIS[n][1].toLowerCase()];s[0].indexOf("north")!==-1||(s[0]==="y"||s[0]==="lat")&&s[1]==="north"?e+="n":s[0].indexOf("south")!==-1||(s[0]==="y"||s[0]==="lat")&&s[1]==="south"?e+="s":s[0].indexOf("east")!==-1||(s[0]==="x"||s[0]==="lon")&&s[1]==="east"?e+="e":(s[0].indexOf("west")!==-1||(s[0]==="x"||s[0]==="lon")&&s[1]==="west")&&(e+="w")}e.length===2&&(e+="u"),e.length===3&&(r.axis=e)}r.UNIT&&(r.units=r.UNIT.name.toLowerCase(),r.units==="metre"&&(r.units="meter"),r.UNIT.convert&&(r.type==="GEOGCS"?r.DATUM&&r.DATUM.SPHEROID&&(r.to_meter=r.UNIT.convert*r.DATUM.SPHEROID.a):r.to_meter=r.UNIT.convert));var a=r.GEOGCS;r.type==="GEOGCS"&&(a=r),a&&(a.DATUM?r.datumCode=a.DATUM.name.toLowerCase():r.datumCode=a.name.toLowerCase(),r.datumCode.slice(0,2)==="d_"&&(r.datumCode=r.datumCode.slice(2)),r.datumCode==="new_zealand_1949"&&(r.datumCode="nzgd49"),(r.datumCode==="wgs_1984"||r.datumCode==="world_geodetic_system_1984")&&(r.PROJECTION==="Mercator_Auxiliary_Sphere"&&(r.sphere=!0),r.datumCode="wgs84"),r.datumCode==="belge_1972"&&(r.datumCode="rnb72"),a.DATUM&&a.DATUM.SPHEROID&&(r.ellps=a.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),r.ellps.toLowerCase().slice(0,13)==="international"&&(r.ellps="intl"),r.a=a.DATUM.SPHEROID.a,r.rf=parseFloat(a.DATUM.SPHEROID.rf,10)),a.DATUM&&a.DATUM.TOWGS84&&(r.datum_params=a.DATUM.TOWGS84),~r.datumCode.indexOf("osgb_1936")&&(r.datumCode="osgb36"),~r.datumCode.indexOf("osni_1952")&&(r.datumCode="osni52"),(~r.datumCode.indexOf("tm65")||~r.datumCode.indexOf("geodetic_datum_of_1965"))&&(r.datumCode="ire65"),r.datumCode==="ch1903+"&&(r.datumCode="ch1903"),~r.datumCode.indexOf("israel")&&(r.datumCode="isr93")),r.b&&!isFinite(r.b)&&(r.b=r.a),r.rectified_grid_angle&&(r.rectified_grid_angle=Mi(r.rectified_grid_angle));function o(c){var h=r.to_meter||1;return c*h}var l=function(c){return G1(r,c)},u=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",Mi],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",Mi],["x0","false_easting",o],["y0","false_northing",o],["long0","central_meridian",Mi],["lat0","latitude_of_origin",Mi],["lat0","standard_parallel_1",Mi],["lat1","standard_parallel_1",Mi],["lat2","standard_parallel_2",Mi],["azimuth","Azimuth"],["alpha","azimuth",Mi],["srsCode","name"]];u.forEach(l),Im(r)}function gd(r){if(typeof r=="object")return Gc(r);const t=D1(r);var e=L1(r);if(t==="WKT2"){const s=T1(e);return Gc(s)}var n=e[0],i={};return Eu(e,i),Tm(i),i[n]}function Hr(r){var t=this;if(arguments.length===2){var e=arguments[1];typeof e=="string"?e.charAt(0)==="+"?Hr[r]=fd(arguments[1]):Hr[r]=gd(arguments[1]):Hr[r]=e}else if(arguments.length===1){if(Array.isArray(r))return r.map(function(n){Array.isArray(n)?Hr.apply(t,n):Hr(n)});if(typeof r=="string"){if(r in Hr)return Hr[r]}else"EPSG"in r?Hr["EPSG:"+r.EPSG]=r:"ESRI"in r?Hr["ESRI:"+r.ESRI]=r:"IAU2000"in r?Hr["IAU2000:"+r.IAU2000]=r:console.log(r);return}}_1(Hr);function z1(r){return typeof r=="string"}function V1(r){return r in Hr}function U1(r){return r.indexOf("+")!==0&&r.indexOf("[")!==-1||typeof r=="object"&&!("srsCode"in r)}var q1=["3857","900913","3785","102113"];function W1(r){var t=fa(r,"authority");if(t){var e=fa(t,"epsg");return e&&q1.indexOf(e)>-1}}function H1(r){var t=fa(r,"extension");if(t)return fa(t,"proj4")}function X1(r){return r[0]==="+"}function Y1(r){if(z1(r)){if(V1(r))return Hr[r];if(U1(r)){var t=gd(r);if(W1(t))return Hr["EPSG:3857"];var e=H1(t);return e?fd(e):t}if(X1(r))return fd(r)}else return r.projName?r:gd(r)}function Dm(r,t){r=r||{};var e,n;if(!t)return r;for(n in t)e=t[n],e!==void 0&&(r[n]=e);return r}function ji(r,t,e){var n=r*t;return e/Math.sqrt(1-n*n)}function vh(r){return r<0?-1:1}function ht(r){return Math.abs(r)<=mr?r:r-vh(r)*gh}function Ni(r,t,e){var n=r*e,i=.5*r;return n=Math.pow((1-n)/(1+n),i),Math.tan(.5*(Q-t))/n}function yh(r,t){for(var e=.5*r,n,i,s=Q-2*Math.atan(t),a=0;a<=15;a++)if(n=r*Math.sin(s),i=Q-2*Math.atan(t*Math.pow((1-n)/(1+n),e))-s,s+=i,Math.abs(i)<=1e-10)return s;return-9999}function J1(){var r=this.b/this.a;this.es=1-r*r,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=ji(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function K1(r){var t=r.x,e=r.y;if(e*$i>90&&e*$i<-90&&t*$i>180&&t*$i<-180)return null;var n,i;if(Math.abs(Math.abs(e)-Q)<=st)return null;if(this.sphere)n=this.x0+this.a*this.k0*ht(t-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(ee+.5*e));else{var s=Math.sin(e),a=Ni(this.e,e,s);n=this.x0+this.a*this.k0*ht(t-this.long0),i=this.y0-this.a*this.k0*Math.log(a)}return r.x=n,r.y=i,r}function Q1(r){var t=r.x-this.x0,e=r.y-this.y0,n,i;if(this.sphere)i=Q-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var s=Math.exp(-e/(this.a*this.k0));if(i=yh(this.e,s),i===-9999)return null}return n=ht(this.long0+t/(this.a*this.k0)),r.x=n,r.y=i,r}var B1=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"];const Z1={init:J1,forward:K1,inverse:Q1,names:B1};function $1(){}function xm(r){return r}var j1=["longlat","identity"],tw=[Z1,{init:$1,forward:xm,inverse:xm,names:j1}],to={},Su=[];function Om(r,t){var e=Su.length;return r.names?(Su[e]=r,r.names.forEach(function(n){to[n.toLowerCase()]=e}),this):(console.log(t),!0)}function Am(r){return r.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}function ew(r){if(!r)return!1;var t=r.toLowerCase();if(typeof to[t]<"u"&&Su[to[t]]||(t=Am(t),t in to&&Su[to[t]]))return Su[to[t]]}function rw(){tw.forEach(Om)}const nw={start:rw,add:Om,get:ew};var Lm={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"},andrae:{a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"},clrk80:{a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:63558348467e-4,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};const iw=Lm.WGS84;function sw(r,t,e,n){var i=r*r,s=t*t,a=(i-s)/i,o=0;n?(r*=1-a*(S1+a*(P1+a*C1)),i=r*r,a=0):o=Math.sqrt(a);var l=(i-s)/s;return{es:a,e:o,ep2:l}}function aw(r,t,e,n,i){if(!r){var s=fa(Lm,n);s||(s=iw),r=s.a,t=s.b,e=s.rf}return e&&!t&&(t=(1-1/e)*r),(e===0||Math.abs(r-t)<st)&&(i=!0,t=r),{a:r,b:t,rf:e,sphere:i}}var kc={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.0276,-0.2167,0.2147,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-1.91514,1.60363,-9.09546,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243649,-1.158827,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,32.39344,-153.25684,-96.2266,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-8.393,0.749,-10.276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,1.25033e-7,4.6785e-8,5.6529e-8,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"61.55,-10.87,-40.19,39.4924,32.7221,32.8979,-9.994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.3092483,0.32482185,0.49729934,5.68906266"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"374,150,588"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"}};for(var ow in kc){var md=kc[ow];md.datumName&&(kc[md.datumName]=md)}function lw(r,t,e,n,i,s,a){var o={};return r===void 0||r==="none"?o.datum_type=cd:o.datum_type=w1,t&&(o.datum_params=t.map(parseFloat),(o.datum_params[0]!==0||o.datum_params[1]!==0||o.datum_params[2]!==0)&&(o.datum_type=$a),o.datum_params.length>3&&(o.datum_params[3]!==0||o.datum_params[4]!==0||o.datum_params[5]!==0||o.datum_params[6]!==0)&&(o.datum_type=ja,o.datum_params[3]*=ph,o.datum_params[4]*=ph,o.datum_params[5]*=ph,o.datum_params[6]=o.datum_params[6]/1e6+1)),a&&(o.datum_type=wu,o.grids=a),o.a=e,o.b=n,o.es=i,o.ep2=s,o}var vd={};function uw(r,t,e){return t instanceof ArrayBuffer?hw(r,t,e):{ready:cw(r,t)}}function hw(r,t,e){var n=!0;e!==void 0&&e.includeErrorFields===!1&&(n=!1);var i=new DataView(t),s=pw(i),a=gw(i,s),o=mw(i,a,s,n),l={header:a,subgrids:o};return vd[r]=l,l}async function cw(r,t){for(var e=[],n=await t.getImageCount(),i=n-1;i>=0;i--){var s=await t.getImage(i),a=await s.readRasters(),o=a,l=[s.getWidth(),s.getHeight()],u=s.getBoundingBox().map(Rm),c=[s.fileDirectory.ModelPixelScale[0],s.fileDirectory.ModelPixelScale[1]].map(Rm),h=u[0]+(l[0]-1)*c[0],f=u[3]-(l[1]-1)*c[1],g=o[0],m=o[1],_=[];for(let y=l[1]-1;y>=0;y--)for(let w=l[0]-1;w>=0;w--){var E=y*l[0]+w;_.push([-da(m[E]),da(g[E])])}e.push({del:c,lim:l,ll:[-h,f],cvs:_})}var M={header:{nSubgrids:n},subgrids:e};return vd[r]=M,M}function fw(r){if(r===void 0)return null;var t=r.split(",");return t.map(dw)}function dw(r){if(r.length===0)return null;var t=r[0]==="@";return t&&(r=r.slice(1)),r==="null"?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:r,mandatory:!t,grid:vd[r]||null,isNull:!1}}function Rm(r){return r*Math.PI/180}function da(r){return r/3600*Math.PI/180}function pw(r){var t=r.getInt32(8,!1);return t===11?!1:(t=r.getInt32(8,!0),t!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function gw(r,t){return{nFields:r.getInt32(8,t),nSubgridFields:r.getInt32(24,t),nSubgrids:r.getInt32(40,t),shiftType:yd(r,56,64).trim(),fromSemiMajorAxis:r.getFloat64(120,t),fromSemiMinorAxis:r.getFloat64(136,t),toSemiMajorAxis:r.getFloat64(152,t),toSemiMinorAxis:r.getFloat64(168,t)}}function yd(r,t,e){return String.fromCharCode.apply(null,new Uint8Array(r.buffer.slice(t,e)))}function mw(r,t,e,n){for(var i=176,s=[],a=0;a<t.nSubgrids;a++){var o=yw(r,i,e),l=_w(r,i,o,e,n),u=Math.round(1+(o.upperLongitude-o.lowerLongitude)/o.longitudeInterval),c=Math.round(1+(o.upperLatitude-o.lowerLatitude)/o.latitudeInterval);s.push({ll:[da(o.lowerLongitude),da(o.lowerLatitude)],del:[da(o.longitudeInterval),da(o.latitudeInterval)],lim:[u,c],count:o.gridNodeCount,cvs:vw(l)});var h=16;n===!1&&(h=8),i+=176+o.gridNodeCount*h}return s}function vw(r){return r.map(function(t){return[da(t.longitudeShift),da(t.latitudeShift)]})}function yw(r,t,e){return{name:yd(r,t+8,t+16).trim(),parent:yd(r,t+24,t+24+8).trim(),lowerLatitude:r.getFloat64(t+72,e),upperLatitude:r.getFloat64(t+88,e),lowerLongitude:r.getFloat64(t+104,e),upperLongitude:r.getFloat64(t+120,e),latitudeInterval:r.getFloat64(t+136,e),longitudeInterval:r.getFloat64(t+152,e),gridNodeCount:r.getInt32(t+168,e)}}function _w(r,t,e,n,i){var s=t+176,a=16;i===!1&&(a=8);for(var o=[],l=0;l<e.gridNodeCount;l++){var u={latitudeShift:r.getFloat32(s+l*a,n),longitudeShift:r.getFloat32(s+l*a+4,n)};i!==!1&&(u.latitudeAccuracy=r.getFloat32(s+l*a+8,n),u.longitudeAccuracy=r.getFloat32(s+l*a+12,n)),o.push(u)}return o}function ts(r,t){if(!(this instanceof ts))return new ts(r);t=t||function(u){if(u)throw u};var e=Y1(r);if(typeof e!="object"){t("Could not parse to valid json: "+r);return}var n=ts.projections.get(e.projName);if(!n){t("Could not get projection name from: "+r);return}if(e.datumCode&&e.datumCode!=="none"){var i=fa(kc,e.datumCode);i&&(e.datum_params=e.datum_params||(i.towgs84?i.towgs84.split(","):null),e.ellps=i.ellipse,e.datumName=i.datumName?i.datumName:e.datumCode)}e.k0=e.k0||1,e.axis=e.axis||"enu",e.ellps=e.ellps||"wgs84",e.lat1=e.lat1||e.lat0;var s=aw(e.a,e.b,e.rf,e.ellps,e.sphere),a=sw(s.a,s.b,s.rf,e.R_A),o=fw(e.nadgrids),l=e.datum||lw(e.datumCode,e.datum_params,s.a,s.b,a.es,a.ep2,o);Dm(this,e),Dm(this,n),this.a=s.a,this.b=s.b,this.rf=s.rf,this.sphere=s.sphere,this.es=a.es,this.e=a.e,this.ep2=a.ep2,this.datum=l,this.init(),t(null,this)}ts.projections=nw,ts.projections.start();function ww(r,t){return r.datum_type!==t.datum_type||r.a!==t.a||Math.abs(r.es-t.es)>5e-11?!1:r.datum_type===$a?r.datum_params[0]===t.datum_params[0]&&r.datum_params[1]===t.datum_params[1]&&r.datum_params[2]===t.datum_params[2]:r.datum_type===ja?r.datum_params[0]===t.datum_params[0]&&r.datum_params[1]===t.datum_params[1]&&r.datum_params[2]===t.datum_params[2]&&r.datum_params[3]===t.datum_params[3]&&r.datum_params[4]===t.datum_params[4]&&r.datum_params[5]===t.datum_params[5]&&r.datum_params[6]===t.datum_params[6]:!0}function Fm(r,t,e){var n=r.x,i=r.y,s=r.z?r.z:0,a,o,l,u;if(i<-Q&&i>-1.001*Q)i=-Q;else if(i>Q&&i<1.001*Q)i=Q;else{if(i<-Q)return{x:-1/0,y:-1/0,z:r.z};if(i>Q)return{x:1/0,y:1/0,z:r.z}}return n>Math.PI&&(n-=2*Math.PI),o=Math.sin(i),u=Math.cos(i),l=o*o,a=e/Math.sqrt(1-t*l),{x:(a+s)*u*Math.cos(n),y:(a+s)*u*Math.sin(n),z:(a*(1-t)+s)*o}}function Gm(r,t,e,n){var i=1e-12,s=i*i,a=30,o,l,u,c,h,f,g,m,_,E,M,y,w,v=r.x,S=r.y,P=r.z?r.z:0,I,b,D;if(o=Math.sqrt(v*v+S*S),l=Math.sqrt(v*v+S*S+P*P),o/e<i){if(I=0,l/e<i)return b=Q,D=-n,{x:r.x,y:r.y,z:r.z}}else I=Math.atan2(S,v);u=P/l,c=o/l,h=1/Math.sqrt(1-t*(2-t)*c*c),m=c*(1-t)*h,_=u*h,w=0;do w++,g=e/Math.sqrt(1-t*_*_),D=o*m+P*_-g*(1-t*_*_),f=t*g/(g+D),h=1/Math.sqrt(1-f*(2-f)*c*c),E=c*(1-f)*h,M=u*h,y=M*m-E*_,m=E,_=M;while(y*y>s&&w<a);return b=Math.atan(M/Math.abs(E)),{x:I,y:b,z:D}}function Ew(r,t,e){if(t===$a)return{x:r.x+e[0],y:r.y+e[1],z:r.z+e[2]};if(t===ja){var n=e[0],i=e[1],s=e[2],a=e[3],o=e[4],l=e[5],u=e[6];return{x:u*(r.x-l*r.y+o*r.z)+n,y:u*(l*r.x+r.y-a*r.z)+i,z:u*(-o*r.x+a*r.y+r.z)+s}}}function Sw(r,t,e){if(t===$a)return{x:r.x-e[0],y:r.y-e[1],z:r.z-e[2]};if(t===ja){var n=e[0],i=e[1],s=e[2],a=e[3],o=e[4],l=e[5],u=e[6],c=(r.x-n)/u,h=(r.y-i)/u,f=(r.z-s)/u;return{x:c+l*h-o*f,y:-l*c+h+a*f,z:o*c-a*h+f}}}function zc(r){return r===$a||r===ja}function Pw(r,t,e){if(ww(r,t)||r.datum_type===cd||t.datum_type===cd)return e;var n=r.a,i=r.es;if(r.datum_type===wu){var s=km(r,!1,e);if(s!==0)return;n=vm,i=ym}var a=t.a,o=t.b,l=t.es;if(t.datum_type===wu&&(a=vm,o=E1,l=ym),i===l&&n===a&&!zc(r.datum_type)&&!zc(t.datum_type))return e;if(e=Fm(e,i,n),zc(r.datum_type)&&(e=Ew(e,r.datum_type,r.datum_params)),zc(t.datum_type)&&(e=Sw(e,t.datum_type,t.datum_params)),e=Gm(e,l,a,o),t.datum_type===wu){var u=km(t,!0,e);if(u!==0)return}return e}function km(r,t,e){if(r.grids===null||r.grids.length===0)return console.log("Grid shift grids not found"),-1;var n={x:-e.x,y:e.y},i={x:Number.NaN,y:Number.NaN},s=[];t:for(var a=0;a<r.grids.length;a++){var o=r.grids[a];if(s.push(o.name),o.isNull){i=n;break}if(o.grid===null){if(o.mandatory)return console.log("Unable to find mandatory grid '"+o.name+"'"),-1;continue}for(var l=o.grid.subgrids,u=0,c=l.length;u<c;u++){var h=l[u],f=(Math.abs(h.del[1])+Math.abs(h.del[0]))/1e4,g=h.ll[0]-f,m=h.ll[1]-f,_=h.ll[0]+(h.lim[0]-1)*h.del[0]+f,E=h.ll[1]+(h.lim[1]-1)*h.del[1]+f;if(!(m>n.y||g>n.x||E<n.y||_<n.x)&&(i=Cw(n,t,h),!isNaN(i.x)))break t}}return isNaN(i.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*$i+" "+n.y*$i+" tried: '"+s+"'"),-1):(e.x=-i.x,e.y=i.y,0)}function Cw(r,t,e){var n={x:Number.NaN,y:Number.NaN};if(isNaN(r.x))return n;var i={x:r.x,y:r.y};i.x-=e.ll[0],i.y-=e.ll[1],i.x=ht(i.x-Math.PI)+Math.PI;var s=zm(i,e);if(t){if(isNaN(s.x))return n;s.x=i.x-s.x,s.y=i.y-s.y;var a=9,o=1e-12,l,u;do{if(u=zm(s,e),isNaN(u.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}l={x:i.x-(u.x+s.x),y:i.y-(u.y+s.y)},s.x+=l.x,s.y+=l.y}while(a--&&Math.abs(l.x)>o&&Math.abs(l.y)>o);if(a<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=ht(s.x+e.ll[0]),n.y=s.y+e.ll[1]}else isNaN(s.x)||(n.x=r.x+s.x,n.y=r.y+s.y);return n}function zm(r,t){var e={x:r.x/t.del[0],y:r.y/t.del[1]},n={x:Math.floor(e.x),y:Math.floor(e.y)},i={x:e.x-1*n.x,y:e.y-1*n.y},s={x:Number.NaN,y:Number.NaN},a;if(n.x<0||n.x>=t.lim[0]||n.y<0||n.y>=t.lim[1])return s;a=n.y*t.lim[0]+n.x;var o={x:t.cvs[a][0],y:t.cvs[a][1]};a++;var l={x:t.cvs[a][0],y:t.cvs[a][1]};a+=t.lim[0];var u={x:t.cvs[a][0],y:t.cvs[a][1]};a--;var c={x:t.cvs[a][0],y:t.cvs[a][1]},h=i.x*i.y,f=i.x*(1-i.y),g=(1-i.x)*(1-i.y),m=(1-i.x)*i.y;return s.x=g*o.x+f*l.x+m*c.x+h*u.x,s.y=g*o.y+f*l.y+m*c.y+h*u.y,s}function Vm(r,t,e){var n=e.x,i=e.y,s=e.z||0,a,o,l,u={};for(l=0;l<3;l++)if(!(t&&l===2&&e.z===void 0))switch(l===0?(a=n,"ew".indexOf(r.axis[l])!==-1?o="x":o="y"):l===1?(a=i,"ns".indexOf(r.axis[l])!==-1?o="y":o="x"):(a=s,o="z"),r.axis[l]){case"e":u[o]=a;break;case"w":u[o]=-a;break;case"n":u[o]=a;break;case"s":u[o]=-a;break;case"u":e[o]!==void 0&&(u.z=a);break;case"d":e[o]!==void 0&&(u.z=-a);break;default:return null}return u}function Um(r){var t={x:r[0],y:r[1]};return r.length>2&&(t.z=r[2]),r.length>3&&(t.m=r[3]),t}function Iw(r){qm(r.x),qm(r.y)}function qm(r){if(typeof Number.isFinite=="function"){if(Number.isFinite(r))return;throw new TypeError("coordinates must be finite numbers")}if(typeof r!="number"||r!==r||!isFinite(r))throw new TypeError("coordinates must be finite numbers")}function Mw(r,t){return(r.datum.datum_type===$a||r.datum.datum_type===ja||r.datum.datum_type===wu)&&t.datumCode!=="WGS84"||(t.datum.datum_type===$a||t.datum.datum_type===ja||t.datum.datum_type===wu)&&r.datumCode!=="WGS84"}function Vc(r,t,e,n){var i;Array.isArray(e)?e=Um(e):e={x:e.x,y:e.y,z:e.z,m:e.m};var s=e.z!==void 0;if(Iw(e),r.datum&&t.datum&&Mw(r,t)&&(i=new ts("WGS84"),e=Vc(r,i,e,n),r=i),n&&r.axis!=="enu"&&(e=Vm(r,!1,e)),r.projName==="longlat")e={x:e.x*de,y:e.y*de,z:e.z||0};else if(r.to_meter&&(e={x:e.x*r.to_meter,y:e.y*r.to_meter,z:e.z||0}),e=r.inverse(e),!e)return;if(r.from_greenwich&&(e.x+=r.from_greenwich),e=Pw(r.datum,t.datum,e),!!e)return t.from_greenwich&&(e={x:e.x-t.from_greenwich,y:e.y,z:e.z||0}),t.projName==="longlat"?e={x:e.x*$i,y:e.y*$i,z:e.z||0}:(e=t.forward(e),t.to_meter&&(e={x:e.x/t.to_meter,y:e.y/t.to_meter,z:e.z||0})),n&&t.axis!=="enu"?Vm(t,!0,e):(e&&!s&&delete e.z,e)}var Wm=ts("WGS84");function _d(r,t,e,n){var i,s,a;return Array.isArray(e)?(i=Vc(r,t,e,n)||{x:NaN,y:NaN},e.length>2?typeof r.name<"u"&&r.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"?typeof i.z=="number"?[i.x,i.y,i.z].concat(e.slice(3)):[i.x,i.y,e[2]].concat(e.slice(3)):[i.x,i.y].concat(e.slice(2)):[i.x,i.y]):(s=Vc(r,t,e,n),a=Object.keys(e),a.length===2||a.forEach(function(o){if(typeof r.name<"u"&&r.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"){if(o==="x"||o==="y"||o==="z")return}else if(o==="x"||o==="y")return;s[o]=e[o]}),s)}function Hm(r){return r instanceof ts?r:r.oProj?r.oProj:ts(r)}function on(r,t,e){r=Hm(r);var n=!1,i;return typeof t>"u"?(t=r,r=Wm,n=!0):(typeof t.x<"u"||Array.isArray(t))&&(e=t,t=r,r=Wm,n=!0),t=Hm(t),e?_d(r,t,e):(i={forward:function(s,a){return _d(r,t,s,a)},inverse:function(s,a){return _d(t,r,s,a)}},n&&(i.oProj=t),i)}var Xm=6,Ym="AJSAJS",Jm="AFAFAF",Pu=65,ln=73,ni=79,_h=86,wh=90;const Nw={forward:Km,inverse:bw,toPoint:Qm};function Km(r,t){return t=t||5,xw(Tw({lat:r[1],lon:r[0]}),t)}function bw(r){var t=Ed($m(r.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function Qm(r){var t=Ed($m(r.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function wd(r){return r*(Math.PI/180)}function Bm(r){return 180*(r/Math.PI)}function Tw(r){var t=r.lat,e=r.lon,n=6378137,i=.00669438,s=.9996,a,o,l,u,c,h,f,g=wd(t),m=wd(e),_,E;E=Math.floor((e+180)/6)+1,e===180&&(E=60),t>=56&&t<64&&e>=3&&e<12&&(E=32),t>=72&&t<84&&(e>=0&&e<9?E=31:e>=9&&e<21?E=33:e>=21&&e<33?E=35:e>=33&&e<42&&(E=37)),a=(E-1)*6-180+3,_=wd(a),o=i/(1-i),l=n/Math.sqrt(1-i*Math.sin(g)*Math.sin(g)),u=Math.tan(g)*Math.tan(g),c=o*Math.cos(g)*Math.cos(g),h=Math.cos(g)*(m-_),f=n*((1-i/4-3*i*i/64-5*i*i*i/256)*g-(3*i/8+3*i*i/32+45*i*i*i/1024)*Math.sin(2*g)+(15*i*i/256+45*i*i*i/1024)*Math.sin(4*g)-35*i*i*i/3072*Math.sin(6*g));var M=s*l*(h+(1-u+c)*h*h*h/6+(5-18*u+u*u+72*c-58*o)*h*h*h*h*h/120)+5e5,y=s*(f+l*Math.tan(g)*(h*h/2+(5-u+9*c+4*c*c)*h*h*h*h/24+(61-58*u+u*u+600*c-330*o)*h*h*h*h*h*h/720));return t<0&&(y+=1e7),{northing:Math.round(y),easting:Math.round(M),zoneNumber:E,zoneLetter:Dw(t)}}function Ed(r){var t=r.northing,e=r.easting,n=r.zoneLetter,i=r.zoneNumber;if(i<0||i>60)return null;var s=.9996,a=6378137,o=.00669438,l,u=(1-Math.sqrt(1-o))/(1+Math.sqrt(1-o)),c,h,f,g,m,_,E,M,y,w=e-5e5,v=t;n<"N"&&(v-=1e7),E=(i-1)*6-180+3,l=o/(1-o),_=v/s,M=_/(a*(1-o/4-3*o*o/64-5*o*o*o/256)),y=M+(3*u/2-27*u*u*u/32)*Math.sin(2*M)+(21*u*u/16-55*u*u*u*u/32)*Math.sin(4*M)+151*u*u*u/96*Math.sin(6*M),c=a/Math.sqrt(1-o*Math.sin(y)*Math.sin(y)),h=Math.tan(y)*Math.tan(y),f=l*Math.cos(y)*Math.cos(y),g=a*(1-o)/Math.pow(1-o*Math.sin(y)*Math.sin(y),1.5),m=w/(c*s);var S=y-c*Math.tan(y)/g*(m*m/2-(5+3*h+10*f-4*f*f-9*l)*m*m*m*m/24+(61+90*h+298*f+45*h*h-252*l-3*f*f)*m*m*m*m*m*m/720);S=Bm(S);var P=(m-(1+2*h+f)*m*m*m/6+(5-2*f+28*h-3*f*f+8*l+24*h*h)*m*m*m*m*m/120)/Math.cos(y);P=E+Bm(P);var I;if(r.accuracy){var b=Ed({northing:r.northing+r.accuracy,easting:r.easting+r.accuracy,zoneLetter:r.zoneLetter,zoneNumber:r.zoneNumber});I={top:b.lat,right:b.lon,bottom:S,left:P}}else I={lat:S,lon:P};return I}function Dw(r){var t="Z";return 84>=r&&r>=72?t="X":72>r&&r>=64?t="W":64>r&&r>=56?t="V":56>r&&r>=48?t="U":48>r&&r>=40?t="T":40>r&&r>=32?t="S":32>r&&r>=24?t="R":24>r&&r>=16?t="Q":16>r&&r>=8?t="P":8>r&&r>=0?t="N":0>r&&r>=-8?t="M":-8>r&&r>=-16?t="L":-16>r&&r>=-24?t="K":-24>r&&r>=-32?t="J":-32>r&&r>=-40?t="H":-40>r&&r>=-48?t="G":-48>r&&r>=-56?t="F":-56>r&&r>=-64?t="E":-64>r&&r>=-72?t="D":-72>r&&r>=-80&&(t="C"),t}function xw(r,t){var e="00000"+r.easting,n="00000"+r.northing;return r.zoneNumber+r.zoneLetter+Ow(r.easting,r.northing,r.zoneNumber)+e.substr(e.length-5,t)+n.substr(n.length-5,t)}function Ow(r,t,e){var n=Zm(e),i=Math.floor(r/1e5),s=Math.floor(t/1e5)%20;return Aw(i,s,n)}function Zm(r){var t=r%Xm;return t===0&&(t=Xm),t}function Aw(r,t,e){var n=e-1,i=Ym.charCodeAt(n),s=Jm.charCodeAt(n),a=i+r-1,o=s+t,l=!1;a>wh&&(a=a-wh+Pu-1,l=!0),(a===ln||i<ln&&a>ln||(a>ln||i<ln)&&l)&&a++,(a===ni||i<ni&&a>ni||(a>ni||i<ni)&&l)&&(a++,a===ln&&a++),a>wh&&(a=a-wh+Pu-1),o>_h?(o=o-_h+Pu-1,l=!0):l=!1,(o===ln||s<ln&&o>ln||(o>ln||s<ln)&&l)&&o++,(o===ni||s<ni&&o>ni||(o>ni||s<ni)&&l)&&(o++,o===ln&&o++),o>_h&&(o=o-_h+Pu-1);var u=String.fromCharCode(a)+String.fromCharCode(o);return u}function $m(r){if(r&&r.length===0)throw"MGRSPoint coverting from nothing";for(var t=r.length,e=null,n="",i,s=0;!/[A-Z]/.test(i=r.charAt(s));){if(s>=2)throw"MGRSPoint bad conversion from: "+r;n+=i,s++}var a=parseInt(n,10);if(s===0||s+3>t)throw"MGRSPoint bad conversion from: "+r;var o=r.charAt(s++);if(o<="A"||o==="B"||o==="Y"||o>="Z"||o==="I"||o==="O")throw"MGRSPoint zone letter "+o+" not handled: "+r;e=r.substring(s,s+=2);for(var l=Zm(a),u=Lw(e.charAt(0),l),c=Rw(e.charAt(1),l);c<Fw(o);)c+=2e6;var h=t-s;if(h%2!==0)throw`MGRSPoint has to have an even number
|
|
28
28
|
of digits after the zone letter and two 100km letters - front
|
|
29
29
|
half for easting meters, second half for
|
|
30
|
-
northing meters`+r;var f=h/2,g=0,m=0,_,E,M,y,w;return f>0&&(_=1e5/Math.pow(10,f),E=r.substring(s,s+f),g=parseFloat(E)*_,M=r.substring(s+f),m=parseFloat(M)*_),y=g+u,w=m+c,{easting:y,northing:w,zoneLetter:o,zoneNumber:a,accuracy:_}}function Lw(r,t){for(var e=Ym.charCodeAt(t-1),n=1e5,i=!1;e!==r.charCodeAt(0);){if(e++,e===ln&&e++,e===ii&&e++,e>wh){if(i)throw"Bad character: "+r;e=Pu,i=!0}n+=1e5}return n}function Rw(r,t){if(r>"V")throw"MGRSPoint given invalid Northing "+r;for(var e=Jm.charCodeAt(t-1),n=0,i=!1;e!==r.charCodeAt(0);){if(e++,e===ln&&e++,e===ii&&e++,e>_h){if(i)throw"Bad character: "+r;e=Pu,i=!0}n+=1e5}return n}function Fw(r){var t;switch(r){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+r}function Cu(r,t,e){if(!(this instanceof Cu))return new Cu(r,t,e);if(Array.isArray(r))this.x=r[0],this.y=r[1],this.z=r[2]||0;else if(typeof r=="object")this.x=r.x,this.y=r.y,this.z=r.z||0;else if(typeof r=="string"&&typeof t>"u"){var n=r.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=r,this.y=t,this.z=e||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Cu.fromMGRS=function(r){return new Cu(Qm(r))},Cu.prototype.toMGRS=function(r){return Km([this.x,this.y],r)};var Gw=1,kw=.25,jm=.046875,t0=.01953125,e0=.01068115234375,zw=.75,Vw=.46875,Uw=.013020833333333334,qw=.007120768229166667,Ww=.3645833333333333,Hw=.005696614583333333,Xw=.3076171875;function Sd(r){var t=[];t[0]=Gw-r*(kw+r*(jm+r*(t0+r*e0))),t[1]=r*(zw-r*(jm+r*(t0+r*e0)));var e=r*r;return t[2]=e*(Vw-r*(Uw+r*qw)),e*=r,t[3]=e*(Ww-r*Hw),t[4]=e*r*Xw,t}function Iu(r,t,e,n){return e*=t,t*=t,n[0]*r-e*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))}var Yw=20;function Pd(r,t,e){for(var n=1/(1-t),i=r,s=Yw;s;--s){var a=Math.sin(i),o=1-t*a*a;if(o=(Iu(i,a,Math.cos(i),e)-r)*(o*Math.sqrt(o))*n,i-=o,Math.abs(o)<st)return i}return i}function Jw(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=Sd(this.es),this.ml0=Iu(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function Kw(r){var t=r.x,e=r.y,n=ht(t-this.long0),i,s,a,o=Math.sin(e),l=Math.cos(e);if(this.es){var c=l*n,h=Math.pow(c,2),f=this.ep2*Math.pow(l,2),g=Math.pow(f,2),m=Math.abs(l)>st?Math.tan(e):0,_=Math.pow(m,2),E=Math.pow(_,2);i=1-this.es*Math.pow(o,2),c=c/Math.sqrt(i);var M=Iu(e,o,l,this.en);s=this.a*(this.k0*c*(1+h/6*(1-_+f+h/20*(5-18*_+E+14*f-58*_*f+h/42*(61+179*E-E*_-479*_)))))+this.x0,a=this.a*(this.k0*(M-this.ml0+o*n*c/2*(1+h/12*(5-_+9*f+4*g+h/30*(61+E-58*_+270*f-330*_*f+h/56*(1385+543*E-E*_-3111*_))))))+this.y0}else{var u=l*Math.sin(n);if(Math.abs(Math.abs(u)-1)<st)return 93;if(s=.5*this.a*this.k0*Math.log((1+u)/(1-u))+this.x0,a=l*Math.cos(n)/Math.sqrt(1-Math.pow(u,2)),u=Math.abs(a),u>=1){if(u-1>st)return 93;a=0}else a=Math.acos(a);e<0&&(a=-a),a=this.a*this.k0*(a-this.lat0)+this.y0}return r.x=s,r.y=a,r}function Qw(r){var t,e,n,i,s=(r.x-this.x0)*(1/this.a),a=(r.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+a/this.k0,e=Pd(t,this.es,this.en),Math.abs(e)<Q){var h=Math.sin(e),f=Math.cos(e),g=Math.abs(f)>st?Math.tan(e):0,m=this.ep2*Math.pow(f,2),_=Math.pow(m,2),E=Math.pow(g,2),M=Math.pow(E,2);t=1-this.es*Math.pow(h,2);var y=s*Math.sqrt(t)/this.k0,w=Math.pow(y,2);t=t*g,n=e-t*w/(1-this.es)*.5*(1-w/12*(5+3*E-9*m*E+m-4*_-w/30*(61+90*E-252*m*E+45*M+46*m-w/56*(1385+3633*E+4095*M+1574*M*E)))),i=ht(this.long0+y*(1-w/6*(1+2*E+m-w/20*(5+28*E+24*M+8*m*E+6*m-w/42*(61+662*E+1320*M+720*M*E))))/f)}else n=Q*vh(a),i=0;else{var o=Math.exp(s/this.k0),l=.5*(o-1/o),u=this.lat0+a/this.k0,c=Math.cos(u);t=Math.sqrt((1-Math.pow(c,2))/(1+Math.pow(l,2))),n=Math.asin(t),a<0&&(n=-n),l===0&&c===0?i=0:i=ht(Math.atan2(l,c)+this.long0)}return r.x=i,r.y=n,r}var Bw=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const Uc={init:Jw,forward:Kw,inverse:Qw,names:Bw};function r0(r){var t=Math.exp(r);return t=(t-1/t)/2,t}function un(r,t){r=Math.abs(r),t=Math.abs(t);var e=Math.max(r,t),n=Math.min(r,t)/(e||1);return e*Math.sqrt(1+Math.pow(n,2))}function Zw(r){var t=1+r,e=t-1;return e===0?r:r*Math.log(t)/e}function $w(r){var t=Math.abs(r);return t=Zw(t*(1+t/(un(1,t)+1))),r<0?-t:t}function Cd(r,t){for(var e=2*Math.cos(2*t),n=r.length-1,i=r[n],s=0,a;--n>=0;)a=-s+e*i+r[n],s=i,i=a;return t+a*Math.sin(2*t)}function jw(r,t){for(var e=2*Math.cos(t),n=r.length-1,i=r[n],s=0,a;--n>=0;)a=-s+e*i+r[n],s=i,i=a;return Math.sin(t)*a}function tE(r){var t=Math.exp(r);return t=(t+1/t)/2,t}function n0(r,t,e){for(var n=Math.sin(t),i=Math.cos(t),s=r0(e),a=tE(e),o=2*i*a,l=-2*n*s,u=r.length-1,c=r[u],h=0,f=0,g=0,m,_;--u>=0;)m=f,_=h,f=c,h=g,c=-m+o*f-l*h+r[u],g=-_+l*f+o*h;return o=n*a,l=i*s,[o*c-l*g,o*g+l*c]}function eE(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Uc.init.apply(this),this.forward=Uc.forward,this.inverse=Uc.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var r=this.es/(1+Math.sqrt(1-this.es)),t=r/(2-r),e=t;this.cgb[0]=t*(2+t*(-.6666666666666666+t*(-2+t*(2.577777777777778+t*(.5777777777777777+t*-4.228148148148148))))),this.cbg[0]=t*(-2+t*(.6666666666666666+t*(1.3333333333333333+t*(-1.8222222222222222+t*(.7111111111111111+t*.9824338624338624))))),e=e*t,this.cgb[1]=e*(2.3333333333333335+t*(-1.6+t*(-5.044444444444444+t*(8.584126984126984+t*2.458201058201058)))),this.cbg[1]=e*(1.6666666666666667+t*(-1.0666666666666667+t*(-1.4444444444444444+t*(2.86984126984127+t*-1.6105820105820106)))),e=e*t,this.cgb[2]=e*(3.7333333333333334+t*(-3.8857142857142857+t*(-12.019047619047619+t*26.03668430335097))),this.cbg[2]=e*(-1.7333333333333334+t*(1.619047619047619+t*(1.6+t*-4.474779541446208))),e=e*t,this.cgb[3]=e*(6.792063492063492+t*(-9.485714285714286+t*-28.188500881834216)),this.cbg[3]=e*(1.9634920634920634+t*(-2.4+t*-1.7518165784832451)),e=e*t,this.cgb[4]=e*(13.250793650793652+t*-23.22238255571589),this.cbg[4]=e*(-2.3301587301587303+t*3.5144460477793813),e=e*t,this.cgb[5]=e*27.011268237934903,this.cbg[5]=e*2.8496841430174764,e=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+e*(.25+e*(.015625+e/256))),this.utg[0]=t*(-.5+t*(.6666666666666666+t*(-.3854166666666667+t*(.002777777777777778+t*(.158203125+t*-.15905919312169312))))),this.gtu[0]=t*(.5+t*(-.6666666666666666+t*(.3125+t*(.22777777777777777+t*(-.4409722222222222+t*.20875661375661375))))),this.utg[1]=e*(-.020833333333333332+t*(-.06666666666666667+t*(.3034722222222222+t*(-.4380952380952381+t*.2890188388723545)))),this.gtu[1]=e*(.2708333333333333+t*(-.6+t*(.38680555555555557+t*(.44603174603174606+t*-1.0248393063822752)))),e=e*t,this.utg[2]=e*(-.035416666666666666+t*(.04404761904761905+t*(.046651785714285715+t*-.06138668430335097))),this.gtu[2]=e*(.25416666666666665+t*(-.7357142857142858+t*(.5603050595238095+t*.9237378747795415))),e=e*t,this.utg[3]=e*(-.02726314484126984+t*(.021825396825396824+t*.11439745921516754)),this.gtu[3]=e*(.30729786706349205+t*(-1.0654761904761905+t*.9096203979276896)),e=e*t,this.utg[4]=e*(-.02841641865079365+t*.027268468414301746),this.gtu[4]=e*(.4306671626984127+t*-1.713007555715889),e=e*t,this.utg[5]=e*-.03233083094085698,this.gtu[5]=e*.6650675310896665;var n=Cd(this.cbg,this.lat0);this.Zb=-this.Qn*(n+jw(this.gtu,2*n))}function rE(r){var t=ht(r.x-this.long0),e=r.y;e=Cd(this.cbg,e);var n=Math.sin(e),i=Math.cos(e),s=Math.sin(t),a=Math.cos(t);e=Math.atan2(n,a*i),t=Math.atan2(s*i,un(n,i*a)),t=$w(Math.tan(t));var o=n0(this.gtu,2*e,2*t);e=e+o[0],t=t+o[1];var l,u;return Math.abs(t)<=2.623395162778?(l=this.a*(this.Qn*t)+this.x0,u=this.a*(this.Qn*e+this.Zb)+this.y0):(l=1/0,u=1/0),r.x=l,r.y=u,r}function nE(r){var t=(r.x-this.x0)*(1/this.a),e=(r.y-this.y0)*(1/this.a);e=(e-this.Zb)/this.Qn,t=t/this.Qn;var n,i;if(Math.abs(t)<=2.623395162778){var s=n0(this.utg,2*e,2*t);e=e+s[0],t=t+s[1],t=Math.atan(r0(t));var a=Math.sin(e),o=Math.cos(e),l=Math.sin(t),u=Math.cos(t);e=Math.atan2(a*u,un(l,u*o)),t=Math.atan2(l,u*o),n=ht(t+this.long0),i=Cd(this.cgb,e)}else n=1/0,i=1/0;return r.x=n,r.y=i,r}var iE=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];const qc={init:eE,forward:rE,inverse:nE,names:iE};function sE(r,t){if(r===void 0){if(r=Math.floor((ht(t)+Math.PI)*30/Math.PI)+1,r<0)return 0;if(r>60)return 60}return r}var aE="etmerc";function oE(){var r=sE(this.zone,this.long0);if(r===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(r)-183)*de,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,qc.init.apply(this),this.forward=qc.forward,this.inverse=qc.inverse}var lE=["Universal Transverse Mercator System","utm"];const uE={init:oE,names:lE,dependsOn:aE};function Id(r,t){return Math.pow((1-r)/(1+r),t)}var hE=20;function cE(){var r=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*r*r),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(r/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+ee)/(Math.pow(Math.tan(.5*this.lat0+ee),this.C)*Id(this.e*r,this.ratexp))}function fE(r){var t=r.x,e=r.y;return r.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*e+ee),this.C)*Id(this.e*Math.sin(e),this.ratexp))-Q,r.x=this.C*t,r}function dE(r){for(var t=1e-14,e=r.x/this.C,n=r.y,i=Math.pow(Math.tan(.5*n+ee)/this.K,1/this.C),s=hE;s>0&&(n=2*Math.atan(i*Id(this.e*Math.sin(r.y),-.5*this.e))-Q,!(Math.abs(n-r.y)<t));--s)r.y=n;return s?(r.x=e,r.y=n,r):null}const Md={init:cE,forward:fE,inverse:dE};function pE(){Md.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function gE(r){var t,e,n,i;return r.x=ht(r.x-this.long0),Md.forward.apply(this,[r]),t=Math.sin(r.y),e=Math.cos(r.y),n=Math.cos(r.x),i=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*e*n),r.x=i*e*Math.sin(r.x),r.y=i*(this.cosc0*t-this.sinc0*e*n),r.x=this.a*r.x+this.x0,r.y=this.a*r.y+this.y0,r}function mE(r){var t,e,n,i,s;if(r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a,r.x/=this.k0,r.y/=this.k0,s=un(r.x,r.y)){var a=2*Math.atan2(s,this.R2);t=Math.sin(a),e=Math.cos(a),i=Math.asin(e*this.sinc0+r.y*t*this.cosc0/s),n=Math.atan2(r.x*t,s*this.cosc0*e-r.y*this.sinc0*t)}else i=this.phic0,n=0;return r.x=n,r.y=i,Md.inverse.apply(this,[r]),r.x=ht(r.x+this.long0),r}var vE=["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const yE={init:pE,forward:gE,inverse:mE,names:vE};function _E(r,t,e){return t*=e,Math.tan(.5*(Q+r))*Math.pow((1-t)/(1+t),.5*e)}function wE(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=st&&(this.k0=.5*(1+vh(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=st&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=st&&Math.abs(Math.cos(this.lat_ts))>st&&(this.k0=.5*this.cons*ji(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Ni(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=ji(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-Q,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function EE(r){var t=r.x,e=r.y,n=Math.sin(e),i=Math.cos(e),s,a,o,l,u,c,h=ht(t-this.long0);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=st&&Math.abs(e+this.lat0)<=st?(r.x=NaN,r.y=NaN,r):this.sphere?(s=2*this.k0/(1+this.sinlat0*n+this.coslat0*i*Math.cos(h)),r.x=this.a*s*i*Math.sin(h)+this.x0,r.y=this.a*s*(this.coslat0*n-this.sinlat0*i*Math.cos(h))+this.y0,r):(a=2*Math.atan(this.ssfn_(e,n,this.e))-Q,l=Math.cos(a),o=Math.sin(a),Math.abs(this.coslat0)<=st?(u=Ni(this.e,e*this.con,this.con*n),c=2*this.a*this.k0*u/this.cons,r.x=this.x0+c*Math.sin(t-this.long0),r.y=this.y0-this.con*c*Math.cos(t-this.long0),r):(Math.abs(this.sinlat0)<st?(s=2*this.a*this.k0/(1+l*Math.cos(h)),r.y=s*o):(s=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*o+this.cosX0*l*Math.cos(h))),r.y=s*(this.cosX0*o-this.sinX0*l*Math.cos(h))+this.y0),r.x=s*l*Math.sin(h)+this.x0,r))}function SE(r){r.x-=this.x0,r.y-=this.y0;var t,e,n,i,s,a=Math.sqrt(r.x*r.x+r.y*r.y);if(this.sphere){var o=2*Math.atan(a/(2*this.a*this.k0));return t=this.long0,e=this.lat0,a<=st?(r.x=t,r.y=e,r):(e=Math.asin(Math.cos(o)*this.sinlat0+r.y*Math.sin(o)*this.coslat0/a),Math.abs(this.coslat0)<st?this.lat0>0?t=ht(this.long0+Math.atan2(r.x,-1*r.y)):t=ht(this.long0+Math.atan2(r.x,r.y)):t=ht(this.long0+Math.atan2(r.x*Math.sin(o),a*this.coslat0*Math.cos(o)-r.y*this.sinlat0*Math.sin(o))),r.x=t,r.y=e,r)}else if(Math.abs(this.coslat0)<=st){if(a<=st)return e=this.lat0,t=this.long0,r.x=t,r.y=e,r;r.x*=this.con,r.y*=this.con,n=a*this.cons/(2*this.a*this.k0),e=this.con*yh(this.e,n),t=this.con*ht(this.con*this.long0+Math.atan2(r.x,-1*r.y))}else i=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,a<=st?s=this.X0:(s=Math.asin(Math.cos(i)*this.sinX0+r.y*Math.sin(i)*this.cosX0/a),t=ht(this.long0+Math.atan2(r.x*Math.sin(i),a*this.cosX0*Math.cos(i)-r.y*this.sinX0*Math.sin(i)))),e=-1*yh(this.e,Math.tan(.5*(Q+s)));return r.x=t,r.y=e,r}var PE=["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"];const CE={init:wE,forward:EE,inverse:SE,names:PE,ssfn_:_E};function IE(){var r=this.lat0;this.lambda0=this.long0;var t=Math.sin(r),e=this.a,n=this.rf,i=1/n,s=2*i-Math.pow(i,2),a=this.e=Math.sqrt(s);this.R=this.k0*e*Math.sqrt(1-s)/(1-s*Math.pow(t,2)),this.alpha=Math.sqrt(1+s/(1-s)*Math.pow(Math.cos(r),4)),this.b0=Math.asin(t/this.alpha);var o=Math.log(Math.tan(Math.PI/4+this.b0/2)),l=Math.log(Math.tan(Math.PI/4+r/2)),u=Math.log((1+a*t)/(1-a*t));this.K=o-this.alpha*l+this.alpha*a/2*u}function ME(r){var t=Math.log(Math.tan(Math.PI/4-r.y/2)),e=this.e/2*Math.log((1+this.e*Math.sin(r.y))/(1-this.e*Math.sin(r.y))),n=-this.alpha*(t+e)+this.K,i=2*(Math.atan(Math.exp(n))-Math.PI/4),s=this.alpha*(r.x-this.lambda0),a=Math.atan(Math.sin(s)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(s))),o=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(s));return r.y=this.R/2*Math.log((1+Math.sin(o))/(1-Math.sin(o)))+this.y0,r.x=this.R*a+this.x0,r}function NE(r){for(var t=r.x-this.x0,e=r.y-this.y0,n=t/this.R,i=2*(Math.atan(Math.exp(e/this.R))-Math.PI/4),s=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(i))),o=this.lambda0+a/this.alpha,l=0,u=s,c=-1e3,h=0;Math.abs(u-c)>1e-7;){if(++h>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+s/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(u))/2)),c=u,u=2*Math.atan(Math.exp(l))-Math.PI/2}return r.x=o,r.y=u,r}var bE=["somerc"];const TE={init:IE,forward:ME,inverse:NE,names:bE};var Mu=1e-7;function DE(r){var t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],e=typeof r.projName=="object"?Object.keys(r.projName)[0]:r.projName;return"no_uoff"in r||"no_off"in r||t.indexOf(e)!==-1||t.indexOf(Am(e))!==-1}function xE(){var r,t,e,n,i,s,a,o,l,u,c=0,h,f=0,g=0,m=0,_=0,E=0,M=0;this.no_off=DE(this),this.no_rot="no_rot"in this;var y=!1;"alpha"in this&&(y=!0);var w=!1;if("rectified_grid_angle"in this&&(w=!0),y&&(M=this.alpha),w&&(c=this.rectified_grid_angle),y||w)f=this.longc;else if(g=this.long1,_=this.lat1,m=this.long2,E=this.lat2,Math.abs(_-E)<=Mu||(r=Math.abs(_))<=Mu||Math.abs(r-Q)<=Mu||Math.abs(Math.abs(this.lat0)-Q)<=Mu||Math.abs(Math.abs(E)-Q)<=Mu)throw new Error;var v=1-this.es;t=Math.sqrt(v),Math.abs(this.lat0)>st?(o=Math.sin(this.lat0),e=Math.cos(this.lat0),r=1-this.es*o*o,this.B=e*e,this.B=Math.sqrt(1+this.es*this.B*this.B/v),this.A=this.B*this.k0*t/r,n=this.B*t/(e*Math.sqrt(r)),i=n*n-1,i<=0?i=0:(i=Math.sqrt(i),this.lat0<0&&(i=-i)),this.E=i+=n,this.E*=Math.pow(Ni(this.e,this.lat0,o),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=i=1),y||w?(y?(h=Math.asin(Math.sin(M)/n),w||(c=M)):(h=c,M=Math.asin(n*Math.sin(h))),this.lam0=f-Math.asin(.5*(i-1/i)*Math.tan(h))/this.B):(s=Math.pow(Ni(this.e,_,Math.sin(_)),this.B),a=Math.pow(Ni(this.e,E,Math.sin(E)),this.B),i=this.E/s,l=(a-s)/(a+s),u=this.E*this.E,u=(u-a*s)/(u+a*s),r=g-m,r<-Math.pi?m-=gh:r>Math.pi&&(m+=gh),this.lam0=ht(.5*(g+m)-Math.atan(u*Math.tan(.5*this.B*(g-m))/l)/this.B),h=Math.atan(2*Math.sin(this.B*ht(g-this.lam0))/(i-1/i)),c=M=Math.asin(n*Math.sin(h))),this.singam=Math.sin(h),this.cosgam=Math.cos(h),this.sinrot=Math.sin(c),this.cosrot=Math.cos(c),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(M))),this.lat0<0&&(this.u_0=-this.u_0)),i=.5*h,this.v_pole_n=this.ArB*Math.log(Math.tan(ee-i)),this.v_pole_s=this.ArB*Math.log(Math.tan(ee+i))}function OE(r){var t={},e,n,i,s,a,o,l,u;if(r.x=r.x-this.lam0,Math.abs(Math.abs(r.y)-Q)>st){if(a=this.E/Math.pow(Ni(this.e,r.y,Math.sin(r.y)),this.B),o=1/a,e=.5*(a-o),n=.5*(a+o),s=Math.sin(this.B*r.x),i=(e*this.singam-s*this.cosgam)/n,Math.abs(Math.abs(i)-1)<st)throw new Error;u=.5*this.ArB*Math.log((1-i)/(1+i)),o=Math.cos(this.B*r.x),Math.abs(o)<Mu?l=this.A*r.x:l=this.ArB*Math.atan2(e*this.cosgam+s*this.singam,o)}else u=r.y>0?this.v_pole_n:this.v_pole_s,l=this.ArB*r.y;return this.no_rot?(t.x=l,t.y=u):(l-=this.u_0,t.x=u*this.cosrot+l*this.sinrot,t.y=l*this.cosrot-u*this.sinrot),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function AE(r){var t,e,n,i,s,a,o,l={};if(r.x=(r.x-this.x0)*(1/this.a),r.y=(r.y-this.y0)*(1/this.a),this.no_rot?(e=r.y,t=r.x):(e=r.x*this.cosrot-r.y*this.sinrot,t=r.y*this.cosrot+r.x*this.sinrot+this.u_0),n=Math.exp(-this.BrA*e),i=.5*(n-1/n),s=.5*(n+1/n),a=Math.sin(this.BrA*t),o=(a*this.cosgam+i*this.singam)/s,Math.abs(Math.abs(o)-1)<st)l.x=0,l.y=o<0?-Q:Q;else{if(l.y=this.E/Math.sqrt((1+o)/(1-o)),l.y=yh(this.e,Math.pow(l.y,1/this.B)),l.y===1/0)throw new Error;l.x=-this.rB*Math.atan2(i*this.cosgam-a*this.singam,Math.cos(this.BrA*t))}return l.x+=this.lam0,l}var LE=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];const RE={init:xE,forward:OE,inverse:AE,names:LE};function FE(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<st)){var r=this.b/this.a;this.e=Math.sqrt(1-r*r);var t=Math.sin(this.lat1),e=Math.cos(this.lat1),n=ji(this.e,t,e),i=Ni(this.e,this.lat1,t),s=Math.sin(this.lat2),a=Math.cos(this.lat2),o=ji(this.e,s,a),l=Ni(this.e,this.lat2,s),u=Math.abs(Math.abs(this.lat0)-Q)<st?0:Ni(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>st?this.ns=Math.log(n/o)/Math.log(i/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(i,this.ns)),this.rh=this.a*this.f0*Math.pow(u,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function GE(r){var t=r.x,e=r.y;Math.abs(2*Math.abs(e)-Math.PI)<=st&&(e=vh(e)*(Q-2*st));var n=Math.abs(Math.abs(e)-Q),i,s;if(n>st)i=Ni(this.e,e,Math.sin(e)),s=this.a*this.f0*Math.pow(i,this.ns);else{if(n=e*this.ns,n<=0)return null;s=0}var a=this.ns*ht(t-this.long0);return r.x=this.k0*(s*Math.sin(a))+this.x0,r.y=this.k0*(this.rh-s*Math.cos(a))+this.y0,r}function kE(r){var t,e,n,i,s,a=(r.x-this.x0)/this.k0,o=this.rh-(r.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(a*a+o*o),e=1):(t=-Math.sqrt(a*a+o*o),e=-1);var l=0;if(t!==0&&(l=Math.atan2(e*a,e*o)),t!==0||this.ns>0){if(e=1/this.ns,n=Math.pow(t/(this.a*this.f0),e),i=yh(this.e,n),i===-9999)return null}else i=-Q;return s=ht(l/this.ns+this.long0),r.x=s,r.y=i,r}var zE=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const VE={init:FE,forward:GE,inverse:kE,names:zE};function UE(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function qE(r){var t,e,n,i,s,a,o,l=r.x,u=r.y,c=ht(l-this.long0);return t=Math.pow((1+this.e*Math.sin(u))/(1-this.e*Math.sin(u)),this.alfa*this.e/2),e=2*(Math.atan(this.k*Math.pow(Math.tan(u/2+this.s45),this.alfa)/t)-this.s45),n=-c*this.alfa,i=Math.asin(Math.cos(this.ad)*Math.sin(e)+Math.sin(this.ad)*Math.cos(e)*Math.cos(n)),s=Math.asin(Math.cos(e)*Math.sin(n)/Math.cos(i)),a=this.n*s,o=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(i/2+this.s45),this.n),r.y=o*Math.cos(a)/1,r.x=o*Math.sin(a)/1,this.czech||(r.y*=-1,r.x*=-1),r}function WE(r){var t,e,n,i,s,a,o,l,u=r.x;r.x=r.y,r.y=u,this.czech||(r.y*=-1,r.x*=-1),a=Math.sqrt(r.x*r.x+r.y*r.y),s=Math.atan2(r.y,r.x),i=s/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/a,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(i)),e=Math.asin(Math.cos(n)*Math.sin(i)/Math.cos(t)),r.x=this.long0-e/this.alfa,o=t,l=0;var c=0;do r.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(o))/(1-this.e*Math.sin(o)),this.e/2))-this.s45),Math.abs(o-r.y)<1e-10&&(l=1),o=r.y,c+=1;while(l===0&&c<15);return c>=15?null:r}var HE=["Krovak","krovak"];const XE={init:UE,forward:qE,inverse:WE,names:HE};function Yr(r,t,e,n,i){return r*i-t*Math.sin(2*i)+e*Math.sin(4*i)-n*Math.sin(6*i)}function Eh(r){return 1-.25*r*(1+r/16*(3+1.25*r))}function Sh(r){return .375*r*(1+.25*r*(1+.46875*r))}function Ph(r){return .05859375*r*r*(1+.75*r)}function Ch(r){return r*r*r*.011393229166666666}function Nd(r,t,e){var n=t*e;return r/Math.sqrt(1-n*n)}function pa(r){return Math.abs(r)<Q?r:r-vh(r)*Math.PI}function Wc(r,t,e,n,i){var s,a;s=r/t;for(var o=0;o<15;o++)if(a=(r-(t*s-e*Math.sin(2*s)+n*Math.sin(4*s)-i*Math.sin(6*s)))/(t-2*e*Math.cos(2*s)+4*n*Math.cos(4*s)-6*i*Math.cos(6*s)),s+=a,Math.abs(a)<=1e-10)return s;return NaN}function YE(){this.sphere||(this.e0=Eh(this.es),this.e1=Sh(this.es),this.e2=Ph(this.es),this.e3=Ch(this.es),this.ml0=this.a*Yr(this.e0,this.e1,this.e2,this.e3,this.lat0))}function JE(r){var t,e,n=r.x,i=r.y;if(n=ht(n-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(i)*Math.sin(n)),e=this.a*(Math.atan2(Math.tan(i),Math.cos(n))-this.lat0);else{var s=Math.sin(i),a=Math.cos(i),o=Nd(this.a,this.e,s),l=Math.tan(i)*Math.tan(i),u=n*Math.cos(i),c=u*u,h=this.es*a*a/(1-this.es),f=this.a*Yr(this.e0,this.e1,this.e2,this.e3,i);t=o*u*(1-c*l*(.16666666666666666-(8-l+8*h)*c/120)),e=f-this.ml0+o*s/a*c*(.5+(5-l+6*h)*c/24)}return r.x=t+this.x0,r.y=e+this.y0,r}function KE(r){r.x-=this.x0,r.y-=this.y0;var t=r.x/this.a,e=r.y/this.a,n,i;if(this.sphere){var s=e+this.lat0;n=Math.asin(Math.sin(s)*Math.cos(t)),i=Math.atan2(Math.tan(t),Math.cos(s))}else{var a=this.ml0/this.a+e,o=Wc(a,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(o)-Q)<=st)return r.x=this.long0,r.y=Q,e<0&&(r.y*=-1),r;var l=Nd(this.a,this.e,Math.sin(o)),u=l*l*l/this.a/this.a*(1-this.es),c=Math.pow(Math.tan(o),2),h=t*this.a/l,f=h*h;n=o-l*Math.tan(o)/u*h*h*(.5-(1+3*c)*h*h/24),i=h*(1-f*(c/3+(1+3*c)*c*f/15))/Math.cos(o)}return r.x=ht(i+this.long0),r.y=pa(n),r}var QE=["Cassini","Cassini_Soldner","cass"];const BE={init:YE,forward:JE,inverse:KE,names:QE};function ga(r,t){var e;return r>1e-7?(e=r*t,(1-r*r)*(t/(1-e*e)-.5/r*Math.log((1-e)/(1+e)))):2*t}var ZE=1,$E=2,jE=3,tS=4;function eS(){var r=Math.abs(this.lat0);if(Math.abs(r-Q)<st?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(r)<st?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var t;switch(this.qp=ga(this.e,1),this.mmf=.5/(1-this.es),this.apa=hS(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=ga(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function rS(r){var t,e,n,i,s,a,o,l,u,c,h=r.x,f=r.y;if(h=ht(h-this.long0),this.sphere){if(s=Math.sin(f),c=Math.cos(f),n=Math.cos(h),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e=this.mode===this.EQUIT?1+c*n:1+this.sinph0*s+this.cosph0*c*n,e<=st)return null;e=Math.sqrt(2/e),t=e*c*Math.sin(h),e*=this.mode===this.EQUIT?s:this.cosph0*s-this.sinph0*c*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(f+this.lat0)<st)return null;e=ee-f*.5,e=2*(this.mode===this.S_POLE?Math.cos(e):Math.sin(e)),t=e*Math.sin(h),e*=n}}else{switch(o=0,l=0,u=0,n=Math.cos(h),i=Math.sin(h),s=Math.sin(f),a=ga(this.e,s),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(o=a/this.qp,l=Math.sqrt(1-o*o)),this.mode){case this.OBLIQ:u=1+this.sinb1*o+this.cosb1*l*n;break;case this.EQUIT:u=1+l*n;break;case this.N_POLE:u=Q+f,a=this.qp-a;break;case this.S_POLE:u=f-Q,a=this.qp+a;break}if(Math.abs(u)<st)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:u=Math.sqrt(2/u),this.mode===this.OBLIQ?e=this.ymf*u*(this.cosb1*o-this.sinb1*l*n):e=(u=Math.sqrt(2/(1+l*n)))*o*this.ymf,t=this.xmf*u*l*i;break;case this.N_POLE:case this.S_POLE:a>=0?(t=(u=Math.sqrt(a))*i,e=n*(this.mode===this.S_POLE?u:-u)):t=e=0;break}}return r.x=this.a*t+this.x0,r.y=this.a*e+this.y0,r}function nS(r){r.x-=this.x0,r.y-=this.y0;var t=r.x/this.a,e=r.y/this.a,n,i,s,a,o,l,u;if(this.sphere){var c=0,h,f=0;if(h=Math.sqrt(t*t+e*e),i=h*.5,i>1)return null;switch(i=2*Math.asin(i),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(f=Math.sin(i),c=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(h)<=st?0:Math.asin(e*f/h),t*=f,e=c*h;break;case this.OBLIQ:i=Math.abs(h)<=st?this.lat0:Math.asin(c*this.sinph0+e*f*this.cosph0/h),t*=f*this.cosph0,e=(c-Math.sin(i)*this.sinph0)*h;break;case this.N_POLE:e=-e,i=Q-i;break;case this.S_POLE:i-=Q;break}n=e===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(t,e)}else{if(u=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t/=this.dd,e*=this.dd,l=Math.sqrt(t*t+e*e),l<st)return r.x=this.long0,r.y=this.lat0,r;a=2*Math.asin(.5*l/this.rq),s=Math.cos(a),t*=a=Math.sin(a),this.mode===this.OBLIQ?(u=s*this.sinb1+e*a*this.cosb1/l,o=this.qp*u,e=l*this.cosb1*s-e*this.sinb1*a):(u=e*a/l,o=this.qp*u,e=l*s)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(e=-e),o=t*t+e*e,!o)return r.x=this.long0,r.y=this.lat0,r;u=1-o/this.qp,this.mode===this.S_POLE&&(u=-u)}n=Math.atan2(t,e),i=cS(Math.asin(u),this.apa)}return r.x=ht(this.long0+n),r.y=i,r}var iS=.3333333333333333,sS=.17222222222222222,aS=.10257936507936508,oS=.06388888888888888,lS=.0664021164021164,uS=.016415012942191543;function hS(r){var t,e=[];return e[0]=r*iS,t=r*r,e[0]+=t*sS,e[1]=t*oS,t*=r,e[0]+=t*aS,e[1]+=t*lS,e[2]=t*uS,e}function cS(r,t){var e=r+r;return r+t[0]*Math.sin(e)+t[1]*Math.sin(e+e)+t[2]*Math.sin(e+e+e)}var fS=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const dS={init:eS,forward:rS,inverse:nS,names:fS,S_POLE:ZE,N_POLE:$E,EQUIT:jE,OBLIQ:tS};function ma(r){return Math.abs(r)>1&&(r=r>1?1:-1),Math.asin(r)}function pS(){Math.abs(this.lat1+this.lat2)<st||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=ji(this.e3,this.sin_po,this.cos_po),this.qs1=ga(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=ji(this.e3,this.sin_po,this.cos_po),this.qs2=ga(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=ga(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>st?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function gS(r){var t=r.x,e=r.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var n=ga(this.e3,this.sin_phi),i=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,s=this.ns0*ht(t-this.long0),a=i*Math.sin(s)+this.x0,o=this.rh-i*Math.cos(s)+this.y0;return r.x=a,r.y=o,r}function mS(r){var t,e,n,i,s,a;return r.x-=this.x0,r.y=this.rh-r.y+this.y0,this.ns0>=0?(t=Math.sqrt(r.x*r.x+r.y*r.y),n=1):(t=-Math.sqrt(r.x*r.x+r.y*r.y),n=-1),i=0,t!==0&&(i=Math.atan2(n*r.x,n*r.y)),n=t*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(e=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,e)),s=ht(i/this.ns0+this.long0),r.x=s,r.y=a,r}function vS(r,t){var e,n,i,s,a,o=ma(.5*t);if(r<st)return o;for(var l=r*r,u=1;u<=25;u++)if(e=Math.sin(o),n=Math.cos(o),i=r*e,s=1-i*i,a=.5*s*s/n*(t/(1-l)-e/s+.5/r*Math.log((1-i)/(1+i))),o=o+a,Math.abs(a)<=1e-7)return o;return null}var yS=["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"];const _S={init:pS,forward:gS,inverse:mS,names:yS,phi1z:vS};function wS(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function ES(r){var t,e,n,i,s,a,o,l,u=r.x,c=r.y;return n=ht(u-this.long0),t=Math.sin(c),e=Math.cos(c),i=Math.cos(n),a=this.sin_p14*t+this.cos_p14*e*i,s=1,a>0||Math.abs(a)<=st?(o=this.x0+this.a*s*e*Math.sin(n)/a,l=this.y0+this.a*s*(this.cos_p14*t-this.sin_p14*e*i)/a):(o=this.x0+this.infinity_dist*e*Math.sin(n),l=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*e*i)),r.x=o,r.y=l,r}function SS(r){var t,e,n,i,s,a;return r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a,r.x/=this.k0,r.y/=this.k0,(t=Math.sqrt(r.x*r.x+r.y*r.y))?(i=Math.atan2(t,this.rc),e=Math.sin(i),n=Math.cos(i),a=ma(n*this.sin_p14+r.y*e*this.cos_p14/t),s=Math.atan2(r.x*e,t*this.cos_p14*n-r.y*this.sin_p14*e),s=ht(this.long0+s)):(a=this.phic0,s=0),r.x=s,r.y=a,r}var PS=["gnom"];const CS={init:wS,forward:ES,inverse:SS,names:PS};function IS(r,t){var e=1-(1-r*r)/(2*r)*Math.log((1-r)/(1+r));if(Math.abs(Math.abs(t)-e)<1e-6)return t<0?-1*Q:Q;for(var n=Math.asin(.5*t),i,s,a,o,l=0;l<30;l++)if(s=Math.sin(n),a=Math.cos(n),o=r*s,i=Math.pow(1-o*o,2)/(2*a)*(t/(1-r*r)-s/(1-o*o)+.5/r*Math.log((1-o)/(1+o))),n+=i,Math.abs(i)<=1e-10)return n;return NaN}function MS(){this.sphere||(this.k0=ji(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function NS(r){var t=r.x,e=r.y,n,i,s=ht(t-this.long0);if(this.sphere)n=this.x0+this.a*s*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(e)/Math.cos(this.lat_ts);else{var a=ga(this.e,Math.sin(e));n=this.x0+this.a*this.k0*s,i=this.y0+this.a*a*.5/this.k0}return r.x=n,r.y=i,r}function bS(r){r.x-=this.x0,r.y-=this.y0;var t,e;return this.sphere?(t=ht(this.long0+r.x/this.a/Math.cos(this.lat_ts)),e=Math.asin(r.y/this.a*Math.cos(this.lat_ts))):(e=IS(this.e,2*r.y*this.k0/this.a),t=ht(this.long0+r.x/(this.a*this.k0))),r.x=t,r.y=e,r}var TS=["cea"];const DS={init:MS,forward:NS,inverse:bS,names:TS};function xS(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function OS(r){var t=r.x,e=r.y,n=ht(t-this.long0),i=pa(e-this.lat0);return r.x=this.x0+this.a*n*this.rc,r.y=this.y0+this.a*i,r}function AS(r){var t=r.x,e=r.y;return r.x=ht(this.long0+(t-this.x0)/(this.a*this.rc)),r.y=pa(this.lat0+(e-this.y0)/this.a),r}var LS=["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"];const RS={init:xS,forward:OS,inverse:AS,names:LS};var i0=20;function FS(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Eh(this.es),this.e1=Sh(this.es),this.e2=Ph(this.es),this.e3=Ch(this.es),this.ml0=this.a*Yr(this.e0,this.e1,this.e2,this.e3,this.lat0)}function GS(r){var t=r.x,e=r.y,n,i,s,a=ht(t-this.long0);if(s=a*Math.sin(e),this.sphere)Math.abs(e)<=st?(n=this.a*a,i=-1*this.a*this.lat0):(n=this.a*Math.sin(s)/Math.tan(e),i=this.a*(pa(e-this.lat0)+(1-Math.cos(s))/Math.tan(e)));else if(Math.abs(e)<=st)n=this.a*a,i=-1*this.ml0;else{var o=Nd(this.a,this.e,Math.sin(e))/Math.tan(e);n=o*Math.sin(s),i=this.a*Yr(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+o*(1-Math.cos(s))}return r.x=n+this.x0,r.y=i+this.y0,r}function kS(r){var t,e,n,i,s,a,o,l,u;if(n=r.x-this.x0,i=r.y-this.y0,this.sphere)if(Math.abs(i+this.a*this.lat0)<=st)t=ht(n/this.a+this.long0),e=0;else{a=this.lat0+i/this.a,o=n*n/this.a/this.a+a*a,l=a;var c;for(s=i0;s;--s)if(c=Math.tan(l),u=-1*(a*(l*c+1)-l-.5*(l*l+o)*c)/((l-a)/c-1),l+=u,Math.abs(u)<=st){e=l;break}t=ht(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(e))}else if(Math.abs(i+this.ml0)<=st)e=0,t=ht(this.long0+n/this.a);else{a=(this.ml0+i)/this.a,o=n*n/this.a/this.a+a*a,l=a;var h,f,g,m,_;for(s=i0;s;--s)if(_=this.e*Math.sin(l),h=Math.sqrt(1-_*_)*Math.tan(l),f=this.a*Yr(this.e0,this.e1,this.e2,this.e3,l),g=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),m=f/this.a,u=(a*(h*m+1)-m-.5*h*(m*m+o))/(this.es*Math.sin(2*l)*(m*m+o-2*a*m)/(4*h)+(a-m)*(h*g-2/Math.sin(2*l))-g),l-=u,Math.abs(u)<=st){e=l;break}h=Math.sqrt(1-this.es*Math.pow(Math.sin(e),2))*Math.tan(e),t=ht(this.long0+Math.asin(n*h/this.a)/Math.sin(e))}return r.x=t,r.y=e,r}var zS=["Polyconic","American_Polyconic","poly"];const VS={init:FS,forward:GS,inverse:kS,names:zS};function US(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function qS(r){var t,e=r.x,n=r.y,i=n-this.lat0,s=e-this.long0,a=i/ph*1e-5,o=s,l=1,u=0;for(t=1;t<=10;t++)l=l*a,u=u+this.A[t]*l;var c=u,h=o,f=1,g=0,m,_,E=0,M=0;for(t=1;t<=6;t++)m=f*c-g*h,_=g*c+f*h,f=m,g=_,E=E+this.B_re[t]*f-this.B_im[t]*g,M=M+this.B_im[t]*f+this.B_re[t]*g;return r.x=M*this.a+this.x0,r.y=E*this.a+this.y0,r}function WS(r){var t,e=r.x,n=r.y,i=e-this.x0,s=n-this.y0,a=s/this.a,o=i/this.a,l=1,u=0,c,h,f=0,g=0;for(t=1;t<=6;t++)c=l*a-u*o,h=u*a+l*o,l=c,u=h,f=f+this.C_re[t]*l-this.C_im[t]*u,g=g+this.C_im[t]*l+this.C_re[t]*u;for(var m=0;m<this.iterations;m++){var _=f,E=g,M,y,w=a,v=o;for(t=2;t<=6;t++)M=_*f-E*g,y=E*f+_*g,_=M,E=y,w=w+(t-1)*(this.B_re[t]*_-this.B_im[t]*E),v=v+(t-1)*(this.B_im[t]*_+this.B_re[t]*E);_=1,E=0;var S=this.B_re[1],P=this.B_im[1];for(t=2;t<=6;t++)M=_*f-E*g,y=E*f+_*g,_=M,E=y,S=S+t*(this.B_re[t]*_-this.B_im[t]*E),P=P+t*(this.B_im[t]*_+this.B_re[t]*E);var I=S*S+P*P;f=(w*S+v*P)/I,g=(v*S-w*P)/I}var b=f,D=g,O=1,T=0;for(t=1;t<=9;t++)O=O*b,T=T+this.D[t]*O;var x=this.lat0+T*ph*1e5,R=this.long0+D;return r.x=R,r.y=x,r}var HS=["New_Zealand_Map_Grid","nzmg"];const XS={init:US,forward:qS,inverse:WS,names:HS};function YS(){}function JS(r){var t=r.x,e=r.y,n=ht(t-this.long0),i=this.x0+this.a*n,s=this.y0+this.a*Math.log(Math.tan(Math.PI/4+e/2.5))*1.25;return r.x=i,r.y=s,r}function KS(r){r.x-=this.x0,r.y-=this.y0;var t=ht(this.long0+r.x/this.a),e=2.5*(Math.atan(Math.exp(.8*r.y/this.a))-Math.PI/4);return r.x=t,r.y=e,r}var QS=["Miller_Cylindrical","mill"];const BS={init:YS,forward:JS,inverse:KS,names:QS};var ZS=20;function $S(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Sd(this.es)}function jS(r){var t,e,n=r.x,i=r.y;if(n=ht(n-this.long0),this.sphere){if(!this.m)i=this.n!==1?Math.asin(this.n*Math.sin(i)):i;else for(var s=this.n*Math.sin(i),a=ZS;a;--a){var o=(this.m*i+Math.sin(i)-s)/(this.m+Math.cos(i));if(i-=o,Math.abs(o)<st)break}t=this.a*this.C_x*n*(this.m+Math.cos(i)),e=this.a*this.C_y*i}else{var l=Math.sin(i),u=Math.cos(i);e=this.a*Iu(i,l,u,this.en),t=this.a*n*u/Math.sqrt(1-this.es*l*l)}return r.x=t,r.y=e,r}function tP(r){var t,e,n,i;return r.x-=this.x0,n=r.x/this.a,r.y-=this.y0,t=r.y/this.a,this.sphere?(t/=this.C_y,n=n/(this.C_x*(this.m+Math.cos(t))),this.m?t=ma((this.m*t+Math.sin(t))/this.n):this.n!==1&&(t=ma(Math.sin(t)/this.n)),n=ht(n+this.long0),t=pa(t)):(t=Pd(r.y/this.a,this.es,this.en),i=Math.abs(t),i<Q?(i=Math.sin(t),e=this.long0+r.x*Math.sqrt(1-this.es*i*i)/(this.a*Math.cos(t)),n=ht(e)):i-st<Q&&(n=this.long0)),r.x=n,r.y=t,r}var eP=["Sinusoidal","sinu"];const rP={init:$S,forward:jS,inverse:tP,names:eP};function nP(){}function iP(r){for(var t=r.x,e=r.y,n=ht(t-this.long0),i=e,s=Math.PI*Math.sin(e);;){var a=-(i+Math.sin(i)-s)/(1+Math.cos(i));if(i+=a,Math.abs(a)<st)break}i/=2,Math.PI/2-Math.abs(e)<st&&(n=0);var o=.900316316158*this.a*n*Math.cos(i)+this.x0,l=1.4142135623731*this.a*Math.sin(i)+this.y0;return r.x=o,r.y=l,r}function sP(r){var t,e;r.x-=this.x0,r.y-=this.y0,e=r.y/(1.4142135623731*this.a),Math.abs(e)>.999999999999&&(e=.999999999999),t=Math.asin(e);var n=ht(this.long0+r.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),e=(2*t+Math.sin(2*t))/Math.PI,Math.abs(e)>1&&(e=1);var i=Math.asin(e);return r.x=n,r.y=i,r}var aP=["Mollweide","moll"];const oP={init:nP,forward:iP,inverse:sP,names:aP};function lP(){Math.abs(this.lat1+this.lat2)<st||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Eh(this.es),this.e1=Sh(this.es),this.e2=Ph(this.es),this.e3=Ch(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=ji(this.e,this.sinphi,this.cosphi),this.ml1=Yr(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<st?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=ji(this.e,this.sinphi,this.cosphi),this.ml2=Yr(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Yr(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function uP(r){var t=r.x,e=r.y,n;if(this.sphere)n=this.a*(this.g-e);else{var i=Yr(this.e0,this.e1,this.e2,this.e3,e);n=this.a*(this.g-i)}var s=this.ns*ht(t-this.long0),a=this.x0+n*Math.sin(s),o=this.y0+this.rh-n*Math.cos(s);return r.x=a,r.y=o,r}function hP(r){r.x-=this.x0,r.y=this.rh-r.y+this.y0;var t,e,n,i;this.ns>=0?(e=Math.sqrt(r.x*r.x+r.y*r.y),t=1):(e=-Math.sqrt(r.x*r.x+r.y*r.y),t=-1);var s=0;if(e!==0&&(s=Math.atan2(t*r.x,t*r.y)),this.sphere)return i=ht(this.long0+s/this.ns),n=pa(this.g-e/this.a),r.x=i,r.y=n,r;var a=this.g-e/this.a;return n=Wc(a,this.e0,this.e1,this.e2,this.e3),i=ht(this.long0+s/this.ns),r.x=i,r.y=n,r}var cP=["Equidistant_Conic","eqdc"];const fP={init:lP,forward:uP,inverse:hP,names:cP};function dP(){this.R=this.a}function pP(r){var t=r.x,e=r.y,n=ht(t-this.long0),i,s;Math.abs(e)<=st&&(i=this.x0+this.R*n,s=this.y0);var a=ma(2*Math.abs(e/Math.PI));(Math.abs(n)<=st||Math.abs(Math.abs(e)-Q)<=st)&&(i=this.x0,e>=0?s=this.y0+Math.PI*this.R*Math.tan(.5*a):s=this.y0+Math.PI*this.R*-Math.tan(.5*a));var o=.5*Math.abs(Math.PI/n-n/Math.PI),l=o*o,u=Math.sin(a),c=Math.cos(a),h=c/(u+c-1),f=h*h,g=h*(2/u-1),m=g*g,_=Math.PI*this.R*(o*(h-m)+Math.sqrt(l*(h-m)*(h-m)-(m+l)*(f-m)))/(m+l);n<0&&(_=-_),i=this.x0+_;var E=l+h;return _=Math.PI*this.R*(g*E-o*Math.sqrt((m+l)*(l+1)-E*E))/(m+l),e>=0?s=this.y0+_:s=this.y0-_,r.x=i,r.y=s,r}function gP(r){var t,e,n,i,s,a,o,l,u,c,h,f,g;return r.x-=this.x0,r.y-=this.y0,h=Math.PI*this.R,n=r.x/h,i=r.y/h,s=n*n+i*i,a=-Math.abs(i)*(1+s),o=a-2*i*i+n*n,l=-2*a+1+2*i*i+s*s,g=i*i/l+(2*o*o*o/l/l/l-9*a*o/l/l)/27,u=(a-o*o/3/l)/l,c=2*Math.sqrt(-u/3),h=3*g/u/c,Math.abs(h)>1&&(h>=0?h=1:h=-1),f=Math.acos(h)/3,r.y>=0?e=(-c*Math.cos(f+Math.PI/3)-o/3/l)*Math.PI:e=-(-c*Math.cos(f+Math.PI/3)-o/3/l)*Math.PI,Math.abs(n)<st?t=this.long0:t=ht(this.long0+Math.PI*(s-1+Math.sqrt(1+2*(n*n-i*i)+s*s))/2/n),r.x=t,r.y=e,r}var mP=["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"];const vP={init:dP,forward:pP,inverse:gP,names:mP};var bd={exports:{}},s0;function yP(){return s0||(s0=1,function(r){(function(t){var e={};e.Constants={},e.Math={},e.Accumulator={},function(n){n.WGS84={a:6378137,f:.0033528106647474805},n.version={major:2,minor:1,patch:1},n.version_string="2.1.1"}(e.Constants),function(n){n.digits=53,n.epsilon=Math.pow(.5,n.digits-1),n.degree=Math.PI/180,n.sq=function(i){return i*i},n.hypot=function(i,s){return Math.sqrt(i*i+s*s)},n.cbrt=Math.cbrt||function(i){var s=Math.pow(Math.abs(i),.3333333333333333);return i>0?s:i<0?-s:i},n.log1p=Math.log1p||function(i){var s=1+i,a=s-1;return a===0?i:i*Math.log(s)/a},n.atanh=Math.atanh||function(i){var s=Math.abs(i);return s=n.log1p(2*s/(1-s))/2,i>0?s:i<0?-s:i},n.copysign=function(i,s){return Math.abs(i)*(s<0||s===0&&1/s<0?-1:1)},n.sum=function(i,s){var a=i+s,o=a-s,l=a-o,u;return o-=i,l-=s,u=a&&0-(o+l),{s:a,t:u}},n.polyval=function(i,s,a,o){for(var l=i<0?0:s[a++];--i>=0;)l=l*o+s[a++];return l},n.AngRound=function(i){var s=.0625,a=Math.abs(i);return a=a<s?s-(s-a):a,n.copysign(a,i)},n.remainder=function(i,s){return i%=s,i<-s/2?i+s:i<s/2?i:i-s},n.AngNormalize=function(i){var s=n.remainder(i,360);return Math.abs(s)===180?n.copysign(180,i):s},n.LatFix=function(i){return Math.abs(i)>90?NaN:i},n.AngDiff=function(i,s){var a=n.sum(n.remainder(-i,360),n.remainder(s,360)),o,l;return a=n.sum(n.remainder(a.s,360),a.t),o=a.s,l=a.t,(o===0||Math.abs(o)===180)&&(o=n.copysign(o,l===0?s-i:-l)),{d:o,e:l}},n.sincosd=function(i){var s,a,o,l,u,c,h;switch(s=i%360,o=Math.round(s/90),s-=90*o,a=s*this.degree,l=Math.sin(a),u=Math.cos(a),Math.abs(s)===45?(u=Math.sqrt(.5),l=n.copysign(u,a)):Math.abs(s)===30&&(u=Math.sqrt(.75),l=n.copysign(.5,a)),o&3){case 0:c=l,h=u;break;case 1:c=u,h=-l;break;case 2:c=-l,h=-u;break;default:c=-u,h=l;break}return h+=0,c===0&&(c=n.copysign(c,i)),{s:c,c:h}},n.sincosde=function(i,s){var a,o,l,u,c,h,f;switch(a=i%360,l=Math.round(a/90),a=n.AngRound(a-90*l+s),o=a*this.degree,u=Math.sin(o),c=Math.cos(o),Math.abs(a)===45?(c=Math.sqrt(.5),u=n.copysign(c,o)):Math.abs(a)===30&&(c=Math.sqrt(.75),u=n.copysign(.5,o)),l&3){case 0:h=u,f=c;break;case 1:h=c,f=-u;break;case 2:h=-u,f=-c;break;default:h=-c,f=u;break}return f+=0,h===0&&(h=n.copysign(h,i+s)),{s:h,c:f}},n.atan2d=function(i,s){var a=0,o;switch(Math.abs(i)>Math.abs(s)&&([i,s]=[s,i],a=2),n.copysign(1,s)<0&&(s=-s,++a),o=Math.atan2(i,s)/this.degree,a){case 1:o=n.copysign(180,i)-o;break;case 2:o=90-o;break;case 3:o=-90+o;break}return o}}(e.Math),function(n,i){n.Accumulator=function(s){this.Set(s)},n.Accumulator.prototype.Set=function(s){s||(s=0),s.constructor===n.Accumulator?(this._s=s._s,this._t=s._t):(this._s=s,this._t=0)},n.Accumulator.prototype.Add=function(s){var a=i.sum(s,this._t),o=i.sum(a.s,this._s);a=a.t,this._s=o.s,this._t=o.t,this._s===0?this._s=a:this._t+=a},n.Accumulator.prototype.Sum=function(s){var a;return s?(a=new n.Accumulator(this),a.Add(s),a._s):this._s},n.Accumulator.prototype.Negate=function(){this._s*=-1,this._t*=-1},n.Accumulator.prototype.Remainder=function(s){this._s=i.remainder(this._s,s),this.Add(0)}}(e.Accumulator,e.Math),e.Geodesic={},e.GeodesicLine={},e.PolygonArea={},function(n,i,s,a,o){var l=6,u=l,c=l,h=l,f=h,g,m,_=20,E=_+a.digits+10,M=a.epsilon,y=200*M,w=Math.sqrt(M),v=M,S=1e3*w,P=0,I=31,b=32640,D,O,T,x,R,z,rt,B,ct;n.tiny_=Math.sqrt(Number.MIN_VALUE/Number.EPSILON),n.nC1_=l,n.nC1p_=l,n.nC2_=l,n.nC3_=l,n.nC4_=l,g=n.nC3_*(n.nC3_-1)/2,m=n.nC4_*(n.nC4_+1)/2,n.CAP_C1=1,n.CAP_C1p=2,n.CAP_C2=4,n.CAP_C3=8,n.CAP_C4=16,n.NONE=0,n.ARC=64,n.LATITUDE=128|P,n.LONGITUDE=256|n.CAP_C3,n.AZIMUTH=512|P,n.DISTANCE=1024|n.CAP_C1,n.STANDARD=n.LATITUDE|n.LONGITUDE|n.AZIMUTH|n.DISTANCE,n.DISTANCE_IN=2048|n.CAP_C1|n.CAP_C1p,n.REDUCEDLENGTH=4096|n.CAP_C1|n.CAP_C2,n.GEODESICSCALE=8192|n.CAP_C1|n.CAP_C2,n.AREA=16384|n.CAP_C4,n.ALL=b|I,n.LONG_UNROLL=32768,n.OUT_MASK=b|n.LONG_UNROLL,n.SinCosSeries=function(G,X,k,V){var A=V.length,W=A-(G?1:0),J=2*(k-X)*(k+X),ot=W&1?V[--A]:0,gt=0;for(W=Math.floor(W/2);W--;)gt=J*ot-gt+V[--A],ot=J*gt-ot+V[--A];return G?2*X*k*ot:k*(ot-gt)},D=function(G,X){var k,V=a.sq(G),A=a.sq(X),W=(V+A-1)/6,J,ot,gt,lt,St,ut,It,Nt,j,Pt,bt;return A===0&&W<=0?k=0:(J=V*A/4,ot=a.sq(W),gt=W*ot,lt=J*(J+2*gt),St=W,lt>=0?(ut=J+gt,ut+=ut<0?-Math.sqrt(lt):Math.sqrt(lt),It=a.cbrt(ut),St+=It+(It!==0?ot/It:0)):(Nt=Math.atan2(Math.sqrt(-lt),-(J+gt)),St+=2*W*Math.cos(Nt/3)),j=Math.sqrt(a.sq(St)+A),Pt=St<0?A/(j-St):St+j,bt=(Pt-A)/(2*j),k=Pt/(Math.sqrt(Pt+a.sq(bt))+bt)),k},O=[1,4,64,0,256],n.A1m1f=function(G){var X=Math.floor(u/2),k=a.polyval(X,O,0,a.sq(G))/O[X+1];return(k+G)/(1-G)},T=[-1,6,-16,32,-9,64,-128,2048,9,-16,768,3,-5,512,-7,1280,-7,2048],n.C1f=function(G,X){var k=a.sq(G),V=G,A=0,W,J;for(W=1;W<=n.nC1_;++W)J=Math.floor((n.nC1_-W)/2),X[W]=V*a.polyval(J,T,A,k)/T[A+J+1],A+=J+2,V*=G},x=[205,-432,768,1536,4005,-4736,3840,12288,-225,116,384,-7173,2695,7680,3467,7680,38081,61440],n.C1pf=function(G,X){var k=a.sq(G),V=G,A=0,W,J;for(W=1;W<=n.nC1p_;++W)J=Math.floor((n.nC1p_-W)/2),X[W]=V*a.polyval(J,x,A,k)/x[A+J+1],A+=J+2,V*=G},R=[-11,-28,-192,0,256],n.A2m1f=function(G){var X=Math.floor(c/2),k=a.polyval(X,R,0,a.sq(G))/R[X+1];return(k-G)/(1+G)},z=[1,2,16,32,35,64,384,2048,15,80,768,7,35,512,63,1280,77,2048],n.C2f=function(G,X){var k=a.sq(G),V=G,A=0,W,J;for(W=1;W<=n.nC2_;++W)J=Math.floor((n.nC2_-W)/2),X[W]=V*a.polyval(J,z,A,k)/z[A+J+1],A+=J+2,V*=G},n.Geodesic=function(G,X){if(this.a=G,this.f=X,this._f1=1-this.f,this._e2=this.f*(2-this.f),this._ep2=this._e2/a.sq(this._f1),this._n=this.f/(2-this.f),this._b=this.a*this._f1,this._c2=(a.sq(this.a)+a.sq(this._b)*(this._e2===0?1:(this._e2>0?a.atanh(Math.sqrt(this._e2)):Math.atan(Math.sqrt(-this._e2)))/Math.sqrt(Math.abs(this._e2))))/2,this._etol2=.1*w/Math.sqrt(Math.max(.001,Math.abs(this.f))*Math.min(1,1-this.f/2)/2),!(isFinite(this.a)&&this.a>0))throw new Error("Equatorial radius is not positive");if(!(isFinite(this._b)&&this._b>0))throw new Error("Polar semi-axis is not positive");this._A3x=new Array(f),this._C3x=new Array(g),this._C4x=new Array(m),this.A3coeff(),this.C3coeff(),this.C4coeff()},rt=[-3,128,-2,-3,64,-1,-3,-1,16,3,-1,-2,8,1,-1,2,1,1],n.Geodesic.prototype.A3coeff=function(){var G=0,X=0,k,V;for(k=h-1;k>=0;--k)V=Math.min(h-k-1,k),this._A3x[X++]=a.polyval(V,rt,G,this._n)/rt[G+V+1],G+=V+2},B=[3,128,2,5,128,-1,3,3,64,-1,0,1,8,-1,1,4,5,256,1,3,128,-3,-2,3,64,1,-3,2,32,7,512,-10,9,384,5,-9,5,192,7,512,-14,7,512,21,2560],n.Geodesic.prototype.C3coeff=function(){var G=0,X=0,k,V,A;for(k=1;k<n.nC3_;++k)for(V=n.nC3_-1;V>=k;--V)A=Math.min(n.nC3_-V-1,V),this._C3x[X++]=a.polyval(A,B,G,this._n)/B[G+A+1],G+=A+2},ct=[97,15015,1088,156,45045,-224,-4784,1573,45045,-10656,14144,-4576,-858,45045,64,624,-4576,6864,-3003,15015,100,208,572,3432,-12012,30030,45045,1,9009,-2944,468,135135,5792,1040,-1287,135135,5952,-11648,9152,-2574,135135,-64,-624,4576,-6864,3003,135135,8,10725,1856,-936,225225,-8448,4992,-1144,225225,-1440,4160,-4576,1716,225225,-136,63063,1024,-208,105105,3584,-3328,1144,315315,-128,135135,-2560,832,405405,128,99099],n.Geodesic.prototype.C4coeff=function(){var G=0,X=0,k,V,A;for(k=0;k<n.nC4_;++k)for(V=n.nC4_-1;V>=k;--V)A=n.nC4_-V-1,this._C4x[X++]=a.polyval(A,ct,G,this._n)/ct[G+A+1],G+=A+2},n.Geodesic.prototype.A3f=function(G){return a.polyval(f-1,this._A3x,0,G)},n.Geodesic.prototype.C3f=function(G,X){var k=1,V=0,A,W;for(A=1;A<n.nC3_;++A)W=n.nC3_-A-1,k*=G,X[A]=k*a.polyval(W,this._C3x,V,G),V+=W+1},n.Geodesic.prototype.C4f=function(G,X){var k=1,V=0,A,W;for(A=0;A<n.nC4_;++A)W=n.nC4_-A-1,X[A]=k*a.polyval(W,this._C4x,V,G),V+=W+1,k*=G},n.Geodesic.prototype.Lengths=function(G,X,k,V,A,W,J,ot,gt,lt,St,ut,It){St&=n.OUT_MASK;var Nt={},j=0,Pt=0,bt=0,Gt=0,Ht,Xt,Zt,me,Ke;if(St&(n.DISTANCE|n.REDUCEDLENGTH|n.GEODESICSCALE)&&(bt=n.A1m1f(G),n.C1f(G,ut),St&(n.REDUCEDLENGTH|n.GEODESICSCALE)&&(Gt=n.A2m1f(G),n.C2f(G,It),j=bt-Gt,Gt=1+Gt),bt=1+bt),St&n.DISTANCE)Ht=n.SinCosSeries(!0,W,J,ut)-n.SinCosSeries(!0,k,V,ut),Nt.s12b=bt*(X+Ht),St&(n.REDUCEDLENGTH|n.GEODESICSCALE)&&(Xt=n.SinCosSeries(!0,W,J,It)-n.SinCosSeries(!0,k,V,It),Pt=j*X+(bt*Ht-Gt*Xt));else if(St&(n.REDUCEDLENGTH|n.GEODESICSCALE)){for(Zt=1;Zt<=n.nC2_;++Zt)It[Zt]=bt*ut[Zt]-Gt*It[Zt];Pt=j*X+(n.SinCosSeries(!0,W,J,It)-n.SinCosSeries(!0,k,V,It))}return St&n.REDUCEDLENGTH&&(Nt.m0=j,Nt.m12b=ot*(V*W)-A*(k*J)-V*J*Pt),St&n.GEODESICSCALE&&(me=V*J+k*W,Ke=this._ep2*(gt-lt)*(gt+lt)/(A+ot),Nt.M12=me+(Ke*W-J*Pt)*k/A,Nt.M21=me-(Ke*k-V*Pt)*W/ot),Nt},n.Geodesic.prototype.InverseStart=function(G,X,k,V,A,W,J,ot,gt,lt,St){var ut={},It=V*X-A*G,Nt=A*X+V*G,j,Pt,bt,Gt,Ht,Xt,Zt,me,Ke,Yt,kt,zt,Ee,ke,oi,xa,kh,ds,$t,vn,Lr,yn,Gn;return ut.sig12=-1,j=V*X,j+=A*G,Pt=Nt>=0&&It<.5&&A*J<.5,Pt?(Gt=a.sq(G+V),Gt/=Gt+a.sq(X+A),ut.dnm=Math.sqrt(1+this._ep2*Gt),bt=J/(this._f1*ut.dnm),Ht=Math.sin(bt),Xt=Math.cos(bt)):(Ht=ot,Xt=gt),ut.salp1=A*Ht,ut.calp1=Xt>=0?It+A*G*a.sq(Ht)/(1+Xt):j-A*G*a.sq(Ht)/(1-Xt),me=a.hypot(ut.salp1,ut.calp1),Ke=G*V+X*A*Xt,Pt&&me<this._etol2?(ut.salp2=X*Ht,ut.calp2=It-X*V*(Xt>=0?a.sq(Ht)/(1+Xt):1-Xt),Zt=a.hypot(ut.salp2,ut.calp2),ut.salp2/=Zt,ut.calp2/=Zt,ut.sig12=Math.atan2(me,Ke)):Math.abs(this._n)>.1||Ke>=0||me>=6*Math.abs(this._n)*Math.PI*a.sq(X)||(Gn=Math.atan2(-ot,-gt),this.f>=0?(ke=a.sq(G)*this._ep2,oi=ke/(2*(1+Math.sqrt(1+ke))+ke),zt=this.f*X*this.A3f(oi)*Math.PI,Ee=zt*X,Yt=Gn/zt,kt=j/Ee):(xa=A*X-V*G,kh=Math.atan2(j,xa),vn=this.Lengths(this._n,Math.PI+kh,G,-X,k,V,A,W,X,A,n.REDUCEDLENGTH,lt,St),ds=vn.m12b,$t=vn.m0,Yt=-1+ds/(X*A*$t*Math.PI),Ee=Yt<-.01?j/Yt:-this.f*a.sq(X)*Math.PI,zt=Ee/X,kt=J/zt),kt>-y&&Yt>-1-S?this.f>=0?(ut.salp1=Math.min(1,-Yt),ut.calp1=-Math.sqrt(1-a.sq(ut.salp1))):(ut.calp1=Math.max(Yt>-y?0:-1,Yt),ut.salp1=Math.sqrt(1-a.sq(ut.calp1))):(Lr=D(Yt,kt),yn=zt*(this.f>=0?-Yt*Lr/(1+Lr):-kt*(1+Lr)/Lr),Ht=Math.sin(yn),Xt=-Math.cos(yn),ut.salp1=A*Ht,ut.calp1=j-A*G*a.sq(Ht)/(1-Xt))),ut.salp1<=0?(ut.salp1=1,ut.calp1=0):(Zt=a.hypot(ut.salp1,ut.calp1),ut.salp1/=Zt,ut.calp1/=Zt),ut},n.Geodesic.prototype.Lambda12=function(G,X,k,V,A,W,J,ot,gt,lt,St,ut,It,Nt){var j={},Pt,bt,Gt,Ht,Xt,Zt,me,Ke,Yt,kt,zt,Ee,ke;return G===0&&ot===0&&(ot=-n.tiny_),bt=J*X,Gt=a.hypot(ot,J*G),j.ssig1=G,Ht=bt*G,j.csig1=Xt=ot*X,Pt=a.hypot(j.ssig1,j.csig1),j.ssig1/=Pt,j.csig1/=Pt,j.salp2=A!==X?bt/A:J,j.calp2=A!==X||Math.abs(V)!==-G?Math.sqrt(a.sq(ot*X)+(X<-G?(A-X)*(X+A):(G-V)*(G+V)))/A:Math.abs(ot),j.ssig2=V,Zt=bt*V,j.csig2=me=j.calp2*A,Pt=a.hypot(j.ssig2,j.csig2),j.ssig2/=Pt,j.csig2/=Pt,j.sig12=Math.atan2(Math.max(0,j.csig1*j.ssig2-j.ssig1*j.csig2),j.csig1*j.csig2+j.ssig1*j.ssig2),Ke=Math.max(0,Xt*Zt-Ht*me),Yt=Xt*me+Ht*Zt,zt=Math.atan2(Ke*lt-Yt*gt,Yt*lt+Ke*gt),Ee=a.sq(Gt)*this._ep2,j.eps=Ee/(2*(1+Math.sqrt(1+Ee))+Ee),this.C3f(j.eps,Nt),kt=n.SinCosSeries(!0,j.ssig2,j.csig2,Nt)-n.SinCosSeries(!0,j.ssig1,j.csig1,Nt),j.domg12=-this.f*this.A3f(j.eps)*bt*(j.sig12+kt),j.lam12=zt+j.domg12,St&&(j.calp2===0?j.dlam12=-2*this._f1*k/G:(ke=this.Lengths(j.eps,j.sig12,j.ssig1,j.csig1,k,j.ssig2,j.csig2,W,X,A,n.REDUCEDLENGTH,ut,It),j.dlam12=ke.m12b,j.dlam12*=this._f1/(j.calp2*A))),j},n.Geodesic.prototype.Inverse=function(G,X,k,V,A){var W,J;return A||(A=n.STANDARD),A===n.LONG_UNROLL&&(A|=n.STANDARD),A&=n.OUT_MASK,W=this.InverseInt(G,X,k,V,A),J=W.vals,A&n.AZIMUTH&&(J.azi1=a.atan2d(W.salp1,W.calp1),J.azi2=a.atan2d(W.salp2,W.calp2)),J},n.Geodesic.prototype.InverseInt=function(G,X,k,V,A){var W={},J,ot,gt,lt,St,ut,It,Nt,j,Pt,bt,Gt,Ht,Xt,Zt,me,Ke,Yt,kt,zt,Ee,ke,oi,xa,kh,ds,$t,vn,Lr,yn,Gn,ef,rf,Fu,Ul,zh,Vh,Uh,qh,nf,Wd,Gu,Hd,sf,Xd,Yd,Jd,iv,Kd,af,Qd,of,sv,lf,av,ov,Wh,uf,Hh,Bd,Zd,hf,cf,$d,jd;if(W.lat1=G=a.LatFix(G),W.lat2=k=a.LatFix(k),G=a.AngRound(G),k=a.AngRound(k),J=a.AngDiff(X,V),ot=J.e,J=J.d,A&n.LONG_UNROLL?(W.lon1=X,W.lon2=X+J+ot):(W.lon1=a.AngNormalize(X),W.lon2=a.AngNormalize(V)),gt=a.copysign(1,J),J*=gt,ot*=gt,Zt=J*a.degree,lt=a.sincosde(J,ot),me=lt.s,Ke=lt.c,ot=180-J-ot,St=Math.abs(G)<Math.abs(k)||isNaN(k)?-1:1,St<0&&(gt*=-1,[k,G]=[G,k]),ut=a.copysign(1,-G),G*=ut,k*=ut,lt=a.sincosd(G),It=this._f1*lt.s,Nt=lt.c,lt=a.hypot(It,Nt),It/=lt,Nt/=lt,Nt=Math.max(n.tiny_,Nt),lt=a.sincosd(k),j=this._f1*lt.s,Pt=lt.c,lt=a.hypot(j,Pt),j/=lt,Pt/=lt,Pt=Math.max(n.tiny_,Pt),Nt<-It?Pt===Nt&&(j=a.copysign(It,j)):Math.abs(j)===-It&&(Pt=Nt),Ht=Math.sqrt(1+this._ep2*a.sq(It)),Xt=Math.sqrt(1+this._ep2*a.sq(j)),oi=new Array(n.nC1_+1),xa=new Array(n.nC2_+1),kh=new Array(n.nC3_),ds=G===-90||me===0,ds&&(kt=Ke,zt=me,Ee=1,ke=0,vn=It,Lr=kt*Nt,yn=j,Gn=Ee*Pt,Yt=Math.atan2(Math.max(0,Lr*yn-vn*Gn),Lr*Gn+vn*yn),$t=this.Lengths(this._n,Yt,vn,Lr,Ht,yn,Gn,Xt,Nt,Pt,A|n.DISTANCE|n.REDUCEDLENGTH,oi,xa),bt=$t.s12b,Gt=$t.m12b,A&n.GEODESICSCALE&&(W.M12=$t.M12,W.M21=$t.M21),Yt<1||Gt>=0?((Yt<3*n.tiny_||Yt<M&&(bt<0||Gt<0))&&(Yt=Gt=bt=0),Gt*=this._b,bt*=this._b,W.a12=Yt/a.degree):ds=!1),Wh=2,!ds&&It===0&&(this.f<=0||ot>=this.f*180))kt=Ee=0,zt=ke=1,bt=this.a*Zt,Yt=rf=Zt/this._f1,Gt=this._b*Math.sin(Yt),A&n.GEODESICSCALE&&(W.M12=W.M21=Math.cos(Yt)),W.a12=J/this._f1;else if(!ds)if($t=this.InverseStart(It,Nt,Ht,j,Pt,Xt,Zt,me,Ke,oi,xa),Yt=$t.sig12,zt=$t.salp1,kt=$t.calp1,Yt>=0)ke=$t.salp2,Ee=$t.calp2,Fu=$t.dnm,bt=Yt*this._b*Fu,Gt=a.sq(Fu)*this._b*Math.sin(Yt/Fu),A&n.GEODESICSCALE&&(W.M12=W.M21=Math.cos(Yt/Fu)),W.a12=Yt/a.degree,rf=Zt/(this._f1*Fu);else{for(Ul=0,zh=n.tiny_,Vh=1,Uh=n.tiny_,qh=-1,nf=!1,Wd=!1;$t=this.Lambda12(It,Nt,Ht,j,Pt,Xt,zt,kt,me,Ke,Ul<_,oi,xa,kh),Gu=$t.lam12,ke=$t.salp2,Ee=$t.calp2,Yt=$t.sig12,vn=$t.ssig1,Lr=$t.csig1,yn=$t.ssig2,Gn=$t.csig2,ef=$t.eps,Hh=$t.domg12,Hd=$t.dlam12,!(Wd||!(Math.abs(Gu)>=(nf?8:1)*M)||Ul==E);++Ul){if(Gu>0&&(Ul<_||kt/zt>qh/Uh)?(Uh=zt,qh=kt):Gu<0&&(Ul<_||kt/zt<Vh/zh)&&(zh=zt,Vh=kt),Ul<_&&Hd>0&&(sf=-Gu/Hd,Math.abs(sf)<Math.PI&&(Xd=Math.sin(sf),Yd=Math.cos(sf),Jd=zt*Yd+kt*Xd,Jd>0))){kt=kt*Yd-zt*Xd,zt=Jd,lt=a.hypot(zt,kt),zt/=lt,kt/=lt,nf=Math.abs(Gu)<=16*M;continue}zt=(zh+Uh)/2,kt=(Vh+qh)/2,lt=a.hypot(zt,kt),zt/=lt,kt/=lt,nf=!1,Wd=Math.abs(zh-zt)+(Vh-kt)<v||Math.abs(zt-Uh)+(kt-qh)<v}iv=A|(A&(n.REDUCEDLENGTH|n.GEODESICSCALE)?n.DISTANCE:n.NONE),$t=this.Lengths(ef,Yt,vn,Lr,Ht,yn,Gn,Xt,Nt,Pt,iv,oi,xa),bt=$t.s12b,Gt=$t.m12b,A&n.GEODESICSCALE&&(W.M12=$t.M12,W.M21=$t.M21),Gt*=this._b,bt*=this._b,W.a12=Yt/a.degree,A&n.AREA&&($d=Math.sin(Hh),jd=Math.cos(Hh),Wh=me*jd-Ke*$d,uf=Ke*jd+me*$d)}return A&n.DISTANCE&&(W.s12=0+bt),A&n.REDUCEDLENGTH&&(W.m12=0+Gt),A&n.AREA&&(Kd=zt*Nt,af=a.hypot(kt,zt*It),af!==0&&Kd!==0?(vn=It,Lr=kt*Nt,yn=j,Gn=Ee*Pt,of=a.sq(af)*this._ep2,ef=of/(2*(1+Math.sqrt(1+of))+of),sv=a.sq(this.a)*af*Kd*this._e2,lt=a.hypot(vn,Lr),vn/=lt,Lr/=lt,lt=a.hypot(yn,Gn),yn/=lt,Gn/=lt,lf=new Array(n.nC4_),this.C4f(ef,lf),av=n.SinCosSeries(!1,vn,Lr,lf),ov=n.SinCosSeries(!1,yn,Gn,lf),W.S12=sv*(ov-av)):W.S12=0,!ds&&Wh==2&&(Wh=Math.sin(rf),uf=Math.cos(rf)),!ds&&uf>-.7071&&j-It<1.75?(Hh=1+uf,Bd=1+Nt,Zd=1+Pt,Qd=2*Math.atan2(Wh*(It*Zd+j*Bd),Hh*(It*j+Bd*Zd))):(hf=ke*kt-Ee*zt,cf=Ee*kt+ke*zt,hf===0&&cf<0&&(hf=n.tiny_*kt,cf=-1),Qd=Math.atan2(hf,cf)),W.S12+=this._c2*Qd,W.S12*=St*gt*ut,W.S12+=0),St<0&&([ke,zt]=[zt,ke],[Ee,kt]=[kt,Ee],A&n.GEODESICSCALE&&([W.M21,W.M12]=[W.M12,W.M21])),zt*=St*gt,kt*=St*ut,ke*=St*gt,Ee*=St*ut,{vals:W,salp1:zt,calp1:kt,salp2:ke,calp2:Ee}},n.Geodesic.prototype.GenDirect=function(G,X,k,V,A,W){var J;return W?W===n.LONG_UNROLL&&(W|=n.STANDARD):W=n.STANDARD,V||(W|=n.DISTANCE_IN),J=new i.GeodesicLine(this,G,X,k,W),J.GenPosition(V,A,W)},n.Geodesic.prototype.Direct=function(G,X,k,V,A){return this.GenDirect(G,X,k,!1,V,A)},n.Geodesic.prototype.ArcDirect=function(G,X,k,V,A){return this.GenDirect(G,X,k,!0,V,A)},n.Geodesic.prototype.Line=function(G,X,k,V){return new i.GeodesicLine(this,G,X,k,V)},n.Geodesic.prototype.DirectLine=function(G,X,k,V,A){return this.GenDirectLine(G,X,k,!1,V,A)},n.Geodesic.prototype.ArcDirectLine=function(G,X,k,V,A){return this.GenDirectLine(G,X,k,!0,V,A)},n.Geodesic.prototype.GenDirectLine=function(G,X,k,V,A,W){var J;return W||(W=n.STANDARD|n.DISTANCE_IN),V||(W|=n.DISTANCE_IN),J=new i.GeodesicLine(this,G,X,k,W),J.GenSetDistance(V,A),J},n.Geodesic.prototype.InverseLine=function(G,X,k,V,A){var W,J,ot;return A||(A=n.STANDARD|n.DISTANCE_IN),W=this.InverseInt(G,X,k,V,n.ARC),ot=a.atan2d(W.salp1,W.calp1),A&(n.OUT_MASK&n.DISTANCE_IN)&&(A|=n.DISTANCE),J=new i.GeodesicLine(this,G,X,ot,A,W.salp1,W.calp1),J.SetArc(W.vals.a12),J},n.Geodesic.prototype.Polygon=function(G){return new s.PolygonArea(this,G)},n.WGS84=new n.Geodesic(o.WGS84.a,o.WGS84.f)}(e.Geodesic,e.GeodesicLine,e.PolygonArea,e.Math,e.Constants),function(n,i,s){i.GeodesicLine=function(a,o,l,u,c,h,f){var g,m,_,E,M,y;c||(c=n.STANDARD|n.DISTANCE_IN),this.a=a.a,this.f=a.f,this._b=a._b,this._c2=a._c2,this._f1=a._f1,this.caps=c|n.LATITUDE|n.AZIMUTH|n.LONG_UNROLL,this.lat1=s.LatFix(o),this.lon1=l,typeof h>"u"||typeof f>"u"?(this.azi1=s.AngNormalize(u),g=s.sincosd(s.AngRound(this.azi1)),this.salp1=g.s,this.calp1=g.c):(this.azi1=u,this.salp1=h,this.calp1=f),g=s.sincosd(s.AngRound(this.lat1)),_=this._f1*g.s,m=g.c,g=s.hypot(_,m),_/=g,m/=g,m=Math.max(n.tiny_,m),this._dn1=Math.sqrt(1+a._ep2*s.sq(_)),this._salp0=this.salp1*m,this._calp0=s.hypot(this.calp1,this.salp1*_),this._ssig1=_,this._somg1=this._salp0*_,this._csig1=this._comg1=_!==0||this.calp1!==0?m*this.calp1:1,g=s.hypot(this._ssig1,this._csig1),this._ssig1/=g,this._csig1/=g,this._k2=s.sq(this._calp0)*a._ep2,E=this._k2/(2*(1+Math.sqrt(1+this._k2))+this._k2),this.caps&n.CAP_C1&&(this._A1m1=n.A1m1f(E),this._C1a=new Array(n.nC1_+1),n.C1f(E,this._C1a),this._B11=n.SinCosSeries(!0,this._ssig1,this._csig1,this._C1a),M=Math.sin(this._B11),y=Math.cos(this._B11),this._stau1=this._ssig1*y+this._csig1*M,this._ctau1=this._csig1*y-this._ssig1*M),this.caps&n.CAP_C1p&&(this._C1pa=new Array(n.nC1p_+1),n.C1pf(E,this._C1pa)),this.caps&n.CAP_C2&&(this._A2m1=n.A2m1f(E),this._C2a=new Array(n.nC2_+1),n.C2f(E,this._C2a),this._B21=n.SinCosSeries(!0,this._ssig1,this._csig1,this._C2a)),this.caps&n.CAP_C3&&(this._C3a=new Array(n.nC3_),a.C3f(E,this._C3a),this._A3c=-this.f*this._salp0*a.A3f(E),this._B31=n.SinCosSeries(!0,this._ssig1,this._csig1,this._C3a)),this.caps&n.CAP_C4&&(this._C4a=new Array(n.nC4_),a.C4f(E,this._C4a),this._A4=s.sq(this.a)*this._calp0*this._salp0*a._e2,this._B41=n.SinCosSeries(!1,this._ssig1,this._csig1,this._C4a)),this.a13=this.s13=NaN},i.GeodesicLine.prototype.GenPosition=function(a,o,l){var u={},c,h,f,g,m,_,E,M,y,w,v,S,P,I,b,D,O,T,x,R,z,rt,B,ct,G,X,k,V,A;return l?l===n.LONG_UNROLL&&(l|=n.STANDARD):l=n.STANDARD,l&=this.caps&n.OUT_MASK,u.lat1=this.lat1,u.azi1=this.azi1,u.lon1=l&n.LONG_UNROLL?this.lon1:s.AngNormalize(this.lon1),a?u.a12=o:u.s12=o,a||this.caps&n.DISTANCE_IN&n.OUT_MASK?(g=0,m=0,a?(c=o*s.degree,X=s.sincosd(o),h=X.s,f=X.c):(M=o/(this._b*(1+this._A1m1)),y=Math.sin(M),w=Math.cos(M),g=-n.SinCosSeries(!0,this._stau1*w+this._ctau1*y,this._ctau1*w-this._stau1*y,this._C1pa),c=M-(g-this._B11),h=Math.sin(c),f=Math.cos(c),Math.abs(this.f)>.01&&(_=this._ssig1*f+this._csig1*h,E=this._csig1*f-this._ssig1*h,g=n.SinCosSeries(!0,_,E,this._C1a),v=(1+this._A1m1)*(c+(g-this._B11))-o/this._b,c=c-v/Math.sqrt(1+this._k2*s.sq(_)),h=Math.sin(c),f=Math.cos(c))),_=this._ssig1*f+this._csig1*h,E=this._csig1*f-this._ssig1*h,rt=Math.sqrt(1+this._k2*s.sq(_)),l&(n.DISTANCE|n.REDUCEDLENGTH|n.GEODESICSCALE)&&((a||Math.abs(this.f)>.01)&&(g=n.SinCosSeries(!0,_,E,this._C1a)),m=(1+this._A1m1)*(g-this._B11)),D=this._calp0*_,O=s.hypot(this._salp0,this._calp0*E),O===0&&(O=E=n.tiny_),R=this._salp0,z=this._calp0*E,a&&l&n.DISTANCE&&(u.s12=this._b*((1+this._A1m1)*c+m)),l&n.LONGITUDE&&(T=this._salp0*_,x=E,b=s.copysign(1,this._salp0),S=l&n.LONG_UNROLL?b*(c-(Math.atan2(_,E)-Math.atan2(this._ssig1,this._csig1))+(Math.atan2(b*T,x)-Math.atan2(b*this._somg1,this._comg1))):Math.atan2(T*this._comg1-x*this._somg1,x*this._comg1+T*this._somg1),P=S+this._A3c*(c+(n.SinCosSeries(!0,_,E,this._C3a)-this._B31)),I=P/s.degree,u.lon2=l&n.LONG_UNROLL?this.lon1+I:s.AngNormalize(s.AngNormalize(this.lon1)+s.AngNormalize(I))),l&n.LATITUDE&&(u.lat2=s.atan2d(D,this._f1*O)),l&n.AZIMUTH&&(u.azi2=s.atan2d(R,z)),l&(n.REDUCEDLENGTH|n.GEODESICSCALE)&&(B=n.SinCosSeries(!0,_,E,this._C2a),ct=(1+this._A2m1)*(B-this._B21),G=(this._A1m1-this._A2m1)*c+(m-ct),l&n.REDUCEDLENGTH&&(u.m12=this._b*(rt*(this._csig1*_)-this._dn1*(this._ssig1*E)-this._csig1*E*G)),l&n.GEODESICSCALE&&(X=this._k2*(_-this._ssig1)*(_+this._ssig1)/(this._dn1+rt),u.M12=f+(X*_-E*G)*this._ssig1/this._dn1,u.M21=f-(X*this._ssig1-this._csig1*G)*_/rt)),l&n.AREA&&(k=n.SinCosSeries(!1,_,E,this._C4a),this._calp0===0||this._salp0===0?(V=R*this.calp1-z*this.salp1,A=z*this.calp1+R*this.salp1):(V=this._calp0*this._salp0*(f<=0?this._csig1*(1-f)+h*this._ssig1:h*(this._csig1*h/(1+f)+this._ssig1)),A=s.sq(this._salp0)+s.sq(this._calp0)*this._csig1*E),u.S12=this._c2*Math.atan2(V,A)+this._A4*(k-this._B41)),a||(u.a12=c/s.degree),u):(u.a12=NaN,u)},i.GeodesicLine.prototype.Position=function(a,o){return this.GenPosition(!1,a,o)},i.GeodesicLine.prototype.ArcPosition=function(a,o){return this.GenPosition(!0,a,o)},i.GeodesicLine.prototype.GenSetDistance=function(a,o){a?this.SetArc(o):this.SetDistance(o)},i.GeodesicLine.prototype.SetDistance=function(a){var o;this.s13=a,o=this.GenPosition(!1,this.s13,n.ARC),this.a13=0+o.a12},i.GeodesicLine.prototype.SetArc=function(a){var o;this.a13=a,o=this.GenPosition(!0,this.a13,n.DISTANCE),this.s13=0+o.s12}}(e.Geodesic,e.GeodesicLine,e.Math),function(n,i,s,a){var o,l,u,c;o=function(h,f){var g=s.AngDiff(h,f).d;return h=s.AngNormalize(h),f=s.AngNormalize(f),g>0&&(h<0&&f>=0||h>0&&f===0)?1:g<0&&h>=0&&f<0?-1:0},l=function(h,f){return h=h%720,f=f%720,(0<=f&&f<360||f<-360?0:1)-(0<=h&&h<360||h<-360?0:1)},u=function(h,f,g,m,_){return h.Remainder(f),g&1&&h.Add((h.Sum()<0?1:-1)*f/2),m||h.Negate(),_?h.Sum()>f/2?h.Add(-f):h.Sum()<=-f/2&&h.Add(+f):h.Sum()>=f?h.Add(-f):h.Sum()<0&&h.Add(+f),0+h.Sum()},c=function(h,f,g,m,_){return h=s.remainder(h,f),g&1&&(h+=(h<0?1:-1)*f/2),m||(h*=-1),_?h>f/2?h-=f:h<=-f/2&&(h+=f):h>=f?h-=f:h<0&&(h+=f),0+h},n.PolygonArea=function(h,f){this._geod=h,this.a=this._geod.a,this.f=this._geod.f,this._area0=4*Math.PI*h._c2,this.polyline=f||!1,this._mask=i.LATITUDE|i.LONGITUDE|i.DISTANCE|(this.polyline?i.NONE:i.AREA|i.LONG_UNROLL),this.polyline||(this._areasum=new a.Accumulator(0)),this._perimetersum=new a.Accumulator(0),this.Clear()},n.PolygonArea.prototype.Clear=function(){this.num=0,this._crossings=0,this.polyline||this._areasum.Set(0),this._perimetersum.Set(0),this._lat0=this._lon0=this.lat=this.lon=NaN},n.PolygonArea.prototype.AddPoint=function(h,f){var g;this.num===0?(this._lat0=this.lat=h,this._lon0=this.lon=f):(g=this._geod.Inverse(this.lat,this.lon,h,f,this._mask),this._perimetersum.Add(g.s12),this.polyline||(this._areasum.Add(g.S12),this._crossings+=o(this.lon,f)),this.lat=h,this.lon=f),++this.num},n.PolygonArea.prototype.AddEdge=function(h,f){var g;this.num&&(g=this._geod.Direct(this.lat,this.lon,h,f,this._mask),this._perimetersum.Add(f),this.polyline||(this._areasum.Add(g.S12),this._crossings+=l(this.lon,g.lon2)),this.lat=g.lat2,this.lon=g.lon2),++this.num},n.PolygonArea.prototype.Compute=function(h,f){var g={number:this.num},m,_;return this.num<2?(g.perimeter=0,this.polyline||(g.area=0),g):this.polyline?(g.perimeter=this._perimetersum.Sum(),g):(m=this._geod.Inverse(this.lat,this.lon,this._lat0,this._lon0,this._mask),g.perimeter=this._perimetersum.Sum(m.s12),_=new a.Accumulator(this._areasum),_.Add(m.S12),g.area=u(_,this._area0,this._crossings+o(this.lon,this._lon0),h,f),g)},n.PolygonArea.prototype.TestPoint=function(h,f,g,m){var _={number:this.num+1},E,M,y,w;if(this.num===0)return _.perimeter=0,this.polyline||(_.area=0),_;for(_.perimeter=this._perimetersum.Sum(),M=this.polyline?0:this._areasum.Sum(),y=this._crossings,w=0;w<(this.polyline?1:2);++w)E=this._geod.Inverse(w===0?this.lat:h,w===0?this.lon:f,w!==0?this._lat0:h,w!==0?this._lon0:f,this._mask),_.perimeter+=E.s12,this.polyline||(M+=E.S12,y+=o(w===0?this.lon:f,w!==0?this._lon0:f));return this.polyline||(_.area=c(M,this._area0,y,g,m)),_},n.PolygonArea.prototype.TestEdge=function(h,f,g,m){var _={number:this.num?this.num+1:0},E,M,y;return this.num===0||(_.perimeter=this._perimetersum.Sum()+f,this.polyline)||(M=this._areasum.Sum(),y=this._crossings,E=this._geod.Direct(this.lat,this.lon,h,f,this._mask),M+=E.S12,y+=l(this.lon,E.lon2),y+=o(E.lon2,this._lon0),E=this._geod.Inverse(E.lat2,E.lon2,this._lat0,this._lon0,this._mask),_.perimeter+=E.s12,M+=E.S12,_.area=c(M,this._area0,y,g,m)),_}}(e.PolygonArea,e.Geodesic,e.Math,e.Accumulator),t(e)})(function(t){r.exports?r.exports=t:window.geodesic=t})}(bd)),bd.exports}var _P=yP();function wP(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.g=new _P.Geodesic.Geodesic(this.a,this.es/(1+Math.sqrt(1-this.es)))}function EP(r){var t=r.x,e=r.y,n=Math.sin(r.y),i=Math.cos(r.y),s=ht(t-this.long0),a,o,l,u,c,h,f,g,m,_,E,M,y,w,v;return this.sphere?Math.abs(this.sin_p12-1)<=st?(r.x=this.x0+this.a*(Q-e)*Math.sin(s),r.y=this.y0-this.a*(Q-e)*Math.cos(s),r):Math.abs(this.sin_p12+1)<=st?(r.x=this.x0+this.a*(Q+e)*Math.sin(s),r.y=this.y0+this.a*(Q+e)*Math.cos(s),r):(m=this.sin_p12*n+this.cos_p12*i*Math.cos(s),f=Math.acos(m),g=f?f/Math.sin(f):1,r.x=this.x0+this.a*g*i*Math.sin(s),r.y=this.y0+this.a*g*(this.cos_p12*n-this.sin_p12*i*Math.cos(s)),r):(a=Eh(this.es),o=Sh(this.es),l=Ph(this.es),u=Ch(this.es),Math.abs(this.sin_p12-1)<=st?(c=this.a*Yr(a,o,l,u,Q),h=this.a*Yr(a,o,l,u,e),r.x=this.x0+(c-h)*Math.sin(s),r.y=this.y0-(c-h)*Math.cos(s),r):Math.abs(this.sin_p12+1)<=st?(c=this.a*Yr(a,o,l,u,Q),h=this.a*Yr(a,o,l,u,e),r.x=this.x0+(c+h)*Math.sin(s),r.y=this.y0+(c+h)*Math.cos(s),r):Math.abs(t)<st&&Math.abs(e-this.lat0)<st?(r.x=r.y=0,r):(_=this.lat0/de,E=this.long0/de,M=e/de,y=t/de,w=this.g.Inverse(_,E,M,y,this.g.AZIMUTH),v=w.azi1*de,r.x=w.s12*Math.sin(v),r.y=w.s12*Math.cos(v),r))}function SP(r){r.x-=this.x0,r.y-=this.y0;var t,e,n,i,s,a,o,l,u,c,h,f,g,m,_,E,M,y;return this.sphere?(t=Math.sqrt(r.x*r.x+r.y*r.y),t>2*Q*this.a?void 0:(e=t/this.a,n=Math.sin(e),i=Math.cos(e),s=this.long0,Math.abs(t)<=st?a=this.lat0:(a=ma(i*this.sin_p12+r.y*n*this.cos_p12/t),o=Math.abs(this.lat0)-Q,Math.abs(o)<=st?this.lat0>=0?s=ht(this.long0+Math.atan2(r.x,-r.y)):s=ht(this.long0-Math.atan2(-r.x,r.y)):s=ht(this.long0+Math.atan2(r.x*n,t*this.cos_p12*i-r.y*this.sin_p12*n))),r.x=s,r.y=a,r)):(l=Eh(this.es),u=Sh(this.es),c=Ph(this.es),h=Ch(this.es),Math.abs(this.sin_p12-1)<=st?(f=this.a*Yr(l,u,c,h,Q),t=Math.sqrt(r.x*r.x+r.y*r.y),g=f-t,a=Wc(g/this.a,l,u,c,h),s=ht(this.long0+Math.atan2(r.x,-1*r.y)),r.x=s,r.y=a,r):Math.abs(this.sin_p12+1)<=st?(f=this.a*Yr(l,u,c,h,Q),t=Math.sqrt(r.x*r.x+r.y*r.y),g=t-f,a=Wc(g/this.a,l,u,c,h),s=ht(this.long0+Math.atan2(r.x,r.y)),r.x=s,r.y=a,r):(m=this.lat0/de,_=this.long0/de,E=Math.atan2(r.x,r.y)/de,M=Math.sqrt(r.x*r.x+r.y*r.y),y=this.g.Direct(m,_,E,M,this.g.STANDARD),r.x=y.lon2*de,r.y=y.lat2*de,r))}var PP=["Azimuthal_Equidistant","aeqd"];const CP={init:wP,forward:EP,inverse:SP,names:PP};function IP(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function MP(r){var t,e,n,i,s,a,o,l,u=r.x,c=r.y;return n=ht(u-this.long0),t=Math.sin(c),e=Math.cos(c),i=Math.cos(n),a=this.sin_p14*t+this.cos_p14*e*i,s=1,(a>0||Math.abs(a)<=st)&&(o=this.a*s*e*Math.sin(n),l=this.y0+this.a*s*(this.cos_p14*t-this.sin_p14*e*i)),r.x=o,r.y=l,r}function NP(r){var t,e,n,i,s,a,o;return r.x-=this.x0,r.y-=this.y0,t=Math.sqrt(r.x*r.x+r.y*r.y),e=ma(t/this.a),n=Math.sin(e),i=Math.cos(e),a=this.long0,Math.abs(t)<=st?(o=this.lat0,r.x=a,r.y=o,r):(o=ma(i*this.sin_p14+r.y*n*this.cos_p14/t),s=Math.abs(this.lat0)-Q,Math.abs(s)<=st?(this.lat0>=0?a=ht(this.long0+Math.atan2(r.x,-r.y)):a=ht(this.long0-Math.atan2(-r.x,r.y)),r.x=a,r.y=o,r):(a=ht(this.long0+Math.atan2(r.x*n,t*this.cos_p14*i-r.y*this.sin_p14*n)),r.x=a,r.y=o,r))}var bP=["ortho"];const TP={init:IP,forward:MP,inverse:NP,names:bP};var xe={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},re={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function DP(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=Q-ee/2?this.face=xe.TOP:this.lat0<=-(Q-ee/2)?this.face=xe.BOTTOM:Math.abs(this.long0)<=ee?this.face=xe.FRONT:Math.abs(this.long0)<=Q+ee?this.face=this.long0>0?xe.RIGHT:xe.LEFT:this.face=xe.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function xP(r){var t={x:0,y:0},e,n,i,s,a,o,l={value:0};if(r.x-=this.long0,this.es!==0?e=Math.atan(this.one_minus_f_squared*Math.tan(r.y)):e=r.y,n=r.x,this.face===xe.TOP)s=Q-e,n>=ee&&n<=Q+ee?(l.value=re.AREA_0,i=n-Q):n>Q+ee||n<=-(Q+ee)?(l.value=re.AREA_1,i=n>0?n-mr:n+mr):n>-(Q+ee)&&n<=-ee?(l.value=re.AREA_2,i=n+Q):(l.value=re.AREA_3,i=n);else if(this.face===xe.BOTTOM)s=Q+e,n>=ee&&n<=Q+ee?(l.value=re.AREA_0,i=-n+Q):n<ee&&n>=-ee?(l.value=re.AREA_1,i=-n):n<-ee&&n>=-(Q+ee)?(l.value=re.AREA_2,i=-n-Q):(l.value=re.AREA_3,i=n>0?-n+mr:-n-mr);else{var u,c,h,f,g,m,_;this.face===xe.RIGHT?n=Nu(n,+Q):this.face===xe.BACK?n=Nu(n,3.14159265359):this.face===xe.LEFT&&(n=Nu(n,-Q)),f=Math.sin(e),g=Math.cos(e),m=Math.sin(n),_=Math.cos(n),u=g*_,c=g*m,h=f,this.face===xe.FRONT?(s=Math.acos(u),i=Hc(s,h,c,l)):this.face===xe.RIGHT?(s=Math.acos(c),i=Hc(s,h,-u,l)):this.face===xe.BACK?(s=Math.acos(-u),i=Hc(s,h,-c,l)):this.face===xe.LEFT?(s=Math.acos(-c),i=Hc(s,h,u,l)):(s=i=0,l.value=re.AREA_0)}return o=Math.atan(12/mr*(i+Math.acos(Math.sin(i)*Math.cos(ee))-Q)),a=Math.sqrt((1-Math.cos(s))/(Math.cos(o)*Math.cos(o))/(1-Math.cos(Math.atan(1/Math.cos(i))))),l.value===re.AREA_1?o+=Q:l.value===re.AREA_2?o+=mr:l.value===re.AREA_3&&(o+=1.5*mr),t.x=a*Math.cos(o),t.y=a*Math.sin(o),t.x=t.x*this.a+this.x0,t.y=t.y*this.a+this.y0,r.x=t.x,r.y=t.y,r}function OP(r){var t={lam:0,phi:0},e,n,i,s,a,o,l,u,c,h={value:0};if(r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a,n=Math.atan(Math.sqrt(r.x*r.x+r.y*r.y)),e=Math.atan2(r.y,r.x),r.x>=0&&r.x>=Math.abs(r.y)?h.value=re.AREA_0:r.y>=0&&r.y>=Math.abs(r.x)?(h.value=re.AREA_1,e-=Q):r.x<0&&-r.x>=Math.abs(r.y)?(h.value=re.AREA_2,e=e<0?e+mr:e-mr):(h.value=re.AREA_3,e+=Q),c=mr/12*Math.tan(e),a=Math.sin(c)/(Math.cos(c)-1/Math.sqrt(2)),o=Math.atan(a),i=Math.cos(e),s=Math.tan(n),l=1-i*i*s*s*(1-Math.cos(Math.atan(1/Math.cos(o)))),l<-1?l=-1:l>1&&(l=1),this.face===xe.TOP)u=Math.acos(l),t.phi=Q-u,h.value===re.AREA_0?t.lam=o+Q:h.value===re.AREA_1?t.lam=o<0?o+mr:o-mr:h.value===re.AREA_2?t.lam=o-Q:t.lam=o;else if(this.face===xe.BOTTOM)u=Math.acos(l),t.phi=u-Q,h.value===re.AREA_0?t.lam=-o+Q:h.value===re.AREA_1?t.lam=-o:h.value===re.AREA_2?t.lam=-o-Q:t.lam=o<0?-o-mr:-o+mr;else{var f,g,m;f=l,c=f*f,c>=1?m=0:m=Math.sqrt(1-c)*Math.sin(o),c+=m*m,c>=1?g=0:g=Math.sqrt(1-c),h.value===re.AREA_1?(c=g,g=-m,m=c):h.value===re.AREA_2?(g=-g,m=-m):h.value===re.AREA_3&&(c=g,g=m,m=-c),this.face===xe.RIGHT?(c=f,f=-g,g=c):this.face===xe.BACK?(f=-f,g=-g):this.face===xe.LEFT&&(c=f,f=g,g=-c),t.phi=Math.acos(-m)-Q,t.lam=Math.atan2(g,f),this.face===xe.RIGHT?t.lam=Nu(t.lam,-Q):this.face===xe.BACK?t.lam=Nu(t.lam,-3.14159265359):this.face===xe.LEFT&&(t.lam=Nu(t.lam,+Q))}if(this.es!==0){var _,E,M;_=t.phi<0?1:0,E=Math.tan(t.phi),M=this.b/Math.sqrt(E*E+this.one_minus_f_squared),t.phi=Math.atan(Math.sqrt(this.a*this.a-M*M)/(this.one_minus_f*M)),_&&(t.phi=-t.phi)}return t.lam+=this.long0,r.x=t.lam,r.y=t.phi,r}function Hc(r,t,e,n){var i;return r<st?(n.value=re.AREA_0,i=0):(i=Math.atan2(t,e),Math.abs(i)<=ee?n.value=re.AREA_0:i>ee&&i<=Q+ee?(n.value=re.AREA_1,i-=Q):i>Q+ee||i<=-(Q+ee)?(n.value=re.AREA_2,i=i>=0?i-mr:i+mr):(n.value=re.AREA_3,i+=Q)),i}function Nu(r,t){var e=r+t;return e<-3.14159265359?e+=gh:e>3.14159265359&&(e-=gh),e}var AP=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const LP={init:DP,forward:xP,inverse:OP,names:AP};var Td=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Ih=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],a0=.8487,o0=1.3523,l0=$i/5,RP=1/l0,bu=18,Xc=function(r,t){return r[0]+t*(r[1]+t*(r[2]+t*r[3]))},FP=function(r,t){return r[1]+t*(2*r[2]+t*3*r[3])};function GP(r,t,e,n){for(var i=t;n;--n){var s=r(i);if(i-=s,Math.abs(s)<e)break}return i}function kP(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function zP(r){var t=ht(r.x-this.long0),e=Math.abs(r.y),n=Math.floor(e*l0);n<0?n=0:n>=bu&&(n=bu-1),e=$i*(e-RP*n);var i={x:Xc(Td[n],e)*t,y:Xc(Ih[n],e)};return r.y<0&&(i.y=-i.y),i.x=i.x*this.a*a0+this.x0,i.y=i.y*this.a*o0+this.y0,i}function VP(r){var t={x:(r.x-this.x0)/(this.a*a0),y:Math.abs(r.y-this.y0)/(this.a*o0)};if(t.y>=1)t.x/=Td[bu][0],t.y=r.y<0?-Q:Q;else{var e=Math.floor(t.y*bu);for(e<0?e=0:e>=bu&&(e=bu-1);;)if(Ih[e][0]>t.y)--e;else if(Ih[e+1][0]<=t.y)++e;else break;var n=Ih[e],i=5*(t.y-n[0])/(Ih[e+1][0]-n[0]);i=GP(function(s){return(Xc(n,s)-t.y)/FP(n,s)},i,st,100),t.x/=Xc(Td[e],i),t.y=(5*e+i)*de,r.y<0&&(t.y=-t.y)}return t.x=ht(t.x+this.long0),t}var UP=["Robinson","robin"];const qP={init:kP,forward:zP,inverse:VP,names:UP};function WP(){this.name="geocent"}function HP(r){var t=Fm(r,this.es,this.a);return t}function XP(r){var t=Gm(r,this.es,this.a,this.b);return t}var YP=["Geocentric","geocentric","geocent","Geocent"];const JP={init:WP,forward:HP,inverse:XP,names:YP};var Or={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},Mh={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function KP(){if(Object.keys(Mh).forEach((function(e){if(typeof this[e]>"u")this[e]=Mh[e].def;else{if(Mh[e].num&&isNaN(this[e]))throw new Error("Invalid parameter value, must be numeric "+e+" = "+this[e]);Mh[e].num&&(this[e]=parseFloat(this[e]))}Mh[e].degrees&&(this[e]=this[e]*de)}).bind(this)),Math.abs(Math.abs(this.lat0)-Q)<st?this.mode=this.lat0<0?Or.S_POLE:Or.N_POLE:Math.abs(this.lat0)<st?this.mode=Or.EQUIT:(this.mode=Or.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var r=this.tilt,t=this.azi;this.cg=Math.cos(t),this.sg=Math.sin(t),this.cw=Math.cos(r),this.sw=Math.sin(r)}function QP(r){r.x-=this.long0;var t=Math.sin(r.y),e=Math.cos(r.y),n=Math.cos(r.x),i,s;switch(this.mode){case Or.OBLIQ:s=this.sinph0*t+this.cosph0*e*n;break;case Or.EQUIT:s=e*n;break;case Or.S_POLE:s=-t;break;case Or.N_POLE:s=t;break}switch(s=this.pn1/(this.p-s),i=s*e*Math.sin(r.x),this.mode){case Or.OBLIQ:s*=this.cosph0*t-this.sinph0*e*n;break;case Or.EQUIT:s*=t;break;case Or.N_POLE:s*=-(e*n);break;case Or.S_POLE:s*=e*n;break}var a,o;return a=s*this.cg+i*this.sg,o=1/(a*this.sw*this.h1+this.cw),i=(i*this.cg-s*this.sg)*this.cw*o,s=a*o,r.x=i*this.a,r.y=s*this.a,r}function BP(r){r.x/=this.a,r.y/=this.a;var t={x:r.x,y:r.y},e,n,i;i=1/(this.pn1-r.y*this.sw),e=this.pn1*r.x*i,n=this.pn1*r.y*this.cw*i,r.x=e*this.cg+n*this.sg,r.y=n*this.cg-e*this.sg;var s=un(r.x,r.y);if(Math.abs(s)<st)t.x=0,t.y=r.y;else{var a,o;switch(o=1-s*s*this.pfact,o=(this.p-Math.sqrt(o))/(this.pn1/s+s/this.pn1),a=Math.sqrt(1-o*o),this.mode){case Or.OBLIQ:t.y=Math.asin(a*this.sinph0+r.y*o*this.cosph0/s),r.y=(a-this.sinph0*Math.sin(t.y))*s,r.x*=o*this.cosph0;break;case Or.EQUIT:t.y=Math.asin(r.y*o/s),r.y=a*s,r.x*=o;break;case Or.N_POLE:t.y=Math.asin(a),r.y=-r.y;break;case Or.S_POLE:t.y=-Math.asin(a);break}t.x=Math.atan2(r.x,r.y)}return r.x=t.x+this.long0,r.y=t.y,r}var ZP=["Tilted_Perspective","tpers"];const $P={init:KP,forward:QP,inverse:BP,names:ZP};function jP(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var r=1-this.es,t=1/r;this.radius_p=Math.sqrt(r),this.radius_p2=r,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function tC(r){var t=r.x,e=r.y,n,i,s,a;if(t=t-this.long0,this.shape==="ellipse"){e=Math.atan(this.radius_p2*Math.tan(e));var o=this.radius_p/un(this.radius_p*Math.cos(e),Math.sin(e));if(i=o*Math.cos(t)*Math.cos(e),s=o*Math.sin(t)*Math.cos(e),a=o*Math.sin(e),(this.radius_g-i)*i-s*s-a*a*this.radius_p_inv2<0)return r.x=Number.NaN,r.y=Number.NaN,r;n=this.radius_g-i,this.flip_axis?(r.x=this.radius_g_1*Math.atan(s/un(a,n)),r.y=this.radius_g_1*Math.atan(a/n)):(r.x=this.radius_g_1*Math.atan(s/n),r.y=this.radius_g_1*Math.atan(a/un(s,n)))}else this.shape==="sphere"&&(n=Math.cos(e),i=Math.cos(t)*n,s=Math.sin(t)*n,a=Math.sin(e),n=this.radius_g-i,this.flip_axis?(r.x=this.radius_g_1*Math.atan(s/un(a,n)),r.y=this.radius_g_1*Math.atan(a/n)):(r.x=this.radius_g_1*Math.atan(s/n),r.y=this.radius_g_1*Math.atan(a/un(s,n))));return r.x=r.x*this.a,r.y=r.y*this.a,r}function eC(r){var t=-1,e=0,n=0,i,s,a,o;if(r.x=r.x/this.a,r.y=r.y/this.a,this.shape==="ellipse"){this.flip_axis?(n=Math.tan(r.y/this.radius_g_1),e=Math.tan(r.x/this.radius_g_1)*un(1,n)):(e=Math.tan(r.x/this.radius_g_1),n=Math.tan(r.y/this.radius_g_1)*un(1,e));var l=n/this.radius_p;if(i=e*e+l*l+t*t,s=2*this.radius_g*t,a=s*s-4*i*this.C,a<0)return r.x=Number.NaN,r.y=Number.NaN,r;o=(-s-Math.sqrt(a))/(2*i),t=this.radius_g+o*t,e*=o,n*=o,r.x=Math.atan2(e,t),r.y=Math.atan(n*Math.cos(r.x)/t),r.y=Math.atan(this.radius_p_inv2*Math.tan(r.y))}else if(this.shape==="sphere"){if(this.flip_axis?(n=Math.tan(r.y/this.radius_g_1),e=Math.tan(r.x/this.radius_g_1)*Math.sqrt(1+n*n)):(e=Math.tan(r.x/this.radius_g_1),n=Math.tan(r.y/this.radius_g_1)*Math.sqrt(1+e*e)),i=e*e+n*n+t*t,s=2*this.radius_g*t,a=s*s-4*i*this.C,a<0)return r.x=Number.NaN,r.y=Number.NaN,r;o=(-s-Math.sqrt(a))/(2*i),t=this.radius_g+o*t,e*=o,n*=o,r.x=Math.atan2(e,t),r.y=Math.atan(n*Math.cos(r.x)/t)}return r.x=r.x+this.long0,r}var rC=["Geostationary Satellite View","Geostationary_Satellite","geos"];const nC={init:jP,forward:tC,inverse:eC,names:rC};var Nh=1.340264,bh=-.081106,Th=893e-6,Dh=.003796,Yc=Math.sqrt(3)/2;function iC(){this.es=0,this.long0=this.long0!==void 0?this.long0:0}function sC(r){var t=ht(r.x-this.long0),e=r.y,n=Math.asin(Yc*Math.sin(e)),i=n*n,s=i*i*i;return r.x=t*Math.cos(n)/(Yc*(Nh+3*bh*i+s*(7*Th+9*Dh*i))),r.y=n*(Nh+bh*i+s*(Th+Dh*i)),r.x=this.a*r.x+this.x0,r.y=this.a*r.y+this.y0,r}function aC(r){r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a;var t=1e-9,e=12,n=r.y,i,s,a,o,l,u;for(u=0;u<e&&(i=n*n,s=i*i*i,a=n*(Nh+bh*i+s*(Th+Dh*i))-r.y,o=Nh+3*bh*i+s*(7*Th+9*Dh*i),n-=l=a/o,!(Math.abs(l)<t));++u);return i=n*n,s=i*i*i,r.x=Yc*r.x*(Nh+3*bh*i+s*(7*Th+9*Dh*i))/Math.cos(n),r.y=Math.asin(Math.sin(n)/Yc),r.x=ht(r.x+this.long0),r}var oC=["eqearth","Equal Earth","Equal_Earth"];const lC={init:iC,forward:sC,inverse:aC,names:oC};var xh=1e-10;function uC(){var r;if(this.phi1=this.lat1,Math.abs(this.phi1)<xh)throw new Error;this.es?(this.en=Sd(this.es),this.m1=Iu(this.phi1,this.am1=Math.sin(this.phi1),r=Math.cos(this.phi1),this.en),this.am1=r/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=cC,this.forward=hC):(Math.abs(this.phi1)+xh>=Q?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=dC,this.forward=fC)}function hC(r){var t=ht(r.x-(this.long0||0)),e=r.y,n,i,s;return n=this.am1+this.m1-Iu(e,i=Math.sin(e),s=Math.cos(e),this.en),i=s*t/(n*Math.sqrt(1-this.es*i*i)),r.x=n*Math.sin(i),r.y=this.am1-n*Math.cos(i),r.x=this.a*r.x+(this.x0||0),r.y=this.a*r.y+(this.y0||0),r}function cC(r){r.x=(r.x-(this.x0||0))/this.a,r.y=(r.y-(this.y0||0))/this.a;var t,e,n,i;if(e=un(r.x,r.y=this.am1-r.y),i=Pd(this.am1+this.m1-e,this.es,this.en),(t=Math.abs(i))<Q)t=Math.sin(i),n=e*Math.atan2(r.x,r.y)*Math.sqrt(1-this.es*t*t)/Math.cos(i);else if(Math.abs(t-Q)<=xh)n=0;else throw new Error;return r.x=ht(n+(this.long0||0)),r.y=pa(i),r}function fC(r){var t=ht(r.x-(this.long0||0)),e=r.y,n,i;return i=this.cphi1+this.phi1-e,Math.abs(i)>xh?(r.x=i*Math.sin(n=t*Math.cos(e)/i),r.y=this.cphi1-i*Math.cos(n)):r.x=r.y=0,r.x=this.a*r.x+(this.x0||0),r.y=this.a*r.y+(this.y0||0),r}function dC(r){r.x=(r.x-(this.x0||0))/this.a,r.y=(r.y-(this.y0||0))/this.a;var t,e,n=un(r.x,r.y=this.cphi1-r.y);if(e=this.cphi1+this.phi1-n,Math.abs(e)>Q)throw new Error;return Math.abs(Math.abs(e)-Q)<=xh?t=0:t=n*Math.atan2(r.x,r.y)/Math.cos(e),r.x=ht(t+(this.long0||0)),r.y=pa(e),r}var pC=["bonne","Bonne (Werner lat_1=90)"];const gC={init:uC,names:pC};function mC(r){r.Proj.projections.add(Uc),r.Proj.projections.add(qc),r.Proj.projections.add(uE),r.Proj.projections.add(yE),r.Proj.projections.add(CE),r.Proj.projections.add(TE),r.Proj.projections.add(RE),r.Proj.projections.add(VE),r.Proj.projections.add(XE),r.Proj.projections.add(BE),r.Proj.projections.add(dS),r.Proj.projections.add(_S),r.Proj.projections.add(CS),r.Proj.projections.add(DS),r.Proj.projections.add(RS),r.Proj.projections.add(VS),r.Proj.projections.add(XS),r.Proj.projections.add(BS),r.Proj.projections.add(rP),r.Proj.projections.add(oP),r.Proj.projections.add(fP),r.Proj.projections.add(vP),r.Proj.projections.add(CP),r.Proj.projections.add(TP),r.Proj.projections.add(LP),r.Proj.projections.add(qP),r.Proj.projections.add(JP),r.Proj.projections.add($P),r.Proj.projections.add(nC),r.Proj.projections.add(lC),r.Proj.projections.add(gC)}on.defaultDatum="WGS84",on.Proj=ts,on.WGS84=new on.Proj("WGS84"),on.Point=Cu,on.toPoint=Um,on.defs=Xr,on.nadgrid=uw,on.transform=Vc,on.mgrs=Nw,on.version="__VERSION__",mC(on);const u0=on("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=geocent +datum=WGS84");function es(r){return u0.forward(r)}function h0(r){return u0.inverse(r)}const c0=on("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs");function vC(r){const t=c0.forward([r[0],r[1]]);return[t[0],t[1],r[2]]}function yC(r){const t=c0.inverse([r[0],r[1]]);return[t[0],t[1],r[2]]}function f0(r,t){const e=es(r),n=es(t);return d.Vector.distance(e,n)}function Oh(r,t){const e=[];do{const n=r.length;let i=0;for(let s=0;s<n-1;++s){if(t===void 0||t==="GEODESIC"){const a=ud(r[s],r[s+1]),o=Math.abs(r[s][2]-r[s+1][2]);if(o===0)i+=a;else{const l=Math.sqrt(a*a+o*o);i+=l}}else if(t==="RHUMB"){const a=hm(r[s],r[s+1]),o=Math.abs(r[s][2]-r[s+1][2]);if(o===0)i+=a;else{const l=Math.sqrt(a*a+o*o);i+=l}}else if(t==="NONE"){const a=f0(r[s],r[s+1]);i+=a}else console.warn(`未知的arcType: ${t},导致距离无法计算!`);e.push(i)}}while(!1);return e}function Dd(r){const t="__getXyzFromPostion";let e=d.getExtProp(r,t);return(!e||!d.Vector.equals(e[0],r))&&(e=[[...r],es(r)],d.setExtProp(r,t,e)),e[1]}class d0 extends d.Destroyable{constructor(){super();p(this,"_data",this.dv(d.react(void 0)))}set data(e){this._data.value=e}get data(){return this._data.value}get dataChanged(){return this._data.changed}}class p0 extends d.Destroyable{constructor(){super(...arguments);p(this,"_dragStartEvent",this.dv(new d.Event));p(this,"_dragOverEvent",this.dv(new d.Event));p(this,"_dragLeaveEvent",this.dv(new d.Event));p(this,"_dropEvent",this.dv(new d.Event))}dragStart(e){this._dragStartEvent.emit(e)}dragOver(e){this._dragOverEvent.emit(e)}dragLeave(e){this._dragLeaveEvent.emit(e)}drop(e){this._dropEvent.emit(e)}}function _C(r,t){t&&(Reflect.has(t,"editing")?t.editing=!0:Reflect.has(t,"positionEditing")&&(t.positionEditing=!0))}function wC(r){["Czm3DTiles","View","ESCameraView","OlView","GeoCameraController"].includes(r.typeName)||(Reflect.has(r,"editing")?r.editing=!0:Reflect.has(r,"positionEditing")&&(r.positionEditing=!0)),typeof r.execOnCreating=="function"&&r.execOnCreating()}function Jc(r,t){d.getExtProp(r,"__treeItem")&&console.error("setSceneObjectTreeItem error!"),d.setExtProp(r,"__treeItem",t)}function EC(r){return d.getExtProp(r,"__treeItem")}function SC(r){if(!(r.startsWith("./")||r.startsWith("../")||r.startsWith("/")))return r;const t=document.createElement("a");t.href=r;const e=t.href;return t.remove(),e}function PC(r){try{return JSON.parse(r),!0}catch{return!1}}function CC(r){return r instanceof Function?r():r}function g0(r,t){for(let e of r)if(t.includes(e))return!0;return!1}function Ds(r,t){const e=r,n=t;return e===void 0||e.length===0||n===void 0||n.length===0?!0:g0(e,n)}function IC(r){const t=setTimeout(()=>{r(),clearTimeout(t)})}function Tu(r){let t=r%360;return t=t<0?360+t:t,t}function m0(r){return Tu(r+180)-180}function Kc(r,t,e){let n=Tu(r),i=Tu(t);Math.abs(n-i)>180&&(n<i?n+=360:i+=360);const s=n*(1-e)+i*e;return m0(s)}function xd(r,t,e,n){return n=n||[0,0,0],n[0]=Kc(r[0],t[0],e),n[1]=Kc(r[1],t[1],e),n[2]=Kc(r[2],t[2],e),n}async function v0(r,t,e="editing"){const n=new d.Destroyable;r.ad(n);const i=t.bind(r);let s=r.viewer;if(s||await new Promise(a=>{n.ad(r.viewerChanged.don(o=>{s=o,a()}))}),!s){console.warn("viewer is undefined!,无法绑定编辑");return}return n.ad(r[`${e}Changed`].don(()=>{var a;r[`${e}`]?i():(a=(r.combinationClass?r.getMainClass():r).editingID)!=null&&a.includes("inner")&&s&&s.stopEditing()})),n.ad(s.editingEvent.don(a=>{if(a.objectIDs.includes(r.id)&&a.type==="end"){const o=r.combinationClass?r.getMainClass():r;o.editingID&&a.editingID.includes(o.editingID)?r[`${e}`]=!1:r[`${e}`]=!o.editingID.includes("outer")}})),r[`${e}`]&&i(),n}function MC(r,t){const{type:e,id:n}=r;if(e){const i=ft.create(e,n);if(i)return i.json=r,i;console.warn(`cannot create sceneObject from type(${e})`)}else console.warn(`cannot create sceneObject from type(${e})`)}function y0(r){const t=r.children&&d.every(r.children,n=>{if(!(n instanceof Ar))throw new Error("!(treeItem instanceof SceneTreeItem)");return!n.show})||!1,e=r.sceneTree.getSceneObjectShowFunc(r.sceneObject);return!t||e}class Ar extends d.TreeItem{constructor(e,n=!1,i,s,a=!0){super(e,n,i);p(this,"_dragDrop");p(this,"_showChangedNotAffectChildren",!1);p(this,"_showChangedNotAffectParent",!1);p(this,"_type",this.dv(d.react("Unknown")));p(this,"_isExport",this.dv(d.react(!0)));const o=()=>this.tree&&this.tree.itemsChanged.emit([this]);this.dispose(this.nameChanged.disposableOn(o)),this.name=`未命名条目(${this.id})`,this.extras=s,this._isExport.value=a;let l;const u=()=>{l&&(l(),l=void 0)};this.dispose(u),this.dispose(this.sceneObjectChanged.disposableOn(c=>{u(),c&&(l=d.bind([this,"name"],[c,"name"]))})),this.dispose(this.showChanged.disposableOn(c=>{if(e.setSceneObjectShowFunc(this.sceneObject,c),this.tree&&this.tree.forceRedraw(),this.children&&!this._showChangedNotAffectChildren)for(let h of this.children)h instanceof Ar&&(h._showChangedNotAffectParent=!0,h.show=c,h._showChangedNotAffectParent=!1);this.parent&&this.parent instanceof Ar&&!this._showChangedNotAffectParent&&(this.parent._showChangedNotAffectChildren=!0,this.parent.show=y0(this.parent),this.parent._showChangedNotAffectChildren=!1)})),this.dv(new d.ObjResettingWithEvent(this.sceneObjectChanged,()=>{if(!this.sceneObject)return;const c=new d.Destroyable;if("show"in this.sceneObject&&"showChanged"in this.sceneObject&&this.sceneObject.showChanged instanceof Event){const h=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};h(),c.dispose(this.sceneObject.showChanged.disposableOn(h))}else if("enabled"in this.sceneObject&&"enabledChanged"in this.sceneObject&&this.sceneObject.enabledChanged instanceof Event){const h=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};h(),c.dispose(this.sceneObject.enabledChanged.disposableOn(h))}return c})),this.childrenChangedEvent.disposableOn(()=>{const c=y0(this);this._showChangedNotAffectChildren=!0,this.show=c,this._showChangedNotAffectChildren=!1});{const c=()=>{let h="Unknown";this.sceneObject?h=this.sceneObject.typeName:this.children&&(h="Folder"),this._type.value=h};this.dispose(this.sceneObjectChanged.disposableOn(c)),this.dispose(this.childrenResetedEvent.disposableOn(c)),c()}}get dragDrop(){return this._dragDrop||(this._dragDrop=this.dv(this.sceneTree.createTreeItemDragDropFunc(this))),this._dragDrop}get type(){return this._type.value}get typeChanged(){return this._type.changed}get isExport(){return this._isExport.value}get isExportChanged(){return this._isExport.changed}set isExport(e){this._isExport.value=e}get sceneTree(){return this.tree}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){try{this.json=JSON.parse(e)}catch(n){console.error(`sceneTreeItem.jsonStr error ${n}`,n)}}get json(){const e=this.children&&[...this.children].filter(n=>n.isExport).map(n=>n.json);return{name:this.name,show:this.show?void 0:!1,collapsed:this.uiTreeObject.collapsed?!0:void 0,sceneObj:this.sceneObject&&this.sceneObject.json,children:e,extras:this.extras}}set json(e){if(e.name!==void 0&&(this.name=e.name),this.extras=e.extras,this._showChangedNotAffectChildren=!0,this._showChangedNotAffectParent=!0,this.show=e.show??!0,this._showChangedNotAffectChildren=!1,this._showChangedNotAffectParent=!1,this.uiTreeObject.collapsed=e.collapsed??!1,this.sceneObject=void 0,e.sceneObj&&(this.sceneObject=this.sceneTree.createSceneObjectFunc(e.sceneObj,this)),!!e.children){if(this.resetChildren(!0),!this.children)throw new Error("resetChildren(true) cannot get children!");for(let n of e.children){const i=new Ar(this.tree,!0);i.json=n,this.children.push(i)}}}clone(){try{const e=new Ar(this.sceneTree,!!this.children,void 0,this.extras,this.isExport);return e.json=this.json,e.name=this.sceneTree.getSceneTreeItemCloneNameFunc(this),e}catch(e){console.error(`SceneTreeItem.clone error: ${e}`,e)}}insertNewTreeItem(e,n){if(e==="FolderInnerOrAfter"||e==="FolderInnerOrBefore"||e==="FolderInner"){if(n&&n.tree!==this.tree)return console.warn("newTreeItem.tree !== this.tree"),!1;do{if(!this.children||e.includes("Or")&&this.sceneObject)break;return n&&this.children.push(n),!0}while(!1);if(e==="FolderInner")return!1;if(e==="FolderInnerOrAfter")return super.insertNewTreeItem("After",n);if(e==="FolderInnerOrBefore")return super.insertNewTreeItem("Before",n);throw new Error("should not be here!")}else return super.insertNewTreeItem(e,n)}}(r=>{r.createDefaultProps=()=>({name:"未命名条目",nameEditing:!1,sceneObject:void 0,show:!0,extras:d.reactJsonWithUndefined(void 0)})})(Ar||(Ar={})),d.extendClassProps(Ar.prototype,Ar.createDefaultProps);function _0(r,t,e){let{offsetY:n}=t;if(!t.target||!("clientTop"in t.target))return"none";n+=2,n+=t.target.clientTop;let i="none";return r.children?n<=e*.3?i="before":n>=e*.7?!r.uiTreeObject.collapsed&&r.children.length>0?i="inner":i="after":i="inner":n<=e*.5?i="before":i="after",i}class w0 extends p0{constructor(t){super(),this._treeItem=t;const{dragStartDataManager:e}=this._treeItem.sceneTree;let n="none";const i=this.disposeVar(d.createTimeoutWithStartValues(()=>{this._treeItem.uiTreeObject.moveToPositionMode=n,console.log(`uiTreeObject.moveToPositionMode = lastDragMode(${n});`)},200));function s(a){n!==a&&(n=a,i.restart())}this.dispose(this._dragStartEvent.disposableOn(a=>{e.data={type:"UITreeA",value:this._treeItem}})),this.dispose(this._dragOverEvent.disposableOn(a=>{if(a.dataTransfer){a.preventDefault();do{const o=e;if(!(o.data&&o.data.type==="UITreeA"&&o.data.value!==void 0))break;const l=o.data.value,u=this._treeItem,{tree:c}=u;if(!c)break;const h=[...c.selectedItems];~h.indexOf(l)||h.push(l);const f=_0(u,a,c.itemDivHeight);if(f==="none"||!d.Tree.canMoveToTreeItems(h,u,f))break;a.dataTransfer.dropEffect="move",s(f);return}while(!1);a.dataTransfer.dropEffect="none",s("none")}})),this.dispose(this._dropEvent.disposableOn(a=>{const o=e;if(!(o.data&&o.data.type==="UITreeA"&&o.data.value!==void 0))return;const l=o.data.value,u=this._treeItem,{tree:c}=u;if(!c)return;const h=[...c.selectedItems];~h.indexOf(l)||h.push(l);const f=_0(u,a,c.itemDivHeight);f!=="none"&&d.Tree.canMoveToTreeItems(h,u,f)&&(d.Tree.moveToTreeItems(h,u,f),o.data=void 0,s("none"))})),this.dispose(this._dragLeaveEvent.disposableOn(()=>{n="none",i.restart()}))}}function NC(r){if(!(r instanceof Ar))throw new Error("defaultCreateTreeItemDragDrop !(treeItem instanceof SceneTreeItem)");return new w0(r)}function bC(r){let t=!1;do{if(!r)break;"show"in r?t=r.show??!0:"enabled"in r&&(t=r.enabled??!0)}while(!1);return t}function TC(r,t){r&&("show"in r?r.show=t:"enabled"in r&&(r.enabled=t))}const DC=["EnvironmentVariables","ScriptsLoader","SceneScript","ScriptLoader"];function xC(r){const t=[],{root:e={}}=r,n=[e];for(;n.length>0;){const i=n.pop();if(!i)throw new Error("!todo");if(i.children){for(let s of i.children)if(s.children&&n.unshift(s),s.sceneObj){const{type:a=void 0}=s.sceneObj;a||(console.warn("sceneObjJson has no type! treeItem.sceneObj: "),console.warn(s.sceneObj)),a&&DC.includes(a)&&t.push(s.sceneObj)}}}return t}async function OC(r,t){const e=xC(r);let n=0;const i=e.length;for(let s of e)if(++n,t){const a=n/i;t(a,n,i)}}class E0 extends d.Destroyable{constructor(e,n){super();p(this,"treeItemContexMenuCallback");this._sceneTree=e,this._projectManager=n}get sceneTree(){return this._sceneTree}}class AC extends d.Destroyable{constructor(e){super();p(this,"_jsonLoadingEvent",this.disposeVar(new d.Event));p(this,"_setJsonProcessing",this.disposeVar(d.createProcessingFromAsyncFunc(async(e,n)=>{this._jsonLoadingEvent.emit({type:"init"}),this._jsonLoadingEvent.emit({type:"loading"}),n&&await e.promise(this._sceneTree.preloadFunc(n)),this._setJson(n),this._jsonLoadingEvent.emit({type:"loaded"})})));this._sceneTree=e,this._setJsonProcessing.errorFunc=n=>{this._jsonLoadingEvent.emit({type:"error",error:n})}}get jsonLoadingEvent(){return this._jsonLoadingEvent}_setJson(e){try{this._sceneTree.setJson(e||{})}catch(n){console.error(`json数据装配时发生错误!error: ${n}`)}}get json(){return this._sceneTree.getJson()}set json(e){this._setJsonProcessing.restart(new d.CancelError("JSON重新赋值!"),e)}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){this.json=JSON.parse(e)}}function LC(r){return r.name+"_clone"}function Od(r,t,e){if(r instanceof Ar)return r.insertNewTreeItem(t,e);{const n={FolderInnerOrAfter:"InnerOrAfter",FolderInnerOrBefore:"InnerOrBefore",FolderInner:"Inner",InnerOrAfter:"InnerOrAfter",InnerOrBefore:"InnerOrBefore",Inner:"Inner",After:"After",Before:"Before"};return r.insertNewTreeItem(n[t],e)}}function RC(r){[r,...r.getDescendants()].forEach(t=>t.destroy())}const cn=class cn extends d.Tree{constructor(e,n,i,s){super(i);p(this,"_jsonLoading",this.disposeVar(new AC(this)));p(this,"createSceneObjectFunc",cn.defaultCreateSceneObjectFunc);p(this,"createTreeItemDragDropFunc",cn.defaultCreateTreeItemDragDropFunc);p(this,"preloadFunc",cn.defaultPreload);p(this,"getSceneObjectShowFunc",cn.defaultGetSceneObjectShow);p(this,"setSceneObjectShowFunc",cn.defaultSetSceneObjectShow);p(this,"getSceneTreeItemCloneNameFunc",cn.defaultGetSceneTreeItemCloneNameFunc);p(this,"debug",!1);p(this,"_contextMenu",this.disposeVar(new E0(this,this.projectManager)));p(this,"_showPropUiOnSelecting",this.disposeVar(d.react(!0)));this._name=e,this._dragStartDataManager=n,this._projectManager=s,this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{var o,l;window.lssn=this.lastSelectedItem,window.lsso=(o=this.lastSelectedItem)==null?void 0:o.sceneObject,this.debug&&console.log(((l=this.lastSelectedItem)==null?void 0:l.sceneObject)??"select null")}));const{sceneObjectsManager:a}=this._projectManager;this.dispose(this.itemsDeleted.disposableOn(o=>{for(let l of o){const u=l,{sceneObject:c}=u;c&&a.deleteSceneObject(c)&&c.destroy()&&Jc(c,void 0);for(let h of u.getDescendants()){const{sceneObject:f}=h;f&&a.deleteSceneObject(f)&&f.destroy()&&Jc(f,void 0)}RC(l)}})),this.dispose(this.itemsAdded.disposableOn(o=>{for(let l of o){const u=l;u.sceneObject&&a.addSceneObject(u.sceneObject)&&Jc(u.sceneObject,u)}})),this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{if(!this.showPropUiOnSelecting)return;this._projectManager.propUiTreeManager.sceneObject=void 0;const{lastSelectedItem:o}=this;o&&(this._projectManager.propUiTreeManager.sceneObject=o.sceneObject)}))}get json(){return this._jsonLoading.json}set json(e){this._jsonLoading.json=e}get jsonStr(){return this._jsonLoading.jsonStr}set jsonStr(e){this._jsonLoading.jsonStr=e}get jsonLoadingEvent(){return this._jsonLoading.jsonLoadingEvent}get name(){return this._name}get projectManager(){return this._projectManager}get contextMenu(){return this._contextMenu}get showPropUiOnSelecting(){return this._showPropUiOnSelecting.value}set showPropUiOnSelecting(e){this._showPropUiOnSelecting.value=e}get showPropUiOnSelectingChanged(){return this._showPropUiOnSelecting.changed}get sceneUiTree(){return this.uiTree}getTreeItemFromSceneObjId(e){const n=this.getDescendants();let i;for(let s of n)if(s.sceneObject&&s.sceneObject.id===e){i=s;break}return i}get dragStartDataManager(){return this._dragStartDataManager}getJson(){return{root:{children:[...this.children].filter(e=>e.isExport).map(e=>e.json)}}}setJson(e){var i;e.root=e.root||{};const n=e.root.children??[];this.root.resetChildren(!0);for(let s of n){const a=new Ar(this,!0);a.json=s,(i=this.root.children)==null||i.push(a)}}testAddNewTreeItem(e,n){const i=e||this.lastSelectedItem||this.root;return i?Od(i,n):!1}addNewTreeItem(e,n,i,s){const a=e||this.lastSelectedItem||this.root;if(a&&Od(a,n)){const o=new Ar(this,i);if(o.sceneObject=s,!Od(a,n,o))throw new Error("currentTreeItem.insertNewTreeItem return false!");return o}}createSceneObjectTreeItem(e,n,i,s){const a=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,a)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const o=ft.create(e,n);return o?this.addNewTreeItem(i,s??"FolderInnerOrAfter",!0,o):void 0}createGroupTreeItem(e,n,i,s){const a=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,a)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const o=this.addNewTreeItem(i,s??"FolderInnerOrAfter",!0);if(!o){console.warn("addNewTreeItem error!");return}return o.name=e??"未命名组节点",o}createSceneObjectTreeItemFromClass(e,n,i,s){const a=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,a))return;const o=ft.createFromClass(e,n);return o?this.addNewTreeItem(i,a,!0,o):void 0}createSceneObjectTreeItemFromJson(e,n,i){const s=i??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(n,s))return;const a=ft.createFromJson(e);return a?this.addNewTreeItem(n,i??"FolderInnerOrAfter",!0,a):void 0}destroySceneObjectTreeItem(e){if(e===this.root){console.warn("cannot destroy root! please use function destroyAllSceneObjectTreeItems!");return}e.detachFromParent()}destroyAllSceneObjectTreeItems(){if(!this.root.children)return;const e=[...this.root.children];for(let n of e)this.destroySceneObjectTreeItem(n)}};p(cn,"defaultCreateSceneObjectFunc",MC),p(cn,"defaultCreateTreeItemDragDropFunc",NC),p(cn,"defaultPreload",OC),p(cn,"defaultGetSceneObjectShow",bC),p(cn,"defaultSetSceneObjectShow",TC),p(cn,"defaultGetSceneTreeItemCloneNameFunc",LC);let Ah=cn;const Ad={saturation:.35,brightness:1.4,gamma:.8,atmosphereScatteringIntensity:5,groundColor:[0,.09411764705882353,.3137254901960784,1]};class S0 extends d.Tree{constructor(t){super(t)}get propUiTree(){return this.uiTree}}class Ld extends d.TreeItem{constructor(t,e,n){super(t,e),this._property=n}get property(){return this._property}}class Rd extends Ld{constructor(t,e){super(t,!1,e)}}class Fd extends Ld{constructor(t,e){super(t,!0,e)}get groupChildren(){return this.children}}function P0(r,t){const e=new S0(t),n=r.getProperties("chinese"),i=[];for(let s of n)if(s instanceof H){const a=new Fd(e,s);a.d(()=>s.destroy()),e.children.push(a),i.push(a)}else{const a=new Rd(e,s);e.children.push(a),a.d(()=>s.destroy())}for(;i.length>0;){const s=i.pop();if(!s)throw new Error("should not be here!");const a=s;if(!(a.property instanceof H))throw new Error("!(treeItem.property instanceof GroupProperty)");for(let o of a.property.children)if(o instanceof H){const l=new Fd(e,o);l.d(()=>o.destroy()),a.groupChildren.push(l),i.push(l)}else{const l=new Rd(e,o);a.groupChildren.push(l),l.d(()=>o.destroy())}}return e.d(()=>{e.itemChildrenChanged.reset(),e.itemChildrenToChange.reset();const s=[...e.getDescendants()];s.forEach(a=>{a.children&&(a.children.length=0),a.destroy()}),s.length=0}),e}class Du extends d.Destroyable{constructor(e){super();p(this,"_propTreeReact",this.dv(d.react(void 0)));this.d(()=>this._propTreeReact.value=void 0),this.dv(new d.ObjResettingWithEvent(this.sceneObjectChanged,n=>{if(!n)return;const i=new d.Destroyable;return i.d(n.toDestroyEvent.don(()=>{this.sceneObject=void 0})),i})),this.d(this.sceneObjectChanged.don(n=>{this._propTreeReact.value=void 0,!(!n||!(n instanceof ft))&&(this._propTreeReact.value=P0(n,e))}))}get propTree(){return this._propTreeReact.value}get propTreeChanged(){return this._propTreeReact.changed}}(r=>{r.createDefaultProps=()=>({sceneObject:void 0})})(Du||(Du={})),d.extendClassProps(Du.prototype,Du.createDefaultProps);function FC(r,t,e,n=!0){n&&e(),r.dispose(t.disposableOn(e))}class GC extends d.Destroyable{constructor(e,n,i,s){super();p(this,"_sceneObjectId",this.dv(new d.SceneObjectWithId));this._id=e,this._startTimeStamp=n,this._duration=i,this._parent=s,this._sceneObjectId.id=this._id;const a=()=>{if(!this.player)return;const{currentTime:o=0}=this._parent,l=o-this._startTimeStamp;this.player.currentTime=d.clamp(l,0,this._duration)*(this.player.speed??1)};a(),this.d(this._parent.currentTimeChanged.don(a)),this.d(this.playerChanged.don(a))}get player(){return this._sceneObjectId.sceneObject instanceof bi?this._sceneObjectId.sceneObject:void 0}get playerChanged(){return this._sceneObjectId.sceneObjectChanged}}const kC=`
|
|
30
|
+
northing meters`+r;var f=h/2,g=0,m=0,_,E,M,y,w;return f>0&&(_=1e5/Math.pow(10,f),E=r.substring(s,s+f),g=parseFloat(E)*_,M=r.substring(s+f),m=parseFloat(M)*_),y=g+u,w=m+c,{easting:y,northing:w,zoneLetter:o,zoneNumber:a,accuracy:_}}function Lw(r,t){for(var e=Ym.charCodeAt(t-1),n=1e5,i=!1;e!==r.charCodeAt(0);){if(e++,e===ln&&e++,e===ni&&e++,e>wh){if(i)throw"Bad character: "+r;e=Pu,i=!0}n+=1e5}return n}function Rw(r,t){if(r>"V")throw"MGRSPoint given invalid Northing "+r;for(var e=Jm.charCodeAt(t-1),n=0,i=!1;e!==r.charCodeAt(0);){if(e++,e===ln&&e++,e===ni&&e++,e>_h){if(i)throw"Bad character: "+r;e=Pu,i=!0}n+=1e5}return n}function Fw(r){var t;switch(r){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+r}function Cu(r,t,e){if(!(this instanceof Cu))return new Cu(r,t,e);if(Array.isArray(r))this.x=r[0],this.y=r[1],this.z=r[2]||0;else if(typeof r=="object")this.x=r.x,this.y=r.y,this.z=r.z||0;else if(typeof r=="string"&&typeof t>"u"){var n=r.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=r,this.y=t,this.z=e||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Cu.fromMGRS=function(r){return new Cu(Qm(r))},Cu.prototype.toMGRS=function(r){return Km([this.x,this.y],r)};var Gw=1,kw=.25,jm=.046875,t0=.01953125,e0=.01068115234375,zw=.75,Vw=.46875,Uw=.013020833333333334,qw=.007120768229166667,Ww=.3645833333333333,Hw=.005696614583333333,Xw=.3076171875;function Sd(r){var t=[];t[0]=Gw-r*(kw+r*(jm+r*(t0+r*e0))),t[1]=r*(zw-r*(jm+r*(t0+r*e0)));var e=r*r;return t[2]=e*(Vw-r*(Uw+r*qw)),e*=r,t[3]=e*(Ww-r*Hw),t[4]=e*r*Xw,t}function Iu(r,t,e,n){return e*=t,t*=t,n[0]*r-e*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))}var Yw=20;function Pd(r,t,e){for(var n=1/(1-t),i=r,s=Yw;s;--s){var a=Math.sin(i),o=1-t*a*a;if(o=(Iu(i,a,Math.cos(i),e)-r)*(o*Math.sqrt(o))*n,i-=o,Math.abs(o)<st)return i}return i}function Jw(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=Sd(this.es),this.ml0=Iu(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function Kw(r){var t=r.x,e=r.y,n=ht(t-this.long0),i,s,a,o=Math.sin(e),l=Math.cos(e);if(this.es){var c=l*n,h=Math.pow(c,2),f=this.ep2*Math.pow(l,2),g=Math.pow(f,2),m=Math.abs(l)>st?Math.tan(e):0,_=Math.pow(m,2),E=Math.pow(_,2);i=1-this.es*Math.pow(o,2),c=c/Math.sqrt(i);var M=Iu(e,o,l,this.en);s=this.a*(this.k0*c*(1+h/6*(1-_+f+h/20*(5-18*_+E+14*f-58*_*f+h/42*(61+179*E-E*_-479*_)))))+this.x0,a=this.a*(this.k0*(M-this.ml0+o*n*c/2*(1+h/12*(5-_+9*f+4*g+h/30*(61+E-58*_+270*f-330*_*f+h/56*(1385+543*E-E*_-3111*_))))))+this.y0}else{var u=l*Math.sin(n);if(Math.abs(Math.abs(u)-1)<st)return 93;if(s=.5*this.a*this.k0*Math.log((1+u)/(1-u))+this.x0,a=l*Math.cos(n)/Math.sqrt(1-Math.pow(u,2)),u=Math.abs(a),u>=1){if(u-1>st)return 93;a=0}else a=Math.acos(a);e<0&&(a=-a),a=this.a*this.k0*(a-this.lat0)+this.y0}return r.x=s,r.y=a,r}function Qw(r){var t,e,n,i,s=(r.x-this.x0)*(1/this.a),a=(r.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+a/this.k0,e=Pd(t,this.es,this.en),Math.abs(e)<Q){var h=Math.sin(e),f=Math.cos(e),g=Math.abs(f)>st?Math.tan(e):0,m=this.ep2*Math.pow(f,2),_=Math.pow(m,2),E=Math.pow(g,2),M=Math.pow(E,2);t=1-this.es*Math.pow(h,2);var y=s*Math.sqrt(t)/this.k0,w=Math.pow(y,2);t=t*g,n=e-t*w/(1-this.es)*.5*(1-w/12*(5+3*E-9*m*E+m-4*_-w/30*(61+90*E-252*m*E+45*M+46*m-w/56*(1385+3633*E+4095*M+1574*M*E)))),i=ht(this.long0+y*(1-w/6*(1+2*E+m-w/20*(5+28*E+24*M+8*m*E+6*m-w/42*(61+662*E+1320*M+720*M*E))))/f)}else n=Q*vh(a),i=0;else{var o=Math.exp(s/this.k0),l=.5*(o-1/o),u=this.lat0+a/this.k0,c=Math.cos(u);t=Math.sqrt((1-Math.pow(c,2))/(1+Math.pow(l,2))),n=Math.asin(t),a<0&&(n=-n),l===0&&c===0?i=0:i=ht(Math.atan2(l,c)+this.long0)}return r.x=i,r.y=n,r}var Bw=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const Uc={init:Jw,forward:Kw,inverse:Qw,names:Bw};function r0(r){var t=Math.exp(r);return t=(t-1/t)/2,t}function un(r,t){r=Math.abs(r),t=Math.abs(t);var e=Math.max(r,t),n=Math.min(r,t)/(e||1);return e*Math.sqrt(1+Math.pow(n,2))}function Zw(r){var t=1+r,e=t-1;return e===0?r:r*Math.log(t)/e}function $w(r){var t=Math.abs(r);return t=Zw(t*(1+t/(un(1,t)+1))),r<0?-t:t}function Cd(r,t){for(var e=2*Math.cos(2*t),n=r.length-1,i=r[n],s=0,a;--n>=0;)a=-s+e*i+r[n],s=i,i=a;return t+a*Math.sin(2*t)}function jw(r,t){for(var e=2*Math.cos(t),n=r.length-1,i=r[n],s=0,a;--n>=0;)a=-s+e*i+r[n],s=i,i=a;return Math.sin(t)*a}function tE(r){var t=Math.exp(r);return t=(t+1/t)/2,t}function n0(r,t,e){for(var n=Math.sin(t),i=Math.cos(t),s=r0(e),a=tE(e),o=2*i*a,l=-2*n*s,u=r.length-1,c=r[u],h=0,f=0,g=0,m,_;--u>=0;)m=f,_=h,f=c,h=g,c=-m+o*f-l*h+r[u],g=-_+l*f+o*h;return o=n*a,l=i*s,[o*c-l*g,o*g+l*c]}function eE(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Uc.init.apply(this),this.forward=Uc.forward,this.inverse=Uc.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var r=this.es/(1+Math.sqrt(1-this.es)),t=r/(2-r),e=t;this.cgb[0]=t*(2+t*(-.6666666666666666+t*(-2+t*(2.577777777777778+t*(.5777777777777777+t*-4.228148148148148))))),this.cbg[0]=t*(-2+t*(.6666666666666666+t*(1.3333333333333333+t*(-1.8222222222222222+t*(.7111111111111111+t*.9824338624338624))))),e=e*t,this.cgb[1]=e*(2.3333333333333335+t*(-1.6+t*(-5.044444444444444+t*(8.584126984126984+t*2.458201058201058)))),this.cbg[1]=e*(1.6666666666666667+t*(-1.0666666666666667+t*(-1.4444444444444444+t*(2.86984126984127+t*-1.6105820105820106)))),e=e*t,this.cgb[2]=e*(3.7333333333333334+t*(-3.8857142857142857+t*(-12.019047619047619+t*26.03668430335097))),this.cbg[2]=e*(-1.7333333333333334+t*(1.619047619047619+t*(1.6+t*-4.474779541446208))),e=e*t,this.cgb[3]=e*(6.792063492063492+t*(-9.485714285714286+t*-28.188500881834216)),this.cbg[3]=e*(1.9634920634920634+t*(-2.4+t*-1.7518165784832451)),e=e*t,this.cgb[4]=e*(13.250793650793652+t*-23.22238255571589),this.cbg[4]=e*(-2.3301587301587303+t*3.5144460477793813),e=e*t,this.cgb[5]=e*27.011268237934903,this.cbg[5]=e*2.8496841430174764,e=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+e*(.25+e*(.015625+e/256))),this.utg[0]=t*(-.5+t*(.6666666666666666+t*(-.3854166666666667+t*(.002777777777777778+t*(.158203125+t*-.15905919312169312))))),this.gtu[0]=t*(.5+t*(-.6666666666666666+t*(.3125+t*(.22777777777777777+t*(-.4409722222222222+t*.20875661375661375))))),this.utg[1]=e*(-.020833333333333332+t*(-.06666666666666667+t*(.3034722222222222+t*(-.4380952380952381+t*.2890188388723545)))),this.gtu[1]=e*(.2708333333333333+t*(-.6+t*(.38680555555555557+t*(.44603174603174606+t*-1.0248393063822752)))),e=e*t,this.utg[2]=e*(-.035416666666666666+t*(.04404761904761905+t*(.046651785714285715+t*-.06138668430335097))),this.gtu[2]=e*(.25416666666666665+t*(-.7357142857142858+t*(.5603050595238095+t*.9237378747795415))),e=e*t,this.utg[3]=e*(-.02726314484126984+t*(.021825396825396824+t*.11439745921516754)),this.gtu[3]=e*(.30729786706349205+t*(-1.0654761904761905+t*.9096203979276896)),e=e*t,this.utg[4]=e*(-.02841641865079365+t*.027268468414301746),this.gtu[4]=e*(.4306671626984127+t*-1.713007555715889),e=e*t,this.utg[5]=e*-.03233083094085698,this.gtu[5]=e*.6650675310896665;var n=Cd(this.cbg,this.lat0);this.Zb=-this.Qn*(n+jw(this.gtu,2*n))}function rE(r){var t=ht(r.x-this.long0),e=r.y;e=Cd(this.cbg,e);var n=Math.sin(e),i=Math.cos(e),s=Math.sin(t),a=Math.cos(t);e=Math.atan2(n,a*i),t=Math.atan2(s*i,un(n,i*a)),t=$w(Math.tan(t));var o=n0(this.gtu,2*e,2*t);e=e+o[0],t=t+o[1];var l,u;return Math.abs(t)<=2.623395162778?(l=this.a*(this.Qn*t)+this.x0,u=this.a*(this.Qn*e+this.Zb)+this.y0):(l=1/0,u=1/0),r.x=l,r.y=u,r}function nE(r){var t=(r.x-this.x0)*(1/this.a),e=(r.y-this.y0)*(1/this.a);e=(e-this.Zb)/this.Qn,t=t/this.Qn;var n,i;if(Math.abs(t)<=2.623395162778){var s=n0(this.utg,2*e,2*t);e=e+s[0],t=t+s[1],t=Math.atan(r0(t));var a=Math.sin(e),o=Math.cos(e),l=Math.sin(t),u=Math.cos(t);e=Math.atan2(a*u,un(l,u*o)),t=Math.atan2(l,u*o),n=ht(t+this.long0),i=Cd(this.cgb,e)}else n=1/0,i=1/0;return r.x=n,r.y=i,r}var iE=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];const qc={init:eE,forward:rE,inverse:nE,names:iE};function sE(r,t){if(r===void 0){if(r=Math.floor((ht(t)+Math.PI)*30/Math.PI)+1,r<0)return 0;if(r>60)return 60}return r}var aE="etmerc";function oE(){var r=sE(this.zone,this.long0);if(r===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(r)-183)*de,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,qc.init.apply(this),this.forward=qc.forward,this.inverse=qc.inverse}var lE=["Universal Transverse Mercator System","utm"];const uE={init:oE,names:lE,dependsOn:aE};function Id(r,t){return Math.pow((1-r)/(1+r),t)}var hE=20;function cE(){var r=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*r*r),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(r/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+ee)/(Math.pow(Math.tan(.5*this.lat0+ee),this.C)*Id(this.e*r,this.ratexp))}function fE(r){var t=r.x,e=r.y;return r.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*e+ee),this.C)*Id(this.e*Math.sin(e),this.ratexp))-Q,r.x=this.C*t,r}function dE(r){for(var t=1e-14,e=r.x/this.C,n=r.y,i=Math.pow(Math.tan(.5*n+ee)/this.K,1/this.C),s=hE;s>0&&(n=2*Math.atan(i*Id(this.e*Math.sin(r.y),-.5*this.e))-Q,!(Math.abs(n-r.y)<t));--s)r.y=n;return s?(r.x=e,r.y=n,r):null}const Md={init:cE,forward:fE,inverse:dE};function pE(){Md.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function gE(r){var t,e,n,i;return r.x=ht(r.x-this.long0),Md.forward.apply(this,[r]),t=Math.sin(r.y),e=Math.cos(r.y),n=Math.cos(r.x),i=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*e*n),r.x=i*e*Math.sin(r.x),r.y=i*(this.cosc0*t-this.sinc0*e*n),r.x=this.a*r.x+this.x0,r.y=this.a*r.y+this.y0,r}function mE(r){var t,e,n,i,s;if(r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a,r.x/=this.k0,r.y/=this.k0,s=un(r.x,r.y)){var a=2*Math.atan2(s,this.R2);t=Math.sin(a),e=Math.cos(a),i=Math.asin(e*this.sinc0+r.y*t*this.cosc0/s),n=Math.atan2(r.x*t,s*this.cosc0*e-r.y*this.sinc0*t)}else i=this.phic0,n=0;return r.x=n,r.y=i,Md.inverse.apply(this,[r]),r.x=ht(r.x+this.long0),r}var vE=["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const yE={init:pE,forward:gE,inverse:mE,names:vE};function _E(r,t,e){return t*=e,Math.tan(.5*(Q+r))*Math.pow((1-t)/(1+t),.5*e)}function wE(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=st&&(this.k0=.5*(1+vh(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=st&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=st&&Math.abs(Math.cos(this.lat_ts))>st&&(this.k0=.5*this.cons*ji(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Ni(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=ji(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-Q,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function EE(r){var t=r.x,e=r.y,n=Math.sin(e),i=Math.cos(e),s,a,o,l,u,c,h=ht(t-this.long0);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=st&&Math.abs(e+this.lat0)<=st?(r.x=NaN,r.y=NaN,r):this.sphere?(s=2*this.k0/(1+this.sinlat0*n+this.coslat0*i*Math.cos(h)),r.x=this.a*s*i*Math.sin(h)+this.x0,r.y=this.a*s*(this.coslat0*n-this.sinlat0*i*Math.cos(h))+this.y0,r):(a=2*Math.atan(this.ssfn_(e,n,this.e))-Q,l=Math.cos(a),o=Math.sin(a),Math.abs(this.coslat0)<=st?(u=Ni(this.e,e*this.con,this.con*n),c=2*this.a*this.k0*u/this.cons,r.x=this.x0+c*Math.sin(t-this.long0),r.y=this.y0-this.con*c*Math.cos(t-this.long0),r):(Math.abs(this.sinlat0)<st?(s=2*this.a*this.k0/(1+l*Math.cos(h)),r.y=s*o):(s=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*o+this.cosX0*l*Math.cos(h))),r.y=s*(this.cosX0*o-this.sinX0*l*Math.cos(h))+this.y0),r.x=s*l*Math.sin(h)+this.x0,r))}function SE(r){r.x-=this.x0,r.y-=this.y0;var t,e,n,i,s,a=Math.sqrt(r.x*r.x+r.y*r.y);if(this.sphere){var o=2*Math.atan(a/(2*this.a*this.k0));return t=this.long0,e=this.lat0,a<=st?(r.x=t,r.y=e,r):(e=Math.asin(Math.cos(o)*this.sinlat0+r.y*Math.sin(o)*this.coslat0/a),Math.abs(this.coslat0)<st?this.lat0>0?t=ht(this.long0+Math.atan2(r.x,-1*r.y)):t=ht(this.long0+Math.atan2(r.x,r.y)):t=ht(this.long0+Math.atan2(r.x*Math.sin(o),a*this.coslat0*Math.cos(o)-r.y*this.sinlat0*Math.sin(o))),r.x=t,r.y=e,r)}else if(Math.abs(this.coslat0)<=st){if(a<=st)return e=this.lat0,t=this.long0,r.x=t,r.y=e,r;r.x*=this.con,r.y*=this.con,n=a*this.cons/(2*this.a*this.k0),e=this.con*yh(this.e,n),t=this.con*ht(this.con*this.long0+Math.atan2(r.x,-1*r.y))}else i=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,a<=st?s=this.X0:(s=Math.asin(Math.cos(i)*this.sinX0+r.y*Math.sin(i)*this.cosX0/a),t=ht(this.long0+Math.atan2(r.x*Math.sin(i),a*this.cosX0*Math.cos(i)-r.y*this.sinX0*Math.sin(i)))),e=-1*yh(this.e,Math.tan(.5*(Q+s)));return r.x=t,r.y=e,r}var PE=["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"];const CE={init:wE,forward:EE,inverse:SE,names:PE,ssfn_:_E};function IE(){var r=this.lat0;this.lambda0=this.long0;var t=Math.sin(r),e=this.a,n=this.rf,i=1/n,s=2*i-Math.pow(i,2),a=this.e=Math.sqrt(s);this.R=this.k0*e*Math.sqrt(1-s)/(1-s*Math.pow(t,2)),this.alpha=Math.sqrt(1+s/(1-s)*Math.pow(Math.cos(r),4)),this.b0=Math.asin(t/this.alpha);var o=Math.log(Math.tan(Math.PI/4+this.b0/2)),l=Math.log(Math.tan(Math.PI/4+r/2)),u=Math.log((1+a*t)/(1-a*t));this.K=o-this.alpha*l+this.alpha*a/2*u}function ME(r){var t=Math.log(Math.tan(Math.PI/4-r.y/2)),e=this.e/2*Math.log((1+this.e*Math.sin(r.y))/(1-this.e*Math.sin(r.y))),n=-this.alpha*(t+e)+this.K,i=2*(Math.atan(Math.exp(n))-Math.PI/4),s=this.alpha*(r.x-this.lambda0),a=Math.atan(Math.sin(s)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(s))),o=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(s));return r.y=this.R/2*Math.log((1+Math.sin(o))/(1-Math.sin(o)))+this.y0,r.x=this.R*a+this.x0,r}function NE(r){for(var t=r.x-this.x0,e=r.y-this.y0,n=t/this.R,i=2*(Math.atan(Math.exp(e/this.R))-Math.PI/4),s=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(i))),o=this.lambda0+a/this.alpha,l=0,u=s,c=-1e3,h=0;Math.abs(u-c)>1e-7;){if(++h>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+s/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(u))/2)),c=u,u=2*Math.atan(Math.exp(l))-Math.PI/2}return r.x=o,r.y=u,r}var bE=["somerc"];const TE={init:IE,forward:ME,inverse:NE,names:bE};var Mu=1e-7;function DE(r){var t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],e=typeof r.projName=="object"?Object.keys(r.projName)[0]:r.projName;return"no_uoff"in r||"no_off"in r||t.indexOf(e)!==-1||t.indexOf(Am(e))!==-1}function xE(){var r,t,e,n,i,s,a,o,l,u,c=0,h,f=0,g=0,m=0,_=0,E=0,M=0;this.no_off=DE(this),this.no_rot="no_rot"in this;var y=!1;"alpha"in this&&(y=!0);var w=!1;if("rectified_grid_angle"in this&&(w=!0),y&&(M=this.alpha),w&&(c=this.rectified_grid_angle),y||w)f=this.longc;else if(g=this.long1,_=this.lat1,m=this.long2,E=this.lat2,Math.abs(_-E)<=Mu||(r=Math.abs(_))<=Mu||Math.abs(r-Q)<=Mu||Math.abs(Math.abs(this.lat0)-Q)<=Mu||Math.abs(Math.abs(E)-Q)<=Mu)throw new Error;var v=1-this.es;t=Math.sqrt(v),Math.abs(this.lat0)>st?(o=Math.sin(this.lat0),e=Math.cos(this.lat0),r=1-this.es*o*o,this.B=e*e,this.B=Math.sqrt(1+this.es*this.B*this.B/v),this.A=this.B*this.k0*t/r,n=this.B*t/(e*Math.sqrt(r)),i=n*n-1,i<=0?i=0:(i=Math.sqrt(i),this.lat0<0&&(i=-i)),this.E=i+=n,this.E*=Math.pow(Ni(this.e,this.lat0,o),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=i=1),y||w?(y?(h=Math.asin(Math.sin(M)/n),w||(c=M)):(h=c,M=Math.asin(n*Math.sin(h))),this.lam0=f-Math.asin(.5*(i-1/i)*Math.tan(h))/this.B):(s=Math.pow(Ni(this.e,_,Math.sin(_)),this.B),a=Math.pow(Ni(this.e,E,Math.sin(E)),this.B),i=this.E/s,l=(a-s)/(a+s),u=this.E*this.E,u=(u-a*s)/(u+a*s),r=g-m,r<-Math.pi?m-=gh:r>Math.pi&&(m+=gh),this.lam0=ht(.5*(g+m)-Math.atan(u*Math.tan(.5*this.B*(g-m))/l)/this.B),h=Math.atan(2*Math.sin(this.B*ht(g-this.lam0))/(i-1/i)),c=M=Math.asin(n*Math.sin(h))),this.singam=Math.sin(h),this.cosgam=Math.cos(h),this.sinrot=Math.sin(c),this.cosrot=Math.cos(c),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(M))),this.lat0<0&&(this.u_0=-this.u_0)),i=.5*h,this.v_pole_n=this.ArB*Math.log(Math.tan(ee-i)),this.v_pole_s=this.ArB*Math.log(Math.tan(ee+i))}function OE(r){var t={},e,n,i,s,a,o,l,u;if(r.x=r.x-this.lam0,Math.abs(Math.abs(r.y)-Q)>st){if(a=this.E/Math.pow(Ni(this.e,r.y,Math.sin(r.y)),this.B),o=1/a,e=.5*(a-o),n=.5*(a+o),s=Math.sin(this.B*r.x),i=(e*this.singam-s*this.cosgam)/n,Math.abs(Math.abs(i)-1)<st)throw new Error;u=.5*this.ArB*Math.log((1-i)/(1+i)),o=Math.cos(this.B*r.x),Math.abs(o)<Mu?l=this.A*r.x:l=this.ArB*Math.atan2(e*this.cosgam+s*this.singam,o)}else u=r.y>0?this.v_pole_n:this.v_pole_s,l=this.ArB*r.y;return this.no_rot?(t.x=l,t.y=u):(l-=this.u_0,t.x=u*this.cosrot+l*this.sinrot,t.y=l*this.cosrot-u*this.sinrot),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function AE(r){var t,e,n,i,s,a,o,l={};if(r.x=(r.x-this.x0)*(1/this.a),r.y=(r.y-this.y0)*(1/this.a),this.no_rot?(e=r.y,t=r.x):(e=r.x*this.cosrot-r.y*this.sinrot,t=r.y*this.cosrot+r.x*this.sinrot+this.u_0),n=Math.exp(-this.BrA*e),i=.5*(n-1/n),s=.5*(n+1/n),a=Math.sin(this.BrA*t),o=(a*this.cosgam+i*this.singam)/s,Math.abs(Math.abs(o)-1)<st)l.x=0,l.y=o<0?-Q:Q;else{if(l.y=this.E/Math.sqrt((1+o)/(1-o)),l.y=yh(this.e,Math.pow(l.y,1/this.B)),l.y===1/0)throw new Error;l.x=-this.rB*Math.atan2(i*this.cosgam-a*this.singam,Math.cos(this.BrA*t))}return l.x+=this.lam0,l}var LE=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];const RE={init:xE,forward:OE,inverse:AE,names:LE};function FE(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<st)){var r=this.b/this.a;this.e=Math.sqrt(1-r*r);var t=Math.sin(this.lat1),e=Math.cos(this.lat1),n=ji(this.e,t,e),i=Ni(this.e,this.lat1,t),s=Math.sin(this.lat2),a=Math.cos(this.lat2),o=ji(this.e,s,a),l=Ni(this.e,this.lat2,s),u=Math.abs(Math.abs(this.lat0)-Q)<st?0:Ni(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>st?this.ns=Math.log(n/o)/Math.log(i/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(i,this.ns)),this.rh=this.a*this.f0*Math.pow(u,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function GE(r){var t=r.x,e=r.y;Math.abs(2*Math.abs(e)-Math.PI)<=st&&(e=vh(e)*(Q-2*st));var n=Math.abs(Math.abs(e)-Q),i,s;if(n>st)i=Ni(this.e,e,Math.sin(e)),s=this.a*this.f0*Math.pow(i,this.ns);else{if(n=e*this.ns,n<=0)return null;s=0}var a=this.ns*ht(t-this.long0);return r.x=this.k0*(s*Math.sin(a))+this.x0,r.y=this.k0*(this.rh-s*Math.cos(a))+this.y0,r}function kE(r){var t,e,n,i,s,a=(r.x-this.x0)/this.k0,o=this.rh-(r.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(a*a+o*o),e=1):(t=-Math.sqrt(a*a+o*o),e=-1);var l=0;if(t!==0&&(l=Math.atan2(e*a,e*o)),t!==0||this.ns>0){if(e=1/this.ns,n=Math.pow(t/(this.a*this.f0),e),i=yh(this.e,n),i===-9999)return null}else i=-Q;return s=ht(l/this.ns+this.long0),r.x=s,r.y=i,r}var zE=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const VE={init:FE,forward:GE,inverse:kE,names:zE};function UE(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function qE(r){var t,e,n,i,s,a,o,l=r.x,u=r.y,c=ht(l-this.long0);return t=Math.pow((1+this.e*Math.sin(u))/(1-this.e*Math.sin(u)),this.alfa*this.e/2),e=2*(Math.atan(this.k*Math.pow(Math.tan(u/2+this.s45),this.alfa)/t)-this.s45),n=-c*this.alfa,i=Math.asin(Math.cos(this.ad)*Math.sin(e)+Math.sin(this.ad)*Math.cos(e)*Math.cos(n)),s=Math.asin(Math.cos(e)*Math.sin(n)/Math.cos(i)),a=this.n*s,o=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(i/2+this.s45),this.n),r.y=o*Math.cos(a)/1,r.x=o*Math.sin(a)/1,this.czech||(r.y*=-1,r.x*=-1),r}function WE(r){var t,e,n,i,s,a,o,l,u=r.x;r.x=r.y,r.y=u,this.czech||(r.y*=-1,r.x*=-1),a=Math.sqrt(r.x*r.x+r.y*r.y),s=Math.atan2(r.y,r.x),i=s/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/a,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(i)),e=Math.asin(Math.cos(n)*Math.sin(i)/Math.cos(t)),r.x=this.long0-e/this.alfa,o=t,l=0;var c=0;do r.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(o))/(1-this.e*Math.sin(o)),this.e/2))-this.s45),Math.abs(o-r.y)<1e-10&&(l=1),o=r.y,c+=1;while(l===0&&c<15);return c>=15?null:r}var HE=["Krovak","krovak"];const XE={init:UE,forward:qE,inverse:WE,names:HE};function Xr(r,t,e,n,i){return r*i-t*Math.sin(2*i)+e*Math.sin(4*i)-n*Math.sin(6*i)}function Eh(r){return 1-.25*r*(1+r/16*(3+1.25*r))}function Sh(r){return .375*r*(1+.25*r*(1+.46875*r))}function Ph(r){return .05859375*r*r*(1+.75*r)}function Ch(r){return r*r*r*.011393229166666666}function Nd(r,t,e){var n=t*e;return r/Math.sqrt(1-n*n)}function pa(r){return Math.abs(r)<Q?r:r-vh(r)*Math.PI}function Wc(r,t,e,n,i){var s,a;s=r/t;for(var o=0;o<15;o++)if(a=(r-(t*s-e*Math.sin(2*s)+n*Math.sin(4*s)-i*Math.sin(6*s)))/(t-2*e*Math.cos(2*s)+4*n*Math.cos(4*s)-6*i*Math.cos(6*s)),s+=a,Math.abs(a)<=1e-10)return s;return NaN}function YE(){this.sphere||(this.e0=Eh(this.es),this.e1=Sh(this.es),this.e2=Ph(this.es),this.e3=Ch(this.es),this.ml0=this.a*Xr(this.e0,this.e1,this.e2,this.e3,this.lat0))}function JE(r){var t,e,n=r.x,i=r.y;if(n=ht(n-this.long0),this.sphere)t=this.a*Math.asin(Math.cos(i)*Math.sin(n)),e=this.a*(Math.atan2(Math.tan(i),Math.cos(n))-this.lat0);else{var s=Math.sin(i),a=Math.cos(i),o=Nd(this.a,this.e,s),l=Math.tan(i)*Math.tan(i),u=n*Math.cos(i),c=u*u,h=this.es*a*a/(1-this.es),f=this.a*Xr(this.e0,this.e1,this.e2,this.e3,i);t=o*u*(1-c*l*(.16666666666666666-(8-l+8*h)*c/120)),e=f-this.ml0+o*s/a*c*(.5+(5-l+6*h)*c/24)}return r.x=t+this.x0,r.y=e+this.y0,r}function KE(r){r.x-=this.x0,r.y-=this.y0;var t=r.x/this.a,e=r.y/this.a,n,i;if(this.sphere){var s=e+this.lat0;n=Math.asin(Math.sin(s)*Math.cos(t)),i=Math.atan2(Math.tan(t),Math.cos(s))}else{var a=this.ml0/this.a+e,o=Wc(a,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(o)-Q)<=st)return r.x=this.long0,r.y=Q,e<0&&(r.y*=-1),r;var l=Nd(this.a,this.e,Math.sin(o)),u=l*l*l/this.a/this.a*(1-this.es),c=Math.pow(Math.tan(o),2),h=t*this.a/l,f=h*h;n=o-l*Math.tan(o)/u*h*h*(.5-(1+3*c)*h*h/24),i=h*(1-f*(c/3+(1+3*c)*c*f/15))/Math.cos(o)}return r.x=ht(i+this.long0),r.y=pa(n),r}var QE=["Cassini","Cassini_Soldner","cass"];const BE={init:YE,forward:JE,inverse:KE,names:QE};function ga(r,t){var e;return r>1e-7?(e=r*t,(1-r*r)*(t/(1-e*e)-.5/r*Math.log((1-e)/(1+e)))):2*t}var ZE=1,$E=2,jE=3,tS=4;function eS(){var r=Math.abs(this.lat0);if(Math.abs(r-Q)<st?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(r)<st?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var t;switch(this.qp=ga(this.e,1),this.mmf=.5/(1-this.es),this.apa=hS(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=ga(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function rS(r){var t,e,n,i,s,a,o,l,u,c,h=r.x,f=r.y;if(h=ht(h-this.long0),this.sphere){if(s=Math.sin(f),c=Math.cos(f),n=Math.cos(h),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e=this.mode===this.EQUIT?1+c*n:1+this.sinph0*s+this.cosph0*c*n,e<=st)return null;e=Math.sqrt(2/e),t=e*c*Math.sin(h),e*=this.mode===this.EQUIT?s:this.cosph0*s-this.sinph0*c*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(f+this.lat0)<st)return null;e=ee-f*.5,e=2*(this.mode===this.S_POLE?Math.cos(e):Math.sin(e)),t=e*Math.sin(h),e*=n}}else{switch(o=0,l=0,u=0,n=Math.cos(h),i=Math.sin(h),s=Math.sin(f),a=ga(this.e,s),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(o=a/this.qp,l=Math.sqrt(1-o*o)),this.mode){case this.OBLIQ:u=1+this.sinb1*o+this.cosb1*l*n;break;case this.EQUIT:u=1+l*n;break;case this.N_POLE:u=Q+f,a=this.qp-a;break;case this.S_POLE:u=f-Q,a=this.qp+a;break}if(Math.abs(u)<st)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:u=Math.sqrt(2/u),this.mode===this.OBLIQ?e=this.ymf*u*(this.cosb1*o-this.sinb1*l*n):e=(u=Math.sqrt(2/(1+l*n)))*o*this.ymf,t=this.xmf*u*l*i;break;case this.N_POLE:case this.S_POLE:a>=0?(t=(u=Math.sqrt(a))*i,e=n*(this.mode===this.S_POLE?u:-u)):t=e=0;break}}return r.x=this.a*t+this.x0,r.y=this.a*e+this.y0,r}function nS(r){r.x-=this.x0,r.y-=this.y0;var t=r.x/this.a,e=r.y/this.a,n,i,s,a,o,l,u;if(this.sphere){var c=0,h,f=0;if(h=Math.sqrt(t*t+e*e),i=h*.5,i>1)return null;switch(i=2*Math.asin(i),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(f=Math.sin(i),c=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(h)<=st?0:Math.asin(e*f/h),t*=f,e=c*h;break;case this.OBLIQ:i=Math.abs(h)<=st?this.lat0:Math.asin(c*this.sinph0+e*f*this.cosph0/h),t*=f*this.cosph0,e=(c-Math.sin(i)*this.sinph0)*h;break;case this.N_POLE:e=-e,i=Q-i;break;case this.S_POLE:i-=Q;break}n=e===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(t,e)}else{if(u=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t/=this.dd,e*=this.dd,l=Math.sqrt(t*t+e*e),l<st)return r.x=this.long0,r.y=this.lat0,r;a=2*Math.asin(.5*l/this.rq),s=Math.cos(a),t*=a=Math.sin(a),this.mode===this.OBLIQ?(u=s*this.sinb1+e*a*this.cosb1/l,o=this.qp*u,e=l*this.cosb1*s-e*this.sinb1*a):(u=e*a/l,o=this.qp*u,e=l*s)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(e=-e),o=t*t+e*e,!o)return r.x=this.long0,r.y=this.lat0,r;u=1-o/this.qp,this.mode===this.S_POLE&&(u=-u)}n=Math.atan2(t,e),i=cS(Math.asin(u),this.apa)}return r.x=ht(this.long0+n),r.y=i,r}var iS=.3333333333333333,sS=.17222222222222222,aS=.10257936507936508,oS=.06388888888888888,lS=.0664021164021164,uS=.016415012942191543;function hS(r){var t,e=[];return e[0]=r*iS,t=r*r,e[0]+=t*sS,e[1]=t*oS,t*=r,e[0]+=t*aS,e[1]+=t*lS,e[2]=t*uS,e}function cS(r,t){var e=r+r;return r+t[0]*Math.sin(e)+t[1]*Math.sin(e+e)+t[2]*Math.sin(e+e+e)}var fS=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const dS={init:eS,forward:rS,inverse:nS,names:fS,S_POLE:ZE,N_POLE:$E,EQUIT:jE,OBLIQ:tS};function ma(r){return Math.abs(r)>1&&(r=r>1?1:-1),Math.asin(r)}function pS(){Math.abs(this.lat1+this.lat2)<st||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=ji(this.e3,this.sin_po,this.cos_po),this.qs1=ga(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=ji(this.e3,this.sin_po,this.cos_po),this.qs2=ga(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=ga(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>st?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function gS(r){var t=r.x,e=r.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var n=ga(this.e3,this.sin_phi),i=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,s=this.ns0*ht(t-this.long0),a=i*Math.sin(s)+this.x0,o=this.rh-i*Math.cos(s)+this.y0;return r.x=a,r.y=o,r}function mS(r){var t,e,n,i,s,a;return r.x-=this.x0,r.y=this.rh-r.y+this.y0,this.ns0>=0?(t=Math.sqrt(r.x*r.x+r.y*r.y),n=1):(t=-Math.sqrt(r.x*r.x+r.y*r.y),n=-1),i=0,t!==0&&(i=Math.atan2(n*r.x,n*r.y)),n=t*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(e=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,e)),s=ht(i/this.ns0+this.long0),r.x=s,r.y=a,r}function vS(r,t){var e,n,i,s,a,o=ma(.5*t);if(r<st)return o;for(var l=r*r,u=1;u<=25;u++)if(e=Math.sin(o),n=Math.cos(o),i=r*e,s=1-i*i,a=.5*s*s/n*(t/(1-l)-e/s+.5/r*Math.log((1-i)/(1+i))),o=o+a,Math.abs(a)<=1e-7)return o;return null}var yS=["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"];const _S={init:pS,forward:gS,inverse:mS,names:yS,phi1z:vS};function wS(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function ES(r){var t,e,n,i,s,a,o,l,u=r.x,c=r.y;return n=ht(u-this.long0),t=Math.sin(c),e=Math.cos(c),i=Math.cos(n),a=this.sin_p14*t+this.cos_p14*e*i,s=1,a>0||Math.abs(a)<=st?(o=this.x0+this.a*s*e*Math.sin(n)/a,l=this.y0+this.a*s*(this.cos_p14*t-this.sin_p14*e*i)/a):(o=this.x0+this.infinity_dist*e*Math.sin(n),l=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*e*i)),r.x=o,r.y=l,r}function SS(r){var t,e,n,i,s,a;return r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a,r.x/=this.k0,r.y/=this.k0,(t=Math.sqrt(r.x*r.x+r.y*r.y))?(i=Math.atan2(t,this.rc),e=Math.sin(i),n=Math.cos(i),a=ma(n*this.sin_p14+r.y*e*this.cos_p14/t),s=Math.atan2(r.x*e,t*this.cos_p14*n-r.y*this.sin_p14*e),s=ht(this.long0+s)):(a=this.phic0,s=0),r.x=s,r.y=a,r}var PS=["gnom"];const CS={init:wS,forward:ES,inverse:SS,names:PS};function IS(r,t){var e=1-(1-r*r)/(2*r)*Math.log((1-r)/(1+r));if(Math.abs(Math.abs(t)-e)<1e-6)return t<0?-1*Q:Q;for(var n=Math.asin(.5*t),i,s,a,o,l=0;l<30;l++)if(s=Math.sin(n),a=Math.cos(n),o=r*s,i=Math.pow(1-o*o,2)/(2*a)*(t/(1-r*r)-s/(1-o*o)+.5/r*Math.log((1-o)/(1+o))),n+=i,Math.abs(i)<=1e-10)return n;return NaN}function MS(){this.sphere||(this.k0=ji(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function NS(r){var t=r.x,e=r.y,n,i,s=ht(t-this.long0);if(this.sphere)n=this.x0+this.a*s*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(e)/Math.cos(this.lat_ts);else{var a=ga(this.e,Math.sin(e));n=this.x0+this.a*this.k0*s,i=this.y0+this.a*a*.5/this.k0}return r.x=n,r.y=i,r}function bS(r){r.x-=this.x0,r.y-=this.y0;var t,e;return this.sphere?(t=ht(this.long0+r.x/this.a/Math.cos(this.lat_ts)),e=Math.asin(r.y/this.a*Math.cos(this.lat_ts))):(e=IS(this.e,2*r.y*this.k0/this.a),t=ht(this.long0+r.x/(this.a*this.k0))),r.x=t,r.y=e,r}var TS=["cea"];const DS={init:MS,forward:NS,inverse:bS,names:TS};function xS(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function OS(r){var t=r.x,e=r.y,n=ht(t-this.long0),i=pa(e-this.lat0);return r.x=this.x0+this.a*n*this.rc,r.y=this.y0+this.a*i,r}function AS(r){var t=r.x,e=r.y;return r.x=ht(this.long0+(t-this.x0)/(this.a*this.rc)),r.y=pa(this.lat0+(e-this.y0)/this.a),r}var LS=["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"];const RS={init:xS,forward:OS,inverse:AS,names:LS};var i0=20;function FS(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Eh(this.es),this.e1=Sh(this.es),this.e2=Ph(this.es),this.e3=Ch(this.es),this.ml0=this.a*Xr(this.e0,this.e1,this.e2,this.e3,this.lat0)}function GS(r){var t=r.x,e=r.y,n,i,s,a=ht(t-this.long0);if(s=a*Math.sin(e),this.sphere)Math.abs(e)<=st?(n=this.a*a,i=-1*this.a*this.lat0):(n=this.a*Math.sin(s)/Math.tan(e),i=this.a*(pa(e-this.lat0)+(1-Math.cos(s))/Math.tan(e)));else if(Math.abs(e)<=st)n=this.a*a,i=-1*this.ml0;else{var o=Nd(this.a,this.e,Math.sin(e))/Math.tan(e);n=o*Math.sin(s),i=this.a*Xr(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+o*(1-Math.cos(s))}return r.x=n+this.x0,r.y=i+this.y0,r}function kS(r){var t,e,n,i,s,a,o,l,u;if(n=r.x-this.x0,i=r.y-this.y0,this.sphere)if(Math.abs(i+this.a*this.lat0)<=st)t=ht(n/this.a+this.long0),e=0;else{a=this.lat0+i/this.a,o=n*n/this.a/this.a+a*a,l=a;var c;for(s=i0;s;--s)if(c=Math.tan(l),u=-1*(a*(l*c+1)-l-.5*(l*l+o)*c)/((l-a)/c-1),l+=u,Math.abs(u)<=st){e=l;break}t=ht(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(e))}else if(Math.abs(i+this.ml0)<=st)e=0,t=ht(this.long0+n/this.a);else{a=(this.ml0+i)/this.a,o=n*n/this.a/this.a+a*a,l=a;var h,f,g,m,_;for(s=i0;s;--s)if(_=this.e*Math.sin(l),h=Math.sqrt(1-_*_)*Math.tan(l),f=this.a*Xr(this.e0,this.e1,this.e2,this.e3,l),g=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),m=f/this.a,u=(a*(h*m+1)-m-.5*h*(m*m+o))/(this.es*Math.sin(2*l)*(m*m+o-2*a*m)/(4*h)+(a-m)*(h*g-2/Math.sin(2*l))-g),l-=u,Math.abs(u)<=st){e=l;break}h=Math.sqrt(1-this.es*Math.pow(Math.sin(e),2))*Math.tan(e),t=ht(this.long0+Math.asin(n*h/this.a)/Math.sin(e))}return r.x=t,r.y=e,r}var zS=["Polyconic","American_Polyconic","poly"];const VS={init:FS,forward:GS,inverse:kS,names:zS};function US(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function qS(r){var t,e=r.x,n=r.y,i=n-this.lat0,s=e-this.long0,a=i/ph*1e-5,o=s,l=1,u=0;for(t=1;t<=10;t++)l=l*a,u=u+this.A[t]*l;var c=u,h=o,f=1,g=0,m,_,E=0,M=0;for(t=1;t<=6;t++)m=f*c-g*h,_=g*c+f*h,f=m,g=_,E=E+this.B_re[t]*f-this.B_im[t]*g,M=M+this.B_im[t]*f+this.B_re[t]*g;return r.x=M*this.a+this.x0,r.y=E*this.a+this.y0,r}function WS(r){var t,e=r.x,n=r.y,i=e-this.x0,s=n-this.y0,a=s/this.a,o=i/this.a,l=1,u=0,c,h,f=0,g=0;for(t=1;t<=6;t++)c=l*a-u*o,h=u*a+l*o,l=c,u=h,f=f+this.C_re[t]*l-this.C_im[t]*u,g=g+this.C_im[t]*l+this.C_re[t]*u;for(var m=0;m<this.iterations;m++){var _=f,E=g,M,y,w=a,v=o;for(t=2;t<=6;t++)M=_*f-E*g,y=E*f+_*g,_=M,E=y,w=w+(t-1)*(this.B_re[t]*_-this.B_im[t]*E),v=v+(t-1)*(this.B_im[t]*_+this.B_re[t]*E);_=1,E=0;var S=this.B_re[1],P=this.B_im[1];for(t=2;t<=6;t++)M=_*f-E*g,y=E*f+_*g,_=M,E=y,S=S+t*(this.B_re[t]*_-this.B_im[t]*E),P=P+t*(this.B_im[t]*_+this.B_re[t]*E);var I=S*S+P*P;f=(w*S+v*P)/I,g=(v*S-w*P)/I}var b=f,D=g,O=1,T=0;for(t=1;t<=9;t++)O=O*b,T=T+this.D[t]*O;var x=this.lat0+T*ph*1e5,R=this.long0+D;return r.x=R,r.y=x,r}var HS=["New_Zealand_Map_Grid","nzmg"];const XS={init:US,forward:qS,inverse:WS,names:HS};function YS(){}function JS(r){var t=r.x,e=r.y,n=ht(t-this.long0),i=this.x0+this.a*n,s=this.y0+this.a*Math.log(Math.tan(Math.PI/4+e/2.5))*1.25;return r.x=i,r.y=s,r}function KS(r){r.x-=this.x0,r.y-=this.y0;var t=ht(this.long0+r.x/this.a),e=2.5*(Math.atan(Math.exp(.8*r.y/this.a))-Math.PI/4);return r.x=t,r.y=e,r}var QS=["Miller_Cylindrical","mill"];const BS={init:YS,forward:JS,inverse:KS,names:QS};var ZS=20;function $S(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Sd(this.es)}function jS(r){var t,e,n=r.x,i=r.y;if(n=ht(n-this.long0),this.sphere){if(!this.m)i=this.n!==1?Math.asin(this.n*Math.sin(i)):i;else for(var s=this.n*Math.sin(i),a=ZS;a;--a){var o=(this.m*i+Math.sin(i)-s)/(this.m+Math.cos(i));if(i-=o,Math.abs(o)<st)break}t=this.a*this.C_x*n*(this.m+Math.cos(i)),e=this.a*this.C_y*i}else{var l=Math.sin(i),u=Math.cos(i);e=this.a*Iu(i,l,u,this.en),t=this.a*n*u/Math.sqrt(1-this.es*l*l)}return r.x=t,r.y=e,r}function tP(r){var t,e,n,i;return r.x-=this.x0,n=r.x/this.a,r.y-=this.y0,t=r.y/this.a,this.sphere?(t/=this.C_y,n=n/(this.C_x*(this.m+Math.cos(t))),this.m?t=ma((this.m*t+Math.sin(t))/this.n):this.n!==1&&(t=ma(Math.sin(t)/this.n)),n=ht(n+this.long0),t=pa(t)):(t=Pd(r.y/this.a,this.es,this.en),i=Math.abs(t),i<Q?(i=Math.sin(t),e=this.long0+r.x*Math.sqrt(1-this.es*i*i)/(this.a*Math.cos(t)),n=ht(e)):i-st<Q&&(n=this.long0)),r.x=n,r.y=t,r}var eP=["Sinusoidal","sinu"];const rP={init:$S,forward:jS,inverse:tP,names:eP};function nP(){}function iP(r){for(var t=r.x,e=r.y,n=ht(t-this.long0),i=e,s=Math.PI*Math.sin(e);;){var a=-(i+Math.sin(i)-s)/(1+Math.cos(i));if(i+=a,Math.abs(a)<st)break}i/=2,Math.PI/2-Math.abs(e)<st&&(n=0);var o=.900316316158*this.a*n*Math.cos(i)+this.x0,l=1.4142135623731*this.a*Math.sin(i)+this.y0;return r.x=o,r.y=l,r}function sP(r){var t,e;r.x-=this.x0,r.y-=this.y0,e=r.y/(1.4142135623731*this.a),Math.abs(e)>.999999999999&&(e=.999999999999),t=Math.asin(e);var n=ht(this.long0+r.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),e=(2*t+Math.sin(2*t))/Math.PI,Math.abs(e)>1&&(e=1);var i=Math.asin(e);return r.x=n,r.y=i,r}var aP=["Mollweide","moll"];const oP={init:nP,forward:iP,inverse:sP,names:aP};function lP(){Math.abs(this.lat1+this.lat2)<st||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Eh(this.es),this.e1=Sh(this.es),this.e2=Ph(this.es),this.e3=Ch(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=ji(this.e,this.sinphi,this.cosphi),this.ml1=Xr(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<st?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=ji(this.e,this.sinphi,this.cosphi),this.ml2=Xr(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Xr(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function uP(r){var t=r.x,e=r.y,n;if(this.sphere)n=this.a*(this.g-e);else{var i=Xr(this.e0,this.e1,this.e2,this.e3,e);n=this.a*(this.g-i)}var s=this.ns*ht(t-this.long0),a=this.x0+n*Math.sin(s),o=this.y0+this.rh-n*Math.cos(s);return r.x=a,r.y=o,r}function hP(r){r.x-=this.x0,r.y=this.rh-r.y+this.y0;var t,e,n,i;this.ns>=0?(e=Math.sqrt(r.x*r.x+r.y*r.y),t=1):(e=-Math.sqrt(r.x*r.x+r.y*r.y),t=-1);var s=0;if(e!==0&&(s=Math.atan2(t*r.x,t*r.y)),this.sphere)return i=ht(this.long0+s/this.ns),n=pa(this.g-e/this.a),r.x=i,r.y=n,r;var a=this.g-e/this.a;return n=Wc(a,this.e0,this.e1,this.e2,this.e3),i=ht(this.long0+s/this.ns),r.x=i,r.y=n,r}var cP=["Equidistant_Conic","eqdc"];const fP={init:lP,forward:uP,inverse:hP,names:cP};function dP(){this.R=this.a}function pP(r){var t=r.x,e=r.y,n=ht(t-this.long0),i,s;Math.abs(e)<=st&&(i=this.x0+this.R*n,s=this.y0);var a=ma(2*Math.abs(e/Math.PI));(Math.abs(n)<=st||Math.abs(Math.abs(e)-Q)<=st)&&(i=this.x0,e>=0?s=this.y0+Math.PI*this.R*Math.tan(.5*a):s=this.y0+Math.PI*this.R*-Math.tan(.5*a));var o=.5*Math.abs(Math.PI/n-n/Math.PI),l=o*o,u=Math.sin(a),c=Math.cos(a),h=c/(u+c-1),f=h*h,g=h*(2/u-1),m=g*g,_=Math.PI*this.R*(o*(h-m)+Math.sqrt(l*(h-m)*(h-m)-(m+l)*(f-m)))/(m+l);n<0&&(_=-_),i=this.x0+_;var E=l+h;return _=Math.PI*this.R*(g*E-o*Math.sqrt((m+l)*(l+1)-E*E))/(m+l),e>=0?s=this.y0+_:s=this.y0-_,r.x=i,r.y=s,r}function gP(r){var t,e,n,i,s,a,o,l,u,c,h,f,g;return r.x-=this.x0,r.y-=this.y0,h=Math.PI*this.R,n=r.x/h,i=r.y/h,s=n*n+i*i,a=-Math.abs(i)*(1+s),o=a-2*i*i+n*n,l=-2*a+1+2*i*i+s*s,g=i*i/l+(2*o*o*o/l/l/l-9*a*o/l/l)/27,u=(a-o*o/3/l)/l,c=2*Math.sqrt(-u/3),h=3*g/u/c,Math.abs(h)>1&&(h>=0?h=1:h=-1),f=Math.acos(h)/3,r.y>=0?e=(-c*Math.cos(f+Math.PI/3)-o/3/l)*Math.PI:e=-(-c*Math.cos(f+Math.PI/3)-o/3/l)*Math.PI,Math.abs(n)<st?t=this.long0:t=ht(this.long0+Math.PI*(s-1+Math.sqrt(1+2*(n*n-i*i)+s*s))/2/n),r.x=t,r.y=e,r}var mP=["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"];const vP={init:dP,forward:pP,inverse:gP,names:mP};var bd={exports:{}},s0;function yP(){return s0||(s0=1,function(r){(function(t){var e={};e.Constants={},e.Math={},e.Accumulator={},function(n){n.WGS84={a:6378137,f:.0033528106647474805},n.version={major:2,minor:1,patch:1},n.version_string="2.1.1"}(e.Constants),function(n){n.digits=53,n.epsilon=Math.pow(.5,n.digits-1),n.degree=Math.PI/180,n.sq=function(i){return i*i},n.hypot=function(i,s){return Math.sqrt(i*i+s*s)},n.cbrt=Math.cbrt||function(i){var s=Math.pow(Math.abs(i),.3333333333333333);return i>0?s:i<0?-s:i},n.log1p=Math.log1p||function(i){var s=1+i,a=s-1;return a===0?i:i*Math.log(s)/a},n.atanh=Math.atanh||function(i){var s=Math.abs(i);return s=n.log1p(2*s/(1-s))/2,i>0?s:i<0?-s:i},n.copysign=function(i,s){return Math.abs(i)*(s<0||s===0&&1/s<0?-1:1)},n.sum=function(i,s){var a=i+s,o=a-s,l=a-o,u;return o-=i,l-=s,u=a&&0-(o+l),{s:a,t:u}},n.polyval=function(i,s,a,o){for(var l=i<0?0:s[a++];--i>=0;)l=l*o+s[a++];return l},n.AngRound=function(i){var s=.0625,a=Math.abs(i);return a=a<s?s-(s-a):a,n.copysign(a,i)},n.remainder=function(i,s){return i%=s,i<-s/2?i+s:i<s/2?i:i-s},n.AngNormalize=function(i){var s=n.remainder(i,360);return Math.abs(s)===180?n.copysign(180,i):s},n.LatFix=function(i){return Math.abs(i)>90?NaN:i},n.AngDiff=function(i,s){var a=n.sum(n.remainder(-i,360),n.remainder(s,360)),o,l;return a=n.sum(n.remainder(a.s,360),a.t),o=a.s,l=a.t,(o===0||Math.abs(o)===180)&&(o=n.copysign(o,l===0?s-i:-l)),{d:o,e:l}},n.sincosd=function(i){var s,a,o,l,u,c,h;switch(s=i%360,o=Math.round(s/90),s-=90*o,a=s*this.degree,l=Math.sin(a),u=Math.cos(a),Math.abs(s)===45?(u=Math.sqrt(.5),l=n.copysign(u,a)):Math.abs(s)===30&&(u=Math.sqrt(.75),l=n.copysign(.5,a)),o&3){case 0:c=l,h=u;break;case 1:c=u,h=-l;break;case 2:c=-l,h=-u;break;default:c=-u,h=l;break}return h+=0,c===0&&(c=n.copysign(c,i)),{s:c,c:h}},n.sincosde=function(i,s){var a,o,l,u,c,h,f;switch(a=i%360,l=Math.round(a/90),a=n.AngRound(a-90*l+s),o=a*this.degree,u=Math.sin(o),c=Math.cos(o),Math.abs(a)===45?(c=Math.sqrt(.5),u=n.copysign(c,o)):Math.abs(a)===30&&(c=Math.sqrt(.75),u=n.copysign(.5,o)),l&3){case 0:h=u,f=c;break;case 1:h=c,f=-u;break;case 2:h=-u,f=-c;break;default:h=-c,f=u;break}return f+=0,h===0&&(h=n.copysign(h,i+s)),{s:h,c:f}},n.atan2d=function(i,s){var a=0,o;switch(Math.abs(i)>Math.abs(s)&&([i,s]=[s,i],a=2),n.copysign(1,s)<0&&(s=-s,++a),o=Math.atan2(i,s)/this.degree,a){case 1:o=n.copysign(180,i)-o;break;case 2:o=90-o;break;case 3:o=-90+o;break}return o}}(e.Math),function(n,i){n.Accumulator=function(s){this.Set(s)},n.Accumulator.prototype.Set=function(s){s||(s=0),s.constructor===n.Accumulator?(this._s=s._s,this._t=s._t):(this._s=s,this._t=0)},n.Accumulator.prototype.Add=function(s){var a=i.sum(s,this._t),o=i.sum(a.s,this._s);a=a.t,this._s=o.s,this._t=o.t,this._s===0?this._s=a:this._t+=a},n.Accumulator.prototype.Sum=function(s){var a;return s?(a=new n.Accumulator(this),a.Add(s),a._s):this._s},n.Accumulator.prototype.Negate=function(){this._s*=-1,this._t*=-1},n.Accumulator.prototype.Remainder=function(s){this._s=i.remainder(this._s,s),this.Add(0)}}(e.Accumulator,e.Math),e.Geodesic={},e.GeodesicLine={},e.PolygonArea={},function(n,i,s,a,o){var l=6,u=l,c=l,h=l,f=h,g,m,_=20,E=_+a.digits+10,M=a.epsilon,y=200*M,w=Math.sqrt(M),v=M,S=1e3*w,P=0,I=31,b=32640,D,O,T,x,R,z,rt,B,ct;n.tiny_=Math.sqrt(Number.MIN_VALUE/Number.EPSILON),n.nC1_=l,n.nC1p_=l,n.nC2_=l,n.nC3_=l,n.nC4_=l,g=n.nC3_*(n.nC3_-1)/2,m=n.nC4_*(n.nC4_+1)/2,n.CAP_C1=1,n.CAP_C1p=2,n.CAP_C2=4,n.CAP_C3=8,n.CAP_C4=16,n.NONE=0,n.ARC=64,n.LATITUDE=128|P,n.LONGITUDE=256|n.CAP_C3,n.AZIMUTH=512|P,n.DISTANCE=1024|n.CAP_C1,n.STANDARD=n.LATITUDE|n.LONGITUDE|n.AZIMUTH|n.DISTANCE,n.DISTANCE_IN=2048|n.CAP_C1|n.CAP_C1p,n.REDUCEDLENGTH=4096|n.CAP_C1|n.CAP_C2,n.GEODESICSCALE=8192|n.CAP_C1|n.CAP_C2,n.AREA=16384|n.CAP_C4,n.ALL=b|I,n.LONG_UNROLL=32768,n.OUT_MASK=b|n.LONG_UNROLL,n.SinCosSeries=function(G,X,k,V){var A=V.length,W=A-(G?1:0),J=2*(k-X)*(k+X),ot=W&1?V[--A]:0,gt=0;for(W=Math.floor(W/2);W--;)gt=J*ot-gt+V[--A],ot=J*gt-ot+V[--A];return G?2*X*k*ot:k*(ot-gt)},D=function(G,X){var k,V=a.sq(G),A=a.sq(X),W=(V+A-1)/6,J,ot,gt,lt,St,ut,It,Nt,j,Pt,bt;return A===0&&W<=0?k=0:(J=V*A/4,ot=a.sq(W),gt=W*ot,lt=J*(J+2*gt),St=W,lt>=0?(ut=J+gt,ut+=ut<0?-Math.sqrt(lt):Math.sqrt(lt),It=a.cbrt(ut),St+=It+(It!==0?ot/It:0)):(Nt=Math.atan2(Math.sqrt(-lt),-(J+gt)),St+=2*W*Math.cos(Nt/3)),j=Math.sqrt(a.sq(St)+A),Pt=St<0?A/(j-St):St+j,bt=(Pt-A)/(2*j),k=Pt/(Math.sqrt(Pt+a.sq(bt))+bt)),k},O=[1,4,64,0,256],n.A1m1f=function(G){var X=Math.floor(u/2),k=a.polyval(X,O,0,a.sq(G))/O[X+1];return(k+G)/(1-G)},T=[-1,6,-16,32,-9,64,-128,2048,9,-16,768,3,-5,512,-7,1280,-7,2048],n.C1f=function(G,X){var k=a.sq(G),V=G,A=0,W,J;for(W=1;W<=n.nC1_;++W)J=Math.floor((n.nC1_-W)/2),X[W]=V*a.polyval(J,T,A,k)/T[A+J+1],A+=J+2,V*=G},x=[205,-432,768,1536,4005,-4736,3840,12288,-225,116,384,-7173,2695,7680,3467,7680,38081,61440],n.C1pf=function(G,X){var k=a.sq(G),V=G,A=0,W,J;for(W=1;W<=n.nC1p_;++W)J=Math.floor((n.nC1p_-W)/2),X[W]=V*a.polyval(J,x,A,k)/x[A+J+1],A+=J+2,V*=G},R=[-11,-28,-192,0,256],n.A2m1f=function(G){var X=Math.floor(c/2),k=a.polyval(X,R,0,a.sq(G))/R[X+1];return(k-G)/(1+G)},z=[1,2,16,32,35,64,384,2048,15,80,768,7,35,512,63,1280,77,2048],n.C2f=function(G,X){var k=a.sq(G),V=G,A=0,W,J;for(W=1;W<=n.nC2_;++W)J=Math.floor((n.nC2_-W)/2),X[W]=V*a.polyval(J,z,A,k)/z[A+J+1],A+=J+2,V*=G},n.Geodesic=function(G,X){if(this.a=G,this.f=X,this._f1=1-this.f,this._e2=this.f*(2-this.f),this._ep2=this._e2/a.sq(this._f1),this._n=this.f/(2-this.f),this._b=this.a*this._f1,this._c2=(a.sq(this.a)+a.sq(this._b)*(this._e2===0?1:(this._e2>0?a.atanh(Math.sqrt(this._e2)):Math.atan(Math.sqrt(-this._e2)))/Math.sqrt(Math.abs(this._e2))))/2,this._etol2=.1*w/Math.sqrt(Math.max(.001,Math.abs(this.f))*Math.min(1,1-this.f/2)/2),!(isFinite(this.a)&&this.a>0))throw new Error("Equatorial radius is not positive");if(!(isFinite(this._b)&&this._b>0))throw new Error("Polar semi-axis is not positive");this._A3x=new Array(f),this._C3x=new Array(g),this._C4x=new Array(m),this.A3coeff(),this.C3coeff(),this.C4coeff()},rt=[-3,128,-2,-3,64,-1,-3,-1,16,3,-1,-2,8,1,-1,2,1,1],n.Geodesic.prototype.A3coeff=function(){var G=0,X=0,k,V;for(k=h-1;k>=0;--k)V=Math.min(h-k-1,k),this._A3x[X++]=a.polyval(V,rt,G,this._n)/rt[G+V+1],G+=V+2},B=[3,128,2,5,128,-1,3,3,64,-1,0,1,8,-1,1,4,5,256,1,3,128,-3,-2,3,64,1,-3,2,32,7,512,-10,9,384,5,-9,5,192,7,512,-14,7,512,21,2560],n.Geodesic.prototype.C3coeff=function(){var G=0,X=0,k,V,A;for(k=1;k<n.nC3_;++k)for(V=n.nC3_-1;V>=k;--V)A=Math.min(n.nC3_-V-1,V),this._C3x[X++]=a.polyval(A,B,G,this._n)/B[G+A+1],G+=A+2},ct=[97,15015,1088,156,45045,-224,-4784,1573,45045,-10656,14144,-4576,-858,45045,64,624,-4576,6864,-3003,15015,100,208,572,3432,-12012,30030,45045,1,9009,-2944,468,135135,5792,1040,-1287,135135,5952,-11648,9152,-2574,135135,-64,-624,4576,-6864,3003,135135,8,10725,1856,-936,225225,-8448,4992,-1144,225225,-1440,4160,-4576,1716,225225,-136,63063,1024,-208,105105,3584,-3328,1144,315315,-128,135135,-2560,832,405405,128,99099],n.Geodesic.prototype.C4coeff=function(){var G=0,X=0,k,V,A;for(k=0;k<n.nC4_;++k)for(V=n.nC4_-1;V>=k;--V)A=n.nC4_-V-1,this._C4x[X++]=a.polyval(A,ct,G,this._n)/ct[G+A+1],G+=A+2},n.Geodesic.prototype.A3f=function(G){return a.polyval(f-1,this._A3x,0,G)},n.Geodesic.prototype.C3f=function(G,X){var k=1,V=0,A,W;for(A=1;A<n.nC3_;++A)W=n.nC3_-A-1,k*=G,X[A]=k*a.polyval(W,this._C3x,V,G),V+=W+1},n.Geodesic.prototype.C4f=function(G,X){var k=1,V=0,A,W;for(A=0;A<n.nC4_;++A)W=n.nC4_-A-1,X[A]=k*a.polyval(W,this._C4x,V,G),V+=W+1,k*=G},n.Geodesic.prototype.Lengths=function(G,X,k,V,A,W,J,ot,gt,lt,St,ut,It){St&=n.OUT_MASK;var Nt={},j=0,Pt=0,bt=0,Gt=0,Ht,Xt,Zt,me,Ke;if(St&(n.DISTANCE|n.REDUCEDLENGTH|n.GEODESICSCALE)&&(bt=n.A1m1f(G),n.C1f(G,ut),St&(n.REDUCEDLENGTH|n.GEODESICSCALE)&&(Gt=n.A2m1f(G),n.C2f(G,It),j=bt-Gt,Gt=1+Gt),bt=1+bt),St&n.DISTANCE)Ht=n.SinCosSeries(!0,W,J,ut)-n.SinCosSeries(!0,k,V,ut),Nt.s12b=bt*(X+Ht),St&(n.REDUCEDLENGTH|n.GEODESICSCALE)&&(Xt=n.SinCosSeries(!0,W,J,It)-n.SinCosSeries(!0,k,V,It),Pt=j*X+(bt*Ht-Gt*Xt));else if(St&(n.REDUCEDLENGTH|n.GEODESICSCALE)){for(Zt=1;Zt<=n.nC2_;++Zt)It[Zt]=bt*ut[Zt]-Gt*It[Zt];Pt=j*X+(n.SinCosSeries(!0,W,J,It)-n.SinCosSeries(!0,k,V,It))}return St&n.REDUCEDLENGTH&&(Nt.m0=j,Nt.m12b=ot*(V*W)-A*(k*J)-V*J*Pt),St&n.GEODESICSCALE&&(me=V*J+k*W,Ke=this._ep2*(gt-lt)*(gt+lt)/(A+ot),Nt.M12=me+(Ke*W-J*Pt)*k/A,Nt.M21=me-(Ke*k-V*Pt)*W/ot),Nt},n.Geodesic.prototype.InverseStart=function(G,X,k,V,A,W,J,ot,gt,lt,St){var ut={},It=V*X-A*G,Nt=A*X+V*G,j,Pt,bt,Gt,Ht,Xt,Zt,me,Ke,Yt,kt,zt,Ee,ke,oi,xa,kh,ds,$t,vn,Ar,yn,Fn;return ut.sig12=-1,j=V*X,j+=A*G,Pt=Nt>=0&&It<.5&&A*J<.5,Pt?(Gt=a.sq(G+V),Gt/=Gt+a.sq(X+A),ut.dnm=Math.sqrt(1+this._ep2*Gt),bt=J/(this._f1*ut.dnm),Ht=Math.sin(bt),Xt=Math.cos(bt)):(Ht=ot,Xt=gt),ut.salp1=A*Ht,ut.calp1=Xt>=0?It+A*G*a.sq(Ht)/(1+Xt):j-A*G*a.sq(Ht)/(1-Xt),me=a.hypot(ut.salp1,ut.calp1),Ke=G*V+X*A*Xt,Pt&&me<this._etol2?(ut.salp2=X*Ht,ut.calp2=It-X*V*(Xt>=0?a.sq(Ht)/(1+Xt):1-Xt),Zt=a.hypot(ut.salp2,ut.calp2),ut.salp2/=Zt,ut.calp2/=Zt,ut.sig12=Math.atan2(me,Ke)):Math.abs(this._n)>.1||Ke>=0||me>=6*Math.abs(this._n)*Math.PI*a.sq(X)||(Fn=Math.atan2(-ot,-gt),this.f>=0?(ke=a.sq(G)*this._ep2,oi=ke/(2*(1+Math.sqrt(1+ke))+ke),zt=this.f*X*this.A3f(oi)*Math.PI,Ee=zt*X,Yt=Fn/zt,kt=j/Ee):(xa=A*X-V*G,kh=Math.atan2(j,xa),vn=this.Lengths(this._n,Math.PI+kh,G,-X,k,V,A,W,X,A,n.REDUCEDLENGTH,lt,St),ds=vn.m12b,$t=vn.m0,Yt=-1+ds/(X*A*$t*Math.PI),Ee=Yt<-.01?j/Yt:-this.f*a.sq(X)*Math.PI,zt=Ee/X,kt=J/zt),kt>-y&&Yt>-1-S?this.f>=0?(ut.salp1=Math.min(1,-Yt),ut.calp1=-Math.sqrt(1-a.sq(ut.salp1))):(ut.calp1=Math.max(Yt>-y?0:-1,Yt),ut.salp1=Math.sqrt(1-a.sq(ut.calp1))):(Ar=D(Yt,kt),yn=zt*(this.f>=0?-Yt*Ar/(1+Ar):-kt*(1+Ar)/Ar),Ht=Math.sin(yn),Xt=-Math.cos(yn),ut.salp1=A*Ht,ut.calp1=j-A*G*a.sq(Ht)/(1-Xt))),ut.salp1<=0?(ut.salp1=1,ut.calp1=0):(Zt=a.hypot(ut.salp1,ut.calp1),ut.salp1/=Zt,ut.calp1/=Zt),ut},n.Geodesic.prototype.Lambda12=function(G,X,k,V,A,W,J,ot,gt,lt,St,ut,It,Nt){var j={},Pt,bt,Gt,Ht,Xt,Zt,me,Ke,Yt,kt,zt,Ee,ke;return G===0&&ot===0&&(ot=-n.tiny_),bt=J*X,Gt=a.hypot(ot,J*G),j.ssig1=G,Ht=bt*G,j.csig1=Xt=ot*X,Pt=a.hypot(j.ssig1,j.csig1),j.ssig1/=Pt,j.csig1/=Pt,j.salp2=A!==X?bt/A:J,j.calp2=A!==X||Math.abs(V)!==-G?Math.sqrt(a.sq(ot*X)+(X<-G?(A-X)*(X+A):(G-V)*(G+V)))/A:Math.abs(ot),j.ssig2=V,Zt=bt*V,j.csig2=me=j.calp2*A,Pt=a.hypot(j.ssig2,j.csig2),j.ssig2/=Pt,j.csig2/=Pt,j.sig12=Math.atan2(Math.max(0,j.csig1*j.ssig2-j.ssig1*j.csig2),j.csig1*j.csig2+j.ssig1*j.ssig2),Ke=Math.max(0,Xt*Zt-Ht*me),Yt=Xt*me+Ht*Zt,zt=Math.atan2(Ke*lt-Yt*gt,Yt*lt+Ke*gt),Ee=a.sq(Gt)*this._ep2,j.eps=Ee/(2*(1+Math.sqrt(1+Ee))+Ee),this.C3f(j.eps,Nt),kt=n.SinCosSeries(!0,j.ssig2,j.csig2,Nt)-n.SinCosSeries(!0,j.ssig1,j.csig1,Nt),j.domg12=-this.f*this.A3f(j.eps)*bt*(j.sig12+kt),j.lam12=zt+j.domg12,St&&(j.calp2===0?j.dlam12=-2*this._f1*k/G:(ke=this.Lengths(j.eps,j.sig12,j.ssig1,j.csig1,k,j.ssig2,j.csig2,W,X,A,n.REDUCEDLENGTH,ut,It),j.dlam12=ke.m12b,j.dlam12*=this._f1/(j.calp2*A))),j},n.Geodesic.prototype.Inverse=function(G,X,k,V,A){var W,J;return A||(A=n.STANDARD),A===n.LONG_UNROLL&&(A|=n.STANDARD),A&=n.OUT_MASK,W=this.InverseInt(G,X,k,V,A),J=W.vals,A&n.AZIMUTH&&(J.azi1=a.atan2d(W.salp1,W.calp1),J.azi2=a.atan2d(W.salp2,W.calp2)),J},n.Geodesic.prototype.InverseInt=function(G,X,k,V,A){var W={},J,ot,gt,lt,St,ut,It,Nt,j,Pt,bt,Gt,Ht,Xt,Zt,me,Ke,Yt,kt,zt,Ee,ke,oi,xa,kh,ds,$t,vn,Ar,yn,Fn,ef,rf,Fu,Ul,zh,Vh,Uh,qh,nf,Wd,Gu,Hd,sf,Xd,Yd,Jd,iv,Kd,af,Qd,of,sv,lf,av,ov,Wh,uf,Hh,Bd,Zd,hf,cf,$d,jd;if(W.lat1=G=a.LatFix(G),W.lat2=k=a.LatFix(k),G=a.AngRound(G),k=a.AngRound(k),J=a.AngDiff(X,V),ot=J.e,J=J.d,A&n.LONG_UNROLL?(W.lon1=X,W.lon2=X+J+ot):(W.lon1=a.AngNormalize(X),W.lon2=a.AngNormalize(V)),gt=a.copysign(1,J),J*=gt,ot*=gt,Zt=J*a.degree,lt=a.sincosde(J,ot),me=lt.s,Ke=lt.c,ot=180-J-ot,St=Math.abs(G)<Math.abs(k)||isNaN(k)?-1:1,St<0&&(gt*=-1,[k,G]=[G,k]),ut=a.copysign(1,-G),G*=ut,k*=ut,lt=a.sincosd(G),It=this._f1*lt.s,Nt=lt.c,lt=a.hypot(It,Nt),It/=lt,Nt/=lt,Nt=Math.max(n.tiny_,Nt),lt=a.sincosd(k),j=this._f1*lt.s,Pt=lt.c,lt=a.hypot(j,Pt),j/=lt,Pt/=lt,Pt=Math.max(n.tiny_,Pt),Nt<-It?Pt===Nt&&(j=a.copysign(It,j)):Math.abs(j)===-It&&(Pt=Nt),Ht=Math.sqrt(1+this._ep2*a.sq(It)),Xt=Math.sqrt(1+this._ep2*a.sq(j)),oi=new Array(n.nC1_+1),xa=new Array(n.nC2_+1),kh=new Array(n.nC3_),ds=G===-90||me===0,ds&&(kt=Ke,zt=me,Ee=1,ke=0,vn=It,Ar=kt*Nt,yn=j,Fn=Ee*Pt,Yt=Math.atan2(Math.max(0,Ar*yn-vn*Fn),Ar*Fn+vn*yn),$t=this.Lengths(this._n,Yt,vn,Ar,Ht,yn,Fn,Xt,Nt,Pt,A|n.DISTANCE|n.REDUCEDLENGTH,oi,xa),bt=$t.s12b,Gt=$t.m12b,A&n.GEODESICSCALE&&(W.M12=$t.M12,W.M21=$t.M21),Yt<1||Gt>=0?((Yt<3*n.tiny_||Yt<M&&(bt<0||Gt<0))&&(Yt=Gt=bt=0),Gt*=this._b,bt*=this._b,W.a12=Yt/a.degree):ds=!1),Wh=2,!ds&&It===0&&(this.f<=0||ot>=this.f*180))kt=Ee=0,zt=ke=1,bt=this.a*Zt,Yt=rf=Zt/this._f1,Gt=this._b*Math.sin(Yt),A&n.GEODESICSCALE&&(W.M12=W.M21=Math.cos(Yt)),W.a12=J/this._f1;else if(!ds)if($t=this.InverseStart(It,Nt,Ht,j,Pt,Xt,Zt,me,Ke,oi,xa),Yt=$t.sig12,zt=$t.salp1,kt=$t.calp1,Yt>=0)ke=$t.salp2,Ee=$t.calp2,Fu=$t.dnm,bt=Yt*this._b*Fu,Gt=a.sq(Fu)*this._b*Math.sin(Yt/Fu),A&n.GEODESICSCALE&&(W.M12=W.M21=Math.cos(Yt/Fu)),W.a12=Yt/a.degree,rf=Zt/(this._f1*Fu);else{for(Ul=0,zh=n.tiny_,Vh=1,Uh=n.tiny_,qh=-1,nf=!1,Wd=!1;$t=this.Lambda12(It,Nt,Ht,j,Pt,Xt,zt,kt,me,Ke,Ul<_,oi,xa,kh),Gu=$t.lam12,ke=$t.salp2,Ee=$t.calp2,Yt=$t.sig12,vn=$t.ssig1,Ar=$t.csig1,yn=$t.ssig2,Fn=$t.csig2,ef=$t.eps,Hh=$t.domg12,Hd=$t.dlam12,!(Wd||!(Math.abs(Gu)>=(nf?8:1)*M)||Ul==E);++Ul){if(Gu>0&&(Ul<_||kt/zt>qh/Uh)?(Uh=zt,qh=kt):Gu<0&&(Ul<_||kt/zt<Vh/zh)&&(zh=zt,Vh=kt),Ul<_&&Hd>0&&(sf=-Gu/Hd,Math.abs(sf)<Math.PI&&(Xd=Math.sin(sf),Yd=Math.cos(sf),Jd=zt*Yd+kt*Xd,Jd>0))){kt=kt*Yd-zt*Xd,zt=Jd,lt=a.hypot(zt,kt),zt/=lt,kt/=lt,nf=Math.abs(Gu)<=16*M;continue}zt=(zh+Uh)/2,kt=(Vh+qh)/2,lt=a.hypot(zt,kt),zt/=lt,kt/=lt,nf=!1,Wd=Math.abs(zh-zt)+(Vh-kt)<v||Math.abs(zt-Uh)+(kt-qh)<v}iv=A|(A&(n.REDUCEDLENGTH|n.GEODESICSCALE)?n.DISTANCE:n.NONE),$t=this.Lengths(ef,Yt,vn,Ar,Ht,yn,Fn,Xt,Nt,Pt,iv,oi,xa),bt=$t.s12b,Gt=$t.m12b,A&n.GEODESICSCALE&&(W.M12=$t.M12,W.M21=$t.M21),Gt*=this._b,bt*=this._b,W.a12=Yt/a.degree,A&n.AREA&&($d=Math.sin(Hh),jd=Math.cos(Hh),Wh=me*jd-Ke*$d,uf=Ke*jd+me*$d)}return A&n.DISTANCE&&(W.s12=0+bt),A&n.REDUCEDLENGTH&&(W.m12=0+Gt),A&n.AREA&&(Kd=zt*Nt,af=a.hypot(kt,zt*It),af!==0&&Kd!==0?(vn=It,Ar=kt*Nt,yn=j,Fn=Ee*Pt,of=a.sq(af)*this._ep2,ef=of/(2*(1+Math.sqrt(1+of))+of),sv=a.sq(this.a)*af*Kd*this._e2,lt=a.hypot(vn,Ar),vn/=lt,Ar/=lt,lt=a.hypot(yn,Fn),yn/=lt,Fn/=lt,lf=new Array(n.nC4_),this.C4f(ef,lf),av=n.SinCosSeries(!1,vn,Ar,lf),ov=n.SinCosSeries(!1,yn,Fn,lf),W.S12=sv*(ov-av)):W.S12=0,!ds&&Wh==2&&(Wh=Math.sin(rf),uf=Math.cos(rf)),!ds&&uf>-.7071&&j-It<1.75?(Hh=1+uf,Bd=1+Nt,Zd=1+Pt,Qd=2*Math.atan2(Wh*(It*Zd+j*Bd),Hh*(It*j+Bd*Zd))):(hf=ke*kt-Ee*zt,cf=Ee*kt+ke*zt,hf===0&&cf<0&&(hf=n.tiny_*kt,cf=-1),Qd=Math.atan2(hf,cf)),W.S12+=this._c2*Qd,W.S12*=St*gt*ut,W.S12+=0),St<0&&([ke,zt]=[zt,ke],[Ee,kt]=[kt,Ee],A&n.GEODESICSCALE&&([W.M21,W.M12]=[W.M12,W.M21])),zt*=St*gt,kt*=St*ut,ke*=St*gt,Ee*=St*ut,{vals:W,salp1:zt,calp1:kt,salp2:ke,calp2:Ee}},n.Geodesic.prototype.GenDirect=function(G,X,k,V,A,W){var J;return W?W===n.LONG_UNROLL&&(W|=n.STANDARD):W=n.STANDARD,V||(W|=n.DISTANCE_IN),J=new i.GeodesicLine(this,G,X,k,W),J.GenPosition(V,A,W)},n.Geodesic.prototype.Direct=function(G,X,k,V,A){return this.GenDirect(G,X,k,!1,V,A)},n.Geodesic.prototype.ArcDirect=function(G,X,k,V,A){return this.GenDirect(G,X,k,!0,V,A)},n.Geodesic.prototype.Line=function(G,X,k,V){return new i.GeodesicLine(this,G,X,k,V)},n.Geodesic.prototype.DirectLine=function(G,X,k,V,A){return this.GenDirectLine(G,X,k,!1,V,A)},n.Geodesic.prototype.ArcDirectLine=function(G,X,k,V,A){return this.GenDirectLine(G,X,k,!0,V,A)},n.Geodesic.prototype.GenDirectLine=function(G,X,k,V,A,W){var J;return W||(W=n.STANDARD|n.DISTANCE_IN),V||(W|=n.DISTANCE_IN),J=new i.GeodesicLine(this,G,X,k,W),J.GenSetDistance(V,A),J},n.Geodesic.prototype.InverseLine=function(G,X,k,V,A){var W,J,ot;return A||(A=n.STANDARD|n.DISTANCE_IN),W=this.InverseInt(G,X,k,V,n.ARC),ot=a.atan2d(W.salp1,W.calp1),A&(n.OUT_MASK&n.DISTANCE_IN)&&(A|=n.DISTANCE),J=new i.GeodesicLine(this,G,X,ot,A,W.salp1,W.calp1),J.SetArc(W.vals.a12),J},n.Geodesic.prototype.Polygon=function(G){return new s.PolygonArea(this,G)},n.WGS84=new n.Geodesic(o.WGS84.a,o.WGS84.f)}(e.Geodesic,e.GeodesicLine,e.PolygonArea,e.Math,e.Constants),function(n,i,s){i.GeodesicLine=function(a,o,l,u,c,h,f){var g,m,_,E,M,y;c||(c=n.STANDARD|n.DISTANCE_IN),this.a=a.a,this.f=a.f,this._b=a._b,this._c2=a._c2,this._f1=a._f1,this.caps=c|n.LATITUDE|n.AZIMUTH|n.LONG_UNROLL,this.lat1=s.LatFix(o),this.lon1=l,typeof h>"u"||typeof f>"u"?(this.azi1=s.AngNormalize(u),g=s.sincosd(s.AngRound(this.azi1)),this.salp1=g.s,this.calp1=g.c):(this.azi1=u,this.salp1=h,this.calp1=f),g=s.sincosd(s.AngRound(this.lat1)),_=this._f1*g.s,m=g.c,g=s.hypot(_,m),_/=g,m/=g,m=Math.max(n.tiny_,m),this._dn1=Math.sqrt(1+a._ep2*s.sq(_)),this._salp0=this.salp1*m,this._calp0=s.hypot(this.calp1,this.salp1*_),this._ssig1=_,this._somg1=this._salp0*_,this._csig1=this._comg1=_!==0||this.calp1!==0?m*this.calp1:1,g=s.hypot(this._ssig1,this._csig1),this._ssig1/=g,this._csig1/=g,this._k2=s.sq(this._calp0)*a._ep2,E=this._k2/(2*(1+Math.sqrt(1+this._k2))+this._k2),this.caps&n.CAP_C1&&(this._A1m1=n.A1m1f(E),this._C1a=new Array(n.nC1_+1),n.C1f(E,this._C1a),this._B11=n.SinCosSeries(!0,this._ssig1,this._csig1,this._C1a),M=Math.sin(this._B11),y=Math.cos(this._B11),this._stau1=this._ssig1*y+this._csig1*M,this._ctau1=this._csig1*y-this._ssig1*M),this.caps&n.CAP_C1p&&(this._C1pa=new Array(n.nC1p_+1),n.C1pf(E,this._C1pa)),this.caps&n.CAP_C2&&(this._A2m1=n.A2m1f(E),this._C2a=new Array(n.nC2_+1),n.C2f(E,this._C2a),this._B21=n.SinCosSeries(!0,this._ssig1,this._csig1,this._C2a)),this.caps&n.CAP_C3&&(this._C3a=new Array(n.nC3_),a.C3f(E,this._C3a),this._A3c=-this.f*this._salp0*a.A3f(E),this._B31=n.SinCosSeries(!0,this._ssig1,this._csig1,this._C3a)),this.caps&n.CAP_C4&&(this._C4a=new Array(n.nC4_),a.C4f(E,this._C4a),this._A4=s.sq(this.a)*this._calp0*this._salp0*a._e2,this._B41=n.SinCosSeries(!1,this._ssig1,this._csig1,this._C4a)),this.a13=this.s13=NaN},i.GeodesicLine.prototype.GenPosition=function(a,o,l){var u={},c,h,f,g,m,_,E,M,y,w,v,S,P,I,b,D,O,T,x,R,z,rt,B,ct,G,X,k,V,A;return l?l===n.LONG_UNROLL&&(l|=n.STANDARD):l=n.STANDARD,l&=this.caps&n.OUT_MASK,u.lat1=this.lat1,u.azi1=this.azi1,u.lon1=l&n.LONG_UNROLL?this.lon1:s.AngNormalize(this.lon1),a?u.a12=o:u.s12=o,a||this.caps&n.DISTANCE_IN&n.OUT_MASK?(g=0,m=0,a?(c=o*s.degree,X=s.sincosd(o),h=X.s,f=X.c):(M=o/(this._b*(1+this._A1m1)),y=Math.sin(M),w=Math.cos(M),g=-n.SinCosSeries(!0,this._stau1*w+this._ctau1*y,this._ctau1*w-this._stau1*y,this._C1pa),c=M-(g-this._B11),h=Math.sin(c),f=Math.cos(c),Math.abs(this.f)>.01&&(_=this._ssig1*f+this._csig1*h,E=this._csig1*f-this._ssig1*h,g=n.SinCosSeries(!0,_,E,this._C1a),v=(1+this._A1m1)*(c+(g-this._B11))-o/this._b,c=c-v/Math.sqrt(1+this._k2*s.sq(_)),h=Math.sin(c),f=Math.cos(c))),_=this._ssig1*f+this._csig1*h,E=this._csig1*f-this._ssig1*h,rt=Math.sqrt(1+this._k2*s.sq(_)),l&(n.DISTANCE|n.REDUCEDLENGTH|n.GEODESICSCALE)&&((a||Math.abs(this.f)>.01)&&(g=n.SinCosSeries(!0,_,E,this._C1a)),m=(1+this._A1m1)*(g-this._B11)),D=this._calp0*_,O=s.hypot(this._salp0,this._calp0*E),O===0&&(O=E=n.tiny_),R=this._salp0,z=this._calp0*E,a&&l&n.DISTANCE&&(u.s12=this._b*((1+this._A1m1)*c+m)),l&n.LONGITUDE&&(T=this._salp0*_,x=E,b=s.copysign(1,this._salp0),S=l&n.LONG_UNROLL?b*(c-(Math.atan2(_,E)-Math.atan2(this._ssig1,this._csig1))+(Math.atan2(b*T,x)-Math.atan2(b*this._somg1,this._comg1))):Math.atan2(T*this._comg1-x*this._somg1,x*this._comg1+T*this._somg1),P=S+this._A3c*(c+(n.SinCosSeries(!0,_,E,this._C3a)-this._B31)),I=P/s.degree,u.lon2=l&n.LONG_UNROLL?this.lon1+I:s.AngNormalize(s.AngNormalize(this.lon1)+s.AngNormalize(I))),l&n.LATITUDE&&(u.lat2=s.atan2d(D,this._f1*O)),l&n.AZIMUTH&&(u.azi2=s.atan2d(R,z)),l&(n.REDUCEDLENGTH|n.GEODESICSCALE)&&(B=n.SinCosSeries(!0,_,E,this._C2a),ct=(1+this._A2m1)*(B-this._B21),G=(this._A1m1-this._A2m1)*c+(m-ct),l&n.REDUCEDLENGTH&&(u.m12=this._b*(rt*(this._csig1*_)-this._dn1*(this._ssig1*E)-this._csig1*E*G)),l&n.GEODESICSCALE&&(X=this._k2*(_-this._ssig1)*(_+this._ssig1)/(this._dn1+rt),u.M12=f+(X*_-E*G)*this._ssig1/this._dn1,u.M21=f-(X*this._ssig1-this._csig1*G)*_/rt)),l&n.AREA&&(k=n.SinCosSeries(!1,_,E,this._C4a),this._calp0===0||this._salp0===0?(V=R*this.calp1-z*this.salp1,A=z*this.calp1+R*this.salp1):(V=this._calp0*this._salp0*(f<=0?this._csig1*(1-f)+h*this._ssig1:h*(this._csig1*h/(1+f)+this._ssig1)),A=s.sq(this._salp0)+s.sq(this._calp0)*this._csig1*E),u.S12=this._c2*Math.atan2(V,A)+this._A4*(k-this._B41)),a||(u.a12=c/s.degree),u):(u.a12=NaN,u)},i.GeodesicLine.prototype.Position=function(a,o){return this.GenPosition(!1,a,o)},i.GeodesicLine.prototype.ArcPosition=function(a,o){return this.GenPosition(!0,a,o)},i.GeodesicLine.prototype.GenSetDistance=function(a,o){a?this.SetArc(o):this.SetDistance(o)},i.GeodesicLine.prototype.SetDistance=function(a){var o;this.s13=a,o=this.GenPosition(!1,this.s13,n.ARC),this.a13=0+o.a12},i.GeodesicLine.prototype.SetArc=function(a){var o;this.a13=a,o=this.GenPosition(!0,this.a13,n.DISTANCE),this.s13=0+o.s12}}(e.Geodesic,e.GeodesicLine,e.Math),function(n,i,s,a){var o,l,u,c;o=function(h,f){var g=s.AngDiff(h,f).d;return h=s.AngNormalize(h),f=s.AngNormalize(f),g>0&&(h<0&&f>=0||h>0&&f===0)?1:g<0&&h>=0&&f<0?-1:0},l=function(h,f){return h=h%720,f=f%720,(0<=f&&f<360||f<-360?0:1)-(0<=h&&h<360||h<-360?0:1)},u=function(h,f,g,m,_){return h.Remainder(f),g&1&&h.Add((h.Sum()<0?1:-1)*f/2),m||h.Negate(),_?h.Sum()>f/2?h.Add(-f):h.Sum()<=-f/2&&h.Add(+f):h.Sum()>=f?h.Add(-f):h.Sum()<0&&h.Add(+f),0+h.Sum()},c=function(h,f,g,m,_){return h=s.remainder(h,f),g&1&&(h+=(h<0?1:-1)*f/2),m||(h*=-1),_?h>f/2?h-=f:h<=-f/2&&(h+=f):h>=f?h-=f:h<0&&(h+=f),0+h},n.PolygonArea=function(h,f){this._geod=h,this.a=this._geod.a,this.f=this._geod.f,this._area0=4*Math.PI*h._c2,this.polyline=f||!1,this._mask=i.LATITUDE|i.LONGITUDE|i.DISTANCE|(this.polyline?i.NONE:i.AREA|i.LONG_UNROLL),this.polyline||(this._areasum=new a.Accumulator(0)),this._perimetersum=new a.Accumulator(0),this.Clear()},n.PolygonArea.prototype.Clear=function(){this.num=0,this._crossings=0,this.polyline||this._areasum.Set(0),this._perimetersum.Set(0),this._lat0=this._lon0=this.lat=this.lon=NaN},n.PolygonArea.prototype.AddPoint=function(h,f){var g;this.num===0?(this._lat0=this.lat=h,this._lon0=this.lon=f):(g=this._geod.Inverse(this.lat,this.lon,h,f,this._mask),this._perimetersum.Add(g.s12),this.polyline||(this._areasum.Add(g.S12),this._crossings+=o(this.lon,f)),this.lat=h,this.lon=f),++this.num},n.PolygonArea.prototype.AddEdge=function(h,f){var g;this.num&&(g=this._geod.Direct(this.lat,this.lon,h,f,this._mask),this._perimetersum.Add(f),this.polyline||(this._areasum.Add(g.S12),this._crossings+=l(this.lon,g.lon2)),this.lat=g.lat2,this.lon=g.lon2),++this.num},n.PolygonArea.prototype.Compute=function(h,f){var g={number:this.num},m,_;return this.num<2?(g.perimeter=0,this.polyline||(g.area=0),g):this.polyline?(g.perimeter=this._perimetersum.Sum(),g):(m=this._geod.Inverse(this.lat,this.lon,this._lat0,this._lon0,this._mask),g.perimeter=this._perimetersum.Sum(m.s12),_=new a.Accumulator(this._areasum),_.Add(m.S12),g.area=u(_,this._area0,this._crossings+o(this.lon,this._lon0),h,f),g)},n.PolygonArea.prototype.TestPoint=function(h,f,g,m){var _={number:this.num+1},E,M,y,w;if(this.num===0)return _.perimeter=0,this.polyline||(_.area=0),_;for(_.perimeter=this._perimetersum.Sum(),M=this.polyline?0:this._areasum.Sum(),y=this._crossings,w=0;w<(this.polyline?1:2);++w)E=this._geod.Inverse(w===0?this.lat:h,w===0?this.lon:f,w!==0?this._lat0:h,w!==0?this._lon0:f,this._mask),_.perimeter+=E.s12,this.polyline||(M+=E.S12,y+=o(w===0?this.lon:f,w!==0?this._lon0:f));return this.polyline||(_.area=c(M,this._area0,y,g,m)),_},n.PolygonArea.prototype.TestEdge=function(h,f,g,m){var _={number:this.num?this.num+1:0},E,M,y;return this.num===0||(_.perimeter=this._perimetersum.Sum()+f,this.polyline)||(M=this._areasum.Sum(),y=this._crossings,E=this._geod.Direct(this.lat,this.lon,h,f,this._mask),M+=E.S12,y+=l(this.lon,E.lon2),y+=o(E.lon2,this._lon0),E=this._geod.Inverse(E.lat2,E.lon2,this._lat0,this._lon0,this._mask),_.perimeter+=E.s12,M+=E.S12,_.area=c(M,this._area0,y,g,m)),_}}(e.PolygonArea,e.Geodesic,e.Math,e.Accumulator),t(e)})(function(t){r.exports?r.exports=t:window.geodesic=t})}(bd)),bd.exports}var _P=yP();function wP(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.g=new _P.Geodesic.Geodesic(this.a,this.es/(1+Math.sqrt(1-this.es)))}function EP(r){var t=r.x,e=r.y,n=Math.sin(r.y),i=Math.cos(r.y),s=ht(t-this.long0),a,o,l,u,c,h,f,g,m,_,E,M,y,w,v;return this.sphere?Math.abs(this.sin_p12-1)<=st?(r.x=this.x0+this.a*(Q-e)*Math.sin(s),r.y=this.y0-this.a*(Q-e)*Math.cos(s),r):Math.abs(this.sin_p12+1)<=st?(r.x=this.x0+this.a*(Q+e)*Math.sin(s),r.y=this.y0+this.a*(Q+e)*Math.cos(s),r):(m=this.sin_p12*n+this.cos_p12*i*Math.cos(s),f=Math.acos(m),g=f?f/Math.sin(f):1,r.x=this.x0+this.a*g*i*Math.sin(s),r.y=this.y0+this.a*g*(this.cos_p12*n-this.sin_p12*i*Math.cos(s)),r):(a=Eh(this.es),o=Sh(this.es),l=Ph(this.es),u=Ch(this.es),Math.abs(this.sin_p12-1)<=st?(c=this.a*Xr(a,o,l,u,Q),h=this.a*Xr(a,o,l,u,e),r.x=this.x0+(c-h)*Math.sin(s),r.y=this.y0-(c-h)*Math.cos(s),r):Math.abs(this.sin_p12+1)<=st?(c=this.a*Xr(a,o,l,u,Q),h=this.a*Xr(a,o,l,u,e),r.x=this.x0+(c+h)*Math.sin(s),r.y=this.y0+(c+h)*Math.cos(s),r):Math.abs(t)<st&&Math.abs(e-this.lat0)<st?(r.x=r.y=0,r):(_=this.lat0/de,E=this.long0/de,M=e/de,y=t/de,w=this.g.Inverse(_,E,M,y,this.g.AZIMUTH),v=w.azi1*de,r.x=w.s12*Math.sin(v),r.y=w.s12*Math.cos(v),r))}function SP(r){r.x-=this.x0,r.y-=this.y0;var t,e,n,i,s,a,o,l,u,c,h,f,g,m,_,E,M,y;return this.sphere?(t=Math.sqrt(r.x*r.x+r.y*r.y),t>2*Q*this.a?void 0:(e=t/this.a,n=Math.sin(e),i=Math.cos(e),s=this.long0,Math.abs(t)<=st?a=this.lat0:(a=ma(i*this.sin_p12+r.y*n*this.cos_p12/t),o=Math.abs(this.lat0)-Q,Math.abs(o)<=st?this.lat0>=0?s=ht(this.long0+Math.atan2(r.x,-r.y)):s=ht(this.long0-Math.atan2(-r.x,r.y)):s=ht(this.long0+Math.atan2(r.x*n,t*this.cos_p12*i-r.y*this.sin_p12*n))),r.x=s,r.y=a,r)):(l=Eh(this.es),u=Sh(this.es),c=Ph(this.es),h=Ch(this.es),Math.abs(this.sin_p12-1)<=st?(f=this.a*Xr(l,u,c,h,Q),t=Math.sqrt(r.x*r.x+r.y*r.y),g=f-t,a=Wc(g/this.a,l,u,c,h),s=ht(this.long0+Math.atan2(r.x,-1*r.y)),r.x=s,r.y=a,r):Math.abs(this.sin_p12+1)<=st?(f=this.a*Xr(l,u,c,h,Q),t=Math.sqrt(r.x*r.x+r.y*r.y),g=t-f,a=Wc(g/this.a,l,u,c,h),s=ht(this.long0+Math.atan2(r.x,r.y)),r.x=s,r.y=a,r):(m=this.lat0/de,_=this.long0/de,E=Math.atan2(r.x,r.y)/de,M=Math.sqrt(r.x*r.x+r.y*r.y),y=this.g.Direct(m,_,E,M,this.g.STANDARD),r.x=y.lon2*de,r.y=y.lat2*de,r))}var PP=["Azimuthal_Equidistant","aeqd"];const CP={init:wP,forward:EP,inverse:SP,names:PP};function IP(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function MP(r){var t,e,n,i,s,a,o,l,u=r.x,c=r.y;return n=ht(u-this.long0),t=Math.sin(c),e=Math.cos(c),i=Math.cos(n),a=this.sin_p14*t+this.cos_p14*e*i,s=1,(a>0||Math.abs(a)<=st)&&(o=this.a*s*e*Math.sin(n),l=this.y0+this.a*s*(this.cos_p14*t-this.sin_p14*e*i)),r.x=o,r.y=l,r}function NP(r){var t,e,n,i,s,a,o;return r.x-=this.x0,r.y-=this.y0,t=Math.sqrt(r.x*r.x+r.y*r.y),e=ma(t/this.a),n=Math.sin(e),i=Math.cos(e),a=this.long0,Math.abs(t)<=st?(o=this.lat0,r.x=a,r.y=o,r):(o=ma(i*this.sin_p14+r.y*n*this.cos_p14/t),s=Math.abs(this.lat0)-Q,Math.abs(s)<=st?(this.lat0>=0?a=ht(this.long0+Math.atan2(r.x,-r.y)):a=ht(this.long0-Math.atan2(-r.x,r.y)),r.x=a,r.y=o,r):(a=ht(this.long0+Math.atan2(r.x*n,t*this.cos_p14*i-r.y*this.sin_p14*n)),r.x=a,r.y=o,r))}var bP=["ortho"];const TP={init:IP,forward:MP,inverse:NP,names:bP};var xe={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},re={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function DP(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=Q-ee/2?this.face=xe.TOP:this.lat0<=-(Q-ee/2)?this.face=xe.BOTTOM:Math.abs(this.long0)<=ee?this.face=xe.FRONT:Math.abs(this.long0)<=Q+ee?this.face=this.long0>0?xe.RIGHT:xe.LEFT:this.face=xe.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function xP(r){var t={x:0,y:0},e,n,i,s,a,o,l={value:0};if(r.x-=this.long0,this.es!==0?e=Math.atan(this.one_minus_f_squared*Math.tan(r.y)):e=r.y,n=r.x,this.face===xe.TOP)s=Q-e,n>=ee&&n<=Q+ee?(l.value=re.AREA_0,i=n-Q):n>Q+ee||n<=-(Q+ee)?(l.value=re.AREA_1,i=n>0?n-mr:n+mr):n>-(Q+ee)&&n<=-ee?(l.value=re.AREA_2,i=n+Q):(l.value=re.AREA_3,i=n);else if(this.face===xe.BOTTOM)s=Q+e,n>=ee&&n<=Q+ee?(l.value=re.AREA_0,i=-n+Q):n<ee&&n>=-ee?(l.value=re.AREA_1,i=-n):n<-ee&&n>=-(Q+ee)?(l.value=re.AREA_2,i=-n-Q):(l.value=re.AREA_3,i=n>0?-n+mr:-n-mr);else{var u,c,h,f,g,m,_;this.face===xe.RIGHT?n=Nu(n,+Q):this.face===xe.BACK?n=Nu(n,3.14159265359):this.face===xe.LEFT&&(n=Nu(n,-Q)),f=Math.sin(e),g=Math.cos(e),m=Math.sin(n),_=Math.cos(n),u=g*_,c=g*m,h=f,this.face===xe.FRONT?(s=Math.acos(u),i=Hc(s,h,c,l)):this.face===xe.RIGHT?(s=Math.acos(c),i=Hc(s,h,-u,l)):this.face===xe.BACK?(s=Math.acos(-u),i=Hc(s,h,-c,l)):this.face===xe.LEFT?(s=Math.acos(-c),i=Hc(s,h,u,l)):(s=i=0,l.value=re.AREA_0)}return o=Math.atan(12/mr*(i+Math.acos(Math.sin(i)*Math.cos(ee))-Q)),a=Math.sqrt((1-Math.cos(s))/(Math.cos(o)*Math.cos(o))/(1-Math.cos(Math.atan(1/Math.cos(i))))),l.value===re.AREA_1?o+=Q:l.value===re.AREA_2?o+=mr:l.value===re.AREA_3&&(o+=1.5*mr),t.x=a*Math.cos(o),t.y=a*Math.sin(o),t.x=t.x*this.a+this.x0,t.y=t.y*this.a+this.y0,r.x=t.x,r.y=t.y,r}function OP(r){var t={lam:0,phi:0},e,n,i,s,a,o,l,u,c,h={value:0};if(r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a,n=Math.atan(Math.sqrt(r.x*r.x+r.y*r.y)),e=Math.atan2(r.y,r.x),r.x>=0&&r.x>=Math.abs(r.y)?h.value=re.AREA_0:r.y>=0&&r.y>=Math.abs(r.x)?(h.value=re.AREA_1,e-=Q):r.x<0&&-r.x>=Math.abs(r.y)?(h.value=re.AREA_2,e=e<0?e+mr:e-mr):(h.value=re.AREA_3,e+=Q),c=mr/12*Math.tan(e),a=Math.sin(c)/(Math.cos(c)-1/Math.sqrt(2)),o=Math.atan(a),i=Math.cos(e),s=Math.tan(n),l=1-i*i*s*s*(1-Math.cos(Math.atan(1/Math.cos(o)))),l<-1?l=-1:l>1&&(l=1),this.face===xe.TOP)u=Math.acos(l),t.phi=Q-u,h.value===re.AREA_0?t.lam=o+Q:h.value===re.AREA_1?t.lam=o<0?o+mr:o-mr:h.value===re.AREA_2?t.lam=o-Q:t.lam=o;else if(this.face===xe.BOTTOM)u=Math.acos(l),t.phi=u-Q,h.value===re.AREA_0?t.lam=-o+Q:h.value===re.AREA_1?t.lam=-o:h.value===re.AREA_2?t.lam=-o-Q:t.lam=o<0?-o-mr:-o+mr;else{var f,g,m;f=l,c=f*f,c>=1?m=0:m=Math.sqrt(1-c)*Math.sin(o),c+=m*m,c>=1?g=0:g=Math.sqrt(1-c),h.value===re.AREA_1?(c=g,g=-m,m=c):h.value===re.AREA_2?(g=-g,m=-m):h.value===re.AREA_3&&(c=g,g=m,m=-c),this.face===xe.RIGHT?(c=f,f=-g,g=c):this.face===xe.BACK?(f=-f,g=-g):this.face===xe.LEFT&&(c=f,f=g,g=-c),t.phi=Math.acos(-m)-Q,t.lam=Math.atan2(g,f),this.face===xe.RIGHT?t.lam=Nu(t.lam,-Q):this.face===xe.BACK?t.lam=Nu(t.lam,-3.14159265359):this.face===xe.LEFT&&(t.lam=Nu(t.lam,+Q))}if(this.es!==0){var _,E,M;_=t.phi<0?1:0,E=Math.tan(t.phi),M=this.b/Math.sqrt(E*E+this.one_minus_f_squared),t.phi=Math.atan(Math.sqrt(this.a*this.a-M*M)/(this.one_minus_f*M)),_&&(t.phi=-t.phi)}return t.lam+=this.long0,r.x=t.lam,r.y=t.phi,r}function Hc(r,t,e,n){var i;return r<st?(n.value=re.AREA_0,i=0):(i=Math.atan2(t,e),Math.abs(i)<=ee?n.value=re.AREA_0:i>ee&&i<=Q+ee?(n.value=re.AREA_1,i-=Q):i>Q+ee||i<=-(Q+ee)?(n.value=re.AREA_2,i=i>=0?i-mr:i+mr):(n.value=re.AREA_3,i+=Q)),i}function Nu(r,t){var e=r+t;return e<-3.14159265359?e+=gh:e>3.14159265359&&(e-=gh),e}var AP=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const LP={init:DP,forward:xP,inverse:OP,names:AP};var Td=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Ih=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],a0=.8487,o0=1.3523,l0=$i/5,RP=1/l0,bu=18,Xc=function(r,t){return r[0]+t*(r[1]+t*(r[2]+t*r[3]))},FP=function(r,t){return r[1]+t*(2*r[2]+t*3*r[3])};function GP(r,t,e,n){for(var i=t;n;--n){var s=r(i);if(i-=s,Math.abs(s)<e)break}return i}function kP(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function zP(r){var t=ht(r.x-this.long0),e=Math.abs(r.y),n=Math.floor(e*l0);n<0?n=0:n>=bu&&(n=bu-1),e=$i*(e-RP*n);var i={x:Xc(Td[n],e)*t,y:Xc(Ih[n],e)};return r.y<0&&(i.y=-i.y),i.x=i.x*this.a*a0+this.x0,i.y=i.y*this.a*o0+this.y0,i}function VP(r){var t={x:(r.x-this.x0)/(this.a*a0),y:Math.abs(r.y-this.y0)/(this.a*o0)};if(t.y>=1)t.x/=Td[bu][0],t.y=r.y<0?-Q:Q;else{var e=Math.floor(t.y*bu);for(e<0?e=0:e>=bu&&(e=bu-1);;)if(Ih[e][0]>t.y)--e;else if(Ih[e+1][0]<=t.y)++e;else break;var n=Ih[e],i=5*(t.y-n[0])/(Ih[e+1][0]-n[0]);i=GP(function(s){return(Xc(n,s)-t.y)/FP(n,s)},i,st,100),t.x/=Xc(Td[e],i),t.y=(5*e+i)*de,r.y<0&&(t.y=-t.y)}return t.x=ht(t.x+this.long0),t}var UP=["Robinson","robin"];const qP={init:kP,forward:zP,inverse:VP,names:UP};function WP(){this.name="geocent"}function HP(r){var t=Fm(r,this.es,this.a);return t}function XP(r){var t=Gm(r,this.es,this.a,this.b);return t}var YP=["Geocentric","geocentric","geocent","Geocent"];const JP={init:WP,forward:HP,inverse:XP,names:YP};var xr={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},Mh={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function KP(){if(Object.keys(Mh).forEach((function(e){if(typeof this[e]>"u")this[e]=Mh[e].def;else{if(Mh[e].num&&isNaN(this[e]))throw new Error("Invalid parameter value, must be numeric "+e+" = "+this[e]);Mh[e].num&&(this[e]=parseFloat(this[e]))}Mh[e].degrees&&(this[e]=this[e]*de)}).bind(this)),Math.abs(Math.abs(this.lat0)-Q)<st?this.mode=this.lat0<0?xr.S_POLE:xr.N_POLE:Math.abs(this.lat0)<st?this.mode=xr.EQUIT:(this.mode=xr.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var r=this.tilt,t=this.azi;this.cg=Math.cos(t),this.sg=Math.sin(t),this.cw=Math.cos(r),this.sw=Math.sin(r)}function QP(r){r.x-=this.long0;var t=Math.sin(r.y),e=Math.cos(r.y),n=Math.cos(r.x),i,s;switch(this.mode){case xr.OBLIQ:s=this.sinph0*t+this.cosph0*e*n;break;case xr.EQUIT:s=e*n;break;case xr.S_POLE:s=-t;break;case xr.N_POLE:s=t;break}switch(s=this.pn1/(this.p-s),i=s*e*Math.sin(r.x),this.mode){case xr.OBLIQ:s*=this.cosph0*t-this.sinph0*e*n;break;case xr.EQUIT:s*=t;break;case xr.N_POLE:s*=-(e*n);break;case xr.S_POLE:s*=e*n;break}var a,o;return a=s*this.cg+i*this.sg,o=1/(a*this.sw*this.h1+this.cw),i=(i*this.cg-s*this.sg)*this.cw*o,s=a*o,r.x=i*this.a,r.y=s*this.a,r}function BP(r){r.x/=this.a,r.y/=this.a;var t={x:r.x,y:r.y},e,n,i;i=1/(this.pn1-r.y*this.sw),e=this.pn1*r.x*i,n=this.pn1*r.y*this.cw*i,r.x=e*this.cg+n*this.sg,r.y=n*this.cg-e*this.sg;var s=un(r.x,r.y);if(Math.abs(s)<st)t.x=0,t.y=r.y;else{var a,o;switch(o=1-s*s*this.pfact,o=(this.p-Math.sqrt(o))/(this.pn1/s+s/this.pn1),a=Math.sqrt(1-o*o),this.mode){case xr.OBLIQ:t.y=Math.asin(a*this.sinph0+r.y*o*this.cosph0/s),r.y=(a-this.sinph0*Math.sin(t.y))*s,r.x*=o*this.cosph0;break;case xr.EQUIT:t.y=Math.asin(r.y*o/s),r.y=a*s,r.x*=o;break;case xr.N_POLE:t.y=Math.asin(a),r.y=-r.y;break;case xr.S_POLE:t.y=-Math.asin(a);break}t.x=Math.atan2(r.x,r.y)}return r.x=t.x+this.long0,r.y=t.y,r}var ZP=["Tilted_Perspective","tpers"];const $P={init:KP,forward:QP,inverse:BP,names:ZP};function jP(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var r=1-this.es,t=1/r;this.radius_p=Math.sqrt(r),this.radius_p2=r,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function tC(r){var t=r.x,e=r.y,n,i,s,a;if(t=t-this.long0,this.shape==="ellipse"){e=Math.atan(this.radius_p2*Math.tan(e));var o=this.radius_p/un(this.radius_p*Math.cos(e),Math.sin(e));if(i=o*Math.cos(t)*Math.cos(e),s=o*Math.sin(t)*Math.cos(e),a=o*Math.sin(e),(this.radius_g-i)*i-s*s-a*a*this.radius_p_inv2<0)return r.x=Number.NaN,r.y=Number.NaN,r;n=this.radius_g-i,this.flip_axis?(r.x=this.radius_g_1*Math.atan(s/un(a,n)),r.y=this.radius_g_1*Math.atan(a/n)):(r.x=this.radius_g_1*Math.atan(s/n),r.y=this.radius_g_1*Math.atan(a/un(s,n)))}else this.shape==="sphere"&&(n=Math.cos(e),i=Math.cos(t)*n,s=Math.sin(t)*n,a=Math.sin(e),n=this.radius_g-i,this.flip_axis?(r.x=this.radius_g_1*Math.atan(s/un(a,n)),r.y=this.radius_g_1*Math.atan(a/n)):(r.x=this.radius_g_1*Math.atan(s/n),r.y=this.radius_g_1*Math.atan(a/un(s,n))));return r.x=r.x*this.a,r.y=r.y*this.a,r}function eC(r){var t=-1,e=0,n=0,i,s,a,o;if(r.x=r.x/this.a,r.y=r.y/this.a,this.shape==="ellipse"){this.flip_axis?(n=Math.tan(r.y/this.radius_g_1),e=Math.tan(r.x/this.radius_g_1)*un(1,n)):(e=Math.tan(r.x/this.radius_g_1),n=Math.tan(r.y/this.radius_g_1)*un(1,e));var l=n/this.radius_p;if(i=e*e+l*l+t*t,s=2*this.radius_g*t,a=s*s-4*i*this.C,a<0)return r.x=Number.NaN,r.y=Number.NaN,r;o=(-s-Math.sqrt(a))/(2*i),t=this.radius_g+o*t,e*=o,n*=o,r.x=Math.atan2(e,t),r.y=Math.atan(n*Math.cos(r.x)/t),r.y=Math.atan(this.radius_p_inv2*Math.tan(r.y))}else if(this.shape==="sphere"){if(this.flip_axis?(n=Math.tan(r.y/this.radius_g_1),e=Math.tan(r.x/this.radius_g_1)*Math.sqrt(1+n*n)):(e=Math.tan(r.x/this.radius_g_1),n=Math.tan(r.y/this.radius_g_1)*Math.sqrt(1+e*e)),i=e*e+n*n+t*t,s=2*this.radius_g*t,a=s*s-4*i*this.C,a<0)return r.x=Number.NaN,r.y=Number.NaN,r;o=(-s-Math.sqrt(a))/(2*i),t=this.radius_g+o*t,e*=o,n*=o,r.x=Math.atan2(e,t),r.y=Math.atan(n*Math.cos(r.x)/t)}return r.x=r.x+this.long0,r}var rC=["Geostationary Satellite View","Geostationary_Satellite","geos"];const nC={init:jP,forward:tC,inverse:eC,names:rC};var Nh=1.340264,bh=-.081106,Th=893e-6,Dh=.003796,Yc=Math.sqrt(3)/2;function iC(){this.es=0,this.long0=this.long0!==void 0?this.long0:0}function sC(r){var t=ht(r.x-this.long0),e=r.y,n=Math.asin(Yc*Math.sin(e)),i=n*n,s=i*i*i;return r.x=t*Math.cos(n)/(Yc*(Nh+3*bh*i+s*(7*Th+9*Dh*i))),r.y=n*(Nh+bh*i+s*(Th+Dh*i)),r.x=this.a*r.x+this.x0,r.y=this.a*r.y+this.y0,r}function aC(r){r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a;var t=1e-9,e=12,n=r.y,i,s,a,o,l,u;for(u=0;u<e&&(i=n*n,s=i*i*i,a=n*(Nh+bh*i+s*(Th+Dh*i))-r.y,o=Nh+3*bh*i+s*(7*Th+9*Dh*i),n-=l=a/o,!(Math.abs(l)<t));++u);return i=n*n,s=i*i*i,r.x=Yc*r.x*(Nh+3*bh*i+s*(7*Th+9*Dh*i))/Math.cos(n),r.y=Math.asin(Math.sin(n)/Yc),r.x=ht(r.x+this.long0),r}var oC=["eqearth","Equal Earth","Equal_Earth"];const lC={init:iC,forward:sC,inverse:aC,names:oC};var xh=1e-10;function uC(){var r;if(this.phi1=this.lat1,Math.abs(this.phi1)<xh)throw new Error;this.es?(this.en=Sd(this.es),this.m1=Iu(this.phi1,this.am1=Math.sin(this.phi1),r=Math.cos(this.phi1),this.en),this.am1=r/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=cC,this.forward=hC):(Math.abs(this.phi1)+xh>=Q?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=dC,this.forward=fC)}function hC(r){var t=ht(r.x-(this.long0||0)),e=r.y,n,i,s;return n=this.am1+this.m1-Iu(e,i=Math.sin(e),s=Math.cos(e),this.en),i=s*t/(n*Math.sqrt(1-this.es*i*i)),r.x=n*Math.sin(i),r.y=this.am1-n*Math.cos(i),r.x=this.a*r.x+(this.x0||0),r.y=this.a*r.y+(this.y0||0),r}function cC(r){r.x=(r.x-(this.x0||0))/this.a,r.y=(r.y-(this.y0||0))/this.a;var t,e,n,i;if(e=un(r.x,r.y=this.am1-r.y),i=Pd(this.am1+this.m1-e,this.es,this.en),(t=Math.abs(i))<Q)t=Math.sin(i),n=e*Math.atan2(r.x,r.y)*Math.sqrt(1-this.es*t*t)/Math.cos(i);else if(Math.abs(t-Q)<=xh)n=0;else throw new Error;return r.x=ht(n+(this.long0||0)),r.y=pa(i),r}function fC(r){var t=ht(r.x-(this.long0||0)),e=r.y,n,i;return i=this.cphi1+this.phi1-e,Math.abs(i)>xh?(r.x=i*Math.sin(n=t*Math.cos(e)/i),r.y=this.cphi1-i*Math.cos(n)):r.x=r.y=0,r.x=this.a*r.x+(this.x0||0),r.y=this.a*r.y+(this.y0||0),r}function dC(r){r.x=(r.x-(this.x0||0))/this.a,r.y=(r.y-(this.y0||0))/this.a;var t,e,n=un(r.x,r.y=this.cphi1-r.y);if(e=this.cphi1+this.phi1-n,Math.abs(e)>Q)throw new Error;return Math.abs(Math.abs(e)-Q)<=xh?t=0:t=n*Math.atan2(r.x,r.y)/Math.cos(e),r.x=ht(t+(this.long0||0)),r.y=pa(e),r}var pC=["bonne","Bonne (Werner lat_1=90)"];const gC={init:uC,names:pC};function mC(r){r.Proj.projections.add(Uc),r.Proj.projections.add(qc),r.Proj.projections.add(uE),r.Proj.projections.add(yE),r.Proj.projections.add(CE),r.Proj.projections.add(TE),r.Proj.projections.add(RE),r.Proj.projections.add(VE),r.Proj.projections.add(XE),r.Proj.projections.add(BE),r.Proj.projections.add(dS),r.Proj.projections.add(_S),r.Proj.projections.add(CS),r.Proj.projections.add(DS),r.Proj.projections.add(RS),r.Proj.projections.add(VS),r.Proj.projections.add(XS),r.Proj.projections.add(BS),r.Proj.projections.add(rP),r.Proj.projections.add(oP),r.Proj.projections.add(fP),r.Proj.projections.add(vP),r.Proj.projections.add(CP),r.Proj.projections.add(TP),r.Proj.projections.add(LP),r.Proj.projections.add(qP),r.Proj.projections.add(JP),r.Proj.projections.add($P),r.Proj.projections.add(nC),r.Proj.projections.add(lC),r.Proj.projections.add(gC)}on.defaultDatum="WGS84",on.Proj=ts,on.WGS84=new on.Proj("WGS84"),on.Point=Cu,on.toPoint=Um,on.defs=Hr,on.nadgrid=uw,on.transform=Vc,on.mgrs=Nw,on.version="__VERSION__",mC(on);const u0=on("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=geocent +datum=WGS84");function es(r){return u0.forward(r)}function h0(r){return u0.inverse(r)}const c0=on("+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees","+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs +type=crs");function vC(r){const t=c0.forward([r[0],r[1]]);return[t[0],t[1],r[2]]}function yC(r){const t=c0.inverse([r[0],r[1]]);return[t[0],t[1],r[2]]}function f0(r,t){const e=es(r),n=es(t);return d.Vector.distance(e,n)}function Oh(r,t){const e=[];do{const n=r.length;let i=0;for(let s=0;s<n-1;++s){if(t===void 0||t==="GEODESIC"){const a=ud(r[s],r[s+1]),o=Math.abs(r[s][2]-r[s+1][2]);if(o===0)i+=a;else{const l=Math.sqrt(a*a+o*o);i+=l}}else if(t==="RHUMB"){const a=hm(r[s],r[s+1]),o=Math.abs(r[s][2]-r[s+1][2]);if(o===0)i+=a;else{const l=Math.sqrt(a*a+o*o);i+=l}}else if(t==="NONE"){const a=f0(r[s],r[s+1]);i+=a}else console.warn(`未知的arcType: ${t},导致距离无法计算!`);e.push(i)}}while(!1);return e}function Dd(r){const t="__getXyzFromPostion";let e=d.getExtProp(r,t);return(!e||!d.Vector.equals(e[0],r))&&(e=[[...r],es(r)],d.setExtProp(r,t,e)),e[1]}class d0 extends d.Destroyable{constructor(){super();p(this,"_data",this.dv(d.react(void 0)))}set data(e){this._data.value=e}get data(){return this._data.value}get dataChanged(){return this._data.changed}}class p0 extends d.Destroyable{constructor(){super(...arguments);p(this,"_dragStartEvent",this.dv(new d.Event));p(this,"_dragOverEvent",this.dv(new d.Event));p(this,"_dragLeaveEvent",this.dv(new d.Event));p(this,"_dropEvent",this.dv(new d.Event))}dragStart(e){this._dragStartEvent.emit(e)}dragOver(e){this._dragOverEvent.emit(e)}dragLeave(e){this._dragLeaveEvent.emit(e)}drop(e){this._dropEvent.emit(e)}}function _C(r,t){t&&(Reflect.has(t,"editing")?t.editing=!0:Reflect.has(t,"positionEditing")&&(t.positionEditing=!0))}function wC(r){["Czm3DTiles","View","ESCameraView","OlView","GeoCameraController"].includes(r.typeName)||(Reflect.has(r,"editing")?r.editing=!0:Reflect.has(r,"positionEditing")&&(r.positionEditing=!0)),typeof r.execOnCreating=="function"&&r.execOnCreating()}function Jc(r,t){d.getExtProp(r,"__treeItem")&&console.error("setSceneObjectTreeItem error!"),d.setExtProp(r,"__treeItem",t)}function EC(r){return d.getExtProp(r,"__treeItem")}function SC(r){if(!(r.startsWith("./")||r.startsWith("../")||r.startsWith("/")))return r;const t=document.createElement("a");t.href=r;const e=t.href;return t.remove(),e}function PC(r){try{return JSON.parse(r),!0}catch{return!1}}function CC(r){return r instanceof Function?r():r}function g0(r,t){for(let e of r)if(t.includes(e))return!0;return!1}function Ds(r,t){const e=r,n=t;return e===void 0||e.length===0||n===void 0||n.length===0?!0:g0(e,n)}function IC(r){const t=setTimeout(()=>{r(),clearTimeout(t)})}function Tu(r){let t=r%360;return t=t<0?360+t:t,t}function m0(r){return Tu(r+180)-180}function Kc(r,t,e){let n=Tu(r),i=Tu(t);Math.abs(n-i)>180&&(n<i?n+=360:i+=360);const s=n*(1-e)+i*e;return m0(s)}function xd(r,t,e,n){return n=n||[0,0,0],n[0]=Kc(r[0],t[0],e),n[1]=Kc(r[1],t[1],e),n[2]=Kc(r[2],t[2],e),n}async function v0(r,t,e="editing"){const n=new d.Destroyable;r.ad(n);const i=t.bind(r);let s=r.viewer;if(s||await new Promise(a=>{n.ad(r.viewerChanged.don(o=>{s=o,a()}))}),!s){console.warn("viewer is undefined!,无法绑定编辑");return}return n.ad(r[`${e}Changed`].don(()=>{var a;r[`${e}`]?i():(a=(r.combinationClass?r.getMainClass():r).editingID)!=null&&a.includes("inner")&&s&&s.stopEditing()})),n.ad(s.editingEvent.don(a=>{if(a.objectIDs.includes(r.id)&&a.type==="end"){const o=r.combinationClass?r.getMainClass():r;o.editingID&&a.editingID.includes(o.editingID)?r[`${e}`]=!1:r[`${e}`]=!o.editingID.includes("outer")}})),r[`${e}`]&&i(),n}function MC(r,t){const{type:e,id:n}=r;if(e){const i=ft.create(e,n);if(i)return i.json=r,i;console.warn(`cannot create sceneObject from type(${e})`)}else console.warn(`cannot create sceneObject from type(${e})`)}function y0(r){const t=r.children&&d.every(r.children,n=>{if(!(n instanceof Or))throw new Error("!(treeItem instanceof SceneTreeItem)");return!n.show})||!1,e=r.sceneTree.getSceneObjectShowFunc(r.sceneObject);return!t||e}class Or extends d.TreeItem{constructor(e,n=!1,i,s,a=!0){super(e,n,i);p(this,"_dragDrop");p(this,"_showChangedNotAffectChildren",!1);p(this,"_showChangedNotAffectParent",!1);p(this,"_type",this.dv(d.react("Unknown")));p(this,"_isExport",this.dv(d.react(!0)));const o=()=>this.tree&&this.tree.itemsChanged.emit([this]);this.dispose(this.nameChanged.disposableOn(o)),this.name=`未命名条目(${this.id})`,this.extras=s,this._isExport.value=a;let l;const u=()=>{l&&(l(),l=void 0)};this.dispose(u),this.dispose(this.sceneObjectChanged.disposableOn(c=>{u(),c&&(l=d.bind([this,"name"],[c,"name"]))})),this.dispose(this.showChanged.disposableOn(c=>{if(e.setSceneObjectShowFunc(this.sceneObject,c),this.tree&&this.tree.forceRedraw(),this.children&&!this._showChangedNotAffectChildren)for(let h of this.children)h instanceof Or&&(h._showChangedNotAffectParent=!0,h.show=c,h._showChangedNotAffectParent=!1);this.parent&&this.parent instanceof Or&&!this._showChangedNotAffectParent&&(this.parent._showChangedNotAffectChildren=!0,this.parent.show=y0(this.parent),this.parent._showChangedNotAffectChildren=!1)})),this.dv(new d.ObjResettingWithEvent(this.sceneObjectChanged,()=>{if(!this.sceneObject)return;const c=new d.Destroyable;if("show"in this.sceneObject&&"showChanged"in this.sceneObject&&this.sceneObject.showChanged instanceof Event){const h=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};h(),c.dispose(this.sceneObject.showChanged.disposableOn(h))}else if("enabled"in this.sceneObject&&"enabledChanged"in this.sceneObject&&this.sceneObject.enabledChanged instanceof Event){const h=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};h(),c.dispose(this.sceneObject.enabledChanged.disposableOn(h))}return c})),this.childrenChangedEvent.disposableOn(()=>{const c=y0(this);this._showChangedNotAffectChildren=!0,this.show=c,this._showChangedNotAffectChildren=!1});{const c=()=>{let h="Unknown";this.sceneObject?h=this.sceneObject.typeName:this.children&&(h="Folder"),this._type.value=h};this.dispose(this.sceneObjectChanged.disposableOn(c)),this.dispose(this.childrenResetedEvent.disposableOn(c)),c()}}get dragDrop(){return this._dragDrop||(this._dragDrop=this.dv(this.sceneTree.createTreeItemDragDropFunc(this))),this._dragDrop}get type(){return this._type.value}get typeChanged(){return this._type.changed}get isExport(){return this._isExport.value}get isExportChanged(){return this._isExport.changed}set isExport(e){this._isExport.value=e}get sceneTree(){return this.tree}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){try{this.json=JSON.parse(e)}catch(n){console.error(`sceneTreeItem.jsonStr error ${n}`,n)}}get json(){const e=this.children&&[...this.children].filter(n=>n.isExport).map(n=>n.json);return{name:this.name,show:this.show?void 0:!1,collapsed:this.uiTreeObject.collapsed?!0:void 0,sceneObj:this.sceneObject&&this.sceneObject.json,children:e,extras:this.extras}}set json(e){if(e.name!==void 0&&(this.name=e.name),this.extras=e.extras,this._showChangedNotAffectChildren=!0,this._showChangedNotAffectParent=!0,this.show=e.show??!0,this._showChangedNotAffectChildren=!1,this._showChangedNotAffectParent=!1,this.uiTreeObject.collapsed=e.collapsed??!1,this.sceneObject=void 0,e.sceneObj&&(this.sceneObject=this.sceneTree.createSceneObjectFunc(e.sceneObj,this)),!!e.children){if(this.resetChildren(!0),!this.children)throw new Error("resetChildren(true) cannot get children!");for(let n of e.children){const i=new Or(this.tree,!0);i.json=n,this.children.push(i)}}}clone(){try{const e=new Or(this.sceneTree,!!this.children,void 0,this.extras,this.isExport);return e.json=this.json,e.name=this.sceneTree.getSceneTreeItemCloneNameFunc(this),e}catch(e){console.error(`SceneTreeItem.clone error: ${e}`,e)}}insertNewTreeItem(e,n){if(e==="FolderInnerOrAfter"||e==="FolderInnerOrBefore"||e==="FolderInner"){if(n&&n.tree!==this.tree)return console.warn("newTreeItem.tree !== this.tree"),!1;do{if(!this.children||e.includes("Or")&&this.sceneObject)break;return n&&this.children.push(n),!0}while(!1);if(e==="FolderInner")return!1;if(e==="FolderInnerOrAfter")return super.insertNewTreeItem("After",n);if(e==="FolderInnerOrBefore")return super.insertNewTreeItem("Before",n);throw new Error("should not be here!")}else return super.insertNewTreeItem(e,n)}}(r=>{r.createDefaultProps=()=>({name:"未命名条目",nameEditing:!1,sceneObject:void 0,show:!0,extras:d.reactJsonWithUndefined(void 0)})})(Or||(Or={})),d.extendClassProps(Or.prototype,Or.createDefaultProps);function _0(r,t,e){let{offsetY:n}=t;if(!t.target||!("clientTop"in t.target))return"none";n+=2,n+=t.target.clientTop;let i="none";return r.children?n<=e*.3?i="before":n>=e*.7?!r.uiTreeObject.collapsed&&r.children.length>0?i="inner":i="after":i="inner":n<=e*.5?i="before":i="after",i}class w0 extends p0{constructor(t){super(),this._treeItem=t;const{dragStartDataManager:e}=this._treeItem.sceneTree;let n="none";const i=this.disposeVar(d.createTimeoutWithStartValues(()=>{this._treeItem.uiTreeObject.moveToPositionMode=n,console.log(`uiTreeObject.moveToPositionMode = lastDragMode(${n});`)},200));function s(a){n!==a&&(n=a,i.restart())}this.dispose(this._dragStartEvent.disposableOn(a=>{e.data={type:"UITreeA",value:this._treeItem}})),this.dispose(this._dragOverEvent.disposableOn(a=>{if(a.dataTransfer){a.preventDefault();do{const o=e;if(!(o.data&&o.data.type==="UITreeA"&&o.data.value!==void 0))break;const l=o.data.value,u=this._treeItem,{tree:c}=u;if(!c)break;const h=[...c.selectedItems];~h.indexOf(l)||h.push(l);const f=_0(u,a,c.itemDivHeight);if(f==="none"||!d.Tree.canMoveToTreeItems(h,u,f))break;a.dataTransfer.dropEffect="move",s(f);return}while(!1);a.dataTransfer.dropEffect="none",s("none")}})),this.dispose(this._dropEvent.disposableOn(a=>{const o=e;if(!(o.data&&o.data.type==="UITreeA"&&o.data.value!==void 0))return;const l=o.data.value,u=this._treeItem,{tree:c}=u;if(!c)return;const h=[...c.selectedItems];~h.indexOf(l)||h.push(l);const f=_0(u,a,c.itemDivHeight);f!=="none"&&d.Tree.canMoveToTreeItems(h,u,f)&&(d.Tree.moveToTreeItems(h,u,f),o.data=void 0,s("none"))})),this.dispose(this._dragLeaveEvent.disposableOn(()=>{n="none",i.restart()}))}}function NC(r){if(!(r instanceof Or))throw new Error("defaultCreateTreeItemDragDrop !(treeItem instanceof SceneTreeItem)");return new w0(r)}function bC(r){let t=!1;do{if(!r)break;"show"in r?t=r.show??!0:"enabled"in r&&(t=r.enabled??!0)}while(!1);return t}function TC(r,t){r&&("show"in r?r.show=t:"enabled"in r&&(r.enabled=t))}const DC=["EnvironmentVariables","ScriptsLoader","SceneScript","ScriptLoader"];function xC(r){const t=[],{root:e={}}=r,n=[e];for(;n.length>0;){const i=n.pop();if(!i)throw new Error("!todo");if(i.children){for(let s of i.children)if(s.children&&n.unshift(s),s.sceneObj){const{type:a=void 0}=s.sceneObj;a||(console.warn("sceneObjJson has no type! treeItem.sceneObj: "),console.warn(s.sceneObj)),a&&DC.includes(a)&&t.push(s.sceneObj)}}}return t}async function OC(r,t){const e=xC(r);let n=0;const i=e.length;for(let s of e)if(++n,t){const a=n/i;t(a,n,i)}}class E0 extends d.Destroyable{constructor(e,n){super();p(this,"treeItemContexMenuCallback");this._sceneTree=e,this._projectManager=n}get sceneTree(){return this._sceneTree}}class AC extends d.Destroyable{constructor(e){super();p(this,"_jsonLoadingEvent",this.disposeVar(new d.Event));p(this,"_setJsonProcessing",this.disposeVar(d.createProcessingFromAsyncFunc(async(e,n)=>{this._jsonLoadingEvent.emit({type:"init"}),this._jsonLoadingEvent.emit({type:"loading"}),n&&await e.promise(this._sceneTree.preloadFunc(n)),this._setJson(n),this._jsonLoadingEvent.emit({type:"loaded"})})));this._sceneTree=e,this._setJsonProcessing.errorFunc=n=>{this._jsonLoadingEvent.emit({type:"error",error:n})}}get jsonLoadingEvent(){return this._jsonLoadingEvent}_setJson(e){try{this._sceneTree.setJson(e||{})}catch(n){console.error(`json数据装配时发生错误!error: ${n}`)}}get json(){return this._sceneTree.getJson()}set json(e){this._setJsonProcessing.restart(new d.CancelError("JSON重新赋值!"),e)}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){this.json=JSON.parse(e)}}function LC(r){return r.name+"_clone"}function Od(r,t,e){if(r instanceof Or)return r.insertNewTreeItem(t,e);{const n={FolderInnerOrAfter:"InnerOrAfter",FolderInnerOrBefore:"InnerOrBefore",FolderInner:"Inner",InnerOrAfter:"InnerOrAfter",InnerOrBefore:"InnerOrBefore",Inner:"Inner",After:"After",Before:"Before"};return r.insertNewTreeItem(n[t],e)}}function RC(r){[r,...r.getDescendants()].forEach(t=>t.destroy())}const cn=class cn extends d.Tree{constructor(e,n,i,s){super(i);p(this,"_jsonLoading",this.disposeVar(new AC(this)));p(this,"createSceneObjectFunc",cn.defaultCreateSceneObjectFunc);p(this,"createTreeItemDragDropFunc",cn.defaultCreateTreeItemDragDropFunc);p(this,"preloadFunc",cn.defaultPreload);p(this,"getSceneObjectShowFunc",cn.defaultGetSceneObjectShow);p(this,"setSceneObjectShowFunc",cn.defaultSetSceneObjectShow);p(this,"getSceneTreeItemCloneNameFunc",cn.defaultGetSceneTreeItemCloneNameFunc);p(this,"debug",!1);p(this,"_contextMenu",this.disposeVar(new E0(this,this.projectManager)));p(this,"_showPropUiOnSelecting",this.disposeVar(d.react(!0)));this._name=e,this._dragStartDataManager=n,this._projectManager=s,this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{var o,l;window.lssn=this.lastSelectedItem,window.lsso=(o=this.lastSelectedItem)==null?void 0:o.sceneObject,this.debug&&console.log(((l=this.lastSelectedItem)==null?void 0:l.sceneObject)??"select null")}));const{sceneObjectsManager:a}=this._projectManager;this.dispose(this.itemsDeleted.disposableOn(o=>{for(let l of o){const u=l,{sceneObject:c}=u;c&&a.deleteSceneObject(c)&&c.destroy()&&Jc(c,void 0);for(let h of u.getDescendants()){const{sceneObject:f}=h;f&&a.deleteSceneObject(f)&&f.destroy()&&Jc(f,void 0)}RC(l)}})),this.dispose(this.itemsAdded.disposableOn(o=>{for(let l of o){const u=l;u.sceneObject&&a.addSceneObject(u.sceneObject)&&Jc(u.sceneObject,u)}})),this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{if(!this.showPropUiOnSelecting)return;this._projectManager.propUiTreeManager.sceneObject=void 0;const{lastSelectedItem:o}=this;o&&(this._projectManager.propUiTreeManager.sceneObject=o.sceneObject)}))}get json(){return this._jsonLoading.json}set json(e){this._jsonLoading.json=e}get jsonStr(){return this._jsonLoading.jsonStr}set jsonStr(e){this._jsonLoading.jsonStr=e}get jsonLoadingEvent(){return this._jsonLoading.jsonLoadingEvent}get name(){return this._name}get projectManager(){return this._projectManager}get contextMenu(){return this._contextMenu}get showPropUiOnSelecting(){return this._showPropUiOnSelecting.value}set showPropUiOnSelecting(e){this._showPropUiOnSelecting.value=e}get showPropUiOnSelectingChanged(){return this._showPropUiOnSelecting.changed}get sceneUiTree(){return this.uiTree}getTreeItemFromSceneObjId(e){const n=this.getDescendants();let i;for(let s of n)if(s.sceneObject&&s.sceneObject.id===e){i=s;break}return i}get dragStartDataManager(){return this._dragStartDataManager}getJson(){return{root:{children:[...this.children].filter(e=>e.isExport).map(e=>e.json)}}}setJson(e){var i;e.root=e.root||{};const n=e.root.children??[];this.root.resetChildren(!0);for(let s of n){const a=new Or(this,!0);a.json=s,(i=this.root.children)==null||i.push(a)}}testAddNewTreeItem(e,n){const i=e||this.lastSelectedItem||this.root;return i?Od(i,n):!1}addNewTreeItem(e,n,i,s){const a=e||this.lastSelectedItem||this.root;if(a&&Od(a,n)){const o=new Or(this,i);if(o.sceneObject=s,!Od(a,n,o))throw new Error("currentTreeItem.insertNewTreeItem return false!");return o}}createSceneObjectTreeItem(e,n,i,s){const a=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,a)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const o=ft.create(e,n);return o?this.addNewTreeItem(i,s??"FolderInnerOrAfter",!0,o):void 0}createGroupTreeItem(e,n,i,s){const a=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,a)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const o=this.addNewTreeItem(i,s??"FolderInnerOrAfter",!0);if(!o){console.warn("addNewTreeItem error!");return}return o.name=e??"未命名组节点",o}createSceneObjectTreeItemFromClass(e,n,i,s){const a=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,a))return;const o=ft.createFromClass(e,n);return o?this.addNewTreeItem(i,a,!0,o):void 0}createSceneObjectTreeItemFromJson(e,n,i){const s=i??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(n,s))return;const a=ft.createFromJson(e);return a?this.addNewTreeItem(n,i??"FolderInnerOrAfter",!0,a):void 0}destroySceneObjectTreeItem(e){if(e===this.root){console.warn("cannot destroy root! please use function destroyAllSceneObjectTreeItems!");return}e.detachFromParent()}destroyAllSceneObjectTreeItems(){if(!this.root.children)return;const e=[...this.root.children];for(let n of e)this.destroySceneObjectTreeItem(n)}};p(cn,"defaultCreateSceneObjectFunc",MC),p(cn,"defaultCreateTreeItemDragDropFunc",NC),p(cn,"defaultPreload",OC),p(cn,"defaultGetSceneObjectShow",bC),p(cn,"defaultSetSceneObjectShow",TC),p(cn,"defaultGetSceneTreeItemCloneNameFunc",LC);let Ah=cn;const Ad={saturation:.35,brightness:1.4,gamma:.8,atmosphereScatteringIntensity:5,groundColor:[0,.09411764705882353,.3137254901960784,1]};class S0 extends d.Tree{constructor(t){super(t)}get propUiTree(){return this.uiTree}}class Ld extends d.TreeItem{constructor(t,e,n){super(t,e),this._property=n}get property(){return this._property}}class Rd extends Ld{constructor(t,e){super(t,!1,e)}}class Fd extends Ld{constructor(t,e){super(t,!0,e)}get groupChildren(){return this.children}}function P0(r,t){const e=new S0(t),n=r.getProperties("chinese"),i=[];for(let s of n)if(s instanceof H){const a=new Fd(e,s);a.d(()=>s.destroy()),e.children.push(a),i.push(a)}else{const a=new Rd(e,s);e.children.push(a),a.d(()=>s.destroy())}for(;i.length>0;){const s=i.pop();if(!s)throw new Error("should not be here!");const a=s;if(!(a.property instanceof H))throw new Error("!(treeItem.property instanceof GroupProperty)");for(let o of a.property.children)if(o instanceof H){const l=new Fd(e,o);l.d(()=>o.destroy()),a.groupChildren.push(l),i.push(l)}else{const l=new Rd(e,o);a.groupChildren.push(l),l.d(()=>o.destroy())}}return e.d(()=>{e.itemChildrenChanged.reset(),e.itemChildrenToChange.reset();const s=[...e.getDescendants()];s.forEach(a=>{a.children&&(a.children.length=0),a.destroy()}),s.length=0}),e}class Du extends d.Destroyable{constructor(e){super();p(this,"_propTreeReact",this.dv(d.react(void 0)));this.d(()=>this._propTreeReact.value=void 0),this.dv(new d.ObjResettingWithEvent(this.sceneObjectChanged,n=>{if(!n)return;const i=new d.Destroyable;return i.d(n.toDestroyEvent.don(()=>{this.sceneObject=void 0})),i})),this.d(this.sceneObjectChanged.don(n=>{this._propTreeReact.value=void 0,!(!n||!(n instanceof ft))&&(this._propTreeReact.value=P0(n,e))}))}get propTree(){return this._propTreeReact.value}get propTreeChanged(){return this._propTreeReact.changed}}(r=>{r.createDefaultProps=()=>({sceneObject:void 0})})(Du||(Du={})),d.extendClassProps(Du.prototype,Du.createDefaultProps);function FC(r,t,e,n=!0){n&&e(),r.dispose(t.disposableOn(e))}class GC extends d.Destroyable{constructor(e,n,i,s){super();p(this,"_sceneObjectId",this.dv(new d.SceneObjectWithId));this._id=e,this._startTimeStamp=n,this._duration=i,this._parent=s,this._sceneObjectId.id=this._id;const a=()=>{if(!this.player)return;const{currentTime:o=0}=this._parent,l=o-this._startTimeStamp;this.player.currentTime=d.clamp(l,0,this._duration)*(this.player.speed??1)};a(),this.d(this._parent.currentTimeChanged.don(a)),this.d(this.playerChanged.don(a))}get player(){return this._sceneObjectId.sceneObject instanceof bi?this._sceneObjectId.sceneObject:void 0}get playerChanged(){return this._sceneObjectId.sceneObjectChanged}}const kC=`
|
|
31
31
|
用来配置子播放器,它是一个数组形式,数组的每个元素仍然是一个数组,形式是[子播放器的ID, 起始时间, 持续时间]。
|
|
32
32
|
注意时间的单位是毫秒。
|
|
33
33
|
示例如下:
|
|
@@ -45,7 +45,7 @@ northing meters`+r;var f=h/2,g=0,m=0,_,E,M,y,w;return f>0&&(_=1e5/Math.pow(10,f)
|
|
|
45
45
|
]
|
|
46
46
|
]
|
|
47
47
|
\`\`\`
|
|
48
|
-
`,vr=class vr extends d.Destroyable{constructor(){super();p(this,"_ratio",this.dv(d.react(0)));p(this,"_subPlayers",this.dv(new d.ObservableArray));const e=this.dv(new d.Player);{const a=()=>{e.loop=this.loop??vr.defaults.loop};a(),this.d(this.loopChanged.don(a))}{const a=()=>{(this.loop??vr.defaults.loop)!==e.loop&&(this.loop=e.loop)};a(),this.d(e.loopChangedEvent.don(a))}{const a=()=>{e.currentTime=this.currentTime??vr.defaults.currentTime};a(),this.d(this.currentTimeChanged.don(a))}{const a=()=>{(this.currentTime??vr.defaults.currentTime)!==e.currentTime&&(this.currentTime=e.currentTime)};a(),this.d(e.currentTimeChangedEvent.don(a))}{const a=()=>{e.duration=this.duration??vr.defaults.duration};a(),this.d(this.durationChanged.don(a))}{const a=()=>{(this.duration??vr.defaults.duration)!==e.duration&&(this.duration=e.duration)};a(),this.d(e.durationChangedEvent.don(a))}{const a=()=>{e.speed=this.speed??vr.defaults.speed};a(),this.d(this.speedChanged.don(a))}{const a=()=>{(this.speed??vr.defaults.speed)!==e.speed&&(this.speed=e.speed)};a(),this.d(e.speedChangedEvent.don(a))}{const a=()=>{e.playing=this.playing??vr.defaults.playing};a(),this.d(this.playingChanged.don(a))}{const a=()=>{(this.playing??vr.defaults.playing)!==e.playing&&(this.playing=e.playing)};a(),this.d(e.playingChangedEvent.don(a))}const n=()=>{const a=this.duration??vr.defaults.duration;a>0&&(this._ratio.value=(this.currentTime??vr.defaults.currentTime)/a)};n();const i=this.dv(d.createNextAnimateFrameEvent(this.currentTimeChanged,this.durationChanged));this.d(i.don(n)),this.d(()=>{const{length:a}=this._subPlayers;for(let o=0;o<a;++o)this._subPlayers.get(o).destroy();this._subPlayers.length=0});const s=()=>{for(let o of this._subPlayers)o.destroy();if(this._subPlayers.length=0,!this.channels)return;const a=this.channels.map(o=>{const[l,u,c]=o;return new GC(l,u,c,this)});this._subPlayers.splice(0,0,...a)};s(),this.d(this.channelsChanged.don(s))}get ratio(){return this._ratio.value}set ratio(e){Math.abs(this._ratio.value-e)<.001||(this.currentTime=(this.duration??vr.defaults.duration)*e)}get ratioChanged(){return this._ratio.changed}};p(vr,"defaults",{loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:!0,ratio:0}),p(vr,"channelsReadMe",kC);let bi=vr;(r=>{r.createDefaultProps=()=>({loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:d.reactDeepArrayWithUndefined(void 0,(t,e)=>t==null?void 0:t.every((n,i)=>n===e[i]),t=>[...t])})})(bi||(bi={})),d.extendClassProps(bi.prototype,bi.createDefaultProps);class Gd extends d.Destroyable{constructor(e){super();p(this,"_sceneObject",this.dv(d.react(void 0)));this._id=e,this.d(()=>{this._sceneObject.value=void 0});const n=ft.getSceneObjById(this._id);n&&(this._sceneObject.value=n),this.d(ft.context.sceneObjCreatedEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=i)})),this.d(ft.context.sceneObjToDestroyEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=void 0)}))}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}get id(){return this._id}}class zC extends d.Destroyable{constructor(e,n){super();p(this,"_sofi");this._id=e,this._sofi=this.dv(new Gd(this._id));{const i=()=>{n.sceneObject=this._sofi.sceneObject};i(),this.d(this._sofi.sceneObjectChanged.don(i))}}}class VC extends d.Destroyable{constructor(){super();p(this,"_id",this.dv(d.react(void 0)));p(this,"_sceneObject",this.dv(d.react(void 0)));p(this,"_resetting",this.dv(new d.ObjResettingWithEvent(this.idChanged,()=>{const{id:e}=this;if(e===void 0||e===""){this.sceneObject=void 0;return}return new zC(e,this)})))}get id(){return this._id.value}get idChanged(){return this._id.changed}set id(e){this._id.value=e}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}set sceneObject(e){this._sceneObject.value=e}get resetting(){return this._resetting}}class UC extends d.Destroyable{constructor(t,e,n,i){super(),this.disposeVar(new d.ObjResettingWithEvent(t.sceneObjectChanged,()=>{let s;i.debug&&console.log("正在获取Event事件...");do{const a=t.sceneObject;if(!a||!e)break;const o=e.split(".");if(o.length===0){i.debug&&console.warn("propNames.length === 0");break}let l=d.pluckProperty(a,!1,...o);if((!l||!(l instanceof d.Event))&&(o[o.length-1]=o[o.length-1]+"Changed",i.debug&&console.warn(`event未能获取,那么将属性名的最后一项加上Changed(${o[o.length-1]})再试试!`),l=d.pluckProperty(a,!1,...o),i.debug&&l&&console.warn("event仍然获取不到!")),!l){i.debug&&console.warn(`cannot get changed from ${a.id}-${a.name}-${a.ref}-${e}`);break}if(!(l instanceof d.Event)){i.debug&&console.warn(`the prop is not event from ${a.id}-${a.name}-${a.ref}-${e}`);break}s=l,i.debug&&console.log(`Event获取成功 propChangedName: ${e}`,s)}while(!1);if(s){const a=new d.Destroyable;return a.d(s.dwon(()=>n.emit())),a}else{i.debug&&console.log(`未获取到Event!propChangedName: ${e}`);return}}))}}let qC=class extends d.Destroyable{constructor(e,n,i){super();p(this,"_doEvalEvent",this.dv(new d.Event));const s=this._doEvalEvent,a=this.disposeVar(d.createNextAnimateFrameEvent(s)),o=e.map(([l,u])=>{const c=new Gd(l),h=u&&new UC(c,u,s,n)||void 0;return[c,h]});this.d(()=>{o.forEach(([l,u])=>{u==null||u.destroy(),l.destroy()}),o.length=0}),this.d(s.don(()=>{const{evalMode:l="NextAnimateFrame",evalOnlyWhenObjsAllExist:u=!0}=n;if(l==="Immediate"){const c=o.map(([h])=>h.sceneObject);(!u||c.every(h=>h!==void 0))&&i(c)}})),this.d(a.don(()=>{const{evalMode:l="NextAnimateFrame",evalOnlyWhenObjsAllExist:u=!0}=n;if(l==="NextAnimateFrame"){const c=o.map(([h])=>h.sceneObject);(!u||c.every(h=>h!==void 0))&&i(c)}}))}forceExecute(){this._doEvalEvent.emit()}};const C0=Object.freeze(Object.defineProperty({__proto__:null,WatcherObjects:qC},Symbol.toStringTag,{value:"Module"})),{WatcherObjects:WC}=C0;class Lh extends d.Destroyable{constructor(){super();p(this,"_evalFunc");p(this,"_forceExecute",new d.Event);const e=this.dv(d.react(void 0)),n=()=>{try{e.value=this.evalFuncStr&&Function('"use strict";return ('+this.evalFuncStr+")")(),this.debug&&console.log("evalFunc成功构建",e.value)}catch(a){console.error(`evalFunc get error! ${a}`),e.value=void 0}};n(),this.dispose(this.evalFuncStrChanged.disposableOn(n));const i=a=>{this.enabled&&(this.debug&&console.log("执行evalFunc..."),this._evalFunc&&this._evalFunc(a),e.value&&e.value(a))},s=this.disposeVar(new d.ObjResettingWithEvent(this.objIdAndPropChangedNamesChanged,()=>{if(this.objIdAndPropChangedNames.length>0)return this.debug&&console.log("监视对象发生变化,重新创建WatcherObjects"),new WC(this.objIdAndPropChangedNames,this,i)}));this.dispose(this._forceExecute.disposableOn(()=>{var a;(a=s.obj)==null||a.forceExecute()}))}get evalFunc(){return this._evalFunc}set evalFunc(e){this._evalFunc=e}forceExecute(){this._forceExecute.emit()}}(r=>{r.createDefaultProps=()=>({enabled:!1,objIdAndPropChangedNames:d.reactDeepArray([],(t,e)=>t[0]===e[0]&&t[1]===e[1],t=>[t[0],t[1]]),evalFuncStr:"",evalMode:"NextAnimateFrame",evalOnlyWhenObjsAllExist:!0,debug:!1,name:"未命名场景对象",ref:void 0,extras:d.reactJson(void 0),devTags:d.reactArrayWithUndefined(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})})(Lh||(Lh={})),d.extendClassProps(Lh.prototype,Lh.createDefaultProps);function HC(r,t,e){var i;((i=t.viewer)==null?void 0:i.getEngineObject(t))?e.call(r):r.dispose(t.createdEvent.don(()=>e.call(r)))}const le=class le extends ft{constructor(e){super(e);p(this,"_editing",this.dv(d.react(!1)));p(this,"editingID");p(this,"editingBindMode","singlePoint");p(this,"_deprecated",[]);p(this,"_flyInEvent",this.dv(new d.Event));p(this,"_flyToEvent",this.dv(new d.Event));p(this,"_flyOverEvent",this.disposeVar(new d.Event));p(this,"_pickedEvent",this.dv(new d.Event));p(this,"_calcFlyToParamEvent",this.dv(new d.Event));p(this,"_calcFlyInParamEvent",this.dv(new d.Event));p(this,"useCalcFlyToParamInESObjectWithLocation",!1);v0(this,this.updateEditing)}supportEditingModes(){return this.constructor.supportEditingModes}get editing(){return this._editing.value}set editing(e){this._editing.value=e}get editingChanged(){return this._editing.changed}updateEditing(){}_deprecatedWarning(){const e=this._deprecated;for(let n=0;n<e.length;n++){const i=e[n];typeof i=="string"?Reflect.has(this,i+"Changed")&&this.d(this[i+"Changed"].don(()=>{console.warn(`注意:${this.typeName} 的 ${i} 属性下版本将会被移除!`)})):Object.keys(i).forEach(s=>{Reflect.has(this,s+"Changed")&&this.d(this[s+"Changed"].don(o=>{const l=i[s];typeof l=="string"?console.warn(`注意:${this.typeName} 的 ${s} 属性下版本将会被移除!`):Object.keys(l).forEach(u=>{o===u&&console.warn(`注意:${this.typeName} 的 ${s} 属性值 ${u} 下版本将会被移除,推荐使用属性值 ${l[u]}`)})}))})}}get flyInEvent(){return this._flyInEvent}flyIn(e=1){this._flyInEvent.emit(e,le._lastFlyInId)}get flyToEvent(){return this._flyToEvent}flyTo(e=1){this._flyToEvent.emit(e,le._lastFlyToId)}get flyOverEvent(){return this._flyOverEvent}get pickedEvent(){return this._pickedEvent}get calcFlyToParamEvent(){return this._calcFlyToParamEvent}calcFlyToParam(){this._calcFlyToParamEvent.emit()}get calcFlyInParamEvent(){return this._calcFlyInParamEvent}calcFlyInParam(){this._calcFlyInParamEvent.emit()}emptyFlyToParam(){this.flyToParam=void 0}emptyFlyInParam(){this.flyInParam=void 0}async getBoundSphere(e){return await e.getBoundSphere(this.id)}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"general",general:[...e.general,new nt("唯一标识","id",!1,!0,[this,"id"]),new nt("名称","name",!0,!1,[this,"name"]),new U("是否显示","show",!1,!1,[this,"show"],le.defaults.show),new U("开启碰撞","collision",!1,!1,[this,"collision"],le.defaults.collision),new U("允许拾取","allowPicking",!1,!1,[this,"allowPicking"],le.defaults.allowPicking),new mt("保存观察视角","保存当前flyToParam",[],()=>this.calcFlyToParam(),[]),new mt("清空飞向参数","清空飞向参数",[],()=>this.emptyFlyToParam(),[]),new mt("清空飞入参数","清空飞入参数",[],()=>this.emptyFlyInParam(),[]),new mt("保存飞入参数","保存飞入参数flyInParam",[],()=>this.calcFlyInParam(),[])]}}getProperties(e){return[...super.getProperties(e),new H("ESVisualObject","ESVisualObject",[new U("是否显示","是否显示.",!1,!1,[this,"show"],le.defaults.show),new U("是否开启碰撞监测","collision,是否开启碰撞监测.",!1,!1,[this,"collision"],le.defaults.collision),new U("是否允许拾取","是否允许被鼠标点击拾取.",!1,!1,[this,"allowPicking"],le.defaults.allowPicking),new H("飞行定位","飞向参数",[new mt("飞向","飞向",["number"],n=>this.flyTo(n),[1]),new Y("flyToParam","flyToParam",!0,!1,[this,"flyToParam"],le.defaults.flyToParam),new mt("获取当前参数","获取当前flyToParam",[],()=>this.calcFlyToParam(),[]),new C("flyToDistance","flyToDistance",!0,!1,[this,"flyToDistance"],le.defaults.flyToParam.distance),new C("flyToHeading","flyToHeading",!0,!1,[this,"flyToHeading"],le.defaults.flyToParam.heading),new C("flyToPitch","flyToPitch",!0,!1,[this,"flyToPitch"],le.defaults.flyToParam.pitch),new C("flyToFlyDuration","flyToFlyDuration",!0,!1,[this,"flyToFlyDuration"],le.defaults.flyToParam.flyDuration),new C("flyToHDelta","flyToHDelta",!0,!1,[this,"flyToHDelta"],le.defaults.flyToParam.hDelta),new C("flyToPDelta","flyToPDelta",!0,!1,[this,"flyToPDelta"],le.defaults.flyToParam.pDelta)]),new H("飞入定位","飞入参数",[new mt("飞入","飞入",["number"],n=>this.flyIn(n),[1]),new Y("flyInParam","flyInParam",!0,!1,[this,"flyInParam"],le.defaults.flyInParam),new mt("获取当前相机参数","获取当前相机参数",[],()=>this.calcFlyInParam(),[])])])]}get flyToDistance(){return this.flyToParam&&this.flyToParam.distance}get flyToHeading(){return this.flyToParam&&this.flyToParam.heading}get flyToPitch(){return this.flyToParam&&this.flyToParam.pitch}get flyToFlyDuration(){return this.flyToParam&&this.flyToParam.flyDuration}get flyToHDelta(){return this.flyToParam&&this.flyToParam.hDelta}get flyToPDelta(){return this.flyToParam&&this.flyToParam.pDelta}get flyToDistanceChanged(){return this.flyToParamChanged}get flyToHeadingChanged(){return this.flyToParamChanged}get flyToPitchChanged(){return this.flyToParamChanged}get flyToFlyDurationChanged(){return this.flyToParamChanged}get flyToHDeltaChanged(){return this.flyToParamChanged}get flyToPDeltaChanged(){return this.flyToParamChanged}set flyToDistance(e){this.flyToParam=e!==void 0?{...this.flyToParam??le.defaults.flyToParam,distance:e}:void 0}set flyToHeading(e){this.flyToParam=e!==void 0?{...this.flyToParam??le.defaults.flyToParam,heading:e}:void 0}set flyToPitch(e){this.flyToParam=e!==void 0?{...this.flyToParam??le.defaults.flyToParam,pitch:e}:void 0}set flyToFlyDuration(e){this.flyToParam=e!==void 0?{...this.flyToParam??le.defaults.flyToParam,flyDuration:e}:void 0}set flyToHDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??le.defaults.flyToParam,hDelta:e}:void 0}set flyToPDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??le.defaults.flyToParam,pDelta:e}:void 0}};p(le,"supportEditingModes",[]),p(le,"_lastFlyInId",0),p(le,"_lastFlyToId",0),p(le,"defaults",{...ft.defaults,show:!0,collision:!0,allowPicking:!1,flyToParam:{distance:0,heading:0,pitch:0,flyDuration:1,hDelta:0,pDelta:0},flyInParam:{position:[0,0,0],rotation:[0,0,0],flyDuration:1}});let Ot=le;(r=>{r.createDefaultProps=()=>({...ft.createDefaultProps(),show:!0,collision:!0,allowPicking:!1,flyToParam:d.reactJsonWithUndefined(void 0),flyInParam:d.reactJsonWithUndefined(void 0)})})(Ot||(Ot={})),d.extendClassProps(Ot.prototype,Ot.createDefaultProps);function I0(r){let t=0;function e(n,i){i++,t=Math.max(i,t),n.forEach(s=>{Array.isArray(s)&&e(s,i)})}return e(r,0),t}const Gh=class Gh extends Ot{constructor(e){super(e);p(this,"editingBindMode","lineString");p(this,"_area",this.dv(d.react(0)));p(this,"_perimeter",this.dv(d.react(0)));const n=()=>{this._updateArea(),this._updatePerimeter()};n(),this.d(this.pointsChanged.don(n))}updateEditing(){var n;const e=[];do{if(this.editingBindMode=="doublePoints"){e.push(vt.DoublePointsAppend,vt.DoublePointsModify);break}if(this.editingBindMode=="lineString"){e.push(vt.LineStringAppend,vt.LineStringInsert,vt.Translation);break}if(this.editingBindMode=="circular"){e.push(vt.CircularAppend,vt.CircularInsert,vt.Translation),this.supportEditingModes().includes(vt.HeightModify)&&e.push(vt.HeightModify);break}if(this.editingBindMode=="visibility"){e.push(vt.VisibilityAppend,vt.VisibilityModify);break}}while(!1);(n=this.viewer)==null||n.startEditing(this,e,{callSource:"inner"})}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}_updateArea(){this._area.value=this.getArea()??0}_updatePerimeter(){this._perimeter.value=this.getPerimeter()??0}getArea(){if(this.points&&this.points.length>=3)return ld([...this.points])}getDistance(){if(this.points&&this.points.length>=2){const e=Oh(this.points,"GEODESIC");return e[e.length-1]}else return}getPerimeter(){if(this.points&&this.points.length>=3){const e=[...this.points,this.points[0]],n=Oh(e,"GEODESIC");return n[n.length-1]}else return}getIntersect(e){if(this.points&&this.points.length>=3&&e.length>=3){const n=cm(this.points,e);if(!n)return;const i=n[0][0][0];if(Array.isArray(i)){const s=[...n],a=[];return s.forEach(o=>{const l=o[0].map(u=>[...u,0]);a.push(l)}),a}else return[[...n][0].map(o=>[...o,0])]}else return}getUnion(e){if(this.points&&this.points.length>=3&&e.length>=3){const n=fm(this.points,e);if(!n)return;const i=n[0][0][0];if(Array.isArray(i)){const s=[...n],a=[];return s.forEach(o=>{const l=o[0].map(u=>[...u,0]);a.push(l)}),a}else return[[...n][0].map(o=>[...o,0])]}else return}getDifference(e){if(this.points&&this.points.length>=3&&e.length>=3){let n=[...e];const i=e[0],s=e[e.length-1];i[0]===s[0]&&i[1]===s[1]&&i[2]===s[2]||n.push(i);const a=pm([...this.points,this.points[0]],[...n]);if(!a)return{status:"undefined",positions:void 0};const o=[...a];if(I0(o)===3){const l=o.map(f=>f.map(g=>[...g,0]));if(l.length<=1)return{status:"notIncluded",positions:l};const u=l[0],c=l[1];return hd([...u],[...c])==="oneBig"?{status:"included",positions:l}:{status:"notIncluded",positions:l}}else if(I0(o)===4){const u=[...o.map(h=>h.map(f=>f.map(g=>[...g,0])))],c=[];return u.forEach(h=>{c.push(h[0])}),{status:"notIncluded",positions:c}}else return{status:"undefined",positions:void 0}}else return{status:"undefined",positions:void 0}}getBuffer(e=500,n){if(this.points&&this.points.length>=2){const i=dm(this.points,e,n);return i?[i[0].map(s=>[...s,0])]:void 0}else return}geoPolygonOverlap(e){if(this.points&&this.points.length>=3&&e.length>=3){const n=hd(this.points,e);return n==="oneBig"?!0:n==="twoBig"?!1:void 0}else return}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",coordinate:[...e.coordinate,new U("编辑","编辑",!1,!1,[this,"editing"],!1),new Y("位置数组","位置数组(经纬高数组)",!0,!1,[this,"points"],Gh.defaults.points)],style:[...e.style,new H("点样式","点样式集合",[]),new U("开启","开启点样式",!1,!1,[this,"pointed"],!1),new C("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new tt("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new it("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new H("线样式","线样式集合",[]),new U("开启","开启线样式",!1,!1,[this,"stroked"],!0),new U("贴地","是否贴地",!1,!1,[this,"strokeGround"],!1),new C("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new tt("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new it("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new H("面样式","面样式集合",[]),new U("开启","开启填充样式",!1,!1,[this,"filled"],!1),new U("贴地","是否贴地",!1,!1,[this,"fillGround"],!1),new it("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1])]}}getProperties(e){return[...super.getProperties(e),new H("ESGeoVector","ESGeoVector",[new U("是否编辑","是否编辑",!1,!1,[this,"editing"]),new Y("位置数组","位置数组(经纬高数组)",!1,!1,[this,"points"]),new H("点样式","点样式",[new U("开启点样式","开启点样式",!1,!1,[this,"pointed"]),new C("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"]),new tt("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]]),new it("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"]),new nt("点材质","点材质(pointMaterial)",!1,!1,[this,"pointMaterial"]),new Y("点材质参数","点材质参数(pointMaterialParams)",!1,!1,[this,"pointMaterialParams"])]),new H("线样式","线样式",[new U("开启线样式","开启线样式",!1,!1,[this,"stroked"]),new C("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"]),new tt("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]]),new it("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"]),new nt("线材质","线材质(strokeMaterial)",!1,!1,[this,"strokeMaterial"]),new Y("线材质参数","线材质参数(strokeMaterialParams)",!1,!1,[this,"strokeMaterialParams"]),new U("是否贴地","是否贴地",!1,!1,[this,"strokeGround"])]),new H("填充样式","填充样式",[new U("开启填充样式","开启填充样式",!1,!1,[this,"filled"]),new it("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"]),new nt("面材质","面材质(fillMaterial)",!1,!1,[this,"fillMaterial"]),new Y("面材质参数","面材质参数(fillMaterialParams)",!1,!1,[this,"fillMaterialParams"]),new U("是否贴地","是否贴地",!1,!1,[this,"fillGround"])])])]}get pointSize(){return this.pointStyle.size}set pointSize(e){this.pointStyle={...this.pointStyle,size:e}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(e){this.pointStyle={...this.pointStyle,sizeType:e}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(e){this.pointStyle={...this.pointStyle,color:[...e]}}get pointColorChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(e){this.pointStyle={...this.pointStyle,material:e}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(e){this.pointStyle={...this.pointStyle,materialParams:e}}get pointMaterialParamsChanged(){return this.pointStyleChanged}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}};p(Gh,"supportEditingModes",[...Ot.supportEditingModes,vt.Translation]),p(Gh,"defaults",{...Ot.defaults,points:[],pointStyle:{size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{}},strokeStyle:{width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1},fillStyle:{color:[1,1,1,1],material:"",materialParams:{},ground:!1},pointed:!1,stroked:!1,filled:!1});let Et=Gh;(r=>{r.createDefaultProps=()=>({...Ot.createDefaultProps(),pointed:!1,pointStyle:d.reactJson(r.defaults.pointStyle),stroked:!1,strokeStyle:d.reactJson(r.defaults.strokeStyle),filled:!1,fillStyle:d.reactJson(r.defaults.fillStyle),points:d.reactPositions(void 0)})})(Et||(Et={})),d.extendClassProps(Et.prototype,Et.createDefaultProps);class $ extends Ot{constructor(){super(...arguments);p(this,"_statusDis",this.dv(d.react(!0)));p(this,"_smoothMoveEvent",this.dv(new d.Event));p(this,"_smoothMoveWithRotationEvent",this.dv(new d.Event));p(this,"_smoothMoveOnGroundEvent",this.dv(new d.Event));p(this,"_smoothMoveWithRotationOnGroundEvent",this.dv(new d.Event));p(this,"_automaticLandingEvent",this.dv(new d.Event));p(this,"_smoothMoveKeepPitchEvent",this.dv(new d.Event));p(this,"_smoothMoveRelativelyEvent",this.dv(new d.Event));p(this,"_smoothMoveRelativelyWithRotationEvent",this.dv(new d.Event));p(this,"useCalcFlyToParamInESObjectWithLocation",!0)}updateEditing(){var n;const e=[];do{if(this.editingBindMode=="singlePoint"){e.push(vt.Place,vt.Translation),["ESLocationMeasurement"].includes(this.typeName)||e.push(vt.Rotation),["ESClippingPlane","ESLocationMeasurement","ESLocalRectangle","ESBoxClipping"].includes(this.typeName)||e.push(vt.Scale);break}if(this.editingBindMode=="doublePoints"){e.push(vt.DoublePointsAppend,vt.DoublePointsModify);break}}while(!1);(n=this.viewer)==null||n.startEditing(this,e,{callSource:"inner"})}get statusDis(){return this._statusDis.value}get statusDisChanged(){return this._statusDis.changed}get smoothMoveEvent(){return this._smoothMoveEvent}smoothMove(e,n){this._smoothMoveEvent.emit(e,n)}get smoothMoveWithRotationEvent(){return this._smoothMoveWithRotationEvent}smoothMoveWithRotation(e,n,i){this._smoothMoveWithRotationEvent.emit(e,n,i)}get smoothMoveOnGroundEvent(){return this._smoothMoveOnGroundEvent}smoothMoveOnGround(e,n,i,s){this._smoothMoveOnGroundEvent.emit(e,n,i,s)}get smoothMoveWithRotationOnGroundEvent(){return this._smoothMoveWithRotationOnGroundEvent}smoothMoveWithRotationOnGround(e,n,i,s,a){this._smoothMoveWithRotationOnGroundEvent.emit(e,n,i,s,a)}get automaticLandingEvent(){return this._automaticLandingEvent}automaticLanding(){const e=this.collision;this.collision=!1,setTimeout(()=>{this._automaticLandingEvent.emit(e)},100)}get smoothMoveKeepPitchEvent(){return this._smoothMoveKeepPitchEvent}smoothMoveKeepPitch(e,n){this._smoothMoveKeepPitchEvent.emit(e,n)}get smoothMoveRelativelyEvent(){return this._smoothMoveRelativelyEvent}smoothMoveRelatively(e,n){this._smoothMoveRelativelyEvent.emit(e,n)}get smoothMoveRelativelyWithRotationEvent(){return this._smoothMoveRelativelyWithRotationEvent}smoothMoveRelativelyWithRotation(e,n,i){this._smoothMoveRelativelyWithRotationEvent.emit(e,n,i)}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",location:[...e.location,new U("是否编辑","是否编辑",!1,!1,[this,"editing"]),new mt("自动落地","自动落地",[],()=>this.automaticLanding(),[]),new li("位置数组","经度,纬度,高度,度为单位",!1,!1,[this,"position"],[0,0,0]),new Jh("姿态数组","偏航角,俯仰角,翻转角,度为单位",!1,!1,[this,"rotation"],[0,0,0]),new Qe("缩放","缩放",!1,!1,[this,"scale"],[1,1,1]),new C("最小可见距离","单位米",!1,!1,[this,"minVisibleDistance"],0),new C("最大可见距离","单位米",!1,!1,[this,"maxVisibleDistance"],0)]}}getProperties(e){return[...super.getProperties(e),new H("位置姿态对象","位置姿态对象ESObjectWithLocation",[new mt("平滑移动","smoothMove",["numbers","number"],(n,i)=>this.smoothMove(n,i),[[0,0,0],0]),new mt("固定方向平滑移动","smoothMoveKeepPitch",["numbers","number"],(n,i)=>this.smoothMoveKeepPitch(n,i),[[0,0,0],0]),new mt("平滑偏移","smoothMoveWithRotation",["numbers","numbers","number"],(n,i,s)=>this.smoothMoveWithRotation(n,i,s),[[0,0,0],[0,0,0],0]),new mt("贴地平滑移动","smoothMoveOnGround",["number","number","number","string"],(n,i,s,a)=>this.smoothMoveOnGround(n,i,s,a),[0,0,0,""]),new mt("贴地平滑偏移","smoothMoveWithRotationOnGround",["numbers","number","number","number","string"],(n,i,s,a,o)=>this.smoothMoveWithRotationOnGround(n,i,s,a,o),[[0,0,0],0,0,0,""]),new mt("smoothMoveRelatively","smoothMoveRelatively",["numbers","number"],(n,i)=>this.smoothMoveRelatively(n,i),[[0,0,0],0]),new mt("smoothMoveRelativelyWithRotation","smoothMoveRelativelyWithRotation",["numbers","numbers","number"],(n,i,s)=>this.smoothMoveRelativelyWithRotation(n,i,s),[[0,0,0],[0,0,0],0]),new li("位置数组","经度,纬度,高度,度为单位",!1,!1,[this,"position"]),new Jh("姿态数组","偏航角,俯仰角,翻转角,度为单位",!1,!1,[this,"rotation"]),new Qe("缩放","缩放",!1,!1,[this,"scale"]),new U("是否编辑","是否开启编辑状态",!0,!1,[this,"editing"],!1),new C("最小可见距离","单位米",!1,!1,[this,"minVisibleDistance"]),new C("最大可见距离","单位米",!1,!1,[this,"maxVisibleDistance"]),new U("是否应用距离显隐","是否应用距离显隐",!1,!1,[this,"enableVisibleDistance"])])]}}p($,"supportEditingModes",[...Ot.supportEditingModes,vt.Place,vt.Translation,vt.Rotation,vt.Scale,vt.DoublePointsAppend,vt.DoublePointsModify]),p($,"defaults",{...Ot.defaults}),(r=>{r.createDefaultProps=()=>({...Ot.createDefaultProps(),position:d.reactArray([0,0,0]),rotation:d.reactArray([0,0,0]),scale:d.reactArray([1,1,1]),minVisibleDistance:d.react(0),maxVisibleDistance:d.react(0)})})($||($={})),d.extendClassProps($.prototype,$.createDefaultProps);class Ti extends ${getESProperties(){const t={...super.getESProperties()};return{...t,style:[...t.style,new H("点样式","点样式集合",[]),new U("开启点样式","开启点样式",!1,!1,[this,"pointed"],!1),new C("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new tt("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new it("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new H("线样式","线样式集合",[]),new U("开启线样式","开启线样式",!1,!1,[this,"stroked"],!1),new U("是否贴地(线)","是否贴地(线)",!1,!1,[this,"strokeGround"],!1),new C("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new tt("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new it("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new H("面样式","面样式集合",[]),new U("开启填充样式","开启填充样式",!1,!1,[this,"filled"],!1),new U("是否贴地","是否贴地",!1,!1,[this,"fillGround"],!1),new it("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1])]}}getProperties(t){return[...super.getProperties(t),new H("ESLocalVector","ESLocalVector",[new Y("点样式","点样式(pointMaterialParams)",!1,!1,[this,"pointStyle"]),new Y("线样式","线样式(strokeMaterialParams)",!1,!1,[this,"strokeStyle"]),new Y("填充样式","填充样式(fillMaterialParams)",!1,!1,[this,"fillStyle"]),new H("点样式","点样式",[new U("开启点样式","开启点样式",!1,!1,[this,"pointed"]),new C("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"]),new tt("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]]),new it("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"]),new nt("点材质","点材质(pointMaterial)",!1,!1,[this,"pointMaterial"]),new Y("点材质参数","点材质参数(pointMaterialParams)",!1,!1,[this,"pointMaterialParams"])]),new H("线样式","线样式",[new U("开启线样式","开启线样式",!1,!1,[this,"stroked"]),new C("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"]),new tt("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]]),new it("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"]),new nt("线材质","线材质(strokeMaterial)",!1,!1,[this,"strokeMaterial"]),new Y("线材质参数","线材质参数(strokeMaterialParams)",!1,!1,[this,"strokeMaterialParams"]),new U("是否贴地(线)","是否贴地(线)",!1,!1,[this,"strokeGround"],!1)]),new H("填充样式","填充样式",[new U("开启填充样式","开启填充样式",!1,!1,[this,"filled"]),new it("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"]),new nt("面材质","面材质(fillMaterial)",!1,!1,[this,"fillMaterial"]),new Y("面材质参数","面材质参数(fillMaterialParams)",!1,!1,[this,"fillMaterialParams"]),new U("是否贴地","是否贴地",!1,!1,[this,"fillGround"])])])]}get pointSize(){return this.pointStyle.size}set pointSize(t){this.pointStyle={...this.pointStyle,size:t}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(t){this.pointStyle={...this.pointStyle,sizeType:t}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(t){this.pointStyle={...this.pointStyle,color:[...t]}}get pointColorChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(t){this.pointStyle={...this.pointStyle,material:t}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(t){this.pointStyle={...this.pointStyle,materialParams:t}}get pointMaterialParamsChanged(){return this.pointStyleChanged}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(t){this.strokeStyle={...this.strokeStyle,width:t}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(t){this.strokeStyle={...this.strokeStyle,widthType:t}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(t){this.strokeStyle={...this.strokeStyle,color:[...t]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(t){this.strokeStyle={...this.strokeStyle,material:t}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(t){this.strokeStyle={...this.strokeStyle,materialParams:t}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(t){this.strokeStyle={...this.strokeStyle,ground:t}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(t){this.fillStyle={...this.fillStyle,color:[...t]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(t){this.fillStyle={...this.fillStyle,material:t}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(t){this.fillStyle={...this.fillStyle,materialParams:t}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(t){this.fillStyle={...this.fillStyle,ground:t}}get fillGroundChanged(){return this.fillStyleChanged}}p(Ti,"defaults",{...$.defaults,pointStyle:{size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{}},strokeStyle:{width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1},fillStyle:{color:[1,1,1,1],material:"",materialParams:{},ground:!1},pointed:!1,stroked:!1,filled:!1}),(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),pointed:!1,pointStyle:d.reactJson(r.defaults.pointStyle),stroked:!1,strokeStyle:d.reactJson(r.defaults.strokeStyle),filled:!1,fillStyle:d.reactJson(r.defaults.fillStyle)})})(Ti||(Ti={})),d.extendClassProps(Ti.prototype,Ti.createDefaultProps);class Jr extends Ti{getESProperties(){return{...super.getESProperties()}}getProperties(t){return[...super.getProperties(t)]}}p(Jr,"defaults",{...Ti.defaults}),(r=>{r.createDefaultProps=()=>({...Ti.createDefaultProps()})})(Jr||(Jr={})),d.extendClassProps(Jr.prototype,Jr.createDefaultProps);const M0=[["固定朝向",0],["面向屏幕旋转",1],["绕自身Z轴旋转",2]],N0=[["单面不透明",0],["双面不透明",1],["单面遮罩",2],["双面遮罩",3],["单面透明",4],["双面透明",5],["单面未遮挡透明",6],["双面未遮挡透明",7]];class Re extends ${constructor(){super(...arguments);p(this,"_widgetEvent",this.dv(new d.Event))}get widgetEvent(){return this._widgetEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new U("屏幕渲染","是否开启屏幕渲染模式",!1,!1,[this,"screenRender"],!0),new U("尺寸自适应","尺寸是否根据内容自动计算",!1,!1,[this,"sizeByContent"],!0),new se("尺寸大小","尺寸自适应关闭才会生效",!1,!1,[this,"size"],[100,100]),new se("偏移比例","偏移比例(anchor)",!1,!1,[this,"anchor"],[.5,1]),new se("像素偏移","像素偏移(offset)",!1,!1,[this,"offset"],[0,0]),new tt("渲染模式","八种渲染模式(0~7),当Widget中透明度只有(0,1)两种时可以选择2",!1,!1,[this,"renderMode"],N0,0),new tt("漫游旋转类型","三种漫游旋转类型(0,1,2)",!1,!1,[this,"rotationType"],M0,1),new nt("绑定对象","actorTag",!1,!1,[this,"actorTag"]),new nt("插槽名称","socketName",!1,!1,[this,"socketName"]),new Qe("位置偏移","positionOffset(米)",!1,!1,[this,"positionOffset"]),new Qe("相对姿态","rotationOffset(米)",!1,!1,[this,"rotationOffset"])]}}getProperties(e){return[...super.getProperties(e),new H("标签属性","标签对象ESLabel的属性",[new U("屏幕渲染","是否开启屏幕渲染模式",!1,!1,[this,"screenRender"],!0),new U("尺寸自适应","尺寸是否根据内容自动计算",!1,!1,[this,"sizeByContent"],!0),new se("尺寸大小","尺寸自适应关闭才会生效",!1,!1,[this,"size"],[100,100]),new se("偏移比例","偏移比例(anchor)",!1,!1,[this,"anchor"],[.5,1]),new se("像素偏移","像素偏移(offset)",!1,!1,[this,"offset"],[0,0]),new tt("渲染模式","八种渲染模式(0~7),当Widget中透明度只有(0,1)两种时可以选择2",!1,!1,[this,"renderMode"],N0,0),new tt("漫游旋转类型","三种漫游旋转类型(0,1,2)",!1,!1,[this,"rotationType"],M0,1),new C("排序","zOrder排序",!1,!1,[this,"zOrder"],0)])]}}p(Re,"defaults",{...$.defaults,screenRender:!0,size:[100,100],anchor:[.5,.5],sizeByContent:!0,renderMode:0,rotationType:1}),(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),screenRender:!0,size:d.reactArray([100,100]),anchor:d.reactArray([.5,1]),offset:d.reactArray([0,0]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,actorTag:"",socketName:"",positionOffset:d.reactArray([0,0,0]),rotationOffset:d.reactArray([0,0,0])})})(Re||(Re={})),d.extendClassProps(Re.prototype,Re.createDefaultProps);const yr=class yr extends Ot{constructor(e){super(e);p(this,"_refreshTilesetEvent",this.dv(new d.Event));p(this,"_tilesetReadyEvent",this.dv(new d.Event));p(this,"_supportEdit",this.dv(d.react(!0)));p(this,"_highlightFeatureEvent",this.dv(new d.Event));p(this,"_highlightFeatureAndFlyToEvent",this.dv(new d.Event));p(this,"_getFeatureTableEvent",this.dv(new d.Event));p(this,"_featureTableResultEvent",this.dv(new d.Event));p(this,"_getMaterialNameListEvent",this.disposeVar(new d.Event));p(this,"_setFeatureStyleEvent",this.dv(new d.Event));p(this,"_setFeatureColorEvent",this.dv(new d.Event));p(this,"_setFeatureVisableEvent",this.dv(new d.Event));p(this,"_resetFeatureStyleEvent",this.dv(new d.Event));p(this,"setMaterialInfoEvent",this.ad(new d.Event));p(this,"_setMaterialEvent",this.disposeVar(new d.Event));p(this,"_clippingPlanesId",this.dv(d.react("")));p(this,"_clippingPlaneIds",this.dv(d.react([])));p(this,"_flattenedPlaneId",this.dv(d.react("")));p(this,"_flattenedPlaneEnabled",this.dv(d.react(!1)));p(this,"_clippingPlaneId",this.dv(d.react("")));p(this,"_excavateId",this.dv(d.reactArray([])))}get typeName(){return"ES3DTileset"}get defaultProps(){return yr.createDefaultProps()}updateEditing(){var e;(e=this.viewer)==null||e.startEditing(this,[vt.Translation,vt.Rotation],{callSource:"inner"})}get refreshTilesetEvent(){return this._refreshTilesetEvent}refreshTileset(){this._refreshTilesetEvent.emit()}get tilesetReady(){return this._tilesetReadyEvent}get supportEdit(){return this._supportEdit.value}set supportEdit(e){this._supportEdit.value=e}get supportEditChanged(){return this._supportEdit.changed}get highlightFeatureEvent(){return this._highlightFeatureEvent}highlightFeature(e,n){this._highlightFeatureEvent.emit(e,n)}get highlightFeatureAndFlyToEvent(){return this._highlightFeatureAndFlyToEvent}highlightFeatureAndFlyTo(e,n,i,s){this._highlightFeatureAndFlyToEvent.emit(e,n,i,s)}get getFeatureTableEvent(){return this._getFeatureTableEvent}getFeatureTable(){return Promise.race([new Promise(e=>{const n=this.d(this._featureTableResultEvent.donce(e));this._getFeatureTableEvent.emit(),setTimeout(()=>{n(),e(void 0)},2e3)})])}get getMaterialNameListEvent(){return this._getMaterialNameListEvent}getMaterialNameList(){return new Promise(e=>{const n=new d.Destroyable;n.d(this.getMaterialNameListEvent.don(i=>{i!=="start"&&(n.destroy(),e(i))})),this.getMaterialNameListEvent.emit("start"),setTimeout(()=>{n.isDestroyed()||(n.destroy(),e(void 0))},2e3)})}get setFeatureStyleEvent(){return this._setFeatureStyleEvent}setFeatureStyle(e){this._setFeatureStyleEvent.emit(e)}get setFeatureColorEvent(){return this._setFeatureColorEvent}setFeatureColor(e,n){this._setFeatureColorEvent.emit(e,typeof n=="string"?JSON.parse(n):n)}get setFeatureVisableEvent(){return this._setFeatureVisableEvent}setFeatureVisable(e,n){this._setFeatureVisableEvent.emit(e,typeof n=="string"?JSON.parse(n):n)}get resetFeatureStyleEvent(){return this._resetFeatureStyleEvent}resetFeatureStyle(){this._resetFeatureStyleEvent.emit()}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(e){return new Promise(n=>{const i=new d.Destroyable;i.ad(this.setMaterialInfoEvent.donce(s=>{i.destroy(),n(s)})),this._setMaterialEvent.emit(e)})}get clippingPlanesId(){return this._clippingPlanesId.value}set clippingPlanesId(e){this._clippingPlanesId.value=e}get clippingPlanesIdChanged(){return this._clippingPlanesId.changed}get clippingPlaneIds(){return this._clippingPlaneIds.value}set clippingPlaneIds(e){this._clippingPlaneIds.value=e}get clippingPlaneIdsChanged(){return this._clippingPlaneIds.changed}get flattenedPlaneId(){return this._flattenedPlaneId.value}set flattenedPlaneId(e){this._flattenedPlaneId.value=e}get flattenedPlaneIdChanged(){return this._flattenedPlaneId.changed}get flattenedPlaneEnabled(){return this._flattenedPlaneEnabled.value}set flattenedPlaneEnabled(e){this._flattenedPlaneEnabled.value=e}get flattenedPlaneEnabledChanged(){return this._flattenedPlaneEnabled.changed}get clippingPlaneId(){return this._clippingPlaneId.value}set clippingPlaneId(e){this._clippingPlaneId.value=e}get clippingPlaneIdChanged(){return this._clippingPlaneId.changed}get excavateId(){return this._excavateId.value}set excavateId(e){this._excavateId.value=e}get excavateIdChanged(){return this._excavateId.changed}setLight122(){this.czmEnvironmentMapManager={...Ad}}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new Kt("精度","精度.",!1,!1,[this,"maximumScreenSpaceError"],1,[0,256],16),new tt("材质模式","materialMode",!0,!1,[this,"materialMode"],yr.defaults.materialModes,"normal"),new tt("颜色模式","颜色混合模式",!1,!1,[this,"colorBlendMode"],[["默认","HIGHLIGHT"],["替换","REPLACE"],["混合","MIX"]],"HIGHLIGHT"),new Y("materialOverrideMap","材质替换",!1,!1,[this,"materialOverrideMap"],yr.defaults.materialOverrideMap),new tt("splitDirection","The ImagerySplitDirection split to apply to this layer.",!1,!1,[this,"splitDirection"],yr.defaults.splitDirectionEnum)],dataSource:[...e.dataSource,new Y("服务地址","服务地址",!0,!1,[this,"url"],yr.defaults.url)],coordinate:[...e.coordinate,new U("编辑","编辑",!0,!1,[this,"editing"],!1),new Qe("偏移","偏移量",!0,!1,[this,"offset"],[0,0,0]),new Jh("旋转","旋转",!1,!1,[this,"rotation"],[0,0,0])]}}getProperties(e){return[...super.getProperties(e),new H("ES3DTileset","ES3DTileset",[new Y("服务地址","服务地址",!1,!1,[this,"url"],yr.defaults.url),new tt("materialMode","materialMode",!1,!1,[this,"materialMode"],yr.defaults.materialModes),new Y("materialParams","materialParams",!1,!1,[this,"materialParams"],yr.defaults.materialParams),new C("maximumScreenSpaceError","显示精度,maximumScreenSpaceError",!1,!1,[this,"maximumScreenSpaceError"]),new U("编辑","编辑",!1,!1,[this,"editing"],!1),new li("offset","offset",!0,!1,[this,"offset"]),new li("rotation","rotation",!1,!1,[this,"rotation"]),new Kt("精度","精度.",!1,!1,[this,"maximumScreenSpaceError"],1,[0,256],16),new mt("highlightFeature","highlightFeature",["string","string"],(n,i)=>this.highlightFeature(n,i),["","rgba(255,0,0,1)"]),new mt("setFeatureColor","setFeatureColor",["string","string"],(n,i)=>this.setFeatureColor(n,i),["",""]),new mt("setFeatureVisable","setFeatureVisable",["string","string"],(n,i)=>this.setFeatureVisable(n,i),["",""]),new mt("resetFeatureStyle","resetFeatureStyle",[],()=>this.resetFeatureStyle(),[]),new tt("splitDirection","The ImagerySplitDirection split to apply to this layer.",!1,!1,[this,"splitDirection"],yr.defaults.splitDirectionEnum),new H("ue","ue",[new mt("refreshTileset","refreshTileset",[],()=>this.refreshTileset(),[]),new nt("actorTag","actorTag",!1,!1,[this,"actorTag"]),new U("是否高亮","是否高亮.",!1,!1,[this,"highlight"]),new it("highlightColor"," highlightColor.",!1,!1,[this,"highlightColor"]),new C("highlightID","highlightID",!1,!1,[this,"highlightID"]),new Y("materialOverrideMap","材质替换",!1,!1,[this,"materialOverrideMap"],yr.defaults.materialOverrideMap)]),new H("czm","czm",[new H("可视化","可视化",[new se("czmImageBasedLightingFactor","反射强度 ,imageBasedLightingFactor",!1,!1,[this,"czmImageBasedLightingFactor"]),new C("czmAtmosphereScatteringIntensity","大气散射强度 ,atmosphereScatteringIntensity",!1,!1,[this,"czmAtmosphereScatteringIntensity"]),new Y("czmEnvironmentMapManager","动态环境贴图管理器",!1,!1,[this,"czmEnvironmentMapManager"]),new C("czmMaximumMemoryUsage","最大内存,maximumMemoryUsage",!1,!1,[this,"czmMaximumMemoryUsage"])]),new H("常用","常用",[new tt("czmClassificationType","Determines whether terrain, 3D Tiles or both will be classified by this tileset. See Cesium3DTileset#czmClassificationType for details about restrictions and limitations.",!0,!1,[this,"czmClassificationType"],[["NONE","NONE"],["TERRAIN","TERRAIN"],["CESIUM_3D_TILE","CESIUM_3D_TILE"],["BOTH","BOTH"]]),new Y("czmStyle","czmStyle",!1,!1,[this,"czmStyleJson"]),new U("czmBackFaceCulling","czmBackFaceCulling",!1,!1,[this,"czmBackFaceCulling"]),new U("czmSkipLevelOfDetail","czmSkipLevelOfDetail",!1,!1,[this,"czmSkipLevelOfDetail"]),new tt("colorBlendMode","颜色混合模式",!1,!1,[this,"colorBlendMode"],[["HIGHLIGHT","HIGHLIGHT"],["REPLACE","REPLACE"],["MIX","MIX"]],"HIGHLIGHT"),new C("cacheBytes","最大缓存占用,超过的会自动卸载,但是视野范围内能看见的保留。单位字节。Cesium1.110(含)以后的版本起作用。",!1,!1,[this,"cacheBytes"],536870912)]),new H("调试信息","调试信息",[new U("czmDebugShowBoundingVolume","For debugging only.When true, renders the bounding volume for each tile.",!1,!1,[this,"czmDebugShowBoundingVolume"]),new U("czmDebugShowContentBoundingVolume","czmDebugShowContentBoundingVolume.",!1,!1,[this,"czmDebugShowContentBoundingVolume"])]),new H("clippingPlanes","clippingPlanes",[new U("clippingPlaneEnabled","clippingPlaneEnabled",!1,!1,[this,"clippingPlaneEnabled"]),new U("unionClippingRegions","unionClippingRegions",!1,!1,[this,"unionClippingRegions"]),new it("clippingPlaneEdgeColor","clippingPlaneEdgeColor",!1,!1,[this,"clippingPlaneEdgeColor"]),new C("clippingPlaneEdgeWidth","clippingPlaneEdgeWidth",!1,!1,[this,"clippingPlaneEdgeWidth"])])])])]}};p(yr,"type",yr.register("ES3DTileset",yr,{chsName:"3DTileset",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"})),p(yr,"supportEditingModes",[...Ot.supportEditingModes,vt.Translation,vt.Rotation]),p(yr,"defaults",{...Ot.defaults,url:"",actorTag:"",materialMode:"normal",materialModes:[["常规","normal"],["科技感","technology"]],offset:[0,0,0],materialParams:{baseColor:[0,.5,1]},cacheBytes:536870912,materialOverrideMap:{},featureIdLabel:0,splitDirection:"NONE",splitDirectionEnum:[["LEFT","LEFT"],["NONE","NONE"],["RIGHT","RIGHT"]]});let Je=yr;(r=>{r.createDefaultProps=()=>({...Ot.createDefaultProps(),url:"",actorTag:"",materialMode:"normal",highlight:!1,maximumScreenSpaceError:16,highlightID:0,highlightColor:d.reactArray([1,0,0,1]),offset:d.reactArrayWithUndefined(void 0),rotation:d.reactArray([0,0,0]),czmImageBasedLightingFactor:d.reactArray([1,1]),czmEnvironmentMapManager:d.reactJsonWithUndefined(void 0),czmLuminanceAtZenith:2,czmAtmosphereScatteringIntensity:2,czmMaximumMemoryUsage:512,czmClassificationType:"NONE",czmStyleJson:d.reactJson({}),czmBackFaceCulling:!0,czmDebugShowBoundingVolume:!1,czmDebugShowContentBoundingVolume:!1,czmSkipLevelOfDetail:!1,cacheBytes:536870912,colorBlendMode:"HIGHLIGHT",clippingPlaneEnabled:!0,unionClippingRegions:!0,clippingPlaneEdgeColor:d.reactArray([1,1,1,1]),clippingPlaneEdgeWidth:2,materialParams:{baseColor:[0,.5,1]},allowPicking:!0,materialOverrideMap:d.reactJsonWithUndefined(void 0),featureIdLabel:0,splitDirection:"NONE"})})(Je||(Je={})),d.extendClassProps(Je.prototype,Je.createDefaultProps);const Rs=class Rs extends ${constructor(e){super(e);p(this,"_isFlyInCreated",this.dv(d.react(!1)));p(this,"_readyEvent",this.dv(new d.Event));this.collision=!1,this.d(this.createdEvent.don(()=>{setTimeout(()=>{if((this.editing??!1)||!this.position){const i=this.dv(d.createNextAnimateFrameEvent(this.positionChanged,this.editingChanged));this.d(i.donce(()=>{this.editing||!this.position||this.isFlyInCreated&&this.flyTo()}))}else{if(!this.isFlyInCreated)return;this.flyTo()}},1e3)}))}get typeName(){return"ESAlarm"}get defaultProps(){return Rs.createDefaultProps()}get isFlyInCreated(){return this._isFlyInCreated.value}set isFlyInCreated(e){this._isFlyInCreated.value=e}get isFlyInCreatedChanged(){return this._isFlyInCreated.changed}get readyEvent(){return this._readyEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new tt("模式","mode",!1,!1,[this,"mode"],Rs.defaults.modes,"cylinder"),new C("半径","radius",!1,!1,[this,"radius"],10)]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new tt("mode","mode",!1,!1,[this,"mode"],Rs.defaults.modes),new C("半径","radius",!1,!1,[this,"radius"])])]}};p(Rs,"type",Rs.register("ESAlarm",Rs,{chsName:"报警",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警告类"})),p(Rs,"defaults",{...$.defaults,modes:[["柱状警告","cylinder"],["圆形警告","circle"]],radius:10,czmAnimations:[{index:0,loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration * 2"}]});let eo=Rs;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),mode:"cylinder",radius:10})})(eo||(eo={})),d.extendClassProps(eo.prototype,eo.createDefaultProps);const xi=class xi extends ${get typeName(){return"ESApertureEffect"}get defaultProps(){return xi.createDefaultProps()}constructor(t){super(t),this.collision=!1}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new C("半径","radius",!1,!1,[this,"radius"],1),new tt("模式","mode",!1,!1,[this,"mode"],xi.defaults.modes,xi.defaults.mode)]}}getProperties(t){return[...super.getProperties(t),new C("半径","radius",!1,!1,[this,"radius"]),new tt("模式","mode",!1,!1,[this,"mode"],xi.defaults.modes,xi.defaults.mode)]}};p(xi,"type",xi.register("ESApertureEffect",xi,{chsName:"光圈特效",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"光圈特效"})),p(xi,"defaults",{...$.defaults,radius:1,mode:"scan",modes:[["扫描","scan"],["扩散","diffuse"]]});let ro=xi;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),radius:1,mode:"scan"})})(ro||(ro={})),d.extendClassProps(ro.prototype,ro.createDefaultProps);const xn=class xn extends Et{constructor(e){super(e);p(this,"editingBindMode","circular");this.collision=xn.defaults.collision,this.filled=xn.defaults.filled,this.stroked=xn.defaults.stroked,this.fillStyle=xn.defaults.fillStyle,this.strokeStyle=xn.defaults.strokeStyle}get typeName(){return"ESGeoPolygon"}get defaultProps(){return xn.createDefaultProps()}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new C("面积","面积",!1,!0,[this,"area"]),new C("周长","周长",!1,!0,[this,"perimeter"])]}}getProperties(e){return[...super.getProperties(e),new H("ESGeoPolygon","ESGeoPolygon",[new C("面积","面积",!1,!0,[this,"area"]),new C("周长","周长",!1,!0,[this,"perimeter"])])]}};p(xn,"type",xn.register("ESGeoPolygon",xn,{chsName:"地理多边形",tags:["ESObjects"],description:"地理多边形"})),p(xn,"supportEditingModes",[...Et.supportEditingModes,vt.CircularAppend,vt.CircularInsert]),p(xn,"defaults",{...Et.defaults,fillStyle:{color:[1,1,1,.5],material:"",materialParams:{},ground:!1},strokeStyle:{width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1},filled:!0,stroked:!1,collision:!1});let At=xn;(r=>{r.createDefaultProps=()=>({...Et.createDefaultProps()})})(At||(At={})),d.extendClassProps(At.prototype,At.createDefaultProps);const Oi=class Oi extends At{get typeName(){return"ESAreaMeasurement"}get defaultProps(){return Oi.createDefaultProps()}get fillMaterial(){return this.fillStyle.material}set fillMaterial(t){this.fillStyle={...this.fillStyle,material:t}}get fillMaterialParams(){return this.fillStyle?this.fillStyle.materialParams:Oi.defaults.fillStyle.materialParams}set fillMaterialParams(t){this.fillStyle={...this.fillStyle??Oi.defaults.fillStyle,materialParams:t??Oi.defaults.fillStyle.materialParams}}constructor(t){super(t),this.fillStyle.ground=!0,this.strokeStyle.width=2}getProperties(t){return[...super.getProperties(t)]}};p(Oi,"type",Oi.register("ESAreaMeasurement",Oi,{chsName:"面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"面积测量"})),p(Oi,"defaults",{...At.defaults,fillStyle:{color:[1,1,1,1],material:"Material'/EarthSDKForUE/M_ES_Material.M_ES_Material'",materialParams:{Opacity:.4},ground:!1},unitsMode:[["平方米","SquareMeter"],["平方千米","SquareKilometer"],["亩","MU"],["公顷","Hectare"],["周长米","PerimeterMeter"],["周长千米","PerimeterKilometer"]]}),p(Oi,"createDefaultProps",()=>({...At.createDefaultProps(),stroked:!0,filled:!0,units:d.reactArray(["SquareKilometer","PerimeterKilometer"])}));let Rh=Oi;d.extendClassProps(Rh.prototype,Rh.createDefaultProps);const vl=class vl extends ${get typeName(){return"ESBlastParticleSystem"}get defaultProps(){return vl.createDefaultProps()}constructor(t){super(t)}getESProperties(){return{...{...super.getESProperties()},defaultMenu:"general"}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new H("czm","czm",[new ku("图片","The URI, HTMLImageElement, or HTMLCanvasElement to use for the billboard.",!1,!1,[this,"image"]),new Qe("偏移","translation",!1,!1,[this,"translation"])])])]}};p(vl,"type",vl.register("ESBlastParticleSystem",vl,{chsName:"粒子爆炸",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子爆炸"})),p(vl,"defaults",{...$.defaults,image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",translation:[0,0,0]});let no=vl;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",positionEditing:void 0,translation:d.reactArray([0,0,0])})})(no||(no={})),d.extendClassProps(no.prototype,no.createDefaultProps);const _r=class _r extends ${get typeName(){return"ESBoxClipping"}get defaultProps(){return{..._r.createDefaultProps()}}constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new U("反转","reverse",!1,!1,[this,"reverse"],_r.defaults.reverse),new Qe("尺寸","长宽高",!1,!1,[this,"size"],_r.defaults.size),new it("边框颜色","edgeColor",!1,!1,[this,"edgeColor"],_r.defaults.edgeColor),new C("边框宽度","edgeWidth",!1,!1,[this,"edgeWidth"],_r.defaults.edgeWidth),new nt("瓦片图层","targetID",!1,!1,[this,"targetID"],_r.defaults.targetID)]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new U("reverse","reverse",!1,!1,[this,"reverse"],_r.defaults.reverse),new it("edgeColor","edgeColor",!1,!1,[this,"edgeColor"],_r.defaults.edgeColor),new C("edgeWidth","edgeWidth",!1,!1,[this,"edgeWidth"],_r.defaults.edgeWidth),new Qe("尺寸","长宽高",!1,!1,[this,"size"],_r.defaults.size),new nt("targetID","targetID",!1,!1,[this,"targetID"],_r.defaults.targetID)])]}};p(_r,"type",_r.register("ESBoxClipping",_r,{chsName:"体剖切",tags:["ESObjects","_ES_Impl_Cesium"],description:"体剖切,体裁剪,体裁切,盒裁切"})),p(_r,"defaults",{...$.defaults,reverse:!1,edgeColor:[1,1,1,1],edgeWidth:1,size:[10,10,10],targetID:""});let io=_r;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),reverse:!1,edgeColor:d.reactArray([1,1,1,1]),edgeWidth:2,size:d.reactArray([10,10,10]),targetID:""})})(io||(io={})),d.extendClassProps(io.prototype,io.createDefaultProps);const Fs=class Fs extends ${constructor(){super(...arguments);p(this,"_thumbnail",this.dv(d.react("")));p(this,"_duration",this.dv(d.react(1)));p(this,"_resetWithCurrentCameraEvent",this.dv(new d.Event));p(this,"_captureEvent",this.dv(new d.Event))}get typeName(){return"ESCameraView"}get defaultProps(){return Fs.createDefaultProps()}get thumbnail(){return this._thumbnail.value}set thumbnail(e){this._thumbnail.value=e}get thumbnailChanged(){return this._thumbnail.changed}get duration(){return this._duration.value}set duration(e){this._duration.value=e}get durationChanged(){return this._duration.changed}flyIn(e=1,n="default"){this.flyInEvent.emit(e,-1,n)}get resetWithCurrentCameraEvent(){return this._resetWithCurrentCameraEvent}resetWithCurrentCamera(){this._resetWithCurrentCameraEvent.emit()}get captureEvent(){return this._captureEvent}capture(e,n){this._captureEvent.emit(e,n)}execOnCreating(){this.resetWithCurrentCamera()}async initByCurrent(){this.resetWithCurrentCamera()}getProperties(e){return[...super.getProperties(e),new H("ESCameraView","ESCameraView",[new mt("设置为当前视角","resetWithCurrentCamera",[],()=>this.resetWithCurrentCamera(),[]),new mt("获取缩略图","获取缩略图",["number","number"],(n,i)=>this.capture(n,i),[Fs.defaults.thumbnailWidth,Fs.defaults.thumbnailHeight]),new nt("缩略图","缩略图",!0,!1,[this,"thumbnail"]),new C("飞行时间","飞行时间(秒)",!0,!1,[this,"duration"])])]}};p(Fs,"type",Fs.register("ESCameraView",Fs,{chsName:"视角",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角"})),p(Fs,"defaults",{...$.defaults,thumbnailWidth:64,thumbnailHeight:64,duration:1,thumbnail:""});let va=Fs;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps()})})(va||(va={})),d.extendClassProps(va.prototype,va.createDefaultProps);class Qc extends d.Destroyable{constructor(e,n,i){super();p(this,"_view",this.dv(new va));if(this.d(e.components.disposableAdd(this._view)),this._view.name=(i==null?void 0:i.name)??`视角${e.views.length+1}`,n){const o=this._view,l=n;o.duration=l.duration??1,o.position=l.position,o.rotation=l.rotation??[0,0,0],o.thumbnail=l.thumbnail??"",o.name=l.name}else{const o=(i==null?void 0:i.size)??[64,64];this.d(d.nextAnimateFrame(()=>{this._view.resetWithCurrentCamera(),this._view.capture(o[0],o[1])}))}const s=this._view,a=this.dv(d.createNextAnimateFrameEvent(s.durationChanged,s.positionChanged,s.rotationChanged,s.thumbnailChanged,s.nameChanged));this.d(a.don(()=>e.emitViewsWarpper()))}get view(){return this._view}get viewInfo(){const e=this._view;return{duration:e.duration,position:e.position,rotation:e.rotation,thumbnail:e.thumbnail,name:e.name}}}const Kr=class Kr extends ft{constructor(e){super(e);p(this,"_currentViewIndex",this.dv(d.react(-1)));p(this,"_viewWrappers",this.dv(new d.ObservableArray));p(this,"_currentViewWrapper",this.dv(d.react(void 0)));p(this,"_container",this.dv(d.react(void 0)));{const n=this.dv(d.createProcessingFromAsyncFunc(async s=>{var a;do{if(!this.flyToNextView())break;const o=this.intervalTime??Kr.defaults.intervalTime,u=((((a=this._currentViewWrapper.value)==null?void 0:a.viewInfo.duration)??0)+o)*1e3;await s.promise(d.sleep(u))}while(!0);this.playing=!1})),i=()=>{this.playing?n.restart():n.cancel()};i(),this.d(this.playingChanged.don(i))}{const n=()=>{if(!this._currentViewWrapper.value)return;this._viewWrappers.indexOf(this._currentViewWrapper.value)===-1&&(this._currentViewWrapper.value=void 0)};n(),this.d(this._viewWrappers.changedEvent.don(n))}{const n=()=>{const i=this._currentViewWrapper.value;this._currentViewIndex.value=i?this._getIndex(i):-1};n(),this.d(this._viewWrappers.changedEvent.don(n)),this.d(this._currentViewWrapper.changed.don(n))}this.d(()=>{this.clearAllViews()})}get typeName(){return"ESCameraViewCollection"}get defaultProps(){return Kr.createDefaultProps()}get json(){return{...this._innerGetJson(),views:this.views}}set json(e){this._innerSetJson(e),this.views=e.views}get currentViewIndex(){return this._currentViewIndex.value}get currentViewIndexChanged(){return this._currentViewIndex.changed}emitViewsWarpper(){this._viewWrappers.changedEvent.emit(this._viewWrappers)}get container(){return this._container.value}get containerChanged(){return this._container.changed}set container(e){this._container.value=e}get views(){return up(this._viewWrappers,e=>e.viewInfo)}get viewsChanged(){return this._viewWrappers.changedEvent}set views(e){if(e.length===this._viewWrappers.length){const n=this._viewWrappers;if(e.every((i,s)=>{const a=n.get(s).view;return i.duration===a.duration&&mf(i.position,a.position)&&mf(i.rotation,a.rotation)&&i.thumbnail===a.thumbnail&&i.name===a.name}))return}this.clearAllViews();for(let n of e)this._viewWrappers.push(new Qc(this,n))}_getIndex(e){return this._viewWrappers.indexOf(e)}clearAllViews(){for(let e of this._viewWrappers)e.destroy();this._viewWrappers.length=0}add(e=`视角${this.views.length+1}`,n=[64,64]){this._viewWrappers.push(new Qc(this,void 0,{name:e,size:n}))}update(e,n,i=[64,64]){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const s=this._viewWrappers.get(e);return n&&(s.view.name=n),s.view.resetWithCurrentCamera(),s.view.capture(i[0],i[1]),!0}addView(){this._viewWrappers.push(new Qc(this))}insertView(e){if(this._viewWrappers.length+1<=e||e<0){console.error("this._views.length <= index || index < 0");return}this._viewWrappers.splice(e,0,new Qc(this))}setCurrentView(e){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const n=this._viewWrappers.get(e);return this._currentViewWrapper.value=n,!0}resetView(e){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const n=this._viewWrappers.get(e);n.view.resetWithCurrentCamera(),n.view.capture()}resetViewName(e,n){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const i=this._viewWrappers.get(e);i.view.name=n}updateView(e,n){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const i=this._viewWrappers.get(e);return i.view.position=n.position,i.view.rotation=n.rotation??[0,0,0],i.view.duration=n.duration??1,i.view.thumbnail=n.thumbnail??"",i.view.name=n.name??"",!0}flyToView(e){if(this.setCurrentView(e)){if(!this._currentViewWrapper.value)throw new Error("this._currentViewWrapper.value");const n=this._currentViewWrapper.value.view.duration;this._currentViewWrapper.value.view.flyIn(n,this.flyMode??Kr.defaults.flyMode)}}flyToPrevView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const n=this._getIndex(e);return this.loop??Kr.defaults.loop?(this.flyToView((this._viewWrappers.length+n-1)%this._viewWrappers.length),!0):n-1<0?!1:(this.flyToView(n-1),!0)}moveToPreView(){const e=this._currentViewWrapper.value;if(!e)return;const n=this._getIndex(e);if(n===0)return;const i=this._viewWrappers.splice(n-1,1,e)[0];this._viewWrappers.set(n,i)}moveToNextView(){const e=this._currentViewWrapper.value;if(!e)return;const n=this._getIndex(e);if(n===this._viewWrappers.length-1)return;const i=this._viewWrappers.splice(n+1,1,e)[0];this._viewWrappers.set(n,i)}flyToNextView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const n=this._getIndex(e);return this.loop??Kr.defaults.loop?(this.flyToView((n+1)%this._viewWrappers.length),!0):n+1>this._viewWrappers.length-1?!1:(this.flyToView(n+1),!0)}stop(){this._currentViewWrapper.value=void 0,this.playing=!1}deleteView(e){if(e<0||e>=this._viewWrappers.length){console.warn("index < 0 || index >= this._viewWrappers.length");return}this._viewWrappers.get(e).destroy(),this._viewWrappers.splice(e,1)}deleteCurrentView(){const e=this._currentViewWrapper.value;if(!e){console.warn("!this._currentViewWrapper.value");return}const n=this._getIndex(e);if(n===-1){console.warn("index === -1");return}this.deleteView(n)}transitionImageUrl(e){return ft.context.getStrFromEnv(e)}getProperties(e){return[...super.getProperties(e),new H("ESCameraViewCollection","ESCameraViewCollection",[new tt("飞行模式","flyMode",!1,!1,[this,"flyMode"],Kr.defaults.flyModes,Kr.defaults.flyMode),new mt("添加视角","添加视角",[],()=>this.addView(),[]),new mt("插入视角","插入视角",["number"],n=>this.insertView(n),[0]),new mt("清空所有视角","清空所有视角",[],()=>this.clearAllViews(),[]),new mt("当前位置插入视角","当前位置插入视角",[],()=>this.insertView(this.currentViewIndex+1),[]),new mt("上一个视角","上一个视角",[],()=>this.flyToPrevView(),[]),new mt("下一个视角","下一个视角",[],()=>this.flyToNextView(),[]),new mt("当前视角移动到上一个视角","当前视角移动到上一个视角",[],()=>this.moveToPreView(),[]),new mt("当前视角移动到下一个视角","当前视角移动到下一个视角",[],()=>this.moveToNextView(),[]),new mt("飞入指定视角","飞入指定视角",["number"],n=>this.flyToView(n),[0]),new mt("设置当前视角","设置当前视角",["number"],n=>this.setCurrentView(n),[0]),new mt("删除当前视角","删除当前视角",[],()=>this.deleteCurrentView(),[]),new mt("删除指定视角","删除指定视角",["number"],n=>this.deleteView(n),[0]),new mt("重置视角","重置视角",["number"],n=>this.resetView(n),[0]),new C("当前序号","当前序号",!1,!0,[this,"currentViewIndex"]),new ap("播放","播放",[this,"playing"],()=>this.stop(),[this,"loop"],Kr.defaults),new U("是否播放","是否播放.",!1,!1,[this,"playing"]),new mt("停止","停止",[],()=>this.stop(),[]),new U("是否循环","是否循环.",!1,!1,[this,"loop"]),new C("间隔时间","间隔时间(s)",!1,!1,[this,"intervalTime"]),new Y("视角集合","类型为ESJViewInfo[]",!0,!1,[this,"views"],Kr.defaults.views)])]}};p(Kr,"type",Kr.register("ESCameraViewCollection",Kr,{chsName:"视角集合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角集合"})),p(Kr,"defaults",{...ft.defaults,loop:!0,playing:!1,intervalTime:5,duration:1,views:[],flyMode:"default",flyModes:[["默认","default"],["直线飞行","uniform"]]});let ya=Kr;(r=>{r.createDefaultProps=()=>({...ft.createDefaultProps(),playing:!1,loop:!0,intervalTime:5,flyMode:"default"})})(ya||(ya={})),d.extendClassProps(ya.prototype,ya.createDefaultProps);const yl=class yl extends ${constructor(e){super(e);p(this,"editingBindMode","doublePoints")}get typeName(){return"ESCameraVisibleRange"}get defaultProps(){return yl.createDefaultProps()}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new C("宽高比","aspectRatio",!1,!1,[this,"aspectRatio"],1.77778),new C("横向夹角","fov",!1,!1,[this,"fov"],90),new C("视野长度","far",!1,!1,[this,"far"],100),new C("近面距离","near",!1,!1,[this,"near"],5)]}}getProperties(e){return[...super.getProperties(e),new C("横向夹角","fov",!1,!1,[this,"fov"]),new C("宽高比","aspectRatio",!1,!1,[this,"aspectRatio"]),new C("视野长度","far",!1,!1,[this,"far"]),new C("近面距离","near",!1,!1,[this,"near"])]}};p(yl,"type",yl.register("ESCameraVisibleRange",yl,{chsName:"摄像头可视域",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"摄像头可视域"})),p(yl,"defaults",{...$.defaults,fov:90,aspectRatio:1.77778,far:100,near:5,collision:!1});let so=yl;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,collision:!1})})(so||(so={})),d.extendClassProps(so.prototype,so.createDefaultProps);const Gs=class Gs extends ${get typeName(){return"ESCar"}get defaultProps(){return Gs.createDefaultProps()}constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new tt("模式","mode",!1,!1,[this,"mode"],Gs.defaults.modeEnum,"policeCar")]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new tt("mode","mode",!1,!1,[this,"mode"],Gs.defaults.modeEnum)])]}};p(Gs,"type",Gs.register("ESCar",Gs,{chsName:"车辆",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警车等基础车辆模型"})),p(Gs,"defaults",{...$.defaults,modeEnum:[["警车","policeCar"]],mode:"policeCar"});let ao=Gs;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),mode:"policeCar",allowPicking:!0})})(ao||(ao={})),d.extendClassProps(ao.prototype,ao.createDefaultProps);const Pa=class Pa extends Et{constructor(e){super(e);p(this,"editingBindMode","circular");this.fillGround=!0}get typeName(){return"ESClassification"}get defaultProps(){return Pa.createDefaultProps()}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new C("高度","高度",!1,!1,[this,"height"],10)],coordinate:[...e.coordinate,new C("面积","面积",!1,!0,[this,"area"]),new C("周长","周长",!1,!0,[this,"perimeter"])]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new C("高度","高度",!1,!1,[this,"height"])])]}};p(Pa,"type",Pa.register("ESClassification",Pa,{chsName:"倾斜单体化",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"平尾箭头"})),p(Pa,"supportEditingModes",[...Et.supportEditingModes,vt.CircularAppend,vt.CircularInsert,vt.HeightModify]),p(Pa,"defaults",{...Et.defaults,fillStyle:{material:"",materialParams:{},ground:!0,color:[1,1,1,1]},filled:!0});let _a=Pa;(r=>{r.createDefaultProps=()=>({...Et.createDefaultProps(),height:10,filled:!0})})(_a||(_a={})),d.extendClassProps(_a.prototype,_a.createDefaultProps);const _l=class _l extends ${get typeName(){return"ESClippingPlane"}get defaultProps(){return _l.createDefaultProps()}constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new U("显示箭头","显示箭头",!1,!1,[this,"showArrow"],!0),new it("线框颜色","edgeColor",!1,!1,[this,"edgeColor"],[1,1,1,1]),new C("线框宽度","edgetWidth",!1,!1,[this,"edgetWidth"],2),new C("裁剪宽度","width",!1,!1,[this,"width"],200),new C("裁剪高度","height",!1,!1,[this,"height"],200),new nt("瓦片图层","targetID",!1,!1,[this,"targetID"],"")]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new H("czm","czm",[new U("显示箭头","显示箭头",!1,!1,[this,"showArrow"]),new it("edgeColor","edgeColor",!1,!1,[this,"edgeColor"]),new C("edgetWidth","edgetWidth",!1,!1,[this,"edgetWidth"]),new C("width","width",!1,!1,[this,"width"]),new C("height","height",!1,!1,[this,"height"]),new nt("targetID","targetID",!1,!1,[this,"targetID"])])])]}};p(_l,"type",_l.register("ESClippingPlane",_l,{chsName:"裁切",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESClippingPlane"})),p(_l,"defaults",{...$.defaults});let oo=_l;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),showArrow:!0,edgeColor:d.reactArray([1,1,1,1]),edgetWidth:2,width:200,height:200,targetID:""})})(oo||(oo={})),d.extendClassProps(oo.prototype,oo.createDefaultProps);class XC extends d.Destroyable{constructor(t,e,n){super();const i=document.createElement("div");i.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${n.id}) container`);{const l=()=>{const c=` ${e.cssText}
|
|
48
|
+
`,vr=class vr extends d.Destroyable{constructor(){super();p(this,"_ratio",this.dv(d.react(0)));p(this,"_subPlayers",this.dv(new d.ObservableArray));const e=this.dv(new d.Player);{const a=()=>{e.loop=this.loop??vr.defaults.loop};a(),this.d(this.loopChanged.don(a))}{const a=()=>{(this.loop??vr.defaults.loop)!==e.loop&&(this.loop=e.loop)};a(),this.d(e.loopChangedEvent.don(a))}{const a=()=>{e.currentTime=this.currentTime??vr.defaults.currentTime};a(),this.d(this.currentTimeChanged.don(a))}{const a=()=>{(this.currentTime??vr.defaults.currentTime)!==e.currentTime&&(this.currentTime=e.currentTime)};a(),this.d(e.currentTimeChangedEvent.don(a))}{const a=()=>{e.duration=this.duration??vr.defaults.duration};a(),this.d(this.durationChanged.don(a))}{const a=()=>{(this.duration??vr.defaults.duration)!==e.duration&&(this.duration=e.duration)};a(),this.d(e.durationChangedEvent.don(a))}{const a=()=>{e.speed=this.speed??vr.defaults.speed};a(),this.d(this.speedChanged.don(a))}{const a=()=>{(this.speed??vr.defaults.speed)!==e.speed&&(this.speed=e.speed)};a(),this.d(e.speedChangedEvent.don(a))}{const a=()=>{e.playing=this.playing??vr.defaults.playing};a(),this.d(this.playingChanged.don(a))}{const a=()=>{(this.playing??vr.defaults.playing)!==e.playing&&(this.playing=e.playing)};a(),this.d(e.playingChangedEvent.don(a))}const n=()=>{const a=this.duration??vr.defaults.duration;a>0&&(this._ratio.value=(this.currentTime??vr.defaults.currentTime)/a)};n();const i=this.dv(d.createNextAnimateFrameEvent(this.currentTimeChanged,this.durationChanged));this.d(i.don(n)),this.d(()=>{const{length:a}=this._subPlayers;for(let o=0;o<a;++o)this._subPlayers.get(o).destroy();this._subPlayers.length=0});const s=()=>{for(let o of this._subPlayers)o.destroy();if(this._subPlayers.length=0,!this.channels)return;const a=this.channels.map(o=>{const[l,u,c]=o;return new GC(l,u,c,this)});this._subPlayers.splice(0,0,...a)};s(),this.d(this.channelsChanged.don(s))}get ratio(){return this._ratio.value}set ratio(e){Math.abs(this._ratio.value-e)<.001||(this.currentTime=(this.duration??vr.defaults.duration)*e)}get ratioChanged(){return this._ratio.changed}};p(vr,"defaults",{loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:!0,ratio:0}),p(vr,"channelsReadMe",kC);let bi=vr;(r=>{r.createDefaultProps=()=>({loop:!1,currentTime:0,duration:3e3,speed:1,playing:!1,channels:d.reactDeepArrayWithUndefined(void 0,(t,e)=>t==null?void 0:t.every((n,i)=>n===e[i]),t=>[...t])})})(bi||(bi={})),d.extendClassProps(bi.prototype,bi.createDefaultProps);class Gd extends d.Destroyable{constructor(e){super();p(this,"_sceneObject",this.dv(d.react(void 0)));this._id=e,this.d(()=>{this._sceneObject.value=void 0});const n=ft.getSceneObjById(this._id);n&&(this._sceneObject.value=n),this.d(ft.context.sceneObjCreatedEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=i)})),this.d(ft.context.sceneObjToDestroyEvent.don(i=>{i.id===this._id&&(this._sceneObject.value=void 0)}))}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}get id(){return this._id}}class zC extends d.Destroyable{constructor(e,n){super();p(this,"_sofi");this._id=e,this._sofi=this.dv(new Gd(this._id));{const i=()=>{n.sceneObject=this._sofi.sceneObject};i(),this.d(this._sofi.sceneObjectChanged.don(i))}}}class VC extends d.Destroyable{constructor(){super();p(this,"_id",this.dv(d.react(void 0)));p(this,"_sceneObject",this.dv(d.react(void 0)));p(this,"_resetting",this.dv(new d.ObjResettingWithEvent(this.idChanged,()=>{const{id:e}=this;if(e===void 0||e===""){this.sceneObject=void 0;return}return new zC(e,this)})))}get id(){return this._id.value}get idChanged(){return this._id.changed}set id(e){this._id.value=e}get sceneObject(){return this._sceneObject.value}get sceneObjectChanged(){return this._sceneObject.changed}set sceneObject(e){this._sceneObject.value=e}get resetting(){return this._resetting}}class UC extends d.Destroyable{constructor(t,e,n,i){super(),this.disposeVar(new d.ObjResettingWithEvent(t.sceneObjectChanged,()=>{let s;i.debug&&console.log("正在获取Event事件...");do{const a=t.sceneObject;if(!a||!e)break;const o=e.split(".");if(o.length===0){i.debug&&console.warn("propNames.length === 0");break}let l=d.pluckProperty(a,!1,...o);if((!l||!(l instanceof d.Event))&&(o[o.length-1]=o[o.length-1]+"Changed",i.debug&&console.warn(`event未能获取,那么将属性名的最后一项加上Changed(${o[o.length-1]})再试试!`),l=d.pluckProperty(a,!1,...o),i.debug&&l&&console.warn("event仍然获取不到!")),!l){i.debug&&console.warn(`cannot get changed from ${a.id}-${a.name}-${a.ref}-${e}`);break}if(!(l instanceof d.Event)){i.debug&&console.warn(`the prop is not event from ${a.id}-${a.name}-${a.ref}-${e}`);break}s=l,i.debug&&console.log(`Event获取成功 propChangedName: ${e}`,s)}while(!1);if(s){const a=new d.Destroyable;return a.d(s.dwon(()=>n.emit())),a}else{i.debug&&console.log(`未获取到Event!propChangedName: ${e}`);return}}))}}let qC=class extends d.Destroyable{constructor(e,n,i){super();p(this,"_doEvalEvent",this.dv(new d.Event));const s=this._doEvalEvent,a=this.disposeVar(d.createNextAnimateFrameEvent(s)),o=e.map(([l,u])=>{const c=new Gd(l),h=u&&new UC(c,u,s,n)||void 0;return[c,h]});this.d(()=>{o.forEach(([l,u])=>{u==null||u.destroy(),l.destroy()}),o.length=0}),this.d(s.don(()=>{const{evalMode:l="NextAnimateFrame",evalOnlyWhenObjsAllExist:u=!0}=n;if(l==="Immediate"){const c=o.map(([h])=>h.sceneObject);(!u||c.every(h=>h!==void 0))&&i(c)}})),this.d(a.don(()=>{const{evalMode:l="NextAnimateFrame",evalOnlyWhenObjsAllExist:u=!0}=n;if(l==="NextAnimateFrame"){const c=o.map(([h])=>h.sceneObject);(!u||c.every(h=>h!==void 0))&&i(c)}}))}forceExecute(){this._doEvalEvent.emit()}};const C0=Object.freeze(Object.defineProperty({__proto__:null,WatcherObjects:qC},Symbol.toStringTag,{value:"Module"})),{WatcherObjects:WC}=C0;class Lh extends d.Destroyable{constructor(){super();p(this,"_evalFunc");p(this,"_forceExecute",new d.Event);const e=this.dv(d.react(void 0)),n=()=>{try{e.value=this.evalFuncStr&&Function('"use strict";return ('+this.evalFuncStr+")")(),this.debug&&console.log("evalFunc成功构建",e.value)}catch(a){console.error(`evalFunc get error! ${a}`),e.value=void 0}};n(),this.dispose(this.evalFuncStrChanged.disposableOn(n));const i=a=>{this.enabled&&(this.debug&&console.log("执行evalFunc..."),this._evalFunc&&this._evalFunc(a),e.value&&e.value(a))},s=this.disposeVar(new d.ObjResettingWithEvent(this.objIdAndPropChangedNamesChanged,()=>{if(this.objIdAndPropChangedNames.length>0)return this.debug&&console.log("监视对象发生变化,重新创建WatcherObjects"),new WC(this.objIdAndPropChangedNames,this,i)}));this.dispose(this._forceExecute.disposableOn(()=>{var a;(a=s.obj)==null||a.forceExecute()}))}get evalFunc(){return this._evalFunc}set evalFunc(e){this._evalFunc=e}forceExecute(){this._forceExecute.emit()}}(r=>{r.createDefaultProps=()=>({enabled:!1,objIdAndPropChangedNames:d.reactDeepArray([],(t,e)=>t[0]===e[0]&&t[1]===e[1],t=>[t[0],t[1]]),evalFuncStr:"",evalMode:"NextAnimateFrame",evalOnlyWhenObjsAllExist:!0,debug:!1,name:"未命名场景对象",ref:void 0,extras:d.reactJson(void 0),devTags:d.reactArrayWithUndefined(void 0),execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0})})(Lh||(Lh={})),d.extendClassProps(Lh.prototype,Lh.createDefaultProps);function HC(r,t,e){var i;((i=t.viewer)==null?void 0:i.getEngineObject(t))?e.call(r):r.dispose(t.createdEvent.don(()=>e.call(r)))}const le=class le extends ft{constructor(e){super(e);p(this,"_editing",this.dv(d.react(!1)));p(this,"editingID");p(this,"editingBindMode","singlePoint");p(this,"_deprecated",[]);p(this,"_flyInEvent",this.dv(new d.Event));p(this,"_flyToEvent",this.dv(new d.Event));p(this,"_flyOverEvent",this.disposeVar(new d.Event));p(this,"_pickedEvent",this.dv(new d.Event));p(this,"_calcFlyToParamEvent",this.dv(new d.Event));p(this,"_calcFlyInParamEvent",this.dv(new d.Event));p(this,"useCalcFlyToParamInESObjectWithLocation",!1);v0(this,this.updateEditing)}supportEditingModes(){return this.constructor.supportEditingModes}get editing(){return this._editing.value}set editing(e){this._editing.value=e}get editingChanged(){return this._editing.changed}updateEditing(){}_deprecatedWarning(){const e=this._deprecated;for(let n=0;n<e.length;n++){const i=e[n];typeof i=="string"?Reflect.has(this,i+"Changed")&&this.d(this[i+"Changed"].don(()=>{console.warn(`注意:${this.typeName} 的 ${i} 属性下版本将会被移除!`)})):Object.keys(i).forEach(s=>{Reflect.has(this,s+"Changed")&&this.d(this[s+"Changed"].don(o=>{const l=i[s];typeof l=="string"?console.warn(`注意:${this.typeName} 的 ${s} 属性下版本将会被移除!`):Object.keys(l).forEach(u=>{o===u&&console.warn(`注意:${this.typeName} 的 ${s} 属性值 ${u} 下版本将会被移除,推荐使用属性值 ${l[u]}`)})}))})}}get flyInEvent(){return this._flyInEvent}flyIn(e=1){this._flyInEvent.emit(e,le._lastFlyInId)}get flyToEvent(){return this._flyToEvent}flyTo(e=1){this._flyToEvent.emit(e,le._lastFlyToId)}get flyOverEvent(){return this._flyOverEvent}get pickedEvent(){return this._pickedEvent}get calcFlyToParamEvent(){return this._calcFlyToParamEvent}calcFlyToParam(){this._calcFlyToParamEvent.emit()}get calcFlyInParamEvent(){return this._calcFlyInParamEvent}calcFlyInParam(){this._calcFlyInParamEvent.emit()}emptyFlyToParam(){this.flyToParam=void 0}emptyFlyInParam(){this.flyInParam=void 0}async getBoundSphere(e){return await e.getBoundSphere(this.id)}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"general",general:[...e.general,new nt("唯一标识","id",!1,!0,[this,"id"]),new nt("名称","name",!0,!1,[this,"name"]),new U("是否显示","show",!1,!1,[this,"show"],le.defaults.show),new U("开启碰撞","collision",!1,!1,[this,"collision"],le.defaults.collision),new U("允许拾取","allowPicking",!1,!1,[this,"allowPicking"],le.defaults.allowPicking),new mt("保存观察视角","保存当前flyToParam",[],()=>this.calcFlyToParam(),[]),new mt("清空飞向参数","清空飞向参数",[],()=>this.emptyFlyToParam(),[]),new mt("清空飞入参数","清空飞入参数",[],()=>this.emptyFlyInParam(),[]),new mt("保存飞入参数","保存飞入参数flyInParam",[],()=>this.calcFlyInParam(),[])]}}getProperties(e){return[...super.getProperties(e),new H("ESVisualObject","ESVisualObject",[new U("是否显示","是否显示.",!1,!1,[this,"show"],le.defaults.show),new U("是否开启碰撞监测","collision,是否开启碰撞监测.",!1,!1,[this,"collision"],le.defaults.collision),new U("是否允许拾取","是否允许被鼠标点击拾取.",!1,!1,[this,"allowPicking"],le.defaults.allowPicking),new H("飞行定位","飞向参数",[new mt("飞向","飞向",["number"],n=>this.flyTo(n),[1]),new Y("flyToParam","flyToParam",!0,!1,[this,"flyToParam"],le.defaults.flyToParam),new mt("获取当前参数","获取当前flyToParam",[],()=>this.calcFlyToParam(),[]),new C("flyToDistance","flyToDistance",!0,!1,[this,"flyToDistance"],le.defaults.flyToParam.distance),new C("flyToHeading","flyToHeading",!0,!1,[this,"flyToHeading"],le.defaults.flyToParam.heading),new C("flyToPitch","flyToPitch",!0,!1,[this,"flyToPitch"],le.defaults.flyToParam.pitch),new C("flyToFlyDuration","flyToFlyDuration",!0,!1,[this,"flyToFlyDuration"],le.defaults.flyToParam.flyDuration),new C("flyToHDelta","flyToHDelta",!0,!1,[this,"flyToHDelta"],le.defaults.flyToParam.hDelta),new C("flyToPDelta","flyToPDelta",!0,!1,[this,"flyToPDelta"],le.defaults.flyToParam.pDelta)]),new H("飞入定位","飞入参数",[new mt("飞入","飞入",["number"],n=>this.flyIn(n),[1]),new Y("flyInParam","flyInParam",!0,!1,[this,"flyInParam"],le.defaults.flyInParam),new mt("获取当前相机参数","获取当前相机参数",[],()=>this.calcFlyInParam(),[])])])]}get flyToDistance(){return this.flyToParam&&this.flyToParam.distance}get flyToHeading(){return this.flyToParam&&this.flyToParam.heading}get flyToPitch(){return this.flyToParam&&this.flyToParam.pitch}get flyToFlyDuration(){return this.flyToParam&&this.flyToParam.flyDuration}get flyToHDelta(){return this.flyToParam&&this.flyToParam.hDelta}get flyToPDelta(){return this.flyToParam&&this.flyToParam.pDelta}get flyToDistanceChanged(){return this.flyToParamChanged}get flyToHeadingChanged(){return this.flyToParamChanged}get flyToPitchChanged(){return this.flyToParamChanged}get flyToFlyDurationChanged(){return this.flyToParamChanged}get flyToHDeltaChanged(){return this.flyToParamChanged}get flyToPDeltaChanged(){return this.flyToParamChanged}set flyToDistance(e){this.flyToParam=e!==void 0?{...this.flyToParam??le.defaults.flyToParam,distance:e}:void 0}set flyToHeading(e){this.flyToParam=e!==void 0?{...this.flyToParam??le.defaults.flyToParam,heading:e}:void 0}set flyToPitch(e){this.flyToParam=e!==void 0?{...this.flyToParam??le.defaults.flyToParam,pitch:e}:void 0}set flyToFlyDuration(e){this.flyToParam=e!==void 0?{...this.flyToParam??le.defaults.flyToParam,flyDuration:e}:void 0}set flyToHDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??le.defaults.flyToParam,hDelta:e}:void 0}set flyToPDelta(e){this.flyToParam=e!==void 0?{...this.flyToParam??le.defaults.flyToParam,pDelta:e}:void 0}};p(le,"supportEditingModes",[]),p(le,"_lastFlyInId",0),p(le,"_lastFlyToId",0),p(le,"defaults",{...ft.defaults,show:!0,collision:!0,allowPicking:!1,flyToParam:{distance:0,heading:0,pitch:0,flyDuration:1,hDelta:0,pDelta:0},flyInParam:{position:[0,0,0],rotation:[0,0,0],flyDuration:1}});let Ot=le;(r=>{r.createDefaultProps=()=>({...ft.createDefaultProps(),show:!0,collision:!0,allowPicking:!1,flyToParam:d.reactJsonWithUndefined(void 0),flyInParam:d.reactJsonWithUndefined(void 0)})})(Ot||(Ot={})),d.extendClassProps(Ot.prototype,Ot.createDefaultProps);function I0(r){let t=0;function e(n,i){i++,t=Math.max(i,t),n.forEach(s=>{Array.isArray(s)&&e(s,i)})}return e(r,0),t}const Gh=class Gh extends Ot{constructor(e){super(e);p(this,"editingBindMode","lineString");p(this,"_area",this.dv(d.react(0)));p(this,"_perimeter",this.dv(d.react(0)));const n=()=>{this._updateArea(),this._updatePerimeter()};n(),this.d(this.pointsChanged.don(n))}updateEditing(){var n;const e=[];do{if(this.editingBindMode=="doublePoints"){e.push(vt.DoublePointsAppend,vt.DoublePointsModify);break}if(this.editingBindMode=="lineString"){e.push(vt.LineStringAppend,vt.LineStringInsert,vt.Translation);break}if(this.editingBindMode=="circular"){e.push(vt.CircularAppend,vt.CircularInsert,vt.Translation),this.supportEditingModes().includes(vt.HeightModify)&&e.push(vt.HeightModify);break}if(this.editingBindMode=="visibility"){e.push(vt.VisibilityAppend,vt.VisibilityModify);break}}while(!1);(n=this.viewer)==null||n.startEditing(this,e,{callSource:"inner"})}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}_updateArea(){this._area.value=this.getArea()??0}_updatePerimeter(){this._perimeter.value=this.getPerimeter()??0}getArea(){if(this.points&&this.points.length>=3)return ld([...this.points])}getDistance(){if(this.points&&this.points.length>=2){const e=Oh(this.points,"GEODESIC");return e[e.length-1]}else return}getPerimeter(){if(this.points&&this.points.length>=3){const e=[...this.points,this.points[0]],n=Oh(e,"GEODESIC");return n[n.length-1]}else return}getIntersect(e){if(this.points&&this.points.length>=3&&e.length>=3){const n=cm(this.points,e);if(!n)return;const i=n[0][0][0];if(Array.isArray(i)){const s=[...n],a=[];return s.forEach(o=>{const l=o[0].map(u=>[...u,0]);a.push(l)}),a}else return[[...n][0].map(o=>[...o,0])]}else return}getUnion(e){if(this.points&&this.points.length>=3&&e.length>=3){const n=fm(this.points,e);if(!n)return;const i=n[0][0][0];if(Array.isArray(i)){const s=[...n],a=[];return s.forEach(o=>{const l=o[0].map(u=>[...u,0]);a.push(l)}),a}else return[[...n][0].map(o=>[...o,0])]}else return}getDifference(e){if(this.points&&this.points.length>=3&&e.length>=3){let n=[...e];const i=e[0],s=e[e.length-1];i[0]===s[0]&&i[1]===s[1]&&i[2]===s[2]||n.push(i);const a=pm([...this.points,this.points[0]],[...n]);if(!a)return{status:"undefined",positions:void 0};const o=[...a];if(I0(o)===3){const l=o.map(f=>f.map(g=>[...g,0]));if(l.length<=1)return{status:"notIncluded",positions:l};const u=l[0],c=l[1];return hd([...u],[...c])==="oneBig"?{status:"included",positions:l}:{status:"notIncluded",positions:l}}else if(I0(o)===4){const u=[...o.map(h=>h.map(f=>f.map(g=>[...g,0])))],c=[];return u.forEach(h=>{c.push(h[0])}),{status:"notIncluded",positions:c}}else return{status:"undefined",positions:void 0}}else return{status:"undefined",positions:void 0}}getBuffer(e=500,n){if(this.points&&this.points.length>=2){const i=dm(this.points,e,n);return i?[i[0].map(s=>[...s,0])]:void 0}else return}geoPolygonOverlap(e){if(this.points&&this.points.length>=3&&e.length>=3){const n=hd(this.points,e);return n==="oneBig"?!0:n==="twoBig"?!1:void 0}else return}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",coordinate:[...e.coordinate,new U("编辑","编辑",!1,!1,[this,"editing"],!1),new Y("位置数组","位置数组(经纬高数组)",!0,!1,[this,"points"],Gh.defaults.points)],style:[...e.style,new H("点样式","点样式集合",[]),new U("开启","开启点样式",!1,!1,[this,"pointed"],!1),new C("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new tt("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new it("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new H("线样式","线样式集合",[]),new U("开启","开启线样式",!1,!1,[this,"stroked"],!0),new U("贴地","是否贴地",!1,!1,[this,"strokeGround"],!1),new C("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new tt("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new it("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new H("面样式","面样式集合",[]),new U("开启","开启填充样式",!1,!1,[this,"filled"],!1),new U("贴地","是否贴地",!1,!1,[this,"fillGround"],!1),new it("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1])]}}getProperties(e){return[...super.getProperties(e),new H("ESGeoVector","ESGeoVector",[new U("是否编辑","是否编辑",!1,!1,[this,"editing"]),new Y("位置数组","位置数组(经纬高数组)",!1,!1,[this,"points"]),new H("点样式","点样式",[new U("开启点样式","开启点样式",!1,!1,[this,"pointed"]),new C("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"]),new tt("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]]),new it("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"]),new nt("点材质","点材质(pointMaterial)",!1,!1,[this,"pointMaterial"]),new Y("点材质参数","点材质参数(pointMaterialParams)",!1,!1,[this,"pointMaterialParams"])]),new H("线样式","线样式",[new U("开启线样式","开启线样式",!1,!1,[this,"stroked"]),new C("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"]),new tt("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]]),new it("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"]),new nt("线材质","线材质(strokeMaterial)",!1,!1,[this,"strokeMaterial"]),new Y("线材质参数","线材质参数(strokeMaterialParams)",!1,!1,[this,"strokeMaterialParams"]),new U("是否贴地","是否贴地",!1,!1,[this,"strokeGround"])]),new H("填充样式","填充样式",[new U("开启填充样式","开启填充样式",!1,!1,[this,"filled"]),new it("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"]),new nt("面材质","面材质(fillMaterial)",!1,!1,[this,"fillMaterial"]),new Y("面材质参数","面材质参数(fillMaterialParams)",!1,!1,[this,"fillMaterialParams"]),new U("是否贴地","是否贴地",!1,!1,[this,"fillGround"])])])]}get pointSize(){return this.pointStyle.size}set pointSize(e){this.pointStyle={...this.pointStyle,size:e}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(e){this.pointStyle={...this.pointStyle,sizeType:e}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(e){this.pointStyle={...this.pointStyle,color:[...e]}}get pointColorChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(e){this.pointStyle={...this.pointStyle,material:e}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(e){this.pointStyle={...this.pointStyle,materialParams:e}}get pointMaterialParamsChanged(){return this.pointStyleChanged}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}};p(Gh,"supportEditingModes",[...Ot.supportEditingModes,vt.Translation]),p(Gh,"defaults",{...Ot.defaults,points:[],pointStyle:{size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{}},strokeStyle:{width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1},fillStyle:{color:[1,1,1,1],material:"",materialParams:{},ground:!1},pointed:!1,stroked:!1,filled:!1});let Et=Gh;(r=>{r.createDefaultProps=()=>({...Ot.createDefaultProps(),pointed:!1,pointStyle:d.reactJson(r.defaults.pointStyle),stroked:!1,strokeStyle:d.reactJson(r.defaults.strokeStyle),filled:!1,fillStyle:d.reactJson(r.defaults.fillStyle),points:d.reactPositions(void 0)})})(Et||(Et={})),d.extendClassProps(Et.prototype,Et.createDefaultProps);class $ extends Ot{constructor(){super(...arguments);p(this,"_statusDis",this.dv(d.react(!0)));p(this,"_smoothMoveEvent",this.dv(new d.Event));p(this,"_smoothMoveWithRotationEvent",this.dv(new d.Event));p(this,"_smoothMoveOnGroundEvent",this.dv(new d.Event));p(this,"_smoothMoveWithRotationOnGroundEvent",this.dv(new d.Event));p(this,"_automaticLandingEvent",this.dv(new d.Event));p(this,"_smoothMoveKeepPitchEvent",this.dv(new d.Event));p(this,"_smoothMoveRelativelyEvent",this.dv(new d.Event));p(this,"_smoothMoveRelativelyWithRotationEvent",this.dv(new d.Event));p(this,"useCalcFlyToParamInESObjectWithLocation",!0)}updateEditing(){var n;const e=[];do{if(this.editingBindMode=="singlePoint"){e.push(vt.Place,vt.Translation),["ESLocationMeasurement"].includes(this.typeName)||e.push(vt.Rotation),["ESClippingPlane","ESLocationMeasurement","ESLocalRectangle","ESBoxClipping"].includes(this.typeName)||e.push(vt.Scale);break}if(this.editingBindMode=="doublePoints"){e.push(vt.DoublePointsAppend,vt.DoublePointsModify);break}}while(!1);(n=this.viewer)==null||n.startEditing(this,e,{callSource:"inner"})}get statusDis(){return this._statusDis.value}get statusDisChanged(){return this._statusDis.changed}get smoothMoveEvent(){return this._smoothMoveEvent}smoothMove(e,n){this._smoothMoveEvent.emit(e,n)}get smoothMoveWithRotationEvent(){return this._smoothMoveWithRotationEvent}smoothMoveWithRotation(e,n,i){this._smoothMoveWithRotationEvent.emit(e,n,i)}get smoothMoveOnGroundEvent(){return this._smoothMoveOnGroundEvent}smoothMoveOnGround(e,n,i,s){this._smoothMoveOnGroundEvent.emit(e,n,i,s)}get smoothMoveWithRotationOnGroundEvent(){return this._smoothMoveWithRotationOnGroundEvent}smoothMoveWithRotationOnGround(e,n,i,s,a){this._smoothMoveWithRotationOnGroundEvent.emit(e,n,i,s,a)}get automaticLandingEvent(){return this._automaticLandingEvent}automaticLanding(){const e=this.collision;this.collision=!1,setTimeout(()=>{this._automaticLandingEvent.emit(e)},100)}get smoothMoveKeepPitchEvent(){return this._smoothMoveKeepPitchEvent}smoothMoveKeepPitch(e,n){this._smoothMoveKeepPitchEvent.emit(e,n)}get smoothMoveRelativelyEvent(){return this._smoothMoveRelativelyEvent}smoothMoveRelatively(e,n){this._smoothMoveRelativelyEvent.emit(e,n)}get smoothMoveRelativelyWithRotationEvent(){return this._smoothMoveRelativelyWithRotationEvent}smoothMoveRelativelyWithRotation(e,n,i){this._smoothMoveRelativelyWithRotationEvent.emit(e,n,i)}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",location:[...e.location,new U("是否编辑","是否编辑",!1,!1,[this,"editing"]),new mt("自动落地","自动落地",[],()=>this.automaticLanding(),[]),new li("位置数组","经度,纬度,高度,度为单位",!1,!1,[this,"position"],[0,0,0]),new Jh("姿态数组","偏航角,俯仰角,翻转角,度为单位",!1,!1,[this,"rotation"],[0,0,0]),new Qe("缩放","缩放",!1,!1,[this,"scale"],[1,1,1]),new C("最小可见距离","单位米",!1,!1,[this,"minVisibleDistance"],0),new C("最大可见距离","单位米",!1,!1,[this,"maxVisibleDistance"],0)]}}getProperties(e){return[...super.getProperties(e),new H("位置姿态对象","位置姿态对象ESObjectWithLocation",[new mt("平滑移动","smoothMove",["numbers","number"],(n,i)=>this.smoothMove(n,i),[[0,0,0],0]),new mt("固定方向平滑移动","smoothMoveKeepPitch",["numbers","number"],(n,i)=>this.smoothMoveKeepPitch(n,i),[[0,0,0],0]),new mt("平滑偏移","smoothMoveWithRotation",["numbers","numbers","number"],(n,i,s)=>this.smoothMoveWithRotation(n,i,s),[[0,0,0],[0,0,0],0]),new mt("贴地平滑移动","smoothMoveOnGround",["number","number","number","string"],(n,i,s,a)=>this.smoothMoveOnGround(n,i,s,a),[0,0,0,""]),new mt("贴地平滑偏移","smoothMoveWithRotationOnGround",["numbers","number","number","number","string"],(n,i,s,a,o)=>this.smoothMoveWithRotationOnGround(n,i,s,a,o),[[0,0,0],0,0,0,""]),new mt("smoothMoveRelatively","smoothMoveRelatively",["numbers","number"],(n,i)=>this.smoothMoveRelatively(n,i),[[0,0,0],0]),new mt("smoothMoveRelativelyWithRotation","smoothMoveRelativelyWithRotation",["numbers","numbers","number"],(n,i,s)=>this.smoothMoveRelativelyWithRotation(n,i,s),[[0,0,0],[0,0,0],0]),new li("位置数组","经度,纬度,高度,度为单位",!1,!1,[this,"position"]),new Jh("姿态数组","偏航角,俯仰角,翻转角,度为单位",!1,!1,[this,"rotation"]),new Qe("缩放","缩放",!1,!1,[this,"scale"]),new U("是否编辑","是否开启编辑状态",!0,!1,[this,"editing"],!1),new C("最小可见距离","单位米",!1,!1,[this,"minVisibleDistance"]),new C("最大可见距离","单位米",!1,!1,[this,"maxVisibleDistance"]),new U("是否应用距离显隐","是否应用距离显隐",!1,!1,[this,"enableVisibleDistance"])])]}}p($,"supportEditingModes",[...Ot.supportEditingModes,vt.Place,vt.Translation,vt.Rotation,vt.Scale,vt.DoublePointsAppend,vt.DoublePointsModify]),p($,"defaults",{...Ot.defaults}),(r=>{r.createDefaultProps=()=>({...Ot.createDefaultProps(),position:d.reactArray([0,0,0]),rotation:d.reactArray([0,0,0]),scale:d.reactArray([1,1,1]),minVisibleDistance:d.react(0),maxVisibleDistance:d.react(0)})})($||($={})),d.extendClassProps($.prototype,$.createDefaultProps);class Ti extends ${getESProperties(){const t={...super.getESProperties()};return{...t,style:[...t.style,new H("点样式","点样式集合",[]),new U("开启点样式","开启点样式",!1,!1,[this,"pointed"],!1),new C("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new tt("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new it("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new H("线样式","线样式集合",[]),new U("开启线样式","开启线样式",!1,!1,[this,"stroked"],!1),new U("是否贴地(线)","是否贴地(线)",!1,!1,[this,"strokeGround"],!1),new C("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new tt("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new it("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new H("面样式","面样式集合",[]),new U("开启填充样式","开启填充样式",!1,!1,[this,"filled"],!1),new U("是否贴地","是否贴地",!1,!1,[this,"fillGround"],!1),new it("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1])]}}getProperties(t){return[...super.getProperties(t),new H("ESLocalVector","ESLocalVector",[new Y("点样式","点样式(pointMaterialParams)",!1,!1,[this,"pointStyle"]),new Y("线样式","线样式(strokeMaterialParams)",!1,!1,[this,"strokeStyle"]),new Y("填充样式","填充样式(fillMaterialParams)",!1,!1,[this,"fillStyle"]),new H("点样式","点样式",[new U("开启点样式","开启点样式",!1,!1,[this,"pointed"]),new C("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"]),new tt("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]]),new it("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"]),new nt("点材质","点材质(pointMaterial)",!1,!1,[this,"pointMaterial"]),new Y("点材质参数","点材质参数(pointMaterialParams)",!1,!1,[this,"pointMaterialParams"])]),new H("线样式","线样式",[new U("开启线样式","开启线样式",!1,!1,[this,"stroked"]),new C("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"]),new tt("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]]),new it("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"]),new nt("线材质","线材质(strokeMaterial)",!1,!1,[this,"strokeMaterial"]),new Y("线材质参数","线材质参数(strokeMaterialParams)",!1,!1,[this,"strokeMaterialParams"]),new U("是否贴地(线)","是否贴地(线)",!1,!1,[this,"strokeGround"],!1)]),new H("填充样式","填充样式",[new U("开启填充样式","开启填充样式",!1,!1,[this,"filled"]),new it("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"]),new nt("面材质","面材质(fillMaterial)",!1,!1,[this,"fillMaterial"]),new Y("面材质参数","面材质参数(fillMaterialParams)",!1,!1,[this,"fillMaterialParams"]),new U("是否贴地","是否贴地",!1,!1,[this,"fillGround"])])])]}get pointSize(){return this.pointStyle.size}set pointSize(t){this.pointStyle={...this.pointStyle,size:t}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(t){this.pointStyle={...this.pointStyle,sizeType:t}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(t){this.pointStyle={...this.pointStyle,color:[...t]}}get pointColorChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(t){this.pointStyle={...this.pointStyle,material:t}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(t){this.pointStyle={...this.pointStyle,materialParams:t}}get pointMaterialParamsChanged(){return this.pointStyleChanged}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(t){this.strokeStyle={...this.strokeStyle,width:t}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(t){this.strokeStyle={...this.strokeStyle,widthType:t}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(t){this.strokeStyle={...this.strokeStyle,color:[...t]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(t){this.strokeStyle={...this.strokeStyle,material:t}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(t){this.strokeStyle={...this.strokeStyle,materialParams:t}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(t){this.strokeStyle={...this.strokeStyle,ground:t}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(t){this.fillStyle={...this.fillStyle,color:[...t]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(t){this.fillStyle={...this.fillStyle,material:t}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(t){this.fillStyle={...this.fillStyle,materialParams:t}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(t){this.fillStyle={...this.fillStyle,ground:t}}get fillGroundChanged(){return this.fillStyleChanged}}p(Ti,"defaults",{...$.defaults,pointStyle:{size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{}},strokeStyle:{width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1},fillStyle:{color:[1,1,1,1],material:"",materialParams:{},ground:!1},pointed:!1,stroked:!1,filled:!1}),(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),pointed:!1,pointStyle:d.reactJson(r.defaults.pointStyle),stroked:!1,strokeStyle:d.reactJson(r.defaults.strokeStyle),filled:!1,fillStyle:d.reactJson(r.defaults.fillStyle)})})(Ti||(Ti={})),d.extendClassProps(Ti.prototype,Ti.createDefaultProps);class Yr extends Ti{getESProperties(){return{...super.getESProperties()}}getProperties(t){return[...super.getProperties(t)]}}p(Yr,"defaults",{...Ti.defaults}),(r=>{r.createDefaultProps=()=>({...Ti.createDefaultProps()})})(Yr||(Yr={})),d.extendClassProps(Yr.prototype,Yr.createDefaultProps);const M0=[["固定朝向",0],["面向屏幕旋转",1],["绕自身Z轴旋转",2]],N0=[["单面不透明",0],["双面不透明",1],["单面遮罩",2],["双面遮罩",3],["单面透明",4],["双面透明",5],["单面未遮挡透明",6],["双面未遮挡透明",7]];class Re extends ${constructor(){super(...arguments);p(this,"_widgetEvent",this.dv(new d.Event))}get widgetEvent(){return this._widgetEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new U("屏幕渲染","是否开启屏幕渲染模式",!1,!1,[this,"screenRender"],!0),new U("尺寸自适应","尺寸是否根据内容自动计算",!1,!1,[this,"sizeByContent"],!0),new se("尺寸大小","尺寸自适应关闭才会生效",!1,!1,[this,"size"],[100,100]),new se("偏移比例","偏移比例(anchor)",!1,!1,[this,"anchor"],[.5,1]),new se("像素偏移","像素偏移(offset)",!1,!1,[this,"offset"],[0,0]),new tt("渲染模式","八种渲染模式(0~7),当Widget中透明度只有(0,1)两种时可以选择2",!1,!1,[this,"renderMode"],N0,0),new tt("漫游旋转类型","三种漫游旋转类型(0,1,2)",!1,!1,[this,"rotationType"],M0,1),new nt("绑定对象","actorTag",!1,!1,[this,"actorTag"]),new nt("插槽名称","socketName",!1,!1,[this,"socketName"]),new Qe("位置偏移","positionOffset(米)",!1,!1,[this,"positionOffset"]),new Qe("相对姿态","rotationOffset(米)",!1,!1,[this,"rotationOffset"])]}}getProperties(e){return[...super.getProperties(e),new H("标签属性","标签对象ESLabel的属性",[new U("屏幕渲染","是否开启屏幕渲染模式",!1,!1,[this,"screenRender"],!0),new U("尺寸自适应","尺寸是否根据内容自动计算",!1,!1,[this,"sizeByContent"],!0),new se("尺寸大小","尺寸自适应关闭才会生效",!1,!1,[this,"size"],[100,100]),new se("偏移比例","偏移比例(anchor)",!1,!1,[this,"anchor"],[.5,1]),new se("像素偏移","像素偏移(offset)",!1,!1,[this,"offset"],[0,0]),new tt("渲染模式","八种渲染模式(0~7),当Widget中透明度只有(0,1)两种时可以选择2",!1,!1,[this,"renderMode"],N0,0),new tt("漫游旋转类型","三种漫游旋转类型(0,1,2)",!1,!1,[this,"rotationType"],M0,1),new C("排序","zOrder排序",!1,!1,[this,"zOrder"],0)])]}}p(Re,"defaults",{...$.defaults,screenRender:!0,size:[100,100],anchor:[.5,.5],sizeByContent:!0,renderMode:0,rotationType:1}),(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),screenRender:!0,size:d.reactArray([100,100]),anchor:d.reactArray([.5,1]),offset:d.reactArray([0,0]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,actorTag:"",socketName:"",positionOffset:d.reactArray([0,0,0]),rotationOffset:d.reactArray([0,0,0])})})(Re||(Re={})),d.extendClassProps(Re.prototype,Re.createDefaultProps);const Jr=class Jr extends Ot{constructor(e){super(e);p(this,"_refreshTilesetEvent",this.dv(new d.Event));p(this,"_tilesetReadyEvent",this.dv(new d.Event));p(this,"_supportEdit",this.dv(d.react(!0)));p(this,"_highlightFeatureEvent",this.dv(new d.Event));p(this,"_highlightFeatureAndFlyToEvent",this.dv(new d.Event));p(this,"_strokeFeatureEvent",this.disposeVar(new d.Event));p(this,"_getFeatureTableEvent",this.dv(new d.Event));p(this,"_featureTableResultEvent",this.dv(new d.Event));p(this,"_getMaterialNameListEvent",this.disposeVar(new d.Event));p(this,"_setFeatureStyleEvent",this.dv(new d.Event));p(this,"_setFeatureColorEvent",this.dv(new d.Event));p(this,"_setFeatureVisableEvent",this.dv(new d.Event));p(this,"_resetFeatureStyleEvent",this.dv(new d.Event));p(this,"setMaterialInfoEvent",this.ad(new d.Event));p(this,"_setMaterialEvent",this.disposeVar(new d.Event));p(this,"_clippingPlanesId",this.dv(d.react("")));p(this,"_clippingPlaneIds",this.dv(d.react([])));p(this,"_flattenedPlaneId",this.dv(d.react("")));p(this,"_flattenedPlaneEnabled",this.dv(d.react(!1)));p(this,"_clippingPlaneId",this.dv(d.react("")));p(this,"_excavateId",this.dv(d.reactArray([])))}get typeName(){return"ES3DTileset"}get defaultProps(){return Jr.createDefaultProps()}updateEditing(){var e;(e=this.viewer)==null||e.startEditing(this,[vt.Translation,vt.Rotation],{callSource:"inner"})}get refreshTilesetEvent(){return this._refreshTilesetEvent}refreshTileset(){this._refreshTilesetEvent.emit()}get tilesetReady(){return this._tilesetReadyEvent}get supportEdit(){return this._supportEdit.value}set supportEdit(e){this._supportEdit.value=e}get supportEditChanged(){return this._supportEdit.changed}get highlightFeatureEvent(){return this._highlightFeatureEvent}highlightFeature(e,n){this._highlightFeatureEvent.emit(e,n)}get highlightFeatureAndFlyToEvent(){return this._highlightFeatureAndFlyToEvent}highlightFeatureAndFlyTo(e,n,i,s){this._highlightFeatureAndFlyToEvent.emit(e,n,i,s)}get strokeFeatureEvent(){return this._strokeFeatureEvent}strokeFeature(e,n){this._strokeFeatureEvent.emit(e,n)}get getFeatureTableEvent(){return this._getFeatureTableEvent}getFeatureTable(){return Promise.race([new Promise(e=>{const n=this.d(this._featureTableResultEvent.donce(e));this._getFeatureTableEvent.emit(),setTimeout(()=>{n(),e(void 0)},2e3)})])}get getMaterialNameListEvent(){return this._getMaterialNameListEvent}getMaterialNameList(){return new Promise(e=>{const n=new d.Destroyable;n.d(this.getMaterialNameListEvent.don(i=>{i!=="start"&&(n.destroy(),e(i))})),this.getMaterialNameListEvent.emit("start"),setTimeout(()=>{n.isDestroyed()||(n.destroy(),e(void 0))},2e3)})}get setFeatureStyleEvent(){return this._setFeatureStyleEvent}setFeatureStyle(e){this._setFeatureStyleEvent.emit(e)}get setFeatureColorEvent(){return this._setFeatureColorEvent}setFeatureColor(e,n){this._setFeatureColorEvent.emit(e,typeof n=="string"?JSON.parse(n):n)}get setFeatureVisableEvent(){return this._setFeatureVisableEvent}setFeatureVisable(e,n){this._setFeatureVisableEvent.emit(e,typeof n=="string"?JSON.parse(n):n)}get resetFeatureStyleEvent(){return this._resetFeatureStyleEvent}resetFeatureStyle(){this._resetFeatureStyleEvent.emit()}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(e){return new Promise(n=>{const i=new d.Destroyable;i.ad(this.setMaterialInfoEvent.donce(s=>{i.destroy(),n(s)})),this._setMaterialEvent.emit(e)})}get clippingPlanesId(){return this._clippingPlanesId.value}set clippingPlanesId(e){this._clippingPlanesId.value=e}get clippingPlanesIdChanged(){return this._clippingPlanesId.changed}get clippingPlaneIds(){return this._clippingPlaneIds.value}set clippingPlaneIds(e){this._clippingPlaneIds.value=e}get clippingPlaneIdsChanged(){return this._clippingPlaneIds.changed}get flattenedPlaneId(){return this._flattenedPlaneId.value}set flattenedPlaneId(e){this._flattenedPlaneId.value=e}get flattenedPlaneIdChanged(){return this._flattenedPlaneId.changed}get flattenedPlaneEnabled(){return this._flattenedPlaneEnabled.value}set flattenedPlaneEnabled(e){this._flattenedPlaneEnabled.value=e}get flattenedPlaneEnabledChanged(){return this._flattenedPlaneEnabled.changed}get clippingPlaneId(){return this._clippingPlaneId.value}set clippingPlaneId(e){this._clippingPlaneId.value=e}get clippingPlaneIdChanged(){return this._clippingPlaneId.changed}get excavateId(){return this._excavateId.value}set excavateId(e){this._excavateId.value=e}get excavateIdChanged(){return this._excavateId.changed}setLight122(){this.czmEnvironmentMapManager={...Ad}}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new Kt("精度","精度.",!1,!1,[this,"maximumScreenSpaceError"],1,[0,256],16),new tt("材质模式","materialMode",!0,!1,[this,"materialMode"],Jr.defaults.materialModes,"normal"),new tt("颜色模式","颜色混合模式",!1,!1,[this,"colorBlendMode"],[["默认","HIGHLIGHT"],["替换","REPLACE"],["混合","MIX"]],"HIGHLIGHT"),new Y("materialOverrideMap","材质替换",!1,!1,[this,"materialOverrideMap"],Jr.defaults.materialOverrideMap)],dataSource:[...e.dataSource,new Y("服务地址","服务地址",!0,!1,[this,"url"],Jr.defaults.url)],coordinate:[...e.coordinate,new U("编辑","编辑",!0,!1,[this,"editing"],!1),new Qe("偏移","偏移量",!0,!1,[this,"offset"],[0,0,0]),new Jh("旋转","旋转",!1,!1,[this,"rotation"],[0,0,0])]}}getProperties(e){return[...super.getProperties(e),new H("ES3DTileset","ES3DTileset",[new Y("服务地址","服务地址",!1,!1,[this,"url"],Jr.defaults.url),new tt("materialMode","materialMode",!1,!1,[this,"materialMode"],Jr.defaults.materialModes),new Y("materialParams","materialParams",!1,!1,[this,"materialParams"],Jr.defaults.materialParams),new C("maximumScreenSpaceError","显示精度,maximumScreenSpaceError",!1,!1,[this,"maximumScreenSpaceError"]),new U("编辑","编辑",!1,!1,[this,"editing"],!1),new li("offset","offset",!0,!1,[this,"offset"]),new li("rotation","rotation",!1,!1,[this,"rotation"]),new Kt("精度","精度.",!1,!1,[this,"maximumScreenSpaceError"],1,[0,256],16),new mt("highlightFeature","highlightFeature",["string","string"],(n,i)=>this.highlightFeature(n,i),["","rgba(255,0,0,1)"]),new mt("setFeatureColor","setFeatureColor",["string","string"],(n,i)=>this.setFeatureColor(n,i),["",""]),new mt("setFeatureVisable","setFeatureVisable",["string","string"],(n,i)=>this.setFeatureVisable(n,i),["",""]),new mt("resetFeatureStyle","resetFeatureStyle",[],()=>this.resetFeatureStyle(),[]),new H("ue","ue",[new mt("refreshTileset","refreshTileset",[],()=>this.refreshTileset(),[]),new nt("actorTag","actorTag",!1,!1,[this,"actorTag"]),new U("是否高亮","是否高亮.",!1,!1,[this,"highlight"]),new it("highlightColor"," highlightColor.",!1,!1,[this,"highlightColor"]),new C("highlightID","highlightID",!1,!1,[this,"highlightID"]),new Y("materialOverrideMap","材质替换",!1,!1,[this,"materialOverrideMap"],Jr.defaults.materialOverrideMap)]),new H("czm","czm",[new H("可视化","可视化",[new se("czmImageBasedLightingFactor","反射强度 ,imageBasedLightingFactor",!1,!1,[this,"czmImageBasedLightingFactor"]),new C("czmAtmosphereScatteringIntensity","大气散射强度 ,atmosphereScatteringIntensity",!1,!1,[this,"czmAtmosphereScatteringIntensity"]),new Y("czmEnvironmentMapManager","动态环境贴图管理器",!1,!1,[this,"czmEnvironmentMapManager"]),new C("czmMaximumMemoryUsage","最大内存,maximumMemoryUsage",!1,!1,[this,"czmMaximumMemoryUsage"])]),new H("常用","常用",[new tt("czmClassificationType","Determines whether terrain, 3D Tiles or both will be classified by this tileset. See Cesium3DTileset#czmClassificationType for details about restrictions and limitations.",!0,!1,[this,"czmClassificationType"],[["NONE","NONE"],["TERRAIN","TERRAIN"],["CESIUM_3D_TILE","CESIUM_3D_TILE"],["BOTH","BOTH"]]),new Y("czmStyle","czmStyle",!1,!1,[this,"czmStyleJson"]),new U("czmBackFaceCulling","czmBackFaceCulling",!1,!1,[this,"czmBackFaceCulling"]),new U("czmSkipLevelOfDetail","czmSkipLevelOfDetail",!1,!1,[this,"czmSkipLevelOfDetail"]),new tt("colorBlendMode","颜色混合模式",!1,!1,[this,"colorBlendMode"],[["HIGHLIGHT","HIGHLIGHT"],["REPLACE","REPLACE"],["MIX","MIX"]],"HIGHLIGHT"),new C("cacheBytes","最大缓存占用,超过的会自动卸载,但是视野范围内能看见的保留。单位字节。Cesium1.110(含)以后的版本起作用。",!1,!1,[this,"cacheBytes"],536870912)]),new H("调试信息","调试信息",[new U("czmDebugShowBoundingVolume","For debugging only.When true, renders the bounding volume for each tile.",!1,!1,[this,"czmDebugShowBoundingVolume"]),new U("czmDebugShowContentBoundingVolume","czmDebugShowContentBoundingVolume.",!1,!1,[this,"czmDebugShowContentBoundingVolume"])]),new H("clippingPlanes","clippingPlanes",[new U("clippingPlaneEnabled","clippingPlaneEnabled",!1,!1,[this,"clippingPlaneEnabled"]),new U("unionClippingRegions","unionClippingRegions",!1,!1,[this,"unionClippingRegions"]),new it("clippingPlaneEdgeColor","clippingPlaneEdgeColor",!1,!1,[this,"clippingPlaneEdgeColor"]),new C("clippingPlaneEdgeWidth","clippingPlaneEdgeWidth",!1,!1,[this,"clippingPlaneEdgeWidth"])])])])]}};p(Jr,"type",Jr.register("ES3DTileset",Jr,{chsName:"3DTileset",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"})),p(Jr,"supportEditingModes",[...Ot.supportEditingModes,vt.Translation,vt.Rotation]),p(Jr,"defaults",{...Ot.defaults,url:"",actorTag:"",materialMode:"normal",materialModes:[["常规","normal"],["科技感","technology"]],offset:[0,0,0],materialParams:{baseColor:[0,.5,1]},cacheBytes:536870912,materialOverrideMap:{},featureIdLabel:0,splitDirection:"NONE",splitDirectionEnum:[["LEFT","LEFT"],["NONE","NONE"],["RIGHT","RIGHT"]]});let Je=Jr;(r=>{r.createDefaultProps=()=>({...Ot.createDefaultProps(),url:"",actorTag:"",materialMode:"normal",highlight:!1,maximumScreenSpaceError:16,highlightID:0,highlightColor:d.reactArray([1,0,0,1]),offset:d.reactArrayWithUndefined(void 0),rotation:d.reactArray([0,0,0]),czmImageBasedLightingFactor:d.reactArray([1,1]),czmEnvironmentMapManager:d.reactJsonWithUndefined(void 0),czmLuminanceAtZenith:2,czmAtmosphereScatteringIntensity:2,czmMaximumMemoryUsage:512,czmClassificationType:"NONE",czmStyleJson:d.reactJson({}),czmBackFaceCulling:!0,czmDebugShowBoundingVolume:!1,czmDebugShowContentBoundingVolume:!1,czmSkipLevelOfDetail:!1,cacheBytes:536870912,colorBlendMode:"HIGHLIGHT",clippingPlaneEnabled:!0,unionClippingRegions:!0,clippingPlaneEdgeColor:d.reactArray([1,1,1,1]),clippingPlaneEdgeWidth:2,materialParams:{baseColor:[0,.5,1]},allowPicking:!0,materialOverrideMap:d.reactJsonWithUndefined(void 0),featureIdLabel:0,splitDirection:"NONE"})})(Je||(Je={})),d.extendClassProps(Je.prototype,Je.createDefaultProps);const Rs=class Rs extends ${constructor(e){super(e);p(this,"_isFlyInCreated",this.dv(d.react(!1)));p(this,"_readyEvent",this.dv(new d.Event));this.collision=!1,this.d(this.createdEvent.don(()=>{setTimeout(()=>{if((this.editing??!1)||!this.position){const i=this.dv(d.createNextAnimateFrameEvent(this.positionChanged,this.editingChanged));this.d(i.donce(()=>{this.editing||!this.position||this.isFlyInCreated&&this.flyTo()}))}else{if(!this.isFlyInCreated)return;this.flyTo()}},1e3)}))}get typeName(){return"ESAlarm"}get defaultProps(){return Rs.createDefaultProps()}get isFlyInCreated(){return this._isFlyInCreated.value}set isFlyInCreated(e){this._isFlyInCreated.value=e}get isFlyInCreatedChanged(){return this._isFlyInCreated.changed}get readyEvent(){return this._readyEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new tt("模式","mode",!1,!1,[this,"mode"],Rs.defaults.modes,"cylinder"),new C("半径","radius",!1,!1,[this,"radius"],10)]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new tt("mode","mode",!1,!1,[this,"mode"],Rs.defaults.modes),new C("半径","radius",!1,!1,[this,"radius"])])]}};p(Rs,"type",Rs.register("ESAlarm",Rs,{chsName:"报警",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警告类"})),p(Rs,"defaults",{...$.defaults,modes:[["柱状警告","cylinder"],["圆形警告","circle"]],radius:10,czmAnimations:[{index:0,loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration * 2"}]});let eo=Rs;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),mode:"cylinder",radius:10})})(eo||(eo={})),d.extendClassProps(eo.prototype,eo.createDefaultProps);const xi=class xi extends ${get typeName(){return"ESApertureEffect"}get defaultProps(){return xi.createDefaultProps()}constructor(t){super(t),this.collision=!1}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new C("半径","radius",!1,!1,[this,"radius"],1),new tt("模式","mode",!1,!1,[this,"mode"],xi.defaults.modes,xi.defaults.mode)]}}getProperties(t){return[...super.getProperties(t),new C("半径","radius",!1,!1,[this,"radius"]),new tt("模式","mode",!1,!1,[this,"mode"],xi.defaults.modes,xi.defaults.mode)]}};p(xi,"type",xi.register("ESApertureEffect",xi,{chsName:"光圈特效",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"光圈特效"})),p(xi,"defaults",{...$.defaults,radius:1,mode:"scan",modes:[["扫描","scan"],["扩散","diffuse"]]});let ro=xi;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),radius:1,mode:"scan"})})(ro||(ro={})),d.extendClassProps(ro.prototype,ro.createDefaultProps);const xn=class xn extends Et{constructor(e){super(e);p(this,"editingBindMode","circular");this.collision=xn.defaults.collision,this.filled=xn.defaults.filled,this.stroked=xn.defaults.stroked,this.fillStyle=xn.defaults.fillStyle,this.strokeStyle=xn.defaults.strokeStyle}get typeName(){return"ESGeoPolygon"}get defaultProps(){return xn.createDefaultProps()}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new C("面积","面积",!1,!0,[this,"area"]),new C("周长","周长",!1,!0,[this,"perimeter"])]}}getProperties(e){return[...super.getProperties(e),new H("ESGeoPolygon","ESGeoPolygon",[new C("面积","面积",!1,!0,[this,"area"]),new C("周长","周长",!1,!0,[this,"perimeter"])])]}};p(xn,"type",xn.register("ESGeoPolygon",xn,{chsName:"地理多边形",tags:["ESObjects"],description:"地理多边形"})),p(xn,"supportEditingModes",[...Et.supportEditingModes,vt.CircularAppend,vt.CircularInsert]),p(xn,"defaults",{...Et.defaults,fillStyle:{color:[1,1,1,.5],material:"",materialParams:{},ground:!1},strokeStyle:{width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1},filled:!0,stroked:!1,collision:!1});let At=xn;(r=>{r.createDefaultProps=()=>({...Et.createDefaultProps()})})(At||(At={})),d.extendClassProps(At.prototype,At.createDefaultProps);const Oi=class Oi extends At{get typeName(){return"ESAreaMeasurement"}get defaultProps(){return Oi.createDefaultProps()}get fillMaterial(){return this.fillStyle.material}set fillMaterial(t){this.fillStyle={...this.fillStyle,material:t}}get fillMaterialParams(){return this.fillStyle?this.fillStyle.materialParams:Oi.defaults.fillStyle.materialParams}set fillMaterialParams(t){this.fillStyle={...this.fillStyle??Oi.defaults.fillStyle,materialParams:t??Oi.defaults.fillStyle.materialParams}}constructor(t){super(t),this.fillStyle.ground=!0,this.strokeStyle.width=2}getProperties(t){return[...super.getProperties(t)]}};p(Oi,"type",Oi.register("ESAreaMeasurement",Oi,{chsName:"面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"面积测量"})),p(Oi,"defaults",{...At.defaults,fillStyle:{color:[1,1,1,1],material:"Material'/EarthSDKForUE/M_ES_Material.M_ES_Material'",materialParams:{Opacity:.4},ground:!1},unitsMode:[["平方米","SquareMeter"],["平方千米","SquareKilometer"],["亩","MU"],["公顷","Hectare"],["周长米","PerimeterMeter"],["周长千米","PerimeterKilometer"]]}),p(Oi,"createDefaultProps",()=>({...At.createDefaultProps(),stroked:!0,filled:!0,units:d.reactArray(["SquareKilometer","PerimeterKilometer"])}));let Rh=Oi;d.extendClassProps(Rh.prototype,Rh.createDefaultProps);const vl=class vl extends ${get typeName(){return"ESBlastParticleSystem"}get defaultProps(){return vl.createDefaultProps()}constructor(t){super(t)}getESProperties(){return{...{...super.getESProperties()},defaultMenu:"general"}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new H("czm","czm",[new ku("图片","The URI, HTMLImageElement, or HTMLCanvasElement to use for the billboard.",!1,!1,[this,"image"]),new Qe("偏移","translation",!1,!1,[this,"translation"])])])]}};p(vl,"type",vl.register("ESBlastParticleSystem",vl,{chsName:"粒子爆炸",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子爆炸"})),p(vl,"defaults",{...$.defaults,image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",translation:[0,0,0]});let no=vl;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",positionEditing:void 0,translation:d.reactArray([0,0,0])})})(no||(no={})),d.extendClassProps(no.prototype,no.createDefaultProps);const yr=class yr extends ${get typeName(){return"ESBoxClipping"}get defaultProps(){return{...yr.createDefaultProps()}}constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new U("反转","reverse",!1,!1,[this,"reverse"],yr.defaults.reverse),new Qe("尺寸","长宽高",!1,!1,[this,"size"],yr.defaults.size),new it("边框颜色","edgeColor",!1,!1,[this,"edgeColor"],yr.defaults.edgeColor),new C("边框宽度","edgeWidth",!1,!1,[this,"edgeWidth"],yr.defaults.edgeWidth),new nt("瓦片图层","targetID",!1,!1,[this,"targetID"],yr.defaults.targetID)]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new U("reverse","reverse",!1,!1,[this,"reverse"],yr.defaults.reverse),new it("edgeColor","edgeColor",!1,!1,[this,"edgeColor"],yr.defaults.edgeColor),new C("edgeWidth","edgeWidth",!1,!1,[this,"edgeWidth"],yr.defaults.edgeWidth),new Qe("尺寸","长宽高",!1,!1,[this,"size"],yr.defaults.size),new nt("targetID","targetID",!1,!1,[this,"targetID"],yr.defaults.targetID)])]}};p(yr,"type",yr.register("ESBoxClipping",yr,{chsName:"体剖切",tags:["ESObjects","_ES_Impl_Cesium"],description:"体剖切,体裁剪,体裁切,盒裁切"})),p(yr,"defaults",{...$.defaults,reverse:!1,edgeColor:[1,1,1,1],edgeWidth:1,size:[10,10,10],targetID:""});let io=yr;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),reverse:!1,edgeColor:d.reactArray([1,1,1,1]),edgeWidth:2,size:d.reactArray([10,10,10]),targetID:""})})(io||(io={})),d.extendClassProps(io.prototype,io.createDefaultProps);const Fs=class Fs extends ${constructor(){super(...arguments);p(this,"_thumbnail",this.dv(d.react("")));p(this,"_duration",this.dv(d.react(1)));p(this,"_resetWithCurrentCameraEvent",this.dv(new d.Event));p(this,"_captureEvent",this.dv(new d.Event))}get typeName(){return"ESCameraView"}get defaultProps(){return Fs.createDefaultProps()}get thumbnail(){return this._thumbnail.value}set thumbnail(e){this._thumbnail.value=e}get thumbnailChanged(){return this._thumbnail.changed}get duration(){return this._duration.value}set duration(e){this._duration.value=e}get durationChanged(){return this._duration.changed}flyIn(e=1,n="default"){this.flyInEvent.emit(e,-1,n)}get resetWithCurrentCameraEvent(){return this._resetWithCurrentCameraEvent}resetWithCurrentCamera(){this._resetWithCurrentCameraEvent.emit()}get captureEvent(){return this._captureEvent}capture(e,n){this._captureEvent.emit(e,n)}execOnCreating(){this.resetWithCurrentCamera()}async initByCurrent(){this.resetWithCurrentCamera()}getProperties(e){return[...super.getProperties(e),new H("ESCameraView","ESCameraView",[new mt("设置为当前视角","resetWithCurrentCamera",[],()=>this.resetWithCurrentCamera(),[]),new mt("获取缩略图","获取缩略图",["number","number"],(n,i)=>this.capture(n,i),[Fs.defaults.thumbnailWidth,Fs.defaults.thumbnailHeight]),new nt("缩略图","缩略图",!0,!1,[this,"thumbnail"]),new C("飞行时间","飞行时间(秒)",!0,!1,[this,"duration"])])]}};p(Fs,"type",Fs.register("ESCameraView",Fs,{chsName:"视角",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角"})),p(Fs,"defaults",{...$.defaults,thumbnailWidth:64,thumbnailHeight:64,duration:1,thumbnail:""});let va=Fs;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps()})})(va||(va={})),d.extendClassProps(va.prototype,va.createDefaultProps);class Qc extends d.Destroyable{constructor(e,n,i){super();p(this,"_view",this.dv(new va));if(this.d(e.components.disposableAdd(this._view)),this._view.name=(i==null?void 0:i.name)??`视角${e.views.length+1}`,n){const o=this._view,l=n;o.duration=l.duration??1,o.position=l.position,o.rotation=l.rotation??[0,0,0],o.thumbnail=l.thumbnail??"",o.name=l.name}else{const o=(i==null?void 0:i.size)??[64,64];this.d(d.nextAnimateFrame(()=>{this._view.resetWithCurrentCamera(),this._view.capture(o[0],o[1])}))}const s=this._view,a=this.dv(d.createNextAnimateFrameEvent(s.durationChanged,s.positionChanged,s.rotationChanged,s.thumbnailChanged,s.nameChanged));this.d(a.don(()=>e.emitViewsWarpper()))}get view(){return this._view}get viewInfo(){const e=this._view;return{duration:e.duration,position:e.position,rotation:e.rotation,thumbnail:e.thumbnail,name:e.name}}}const Kr=class Kr extends ft{constructor(e){super(e);p(this,"_currentViewIndex",this.dv(d.react(-1)));p(this,"_viewWrappers",this.dv(new d.ObservableArray));p(this,"_currentViewWrapper",this.dv(d.react(void 0)));p(this,"_container",this.dv(d.react(void 0)));{const n=this.dv(d.createProcessingFromAsyncFunc(async s=>{var a;do{if(!this.flyToNextView())break;const o=this.intervalTime??Kr.defaults.intervalTime,u=((((a=this._currentViewWrapper.value)==null?void 0:a.viewInfo.duration)??0)+o)*1e3;await s.promise(d.sleep(u))}while(!0);this.playing=!1})),i=()=>{this.playing?n.restart():n.cancel()};i(),this.d(this.playingChanged.don(i))}{const n=()=>{if(!this._currentViewWrapper.value)return;this._viewWrappers.indexOf(this._currentViewWrapper.value)===-1&&(this._currentViewWrapper.value=void 0)};n(),this.d(this._viewWrappers.changedEvent.don(n))}{const n=()=>{const i=this._currentViewWrapper.value;this._currentViewIndex.value=i?this._getIndex(i):-1};n(),this.d(this._viewWrappers.changedEvent.don(n)),this.d(this._currentViewWrapper.changed.don(n))}this.d(()=>{this.clearAllViews()})}get typeName(){return"ESCameraViewCollection"}get defaultProps(){return Kr.createDefaultProps()}get json(){return{...this._innerGetJson(),views:this.views}}set json(e){this._innerSetJson(e),this.views=e.views}get currentViewIndex(){return this._currentViewIndex.value}get currentViewIndexChanged(){return this._currentViewIndex.changed}emitViewsWarpper(){this._viewWrappers.changedEvent.emit(this._viewWrappers)}get container(){return this._container.value}get containerChanged(){return this._container.changed}set container(e){this._container.value=e}get views(){return up(this._viewWrappers,e=>e.viewInfo)}get viewsChanged(){return this._viewWrappers.changedEvent}set views(e){if(e.length===this._viewWrappers.length){const n=this._viewWrappers;if(e.every((i,s)=>{const a=n.get(s).view;return i.duration===a.duration&&mf(i.position,a.position)&&mf(i.rotation,a.rotation)&&i.thumbnail===a.thumbnail&&i.name===a.name}))return}this.clearAllViews();for(let n of e)this._viewWrappers.push(new Qc(this,n))}_getIndex(e){return this._viewWrappers.indexOf(e)}clearAllViews(){for(let e of this._viewWrappers)e.destroy();this._viewWrappers.length=0}add(e=`视角${this.views.length+1}`,n=[64,64]){this._viewWrappers.push(new Qc(this,void 0,{name:e,size:n}))}update(e,n,i=[64,64]){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const s=this._viewWrappers.get(e);return n&&(s.view.name=n),s.view.resetWithCurrentCamera(),s.view.capture(i[0],i[1]),!0}addView(){this._viewWrappers.push(new Qc(this))}insertView(e){if(this._viewWrappers.length+1<=e||e<0){console.error("this._views.length <= index || index < 0");return}this._viewWrappers.splice(e,0,new Qc(this))}setCurrentView(e){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const n=this._viewWrappers.get(e);return this._currentViewWrapper.value=n,!0}resetView(e){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const n=this._viewWrappers.get(e);n.view.resetWithCurrentCamera(),n.view.capture()}resetViewName(e,n){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const i=this._viewWrappers.get(e);i.view.name=n}updateView(e,n){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const i=this._viewWrappers.get(e);return i.view.position=n.position,i.view.rotation=n.rotation??[0,0,0],i.view.duration=n.duration??1,i.view.thumbnail=n.thumbnail??"",i.view.name=n.name??"",!0}flyToView(e){if(this.setCurrentView(e)){if(!this._currentViewWrapper.value)throw new Error("this._currentViewWrapper.value");const n=this._currentViewWrapper.value.view.duration;this._currentViewWrapper.value.view.flyIn(n,this.flyMode??Kr.defaults.flyMode)}}flyToPrevView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const n=this._getIndex(e);return this.loop??Kr.defaults.loop?(this.flyToView((this._viewWrappers.length+n-1)%this._viewWrappers.length),!0):n-1<0?!1:(this.flyToView(n-1),!0)}moveToPreView(){const e=this._currentViewWrapper.value;if(!e)return;const n=this._getIndex(e);if(n===0)return;const i=this._viewWrappers.splice(n-1,1,e)[0];this._viewWrappers.set(n,i)}moveToNextView(){const e=this._currentViewWrapper.value;if(!e)return;const n=this._getIndex(e);if(n===this._viewWrappers.length-1)return;const i=this._viewWrappers.splice(n+1,1,e)[0];this._viewWrappers.set(n,i)}flyToNextView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const n=this._getIndex(e);return this.loop??Kr.defaults.loop?(this.flyToView((n+1)%this._viewWrappers.length),!0):n+1>this._viewWrappers.length-1?!1:(this.flyToView(n+1),!0)}stop(){this._currentViewWrapper.value=void 0,this.playing=!1}deleteView(e){if(e<0||e>=this._viewWrappers.length){console.warn("index < 0 || index >= this._viewWrappers.length");return}this._viewWrappers.get(e).destroy(),this._viewWrappers.splice(e,1)}deleteCurrentView(){const e=this._currentViewWrapper.value;if(!e){console.warn("!this._currentViewWrapper.value");return}const n=this._getIndex(e);if(n===-1){console.warn("index === -1");return}this.deleteView(n)}transitionImageUrl(e){return ft.context.getStrFromEnv(e)}getProperties(e){return[...super.getProperties(e),new H("ESCameraViewCollection","ESCameraViewCollection",[new tt("飞行模式","flyMode",!1,!1,[this,"flyMode"],Kr.defaults.flyModes,Kr.defaults.flyMode),new mt("添加视角","添加视角",[],()=>this.addView(),[]),new mt("插入视角","插入视角",["number"],n=>this.insertView(n),[0]),new mt("清空所有视角","清空所有视角",[],()=>this.clearAllViews(),[]),new mt("当前位置插入视角","当前位置插入视角",[],()=>this.insertView(this.currentViewIndex+1),[]),new mt("上一个视角","上一个视角",[],()=>this.flyToPrevView(),[]),new mt("下一个视角","下一个视角",[],()=>this.flyToNextView(),[]),new mt("当前视角移动到上一个视角","当前视角移动到上一个视角",[],()=>this.moveToPreView(),[]),new mt("当前视角移动到下一个视角","当前视角移动到下一个视角",[],()=>this.moveToNextView(),[]),new mt("飞入指定视角","飞入指定视角",["number"],n=>this.flyToView(n),[0]),new mt("设置当前视角","设置当前视角",["number"],n=>this.setCurrentView(n),[0]),new mt("删除当前视角","删除当前视角",[],()=>this.deleteCurrentView(),[]),new mt("删除指定视角","删除指定视角",["number"],n=>this.deleteView(n),[0]),new mt("重置视角","重置视角",["number"],n=>this.resetView(n),[0]),new C("当前序号","当前序号",!1,!0,[this,"currentViewIndex"]),new ap("播放","播放",[this,"playing"],()=>this.stop(),[this,"loop"],Kr.defaults),new U("是否播放","是否播放.",!1,!1,[this,"playing"]),new mt("停止","停止",[],()=>this.stop(),[]),new U("是否循环","是否循环.",!1,!1,[this,"loop"]),new C("间隔时间","间隔时间(s)",!1,!1,[this,"intervalTime"]),new Y("视角集合","类型为ESJViewInfo[]",!0,!1,[this,"views"],Kr.defaults.views)])]}};p(Kr,"type",Kr.register("ESCameraViewCollection",Kr,{chsName:"视角集合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角集合"})),p(Kr,"defaults",{...ft.defaults,loop:!0,playing:!1,intervalTime:5,duration:1,views:[],flyMode:"default",flyModes:[["默认","default"],["直线飞行","uniform"]]});let ya=Kr;(r=>{r.createDefaultProps=()=>({...ft.createDefaultProps(),playing:!1,loop:!0,intervalTime:5,flyMode:"default"})})(ya||(ya={})),d.extendClassProps(ya.prototype,ya.createDefaultProps);const yl=class yl extends ${constructor(e){super(e);p(this,"editingBindMode","doublePoints")}get typeName(){return"ESCameraVisibleRange"}get defaultProps(){return yl.createDefaultProps()}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new C("宽高比","aspectRatio",!1,!1,[this,"aspectRatio"],1.77778),new C("横向夹角","fov",!1,!1,[this,"fov"],90),new C("视野长度","far",!1,!1,[this,"far"],100),new C("近面距离","near",!1,!1,[this,"near"],5)]}}getProperties(e){return[...super.getProperties(e),new C("横向夹角","fov",!1,!1,[this,"fov"]),new C("宽高比","aspectRatio",!1,!1,[this,"aspectRatio"]),new C("视野长度","far",!1,!1,[this,"far"]),new C("近面距离","near",!1,!1,[this,"near"])]}};p(yl,"type",yl.register("ESCameraVisibleRange",yl,{chsName:"摄像头可视域",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"摄像头可视域"})),p(yl,"defaults",{...$.defaults,fov:90,aspectRatio:1.77778,far:100,near:5,collision:!1});let so=yl;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,collision:!1})})(so||(so={})),d.extendClassProps(so.prototype,so.createDefaultProps);const Gs=class Gs extends ${get typeName(){return"ESCar"}get defaultProps(){return Gs.createDefaultProps()}constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new tt("模式","mode",!1,!1,[this,"mode"],Gs.defaults.modeEnum,"policeCar")]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new tt("mode","mode",!1,!1,[this,"mode"],Gs.defaults.modeEnum)])]}};p(Gs,"type",Gs.register("ESCar",Gs,{chsName:"车辆",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警车等基础车辆模型"})),p(Gs,"defaults",{...$.defaults,modeEnum:[["警车","policeCar"]],mode:"policeCar"});let ao=Gs;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),mode:"policeCar",allowPicking:!0})})(ao||(ao={})),d.extendClassProps(ao.prototype,ao.createDefaultProps);const Pa=class Pa extends Et{constructor(e){super(e);p(this,"editingBindMode","circular");this.fillGround=!0}get typeName(){return"ESClassification"}get defaultProps(){return Pa.createDefaultProps()}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new C("高度","高度",!1,!1,[this,"height"],10)],coordinate:[...e.coordinate,new C("面积","面积",!1,!0,[this,"area"]),new C("周长","周长",!1,!0,[this,"perimeter"])]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new C("高度","高度",!1,!1,[this,"height"])])]}};p(Pa,"type",Pa.register("ESClassification",Pa,{chsName:"倾斜单体化",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"平尾箭头"})),p(Pa,"supportEditingModes",[...Et.supportEditingModes,vt.CircularAppend,vt.CircularInsert,vt.HeightModify]),p(Pa,"defaults",{...Et.defaults,fillStyle:{material:"",materialParams:{},ground:!0,color:[1,1,1,1]},filled:!0});let _a=Pa;(r=>{r.createDefaultProps=()=>({...Et.createDefaultProps(),height:10,filled:!0})})(_a||(_a={})),d.extendClassProps(_a.prototype,_a.createDefaultProps);const _l=class _l extends ${get typeName(){return"ESClippingPlane"}get defaultProps(){return _l.createDefaultProps()}constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new U("显示箭头","显示箭头",!1,!1,[this,"showArrow"],!0),new it("线框颜色","edgeColor",!1,!1,[this,"edgeColor"],[1,1,1,1]),new C("线框宽度","edgetWidth",!1,!1,[this,"edgetWidth"],2),new C("裁剪宽度","width",!1,!1,[this,"width"],200),new C("裁剪高度","height",!1,!1,[this,"height"],200),new nt("瓦片图层","targetID",!1,!1,[this,"targetID"],"")]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new H("czm","czm",[new U("显示箭头","显示箭头",!1,!1,[this,"showArrow"]),new it("edgeColor","edgeColor",!1,!1,[this,"edgeColor"]),new C("edgetWidth","edgetWidth",!1,!1,[this,"edgetWidth"]),new C("width","width",!1,!1,[this,"width"]),new C("height","height",!1,!1,[this,"height"]),new nt("targetID","targetID",!1,!1,[this,"targetID"])])])]}};p(_l,"type",_l.register("ESClippingPlane",_l,{chsName:"裁切",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESClippingPlane"})),p(_l,"defaults",{...$.defaults});let oo=_l;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),showArrow:!0,edgeColor:d.reactArray([1,1,1,1]),edgetWidth:2,width:200,height:200,targetID:""})})(oo||(oo={})),d.extendClassProps(oo.prototype,oo.createDefaultProps);class XC extends d.Destroyable{constructor(t,e,n){super();const i=document.createElement("div");i.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${n.id}) container`);{const l=()=>{const c=` ${e.cssText}
|
|
49
49
|
${e.cssAllInitial?"all: initial;":""}
|
|
50
50
|
${e.show?"":"display: none"}
|
|
51
51
|
`;i.style.cssText=c};l();const u=this.dv(d.createNextAnimateFrameEvent(e.cssAllInitialChanged,e.cssTextChanged,e.showChanged));this.d(u.don(l))}t.appendChild(i),this.d(()=>t.removeChild(i));const s=this.dv(d.createNextAnimateFrameEvent(e.instanceClassChanged,e.containerChanged,e.shadowDomChanged)),a=this.dv(new d.ObjResettingWithEvent(s,()=>{const{instanceClass:l,container:u}=e;if(!l||u)return;let c=i;if(i.firstElementChild&&i.removeChild(i.firstElementChild),e.shadowDom){const h=i.appendChild(document.createElement("div"));h.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${n.id}) container shadowDiv`),c=h.attachShadow({mode:"open"}).appendChild(document.createElement("div")),c.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${n.id}) container shadowDiv div`)}return new l(c,e,n)})),{_updateEvent:o}=e;this.d(o.don(l=>{if(a.obj)try{l(a.obj,e,n)}catch(u){console.error(`ESCustomDiv update error! ${u}`)}}))}}const b0=`class MyDiv {
|
|
@@ -299,14 +299,14 @@ export type ESJTimeIntervalCollectionJsonType = {
|
|
|
299
299
|
};
|
|
300
300
|
|
|
301
301
|
\`\`\`
|
|
302
|
-
`,Ln=class Ln extends Ot{get typeName(){return"ESImageryLayer"}get defaultProps(){return Ln.createDefaultProps()}constructor(t){super(t),this.ad(d.bind([this,"splitDirection"],[this,"czmSplitDirection"]))}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"dataSource",basic:[...t.basic,new C("层级序号","层级序号",!1,!1,[this,"zIndex"],Ln.defaults.zIndex)],dataSource:[...t.dataSource,new Y("影像服务地址","影像服务地址",!1,!1,[this,"url"]),new Rr("矩形范围","西南东北",!0,!1,[this,"rectangle"],Ln.defaults.rectangle),new Kt("最大级别","最大级别.",!0,!1,[this,"maximumLevel"],1,[1,24],Ln.defaults.maximumLevel),new Y("options","options",!0,!1,[this,"options"],Ln.defaults.options),new nt("targetID","targetID",!1,!1,[this,"targetID"],""),new Kt("opacity","opacity",!1,!1,[this,"opacity"],.01,[0,1],1)]}}getProperties(t){return[...super.getProperties(t),new H("ESImageryLayer","ESImageryLayer",[new Y("影像服务地址","影像服务地址",!1,!1,[this,"url"]),new H("通用","通用",[new Rr("矩形范围","西南东北",!0,!1,[this,"rectangle"],Ln.defaults.rectangle),new C("高度","A numeric Property specifying the height.",!1,!1,[this,"height"]),new C("zIndex","层级",!1,!1,[this,"zIndex"]),new nt("actorTag","actorTag",!1,!1,[this,"actorTag"]),new nt("componentTag","componentTag",!1,!1,[this,"componentTag"]),new C("minimumLevel","minimumLevel",!1,!1,[this,"minimumLevel"]),new C("maximumLevel","maximumLevel",!1,!1,[this,"maximumLevel"]),new Y("options","options",!0,!1,[this,"options"],{},D0),new nt("targetID","targetID",!1,!1,[this,"targetID"]),new Kt("opacity","opacity",!1,!1,[this,"opacity"],.01,[0,1],1),new tt("splitDirection","The ImagerySplitDirection split to apply to this layer.",!1,!1,[this,"splitDirection"],Ln.defaults.splitDirectionEnum)]),new H("czm","czm",[new C("透明度","透明度,The alpha blending value of this layer, from 0.0 to 1.0.",!1,!1,[this,"czmAlpha"]),new C("亮度","亮度,The brightness of this layer. 1.0 uses the unmodified imagery color.",!1,!1,[this,"czmBrightness"]),new C("对比度","对比度,The contrast of this layer. 1.0 uses the unmodified imagery color.",!1,!1,[this,"czmContrast"]),new C("色相","色相,The hue of this layer. 0.0 uses the unmodified imagery color. ",!1,!1,[this,"czmHue"]),new C("饱和度","饱和度,The saturation of this layer. 1.0 uses the unmodified imagery color. ",!1,!1,[this,"czmSaturation"]),new C("伽马值","伽马,The gamma correction to apply to this layer. 1.0 uses the unmodified imagery color.",!1,!1,[this,"czmGamma"])])])]}};p(Ln,"type",Ln.register("ESImageryLayer",Ln,{chsName:"影像图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"影像图层"})),p(Ln,"defaults",{...Ot.defaults,url:"",rectangle:[-180,-90,180,90],options:{},zIndex:0,actorTag:"",componentTag:"",minimumLevel:0,maximumLevel:22,targetID:"",opacity:1,splitDirection:"NONE",splitDirectionEnum:[["LEFT","LEFT"],["NONE","NONE"],["RIGHT","RIGHT"]],czmAlpha:1,czmBrightness:1,czmContrast:1,czmHue:0,czmSaturation:1,czmGamma:1,czmSubdomains:[]});let vo=Ln;(r=>{r.createDefaultProps=()=>({...Ot.createDefaultProps(),url:"",rectangle:d.reactJsonWithUndefined(void 0),options:d.reactJsonWithUndefined(void 0),zIndex:0,actorTag:"",componentTag:"",maximumLevel:22,minimumLevel:0,targetID:"",opacity:1,splitDirection:"NONE",czmSplitDirection:"NONE",czmAlpha:1,czmBrightness:1,czmContrast:1,czmHue:0,czmSaturation:1,czmGamma:1})})(vo||(vo={})),d.extendClassProps(vo.prototype,vo.createDefaultProps);const fn=class fn extends ${get typeName(){return"ESLocalSkyBox"}get defaultProps(){return fn.createDefaultProps()}constructor(t){super(t),this.collision=!1,this.allowPicking=!1}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new C("尺寸","圆直径或包围盒边长",!1,!1,[this,"size"],fn.defaults.size),new U("自动跟随","是否跟随相机",!1,!1,[this,"autoFollow"],fn.defaults.autoFollow),new tt("mode","模式",!1,!1,[this,"mode"],fn.defaults.modes,"blueSky")]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new C("size","圆直径或包围盒边长",!1,!1,[this,"size"],fn.defaults.size),new U("autoFollow","是否跟随相机(自动跟随效果为渐变,会在5000米左右消失)",!1,!1,[this,"autoFollow"],fn.defaults.autoFollow),new C("autoOpacityFactor","自动消失系数",!1,!1,[this,"autoOpacityFactor"],fn.defaults.autoOpacityFactor),new tt("mode","模式",!1,!1,[this,"mode"],fn.defaults.modes)])]}};p(fn,"type",fn.register("ESLocalSkyBox",fn,{chsName:"局部天空盒",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"效果类"})),p(fn,"defaults",{...$.defaults,size:1e4,autoFollow:!0,autoOpacityFactor:2,modes:[["baiyun","baiyun"],["blueSky","blueSky"],["clearSky","clearSky"],["dream","dream"],["starrySky","starrySky"],["sunnySky","sunnySky"],["sunSets","sunSets"]]});let yo=fn;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),size:1e4,autoFollow:!0,autoOpacityFactor:2,mode:"blueSky"})})(yo||(yo={})),d.extendClassProps(yo.prototype,yo.createDefaultProps);const Sl=class Sl extends ${constructor(e){super(e);p(this,"_location",this.disposeVar(d.react(void 0)));{const n=()=>{this.location=this.position};n(),this.ad(this.positionChanged.don(n))}}get typeName(){return"ESLocationMeasurement"}get defaultProps(){return Sl.createDefaultProps()}get location(){return this._location.value}set location(e){this._location.value=e}get locationChanged(){return this._location.changed}getProperties(e){return[...super.getProperties(e)]}};p(Sl,"type",Sl.register("ESLocationMeasurement",Sl,{chsName:"位置测量点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"位置测量点"})),p(Sl,"defaults",{...$.defaults});let _o=Sl;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps()})})(_o||(_o={})),d.extendClassProps(_o.prototype,_o.createDefaultProps);const tr=class tr extends ${constructor(e){super(e);p(this,"_player",this.dv(new bi));{const n=tr.defaults;this.d(d.bind([this._player,"loop"],[this,"playingLoop"],i=>i??n.playingLoop,i=>i??n.playingLoop)),this.d(d.bind([this._player,"currentTime"],[this,"currentTime"],i=>i??n.currentTime,i=>i??n.currentTime)),this.d(d.bind([this._player,"duration"],[this,"duration"],i=>i??n.duration,i=>i??n.duration)),this.d(d.bind([this._player,"playing"],[this,"playing"],i=>i??n.playing,i=>i??n.playing)),this.d(d.bind([this._player,"speed"],[this,"playingSpeed"],i=>i??n.playingSpeed,i=>i??n.playingSpeed))}}get typeName(){return"ESParticleSystemPrimitive"}get defaultProps(){return tr.createDefaultProps()}get player(){return this._player}get ratio(){return this._player.ratio}set ratio(e){this._player.ratio=e}get ratioChanged(){return this._player.ratioChanged}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new mt("飞入","飞入",["number"],n=>this.flyTo(n),[1e3]),new Fi("更新回调函数","The callback function to be called each frame to update a particle.",!0,!1,[this,"updateCallback"]),new C("发射率","emissionRate,The number of particles to emit per second.",!0,!1,[this,"emissionRate"],5),new U("是否循环","loop,Whether the particle system should loop its bursts when it is complete.",!0,!1,[this,"loop"],!0),new C("等级","scale,Sets the scale to apply to the image of the particle for the duration of its particleLife.",!0,!1,[this,"particleScale"],1),new C("初始等级","startScale,The initial scale to apply to the image of the particle at the beginning of its life.",!0,!1,[this,"startScale"]),new C("结束等级","endScale,The final scale to apply to the image of the particle at the end of its life.",!0,!1,[this,"endScale"],tr.defaults.endScale),new it("颜色","Sets the color of a particle for the duration of its particleLife.",!0,!1,[this,"color"]),new it("初始颜色","The color of the particle at the beginning of its life.",!0,!1,[this,"startColor"]),new it("结束颜色","The color of the particle at the end of its life.",!0,!1,[this,"endColor"]),new U("尺寸单位为米","Sets if the size of particles is in meters or pixels. true to size the particles in meters; otherwise, the size is in pixels.",!0,!1,[this,"sizeInMeters"]),new C("速度","speed,If set, overrides the minimumSpeed and maximumSpeed inputs with this value.",!0,!1,[this,"speed"],1),new C("最小速度","minimumSpeed,Sets the minimum bound in meters per second above which a particles actual speed will be randomly chosen.",!0,!1,[this,"minimumSpeed"]),new C("最大速度","maximumSpeed,Sets the maximum bound in meters per second below which a particles actual speed will be randomly chosen.",!0,!1,[this,"maximumSpeed"]),new C("生命周期","lifetime,How long the particle system will emit particles, in seconds.",!0,!1,[this,"lifetime"],Number.MAX_VALUE),new C("粒子生命周期","particleLife,If set, overrides the minimumParticleLife and maximumParticleLife inputs with this value.",!0,!1,[this,"particleLife"],tr.defaults.particleLife),new C("最小粒子生命周期","minimumParticleLife,Sets the minimum bound in seconds for the possible duration of a particles life above which a particles actual life will be randomly chosen.",!0,!1,[this,"minimumParticleLife"]),new C("最大粒子生命周期","maximumParticleLife,Sets the maximum bound in seconds for the possible duration of a particles life below which a particles actual life will be randomly chosen.",!0,!1,[this,"maximumParticleLife"]),new C("块数量","mass,Sets the minimum and maximum mass of particles in kilograms.",!0,!1,[this,"mass"],1),new C("最小块数量","minimumMass,Sets the minimum bound for the mass of a particle in kilograms. A particles actual mass will be chosen as a random amount above this value.",!0,!1,[this,"minimumMass"]),new C("最大块数量","maximumMass,Sets the maximum mass of particles in kilograms. A particles actual mass will be chosen as a random amount below this value.",!0,!1,[this,"maximumMass"]),new se("图片尺寸","imageSize",!0,!1,[this,"imageSize"],tr.defaults.imageSize),new se("最小图片尺寸","minimumImageSize",!0,!1,[this,"minimumImageSize"]),new se("最大图片尺寸","maximumImageSize",!0,!1,[this,"maximumImageSize"]),new ku("图片","The URI, HTMLImageElement, or HTMLCanvasElement to use for the billboard.",!0,!1,[this,"image"],tr.defaults.image),new Qe("偏移","translation",!0,!1,[this,"translation"],[0,0,0]),new df("bursts","bursts",!0,!1,[this,"bursts"]),new Y("emitter","emitter",!1,!1,[this,"emitter"],tr.defaults.emitter)]),new H("播放器","播放器",[new C("播放比率","播放比率(0-1)",!0,!1,[this,"ratio"],tr.defaults.ratio),new Yh("播放器","播放器",[this,"playing"],[this,"ratio"],[this,"playingLoop"]),new U("是否循环","是否循环.",!0,!1,[this,"playingLoop"],tr.defaults.playingLoop),new C("当前时间","当前时间",!0,!1,[this,"currentTime"],tr.defaults.currentTime),new C("过渡时间","过渡时间",!0,!1,[this,"duration"],tr.defaults.duration),new U("是否播放","是否播放.",!0,!1,[this,"playing"],tr.defaults.playing),new C("播放速度","播放速度.",!0,!1,[this,"playingSpeed"],tr.defaults.playingSpeed)])]}};p(tr,"type",tr.register("ESParticleSystemPrimitive",tr,{chsName:"粒子",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通过Cesium的Primitive API 实现的粒子特效。"})),p(tr,"defaults",{...$.defaults,playingLoop:!0,currentTime:0,playerCurrentTime:0,duration:6e3,playingSpeed:1,playing:!0,ratio:0,particleLife:.5,endScale:4,imageSize:[20,20],image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",emitter:{type:"CircleEmitter",radius:.5}});let wo=tr;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),emitter:d.reactJsonWithUndefined(void 0),bursts:d.reactArrayCollectionWithUndefined(void 0),translation:d.reactArrayWithUndefined(void 0),positionEditing:void 0,image:void 0,imageSize:d.reactArrayWithUndefined(void 0),minimumImageSize:d.reactArrayWithUndefined(void 0),maximumImageSize:d.reactArrayWithUndefined(void 0),updateCallback:void 0,emissionRate:void 0,loop:void 0,particleScale:void 0,startScale:void 0,endScale:void 0,color:d.reactArrayWithUndefined(void 0),startColor:d.reactArrayWithUndefined(void 0),endColor:d.reactArrayWithUndefined(void 0),sizeInMeters:void 0,speed:void 0,minimumSpeed:void 0,maximumSpeed:void 0,lifetime:void 0,particleLife:void 0,minimumParticleLife:void 0,maximumParticleLife:void 0,mass:void 0,minimumMass:void 0,maximumMass:void 0,playingLoop:void 0,currentTime:void 0,duration:void 0,playingSpeed:void 0,playing:void 0})})(wo||(wo={})),d.extendClassProps(wo.prototype,wo.createDefaultProps);const dn=class dn extends Re{constructor(e){super(e);p(this,"initialStyle",this.ad(d.reactJsonWithUndefined(void 0)));p(this,"_getInitialStyleEvent",this.disposeVar(new d.Event))}get typeName(){return"ESPoi2D"}get defaultProps(){return dn.createDefaultProps()}get getInitialStyleEvent(){return this._getInitialStyleEvent}getInitialStyle(){return Promise.race([new Promise(e=>{const n=this.d(this.initialStyle.changed.disposableOnce(e));this.getInitialStyleEvent.emit(),setTimeout(()=>{n(),e(void 0)},2e3)})])}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new tt("模式","mode",!1,!1,[this,"mode"],dn.defaults.modes,dn.defaults.mode),new Y("样式","style",!1,!1,[this,"style"],dn.defaults.style),new U("自动锚点对齐","autoAnchor",!1,!1,[this,"autoAnchor"],dn.defaults.autoAnchor)]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new tt("模式","mode",!1,!1,[this,"mode"],dn.defaults.modes),new Y("样式","style",!1,!1,[this,"style"],dn.defaults.style),new U("自动锚点对齐","autoAnchor",!1,!1,[this,"autoAnchor"],dn.defaults.autoAnchor)])]}};p(dn,"type",dn.register("ESPoi2D",dn,{chsName:"ESPoi2D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),p(dn,"defaults",{...Re.defaults,modes:[["自定义","Custom"],["SquareH01","SquareH01"],["SquareH02","SquareH02"],["SquareV01","SquareV01"],["SquareV02","SquareV02"],["SquareV03","SquareV03"],["SquareV04","SquareV04"],["Flag01","Flag01"],["Flag02","Flag02"],["Linear01","Linear01"],["Linear02","Linear02"],["Linear03","Linear03"],["CircularH01","CircularH01"],["CircularH02","CircularH02"],["CircularV01","CircularV01"],["CircularV02","CircularV02"],["CircularV03","CircularV03"],["CircularV04","CircularV04"],["CircularV05","CircularV05"],["P3D01","P3D01"],["P3D02","P3D02"],["P3D03","P3D03"],["P3D04","P3D04"],["P3D05","P3D05"],["P3D06","P3D06"],["P3D07","P3D07"],["Diamond01","Diamond01"],["Diamond02","Diamond02"],["Stranger","Stranger"],["ManNormal","ManNormal"],["ManAbnormal","ManAbnormal"],["WomanNormal","WomanNormal"],["WomanAbnormal","WomanAbnormal"],["Camera","Camera"]],mode:"SquareH01",style:{fontSize:16,imageSize:[60,60],textBackgroundColor:[1,1,1,0],textBackgroundSize:[120,30],textColor:[1,1,1,1],textOffset:[10,2],textBoxOffset:[40,0],textBoxAlign:"start",textBoxShow:!0,textBoxMode:"default"},autoAnchor:!0});let ns=dn;(r=>{r.createDefaultProps=()=>({...Re.createDefaultProps(),mode:"SquareH01",style:d.reactJson({}),autoAnchor:!0})})(ns||(ns={})),d.extendClassProps(ns.prototype,ns.createDefaultProps);const Ai=class Ai extends ${get typeName(){return"ESPoi3D"}get defaultProps(){return Ai.createDefaultProps()}constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new tt("模式","mode",!1,!1,[this,"mode"],Ai.defaults.modes),new Y("样式","style",!1,!1,[this,"style"],Ai.defaults.style)]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new tt("模式","mode",!1,!1,[this,"mode"],Ai.defaults.modes),new Y("样式","style",!1,!1,[this,"style"],Ai.defaults.style)])]}};p(Ai,"type",Ai.register("ESPoi3D",Ai,{chsName:"ESPoi3D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),p(Ai,"defaults",{...$.defaults,modes:[["三角形","triangle"],["菱形","diamond"]],mode:"triangle",style:{UI_Color:[.09803921568627451,.40784313725490196,.8,1],FX_Color:[.09803921568627451,.40784313725490196,.8,1]}});let Eo=Ai;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),mode:"triangle",style:d.reactJson(r.defaults.style)})})(Eo||(Eo={})),d.extendClassProps(Eo.prototype,Eo.createDefaultProps);const Pl=class Pl extends At{constructor(e){super(e);p(this,"_czmFlattenedPlaneId",this.dv(d.react("")));this.filled=!1}get typeName(){return"ESPolygonFlattenedPlane"}get defaultProps(){return Pl.createDefaultProps()}get czmFlattenedPlaneId(){return this._czmFlattenedPlaneId.value}set czmFlattenedPlaneId(e){this._czmFlattenedPlaneId.value=e}get czmFlattenedPlaneIdChanged(){return this._czmFlattenedPlaneId.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new nt("瓦片图层","targetID",!1,!1,[this,"targetID"],"")]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new nt("瓦片图层","targetID",!1,!1,[this,"targetID"])])]}};p(Pl,"type",Pl.register("ESPolygonFlattenedPlane",Pl,{chsName:"压平",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPolygonFlattenedPlane"})),p(Pl,"defaults",{...At.defaults});let So=Pl;(r=>{r.createDefaultProps=()=>({...At.createDefaultProps(),targetID:""})})(So||(So={})),d.extendClassProps(So.prototype,So.createDefaultProps);const x0=async(r,t,e)=>{const{viewer:n}=r;if(!n){console.error("AddTrees: ueViewer.viewer is undefined");return}const i=await n.callUeFunc({f:"AddTrees",p:{id:t,TreeParams:e}});return i.error&&console.error("AddTrees:",i.error),i},O0=async(r,t)=>{const{viewer:e}=r;if(!e){console.error("RemoveAllTrees: ueViewer.viewer is undefined");return}const n=await e.callUeFunc({f:"RemoveAllTrees",p:{id:t}});return n.error&&console.error("RemoveAllTrees:",n.error),n},A0=async(r,t,e)=>{const{viewer:n}=r;if(!n){console.error("UpdateTreeParams: ueViewer.viewer is undefined");return}const i=await n.callUeFunc({f:"UpdateTreeParams",p:{id:t,TreeParams:e}});return i.error&&console.error("UpdateTreeParams:",i.error),i},L0=async(r,t,e,n)=>{const{viewer:i}=r;if(!i){console.error("CutDownTrees: ueViewer.viewer is undefined");return}const s=await i.callUeFunc({f:"CutDownTrees",p:{id:t,TreeIds:e,TimeLength:n}});return s.error&&console.error("CutDownTrees:",s.error),s},R0=async(r,t,e,n,i)=>{const{viewer:s}=r;if(!s){console.error("GrowthSimulation: ueViewer.viewer is undefined");return}const a=await s.callUeFunc({f:"GrowthSimulation",p:{id:t,ToParams:e,SwitchTime:i,TimeLength:n}});return a.error&&console.error("GrowthSimulation:",a.error),a},Cl=class Cl extends Ot{constructor(e){super(e);p(this,"_addTreesEvent",this.dv(new d.Event));p(this,"_removeAllTreesEvent",this.dv(new d.Event));p(this,"_updateTreeParamsEvent",this.dv(new d.Event));p(this,"_cutDownTreesEvent",this.dv(new d.Event));p(this,"_growthSimulationEvent",this.dv(new d.Event))}get typeName(){return"ESSeparateFoliage"}get defaultProps(){return Cl.createDefaultProps()}async addTreesCallFunc(e,n){return await x0(e,this.id,n)}async updateTreeParamsCallFunc(e,n){return await A0(e,this.id,n)}async cutDownTreesCallFunc(e,n,i){return await L0(e,this.id,n,i)}async removeAllTreesCallFunc(e){return await O0(e,this.id)}async growthSimulationCallFunc(e,n,i,s){return await R0(e,this.id,n,i,s)}async getIdByComponentNameAndHitItem(e,n,i){return await e.getIdByComponentNameAndHitItem(this.id,n,i)}get addTreesEvent(){return this._addTreesEvent}addTrees(e){this._addTreesEvent.emit(e)}get removeAllTreesEvent(){return this._removeAllTreesEvent}removeAllTrees(){this._removeAllTreesEvent.emit()}get updateTreeParamsEvent(){return this._updateTreeParamsEvent}updateTreeParams(e){this._updateTreeParamsEvent.emit(e)}get cutDownTreesEvent(){return this._cutDownTreesEvent}cutDownTrees(e,n){this._cutDownTreesEvent.emit(e,n)}get growthSimulationEvent(){return this._growthSimulationEvent}growthSimulation(e,n,i){this._growthSimulationEvent.emit(e,n,i)}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new Y("treeTypes","类型为 { name: string, meshPath: string }[]",!0,!1,[this,"treeTypes"],[],"{ name: string, meshPath: string }[]"),new C("树桩id","树桩id",!1,!1,[this,"stumpId"]),new C("动画间隔时间","动画间隔时间",!1,!1,[this,"intervalTime"]),new C("切换间隔时间","切换间隔时间",!1,!1,[this,"switchIntervalTime"])])]}};p(Cl,"type",Cl.register("ESSeparateFoliage",Cl,{chsName:"单体控制森林",tags:["ESObjects","_ES_Impl_UE"],description:"ESSeparateFoliage"})),p(Cl,"defaults",{...Ot.defaults,treeTypes:[],stumpId:-1,intervalTime:.1,switchIntervalTime:.5});let Po=Cl;(r=>{r.createDefaultProps=()=>({...Ot.createDefaultProps(),treeTypes:d.reactJsonWithUndefined(void 0),stumpId:-1,intervalTime:.1,switchIntervalTime:.5})})(Po||(Po={})),d.extendClassProps(Po.prototype,Po.createDefaultProps);function Bc(r,t,e){const n="buffer"in r,i=n?r.buffer:r;n&&(t+=r.byteOffset);const s=new Array(e),a=new DataView(i);for(let o=0;o<e;++o){const l=a.getUint8(t+o);s[o]=String.fromCharCode(l)}return s.join("")}function Zc(r,t){const e="buffer"in r,n=e?r.buffer:r;return e&&(t+=r.byteOffset),new DataView(n).getUint32(t,!0)}function F0(r,t,e){const n="buffer"in r,i=n?r.buffer:r;if(n&&(t+=r.byteOffset),t+e>i.byteLength){console.error("byteOffset + length > buffer.byteLength");return}return new Uint8Array(i,t,e)}function QC(r,t,e){const n="buffer"in r,i=n?r.buffer:r;if(n&&(t+=r.byteOffset),t+e*2>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint16Array(i,t,e)}function BC(r,t,e){const n="buffer"in r,i=n?r.buffer:r;if(n&&(t+=r.byteOffset),t+e*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint32Array(i,t,e)}function ZC(r,t,e){const n="buffer"in r,i=n?r.buffer:r;if(n&&(t+=r.byteOffset),t+e*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Float32Array(i,t,e)}function G0(r){if(Bc(r,0,4)!=="glTF"){console.error("Not a glTF file");return}const e=Zc(r,4);if(e!==2){console.error("Unsupported glTF version");return}const n=Zc(r,8);if(n!==r.byteLength){console.error("Invalid glTF length");return}const i=Zc(r,12);if(i+12+4>n){console.error("Invalid glTF chunk length");return}if(Bc(r,16,4)!=="JSON"){console.error("Invalid glTF chunk type");return}const a=Bc(r,20,i),o={version:e,length:n,gltfJson:a};do{if(20+i>=r.byteLength)break;const l=Zc(r,20+i);if(Bc(r,20+i+4,4)!=="BIN\0"){console.error("Invalid glTF chunk type");return}const c=F0(r,20+i+8,l);o.gltfBinary=c}while(!1);return o}window.parseGlb=G0;function k0(r){const t=G0(r);if(t===void 0||!t.gltfBinary)return;const e=JSON.parse(t.gltfJson);return e.nodes.map(n=>{var i=e.meshes[n.mesh],s=i.primitives[0].attributes.POSITION,a=i.primitives[0].indices,o=e.accessors[s],l=e.bufferViews[o.bufferView];if(!t.gltfBinary)throw new Error("!glbParseResult.gltfBinary");const u=ZC(t.gltfBinary,l.byteOffset??0,l.byteLength/4);var c=e.accessors[a],h=e.bufferViews[c.bufferView];if(!t.gltfBinary)throw new Error("!glbParseResult.gltfBinary");let f;return c.componentType===5121?f=F0(t.gltfBinary,h.byteOffset??0,h.byteLength/1):c.componentType===5123?f=QC(t.gltfBinary,h.byteOffset??0,h.byteLength/2):c.componentType===5125&&(f=BC(t.gltfBinary,h.byteOffset??0,h.byteLength/4)),{name:n.name,posBuffer:u,indicesBuffer:f}})}window.parseWaterGlb=k0;const ie=class ie extends ${constructor(e){super(e);p(this,"_submergingData");p(this,"_allMoments",[]);p(this,"readyEvent",this.dv(new d.Event));{const n=()=>{this.url!=""&&fetch(this.url).then(i=>{i.status==200&&i.ok&&i.arrayBuffer().then(s=>{this._submergingData=k0(s);const a=this._submergingData.map(o=>Date.parse(o.name)).sort();this._allMoments=a,this.currentTime==0&&(this.currentTime=a[0]),this.readyEvent.emit()})}).catch(i=>{console.log(i)})};n(),this.d(this.urlChanged.don(()=>{n()}))}}get typeName(){return"ESSubmergingAnalysis"}get defaultProps(){return ie.createDefaultProps()}get getSubmergingData(){return this._submergingData}getAllMoments(){return this._allMoments}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new nt("Url地址","url",!1,!1,[this,"url"],ie.defaults.url),new Kt("振幅","控制水波振幅的数值",!1,!1,[this,"amplitude"],.01,[0,1],ie.defaults.amplitude),new C("频率","控制波数的数值(次/千米)",!1,!1,[this,"frequency"],ie.defaults.frequency),new C("当前时间","currentTime",!1,!1,[this,"currentTime"],ie.defaults.currentTime),new Y("材质参数","materialParams",!1,!1,[this,"materialParams"],ie.defaults.materialParams),new tt("水域类型","当为custom是其他控制效果的参数生效,否则不生效,使用对应水域类型的预定效果",!1,!1,[this,"waterType"],ie.defaults.waterTypes,"river"),new it("水的底色","waterColor",!1,!1,[this,"waterColor"],ie.defaults.waterColor),new Kt("波动频率","控制水波纹扰动的速率",!1,!1,[this,"waveVelocity"],.01,[0,1],ie.defaults.waveVelocity),new C("水流速度","控制水流速度,单位 米/秒",!1,!1,[this,"flowSpeed"],ie.defaults.flowSpeed),new Kt("镜面反射强度","控制镜面反射强度的数值",!1,!1,[this,"specularIntensity"],.01,[0,1],ie.defaults.specularIntensity),new Kt("水体浑浊度","控制水体的浑浊程度,数值越大,浑浊程度越大,取值范围0-10。",!1,!1,[this,"murkiness"],.01,[0,10],ie.defaults.murkiness)]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new nt("模型Url地址","url",!1,!1,[this,"url"],ie.defaults.url),new C("当前时间","currentTime",!1,!1,[this,"currentTime"],ie.defaults.currentTime),new Y("材质参数","materialParams",!1,!1,[this,"materialParams"],ie.defaults.materialParams),new tt("水域类型","当为custom是其他控制效果的参数生效,否则不生效,使用对应水域类型的预定效果",!1,!1,[this,"waterType"],ie.defaults.waterTypes),new it("水的底色","waterColor",!1,!1,[this,"waterColor"],ie.defaults.waterColor),new C("频率","控制波数的数值(次/千米)",!1,!1,[this,"frequency"],ie.defaults.frequency),new Kt("波动频率","控制水波纹扰动的速率",!1,!1,[this,"waveVelocity"],.01,[0,1],ie.defaults.waveVelocity),new Kt("振幅","控制水波振幅的数值",!1,!1,[this,"amplitude"],.01,[0,1],ie.defaults.amplitude),new Kt("镜面反射强度","控制镜面反射强度的数值",!1,!1,[this,"specularIntensity"],.01,[0,1],ie.defaults.specularIntensity),new Kt("水体浑浊度","控制水体的浑浊程度,数值越大,浑浊程度越大,取值范围0-10。",!1,!1,[this,"murkiness"],.01,[0,10],ie.defaults.murkiness),new C("水流速度","控制水流速度,单位 米/秒",!1,!1,[this,"flowSpeed"],ie.defaults.flowSpeed)])]}};p(ie,"type",ie.register("ESSubmergingAnalysis",ie,{chsName:"淹没分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESSubmergingAnalysis"})),p(ie,"defaults",{...$.defaults,url:"",currentTime:0,materialParams:{},waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterTypes:[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],waterType:"river",flowSpeed:0,murkiness:5});let Co=ie;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),allowPicking:!0,url:"",currentTime:0,materialParams:d.reactJson({}),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowSpeed:0,murkiness:5})})(Co||(Co={})),d.extendClassProps(Co.prototype,Co.createDefaultProps);const Ma=class Ma extends At{constructor(e){super(e);p(this,"_startEvent",this.dv(new d.Event));p(this,"_stopEvent",this.dv(new d.Event));this.filled=!1,this.stroked=!1}get typeName(){return"ESSunshineAnalysis"}get defaultProps(){return Ma.createDefaultProps()}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}getProperties(e){return[...super.getProperties(e),new it("起始颜色","起始颜色",!1,!1,[this,"startColor"]),new it("结束颜色","结束颜色",!1,!1,[this,"endColor"]),new C("计算进度","计算进度",!0,!0,[this,"progress"]),new C("高度","高度m",!1,!1,[this,"extrudedHeight"]),new C("底面高度","底面高度",!1,!1,[this,"height"]),new C("采样间距","采样间距m",!1,!1,[this,"sampleDistance"]),new C("起始时间","startTime,时间戳",!1,!1,[this,"startTime"]),new C("结束时间","endTime,时间戳",!1,!1,[this,"endTime"]),new C("时间跨度","时间跨度,默认1小时时间戳",!1,!1,[this,"spanTime"]),new mt("开始分析","开始分析",[],()=>this.start(),[]),new mt("结束分析","结束分析",[],()=>this.stop(),[])]}};p(Ma,"type",Ma.register("ESSunshineAnalysis",Ma,{chsName:"日照分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"日照分析"})),p(Ma,"supportEditingModes",[...At.supportEditingModes,vt.HeightModify]),p(Ma,"defaults",{...At.defaults});let Io=Ma;(r=>{r.createDefaultProps=()=>({...At.createDefaultProps(),extrudedHeight:30,height:0,sampleDistance:10,startColor:d.reactArray([1,1,0,1]),endColor:d.reactArray([1,0,0,1]),startTime:0,endTime:36e6,spanTime:1,progress:0})})(Io||(Io={})),d.extendClassProps(Io.prototype,Io.createDefaultProps);const Qr=class Qr extends Ot{constructor(e){super(e);p(this,"_activateEvent",this.disposeVar(new d.Event));p(this,"activate",!1)}get typeName(){return"ESTerrainLayer"}get defaultProps(){return Qr.createDefaultProps()}get activateEvent(){return this._activateEvent}getESProperties(){const e={...super.getESProperties()},n=[new C("层级序号","层级序号",!1,!1,[this,"zIndex"],Qr.defaults.zIndex),new tt("渲染模式","renderMode",!1,!1,[this,"renderMode"],Qr.defaults.renderModes,"default"),new C("透明度","opacity",!1,!1,[this,"opacity"],Qr.defaults.opacity)],i=[new Y("地形服务地址","地形服务地址",!1,!1,[this,"url"],Qr.defaults.url),new Rr("矩形范围","西南东北",!1,!1,[this,"rectangle"],Qr.defaults.rectangle)];return e.basic.push(...n),e.dataSource.push(...i),e.defaultMenu="dataSource",e}getProperties(e){return[...super.getProperties(e),new H("ESTerrainLayer","ESTerrainLayer",[new Y("地形服务地址","地形服务地址",!1,!1,[this,"url"]),new Rr("矩形范围","西南东北",!1,!1,[this,"rectangle"]),new C("层级","zIndex",!1,!1,[this,"zIndex"]),new tt("渲染模式","renderMode",!1,!1,[this,"renderMode"],Qr.defaults.renderModes,Qr.defaults.renderMode),new C("透明度","opacity",!1,!1,[this,"opacity"],Qr.defaults.opacity),new H("czm","czm",[new C("czmMinzoom","czmMinzoom",!0,!1,[this,"czmMinzoom"]),new C("czmMaxzoom","czmMaxzoom",!0,!1,[this,"czmMaxzoom"])])])]}};p(Qr,"type",Qr.register("ESTerrainLayer",Qr,{chsName:"地形图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地形图层"})),p(Qr,"defaults",{...Ot.defaults,show:!0,url:"http://inner.earthsdk.com/layer.json",rectangle:[-180,-90,180,90],zIndex:0,renderMode:"default",renderModes:[["使用深度检测","default"],["不使用深度检测","disableDepthTest"],["透明","transparent"]],opacity:1});let Mo=Qr;(r=>{r.createDefaultProps=()=>({...Ot.createDefaultProps(),url:"http://inner.earthsdk.com/layer.json",rectangle:d.reactArray([-180,-90,180,90]),zIndex:0,czmMaxzoom:void 0,czmMinzoom:void 0,renderMode:"default",opacity:1})})(Mo||(Mo={})),d.extendClassProps(Mo.prototype,Mo.createDefaultProps);const ai=class ai extends Re{get typeName(){return"ESTextLabel"}get defaultProps(){return ai.createDefaultProps()}constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new it("文本颜色","指定文本标签的字体颜色.",!1,!1,[this,"color"],[1,1,1,1]),new C("文字大小","fontSize",!1,!1,[this,"fontSize"],14),new Xh("内容","内容",!0,!1,[this,"text"],ai.defaults.text),new it("背景颜色"," 指定文本标签的背景颜色.",!1,!1,[this,"backgroundColor"],ai.defaults.backgroundColor),new Rr("内边距","上,右,下,左顺序.",!1,!1,[this,"padding"],ai.defaults.padding),new it("边界颜色"," 边界色.",!1,!1,[this,"borderColor"]),new Rr("边界圆角","左上,右上,右下,左下.",!1,!1,[this,"borderRadius"]),new C("边界宽度","边界宽度",!1,!1,[this,"borderWidth"])]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new Xh("内容","内容",!0,!1,[this,"text"],ai.defaults.text),new it("文本颜色","指定文本标签的字体颜色.",!1,!1,[this,"color"]),new C("文字大小","fontSize",!1,!1,[this,"fontSize"]),new it("背景颜色"," 指定文本标签的背景颜色.",!1,!1,[this,"backgroundColor"]),new Rr("内边距","上,右,下,左顺序.",!1,!1,[this,"padding"]),new it("边界颜色"," 边界色.",!1,!1,[this,"borderColor"]),new Rr("边界圆角","左上,右上,右下,左下.",!1,!1,[this,"borderRadius"]),new C("边界宽度","边界宽度",!1,!1,[this,"borderWidth"])]),new H("czm","czm",[new U("文本编辑交互","文本编辑交互.",!1,!1,[this,"textEditingInteraction"]),new U("文本编辑","文本编辑.",!1,!1,[this,"textEditing"]),new C("宽度","宽度",!0,!1,[this,"width"],ai.defaults.width),new C("透明度","透明度",!1,!1,[this,"opacity"]),new tt("文字位置","文字位置",!1,!1,[this,"textAlign"],[["center","center"],["left","left"],["right","right"]]),new tt("边框类型","边框类型",!1,!1,[this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]])])]}};p(ai,"type",ai.register("ESTextLabel",ai,{chsName:"文本标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"文本标签。"})),p(ai,"defaults",{...Re.defaults,allowTextEditing:!0,width:80,text:"请输入文字",opacity:1,backgroundColor:[0,0,0,.8],padding:[5,5,5,5],borderRadius:[6,6,6,6],borderColor:[1,1,1,1],borderWidth:0,textAlign:"left",borderStyle:"solid"});let No=ai;(r=>{r.createDefaultProps=()=>({...Re.createDefaultProps(),text:void 0,width:void 0,textEditing:!1,textEditingInteraction:!1,opacity:1,fontSize:14,textAlign:"left",color:d.reactArray([1,1,1,1]),backgroundColor:d.reactArray([0,0,0,.8]),padding:d.reactArray([5,5,5,5]),borderRadius:d.reactArray([6,6,6,6]),borderWidth:0,borderColor:d.reactArray([1,1,1,1]),borderStyle:"solid"})})(No||(No={})),d.extendClassProps(No.prototype,No.createDefaultProps);const z0=`
|
|
302
|
+
`,si=class si extends Ot{get typeName(){return"ESImageryLayer"}get defaultProps(){return si.createDefaultProps()}constructor(t){super(t),this.ad(d.bind([this,"splitDirection"],[this,"czmSplitDirection"]))}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"dataSource",basic:[...t.basic,new C("层级序号","层级序号",!1,!1,[this,"zIndex"],si.defaults.zIndex)],dataSource:[...t.dataSource,new Y("影像服务地址","影像服务地址",!1,!1,[this,"url"]),new Lr("矩形范围","西南东北",!0,!1,[this,"rectangle"],si.defaults.rectangle),new Kt("最大级别","最大级别.",!0,!1,[this,"maximumLevel"],1,[1,24],si.defaults.maximumLevel),new Y("options","options",!0,!1,[this,"options"],si.defaults.options),new nt("targetID","targetID",!1,!1,[this,"targetID"],""),new Kt("opacity","opacity",!1,!1,[this,"opacity"],.01,[0,1],1)]}}getProperties(t){return[...super.getProperties(t),new H("ESImageryLayer","ESImageryLayer",[new Y("影像服务地址","影像服务地址",!1,!1,[this,"url"]),new H("通用","通用",[new Lr("矩形范围","西南东北",!0,!1,[this,"rectangle"],si.defaults.rectangle),new C("高度","A numeric Property specifying the height.",!1,!1,[this,"height"]),new C("zIndex","层级",!1,!1,[this,"zIndex"]),new nt("actorTag","actorTag",!1,!1,[this,"actorTag"]),new nt("componentTag","componentTag",!1,!1,[this,"componentTag"]),new C("minimumLevel","minimumLevel",!1,!1,[this,"minimumLevel"]),new C("maximumLevel","maximumLevel",!1,!1,[this,"maximumLevel"]),new Y("options","options",!0,!1,[this,"options"],{},D0),new nt("targetID","targetID",!1,!1,[this,"targetID"]),new Kt("opacity","opacity",!1,!1,[this,"opacity"],.01,[0,1],1)]),new H("czm","czm",[new C("透明度","透明度,The alpha blending value of this layer, from 0.0 to 1.0.",!1,!1,[this,"czmAlpha"]),new C("亮度","亮度,The brightness of this layer. 1.0 uses the unmodified imagery color.",!1,!1,[this,"czmBrightness"]),new C("对比度","对比度,The contrast of this layer. 1.0 uses the unmodified imagery color.",!1,!1,[this,"czmContrast"]),new C("色相","色相,The hue of this layer. 0.0 uses the unmodified imagery color. ",!1,!1,[this,"czmHue"]),new C("饱和度","饱和度,The saturation of this layer. 1.0 uses the unmodified imagery color. ",!1,!1,[this,"czmSaturation"]),new C("伽马值","伽马,The gamma correction to apply to this layer. 1.0 uses the unmodified imagery color.",!1,!1,[this,"czmGamma"])])])]}};p(si,"type",si.register("ESImageryLayer",si,{chsName:"影像图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"影像图层"})),p(si,"defaults",{...Ot.defaults,url:"",rectangle:[-180,-90,180,90],options:{},zIndex:0,actorTag:"",componentTag:"",minimumLevel:0,maximumLevel:22,targetID:"",opacity:1,splitDirection:"NONE",splitDirectionEnum:[["LEFT","LEFT"],["NONE","NONE"],["RIGHT","RIGHT"]],czmAlpha:1,czmBrightness:1,czmContrast:1,czmHue:0,czmSaturation:1,czmGamma:1,czmSubdomains:[]});let vo=si;(r=>{r.createDefaultProps=()=>({...Ot.createDefaultProps(),url:"",rectangle:d.reactJsonWithUndefined(void 0),options:d.reactJsonWithUndefined(void 0),zIndex:0,actorTag:"",componentTag:"",maximumLevel:22,minimumLevel:0,targetID:"",opacity:1,splitDirection:"NONE",czmSplitDirection:"NONE",czmAlpha:1,czmBrightness:1,czmContrast:1,czmHue:0,czmSaturation:1,czmGamma:1})})(vo||(vo={})),d.extendClassProps(vo.prototype,vo.createDefaultProps);const fn=class fn extends ${get typeName(){return"ESLocalSkyBox"}get defaultProps(){return fn.createDefaultProps()}constructor(t){super(t),this.collision=!1,this.allowPicking=!1}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new C("尺寸","圆直径或包围盒边长",!1,!1,[this,"size"],fn.defaults.size),new U("自动跟随","是否跟随相机",!1,!1,[this,"autoFollow"],fn.defaults.autoFollow),new tt("mode","模式",!1,!1,[this,"mode"],fn.defaults.modes,"blueSky")]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new C("size","圆直径或包围盒边长",!1,!1,[this,"size"],fn.defaults.size),new U("autoFollow","是否跟随相机(自动跟随效果为渐变,会在5000米左右消失)",!1,!1,[this,"autoFollow"],fn.defaults.autoFollow),new C("autoOpacityFactor","自动消失系数",!1,!1,[this,"autoOpacityFactor"],fn.defaults.autoOpacityFactor),new tt("mode","模式",!1,!1,[this,"mode"],fn.defaults.modes)])]}};p(fn,"type",fn.register("ESLocalSkyBox",fn,{chsName:"局部天空盒",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"效果类"})),p(fn,"defaults",{...$.defaults,size:1e4,autoFollow:!0,autoOpacityFactor:2,modes:[["baiyun","baiyun"],["blueSky","blueSky"],["clearSky","clearSky"],["dream","dream"],["starrySky","starrySky"],["sunnySky","sunnySky"],["sunSets","sunSets"]]});let yo=fn;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),size:1e4,autoFollow:!0,autoOpacityFactor:2,mode:"blueSky"})})(yo||(yo={})),d.extendClassProps(yo.prototype,yo.createDefaultProps);const Sl=class Sl extends ${constructor(e){super(e);p(this,"_location",this.disposeVar(d.react(void 0)));{const n=()=>{this.location=this.position};n(),this.ad(this.positionChanged.don(n))}}get typeName(){return"ESLocationMeasurement"}get defaultProps(){return Sl.createDefaultProps()}get location(){return this._location.value}set location(e){this._location.value=e}get locationChanged(){return this._location.changed}getProperties(e){return[...super.getProperties(e)]}};p(Sl,"type",Sl.register("ESLocationMeasurement",Sl,{chsName:"位置测量点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"位置测量点"})),p(Sl,"defaults",{...$.defaults});let _o=Sl;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps()})})(_o||(_o={})),d.extendClassProps(_o.prototype,_o.createDefaultProps);const tr=class tr extends ${constructor(e){super(e);p(this,"_player",this.dv(new bi));{const n=tr.defaults;this.d(d.bind([this._player,"loop"],[this,"playingLoop"],i=>i??n.playingLoop,i=>i??n.playingLoop)),this.d(d.bind([this._player,"currentTime"],[this,"currentTime"],i=>i??n.currentTime,i=>i??n.currentTime)),this.d(d.bind([this._player,"duration"],[this,"duration"],i=>i??n.duration,i=>i??n.duration)),this.d(d.bind([this._player,"playing"],[this,"playing"],i=>i??n.playing,i=>i??n.playing)),this.d(d.bind([this._player,"speed"],[this,"playingSpeed"],i=>i??n.playingSpeed,i=>i??n.playingSpeed))}}get typeName(){return"ESParticleSystemPrimitive"}get defaultProps(){return tr.createDefaultProps()}get player(){return this._player}get ratio(){return this._player.ratio}set ratio(e){this._player.ratio=e}get ratioChanged(){return this._player.ratioChanged}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new mt("飞入","飞入",["number"],n=>this.flyTo(n),[1e3]),new Fi("更新回调函数","The callback function to be called each frame to update a particle.",!0,!1,[this,"updateCallback"]),new C("发射率","emissionRate,The number of particles to emit per second.",!0,!1,[this,"emissionRate"],5),new U("是否循环","loop,Whether the particle system should loop its bursts when it is complete.",!0,!1,[this,"loop"],!0),new C("等级","scale,Sets the scale to apply to the image of the particle for the duration of its particleLife.",!0,!1,[this,"particleScale"],1),new C("初始等级","startScale,The initial scale to apply to the image of the particle at the beginning of its life.",!0,!1,[this,"startScale"]),new C("结束等级","endScale,The final scale to apply to the image of the particle at the end of its life.",!0,!1,[this,"endScale"],tr.defaults.endScale),new it("颜色","Sets the color of a particle for the duration of its particleLife.",!0,!1,[this,"color"]),new it("初始颜色","The color of the particle at the beginning of its life.",!0,!1,[this,"startColor"]),new it("结束颜色","The color of the particle at the end of its life.",!0,!1,[this,"endColor"]),new U("尺寸单位为米","Sets if the size of particles is in meters or pixels. true to size the particles in meters; otherwise, the size is in pixels.",!0,!1,[this,"sizeInMeters"]),new C("速度","speed,If set, overrides the minimumSpeed and maximumSpeed inputs with this value.",!0,!1,[this,"speed"],1),new C("最小速度","minimumSpeed,Sets the minimum bound in meters per second above which a particles actual speed will be randomly chosen.",!0,!1,[this,"minimumSpeed"]),new C("最大速度","maximumSpeed,Sets the maximum bound in meters per second below which a particles actual speed will be randomly chosen.",!0,!1,[this,"maximumSpeed"]),new C("生命周期","lifetime,How long the particle system will emit particles, in seconds.",!0,!1,[this,"lifetime"],Number.MAX_VALUE),new C("粒子生命周期","particleLife,If set, overrides the minimumParticleLife and maximumParticleLife inputs with this value.",!0,!1,[this,"particleLife"],tr.defaults.particleLife),new C("最小粒子生命周期","minimumParticleLife,Sets the minimum bound in seconds for the possible duration of a particles life above which a particles actual life will be randomly chosen.",!0,!1,[this,"minimumParticleLife"]),new C("最大粒子生命周期","maximumParticleLife,Sets the maximum bound in seconds for the possible duration of a particles life below which a particles actual life will be randomly chosen.",!0,!1,[this,"maximumParticleLife"]),new C("块数量","mass,Sets the minimum and maximum mass of particles in kilograms.",!0,!1,[this,"mass"],1),new C("最小块数量","minimumMass,Sets the minimum bound for the mass of a particle in kilograms. A particles actual mass will be chosen as a random amount above this value.",!0,!1,[this,"minimumMass"]),new C("最大块数量","maximumMass,Sets the maximum mass of particles in kilograms. A particles actual mass will be chosen as a random amount below this value.",!0,!1,[this,"maximumMass"]),new se("图片尺寸","imageSize",!0,!1,[this,"imageSize"],tr.defaults.imageSize),new se("最小图片尺寸","minimumImageSize",!0,!1,[this,"minimumImageSize"]),new se("最大图片尺寸","maximumImageSize",!0,!1,[this,"maximumImageSize"]),new ku("图片","The URI, HTMLImageElement, or HTMLCanvasElement to use for the billboard.",!0,!1,[this,"image"],tr.defaults.image),new Qe("偏移","translation",!0,!1,[this,"translation"],[0,0,0]),new df("bursts","bursts",!0,!1,[this,"bursts"]),new Y("emitter","emitter",!1,!1,[this,"emitter"],tr.defaults.emitter)]),new H("播放器","播放器",[new C("播放比率","播放比率(0-1)",!0,!1,[this,"ratio"],tr.defaults.ratio),new Yh("播放器","播放器",[this,"playing"],[this,"ratio"],[this,"playingLoop"]),new U("是否循环","是否循环.",!0,!1,[this,"playingLoop"],tr.defaults.playingLoop),new C("当前时间","当前时间",!0,!1,[this,"currentTime"],tr.defaults.currentTime),new C("过渡时间","过渡时间",!0,!1,[this,"duration"],tr.defaults.duration),new U("是否播放","是否播放.",!0,!1,[this,"playing"],tr.defaults.playing),new C("播放速度","播放速度.",!0,!1,[this,"playingSpeed"],tr.defaults.playingSpeed)])]}};p(tr,"type",tr.register("ESParticleSystemPrimitive",tr,{chsName:"粒子",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通过Cesium的Primitive API 实现的粒子特效。"})),p(tr,"defaults",{...$.defaults,playingLoop:!0,currentTime:0,playerCurrentTime:0,duration:6e3,playingSpeed:1,playing:!0,ratio:0,particleLife:.5,endScale:4,imageSize:[20,20],image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",emitter:{type:"CircleEmitter",radius:.5}});let wo=tr;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),emitter:d.reactJsonWithUndefined(void 0),bursts:d.reactArrayCollectionWithUndefined(void 0),translation:d.reactArrayWithUndefined(void 0),positionEditing:void 0,image:void 0,imageSize:d.reactArrayWithUndefined(void 0),minimumImageSize:d.reactArrayWithUndefined(void 0),maximumImageSize:d.reactArrayWithUndefined(void 0),updateCallback:void 0,emissionRate:void 0,loop:void 0,particleScale:void 0,startScale:void 0,endScale:void 0,color:d.reactArrayWithUndefined(void 0),startColor:d.reactArrayWithUndefined(void 0),endColor:d.reactArrayWithUndefined(void 0),sizeInMeters:void 0,speed:void 0,minimumSpeed:void 0,maximumSpeed:void 0,lifetime:void 0,particleLife:void 0,minimumParticleLife:void 0,maximumParticleLife:void 0,mass:void 0,minimumMass:void 0,maximumMass:void 0,playingLoop:void 0,currentTime:void 0,duration:void 0,playingSpeed:void 0,playing:void 0})})(wo||(wo={})),d.extendClassProps(wo.prototype,wo.createDefaultProps);const dn=class dn extends Re{constructor(e){super(e);p(this,"initialStyle",this.ad(d.reactJsonWithUndefined(void 0)));p(this,"_getInitialStyleEvent",this.disposeVar(new d.Event))}get typeName(){return"ESPoi2D"}get defaultProps(){return dn.createDefaultProps()}get getInitialStyleEvent(){return this._getInitialStyleEvent}getInitialStyle(){return Promise.race([new Promise(e=>{const n=this.d(this.initialStyle.changed.disposableOnce(e));this.getInitialStyleEvent.emit(),setTimeout(()=>{n(),e(void 0)},2e3)})])}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new tt("模式","mode",!1,!1,[this,"mode"],dn.defaults.modes,dn.defaults.mode),new Y("样式","style",!1,!1,[this,"style"],dn.defaults.style),new U("自动锚点对齐","autoAnchor",!1,!1,[this,"autoAnchor"],dn.defaults.autoAnchor)]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new tt("模式","mode",!1,!1,[this,"mode"],dn.defaults.modes),new Y("样式","style",!1,!1,[this,"style"],dn.defaults.style),new U("自动锚点对齐","autoAnchor",!1,!1,[this,"autoAnchor"],dn.defaults.autoAnchor)])]}};p(dn,"type",dn.register("ESPoi2D",dn,{chsName:"ESPoi2D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),p(dn,"defaults",{...Re.defaults,modes:[["自定义","Custom"],["SquareH01","SquareH01"],["SquareH02","SquareH02"],["SquareV01","SquareV01"],["SquareV02","SquareV02"],["SquareV03","SquareV03"],["SquareV04","SquareV04"],["Flag01","Flag01"],["Flag02","Flag02"],["Linear01","Linear01"],["Linear02","Linear02"],["Linear03","Linear03"],["CircularH01","CircularH01"],["CircularH02","CircularH02"],["CircularV01","CircularV01"],["CircularV02","CircularV02"],["CircularV03","CircularV03"],["CircularV04","CircularV04"],["CircularV05","CircularV05"],["P3D01","P3D01"],["P3D02","P3D02"],["P3D03","P3D03"],["P3D04","P3D04"],["P3D05","P3D05"],["P3D06","P3D06"],["P3D07","P3D07"],["Diamond01","Diamond01"],["Diamond02","Diamond02"],["Stranger","Stranger"],["ManNormal","ManNormal"],["ManAbnormal","ManAbnormal"],["WomanNormal","WomanNormal"],["WomanAbnormal","WomanAbnormal"],["Camera","Camera"]],mode:"SquareH01",style:{fontSize:16,imageSize:[60,60],textBackgroundColor:[1,1,1,0],textBackgroundSize:[120,30],textColor:[1,1,1,1],textOffset:[10,2],textBoxOffset:[40,0],textBoxAlign:"start",textBoxShow:!0,textBoxMode:"default"},autoAnchor:!0});let ns=dn;(r=>{r.createDefaultProps=()=>({...Re.createDefaultProps(),mode:"SquareH01",style:d.reactJson({}),autoAnchor:!0})})(ns||(ns={})),d.extendClassProps(ns.prototype,ns.createDefaultProps);const Ai=class Ai extends ${get typeName(){return"ESPoi3D"}get defaultProps(){return Ai.createDefaultProps()}constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new tt("模式","mode",!1,!1,[this,"mode"],Ai.defaults.modes),new Y("样式","style",!1,!1,[this,"style"],Ai.defaults.style)]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new tt("模式","mode",!1,!1,[this,"mode"],Ai.defaults.modes),new Y("样式","style",!1,!1,[this,"style"],Ai.defaults.style)])]}};p(Ai,"type",Ai.register("ESPoi3D",Ai,{chsName:"ESPoi3D",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"三角形,菱形"})),p(Ai,"defaults",{...$.defaults,modes:[["三角形","triangle"],["菱形","diamond"]],mode:"triangle",style:{UI_Color:[.09803921568627451,.40784313725490196,.8,1],FX_Color:[.09803921568627451,.40784313725490196,.8,1]}});let Eo=Ai;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),mode:"triangle",style:d.reactJson(r.defaults.style)})})(Eo||(Eo={})),d.extendClassProps(Eo.prototype,Eo.createDefaultProps);const Pl=class Pl extends At{constructor(e){super(e);p(this,"_czmFlattenedPlaneId",this.dv(d.react("")));this.filled=!1}get typeName(){return"ESPolygonFlattenedPlane"}get defaultProps(){return Pl.createDefaultProps()}get czmFlattenedPlaneId(){return this._czmFlattenedPlaneId.value}set czmFlattenedPlaneId(e){this._czmFlattenedPlaneId.value=e}get czmFlattenedPlaneIdChanged(){return this._czmFlattenedPlaneId.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new nt("瓦片图层","targetID",!1,!1,[this,"targetID"],"")]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new nt("瓦片图层","targetID",!1,!1,[this,"targetID"])])]}};p(Pl,"type",Pl.register("ESPolygonFlattenedPlane",Pl,{chsName:"压平",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPolygonFlattenedPlane"})),p(Pl,"defaults",{...At.defaults});let So=Pl;(r=>{r.createDefaultProps=()=>({...At.createDefaultProps(),targetID:""})})(So||(So={})),d.extendClassProps(So.prototype,So.createDefaultProps);const x0=async(r,t,e)=>{const{viewer:n}=r;if(!n){console.error("AddTrees: ueViewer.viewer is undefined");return}const i=await n.callUeFunc({f:"AddTrees",p:{id:t,TreeParams:e}});return i.error&&console.error("AddTrees:",i.error),i},O0=async(r,t)=>{const{viewer:e}=r;if(!e){console.error("RemoveAllTrees: ueViewer.viewer is undefined");return}const n=await e.callUeFunc({f:"RemoveAllTrees",p:{id:t}});return n.error&&console.error("RemoveAllTrees:",n.error),n},A0=async(r,t,e)=>{const{viewer:n}=r;if(!n){console.error("UpdateTreeParams: ueViewer.viewer is undefined");return}const i=await n.callUeFunc({f:"UpdateTreeParams",p:{id:t,TreeParams:e}});return i.error&&console.error("UpdateTreeParams:",i.error),i},L0=async(r,t,e,n)=>{const{viewer:i}=r;if(!i){console.error("CutDownTrees: ueViewer.viewer is undefined");return}const s=await i.callUeFunc({f:"CutDownTrees",p:{id:t,TreeIds:e,TimeLength:n}});return s.error&&console.error("CutDownTrees:",s.error),s},R0=async(r,t,e,n,i)=>{const{viewer:s}=r;if(!s){console.error("GrowthSimulation: ueViewer.viewer is undefined");return}const a=await s.callUeFunc({f:"GrowthSimulation",p:{id:t,ToParams:e,SwitchTime:i,TimeLength:n}});return a.error&&console.error("GrowthSimulation:",a.error),a},Cl=class Cl extends Ot{constructor(e){super(e);p(this,"_addTreesEvent",this.dv(new d.Event));p(this,"_removeAllTreesEvent",this.dv(new d.Event));p(this,"_updateTreeParamsEvent",this.dv(new d.Event));p(this,"_cutDownTreesEvent",this.dv(new d.Event));p(this,"_growthSimulationEvent",this.dv(new d.Event))}get typeName(){return"ESSeparateFoliage"}get defaultProps(){return Cl.createDefaultProps()}async addTreesCallFunc(e,n){return await x0(e,this.id,n)}async updateTreeParamsCallFunc(e,n){return await A0(e,this.id,n)}async cutDownTreesCallFunc(e,n,i){return await L0(e,this.id,n,i)}async removeAllTreesCallFunc(e){return await O0(e,this.id)}async growthSimulationCallFunc(e,n,i,s){return await R0(e,this.id,n,i,s)}async getIdByComponentNameAndHitItem(e,n,i){return await e.getIdByComponentNameAndHitItem(this.id,n,i)}get addTreesEvent(){return this._addTreesEvent}addTrees(e){this._addTreesEvent.emit(e)}get removeAllTreesEvent(){return this._removeAllTreesEvent}removeAllTrees(){this._removeAllTreesEvent.emit()}get updateTreeParamsEvent(){return this._updateTreeParamsEvent}updateTreeParams(e){this._updateTreeParamsEvent.emit(e)}get cutDownTreesEvent(){return this._cutDownTreesEvent}cutDownTrees(e,n){this._cutDownTreesEvent.emit(e,n)}get growthSimulationEvent(){return this._growthSimulationEvent}growthSimulation(e,n,i){this._growthSimulationEvent.emit(e,n,i)}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new Y("treeTypes","类型为 { name: string, meshPath: string }[]",!0,!1,[this,"treeTypes"],[],"{ name: string, meshPath: string }[]"),new C("树桩id","树桩id",!1,!1,[this,"stumpId"]),new C("动画间隔时间","动画间隔时间",!1,!1,[this,"intervalTime"]),new C("切换间隔时间","切换间隔时间",!1,!1,[this,"switchIntervalTime"])])]}};p(Cl,"type",Cl.register("ESSeparateFoliage",Cl,{chsName:"单体控制森林",tags:["ESObjects","_ES_Impl_UE"],description:"ESSeparateFoliage"})),p(Cl,"defaults",{...Ot.defaults,treeTypes:[],stumpId:-1,intervalTime:.1,switchIntervalTime:.5});let Po=Cl;(r=>{r.createDefaultProps=()=>({...Ot.createDefaultProps(),treeTypes:d.reactJsonWithUndefined(void 0),stumpId:-1,intervalTime:.1,switchIntervalTime:.5})})(Po||(Po={})),d.extendClassProps(Po.prototype,Po.createDefaultProps);function Bc(r,t,e){const n="buffer"in r,i=n?r.buffer:r;n&&(t+=r.byteOffset);const s=new Array(e),a=new DataView(i);for(let o=0;o<e;++o){const l=a.getUint8(t+o);s[o]=String.fromCharCode(l)}return s.join("")}function Zc(r,t){const e="buffer"in r,n=e?r.buffer:r;return e&&(t+=r.byteOffset),new DataView(n).getUint32(t,!0)}function F0(r,t,e){const n="buffer"in r,i=n?r.buffer:r;if(n&&(t+=r.byteOffset),t+e>i.byteLength){console.error("byteOffset + length > buffer.byteLength");return}return new Uint8Array(i,t,e)}function QC(r,t,e){const n="buffer"in r,i=n?r.buffer:r;if(n&&(t+=r.byteOffset),t+e*2>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint16Array(i,t,e)}function BC(r,t,e){const n="buffer"in r,i=n?r.buffer:r;if(n&&(t+=r.byteOffset),t+e*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Uint32Array(i,t,e)}function ZC(r,t,e){const n="buffer"in r,i=n?r.buffer:r;if(n&&(t+=r.byteOffset),t+e*4>i.byteLength){console.error("byteOffset + length * 4 > buffer.byteLength");return}return new Float32Array(i,t,e)}function G0(r){if(Bc(r,0,4)!=="glTF"){console.error("Not a glTF file");return}const e=Zc(r,4);if(e!==2){console.error("Unsupported glTF version");return}const n=Zc(r,8);if(n!==r.byteLength){console.error("Invalid glTF length");return}const i=Zc(r,12);if(i+12+4>n){console.error("Invalid glTF chunk length");return}if(Bc(r,16,4)!=="JSON"){console.error("Invalid glTF chunk type");return}const a=Bc(r,20,i),o={version:e,length:n,gltfJson:a};do{if(20+i>=r.byteLength)break;const l=Zc(r,20+i);if(Bc(r,20+i+4,4)!=="BIN\0"){console.error("Invalid glTF chunk type");return}const c=F0(r,20+i+8,l);o.gltfBinary=c}while(!1);return o}window.parseGlb=G0;function k0(r){const t=G0(r);if(t===void 0||!t.gltfBinary)return;const e=JSON.parse(t.gltfJson);return e.nodes.map(n=>{var i=e.meshes[n.mesh],s=i.primitives[0].attributes.POSITION,a=i.primitives[0].indices,o=e.accessors[s],l=e.bufferViews[o.bufferView];if(!t.gltfBinary)throw new Error("!glbParseResult.gltfBinary");const u=ZC(t.gltfBinary,l.byteOffset??0,l.byteLength/4);var c=e.accessors[a],h=e.bufferViews[c.bufferView];if(!t.gltfBinary)throw new Error("!glbParseResult.gltfBinary");let f;return c.componentType===5121?f=F0(t.gltfBinary,h.byteOffset??0,h.byteLength/1):c.componentType===5123?f=QC(t.gltfBinary,h.byteOffset??0,h.byteLength/2):c.componentType===5125&&(f=BC(t.gltfBinary,h.byteOffset??0,h.byteLength/4)),{name:n.name,posBuffer:u,indicesBuffer:f}})}window.parseWaterGlb=k0;const ie=class ie extends ${constructor(e){super(e);p(this,"_submergingData");p(this,"_allMoments",[]);p(this,"readyEvent",this.dv(new d.Event));{const n=()=>{this.url!=""&&fetch(this.url).then(i=>{i.status==200&&i.ok&&i.arrayBuffer().then(s=>{this._submergingData=k0(s);const a=this._submergingData.map(o=>Date.parse(o.name)).sort();this._allMoments=a,this.currentTime==0&&(this.currentTime=a[0]),this.readyEvent.emit()})}).catch(i=>{console.log(i)})};n(),this.d(this.urlChanged.don(()=>{n()}))}}get typeName(){return"ESSubmergingAnalysis"}get defaultProps(){return ie.createDefaultProps()}get getSubmergingData(){return this._submergingData}getAllMoments(){return this._allMoments}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new nt("Url地址","url",!1,!1,[this,"url"],ie.defaults.url),new Kt("振幅","控制水波振幅的数值",!1,!1,[this,"amplitude"],.01,[0,1],ie.defaults.amplitude),new C("频率","控制波数的数值(次/千米)",!1,!1,[this,"frequency"],ie.defaults.frequency),new C("当前时间","currentTime",!1,!1,[this,"currentTime"],ie.defaults.currentTime),new Y("材质参数","materialParams",!1,!1,[this,"materialParams"],ie.defaults.materialParams),new tt("水域类型","当为custom是其他控制效果的参数生效,否则不生效,使用对应水域类型的预定效果",!1,!1,[this,"waterType"],ie.defaults.waterTypes,"river"),new it("水的底色","waterColor",!1,!1,[this,"waterColor"],ie.defaults.waterColor),new Kt("波动频率","控制水波纹扰动的速率",!1,!1,[this,"waveVelocity"],.01,[0,1],ie.defaults.waveVelocity),new C("水流速度","控制水流速度,单位 米/秒",!1,!1,[this,"flowSpeed"],ie.defaults.flowSpeed),new Kt("镜面反射强度","控制镜面反射强度的数值",!1,!1,[this,"specularIntensity"],.01,[0,1],ie.defaults.specularIntensity),new Kt("水体浑浊度","控制水体的浑浊程度,数值越大,浑浊程度越大,取值范围0-10。",!1,!1,[this,"murkiness"],.01,[0,10],ie.defaults.murkiness)]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new nt("模型Url地址","url",!1,!1,[this,"url"],ie.defaults.url),new C("当前时间","currentTime",!1,!1,[this,"currentTime"],ie.defaults.currentTime),new Y("材质参数","materialParams",!1,!1,[this,"materialParams"],ie.defaults.materialParams),new tt("水域类型","当为custom是其他控制效果的参数生效,否则不生效,使用对应水域类型的预定效果",!1,!1,[this,"waterType"],ie.defaults.waterTypes),new it("水的底色","waterColor",!1,!1,[this,"waterColor"],ie.defaults.waterColor),new C("频率","控制波数的数值(次/千米)",!1,!1,[this,"frequency"],ie.defaults.frequency),new Kt("波动频率","控制水波纹扰动的速率",!1,!1,[this,"waveVelocity"],.01,[0,1],ie.defaults.waveVelocity),new Kt("振幅","控制水波振幅的数值",!1,!1,[this,"amplitude"],.01,[0,1],ie.defaults.amplitude),new Kt("镜面反射强度","控制镜面反射强度的数值",!1,!1,[this,"specularIntensity"],.01,[0,1],ie.defaults.specularIntensity),new Kt("水体浑浊度","控制水体的浑浊程度,数值越大,浑浊程度越大,取值范围0-10。",!1,!1,[this,"murkiness"],.01,[0,10],ie.defaults.murkiness),new C("水流速度","控制水流速度,单位 米/秒",!1,!1,[this,"flowSpeed"],ie.defaults.flowSpeed)])]}};p(ie,"type",ie.register("ESSubmergingAnalysis",ie,{chsName:"淹没分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESSubmergingAnalysis"})),p(ie,"defaults",{...$.defaults,url:"",currentTime:0,materialParams:{},waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterTypes:[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],waterType:"river",flowSpeed:0,murkiness:5});let Co=ie;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),allowPicking:!0,url:"",currentTime:0,materialParams:d.reactJson({}),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowSpeed:0,murkiness:5})})(Co||(Co={})),d.extendClassProps(Co.prototype,Co.createDefaultProps);const Ma=class Ma extends At{constructor(e){super(e);p(this,"_startEvent",this.dv(new d.Event));p(this,"_stopEvent",this.dv(new d.Event));this.filled=!1,this.stroked=!1}get typeName(){return"ESSunshineAnalysis"}get defaultProps(){return Ma.createDefaultProps()}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}getProperties(e){return[...super.getProperties(e),new it("起始颜色","起始颜色",!1,!1,[this,"startColor"]),new it("结束颜色","结束颜色",!1,!1,[this,"endColor"]),new C("计算进度","计算进度",!0,!0,[this,"progress"]),new C("高度","高度m",!1,!1,[this,"extrudedHeight"]),new C("底面高度","底面高度",!1,!1,[this,"height"]),new C("采样间距","采样间距m",!1,!1,[this,"sampleDistance"]),new C("起始时间","startTime,时间戳",!1,!1,[this,"startTime"]),new C("结束时间","endTime,时间戳",!1,!1,[this,"endTime"]),new C("时间跨度","时间跨度,默认1小时时间戳",!1,!1,[this,"spanTime"]),new mt("开始分析","开始分析",[],()=>this.start(),[]),new mt("结束分析","结束分析",[],()=>this.stop(),[])]}};p(Ma,"type",Ma.register("ESSunshineAnalysis",Ma,{chsName:"日照分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"日照分析"})),p(Ma,"supportEditingModes",[...At.supportEditingModes,vt.HeightModify]),p(Ma,"defaults",{...At.defaults});let Io=Ma;(r=>{r.createDefaultProps=()=>({...At.createDefaultProps(),extrudedHeight:30,height:0,sampleDistance:10,startColor:d.reactArray([1,1,0,1]),endColor:d.reactArray([1,0,0,1]),startTime:0,endTime:36e6,spanTime:1,progress:0})})(Io||(Io={})),d.extendClassProps(Io.prototype,Io.createDefaultProps);const Qr=class Qr extends Ot{constructor(e){super(e);p(this,"_activateEvent",this.disposeVar(new d.Event));p(this,"activate",!1)}get typeName(){return"ESTerrainLayer"}get defaultProps(){return Qr.createDefaultProps()}get activateEvent(){return this._activateEvent}getESProperties(){const e={...super.getESProperties()},n=[new C("层级序号","层级序号",!1,!1,[this,"zIndex"],Qr.defaults.zIndex),new tt("渲染模式","renderMode",!1,!1,[this,"renderMode"],Qr.defaults.renderModes,"default"),new C("透明度","opacity",!1,!1,[this,"opacity"],Qr.defaults.opacity)],i=[new Y("地形服务地址","地形服务地址",!1,!1,[this,"url"],Qr.defaults.url),new Lr("矩形范围","西南东北",!1,!1,[this,"rectangle"],Qr.defaults.rectangle)];return e.basic.push(...n),e.dataSource.push(...i),e.defaultMenu="dataSource",e}getProperties(e){return[...super.getProperties(e),new H("ESTerrainLayer","ESTerrainLayer",[new Y("地形服务地址","地形服务地址",!1,!1,[this,"url"]),new Lr("矩形范围","西南东北",!1,!1,[this,"rectangle"]),new C("层级","zIndex",!1,!1,[this,"zIndex"]),new tt("渲染模式","renderMode",!1,!1,[this,"renderMode"],Qr.defaults.renderModes,Qr.defaults.renderMode),new C("透明度","opacity",!1,!1,[this,"opacity"],Qr.defaults.opacity),new H("czm","czm",[new C("czmMinzoom","czmMinzoom",!0,!1,[this,"czmMinzoom"]),new C("czmMaxzoom","czmMaxzoom",!0,!1,[this,"czmMaxzoom"])])])]}};p(Qr,"type",Qr.register("ESTerrainLayer",Qr,{chsName:"地形图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地形图层"})),p(Qr,"defaults",{...Ot.defaults,show:!0,url:"http://inner.earthsdk.com/layer.json",rectangle:[-180,-90,180,90],zIndex:0,renderMode:"default",renderModes:[["使用深度检测","default"],["不使用深度检测","disableDepthTest"],["透明","transparent"]],opacity:1});let Mo=Qr;(r=>{r.createDefaultProps=()=>({...Ot.createDefaultProps(),url:"http://inner.earthsdk.com/layer.json",rectangle:d.reactArray([-180,-90,180,90]),zIndex:0,czmMaxzoom:void 0,czmMinzoom:void 0,renderMode:"default",opacity:1})})(Mo||(Mo={})),d.extendClassProps(Mo.prototype,Mo.createDefaultProps);const ai=class ai extends Re{get typeName(){return"ESTextLabel"}get defaultProps(){return ai.createDefaultProps()}constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new it("文本颜色","指定文本标签的字体颜色.",!1,!1,[this,"color"],[1,1,1,1]),new C("文字大小","fontSize",!1,!1,[this,"fontSize"],14),new Xh("内容","内容",!0,!1,[this,"text"],ai.defaults.text),new it("背景颜色"," 指定文本标签的背景颜色.",!1,!1,[this,"backgroundColor"],ai.defaults.backgroundColor),new Lr("内边距","上,右,下,左顺序.",!1,!1,[this,"padding"],ai.defaults.padding),new it("边界颜色"," 边界色.",!1,!1,[this,"borderColor"]),new Lr("边界圆角","左上,右上,右下,左下.",!1,!1,[this,"borderRadius"]),new C("边界宽度","边界宽度",!1,!1,[this,"borderWidth"])]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new Xh("内容","内容",!0,!1,[this,"text"],ai.defaults.text),new it("文本颜色","指定文本标签的字体颜色.",!1,!1,[this,"color"]),new C("文字大小","fontSize",!1,!1,[this,"fontSize"]),new it("背景颜色"," 指定文本标签的背景颜色.",!1,!1,[this,"backgroundColor"]),new Lr("内边距","上,右,下,左顺序.",!1,!1,[this,"padding"]),new it("边界颜色"," 边界色.",!1,!1,[this,"borderColor"]),new Lr("边界圆角","左上,右上,右下,左下.",!1,!1,[this,"borderRadius"]),new C("边界宽度","边界宽度",!1,!1,[this,"borderWidth"])]),new H("czm","czm",[new U("文本编辑交互","文本编辑交互.",!1,!1,[this,"textEditingInteraction"]),new U("文本编辑","文本编辑.",!1,!1,[this,"textEditing"]),new C("宽度","宽度",!0,!1,[this,"width"],ai.defaults.width),new C("透明度","透明度",!1,!1,[this,"opacity"]),new tt("文字位置","文字位置",!1,!1,[this,"textAlign"],[["center","center"],["left","left"],["right","right"]]),new tt("边框类型","边框类型",!1,!1,[this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]])])]}};p(ai,"type",ai.register("ESTextLabel",ai,{chsName:"文本标签",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"文本标签。"})),p(ai,"defaults",{...Re.defaults,allowTextEditing:!0,width:80,text:"请输入文字",opacity:1,backgroundColor:[0,0,0,.8],padding:[5,5,5,5],borderRadius:[6,6,6,6],borderColor:[1,1,1,1],borderWidth:0,textAlign:"left",borderStyle:"solid"});let No=ai;(r=>{r.createDefaultProps=()=>({...Re.createDefaultProps(),text:void 0,width:void 0,textEditing:!1,textEditingInteraction:!1,opacity:1,fontSize:14,textAlign:"left",color:d.reactArray([1,1,1,1]),backgroundColor:d.reactArray([0,0,0,.8]),padding:d.reactArray([5,5,5,5]),borderRadius:d.reactArray([6,6,6,6]),borderWidth:0,borderColor:d.reactArray([1,1,1,1]),borderStyle:"solid"})})(No||(No={})),d.extendClassProps(No.prototype,No.createDefaultProps);const z0=`
|
|
303
303
|
#### 默认值如下
|
|
304
304
|
\`\`\`js
|
|
305
305
|
{
|
|
306
306
|
"Title": "示例",
|
|
307
307
|
"Content": "这是一个示例\\n帮助你理解info的数据形式\\nnum:1\\nkey:'value'\\n"
|
|
308
308
|
}
|
|
309
|
-
\`\`\``,pn=class pn extends Re{constructor(e){super(e);p(this,"_callFunctionEvent",this.disposeVar(new d.Event));p(this,"_callFunctionResultEvent",this.dv(new d.Event))}get typeName(){return"ESUEWidget"}get defaultProps(){return pn.createDefaultProps()}get __callFunctionResultEvent(){return this._callFunctionResultEvent}get callFunctionEvent(){return this._callFunctionEvent}callFunction(e,n){return new Promise(i=>{const s=new d.Destroyable,a=setTimeout(()=>{s.isDestroyed()||(s.destroy(),i(void 0))},1e4);s.d(this._callFunctionResultEvent.donce(o=>{s.isDestroyed()||(s.destroy(),i(o),clearTimeout(a))})),this._callFunctionEvent.emit(e,n)})}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Qe("positionOffset","positionOffset(米)",!1,!1,[this,"positionOffset"],pn.defaults.positionOffset),new Qe("rotationOffset","rotationOffset(米)",!1,!1,[this,"rotationOffset"],pn.defaults.rotationOffset),new nt("actorTag","actorTag",!1,!1,[this,"actorTag"],pn.defaults.actorTag),new nt("widgetClass","widgetClass",!1,!1,[this,"widgetClass"],pn.defaults.widgetClass),new nt("socketName","socketName",!1,!1,[this,"socketName"],pn.defaults.socketName),new Y("info","info",!0,!1,[this,"info"],pn.defaults.info,z0)]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new mt("callFunction","callFunction",["string","string"],(n,i)=>this.callFunction(n,JSON.parse(i)),["",""]),new li("positionOffset","positionOffset(米)",!1,!1,[this,"positionOffset"]),new li("rotationOffset","rotationOffset(米)",!1,!1,[this,"rotationOffset"]),new nt("actorTag","actorTag",!1,!1,[this,"actorTag"]),new nt("widgetClass","widgetClass",!1,!1,[this,"widgetClass"]),new nt("socketName","socketName",!1,!1,[this,"socketName"]),new Y("info","info",!0,!1,[this,"info"],pn.defaults.info,z0)])]}};p(pn,"type",pn.register("ESUEWidget",pn,{chsName:"部件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"})),p(pn,"defaults",{...Re.defaults,info:{Title:"标题示例",Content:"内容示例"},widgetClass:"",socketName:"",positionOffset:[0,0,0],actorTag:"",rotationOffset:[0,0,0]});let bo=pn;(r=>{r.createDefaultProps=()=>({widgetClass:"",info:d.reactJsonWithUndefined(void 0),...Re.createDefaultProps()})})(bo||(bo={})),d.extendClassProps(bo.prototype,bo.createDefaultProps);const xu=class xu extends ${constructor(){super(...arguments);p(this,"_callFunctionEvent",this.dv(new d.Event));p(this,"_callFunctionResultEvent",this.dv(new d.Event));p(this,"_actorEvent",this.dv(new d.Event));p(this,"_lastActorStatus",this.dv(d.react("null")))}get typeName(){return"ESUnrealActor"}get defaultProps(){return xu.createDefaultProps()}get __callFunctionResultEvent(){return this._callFunctionResultEvent}get callFunctionEvent(){return this._callFunctionEvent}callFunction(e,n){return new Promise(i=>{const s=new d.Destroyable,a=setTimeout(()=>{s.isDestroyed()||(s.destroy(),i(void 0))},1e4);s.d(this._callFunctionResultEvent.donce(o=>{s.isDestroyed()||(s.destroy(),i(o),clearTimeout(a))})),this._callFunctionEvent.emit(e,n)})}getBoundSphereWithChildren(e){return new Promise((n,i)=>{n(void 0)})}get actorEvent(){return this._actorEvent}get lastActorStatus(){return this._lastActorStatus.value}set lastActorStatus(e){this._lastActorStatus.value=e}get lastActorStatusChanged(){return this._lastActorStatus.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new nt("actorTag","actorTag",!1,!1,[this,"actorTag"],""),new nt("actorClass","actorClass",!1,!1,[this,"actorClass"],""),new U("是否高亮","是否高亮highlight.",!1,!1,[this,"highlight"],!1)]}}getProperties(e){return[...super.getProperties(e),new mt("callFunction","callFunction",["string","string"],(n,i)=>this.callFunction(n,JSON.parse(i)),["",""]),new nt("actorTag","actorTag",!1,!1,[this,"actorTag"]),new nt("actorClass","actorClass",!1,!1,[this,"actorClass"]),new U("是否高亮","是否高亮highlight.",!1,!1,[this,"highlight"])]}};p(xu,"type",xu.register("ESUnrealActor",xu,{chsName:"UnrealActor",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"UnrealActor"}));let To=xu;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),actorTag:"",actorClass:"",highlight:!1,allowPicking:!0})})(To||(To={})),d.extendClassProps(To.prototype,To.createDefaultProps);const
|
|
309
|
+
\`\`\``,pn=class pn extends Re{constructor(e){super(e);p(this,"_callFunctionEvent",this.disposeVar(new d.Event));p(this,"_callFunctionResultEvent",this.dv(new d.Event))}get typeName(){return"ESUEWidget"}get defaultProps(){return pn.createDefaultProps()}get __callFunctionResultEvent(){return this._callFunctionResultEvent}get callFunctionEvent(){return this._callFunctionEvent}callFunction(e,n){return new Promise(i=>{const s=new d.Destroyable,a=setTimeout(()=>{s.isDestroyed()||(s.destroy(),i(void 0))},1e4);s.d(this._callFunctionResultEvent.donce(o=>{s.isDestroyed()||(s.destroy(),i(o),clearTimeout(a))})),this._callFunctionEvent.emit(e,n)})}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Qe("positionOffset","positionOffset(米)",!1,!1,[this,"positionOffset"],pn.defaults.positionOffset),new Qe("rotationOffset","rotationOffset(米)",!1,!1,[this,"rotationOffset"],pn.defaults.rotationOffset),new nt("actorTag","actorTag",!1,!1,[this,"actorTag"],pn.defaults.actorTag),new nt("widgetClass","widgetClass",!1,!1,[this,"widgetClass"],pn.defaults.widgetClass),new nt("socketName","socketName",!1,!1,[this,"socketName"],pn.defaults.socketName),new Y("info","info",!0,!1,[this,"info"],pn.defaults.info,z0)]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new mt("callFunction","callFunction",["string","string"],(n,i)=>this.callFunction(n,JSON.parse(i)),["",""]),new li("positionOffset","positionOffset(米)",!1,!1,[this,"positionOffset"]),new li("rotationOffset","rotationOffset(米)",!1,!1,[this,"rotationOffset"]),new nt("actorTag","actorTag",!1,!1,[this,"actorTag"]),new nt("widgetClass","widgetClass",!1,!1,[this,"widgetClass"]),new nt("socketName","socketName",!1,!1,[this,"socketName"]),new Y("info","info",!0,!1,[this,"info"],pn.defaults.info,z0)])]}};p(pn,"type",pn.register("ESUEWidget",pn,{chsName:"部件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"})),p(pn,"defaults",{...Re.defaults,info:{Title:"标题示例",Content:"内容示例"},widgetClass:"",socketName:"",positionOffset:[0,0,0],actorTag:"",rotationOffset:[0,0,0]});let bo=pn;(r=>{r.createDefaultProps=()=>({widgetClass:"",info:d.reactJsonWithUndefined(void 0),...Re.createDefaultProps()})})(bo||(bo={})),d.extendClassProps(bo.prototype,bo.createDefaultProps);const xu=class xu extends ${constructor(){super(...arguments);p(this,"_callFunctionEvent",this.dv(new d.Event));p(this,"_callFunctionResultEvent",this.dv(new d.Event));p(this,"_actorEvent",this.dv(new d.Event));p(this,"_lastActorStatus",this.dv(d.react("null")))}get typeName(){return"ESUnrealActor"}get defaultProps(){return xu.createDefaultProps()}get __callFunctionResultEvent(){return this._callFunctionResultEvent}get callFunctionEvent(){return this._callFunctionEvent}callFunction(e,n){return new Promise(i=>{const s=new d.Destroyable,a=setTimeout(()=>{s.isDestroyed()||(s.destroy(),i(void 0))},1e4);s.d(this._callFunctionResultEvent.donce(o=>{s.isDestroyed()||(s.destroy(),i(o),clearTimeout(a))})),this._callFunctionEvent.emit(e,n)})}getBoundSphereWithChildren(e){return new Promise((n,i)=>{n(void 0)})}get actorEvent(){return this._actorEvent}get lastActorStatus(){return this._lastActorStatus.value}set lastActorStatus(e){this._lastActorStatus.value=e}get lastActorStatusChanged(){return this._lastActorStatus.changed}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new nt("actorTag","actorTag",!1,!1,[this,"actorTag"],""),new nt("actorClass","actorClass",!1,!1,[this,"actorClass"],""),new U("是否高亮","是否高亮highlight.",!1,!1,[this,"highlight"],!1)]}}getProperties(e){return[...super.getProperties(e),new mt("callFunction","callFunction",["string","string"],(n,i)=>this.callFunction(n,JSON.parse(i)),["",""]),new nt("actorTag","actorTag",!1,!1,[this,"actorTag"]),new nt("actorClass","actorClass",!1,!1,[this,"actorClass"]),new U("是否高亮","是否高亮highlight.",!1,!1,[this,"highlight"])]}};p(xu,"type",xu.register("ESUnrealActor",xu,{chsName:"UnrealActor",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"UnrealActor"}));let To=xu;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),actorTag:"",actorClass:"",highlight:!1,allowPicking:!0})})(To||(To={})),d.extendClassProps(To.prototype,To.createDefaultProps);const _r=class _r extends ${constructor(e){super(e);p(this,"editingBindMode","doublePoints");p(this,"_resetWithCameraInfoEvent",this.dv(new d.Event));this.collision=!1}get typeName(){return"ESVideoFusion"}get defaultProps(){return _r.createDefaultProps()}get resetWithCameraInfoEvent(){return this._resetWithCameraInfoEvent}resetWithCameraInfo(){this._resetWithCameraInfoEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new U("循环","looping",!1,!1,[this,"looping"],_r.defaults.looping),new U("视椎体","showFrustum",!1,!1,[this,"showFrustum"],_r.defaults.showFrustum),new C("宽高比","aspectRatio",!1,!1,[this,"aspectRatio"],_r.defaults.aspectRatio),new C("横向夹角","fov",!1,!1,[this,"fov"],_r.defaults.fov),new C("视野长度","far",!1,!1,[this,"far"],_r.defaults.far),new C("近面距离","near",!1,!1,[this,"near"],_r.defaults.near),new Y("视频路径","videoStreamUrl",!1,!1,[this,"videoStreamUrl"],_r.defaults.videoStreamUrl),new C("显示优先级","zIndex",!1,!1,[this,"zIndex"],_r.defaults.zIndex),new tt("视频类型","视频类型",!1,!1,[this,"videoStreamType"],_r.defaults.videoStreamTypes,"video")]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new C("横向夹角","fov",!1,!1,[this,"fov"]),new C("宽高比","aspectRatio",!1,!1,[this,"aspectRatio"]),new C("视野长度","far",!1,!1,[this,"far"]),new C("近面距离","near",!1,!1,[this,"near"]),new Y("视频路径","videoStreamUrl",!1,!1,[this,"videoStreamUrl"]),new C("显示优先级","zIndex",!1,!1,[this,"zIndex"]),new U("视椎体","showFrustum",!1,!1,[this,"showFrustum"]),new U("循环","looping",!1,!1,[this,"looping"])]),new H("czm","czm",[new tt("视频类型","视频类型",!1,!1,[this,"videoStreamType"],_r.defaults.videoStreamTypes),new mt("重置","以当前相机状态",[],()=>this.resetWithCameraInfo(),[])])]}};p(_r,"type",_r.register("ESVideoFusion",_r,{chsName:"视频融合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视频融合"})),p(_r,"defaults",{...$.defaults,fov:90,aspectRatio:1.77778,far:100,near:5,videoStreamUrl:"",zIndex:1,showFrustum:!0,looping:!0,videoStreamTypes:[["video","video"],["hls","hls"],["flv","flv"],["img","img"],["gif","gif"]]});let Do=_r;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,videoStreamUrl:"",zIndex:1,showFrustum:!0,looping:!0,videoStreamType:"video"})})(Do||(Do={})),d.extendClassProps(Do.prototype,Do.createDefaultProps);const Ln=class Ln extends ${constructor(e){super(e);p(this,"editingBindMode","doublePoints");this.collision=!1}get typeName(){return"ESViewShed"}get defaultProps(){return Ln.createDefaultProps()}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new U("视椎体","showFrustum",!1,!1,[this,"showFrustum"],Ln.defaults.showFrustum),new C("宽高比","aspectRatio",!1,!1,[this,"aspectRatio"],Ln.defaults.aspectRatio),new C("横向夹角","fov",!1,!1,[this,"fov"],Ln.defaults.fov),new C("近面距离","near",!1,!1,[this,"near"],Ln.defaults.near),new C("视野长度","far",!1,!1,[this,"far"],Ln.defaults.far),new C("显示优先级","zIndex",!1,!1,[this,"zIndex"],Ln.defaults.zIndex)]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new C("横向夹角","fov",!1,!1,[this,"fov"]),new C("宽高比","aspectRatio",!1,!1,[this,"aspectRatio"]),new C("近面距离","near",!1,!1,[this,"near"]),new C("视野长度","far",!1,!1,[this,"far"]),new C("显示优先级","zIndex",!1,!1,[this,"zIndex"]),new U("视椎体","showFrustum",!1,!1,[this,"showFrustum"])])]}};p(Ln,"type",Ln.register("ESViewShed",Ln,{chsName:"视域分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"信号传输器"})),p(Ln,"defaults",{...$.defaults,fov:90,aspectRatio:1.77778,near:10,far:100,zIndex:1,showFrustum:!0});let xo=Ln;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),fov:90,aspectRatio:1.77778,near:10,far:100,zIndex:1,showFrustum:!0})})(xo||(xo={})),d.extendClassProps(xo.prototype,xo.createDefaultProps);const V0=`
|
|
310
310
|
#### 默认值如下
|
|
311
311
|
\`\`\`js
|
|
312
312
|
{
|
|
@@ -397,7 +397,7 @@ export type ESJTimeIntervalCollectionJsonType = {
|
|
|
397
397
|
\`\`\`
|
|
398
398
|
${U0}
|
|
399
399
|
\`\`\`
|
|
400
|
-
`;function q0(r){try{return JSON.parse(r),!0}catch{return!1}}const eI="${earthsdk3-assets-script-dir}/assets/misc/2.geojson",at=class at extends Ot{constructor(e){super(e);p(this,"_flyToFeatureEvent",this.dv(new d.Event));p(this,"_flyToFeatureIndexEvent",this.dv(new d.Event));p(this,"_features",this.disposeVar(d.reactJsonWithUndefined(void 0)));p(this,"pickedInfoType","FeatureCollection");this.ad(this.urlChanged.don(async()=>{var n;if(!this.url){this.features=void 0;return}do{if(typeof this.url=="object"){this.features=this.url;break}if(q0(this.url)){this.features=JSON.parse(this.url);break}await fetch(ft.context.getStrFromEnv(this.url)).then(i=>i.json()).then(i=>{this.features=i}).catch(i=>{console.warn("ESEntityCluster数据加载失败",i)})}while(!1);this.pickedInfoType=((n=this.features)==null?void 0:n.type)??"FeatureCollection"})),this.ad(this.editingChanged.don(()=>{console.warn("ESGeoJson暂不支持编辑!")}))}get typeName(){return"ESGeoJson"}get defaultProps(){return at.createDefaultProps()}get flyToFeatureEvent(){return this._flyToFeatureEvent}flyToFeature(e,n,i){this._flyToFeatureEvent.emit(e,n,i)}get flyToFeatureIndexEvent(){return this._flyToFeatureIndexEvent}flyToFeatureIndex(e,n){this._flyToFeatureIndexEvent.emit(e,n)}get features(){return this._features.value}set features(e){this._features.value=e}get featuresChanged(){return this._features.changed}getFeatures(){if(this.features)return this.features;console.log("数据未加载完成,请稍后调用此方法getFeatures()")}getESProperties(){return{defaultMenu:"style",basic:[],general:[new nt("名称","name",!0,!1,[this,"name"]),new nt("唯一标识","id",!1,!0,[this,"id"]),new U("是否显示","show",!1,!1,[this,"show"],!0),new U("开启碰撞","collision",!1,!1,[this,"collision"],!1),new U("允许拾取","allowPicking",!1,!1,[this,"allowPicking"],!1),new mt("保存观察视角","保存当前视角",[],()=>this.calcFlyInParam(),[])],dataSource:[new Y("服务地址","服务地址",!0,!1,[this,"url"],at.defaults.url),new C("要素最小可视距离","要素最小可视距离",!1,!1,[this,"minFeatureVisibleDistance"],at.defaults.minFeatureVisibleDistance),new C("要素最大可视距离","要素最大可视距离",!1,!1,[this,"maxFeatureVisibleDistance"],at.defaults.maxFeatureVisibleDistance),new tt("高度参考","高度参考",!1,!1,[this,"heightReference"],at.defaults.heightReferences)],location:[],coordinate:[],style:[new H("点文字样式","点样式集合",[]),new U("是否显示","是否显示",!1,!1,[this,"textShow"],at.defaults.textShow),new se("锚点","锚点",!1,!1,[this,"textAnchor"],at.defaults.textAnchor),new nt("标注显示属性","要用于显示的文本属性",!1,!1,[this,"textProperty"],at.defaults.textProperty),new nt("默认文本","默认统一显示的文本",!1,!1,[this,"textDefaultText"],at.defaults.textDefaultText),new it("文本颜色","文本颜色",!1,!1,[this,"textColor"],at.defaults.textColor),new it("背景颜色","背景颜色",!0,!1,[this,"textBackgroundColor"],at.defaults.textBackgroundColor),new nt("字体样式","字体样式",!1,!1,[this,"textFontStyle"],at.defaults.textFontStyle),new nt("字体粗细","字体粗细",!1,!1,[this,"textFontWeight"],at.defaults.textFontWeight),new C("字体大小","字体大小",!1,!1,[this,"textFontSize"],at.defaults.textFontSize),new se("像素偏移","像素偏移",!1,!1,[this,"textOffset"],at.defaults.textOffset),new H("点图片样式","图片样式集合",[]),new U("是否显示","是否显示",!1,!1,[this,"imageShow"],at.defaults.imageShow),new se("锚点","锚点",!1,!1,[this,"imageAnchor"],at.defaults.imageAnchor),new Y("图片地址","图片地址",!1,!1,[this,"imageUrl"],at.defaults.imageUrl),new se("图片大小","图片大小",!1,!1,[this,"imageSize"],at.defaults.imageSize),new se("像素偏移","像素偏移",!1,!1,[this,"imageOffset"],at.defaults.imageOffset),new H("线样式","线样式集合",[]),new U("是否显示","是否显示",!1,!1,[this,"stroked"],at.defaults.stroked),new U("贴地","贴地(线)",!1,!1,[this,"strokeGround"],at.defaults.strokeGround),new C("线宽","线宽",!1,!1,[this,"strokeWidth"],at.defaults.strokeWidth),new tt("线宽类型","线宽类型",!1,!1,[this,"strokeWidthType"],at.defaults.strokeWidthTypes),new it("线颜色","线颜色",!1,!1,[this,"strokeColor"],at.defaults.strokeColor),new nt("线材质","线材质",!1,!1,[this,"strokeMaterial"],at.defaults.strokeMaterial),new Y("线材质参数","线材质参数",!1,!1,[this,"strokeMaterialParams"],at.defaults.strokeMaterialParams),new H("面样式","面样式集合",[]),new U("是否显示","是否显示",!1,!1,[this,"filled"],at.defaults.filled),new U("贴地","贴地(面)",!1,!1,[this,"fillGround"],at.defaults.fillGround),new it("填充颜色","填充颜色",!1,!1,[this,"fillColor"],at.defaults.fillColor),new nt("填充材质","填充材质",!1,!1,[this,"fillMaterial"],at.defaults.fillMaterial),new Y("填充材质参数","填充材质参数",!1,!1,[this,"fillMaterialParams"],at.defaults.fillMaterialParams)]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new U("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"],at.defaults.show),new U("允许拾取","是否允许拾取",!1,!1,[this,"allowPicking"],at.defaults.allowPicking),new mt("飞入","飞入",["number"],n=>this.flyTo(n),[1]),new mt("清空飞入参数","清空飞入参数",[],()=>this.emptyFlyInParam(),[]),new mt("保存飞入参数","保存飞入参数flyInParam",[],()=>this.calcFlyInParam(),[]),new Y("flyInParam","flyInParam",!0,!1,[this,"flyInParam"],at.defaults.flyInParam)]),new H("标注文本样式","标注文本样式",[new U("是否显示","是否显示",!1,!1,[this,"textShow"],at.defaults.textShow),new nt("标注显示属性","要用于显示的文本属性",!1,!1,[this,"textProperty"],at.defaults.textProperty),new nt("默认文本","默认统一显示的文本",!1,!1,[this,"textDefaultText"],at.defaults.textDefaultText),new it("文本颜色","文本颜色",!1,!1,[this,"textColor"],at.defaults.textColor),new it("背景颜色","背景颜色",!0,!1,[this,"textBackgroundColor"],at.defaults.textBackgroundColor),new nt("字体","字体",!1,!1,[this,"textFontFamily"],at.defaults.textFontFamily),new nt("字体样式","字体样式",!1,!1,[this,"textFontStyle"],at.defaults.textFontStyle),new nt("字体粗细","字体粗细",!1,!1,[this,"textFontWeight"],at.defaults.textFontWeight),new C("字体大小","字体大小",!1,!1,[this,"textFontSize"],at.defaults.textFontSize),new se("锚点","锚点",!1,!1,[this,"textAnchor"],at.defaults.textAnchor),new se("像素偏移","像素偏移",!1,!1,[this,"textOffset"],at.defaults.textOffset)]),new H("标注图标样式","标注图标样式",[new U("是否显示","是否显示",!1,!1,[this,"imageShow"],at.defaults.imageShow),new Y("图片地址","图片地址",!1,!1,[this,"imageUrl"],at.defaults.imageUrl),new se("图片大小","图片大小",!1,!1,[this,"imageSize"],at.defaults.imageSize),new se("锚点","锚点",!1,!1,[this,"imageAnchor"],at.defaults.imageAnchor),new se("像素偏移","像素偏移",!1,!1,[this,"imageOffset"],at.defaults.imageOffset)]),new H("线样式","线样式",[new U("是否显示","是否显示",!1,!1,[this,"stroked"],at.defaults.stroked),new C("线宽","线宽",!1,!1,[this,"strokeWidth"],at.defaults.strokeWidth),new tt("线宽类型","线宽类型",!1,!1,[this,"strokeWidthType"],at.defaults.strokeWidthTypes),new it("线颜色","线颜色",!1,!1,[this,"strokeColor"],at.defaults.strokeColor),new nt("线材质","线材质",!1,!1,[this,"strokeMaterial"],at.defaults.strokeMaterial),new Y("线材质参数","线材质参数",!1,!1,[this,"strokeMaterialParams"],at.defaults.strokeMaterialParams),new U("贴地(线)","贴地(线)",!1,!1,[this,"strokeGround"],at.defaults.strokeGround)]),new H("填充样式","填充样式",[new U("是否显示","是否显示",!1,!1,[this,"filled"],at.defaults.filled),new it("填充颜色","填充颜色",!1,!1,[this,"fillColor"],at.defaults.fillColor),new nt("填充材质","填充材质",!1,!1,[this,"fillMaterial"],at.defaults.fillMaterial),new Y("填充材质参数","填充材质参数",!1,!1,[this,"fillMaterialParams"],at.defaults.fillMaterialParams),new U("贴地(面)","贴地(面)",!1,!1,[this,"fillGround"],at.defaults.fillGround)]),new H("通用","通用",[new Y("服务地址","服务地址",!0,!1,[this,"url"],at.defaults.url),new Fi("loadFnStr","loadFnStr",!0,!1,[this,"loadFuncStr"],at.defaults.defaultLoadFuncStr,at.defaults.defaultLoadFuncDocStr),new C("要素最小可视距离","要素最小可视距离",!1,!1,[this,"minFeatureVisibleDistance"],at.defaults.minFeatureVisibleDistance),new C("要素最大可视距离","要素最大可视距离",!1,!1,[this,"maxFeatureVisibleDistance"],at.defaults.maxFeatureVisibleDistance),new tt("高度参考","高度参考",!1,!1,[this,"heightReference"],at.defaults.heightReferences)])]}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}get textProperty(){return this.textStyle.textProperty}set textProperty(e){this.textStyle={...this.textStyle,textProperty:e}}get textPropertyChanged(){return this.textStyleChanged}get textDefaultText(){return this.textStyle.defaultText}set textDefaultText(e){this.textStyle={...this.textStyle,defaultText:e}}get textDefaultTextChanged(){return this.textStyleChanged}get textColor(){return this.textStyle.color}set textColor(e){this.textStyle={...this.textStyle,color:e}}get textColorChanged(){return this.textStyleChanged}get textBackgroundColor(){return this.textStyle.backgroundColor}set textBackgroundColor(e){this.textStyle={...this.textStyle,backgroundColor:e}}get textBackgroundColorChanged(){return this.textStyleChanged}get textFontFamily(){return this.textStyle.fontFamily}set textFontFamily(e){this.textStyle={...this.textStyle,fontFamily:e}}get textFontFamilyChanged(){return this.textStyleChanged}get textFontStyle(){return this.textStyle.fontStyle}set textFontStyle(e){this.textStyle={...this.textStyle,fontStyle:e}}get textFontStyleChanged(){return this.textStyleChanged}get textFontWeight(){return this.textStyle.fontWeight}set textFontWeight(e){this.textStyle={...this.textStyle,fontWeight:e}}get textFontWeightChanged(){return this.textStyleChanged}get textFontSize(){return this.textStyle.fontSize}set textFontSize(e){this.textStyle={...this.textStyle,fontSize:e}}get textFontSizeChanged(){return this.textStyleChanged}get textAnchor(){return this.textStyle.anchor}set textAnchor(e){this.textStyle={...this.textStyle,anchor:e}}get textAnchorChanged(){return this.textStyleChanged}get textOffset(){return this.textStyle.offset}set textOffset(e){this.textStyle={...this.textStyle,offset:e}}get textOffsetChanged(){return this.textStyleChanged}get imageUrl(){return this.imageStyle.url}set imageUrl(e){this.imageStyle={...this.imageStyle,url:e}}get imageUrlChanged(){return this.imageStyleChanged}get imageSize(){return this.imageStyle.size}set imageSize(e){this.imageStyle={...this.imageStyle,size:e}}get imageSizeChanged(){return this.imageStyleChanged}get imageAnchor(){return this.imageStyle.anchor}set imageAnchor(e){this.imageStyle={...this.imageStyle,anchor:e}}get imageAnchorChanged(){return this.imageStyleChanged}get imageOffset(){return this.imageStyle.offset}set imageOffset(e){this.imageStyle={...this.imageStyle,offset:e}}get imageOffsetChanged(){return this.imageStyleChanged}};p(at,"type",at.register("ESGeoJson",at,{chsName:"ESGeoJson",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"GeoJson数据加载"})),p(at,"defaults",{...Ot.defaults,show:!0,allowPicking:!0,url:eI,defaultLoadFuncStr:U0,defaultLoadFuncDocStr:tI,data:$C,dataMd:jC,stroked:!0,strokeWidth:1,strokeWidthType:"world",strokeColor:[.79,.91,.06,1],strokeMaterial:"",strokeMaterialParams:{},strokeGround:!1,filled:!0,fillColor:[.79,.91,.06,.2],fillMaterial:"",fillMaterialParams:{},fillGround:!1,imageShow:!0,imageUrl:"${earthsdk3-assets-script-dir}/assets/img/location.png",imageSize:[32,32],imageAnchor:[.5,1],imageOffset:[0,0],textShow:!0,textProperty:"",textDefaultText:"默认标注",textColor:[1,1,1,1],textBackgroundColor:void 0,textFontFamily:"Arial",textFontStyle:"normal",textFontSize:16,textFontWeight:"normal",textAnchor:[0,1],textOffset:[-16,8],strokeWidthTypes:[["screen","screen"],["world","world"]],flyInParam:{position:[0,0,0],rotation:[0,0,0],flyDuration:1},minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReferences:[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]]});let Lo=at;(r=>{r.createDefaultProps=()=>({...Ot.createDefaultProps(),show:!0,allowPicking:!0,loadFuncStr:void 0,url:void 0,stroked:!0,strokeStyle:d.reactJson({width:1,widthType:"world",color:[.79,.91,.06,1],material:"",materialParams:{},ground:!1}),filled:!0,fillStyle:d.reactJson({color:[.79,.91,.06,.2],material:"",materialParams:{},ground:!1}),imageShow:!0,imageStyle:d.reactJson({url:"${earthsdk3-assets-script-dir}/assets/img/location.png",size:[32,32],anchor:[.5,1],offset:[0,0]}),textShow:!0,textStyle:d.reactJson({textProperty:"",defaultText:"默认标注",color:[1,1,1,1],backgroundColor:void 0,fontFamily:"Arial",fontSize:16,fontStyle:"normal",fontWeight:"normal",anchor:[0,1],offset:[16,-8]}),minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,flyInParam:d.reactJsonWithUndefined(void 0),heightReference:"NONE"})})(Lo||(Lo={})),d.extendClassProps(Lo.prototype,Lo.createDefaultProps);const ba=class ba extends Et{constructor(e){super(e);p(this,"editingBindMode","doublePoints");p(this,"_height",this.disposeVar(d.react(0)));{const n=()=>{this.height=this.points&&this.points.length>=2?this.points[1][2]-this.points[0][2]:0};n(),this.ad(this.pointsChanged.don(n))}this.stroked=!0,this.strokeStyle.width=2}get typeName(){return"ESHeightMeasurement"}get defaultProps(){return ba.createDefaultProps()}get height(){return this._height.value}set height(e){this._height.value=e}get heightChanged(){return this._height.changed}getProperties(e){return[...super.getProperties(e)]}};p(ba,"type",ba.register("ESHeightMeasurement",ba,{chsName:"高度测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"高度测量"})),p(ba,"supportEditingModes",[...Et.supportEditingModes,vt.DoublePointsAppend,vt.DoublePointsModify]),p(ba,"defaults",{...Et.defaults});let Ro=ba;(r=>{r.createDefaultProps=()=>({...Et.createDefaultProps()})})(Ro||(Ro={})),d.extendClassProps(Ro.prototype,Ro.createDefaultProps);const Il=class Il extends Jr{constructor(e){super(e);p(this,"_area",this.dv(d.react(0)));p(this,"_perimeter",this.dv(d.react(0)));p(this,"editingBindMode","doublePoints");this.radius=1,this.filled=!0,this.stroked=!1,this.collision=!1,this.strokeColor=[1,1,1,1],this.fillColor=[1,1,1,.5];const n=()=>{this._area.value=Math.PI*this.radius*this.radius,this._perimeter.value=2*Math.PI*this.radius};n(),this.d(this.radiusChanged.don(n))}get typeName(){return"ESLocalCircle"}get defaultProps(){return{...Il.createDefaultProps()}}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}toPolygon(e=10,n){return gm([...this.position],this.radius,e,n)[0].map(s=>[...s,this.position?this.position[2]:0])}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",basic:[...e.basic,new C("圆半径","圆半径",!0,!1,[this,"radius"],1)],general:[...e.general],dataSource:[...e.dataSource],location:[],coordinate:[new U("是否编辑","是否编辑",!1,!1,[this,"editing"]),new C("面积","面积",!1,!0,[this,"area"]),new C("周长","周长",!1,!0,[this,"perimeter"]),new li("三维坐标","三维坐标",!0,!1,[this,"position"],[0,0,0])],style:[...e.style]}}getProperties(e){return[...super.getProperties(e),new H("ESLocalCircle","ESLocalCircle",[new C("圆半径","圆半径",!1,!1,[this,"radius"]),new C("面积","面积",!1,!0,[this,"area"]),new C("周长","周长",!1,!0,[this,"perimeter"])])]}};p(Il,"type",Il.register("ESLocalCircle",Il,{chsName:"局部坐标圆形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalCircle"})),p(Il,"defaults",{...Jr.defaults,fillStyle:{color:[1,1,1,.5],material:"",materialParams:{}}});let Fo=Il;(r=>{r.createDefaultProps=()=>({...Jr.createDefaultProps(),radius:1})})(Fo||(Fo={})),d.extendClassProps(Fo.prototype,Fo.createDefaultProps);const Ml=class Ml extends Jr{get typeName(){return"ESLocalPolygon"}get defaultProps(){return{...Ml.createDefaultProps()}}constructor(t){super(t),this.filled=!0}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new rp("坐标","偏移量[x,y],单位米,不含高度",!1,!1,[this,"points"],[])]}}getProperties(t){return[...super.getProperties(t),new H("ESLocalPolygon","ESLocalPolygon",[new Y("位置偏移数组","偏移量[x,y],单位米,不含高度",!1,!1,[this,"points"])])]}};p(Ml,"type",Ml.register("ESLocalPolygon",Ml,{chsName:"局部2D坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygon"})),p(Ml,"defaults",{...Jr.defaults,points:[],filled:!0});let is=Ml;(r=>{r.createDefaultProps=()=>({...Jr.createDefaultProps(),points:gf(void 0)})})(is||(is={})),d.extendClassProps(is.prototype,is.createDefaultProps);const Ou=class Ou extends Ti{get typeName(){return"ESLocalPolygonZ"}get defaultProps(){return{...Ou.createDefaultProps()}}constructor(t){super(t),this.filled=!0}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new df("本地位置数组","本地位置数组",!0,!1,[this,"points"])])]}};p(Ou,"type",Ou.register("ESLocalPolygonZ",Ou,{chsName:"局部坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygonZ"}));let Go=Ou;(r=>{r.createDefaultProps=()=>({...Ti.createDefaultProps(),points:d.reactPositions(void 0)})})(Go||(Go={})),d.extendClassProps(Go.prototype,Go.createDefaultProps);const Nl=class Nl extends Jr{get typeName(){return"ESLocalRectangle"}get defaultProps(){return{...Nl.createDefaultProps()}}constructor(t){super(t),this.filled=!0}getProperties(t){return[...super.getProperties(t),new H("ESLocalRectangle","ESLocalRectangle",[new C("宽度","宽度",!1,!1,[this,"width"]),new C("高度","高度",!1,!1,[this,"height"])])]}};p(Nl,"type",Nl.register("ESLocalRectangle",Nl,{chsName:"局部坐标四边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalRectangle"})),p(Nl,"defaults",{...Jr.defaults,width:5e5,height:3e5});let ko=Nl;(r=>{r.createDefaultProps=()=>({...Jr.createDefaultProps(),width:5e5,height:3e5})})(ko||(ko={})),d.extendClassProps(ko.prototype,ko.createDefaultProps);const hs=class hs extends Et{constructor(e){super(e);p(this,"editingBindMode","lineString");p(this,"_distance",this.dv(d.react(0)));p(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);p(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());this.fillColor=[1,0,.73,1];const n=()=>{if(this.points&&this.points.length>=2){const i=Oh(this.points,"GEODESIC"),s=i[i.length-1];this._distance.value=s}else this._distance.value=0};n(),this.d(this.pointsChanged.don(n))}get typeName(){return"ESPipeFence"}get defaultProps(){return hs.createDefaultProps()}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new C("高度","height",!1,!1,[this,"height"],10),new C("宽度","width",!1,!1,[this,"width"],10),new tt("模式","materialMode",!1,!1,[this,"materialMode"],hs.defaults.materialModes,"purple")],coordinate:[...e.coordinate,new C("长度","距离",!1,!0,[this,"distance"])]}}getProperties(e){return[...super.getProperties(e),new H("ESPipeFence","ESPipeFence",[new C("高度","height",!1,!1,[this,"height"]),new C("宽度","width",!1,!1,[this,"width"]),new tt("materialMode","materialMode",!1,!1,[this,"materialMode"],hs.defaults.materialModes)])]}};p(hs,"type",hs.register("ESPipeFence",hs,{chsName:"管道电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"管道电子围栏"})),p(hs,"supportEditingModes",[...Et.supportEditingModes,vt.LineStringAppend,vt.LineStringInsert]),p(hs,"defaults",{...Et.defaults,strokeStyle:{width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{}},fillStyle:{color:[1,1,1,1],material:"",materialParams:{}},filled:!0,stroked:!0,materialModes:[["单箭头","singleArrow"],["多箭头","multipleArrows"]]});let zo=hs;(r=>{r.createDefaultProps=()=>({...Et.createDefaultProps(),height:10,width:10,materialMode:"singleArrow",filled:!0})})(zo||(zo={})),d.extendClassProps(zo.prototype,zo.createDefaultProps);const Ta=class Ta extends Je{constructor(e){super(e);p(this,"_setLayerVisibleEvent",this.dv(new d.Event));p(this,"_setLayerColorEvent",this.dv(new d.Event))}get typeName(){return"ESPipeserTileset"}get defaultProps(){return Ta.createDefaultProps()}get setLayerVisibleEvent(){return this._setLayerVisibleEvent}setLayerVisible(e,n){this._setLayerVisibleEvent.emit(e,n)}get setLayerColorEvent(){return this._setLayerColorEvent}setLayerColor(e,n){this._setLayerColorEvent.emit(e,n)}getProperties(e){return[...super.getProperties(e),new H("ESPipeserTileset","ESPipeserTileset",[new mt("setLayerVisible","setLayerVisible",["string","string"],(n,i)=>this.setLayerVisible(n,i),["",""]),new mt("setLayerColor","setLayerColor",["string","string"],(n,i)=>this.setLayerColor(n,i),["",""]),new tt("colorMode","colorMode",!0,!1,[this,"colorMode"],Ta.description.colorMode,"default")])]}};p(Ta,"type",Ta.register("ESPipeserTileset",Ta,{chsName:"PipeSer图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"PipeSer图层"})),p(Ta,"description",{colorMode:[["default","default"],["color","color"],["blend","blend"]]});let Vo=Ta;(r=>{r.createDefaultProps=()=>({colorMode:"default",...Je.createDefaultProps()})})(Vo||(Vo={})),d.extendClassProps(Vo.prototype,Vo.createDefaultProps);const cs=class cs extends Et{constructor(e){super(e);p(this,"editingBindMode","circular");this.filled=!0,this.collision=!1}get typeName(){return"ESPolygonFence"}get defaultProps(){return cs.createDefaultProps()}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",coordinate:[...e.coordinate,new C("面积","面积",!1,!0,[this,"area"]),new C("周长","周长",!1,!0,[this,"perimeter"])],basic:[...e.basic,new C("高度","height",!1,!1,[this,"height"],10),new tt("模式","materialMode",!1,!1,[this,"materialMode"],cs.defaults.materialModes,"danger")]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new C("高度","height",!1,!1,[this,"height"]),new tt("materialMode","materialMode",!1,!1,[this,"materialMode"],cs.defaults.materialModes)]),new H("计算","计算",[new C("面积","面积",!1,!0,[this,"area"]),new C("周长","周长",!1,!0,[this,"perimeter"])])]}};p(cs,"type",cs.register("ESPolygonFence",cs,{chsName:"多边形电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"多边形电子围栏"})),p(cs,"supportEditingModes",[...Et.supportEditingModes,vt.CircularAppend,vt.CircularInsert,vt.HeightModify]),p(cs,"defaults",{...Et.defaults,fillStyle:{color:[1,1,1,1],material:"",materialParams:{}},filled:!0,materialModes:[["模式一","danger"],["模式二","checkerboard"],["模式三","warning"],["模式四","cord"],["模式五","scanline"],["模式六","honeycomb"],["模式七","gradientColor"]]});let Uo=cs;(r=>{r.createDefaultProps=()=>({height:10,materialMode:"danger",...Et.createDefaultProps()})})(Uo||(Uo={})),d.extendClassProps(Uo.prototype,Uo.createDefaultProps);const Vs=class Vs extends Et{constructor(e){super(e);p(this,"_deprecated",["ground"]);p(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());p(this,"editingBindMode","doublePoints")}get typeName(){return"ESRectangle"}get defaultProps(){return Vs.createDefaultProps()}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new U("是否贴地","A boolean Property specifying the visibility.",!1,!1,[this,"ground"]),new U("轮廓线半透明","轮廓线半透明.",!1,!1,[this,"outlineTranslucent"]),new C("高度","高度",!1,!1,[this,"height"]),new C("拉伸高度","拉伸高度",!1,!1,[this,"extrudedHeight"]),new Rr("范围","西南东北",!0,!1,[this,"rectangle"],Vs.defaults.rectangle),new C("纹理旋转角度","纹理旋转角度.",!1,!1,[this,"stRotation"]),new C("旋转角度","rotation",!1,!1,[this,"rotation"]),new U("是否单点编辑","是否单点编辑.",!1,!1,[this,"pointEditing"])])]}};p(Vs,"type",Vs.register("ESRectangle",Vs,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),p(Vs,"supportEditingModes",[...Et.supportEditingModes,vt.DoublePointsAppend,vt.DoublePointsModify]),p(Vs,"defaults",{...Et.defaults,ground:!1,outlineTranslucent:!0,height:0,extrudedHeight:0,rectangle:void 0,stRotation:0,rotation:0,pointEditing:!1,allowPicking:!1});let qo=Vs;(r=>{r.createDefaultProps=()=>({...Et.createDefaultProps(),ground:!1,outlineTranslucent:!0,height:0,extrudedHeight:0,rectangle:d.reactArrayWithUndefined(void 0),rotation:0,stRotation:0,pointEditing:!1,filled:!0})})(qo||(qo={})),d.extendClassProps(qo.prototype,qo.createDefaultProps);const bl=class bl extends At{get typeName(){return"ESPolygonWithHole"}get defaultProps(){return bl.createDefaultProps()}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Y("裁切多边形数组","必须在内部,且没有相交,裁切的多边形数组",!0,!1,[this,"innerRings"],[])]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new Y("裁切多边形数组","必须在内部,且没有相交,裁切的多边形数组",!0,!1,[this,"innerRings"],[])])]}};p(bl,"type",bl.register("ESPolygonWithHole",bl,{chsName:"内部裁切多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"带洞多边形"})),p(bl,"defaults",{...At.defaults,innerRings:[]});let Wo=bl;(r=>{r.createDefaultProps=()=>({...At.createDefaultProps(),innerRings:d.reactPositionsSet(void 0)})})(Wo||(Wo={})),d.extendClassProps(Wo.prototype,Wo.createDefaultProps);const Us=class Us extends At{constructor(e){super(e);p(this,"_startEvent",this.disposeVar(new d.Event));p(this,"_surfaceArea",this.disposeVar(d.react(0)));this.fillStyle.ground=!0}get typeName(){return"ESSurfaceAreaMeasurement"}get defaultProps(){return Us.createDefaultProps()}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get surfaceArea(){return this._surfaceArea.value}set surfaceArea(e){this._surfaceArea.value=e}get surfaceChanged(){return this._surfaceArea.changed}getProperties(e){return[...super.getProperties(e),new H("ESSurfaceAreaMeasurement","表面积测量",[new mt("开始计算","开始计算",[],()=>this.start(),[]),new C("插值距离","插值距离,单位米,为0时不插值",!1,!1,[this,"interpolation"],Us.defaults.interpolation),new C("偏移高度","三角面整体偏移高度,单位米",!1,!1,[this,"offsetHeight"],Us.defaults.offsetHeight)])]}};p(Us,"type",Us.register("ESSurfaceAreaMeasurement",Us,{chsName:"表面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"表面积测量"})),p(Us,"defaults",{...At.defaults,interpolation:.5,offsetHeight:0,unitsMode:[["平方米","SquareMeter"],["平方千米","SquareKilometer"],["亩","MU"],["公顷","Hectare"]]});let Ho=Us;(r=>{r.createDefaultProps=()=>({...At.createDefaultProps(),interpolation:void 0,offsetHeight:void 0,units:d.reactArray(["SquareMeter"])})})(Ho||(Ho={})),d.extendClassProps(Ho.prototype,Ho.createDefaultProps);const qs=class qs extends ${get typeName(){return"ESDatasmithRuntimeModel"}get defaultProps(){return qs.createDefaultProps()}constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new C("下载进度","下载进度",!0,!0,[this,"downloadProgress"]),new Y("importOptions","导入参数",!0,!1,[this,"importOptions"],qs.defaults.importOptions)],dataSource:[...t.dataSource,new Y("路径","url",!1,!1,[this,"url"])]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new Y("url","url",!1,!1,[this,"url"]),new C("下载进度","下载进度",!0,!0,[this,"downloadProgress"]),new Y("importOptions","导入参数",!0,!1,[this,"importOptions"],qs.defaults.importOptions)])]}};p(qs,"type",qs.register("ESDatasmithRuntimeModel",qs,{chsName:"Datasmith Model",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Datasmith Model"})),p(qs,"defaults",{...$.defaults,url:"",importOptions:{buildCollisions:"QueryAndPhysics",buildHierarchy:"Simplified",collisionType:"CTF_UseComplexAsSimple",bImportMetaData:!0}});let Xo=qs;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),url:"",importOptions:d.reactJsonWithUndefined(void 0),downloadProgress:0})})(Xo||(Xo={})),d.extendClassProps(Xo.prototype,Xo.createDefaultProps);const ue=class ue extends is{get typeName(){return"ESDynamicWater"}get defaultProps(){return{...ue.createDefaultProps()}}constructor(t){super(t),this.stroked=!1,this.filled=!0}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new tt("水域类型","当为 custom 时其他控制效果的参数生效,否则不生效,使用对应水域类型的预定效果",!1,!1,[this,"waterType"],ue.defaults.waterTypes,ue.defaults.waterType),new C("频率","控制波数的数值(次/千米)",!1,!1,[this,"frequency"],ue.defaults.frequency),new Kt("振幅","控制水波振幅的数值",!1,!1,[this,"amplitude"],.01,[0,1],ue.defaults.amplitude),new Kt("流向","控制水流方向,局部坐标方向",!1,!1,[this,"flowDirection"],1,[0,360],ue.defaults.flowDirection),new Kt("波动频率","控制水波纹扰动的速率",!1,!1,[this,"waveVelocity"],.01,[0,1],ue.defaults.waveVelocity),new Kt("镜面反射强度","控制镜面反射强度的数值",!1,!1,[this,"specularIntensity"],.01,[0,1],ue.defaults.specularIntensity),new Kt("水体浑浊度","控制水体的浑浊程度,数值越大,浑浊程度越大,取值范围 0 - 10。",!1,!1,[this,"murkiness"],.1,[0,10],ue.defaults.murkiness),new C("水流速度","控制水流速度,单位 米/秒",!1,!1,[this,"flowSpeed"],ue.defaults.flowSpeed),new it("水的底色","waterColor",!1,!1,[this,"waterColor"],ue.defaults.waterColor),new Y("水的图片","waterImage",!1,!1,[this,"waterImage"],ue.defaults.waterImage)]}}getProperties(t){return[...super.getProperties(t),new tt("水域类型","当为 custom 时其他控制效果的参数生效,否则不生效,使用对应水域类型的预定效果",!1,!1,[this,"waterType"],ue.defaults.waterTypes),new Y("水的图片","waterImage",!1,!1,[this,"waterImage"],ue.defaults.waterImage),new it("水的底色","waterColor",!1,!1,[this,"waterColor"],ue.defaults.waterColor),new C("频率","控制波数的数值(次/千米)",!1,!1,[this,"frequency"],ue.defaults.frequency),new Kt("波动频率","控制水波纹扰动的速率",!1,!1,[this,"waveVelocity"],.01,[0,1],ue.defaults.waveVelocity),new Kt("振幅","控制水波振幅的数值",!1,!1,[this,"amplitude"],.01,[0,1],ue.defaults.amplitude),new Kt("镜面反射强度","控制镜面反射强度的数值",!1,!1,[this,"specularIntensity"],.01,[0,1],ue.defaults.specularIntensity),new Kt("流向","控制水流方向,局部坐标方向",!1,!1,[this,"flowDirection"],1,[0,360],ue.defaults.flowDirection),new Kt("水体浑浊度","控制水体的浑浊程度,数值越大,浑浊程度越大,取值范围 0 - 10。",!1,!1,[this,"murkiness"],.1,[0,10],ue.defaults.murkiness),new C("水流速度","控制水流速度,单位 米/秒",!1,!1,[this,"flowSpeed"],ue.defaults.flowSpeed)]}};p(ue,"type",ue.register("ESDynamicWater",ue,{chsName:"动态水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"局部多边形水面"})),p(ue,"defaults",{...is.defaults,waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterTypes:[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],waterType:"river",flowDirection:0,flowSpeed:0,waterImage:void 0,murkiness:5});let Yo=ue;(r=>{r.createDefaultProps=()=>({...is.createDefaultProps(),allowPicking:!0,waterImage:d.reactJsonWithUndefined(void 0),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5})})(Yo||(Yo={})),d.extendClassProps(Yo.prototype,Yo.createDefaultProps);const he=class he extends At{get typeName(){return"ESGeoWater"}get defaultProps(){return he.createDefaultProps()}constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new tt("水域类型","当为custom是其他控制效果的参数生效,否则不生效,使用对应水域类型的预定效果",!1,!1,[this,"waterType"],he.defaults.waterTypes,he.defaults.waterType),new C("频率","控制波数的数值(次/千米)",!1,!1,[this,"frequency"],he.defaults.frequency),new Kt("振幅","控制水波振幅的数值",!1,!1,[this,"amplitude"],.01,[0,1],he.defaults.amplitude),new Kt("流向","控制水流方向,局部坐标方向",!1,!1,[this,"flowDirection"],1,[0,360],he.defaults.flowDirection),new Kt("波动频率","控制水波纹扰动的速率",!1,!1,[this,"waveVelocity"],.01,[0,1],he.defaults.waveVelocity),new Kt("镜面反射强度","控制镜面反射强度的数值",!1,!1,[this,"specularIntensity"],.01,[0,1],he.defaults.specularIntensity),new Kt("水体浑浊度","控制水体的浑浊程度,数值越大,浑浊程度越大,取值范围0 - 10。",!1,!1,[this,"murkiness"],.1,[0,10],he.defaults.murkiness),new C("水流速度","控制水流速度,单位 米/秒",!1,!1,[this,"flowSpeed"],he.defaults.flowSpeed),new it("水的底色","waterColor",!1,!1,[this,"waterColor"],he.defaults.waterColor),new Y("水的图片","waterImage",!1,!1,[this,"waterImage"],he.defaults.waterImage)]}}getProperties(t){return[...super.getProperties(t),new H("ESGeoWater","ESGeoWater",[new tt("水域类型","当为custom是其他控制效果的参数生效,否则不生效,使用对应水域类型的预定效果",!1,!1,[this,"waterType"],he.defaults.waterTypes),new Y("水的图片","waterImage",!1,!1,[this,"waterImage"],he.defaults.waterImage),new it("水的底色","waterColor",!1,!1,[this,"waterColor"],he.defaults.waterColor),new C("频率","控制波数的数值(次/千米)",!1,!1,[this,"frequency"],he.defaults.frequency),new Kt("波动频率","控制水波纹扰动的速率",!1,!1,[this,"waveVelocity"],.01,[0,1],he.defaults.waveVelocity),new Kt("振幅","控制水波振幅的数值",!1,!1,[this,"amplitude"],.01,[0,1],he.defaults.amplitude),new Kt("镜面反射强度","控制镜面反射强度的数值",!1,!1,[this,"specularIntensity"],.01,[0,1],he.defaults.specularIntensity),new Kt("流向","控制水流方向,局部坐标方向",!1,!1,[this,"flowDirection"],1,[0,360],he.defaults.flowDirection),new Kt("水体浑浊度","控制水体的浑浊程度,数值越大,浑浊程度越大,取值范围0 - 10。",!1,!1,[this,"murkiness"],.1,[0,10],he.defaults.murkiness),new C("水流速度","控制水流速度,单位 米/秒",!1,!1,[this,"flowSpeed"],he.defaults.flowSpeed)])]}};p(he,"type",he.register("ESGeoWater",he,{chsName:"地理水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理动态水面"})),p(he,"defaults",{...At.defaults,waterColor:[.1497,.165,.0031,.8],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterTypes:[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],waterType:"river",flowDirection:0,flowSpeed:0,waterImage:{},murkiness:5});let Jo=he;(r=>{r.createDefaultProps=()=>({...At.createDefaultProps(),allowPicking:!0,waterImage:d.reactJsonWithUndefined(void 0),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5})})(Jo||(Jo={})),d.extendClassProps(Jo.prototype,Jo.createDefaultProps);const Tl=class Tl extends ${get typeName(){return"ESLevelRuntimeModel"}get defaultProps(){return Tl.createDefaultProps()}constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new C("下载进度","下载进度",!0,!0,[this,"downloadProgress"]),new nt("levelName","levelName",!1,!1,[this,"levelName"],""),new C("levelLoadDistance","levelLoadDistance",!1,!1,[this,"levelLoadDistance"],1e3),new Qe("levelOffset","levelOffset",!1,!1,[this,"levelOffset"],[0,0,0])],dataSource:[...t.dataSource,new Y("url","url",!1,!1,[this,"url"],"")]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new Y("url","url",!1,!1,[this,"url"]),new nt("levelName","levelName",!1,!1,[this,"levelName"]),new C("下载进度","下载进度",!0,!0,[this,"downloadProgress"]),new C("levelLoadDistance","levelLoadDistance",!1,!1,[this,"levelLoadDistance"]),new Qe("levelOffset","levelOffset",!1,!1,[this,"levelOffset"])])]}};p(Tl,"type",Tl.register("ESLevelRuntimeModel",Tl,{chsName:"关卡包模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"关卡包模型"})),p(Tl,"defaults",{...$.defaults,url:""});let Ko=Tl;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),url:"",downloadProgress:0,levelName:"",levelOffset:d.reactArray([0,0,0]),levelLoadDistance:1e3})})(Ko||(Ko={})),d.extendClassProps(Ko.prototype,Ko.createDefaultProps);const Er=class Er extends hn{constructor(e){super(e);p(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);p(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());this.filled=!0,this.stroked=!1,this.fillColor=[1,0,.73,1]}get typeName(){return"ESPipeline"}get defaultProps(){return Er.createDefaultProps()}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new C("半径","radius(米)",!1,!1,[this,"radius"],Er.defaults.radius),new C("圆边数","sides(圆细分边)",!1,!1,[this,"sides"],Er.defaults.sides),new C("材质速度","speed",!1,!1,[this,"speed"],Er.defaults.speed),new tt("材质模式","materialMode",!1,!1,[this,"materialMode"],Er.defaults.materialModes),new Y("材质图片和重复度","materialImage",!1,!1,[this,"materialImage"],Er.defaults.materialImage)],style:[new H("点样式","点样式集合",[]),new U("开启","开启点样式",!1,!1,[this,"pointed"],!1),new C("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new tt("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new it("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new H("线样式","线样式集合",[]),new U("开启线样式","开启线样式",!1,!1,[this,"stroked"],!0),new C("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new tt("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new it("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new U("是否贴地","是否贴地(线)",!1,!1,[this,"strokeGround"],!1),new H("面样式","面样式集合",[]),new U("开启","开启填充样式",!1,!1,[this,"filled"],!1),new it("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1]),new U("是否贴地","是否贴地",!1,!1,[this,"fillGround"],!1)]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new C("半径","radius(米)",!1,!1,[this,"radius"],Er.defaults.radius),new C("圆边数","sides(圆细分边)",!1,!1,[this,"sides"],Er.defaults.sides),new Y("材质图片和重复度","materialImage",!1,!1,[this,"materialImage"],Er.defaults.materialImage),new C("材质速度","speed",!1,!1,[this,"speed"],Er.defaults.speed),new tt("材质模式","materialMode",!1,!1,[this,"materialMode"],Er.defaults.materialModes)])]}};p(Er,"type",Er.register("ESPipeline",Er,{chsName:"管线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPipeline"})),p(Er,"defaults",{...hn.defaults,radius:10,sides:10,materialImage:{url:"",uDis:50,vDis:10},speed:1,materialModes:[["单箭头","singleArrow"],["多箭头","multipleArrows"]]});let Qo=Er;(r=>{r.createDefaultProps=()=>({...hn.createDefaultProps(),radius:10,sides:10,materialMode:"singleArrow",materialImage:d.reactJson(r.defaults.materialImage),speed:1})})(Qo||(Qo={})),d.extendClassProps(Qo.prototype,Qo.createDefaultProps);const gn=class gn extends Et{constructor(e){super(e);p(this,"editingBindMode","visibility")}get typeName(){return"ESVisibilityAnalysis"}get defaultProps(){return gn.createDefaultProps()}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new it("可视区域颜色","可视区域颜色.",!1,!1,[this,"visibleColor"],gn.defaults.visibleColor),new it("遮挡区域颜色","遮挡区域颜色.",!1,!1,[this,"invisibleColor"],gn.defaults.invisibleColor),new C("视点高度偏移","heightOffset",!1,!1,[this,"heightOffset"],gn.defaults.heightOffset)]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new it("可视区域颜色","可视区域颜色.",!1,!1,[this,"visibleColor"],gn.defaults.visibleColor),new it("遮挡区域颜色","遮挡区域颜色.",!1,!1,[this,"invisibleColor"],gn.defaults.invisibleColor),new C("视点高度偏移","heightOffset",!1,!1,[this,"heightOffset"],gn.defaults.heightOffset)])]}};p(gn,"type",gn.register("ESVisibilityAnalysis",gn,{chsName:"通视分析,视线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通视分析,视线分析"})),p(gn,"supportEditingModes",[...Et.supportEditingModes,vt.VisibilityAppend,vt.VisibilityModify]),p(gn,"defaults",{...Et.defaults,visibleColor:[0,1,0,1],invisibleColor:[1,0,0,1],heightOffset:0});let Bo=gn;(r=>{r.createDefaultProps=()=>({...Et.createDefaultProps(),visibleColor:d.reactArray([0,1,0,1]),invisibleColor:d.reactArray([1,0,0,1]),heightOffset:0})})(Bo||(Bo={})),d.extendClassProps(Bo.prototype,Bo.createDefaultProps);const Dl=class Dl extends At{constructor(e){super(e);p(this,"_startEvent",this.dv(new d.Event));p(this,"_clearEvent",this.dv(new d.Event));p(this,"_volume",this.disposeVar(d.react(0)));this.filled=!1,this.stroked=!0,this.strokeStyle.width=2}get typeName(){return"ESVolumeMeasurement"}get defaultProps(){return Dl.createDefaultProps()}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get volume(){return this._volume.value}set volume(e){this._volume.value=e}get volumeChanged(){return this._volume.changed}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new C("基准面高程","基准面高程",!0,!1,[this,"planeHeight"]),new C("采样间距 m","采样间距 m",!1,!1,[this,"gridWidth"]),new C("挖方","挖方 m³",!1,!0,[this,"cutVolume"]),new C("填方","填方 m³",!1,!0,[this,"fillVolume"]),new C("挖填方","挖填方 m³",!1,!0,[this,"cutAndFillVolume"]),new C("计算进度","计算进度",!1,!0,[this,"progress"]),new mt("开始分析","开始分析",[],()=>this.start(),[]),new mt("清空分析结果","清空分析结果",[],()=>this.clear(),[]),new U("是否开启深度检测","A boolean Property specifying the visibility.",!1,!1,[this,"depthTest"])])]}};p(Dl,"type",Dl.register("ESVolumeMeasurement",Dl,{chsName:"体积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"体积测量"})),p(Dl,"defaults",{...At.defaults});let Zo=Dl;(r=>{r.createDefaultProps=()=>({...At.createDefaultProps(),planeHeight:d.react(void 0),gridWidth:1,cutVolume:0,fillVolume:0,cutAndFillVolume:0,progress:0,depthTest:!1})})(Zo||(Zo={})),d.extendClassProps(Zo.prototype,Zo.createDefaultProps);const Au=class Au extends rs{constructor(e){super(e);p(this,"_human",this.dv(new rs));p(this,"_poi",this.dv(new ns));p(this,"combinationClass",!0);this.mainClass=this._human,this._human.parentID=this.id,this._poi.parentID=this.id,this.d(this.components.disposableAdd(this._human)),this.d(this.components.disposableAdd(this._poi));{const{_human:n,_poi:i}=this;this.d(d.track([n,"show"],[this,"show"])),this.d(d.track([i,"show"],[this,"show"])),this.d(d.track([n,"allowPicking"],[this,"allowPicking"])),this.d(d.track([i,"allowPicking"],[this,"allowPicking"])),this.d(d.bind([n,"scale"],[this,"scale"])),this.d(d.bind([i,"scale"],[this,"scale"])),this.d(d.track([n,"collision"],[this,"collision"])),this.d(d.track([i,"collision"],[this,"collision"])),this.d(d.bind([n,"flyInParam"],[this,"flyInParam"])),this.d(d.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(d.track([n,"animation"],[this,"animation"])),this.d(d.track([n,"mode"],[this,"mode"])),this.d(d.track([n,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(d.track([n,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(d.track([i,"name"],[this,"name"])),this.d(d.track([i,"mode"],[this,"poiMode"])),this.d(d.track([i,"autoAnchor"],[this,"autoAnchor"])),this.d(d.track([i,"screenRender"],[this,"screenRender"])),this.d(d.track([i,"size"],[this,"size"])),this.d(d.track([i,"anchor"],[this,"anchor"])),this.d(d.track([i,"sizeByContent"],[this,"sizeByContent"])),this.d(d.track([i,"renderMode"],[this,"renderMode"])),this.d(d.track([i,"rotationType"],[this,"rotationType"])),this.d(d.track([i,"zOrder"],[this,"zOrder"])),this.d(d.track([i,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(d.track([i,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(d.bind([n,"position"],[this,"position"])),this.d(d.bind([n,"rotation"],[this,"rotation"])),this.d(this.flyInEvent.don(s=>{n.flyIn(s)})),this.d(this.flyToEvent.don(s=>{n.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{n.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{n.calcFlyInParam()})),this.d(this.smoothMoveEvent.don((s,a)=>{n.smoothMove(s,a)})),this.d(this.smoothMoveWithRotationEvent.don((s,a,o)=>{n.smoothMoveWithRotation(s,a,o)})),this.d(this.smoothMoveOnGroundEvent.don((s,a,o,l)=>{n.smoothMoveOnGround(s,a,o,l)})),this.d(this.smoothMoveWithRotationOnGroundEvent.don((s,a,o,l,u)=>{n.smoothMoveWithRotationOnGround(s,a,o,l,u)})),this.d(this.automaticLandingEvent.don(()=>{n.automaticLanding()}))}}get typeName(){return"ESHumanPoi"}get defaultProps(){return Au.createDefaultProps()}get human(){return this._human}get poi(){return this._poi}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new tt("poi模式","poiMode",!1,!1,[this,"poiMode"],ns.defaults.modes,"SquareH01"),new C("poi高度偏移","poi高度偏移",!1,!1,[this,"poiOffsetHeight"],1.8)]}}getProperties(e){return[...super.getProperties(e),new tt("poi模式","poiMode",!1,!1,[this,"poiMode"],ns.defaults.modes),new C("poi高度偏移","poi高度偏移",!1,!1,[this,"poiOffsetHeight"],1.8)]}};p(Au,"type",Au.register("ESHumanPoi",Au,{chsName:"人员poi",tags:["ESObjects"],description:"ESHuman + ESPoi2D组合对象"}));let $o=Au;(r=>{r.createDefaultProps=()=>({poiOffsetHeight:1.8,poiMode:"SquareH01",style:d.reactJson({}),autoAnchor:!0,screenRender:!0,size:d.reactArray([100,100]),anchor:d.reactArray([.5,1]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,...rs.createDefaultProps()})})($o||($o={})),d.extendClassProps($o.prototype,$o.createDefaultProps);const Sr=class Sr extends At{get typeName(){return"ESPit"}get defaultProps(){return Sr.createDefaultProps()}constructor(t){super(t),this.collision=!1,this.allowPicking=!1,this.filled=!0}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new C("深度","坑深度(米)",!1,!1,[this,"depth"],Sr.defaults.depth),new C("插值","插值距离(米)",!1,!1,[this,"interpolation"],Sr.defaults.interpolation),new C("透明度","透明度",!1,!1,[this,"opacity"],Sr.defaults.opacity),new Y("侧面图片","侧面图片",!1,!1,[this,"sideImage"],Sr.defaults.sideImage),new Y("底面图片","底面图片",!1,!1,[this,"bottomImage"],Sr.defaults.bottomImage)],style:[new H("点样式","点样式集合",[]),new U("开启","开启点样式",!1,!1,[this,"pointed"],!1),new C("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new tt("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new it("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new H("线样式","线样式集合",[]),new U("开启","开启线样式",!1,!1,[this,"stroked"],!0),new C("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new tt("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new it("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new U("是否贴地","是否贴地(线)",!1,!1,[this,"strokeGround"],!1),new H("面样式","面样式集合",[]),new U("开启","开启填充样式",!1,!1,[this,"filled"],!0),new it("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1]),new U("是否贴地","是否贴地",!1,!1,[this,"fillGround"],!1)]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new C("深度","坑深度(米)",!1,!1,[this,"depth"],Sr.defaults.depth),new C("插值","插值距离(米)",!1,!1,[this,"interpolation"],Sr.defaults.interpolation),new Y("侧面图片","侧面图片",!1,!1,[this,"sideImage"],Sr.defaults.sideImage),new Y("底面图片","底面图片",!1,!1,[this,"bottomImage"],Sr.defaults.bottomImage),new C("opacity","透明度",!1,!1,[this,"opacity"],Sr.defaults.opacity)])]}};p(Sr,"type",Sr.register("ESPit",Sr,{chsName:"坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"坑"})),p(Sr,"defaults",{...At.defaults,depth:100,sideImage:{url:ft.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/side.jpg"),uDis:50,vDis:50},bottomImage:{url:ft.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/bottom.jpg"),uDis:50,vDis:50},opacity:1,interpolation:50});let ss=Sr;(r=>{r.createDefaultProps=()=>({...At.createDefaultProps(),depth:100,sideImage:d.reactJson(r.defaults.sideImage),bottomImage:d.reactJson(r.defaults.bottomImage),opacity:1,interpolation:50})})(ss||(ss={})),d.extendClassProps(ss.prototype,ss.createDefaultProps);const Lu=class Lu extends ss{constructor(e){super(e);p(this,"_excavate",this.dv(new xs));p(this,"_pit",this.dv(new ss));p(this,"combinationClass",!0);this.mainClass=this._pit,this.excavate.parentID=this.id,this._pit.parentID=this.id,this.d(this.components.disposableAdd(this._excavate)),this.d(this.components.disposableAdd(this._pit));{const{_excavate:n,_pit:i}=this;this.d(d.track([n,"show"],[this,"show"])),this.d(d.track([i,"show"],[this,"show"])),this.d(d.track([n,"allowPicking"],[this,"allowPicking"])),this.d(d.track([i,"allowPicking"],[this,"allowPicking"])),this.d(d.track([n,"collision"],[this,"collision"])),this.d(d.track([i,"collision"],[this,"collision"])),this.d(d.bind([i,"points"],[this,"points"])),this.d(d.track([n,"points"],[this,"points"])),this.d(d.track([i,"pointed"],[this,"pointed"])),this.d(d.track([n,"pointed"],[this,"pointed"])),this.d(d.track([i,"pointStyle"],[this,"pointStyle"])),this.d(d.track([n,"pointStyle"],[this,"pointStyle"])),this.d(d.track([i,"stroked"],[this,"stroked"])),this.d(d.track([n,"stroked"],[this,"stroked"])),this.d(d.track([i,"strokeStyle"],[this,"strokeStyle"])),this.d(d.track([n,"strokeStyle"],[this,"strokeStyle"])),this.d(d.track([i,"filled"],[this,"filled"])),this.d(d.track([i,"fillStyle"],[this,"fillStyle"])),this.d(d.track([n,"fillStyle"],[this,"fillStyle"])),this.d(d.track([n,"mode"],[this,"mode"])),this.d(d.track([n,"targetID"],[this,"targetID"])),this.d(d.track([i,"depth"],[this,"depth"])),this.d(d.track([i,"sideImage"],[this,"sideImage"])),this.d(d.track([i,"bottomImage"],[this,"bottomImage"])),this.d(d.track([i,"opacity"],[this,"opacity"])),this.d(d.track([i,"interpolation"],[this,"interpolation"])),this.d(d.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(d.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(this.flyInEvent.don(s=>{i.flyIn(s)})),this.d(this.flyToEvent.don(s=>{i.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get typeName(){return"ESHole"}get defaultProps(){return Lu.createDefaultProps()}get excavate(){return this._excavate}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new tt("模式","mode",!1,!1,[this,"mode"],xs.defaults.modes,"in"),new nt("瓦片图层","targetID",!1,!1,[this,"targetID"],"")]}}};p(Lu,"type",Lu.register("ESHole",Lu,{chsName:"挖坑(带材质+深度)",tags:["ESObjects"],description:"挖坑"}));let jo=Lu;(r=>{r.createDefaultProps=()=>({mode:"in",targetID:"",...ss.createDefaultProps()})})(jo||(jo={})),d.extendClassProps(jo.prototype,jo.createDefaultProps);const Vd={layerconfigfind:"/ts/layer/config/get",layerconfigsave:"/ts/layer/config/put",featureproperty:"/ts/editor/property",featureeditormuti:"/ts/editor/update",getts:"/ts/info"},rI=async(r,t)=>{try{const e=window.localStorage.getItem("Authorization"),n={headers:{...e?{Authorization:e}:{}},mode:"cors"},s=await(await fetch(r+`${Vd.layerconfigfind}?tileServiceName=${t}`,n)).text();return JSON.parse(s)}catch(e){console.error(e)}},nI=async(r,t,e)=>{try{const n=window.localStorage.getItem("Authorization"),i=e??{},s={method:"POST",headers:{"Content-Type":"application/json",...n?{Authorization:n}:{}},mode:"cors",body:JSON.stringify({tileServiceName:t,layerConfig:JSON.stringify(i)})},o=await(await fetch(r+Vd.layerconfigsave,s)).text();return JSON.parse(o)}catch(n){console.error(n)}},iI=async r=>{try{const t=window.localStorage.getItem("Authorization"),e={headers:{...t?{Authorization:t}:{}},mode:"cors"},i=await(await fetch(r,e)).text(),s=JSON.parse(i);if(s.status=="ok")return s.data.port;console.error(s.status);return}catch(t){console.error(t)}},sI=async(r,t,e)=>{try{const n={tileServiceName:t,featureId:e},i=window.localStorage.getItem("Authorization"),a=await(await fetch(r+Vd.featureproperty,{method:"post",headers:{"Content-Type":"application/json",...i?{Authorization:i}:{}},body:JSON.stringify(n),mode:"cors"})).text(),o=JSON.parse(a);if(o.status=="ok")return o.data;console.error(o.data.status);return}catch(n){console.error(n)}},xl=class xl extends Je{constructor(e){super(e);p(this,"_es3DTileset",this.dv(new Je));p(this,"_ids",this.dv(d.reactJson([])));p(this,"combinationClass",!0);p(this,"_highlightInner3DtilesetEvent",this.dv(new d.Event));p(this,"_removeHighlightInner3DtilesetEvent",this.dv(new d.Event));p(this,"_tilesetServePort",this.dv(d.react("")));this.es3DTileset.parentID=this.id,this.mainClass=this._es3DTileset;{const n=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ts01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{n()}))}{this.d(this.components.disposableAdd(this._es3DTileset));const n=this._es3DTileset;this.d(d.track([n,"allowPicking"],[this,"allowPicking"])),this.d(d.track([n,"collision"],[this,"collision"])),this.d(d.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(d.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(d.track([n,"actorTag"],[this,"actorTag"])),this.d(d.track([n,"materialMode"],[this,"materialMode"])),this.d(d.track([n,"highlight"],[this,"highlight"])),this.d(d.track([n,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(d.track([n,"highlightID"],[this,"highlightID"])),this.d(d.track([n,"highlightColor"],[this,"highlightColor"])),this.d(d.bind([n,"offset"],[this,"offset"])),this.d(d.bind([n,"rotation"],[this,"rotation"])),this.d(d.track([n,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(d.track([n,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(d.track([n,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(d.track([n,"czmClassificationType"],[this,"czmClassificationType"])),this.d(d.track([n,"czmStyleJson"],[this,"czmStyleJson"])),this.d(d.track([n,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(d.track([n,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(d.track([n,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(d.track([n,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(d.track([n,"colorBlendMode"],[this,"colorBlendMode"])),this.d(d.track([n,"cacheBytes"],[this,"cacheBytes"])),this.d(d.track([n,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(d.track([n,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(d.track([n,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(d.track([n,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(d.track([n,"materialParams"],[this,"materialParams"])),this.d(d.bind([n,"supportEdit"],[this,"supportEdit"])),this.d(d.bind([n,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(d.bind([n,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(d.bind([n,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(d.bind([n,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(d.bind([n,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(d.bind([n,"excavateId"],[this,"excavateId"]))}{const n=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{n.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{n.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{n.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{n.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{n.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{n.resetFeatureStyle(...i)})),this.d(this.setFeatureStyleEvent.don((...i)=>{n.setFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{n.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{n.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{n.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{n.calcFlyInParam(...i)}))}{const n=this._es3DTileset;this.d(n.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(n.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const n=()=>{this.es3DTileset.show=this.show};n(),this.d(this.showChanged.don(()=>{n()}))}}get typeName(){return"ESRtsTileset"}get defaultProps(){return xl.createDefaultProps()}get json(){return this._innerGetJson()}set json(e){this._innerSetJson(e)}get es3DTileset(){return this._es3DTileset}get ids(){return this._ids.value}get idsChanged(){return this._ids.changed}set ids(e){this._ids.value=e}async getFeatureProperty(e){return await sI(this.baseUrl,this.tileServiceName,e)}async getLayerConfig(){const e=await rI(this.baseUrl,this.tileServiceName);return!e||!Array.isArray(e)?this.layerConfig=[]:this.layerConfig=e,this.layerConfig}async saveLayerConfig(){const e=this.layerConfig;return await nI(this.baseUrl,this.tileServiceName,e)}get highlightInner3DtilesetEvent(){return this._highlightInner3DtilesetEvent}_highlightInner3Dtileset(e){this._highlightInner3DtilesetEvent.emit(e)}async highlightDSFeature(e){this._highlightInner3Dtileset(e)}get removeHighlightInner3DtilesetEvent(){return this._removeHighlightInner3DtilesetEvent}_removeHighlightInner3Dtileset(e){this._removeHighlightInner3DtilesetEvent.emit(e)}async removeHighlightDSFeature(e){this._removeHighlightInner3Dtileset(e)}async pickFeature(e,n){var o,l,u;const i=await e.pick(n),s=i.sceneObject;return!s||s.id!==this.id&&s.typeName!="ESRtsFeatureEditing"?void 0:s.typeName!="ESRtsFeatureEditing"?(this.ids=[...this.ids,(o=i==null?void 0:i.tilesetPickInfo)==null?void 0:o.id],{featureId:(l=i==null?void 0:i.tilesetPickInfo)==null?void 0:l.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}):{featureId:(u=i==null?void 0:i.sceneObject)==null?void 0:u.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}async getport(){const e=await iI(this.url);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const e=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],n=+new Date;if(e){const s=this.tileServiceIp,a=await this.getport();await this.getLayerConfig(),this._es3DTileset.url=`${s}:${a}/tiles/tileset.json?t=${n}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const n=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!n)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01");return n}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01")}get tileServiceName(){var e;if(this.url&&typeof this.url=="string"){const n=(e=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:e[1];if(!n)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return n}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const n=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!n)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01");return n}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01")}getProperties(e){return[...super.getProperties(e),new H("ESRtsTileset","ESRtsTileset",[new Y("图层配置","图层配置(layerConfig)",!0,!1,[this,"layerConfig"],[])])]}};p(xl,"type",xl.register("ESRtsTileset",xl,{chsName:"CIMRTS实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"})),p(xl,"defaults",{...Je.defaults,layerConfig:[]});let tl=xl;(r=>{r.createDefaultProps=()=>({layerConfig:d.reactJsonWithUndefined(void 0),...Je.createDefaultProps()})})(tl||(tl={})),d.extendClassProps(tl.prototype,tl.createDefaultProps);function aI(r){return typeof r=="number"&&!isNaN(r)}const Ol=class Ol extends Je{constructor(e){super(e);p(this,"combinationClass",!0)}get typeName(){return"ESRtsFeatureEditing"}get defaultProps(){return Ol.createDefaultProps()}get json(){return{...this._innerGetJson(),show:this.show,materials:this.materials,changeMaterial:this.changeMaterial,props:this.props,rotation:this.rotation}}set json(e){this._innerSetJson(e)}async init(e,n){this.featureId=n;const i=await e.getFeatureProperty(n);this.uiShowprops=i.allFields.map(o=>({featureClassName:o.featureClassName,fields:o.fields.map(l=>({key:l.name,type:l.type,value:l.type!="Double"?l.value:aI(l.value)?Number(l.value.toFixed(3)):""}))})),this.datasetName=i.datasetName,e.setFeatureVisable("id",[{value:this.featureId,visable:!1}]),this.d(()=>{e.setFeatureVisable("id",[{value:this.featureId,visable:!0}])});const s=e.tileServiceIp,a=e.tilesetServePort;if(!a)throw new Error("ESRtsFeatureEditing: port is not defined");this.url=`${s}:${a}/featuretiles/${this.featureId}/tileset.json`,this.allowPicking=!0,this.d(this.pickedEvent.don(o=>{o.assign({sceneObject:e}),e.pickedEvent.emit(o)})),this.d(()=>{this.editing=!1,e.removeHighlightDSFeature(this)})}getProperties(e){return[...super.getProperties(e)]}};p(Ol,"type",Ol.register("ESRtsFeatureEditing",Ol,{chsName:"ESRtsFeatureEditing",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"})),p(Ol,"defaults",{...Je.defaults,layerConfig:{}});let el=Ol;(r=>{r.createDefaultProps=()=>({...Je.createDefaultProps(),datasetName:void 0,featureId:void 0,materials:d.reactJson({}),changeMaterial:d.reactJsonWithUndefined(void 0),uiShowprops:d.reactJson({}),props:d.reactJson({})})})(el||(el={})),d.extendClassProps(el.prototype,el.createDefaultProps);const oI=async r=>{try{const t=window.localStorage.getItem("Authorization"),e={headers:{...t?{Authorization:t}:{}},mode:"cors"},i=await(await fetch(r,e)).text(),s=JSON.parse(i);if(s.status=="ok")return s.data.port;console.error(s.status);return}catch(t){console.error(t)}},Al=class Al extends Je{constructor(e){super(e);p(this,"_es3DTileset",this.dv(new Je));p(this,"combinationClass",!0);p(this,"_tilesetServePort",this.dv(d.react("")));this.es3DTileset.parentID=this.id,this.mainClass=this._es3DTileset;{const n=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ms01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{n()}))}{this.d(this.components.disposableAdd(this._es3DTileset));const n=this._es3DTileset;this.d(d.track([n,"allowPicking"],[this,"allowPicking"])),this.d(d.track([n,"collision"],[this,"collision"])),this.d(d.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(d.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(d.track([n,"actorTag"],[this,"actorTag"])),this.d(d.track([n,"materialMode"],[this,"materialMode"])),this.d(d.track([n,"highlight"],[this,"highlight"])),this.d(d.track([n,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(d.track([n,"highlightID"],[this,"highlightID"])),this.d(d.track([n,"highlightColor"],[this,"highlightColor"])),this.d(d.bind([n,"offset"],[this,"offset"])),this.d(d.bind([n,"rotation"],[this,"rotation"])),this.d(d.track([n,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(d.track([n,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(d.track([n,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(d.track([n,"czmClassificationType"],[this,"czmClassificationType"])),this.d(d.track([n,"czmStyleJson"],[this,"czmStyleJson"])),this.d(d.track([n,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(d.track([n,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(d.track([n,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(d.track([n,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(d.track([n,"colorBlendMode"],[this,"colorBlendMode"])),this.d(d.track([n,"cacheBytes"],[this,"cacheBytes"])),this.d(d.track([n,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(d.track([n,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(d.track([n,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(d.track([n,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(d.track([n,"materialParams"],[this,"materialParams"])),this.d(d.bind([n,"supportEdit"],[this,"supportEdit"])),this.d(d.bind([n,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(d.bind([n,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(d.bind([n,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(d.bind([n,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(d.bind([n,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(d.bind([n,"excavateId"],[this,"excavateId"]))}{const n=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{n.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{n.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{n.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{n.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{n.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{n.resetFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{n.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{n.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{n.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{n.calcFlyInParam(...i)}))}{const n=this._es3DTileset;this.d(n.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(n.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const n=()=>{this.es3DTileset.show=this.show};n(),this.d(this.showChanged.don(()=>{n()}))}}get typeName(){return"ESMsTileset"}get defaultProps(){return Al.createDefaultProps()}get json(){return this._innerGetJson()}set json(e){this._innerSetJson(e)}get es3DTileset(){return this._es3DTileset}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}async getport(){const e=await oI(this.url);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const e=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],n=+new Date;if(e){const s=this.tileServiceIp,a=await this.getport();this._es3DTileset.url=`${s}:${a}/tiles/tileset.json?t=${n}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const n=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!n)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01");return n}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const n=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!n)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01");return n}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceName(){var e;if(this.url&&typeof this.url=="string"){const n=(e=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:e[1];if(!n)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return n}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}getProperties(e){return[...super.getProperties(e)]}};p(Al,"type",Al.register("ESMsTileset",Al,{chsName:"Modelser实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"})),p(Al,"defaults",{...Je.defaults,layerConfig:{}});let rl=Al;(r=>{r.createDefaultProps=()=>({...Je.createDefaultProps()})})(rl||(rl={})),d.extendClassProps(rl.prototype,rl.createDefaultProps);const W0={defaultValue:[{type:"2",widget:"WidgetBlueprint'/ESFoliage/PoiSheng.PoiSheng'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"3",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"4",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"5",widget:"WidgetBlueprint'/ESFoliage/PoiXiang.PoiXiang'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"6",widget:"WidgetBlueprint'/ESFoliage/PoiCun.PoiCun'",povit:[.5,1],worldScale:.1,hiddenDistance:40}],sampleValue:`
|
|
400
|
+
`;function q0(r){try{return JSON.parse(r),!0}catch{return!1}}const eI="${earthsdk3-assets-script-dir}/assets/misc/2.geojson",at=class at extends Ot{constructor(e){super(e);p(this,"_flyToFeatureEvent",this.dv(new d.Event));p(this,"_flyToFeatureIndexEvent",this.dv(new d.Event));p(this,"_features",this.disposeVar(d.reactJsonWithUndefined(void 0)));p(this,"pickedInfoType","FeatureCollection");this.ad(this.urlChanged.don(async()=>{var n;if(!this.url){this.features=void 0;return}do{if(typeof this.url=="object"){this.features=this.url;break}if(q0(this.url)){this.features=JSON.parse(this.url);break}await fetch(ft.context.getStrFromEnv(this.url)).then(i=>i.json()).then(i=>{this.features=i}).catch(i=>{console.warn("ESEntityCluster数据加载失败",i)})}while(!1);this.pickedInfoType=((n=this.features)==null?void 0:n.type)??"FeatureCollection"})),this.ad(this.editingChanged.don(()=>{console.warn("ESGeoJson暂不支持编辑!")}))}get typeName(){return"ESGeoJson"}get defaultProps(){return at.createDefaultProps()}get flyToFeatureEvent(){return this._flyToFeatureEvent}flyToFeature(e,n,i){this._flyToFeatureEvent.emit(e,n,i)}get flyToFeatureIndexEvent(){return this._flyToFeatureIndexEvent}flyToFeatureIndex(e,n){this._flyToFeatureIndexEvent.emit(e,n)}get features(){return this._features.value}set features(e){this._features.value=e}get featuresChanged(){return this._features.changed}getFeatures(){if(this.features)return this.features;console.log("数据未加载完成,请稍后调用此方法getFeatures()")}getESProperties(){return{defaultMenu:"style",basic:[],general:[new nt("名称","name",!0,!1,[this,"name"]),new nt("唯一标识","id",!1,!0,[this,"id"]),new U("是否显示","show",!1,!1,[this,"show"],!0),new U("开启碰撞","collision",!1,!1,[this,"collision"],!1),new U("允许拾取","allowPicking",!1,!1,[this,"allowPicking"],!1),new mt("保存观察视角","保存当前视角",[],()=>this.calcFlyInParam(),[])],dataSource:[new Y("服务地址","服务地址",!0,!1,[this,"url"],at.defaults.url),new C("要素最小可视距离","要素最小可视距离",!1,!1,[this,"minFeatureVisibleDistance"],at.defaults.minFeatureVisibleDistance),new C("要素最大可视距离","要素最大可视距离",!1,!1,[this,"maxFeatureVisibleDistance"],at.defaults.maxFeatureVisibleDistance),new tt("高度参考","高度参考",!1,!1,[this,"heightReference"],at.defaults.heightReferences)],location:[],coordinate:[],style:[new H("点文字样式","点样式集合",[]),new U("是否显示","是否显示",!1,!1,[this,"textShow"],at.defaults.textShow),new se("锚点","锚点",!1,!1,[this,"textAnchor"],at.defaults.textAnchor),new nt("标注显示属性","要用于显示的文本属性",!1,!1,[this,"textProperty"],at.defaults.textProperty),new nt("默认文本","默认统一显示的文本",!1,!1,[this,"textDefaultText"],at.defaults.textDefaultText),new it("文本颜色","文本颜色",!1,!1,[this,"textColor"],at.defaults.textColor),new it("背景颜色","背景颜色",!0,!1,[this,"textBackgroundColor"],at.defaults.textBackgroundColor),new nt("字体样式","字体样式",!1,!1,[this,"textFontStyle"],at.defaults.textFontStyle),new nt("字体粗细","字体粗细",!1,!1,[this,"textFontWeight"],at.defaults.textFontWeight),new C("字体大小","字体大小",!1,!1,[this,"textFontSize"],at.defaults.textFontSize),new se("像素偏移","像素偏移",!1,!1,[this,"textOffset"],at.defaults.textOffset),new H("点图片样式","图片样式集合",[]),new U("是否显示","是否显示",!1,!1,[this,"imageShow"],at.defaults.imageShow),new se("锚点","锚点",!1,!1,[this,"imageAnchor"],at.defaults.imageAnchor),new Y("图片地址","图片地址",!1,!1,[this,"imageUrl"],at.defaults.imageUrl),new se("图片大小","图片大小",!1,!1,[this,"imageSize"],at.defaults.imageSize),new se("像素偏移","像素偏移",!1,!1,[this,"imageOffset"],at.defaults.imageOffset),new H("线样式","线样式集合",[]),new U("是否显示","是否显示",!1,!1,[this,"stroked"],at.defaults.stroked),new U("贴地","贴地(线)",!1,!1,[this,"strokeGround"],at.defaults.strokeGround),new C("线宽","线宽",!1,!1,[this,"strokeWidth"],at.defaults.strokeWidth),new tt("线宽类型","线宽类型",!1,!1,[this,"strokeWidthType"],at.defaults.strokeWidthTypes),new it("线颜色","线颜色",!1,!1,[this,"strokeColor"],at.defaults.strokeColor),new nt("线材质","线材质",!1,!1,[this,"strokeMaterial"],at.defaults.strokeMaterial),new Y("线材质参数","线材质参数",!1,!1,[this,"strokeMaterialParams"],at.defaults.strokeMaterialParams),new H("面样式","面样式集合",[]),new U("是否显示","是否显示",!1,!1,[this,"filled"],at.defaults.filled),new U("贴地","贴地(面)",!1,!1,[this,"fillGround"],at.defaults.fillGround),new it("填充颜色","填充颜色",!1,!1,[this,"fillColor"],at.defaults.fillColor),new nt("填充材质","填充材质",!1,!1,[this,"fillMaterial"],at.defaults.fillMaterial),new Y("填充材质参数","填充材质参数",!1,!1,[this,"fillMaterialParams"],at.defaults.fillMaterialParams)]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new U("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"],at.defaults.show),new U("允许拾取","是否允许拾取",!1,!1,[this,"allowPicking"],at.defaults.allowPicking),new mt("飞入","飞入",["number"],n=>this.flyTo(n),[1]),new mt("清空飞入参数","清空飞入参数",[],()=>this.emptyFlyInParam(),[]),new mt("保存飞入参数","保存飞入参数flyInParam",[],()=>this.calcFlyInParam(),[]),new Y("flyInParam","flyInParam",!0,!1,[this,"flyInParam"],at.defaults.flyInParam)]),new H("标注文本样式","标注文本样式",[new U("是否显示","是否显示",!1,!1,[this,"textShow"],at.defaults.textShow),new nt("标注显示属性","要用于显示的文本属性",!1,!1,[this,"textProperty"],at.defaults.textProperty),new nt("默认文本","默认统一显示的文本",!1,!1,[this,"textDefaultText"],at.defaults.textDefaultText),new it("文本颜色","文本颜色",!1,!1,[this,"textColor"],at.defaults.textColor),new it("背景颜色","背景颜色",!0,!1,[this,"textBackgroundColor"],at.defaults.textBackgroundColor),new nt("字体","字体",!1,!1,[this,"textFontFamily"],at.defaults.textFontFamily),new nt("字体样式","字体样式",!1,!1,[this,"textFontStyle"],at.defaults.textFontStyle),new nt("字体粗细","字体粗细",!1,!1,[this,"textFontWeight"],at.defaults.textFontWeight),new C("字体大小","字体大小",!1,!1,[this,"textFontSize"],at.defaults.textFontSize),new se("锚点","锚点",!1,!1,[this,"textAnchor"],at.defaults.textAnchor),new se("像素偏移","像素偏移",!1,!1,[this,"textOffset"],at.defaults.textOffset)]),new H("标注图标样式","标注图标样式",[new U("是否显示","是否显示",!1,!1,[this,"imageShow"],at.defaults.imageShow),new Y("图片地址","图片地址",!1,!1,[this,"imageUrl"],at.defaults.imageUrl),new se("图片大小","图片大小",!1,!1,[this,"imageSize"],at.defaults.imageSize),new se("锚点","锚点",!1,!1,[this,"imageAnchor"],at.defaults.imageAnchor),new se("像素偏移","像素偏移",!1,!1,[this,"imageOffset"],at.defaults.imageOffset)]),new H("线样式","线样式",[new U("是否显示","是否显示",!1,!1,[this,"stroked"],at.defaults.stroked),new C("线宽","线宽",!1,!1,[this,"strokeWidth"],at.defaults.strokeWidth),new tt("线宽类型","线宽类型",!1,!1,[this,"strokeWidthType"],at.defaults.strokeWidthTypes),new it("线颜色","线颜色",!1,!1,[this,"strokeColor"],at.defaults.strokeColor),new nt("线材质","线材质",!1,!1,[this,"strokeMaterial"],at.defaults.strokeMaterial),new Y("线材质参数","线材质参数",!1,!1,[this,"strokeMaterialParams"],at.defaults.strokeMaterialParams),new U("贴地(线)","贴地(线)",!1,!1,[this,"strokeGround"],at.defaults.strokeGround)]),new H("填充样式","填充样式",[new U("是否显示","是否显示",!1,!1,[this,"filled"],at.defaults.filled),new it("填充颜色","填充颜色",!1,!1,[this,"fillColor"],at.defaults.fillColor),new nt("填充材质","填充材质",!1,!1,[this,"fillMaterial"],at.defaults.fillMaterial),new Y("填充材质参数","填充材质参数",!1,!1,[this,"fillMaterialParams"],at.defaults.fillMaterialParams),new U("贴地(面)","贴地(面)",!1,!1,[this,"fillGround"],at.defaults.fillGround)]),new H("通用","通用",[new Y("服务地址","服务地址",!0,!1,[this,"url"],at.defaults.url),new Fi("loadFnStr","loadFnStr",!0,!1,[this,"loadFuncStr"],at.defaults.defaultLoadFuncStr,at.defaults.defaultLoadFuncDocStr),new C("要素最小可视距离","要素最小可视距离",!1,!1,[this,"minFeatureVisibleDistance"],at.defaults.minFeatureVisibleDistance),new C("要素最大可视距离","要素最大可视距离",!1,!1,[this,"maxFeatureVisibleDistance"],at.defaults.maxFeatureVisibleDistance),new tt("高度参考","高度参考",!1,!1,[this,"heightReference"],at.defaults.heightReferences)])]}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}get textProperty(){return this.textStyle.textProperty}set textProperty(e){this.textStyle={...this.textStyle,textProperty:e}}get textPropertyChanged(){return this.textStyleChanged}get textDefaultText(){return this.textStyle.defaultText}set textDefaultText(e){this.textStyle={...this.textStyle,defaultText:e}}get textDefaultTextChanged(){return this.textStyleChanged}get textColor(){return this.textStyle.color}set textColor(e){this.textStyle={...this.textStyle,color:e}}get textColorChanged(){return this.textStyleChanged}get textBackgroundColor(){return this.textStyle.backgroundColor}set textBackgroundColor(e){this.textStyle={...this.textStyle,backgroundColor:e}}get textBackgroundColorChanged(){return this.textStyleChanged}get textFontFamily(){return this.textStyle.fontFamily}set textFontFamily(e){this.textStyle={...this.textStyle,fontFamily:e}}get textFontFamilyChanged(){return this.textStyleChanged}get textFontStyle(){return this.textStyle.fontStyle}set textFontStyle(e){this.textStyle={...this.textStyle,fontStyle:e}}get textFontStyleChanged(){return this.textStyleChanged}get textFontWeight(){return this.textStyle.fontWeight}set textFontWeight(e){this.textStyle={...this.textStyle,fontWeight:e}}get textFontWeightChanged(){return this.textStyleChanged}get textFontSize(){return this.textStyle.fontSize}set textFontSize(e){this.textStyle={...this.textStyle,fontSize:e}}get textFontSizeChanged(){return this.textStyleChanged}get textAnchor(){return this.textStyle.anchor}set textAnchor(e){this.textStyle={...this.textStyle,anchor:e}}get textAnchorChanged(){return this.textStyleChanged}get textOffset(){return this.textStyle.offset}set textOffset(e){this.textStyle={...this.textStyle,offset:e}}get textOffsetChanged(){return this.textStyleChanged}get imageUrl(){return this.imageStyle.url}set imageUrl(e){this.imageStyle={...this.imageStyle,url:e}}get imageUrlChanged(){return this.imageStyleChanged}get imageSize(){return this.imageStyle.size}set imageSize(e){this.imageStyle={...this.imageStyle,size:e}}get imageSizeChanged(){return this.imageStyleChanged}get imageAnchor(){return this.imageStyle.anchor}set imageAnchor(e){this.imageStyle={...this.imageStyle,anchor:e}}get imageAnchorChanged(){return this.imageStyleChanged}get imageOffset(){return this.imageStyle.offset}set imageOffset(e){this.imageStyle={...this.imageStyle,offset:e}}get imageOffsetChanged(){return this.imageStyleChanged}};p(at,"type",at.register("ESGeoJson",at,{chsName:"ESGeoJson",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"GeoJson数据加载"})),p(at,"defaults",{...Ot.defaults,show:!0,allowPicking:!0,url:eI,defaultLoadFuncStr:U0,defaultLoadFuncDocStr:tI,data:$C,dataMd:jC,stroked:!0,strokeWidth:1,strokeWidthType:"world",strokeColor:[.79,.91,.06,1],strokeMaterial:"",strokeMaterialParams:{},strokeGround:!1,filled:!0,fillColor:[.79,.91,.06,.2],fillMaterial:"",fillMaterialParams:{},fillGround:!1,imageShow:!0,imageUrl:"${earthsdk3-assets-script-dir}/assets/img/location.png",imageSize:[32,32],imageAnchor:[.5,1],imageOffset:[0,0],textShow:!0,textProperty:"",textDefaultText:"默认标注",textColor:[1,1,1,1],textBackgroundColor:void 0,textFontFamily:"Arial",textFontStyle:"normal",textFontSize:16,textFontWeight:"normal",textAnchor:[0,1],textOffset:[-16,8],strokeWidthTypes:[["screen","screen"],["world","world"]],flyInParam:{position:[0,0,0],rotation:[0,0,0],flyDuration:1},minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReferences:[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]]});let Lo=at;(r=>{r.createDefaultProps=()=>({...Ot.createDefaultProps(),show:!0,allowPicking:!0,loadFuncStr:void 0,url:void 0,stroked:!0,strokeStyle:d.reactJson({width:1,widthType:"world",color:[.79,.91,.06,1],material:"",materialParams:{},ground:!1}),filled:!0,fillStyle:d.reactJson({color:[.79,.91,.06,.2],material:"",materialParams:{},ground:!1}),imageShow:!0,imageStyle:d.reactJson({url:"${earthsdk3-assets-script-dir}/assets/img/location.png",size:[32,32],anchor:[.5,1],offset:[0,0]}),textShow:!0,textStyle:d.reactJson({textProperty:"",defaultText:"默认标注",color:[1,1,1,1],backgroundColor:void 0,fontFamily:"Arial",fontSize:16,fontStyle:"normal",fontWeight:"normal",anchor:[0,1],offset:[16,-8]}),minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,flyInParam:d.reactJsonWithUndefined(void 0),heightReference:"NONE"})})(Lo||(Lo={})),d.extendClassProps(Lo.prototype,Lo.createDefaultProps);const ba=class ba extends Et{constructor(e){super(e);p(this,"editingBindMode","doublePoints");p(this,"_height",this.disposeVar(d.react(0)));{const n=()=>{this.height=this.points&&this.points.length>=2?this.points[1][2]-this.points[0][2]:0};n(),this.ad(this.pointsChanged.don(n))}this.stroked=!0,this.strokeStyle.width=2}get typeName(){return"ESHeightMeasurement"}get defaultProps(){return ba.createDefaultProps()}get height(){return this._height.value}set height(e){this._height.value=e}get heightChanged(){return this._height.changed}getProperties(e){return[...super.getProperties(e)]}};p(ba,"type",ba.register("ESHeightMeasurement",ba,{chsName:"高度测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"高度测量"})),p(ba,"supportEditingModes",[...Et.supportEditingModes,vt.DoublePointsAppend,vt.DoublePointsModify]),p(ba,"defaults",{...Et.defaults});let Ro=ba;(r=>{r.createDefaultProps=()=>({...Et.createDefaultProps()})})(Ro||(Ro={})),d.extendClassProps(Ro.prototype,Ro.createDefaultProps);const Il=class Il extends Yr{constructor(e){super(e);p(this,"_area",this.dv(d.react(0)));p(this,"_perimeter",this.dv(d.react(0)));p(this,"editingBindMode","doublePoints");this.radius=1,this.filled=!0,this.stroked=!1,this.collision=!1,this.strokeColor=[1,1,1,1],this.fillColor=[1,1,1,.5];const n=()=>{this._area.value=Math.PI*this.radius*this.radius,this._perimeter.value=2*Math.PI*this.radius};n(),this.d(this.radiusChanged.don(n))}get typeName(){return"ESLocalCircle"}get defaultProps(){return{...Il.createDefaultProps()}}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}toPolygon(e=10,n){return gm([...this.position],this.radius,e,n)[0].map(s=>[...s,this.position?this.position[2]:0])}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",basic:[...e.basic,new C("圆半径","圆半径",!0,!1,[this,"radius"],1)],general:[...e.general],dataSource:[...e.dataSource],location:[],coordinate:[new U("是否编辑","是否编辑",!1,!1,[this,"editing"]),new C("面积","面积",!1,!0,[this,"area"]),new C("周长","周长",!1,!0,[this,"perimeter"]),new li("三维坐标","三维坐标",!0,!1,[this,"position"],[0,0,0])],style:[...e.style]}}getProperties(e){return[...super.getProperties(e),new H("ESLocalCircle","ESLocalCircle",[new C("圆半径","圆半径",!1,!1,[this,"radius"]),new C("面积","面积",!1,!0,[this,"area"]),new C("周长","周长",!1,!0,[this,"perimeter"])])]}};p(Il,"type",Il.register("ESLocalCircle",Il,{chsName:"局部坐标圆形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalCircle"})),p(Il,"defaults",{...Yr.defaults,fillStyle:{color:[1,1,1,.5],material:"",materialParams:{}}});let Fo=Il;(r=>{r.createDefaultProps=()=>({...Yr.createDefaultProps(),radius:1})})(Fo||(Fo={})),d.extendClassProps(Fo.prototype,Fo.createDefaultProps);const Ml=class Ml extends Yr{get typeName(){return"ESLocalPolygon"}get defaultProps(){return{...Ml.createDefaultProps()}}constructor(t){super(t),this.filled=!0}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new rp("坐标","偏移量[x,y],单位米,不含高度",!1,!1,[this,"points"],[])]}}getProperties(t){return[...super.getProperties(t),new H("ESLocalPolygon","ESLocalPolygon",[new Y("位置偏移数组","偏移量[x,y],单位米,不含高度",!1,!1,[this,"points"])])]}};p(Ml,"type",Ml.register("ESLocalPolygon",Ml,{chsName:"局部2D坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygon"})),p(Ml,"defaults",{...Yr.defaults,points:[],filled:!0});let is=Ml;(r=>{r.createDefaultProps=()=>({...Yr.createDefaultProps(),points:gf(void 0)})})(is||(is={})),d.extendClassProps(is.prototype,is.createDefaultProps);const Ou=class Ou extends Ti{get typeName(){return"ESLocalPolygonZ"}get defaultProps(){return{...Ou.createDefaultProps()}}constructor(t){super(t),this.filled=!0}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new df("本地位置数组","本地位置数组",!0,!1,[this,"points"])])]}};p(Ou,"type",Ou.register("ESLocalPolygonZ",Ou,{chsName:"局部坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygonZ"}));let Go=Ou;(r=>{r.createDefaultProps=()=>({...Ti.createDefaultProps(),points:d.reactPositions(void 0)})})(Go||(Go={})),d.extendClassProps(Go.prototype,Go.createDefaultProps);const Nl=class Nl extends Yr{get typeName(){return"ESLocalRectangle"}get defaultProps(){return{...Nl.createDefaultProps()}}constructor(t){super(t),this.filled=!0}getProperties(t){return[...super.getProperties(t),new H("ESLocalRectangle","ESLocalRectangle",[new C("宽度","宽度",!1,!1,[this,"width"]),new C("高度","高度",!1,!1,[this,"height"])])]}};p(Nl,"type",Nl.register("ESLocalRectangle",Nl,{chsName:"局部坐标四边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalRectangle"})),p(Nl,"defaults",{...Yr.defaults,width:5e5,height:3e5});let ko=Nl;(r=>{r.createDefaultProps=()=>({...Yr.createDefaultProps(),width:5e5,height:3e5})})(ko||(ko={})),d.extendClassProps(ko.prototype,ko.createDefaultProps);const hs=class hs extends Et{constructor(e){super(e);p(this,"editingBindMode","lineString");p(this,"_distance",this.dv(d.react(0)));p(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);p(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());this.fillColor=[1,0,.73,1];const n=()=>{if(this.points&&this.points.length>=2){const i=Oh(this.points,"GEODESIC"),s=i[i.length-1];this._distance.value=s}else this._distance.value=0};n(),this.d(this.pointsChanged.don(n))}get typeName(){return"ESPipeFence"}get defaultProps(){return hs.createDefaultProps()}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new C("高度","height",!1,!1,[this,"height"],10),new C("宽度","width",!1,!1,[this,"width"],10),new tt("模式","materialMode",!1,!1,[this,"materialMode"],hs.defaults.materialModes,"purple")],coordinate:[...e.coordinate,new C("长度","距离",!1,!0,[this,"distance"])]}}getProperties(e){return[...super.getProperties(e),new H("ESPipeFence","ESPipeFence",[new C("高度","height",!1,!1,[this,"height"]),new C("宽度","width",!1,!1,[this,"width"]),new tt("materialMode","materialMode",!1,!1,[this,"materialMode"],hs.defaults.materialModes)])]}};p(hs,"type",hs.register("ESPipeFence",hs,{chsName:"管道电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"管道电子围栏"})),p(hs,"supportEditingModes",[...Et.supportEditingModes,vt.LineStringAppend,vt.LineStringInsert]),p(hs,"defaults",{...Et.defaults,strokeStyle:{width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{}},fillStyle:{color:[1,1,1,1],material:"",materialParams:{}},filled:!0,stroked:!0,materialModes:[["单箭头","singleArrow"],["多箭头","multipleArrows"]]});let zo=hs;(r=>{r.createDefaultProps=()=>({...Et.createDefaultProps(),height:10,width:10,materialMode:"singleArrow",filled:!0})})(zo||(zo={})),d.extendClassProps(zo.prototype,zo.createDefaultProps);const Ta=class Ta extends Je{constructor(e){super(e);p(this,"_setLayerVisibleEvent",this.dv(new d.Event));p(this,"_setLayerColorEvent",this.dv(new d.Event))}get typeName(){return"ESPipeserTileset"}get defaultProps(){return Ta.createDefaultProps()}get setLayerVisibleEvent(){return this._setLayerVisibleEvent}setLayerVisible(e,n){this._setLayerVisibleEvent.emit(e,n)}get setLayerColorEvent(){return this._setLayerColorEvent}setLayerColor(e,n){this._setLayerColorEvent.emit(e,n)}getProperties(e){return[...super.getProperties(e),new H("ESPipeserTileset","ESPipeserTileset",[new mt("setLayerVisible","setLayerVisible",["string","string"],(n,i)=>this.setLayerVisible(n,i),["",""]),new mt("setLayerColor","setLayerColor",["string","string"],(n,i)=>this.setLayerColor(n,i),["",""]),new tt("colorMode","colorMode",!0,!1,[this,"colorMode"],Ta.description.colorMode,"default")])]}};p(Ta,"type",Ta.register("ESPipeserTileset",Ta,{chsName:"PipeSer图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"PipeSer图层"})),p(Ta,"description",{colorMode:[["default","default"],["color","color"],["blend","blend"]]});let Vo=Ta;(r=>{r.createDefaultProps=()=>({colorMode:"default",...Je.createDefaultProps()})})(Vo||(Vo={})),d.extendClassProps(Vo.prototype,Vo.createDefaultProps);const cs=class cs extends Et{constructor(e){super(e);p(this,"editingBindMode","circular");this.filled=!0,this.collision=!1}get typeName(){return"ESPolygonFence"}get defaultProps(){return cs.createDefaultProps()}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",coordinate:[...e.coordinate,new C("面积","面积",!1,!0,[this,"area"]),new C("周长","周长",!1,!0,[this,"perimeter"])],basic:[...e.basic,new C("高度","height",!1,!1,[this,"height"],10),new tt("模式","materialMode",!1,!1,[this,"materialMode"],cs.defaults.materialModes,"danger")]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new C("高度","height",!1,!1,[this,"height"]),new tt("materialMode","materialMode",!1,!1,[this,"materialMode"],cs.defaults.materialModes)]),new H("计算","计算",[new C("面积","面积",!1,!0,[this,"area"]),new C("周长","周长",!1,!0,[this,"perimeter"])])]}};p(cs,"type",cs.register("ESPolygonFence",cs,{chsName:"多边形电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"多边形电子围栏"})),p(cs,"supportEditingModes",[...Et.supportEditingModes,vt.CircularAppend,vt.CircularInsert,vt.HeightModify]),p(cs,"defaults",{...Et.defaults,fillStyle:{color:[1,1,1,1],material:"",materialParams:{}},filled:!0,materialModes:[["模式一","danger"],["模式二","checkerboard"],["模式三","warning"],["模式四","cord"],["模式五","scanline"],["模式六","honeycomb"],["模式七","gradientColor"]]});let Uo=cs;(r=>{r.createDefaultProps=()=>({height:10,materialMode:"danger",...Et.createDefaultProps()})})(Uo||(Uo={})),d.extendClassProps(Uo.prototype,Uo.createDefaultProps);const Vs=class Vs extends Et{constructor(e){super(e);p(this,"_deprecated",["ground"]);p(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());p(this,"editingBindMode","doublePoints")}get typeName(){return"ESRectangle"}get defaultProps(){return Vs.createDefaultProps()}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new U("是否贴地","A boolean Property specifying the visibility.",!1,!1,[this,"ground"]),new U("轮廓线半透明","轮廓线半透明.",!1,!1,[this,"outlineTranslucent"]),new C("高度","高度",!1,!1,[this,"height"]),new C("拉伸高度","拉伸高度",!1,!1,[this,"extrudedHeight"]),new Lr("范围","西南东北",!0,!1,[this,"rectangle"],Vs.defaults.rectangle),new C("纹理旋转角度","纹理旋转角度.",!1,!1,[this,"stRotation"]),new C("旋转角度","rotation",!1,!1,[this,"rotation"]),new U("是否单点编辑","是否单点编辑.",!1,!1,[this,"pointEditing"])])]}};p(Vs,"type",Vs.register("ESRectangle",Vs,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),p(Vs,"supportEditingModes",[...Et.supportEditingModes,vt.DoublePointsAppend,vt.DoublePointsModify]),p(Vs,"defaults",{...Et.defaults,ground:!1,outlineTranslucent:!0,height:0,extrudedHeight:0,rectangle:void 0,stRotation:0,rotation:0,pointEditing:!1,allowPicking:!1});let qo=Vs;(r=>{r.createDefaultProps=()=>({...Et.createDefaultProps(),ground:!1,outlineTranslucent:!0,height:0,extrudedHeight:0,rectangle:d.reactArrayWithUndefined(void 0),rotation:0,stRotation:0,pointEditing:!1,filled:!0})})(qo||(qo={})),d.extendClassProps(qo.prototype,qo.createDefaultProps);const bl=class bl extends At{get typeName(){return"ESPolygonWithHole"}get defaultProps(){return bl.createDefaultProps()}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Y("裁切多边形数组","必须在内部,且没有相交,裁切的多边形数组",!0,!1,[this,"innerRings"],[])]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new Y("裁切多边形数组","必须在内部,且没有相交,裁切的多边形数组",!0,!1,[this,"innerRings"],[])])]}};p(bl,"type",bl.register("ESPolygonWithHole",bl,{chsName:"内部裁切多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"带洞多边形"})),p(bl,"defaults",{...At.defaults,innerRings:[]});let Wo=bl;(r=>{r.createDefaultProps=()=>({...At.createDefaultProps(),innerRings:d.reactPositionsSet(void 0)})})(Wo||(Wo={})),d.extendClassProps(Wo.prototype,Wo.createDefaultProps);const Us=class Us extends At{constructor(e){super(e);p(this,"_startEvent",this.disposeVar(new d.Event));p(this,"_surfaceArea",this.disposeVar(d.react(0)));this.fillStyle.ground=!0}get typeName(){return"ESSurfaceAreaMeasurement"}get defaultProps(){return Us.createDefaultProps()}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get surfaceArea(){return this._surfaceArea.value}set surfaceArea(e){this._surfaceArea.value=e}get surfaceChanged(){return this._surfaceArea.changed}getProperties(e){return[...super.getProperties(e),new H("ESSurfaceAreaMeasurement","表面积测量",[new mt("开始计算","开始计算",[],()=>this.start(),[]),new C("插值距离","插值距离,单位米,为0时不插值",!1,!1,[this,"interpolation"],Us.defaults.interpolation),new C("偏移高度","三角面整体偏移高度,单位米",!1,!1,[this,"offsetHeight"],Us.defaults.offsetHeight)])]}};p(Us,"type",Us.register("ESSurfaceAreaMeasurement",Us,{chsName:"表面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"表面积测量"})),p(Us,"defaults",{...At.defaults,interpolation:.5,offsetHeight:0,unitsMode:[["平方米","SquareMeter"],["平方千米","SquareKilometer"],["亩","MU"],["公顷","Hectare"]]});let Ho=Us;(r=>{r.createDefaultProps=()=>({...At.createDefaultProps(),interpolation:void 0,offsetHeight:void 0,units:d.reactArray(["SquareMeter"])})})(Ho||(Ho={})),d.extendClassProps(Ho.prototype,Ho.createDefaultProps);const qs=class qs extends ${get typeName(){return"ESDatasmithRuntimeModel"}get defaultProps(){return qs.createDefaultProps()}constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new C("下载进度","下载进度",!0,!0,[this,"downloadProgress"]),new Y("importOptions","导入参数",!0,!1,[this,"importOptions"],qs.defaults.importOptions)],dataSource:[...t.dataSource,new Y("路径","url",!1,!1,[this,"url"])]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new Y("url","url",!1,!1,[this,"url"]),new C("下载进度","下载进度",!0,!0,[this,"downloadProgress"]),new Y("importOptions","导入参数",!0,!1,[this,"importOptions"],qs.defaults.importOptions)])]}};p(qs,"type",qs.register("ESDatasmithRuntimeModel",qs,{chsName:"Datasmith Model",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Datasmith Model"})),p(qs,"defaults",{...$.defaults,url:"",importOptions:{buildCollisions:"QueryAndPhysics",buildHierarchy:"Simplified",collisionType:"CTF_UseComplexAsSimple",bImportMetaData:!0}});let Xo=qs;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),url:"",importOptions:d.reactJsonWithUndefined(void 0),downloadProgress:0})})(Xo||(Xo={})),d.extendClassProps(Xo.prototype,Xo.createDefaultProps);const ue=class ue extends is{get typeName(){return"ESDynamicWater"}get defaultProps(){return{...ue.createDefaultProps()}}constructor(t){super(t),this.stroked=!1,this.filled=!0}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new tt("水域类型","当为 custom 时其他控制效果的参数生效,否则不生效,使用对应水域类型的预定效果",!1,!1,[this,"waterType"],ue.defaults.waterTypes,ue.defaults.waterType),new C("频率","控制波数的数值(次/千米)",!1,!1,[this,"frequency"],ue.defaults.frequency),new Kt("振幅","控制水波振幅的数值",!1,!1,[this,"amplitude"],.01,[0,1],ue.defaults.amplitude),new Kt("流向","控制水流方向,局部坐标方向",!1,!1,[this,"flowDirection"],1,[0,360],ue.defaults.flowDirection),new Kt("波动频率","控制水波纹扰动的速率",!1,!1,[this,"waveVelocity"],.01,[0,1],ue.defaults.waveVelocity),new Kt("镜面反射强度","控制镜面反射强度的数值",!1,!1,[this,"specularIntensity"],.01,[0,1],ue.defaults.specularIntensity),new Kt("水体浑浊度","控制水体的浑浊程度,数值越大,浑浊程度越大,取值范围 0 - 10。",!1,!1,[this,"murkiness"],.1,[0,10],ue.defaults.murkiness),new C("水流速度","控制水流速度,单位 米/秒",!1,!1,[this,"flowSpeed"],ue.defaults.flowSpeed),new it("水的底色","waterColor",!1,!1,[this,"waterColor"],ue.defaults.waterColor),new Y("水的图片","waterImage",!1,!1,[this,"waterImage"],ue.defaults.waterImage)]}}getProperties(t){return[...super.getProperties(t),new tt("水域类型","当为 custom 时其他控制效果的参数生效,否则不生效,使用对应水域类型的预定效果",!1,!1,[this,"waterType"],ue.defaults.waterTypes),new Y("水的图片","waterImage",!1,!1,[this,"waterImage"],ue.defaults.waterImage),new it("水的底色","waterColor",!1,!1,[this,"waterColor"],ue.defaults.waterColor),new C("频率","控制波数的数值(次/千米)",!1,!1,[this,"frequency"],ue.defaults.frequency),new Kt("波动频率","控制水波纹扰动的速率",!1,!1,[this,"waveVelocity"],.01,[0,1],ue.defaults.waveVelocity),new Kt("振幅","控制水波振幅的数值",!1,!1,[this,"amplitude"],.01,[0,1],ue.defaults.amplitude),new Kt("镜面反射强度","控制镜面反射强度的数值",!1,!1,[this,"specularIntensity"],.01,[0,1],ue.defaults.specularIntensity),new Kt("流向","控制水流方向,局部坐标方向",!1,!1,[this,"flowDirection"],1,[0,360],ue.defaults.flowDirection),new Kt("水体浑浊度","控制水体的浑浊程度,数值越大,浑浊程度越大,取值范围 0 - 10。",!1,!1,[this,"murkiness"],.1,[0,10],ue.defaults.murkiness),new C("水流速度","控制水流速度,单位 米/秒",!1,!1,[this,"flowSpeed"],ue.defaults.flowSpeed)]}};p(ue,"type",ue.register("ESDynamicWater",ue,{chsName:"动态水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"局部多边形水面"})),p(ue,"defaults",{...is.defaults,waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterTypes:[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],waterType:"river",flowDirection:0,flowSpeed:0,waterImage:void 0,murkiness:5});let Yo=ue;(r=>{r.createDefaultProps=()=>({...is.createDefaultProps(),allowPicking:!0,waterImage:d.reactJsonWithUndefined(void 0),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5})})(Yo||(Yo={})),d.extendClassProps(Yo.prototype,Yo.createDefaultProps);const he=class he extends At{get typeName(){return"ESGeoWater"}get defaultProps(){return he.createDefaultProps()}constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new tt("水域类型","当为custom是其他控制效果的参数生效,否则不生效,使用对应水域类型的预定效果",!1,!1,[this,"waterType"],he.defaults.waterTypes,he.defaults.waterType),new C("频率","控制波数的数值(次/千米)",!1,!1,[this,"frequency"],he.defaults.frequency),new Kt("振幅","控制水波振幅的数值",!1,!1,[this,"amplitude"],.01,[0,1],he.defaults.amplitude),new Kt("流向","控制水流方向,局部坐标方向",!1,!1,[this,"flowDirection"],1,[0,360],he.defaults.flowDirection),new Kt("波动频率","控制水波纹扰动的速率",!1,!1,[this,"waveVelocity"],.01,[0,1],he.defaults.waveVelocity),new Kt("镜面反射强度","控制镜面反射强度的数值",!1,!1,[this,"specularIntensity"],.01,[0,1],he.defaults.specularIntensity),new Kt("水体浑浊度","控制水体的浑浊程度,数值越大,浑浊程度越大,取值范围0 - 10。",!1,!1,[this,"murkiness"],.1,[0,10],he.defaults.murkiness),new C("水流速度","控制水流速度,单位 米/秒",!1,!1,[this,"flowSpeed"],he.defaults.flowSpeed),new it("水的底色","waterColor",!1,!1,[this,"waterColor"],he.defaults.waterColor),new Y("水的图片","waterImage",!1,!1,[this,"waterImage"],he.defaults.waterImage)]}}getProperties(t){return[...super.getProperties(t),new H("ESGeoWater","ESGeoWater",[new tt("水域类型","当为custom是其他控制效果的参数生效,否则不生效,使用对应水域类型的预定效果",!1,!1,[this,"waterType"],he.defaults.waterTypes),new Y("水的图片","waterImage",!1,!1,[this,"waterImage"],he.defaults.waterImage),new it("水的底色","waterColor",!1,!1,[this,"waterColor"],he.defaults.waterColor),new C("频率","控制波数的数值(次/千米)",!1,!1,[this,"frequency"],he.defaults.frequency),new Kt("波动频率","控制水波纹扰动的速率",!1,!1,[this,"waveVelocity"],.01,[0,1],he.defaults.waveVelocity),new Kt("振幅","控制水波振幅的数值",!1,!1,[this,"amplitude"],.01,[0,1],he.defaults.amplitude),new Kt("镜面反射强度","控制镜面反射强度的数值",!1,!1,[this,"specularIntensity"],.01,[0,1],he.defaults.specularIntensity),new Kt("流向","控制水流方向,局部坐标方向",!1,!1,[this,"flowDirection"],1,[0,360],he.defaults.flowDirection),new Kt("水体浑浊度","控制水体的浑浊程度,数值越大,浑浊程度越大,取值范围0 - 10。",!1,!1,[this,"murkiness"],.1,[0,10],he.defaults.murkiness),new C("水流速度","控制水流速度,单位 米/秒",!1,!1,[this,"flowSpeed"],he.defaults.flowSpeed)])]}};p(he,"type",he.register("ESGeoWater",he,{chsName:"地理水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理动态水面"})),p(he,"defaults",{...At.defaults,waterColor:[.1497,.165,.0031,.8],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterTypes:[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],waterType:"river",flowDirection:0,flowSpeed:0,waterImage:{},murkiness:5});let Jo=he;(r=>{r.createDefaultProps=()=>({...At.createDefaultProps(),allowPicking:!0,waterImage:d.reactJsonWithUndefined(void 0),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5})})(Jo||(Jo={})),d.extendClassProps(Jo.prototype,Jo.createDefaultProps);const Tl=class Tl extends ${get typeName(){return"ESLevelRuntimeModel"}get defaultProps(){return Tl.createDefaultProps()}constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new C("下载进度","下载进度",!0,!0,[this,"downloadProgress"]),new nt("levelName","levelName",!1,!1,[this,"levelName"],""),new C("levelLoadDistance","levelLoadDistance",!1,!1,[this,"levelLoadDistance"],1e3),new Qe("levelOffset","levelOffset",!1,!1,[this,"levelOffset"],[0,0,0])],dataSource:[...t.dataSource,new Y("url","url",!1,!1,[this,"url"],"")]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new Y("url","url",!1,!1,[this,"url"]),new nt("levelName","levelName",!1,!1,[this,"levelName"]),new C("下载进度","下载进度",!0,!0,[this,"downloadProgress"]),new C("levelLoadDistance","levelLoadDistance",!1,!1,[this,"levelLoadDistance"]),new Qe("levelOffset","levelOffset",!1,!1,[this,"levelOffset"])])]}};p(Tl,"type",Tl.register("ESLevelRuntimeModel",Tl,{chsName:"关卡包模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"关卡包模型"})),p(Tl,"defaults",{...$.defaults,url:""});let Ko=Tl;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),url:"",downloadProgress:0,levelName:"",levelOffset:d.reactArray([0,0,0]),levelLoadDistance:1e3})})(Ko||(Ko={})),d.extendClassProps(Ko.prototype,Ko.createDefaultProps);const wr=class wr extends hn{constructor(e){super(e);p(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);p(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());this.filled=!0,this.stroked=!1,this.fillColor=[1,0,.73,1]}get typeName(){return"ESPipeline"}get defaultProps(){return wr.createDefaultProps()}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new C("半径","radius(米)",!1,!1,[this,"radius"],wr.defaults.radius),new C("圆边数","sides(圆细分边)",!1,!1,[this,"sides"],wr.defaults.sides),new C("材质速度","speed",!1,!1,[this,"speed"],wr.defaults.speed),new tt("材质模式","materialMode",!1,!1,[this,"materialMode"],wr.defaults.materialModes),new Y("材质图片和重复度","materialImage",!1,!1,[this,"materialImage"],wr.defaults.materialImage)],style:[new H("点样式","点样式集合",[]),new U("开启","开启点样式",!1,!1,[this,"pointed"],!1),new C("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new tt("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new it("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new H("线样式","线样式集合",[]),new U("开启线样式","开启线样式",!1,!1,[this,"stroked"],!0),new C("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new tt("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new it("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new U("是否贴地","是否贴地(线)",!1,!1,[this,"strokeGround"],!1),new H("面样式","面样式集合",[]),new U("开启","开启填充样式",!1,!1,[this,"filled"],!1),new it("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1]),new U("是否贴地","是否贴地",!1,!1,[this,"fillGround"],!1)]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new C("半径","radius(米)",!1,!1,[this,"radius"],wr.defaults.radius),new C("圆边数","sides(圆细分边)",!1,!1,[this,"sides"],wr.defaults.sides),new Y("材质图片和重复度","materialImage",!1,!1,[this,"materialImage"],wr.defaults.materialImage),new C("材质速度","speed",!1,!1,[this,"speed"],wr.defaults.speed),new tt("材质模式","materialMode",!1,!1,[this,"materialMode"],wr.defaults.materialModes)])]}};p(wr,"type",wr.register("ESPipeline",wr,{chsName:"管线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPipeline"})),p(wr,"defaults",{...hn.defaults,radius:10,sides:10,materialImage:{url:"",uDis:50,vDis:10},speed:1,materialModes:[["单箭头","singleArrow"],["多箭头","multipleArrows"]]});let Qo=wr;(r=>{r.createDefaultProps=()=>({...hn.createDefaultProps(),radius:10,sides:10,materialMode:"singleArrow",materialImage:d.reactJson(r.defaults.materialImage),speed:1})})(Qo||(Qo={})),d.extendClassProps(Qo.prototype,Qo.createDefaultProps);const gn=class gn extends Et{constructor(e){super(e);p(this,"editingBindMode","visibility")}get typeName(){return"ESVisibilityAnalysis"}get defaultProps(){return gn.createDefaultProps()}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new it("可视区域颜色","可视区域颜色.",!1,!1,[this,"visibleColor"],gn.defaults.visibleColor),new it("遮挡区域颜色","遮挡区域颜色.",!1,!1,[this,"invisibleColor"],gn.defaults.invisibleColor),new C("视点高度偏移","heightOffset",!1,!1,[this,"heightOffset"],gn.defaults.heightOffset)]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new it("可视区域颜色","可视区域颜色.",!1,!1,[this,"visibleColor"],gn.defaults.visibleColor),new it("遮挡区域颜色","遮挡区域颜色.",!1,!1,[this,"invisibleColor"],gn.defaults.invisibleColor),new C("视点高度偏移","heightOffset",!1,!1,[this,"heightOffset"],gn.defaults.heightOffset)])]}};p(gn,"type",gn.register("ESVisibilityAnalysis",gn,{chsName:"通视分析,视线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通视分析,视线分析"})),p(gn,"supportEditingModes",[...Et.supportEditingModes,vt.VisibilityAppend,vt.VisibilityModify]),p(gn,"defaults",{...Et.defaults,visibleColor:[0,1,0,1],invisibleColor:[1,0,0,1],heightOffset:0});let Bo=gn;(r=>{r.createDefaultProps=()=>({...Et.createDefaultProps(),visibleColor:d.reactArray([0,1,0,1]),invisibleColor:d.reactArray([1,0,0,1]),heightOffset:0})})(Bo||(Bo={})),d.extendClassProps(Bo.prototype,Bo.createDefaultProps);const Dl=class Dl extends At{constructor(e){super(e);p(this,"_startEvent",this.dv(new d.Event));p(this,"_clearEvent",this.dv(new d.Event));p(this,"_volume",this.disposeVar(d.react(0)));this.filled=!1,this.stroked=!0,this.strokeStyle.width=2}get typeName(){return"ESVolumeMeasurement"}get defaultProps(){return Dl.createDefaultProps()}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get volume(){return this._volume.value}set volume(e){this._volume.value=e}get volumeChanged(){return this._volume.changed}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new C("基准面高程","基准面高程",!0,!1,[this,"planeHeight"]),new C("采样间距 m","采样间距 m",!1,!1,[this,"gridWidth"]),new C("挖方","挖方 m³",!1,!0,[this,"cutVolume"]),new C("填方","填方 m³",!1,!0,[this,"fillVolume"]),new C("挖填方","挖填方 m³",!1,!0,[this,"cutAndFillVolume"]),new C("计算进度","计算进度",!1,!0,[this,"progress"]),new mt("开始分析","开始分析",[],()=>this.start(),[]),new mt("清空分析结果","清空分析结果",[],()=>this.clear(),[]),new U("是否开启深度检测","A boolean Property specifying the visibility.",!1,!1,[this,"depthTest"])])]}};p(Dl,"type",Dl.register("ESVolumeMeasurement",Dl,{chsName:"体积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"体积测量"})),p(Dl,"defaults",{...At.defaults});let Zo=Dl;(r=>{r.createDefaultProps=()=>({...At.createDefaultProps(),planeHeight:d.react(void 0),gridWidth:1,cutVolume:0,fillVolume:0,cutAndFillVolume:0,progress:0,depthTest:!1})})(Zo||(Zo={})),d.extendClassProps(Zo.prototype,Zo.createDefaultProps);const Au=class Au extends rs{constructor(e){super(e);p(this,"_human",this.dv(new rs));p(this,"_poi",this.dv(new ns));p(this,"combinationClass",!0);this.mainClass=this._human,this._human.parentID=this.id,this._poi.parentID=this.id,this.d(this.components.disposableAdd(this._human)),this.d(this.components.disposableAdd(this._poi));{const{_human:n,_poi:i}=this;this.d(d.track([n,"show"],[this,"show"])),this.d(d.track([i,"show"],[this,"show"])),this.d(d.track([n,"allowPicking"],[this,"allowPicking"])),this.d(d.track([i,"allowPicking"],[this,"allowPicking"])),this.d(d.bind([n,"scale"],[this,"scale"])),this.d(d.bind([i,"scale"],[this,"scale"])),this.d(d.track([n,"collision"],[this,"collision"])),this.d(d.track([i,"collision"],[this,"collision"])),this.d(d.bind([n,"flyInParam"],[this,"flyInParam"])),this.d(d.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(d.track([n,"animation"],[this,"animation"])),this.d(d.track([n,"mode"],[this,"mode"])),this.d(d.track([n,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(d.track([n,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(d.track([i,"name"],[this,"name"])),this.d(d.track([i,"mode"],[this,"poiMode"])),this.d(d.track([i,"autoAnchor"],[this,"autoAnchor"])),this.d(d.track([i,"screenRender"],[this,"screenRender"])),this.d(d.track([i,"size"],[this,"size"])),this.d(d.track([i,"anchor"],[this,"anchor"])),this.d(d.track([i,"sizeByContent"],[this,"sizeByContent"])),this.d(d.track([i,"renderMode"],[this,"renderMode"])),this.d(d.track([i,"rotationType"],[this,"rotationType"])),this.d(d.track([i,"zOrder"],[this,"zOrder"])),this.d(d.track([i,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(d.track([i,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(d.bind([n,"position"],[this,"position"])),this.d(d.bind([n,"rotation"],[this,"rotation"])),this.d(this.flyInEvent.don(s=>{n.flyIn(s)})),this.d(this.flyToEvent.don(s=>{n.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{n.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{n.calcFlyInParam()})),this.d(this.smoothMoveEvent.don((s,a)=>{n.smoothMove(s,a)})),this.d(this.smoothMoveWithRotationEvent.don((s,a,o)=>{n.smoothMoveWithRotation(s,a,o)})),this.d(this.smoothMoveOnGroundEvent.don((s,a,o,l)=>{n.smoothMoveOnGround(s,a,o,l)})),this.d(this.smoothMoveWithRotationOnGroundEvent.don((s,a,o,l,u)=>{n.smoothMoveWithRotationOnGround(s,a,o,l,u)})),this.d(this.automaticLandingEvent.don(()=>{n.automaticLanding()}))}}get typeName(){return"ESHumanPoi"}get defaultProps(){return Au.createDefaultProps()}get human(){return this._human}get poi(){return this._poi}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new tt("poi模式","poiMode",!1,!1,[this,"poiMode"],ns.defaults.modes,"SquareH01"),new C("poi高度偏移","poi高度偏移",!1,!1,[this,"poiOffsetHeight"],1.8)]}}getProperties(e){return[...super.getProperties(e),new tt("poi模式","poiMode",!1,!1,[this,"poiMode"],ns.defaults.modes),new C("poi高度偏移","poi高度偏移",!1,!1,[this,"poiOffsetHeight"],1.8)]}};p(Au,"type",Au.register("ESHumanPoi",Au,{chsName:"人员poi",tags:["ESObjects"],description:"ESHuman + ESPoi2D组合对象"}));let $o=Au;(r=>{r.createDefaultProps=()=>({poiOffsetHeight:1.8,poiMode:"SquareH01",style:d.reactJson({}),autoAnchor:!0,screenRender:!0,size:d.reactArray([100,100]),anchor:d.reactArray([.5,1]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,...rs.createDefaultProps()})})($o||($o={})),d.extendClassProps($o.prototype,$o.createDefaultProps);const Er=class Er extends At{get typeName(){return"ESPit"}get defaultProps(){return Er.createDefaultProps()}constructor(t){super(t),this.collision=!1,this.allowPicking=!1,this.filled=!0}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new C("深度","坑深度(米)",!1,!1,[this,"depth"],Er.defaults.depth),new C("插值","插值距离(米)",!1,!1,[this,"interpolation"],Er.defaults.interpolation),new C("透明度","透明度",!1,!1,[this,"opacity"],Er.defaults.opacity),new Y("侧面图片","侧面图片",!1,!1,[this,"sideImage"],Er.defaults.sideImage),new Y("底面图片","底面图片",!1,!1,[this,"bottomImage"],Er.defaults.bottomImage)],style:[new H("点样式","点样式集合",[]),new U("开启","开启点样式",!1,!1,[this,"pointed"],!1),new C("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new tt("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new it("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new H("线样式","线样式集合",[]),new U("开启","开启线样式",!1,!1,[this,"stroked"],!0),new C("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new tt("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new it("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new U("是否贴地","是否贴地(线)",!1,!1,[this,"strokeGround"],!1),new H("面样式","面样式集合",[]),new U("开启","开启填充样式",!1,!1,[this,"filled"],!0),new it("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1]),new U("是否贴地","是否贴地",!1,!1,[this,"fillGround"],!1)]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new C("深度","坑深度(米)",!1,!1,[this,"depth"],Er.defaults.depth),new C("插值","插值距离(米)",!1,!1,[this,"interpolation"],Er.defaults.interpolation),new Y("侧面图片","侧面图片",!1,!1,[this,"sideImage"],Er.defaults.sideImage),new Y("底面图片","底面图片",!1,!1,[this,"bottomImage"],Er.defaults.bottomImage),new C("opacity","透明度",!1,!1,[this,"opacity"],Er.defaults.opacity)])]}};p(Er,"type",Er.register("ESPit",Er,{chsName:"坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"坑"})),p(Er,"defaults",{...At.defaults,depth:100,sideImage:{url:ft.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/side.jpg"),uDis:50,vDis:50},bottomImage:{url:ft.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/bottom.jpg"),uDis:50,vDis:50},opacity:1,interpolation:50});let ss=Er;(r=>{r.createDefaultProps=()=>({...At.createDefaultProps(),depth:100,sideImage:d.reactJson(r.defaults.sideImage),bottomImage:d.reactJson(r.defaults.bottomImage),opacity:1,interpolation:50})})(ss||(ss={})),d.extendClassProps(ss.prototype,ss.createDefaultProps);const Lu=class Lu extends ss{constructor(e){super(e);p(this,"_excavate",this.dv(new xs));p(this,"_pit",this.dv(new ss));p(this,"combinationClass",!0);this.mainClass=this._pit,this.excavate.parentID=this.id,this._pit.parentID=this.id,this.d(this.components.disposableAdd(this._excavate)),this.d(this.components.disposableAdd(this._pit));{const{_excavate:n,_pit:i}=this;this.d(d.track([n,"show"],[this,"show"])),this.d(d.track([i,"show"],[this,"show"])),this.d(d.track([n,"allowPicking"],[this,"allowPicking"])),this.d(d.track([i,"allowPicking"],[this,"allowPicking"])),this.d(d.track([n,"collision"],[this,"collision"])),this.d(d.track([i,"collision"],[this,"collision"])),this.d(d.bind([i,"points"],[this,"points"])),this.d(d.track([n,"points"],[this,"points"])),this.d(d.track([i,"pointed"],[this,"pointed"])),this.d(d.track([n,"pointed"],[this,"pointed"])),this.d(d.track([i,"pointStyle"],[this,"pointStyle"])),this.d(d.track([n,"pointStyle"],[this,"pointStyle"])),this.d(d.track([i,"stroked"],[this,"stroked"])),this.d(d.track([n,"stroked"],[this,"stroked"])),this.d(d.track([i,"strokeStyle"],[this,"strokeStyle"])),this.d(d.track([n,"strokeStyle"],[this,"strokeStyle"])),this.d(d.track([i,"filled"],[this,"filled"])),this.d(d.track([i,"fillStyle"],[this,"fillStyle"])),this.d(d.track([n,"fillStyle"],[this,"fillStyle"])),this.d(d.track([n,"mode"],[this,"mode"])),this.d(d.track([n,"targetID"],[this,"targetID"])),this.d(d.track([i,"depth"],[this,"depth"])),this.d(d.track([i,"sideImage"],[this,"sideImage"])),this.d(d.track([i,"bottomImage"],[this,"bottomImage"])),this.d(d.track([i,"opacity"],[this,"opacity"])),this.d(d.track([i,"interpolation"],[this,"interpolation"])),this.d(d.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(d.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(this.flyInEvent.don(s=>{i.flyIn(s)})),this.d(this.flyToEvent.don(s=>{i.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get typeName(){return"ESHole"}get defaultProps(){return Lu.createDefaultProps()}get excavate(){return this._excavate}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new tt("模式","mode",!1,!1,[this,"mode"],xs.defaults.modes,"in"),new nt("瓦片图层","targetID",!1,!1,[this,"targetID"],"")]}}};p(Lu,"type",Lu.register("ESHole",Lu,{chsName:"挖坑(带材质+深度)",tags:["ESObjects"],description:"挖坑"}));let jo=Lu;(r=>{r.createDefaultProps=()=>({mode:"in",targetID:"",...ss.createDefaultProps()})})(jo||(jo={})),d.extendClassProps(jo.prototype,jo.createDefaultProps);const Vd={layerconfigfind:"/ts/layer/config/get",layerconfigsave:"/ts/layer/config/put",featureproperty:"/ts/editor/property",featureeditormuti:"/ts/editor/update",getts:"/ts/info"},rI=async(r,t)=>{try{const e=window.localStorage.getItem("Authorization"),n={headers:{...e?{Authorization:e}:{}},mode:"cors"},s=await(await fetch(r+`${Vd.layerconfigfind}?tileServiceName=${t}`,n)).text();return JSON.parse(s)}catch(e){console.error(e)}},nI=async(r,t,e)=>{try{const n=window.localStorage.getItem("Authorization"),i=e??{},s={method:"POST",headers:{"Content-Type":"application/json",...n?{Authorization:n}:{}},mode:"cors",body:JSON.stringify({tileServiceName:t,layerConfig:JSON.stringify(i)})},o=await(await fetch(r+Vd.layerconfigsave,s)).text();return JSON.parse(o)}catch(n){console.error(n)}},iI=async r=>{try{const t=window.localStorage.getItem("Authorization"),e={headers:{...t?{Authorization:t}:{}},mode:"cors"},i=await(await fetch(r,e)).text(),s=JSON.parse(i);if(s.status=="ok")return s.data.port;console.error(s.status);return}catch(t){console.error(t)}},sI=async(r,t,e)=>{try{const n={tileServiceName:t,featureId:e},i=window.localStorage.getItem("Authorization"),a=await(await fetch(r+Vd.featureproperty,{method:"post",headers:{"Content-Type":"application/json",...i?{Authorization:i}:{}},body:JSON.stringify(n),mode:"cors"})).text(),o=JSON.parse(a);if(o.status=="ok")return o.data;console.error(o.data.status);return}catch(n){console.error(n)}},xl=class xl extends Je{constructor(e){super(e);p(this,"_es3DTileset",this.dv(new Je));p(this,"_ids",this.dv(d.reactJson([])));p(this,"combinationClass",!0);p(this,"_highlightInner3DtilesetEvent",this.dv(new d.Event));p(this,"_removeHighlightInner3DtilesetEvent",this.dv(new d.Event));p(this,"_tilesetServePort",this.dv(d.react("")));this.es3DTileset.parentID=this.id,this.mainClass=this._es3DTileset;{const n=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ts01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{n()}))}{this.d(this.components.disposableAdd(this._es3DTileset));const n=this._es3DTileset;this.d(d.track([n,"allowPicking"],[this,"allowPicking"])),this.d(d.track([n,"collision"],[this,"collision"])),this.d(d.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(d.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(d.track([n,"actorTag"],[this,"actorTag"])),this.d(d.track([n,"materialMode"],[this,"materialMode"])),this.d(d.track([n,"highlight"],[this,"highlight"])),this.d(d.track([n,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(d.track([n,"highlightID"],[this,"highlightID"])),this.d(d.track([n,"highlightColor"],[this,"highlightColor"])),this.d(d.bind([n,"offset"],[this,"offset"])),this.d(d.bind([n,"rotation"],[this,"rotation"])),this.d(d.track([n,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(d.track([n,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(d.track([n,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(d.track([n,"czmClassificationType"],[this,"czmClassificationType"])),this.d(d.track([n,"czmStyleJson"],[this,"czmStyleJson"])),this.d(d.track([n,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(d.track([n,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(d.track([n,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(d.track([n,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(d.track([n,"colorBlendMode"],[this,"colorBlendMode"])),this.d(d.track([n,"cacheBytes"],[this,"cacheBytes"])),this.d(d.track([n,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(d.track([n,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(d.track([n,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(d.track([n,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(d.track([n,"materialParams"],[this,"materialParams"])),this.d(d.bind([n,"supportEdit"],[this,"supportEdit"])),this.d(d.bind([n,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(d.bind([n,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(d.bind([n,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(d.bind([n,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(d.bind([n,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(d.bind([n,"excavateId"],[this,"excavateId"]))}{const n=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{n.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{n.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{n.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{n.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{n.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{n.resetFeatureStyle(...i)})),this.d(this.setFeatureStyleEvent.don((...i)=>{n.setFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{n.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{n.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{n.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{n.calcFlyInParam(...i)}))}{const n=this._es3DTileset;this.d(n.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(n.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const n=()=>{this.es3DTileset.show=this.show};n(),this.d(this.showChanged.don(()=>{n()}))}}get typeName(){return"ESRtsTileset"}get defaultProps(){return xl.createDefaultProps()}get json(){return this._innerGetJson()}set json(e){this._innerSetJson(e)}get es3DTileset(){return this._es3DTileset}get ids(){return this._ids.value}get idsChanged(){return this._ids.changed}set ids(e){this._ids.value=e}async getFeatureProperty(e){return await sI(this.baseUrl,this.tileServiceName,e)}async getLayerConfig(){const e=await rI(this.baseUrl,this.tileServiceName);return!e||!Array.isArray(e)?this.layerConfig=[]:this.layerConfig=e,this.layerConfig}async saveLayerConfig(){const e=this.layerConfig;return await nI(this.baseUrl,this.tileServiceName,e)}get highlightInner3DtilesetEvent(){return this._highlightInner3DtilesetEvent}_highlightInner3Dtileset(e){this._highlightInner3DtilesetEvent.emit(e)}async highlightDSFeature(e){this._highlightInner3Dtileset(e)}get removeHighlightInner3DtilesetEvent(){return this._removeHighlightInner3DtilesetEvent}_removeHighlightInner3Dtileset(e){this._removeHighlightInner3DtilesetEvent.emit(e)}async removeHighlightDSFeature(e){this._removeHighlightInner3Dtileset(e)}async pickFeature(e,n){var o,l,u;const i=await e.pick(n),s=i.sceneObject;return!s||s.id!==this.id&&s.typeName!="ESRtsFeatureEditing"?void 0:s.typeName!="ESRtsFeatureEditing"?(this.ids=[...this.ids,(o=i==null?void 0:i.tilesetPickInfo)==null?void 0:o.id],{featureId:(l=i==null?void 0:i.tilesetPickInfo)==null?void 0:l.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}):{featureId:(u=i==null?void 0:i.sceneObject)==null?void 0:u.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}async getport(){const e=await iI(this.url);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const e=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],n=+new Date;if(e){const s=this.tileServiceIp,a=await this.getport();await this.getLayerConfig(),this._es3DTileset.url=`${s}:${a}/tiles/tileset.json?t=${n}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const n=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!n)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01");return n}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01")}get tileServiceName(){var e;if(this.url&&typeof this.url=="string"){const n=(e=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:e[1];if(!n)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return n}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const n=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!n)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01");return n}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01")}getProperties(e){return[...super.getProperties(e),new H("ESRtsTileset","ESRtsTileset",[new Y("图层配置","图层配置(layerConfig)",!0,!1,[this,"layerConfig"],[])])]}};p(xl,"type",xl.register("ESRtsTileset",xl,{chsName:"CIMRTS实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"})),p(xl,"defaults",{...Je.defaults,layerConfig:[]});let tl=xl;(r=>{r.createDefaultProps=()=>({layerConfig:d.reactJsonWithUndefined(void 0),...Je.createDefaultProps()})})(tl||(tl={})),d.extendClassProps(tl.prototype,tl.createDefaultProps);function aI(r){return typeof r=="number"&&!isNaN(r)}const Ol=class Ol extends Je{constructor(e){super(e);p(this,"combinationClass",!0)}get typeName(){return"ESRtsFeatureEditing"}get defaultProps(){return Ol.createDefaultProps()}get json(){return{...this._innerGetJson(),show:this.show,materials:this.materials,changeMaterial:this.changeMaterial,props:this.props,rotation:this.rotation}}set json(e){this._innerSetJson(e)}async init(e,n){this.featureId=n;const i=await e.getFeatureProperty(n);this.uiShowprops=i.allFields.map(o=>({featureClassName:o.featureClassName,fields:o.fields.map(l=>({key:l.name,type:l.type,value:l.type!="Double"?l.value:aI(l.value)?Number(l.value.toFixed(3)):""}))})),this.datasetName=i.datasetName,e.setFeatureVisable("id",[{value:this.featureId,visable:!1}]),this.d(()=>{e.setFeatureVisable("id",[{value:this.featureId,visable:!0}])});const s=e.tileServiceIp,a=e.tilesetServePort;if(!a)throw new Error("ESRtsFeatureEditing: port is not defined");this.url=`${s}:${a}/featuretiles/${this.featureId}/tileset.json`,this.allowPicking=!0,this.d(this.pickedEvent.don(o=>{o.assign({sceneObject:e}),e.pickedEvent.emit(o)})),this.d(()=>{this.editing=!1,e.removeHighlightDSFeature(this)})}getProperties(e){return[...super.getProperties(e)]}};p(Ol,"type",Ol.register("ESRtsFeatureEditing",Ol,{chsName:"ESRtsFeatureEditing",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"})),p(Ol,"defaults",{...Je.defaults,layerConfig:{}});let el=Ol;(r=>{r.createDefaultProps=()=>({...Je.createDefaultProps(),datasetName:void 0,featureId:void 0,materials:d.reactJson({}),changeMaterial:d.reactJsonWithUndefined(void 0),uiShowprops:d.reactJson({}),props:d.reactJson({})})})(el||(el={})),d.extendClassProps(el.prototype,el.createDefaultProps);const oI=async r=>{try{const t=window.localStorage.getItem("Authorization"),e={headers:{...t?{Authorization:t}:{}},mode:"cors"},i=await(await fetch(r,e)).text(),s=JSON.parse(i);if(s.status=="ok")return s.data.port;console.error(s.status);return}catch(t){console.error(t)}},Al=class Al extends Je{constructor(e){super(e);p(this,"_es3DTileset",this.dv(new Je));p(this,"combinationClass",!0);p(this,"_tilesetServePort",this.dv(d.react("")));this.es3DTileset.parentID=this.id,this.mainClass=this._es3DTileset;{const n=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ms01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{n()}))}{this.d(this.components.disposableAdd(this._es3DTileset));const n=this._es3DTileset;this.d(d.track([n,"allowPicking"],[this,"allowPicking"])),this.d(d.track([n,"collision"],[this,"collision"])),this.d(d.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(d.bind([n,"flyToParam"],[this,"flyToParam"])),this.d(d.track([n,"actorTag"],[this,"actorTag"])),this.d(d.track([n,"materialMode"],[this,"materialMode"])),this.d(d.track([n,"highlight"],[this,"highlight"])),this.d(d.track([n,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(d.track([n,"highlightID"],[this,"highlightID"])),this.d(d.track([n,"highlightColor"],[this,"highlightColor"])),this.d(d.bind([n,"offset"],[this,"offset"])),this.d(d.bind([n,"rotation"],[this,"rotation"])),this.d(d.track([n,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(d.track([n,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(d.track([n,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(d.track([n,"czmClassificationType"],[this,"czmClassificationType"])),this.d(d.track([n,"czmStyleJson"],[this,"czmStyleJson"])),this.d(d.track([n,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(d.track([n,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(d.track([n,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(d.track([n,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(d.track([n,"colorBlendMode"],[this,"colorBlendMode"])),this.d(d.track([n,"cacheBytes"],[this,"cacheBytes"])),this.d(d.track([n,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(d.track([n,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(d.track([n,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(d.track([n,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(d.track([n,"materialParams"],[this,"materialParams"])),this.d(d.bind([n,"supportEdit"],[this,"supportEdit"])),this.d(d.bind([n,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(d.bind([n,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(d.bind([n,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(d.bind([n,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(d.bind([n,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(d.bind([n,"excavateId"],[this,"excavateId"]))}{const n=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{n.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{n.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{n.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{n.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{n.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{n.resetFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{n.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{n.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{n.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{n.calcFlyInParam(...i)}))}{const n=this._es3DTileset;this.d(n.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(n.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const n=()=>{this.es3DTileset.show=this.show};n(),this.d(this.showChanged.don(()=>{n()}))}}get typeName(){return"ESMsTileset"}get defaultProps(){return Al.createDefaultProps()}get json(){return this._innerGetJson()}set json(e){this._innerSetJson(e)}get es3DTileset(){return this._es3DTileset}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}async getport(){const e=await oI(this.url);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const e=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],n=+new Date;if(e){const s=this.tileServiceIp,a=await this.getport();this._es3DTileset.url=`${s}:${a}/tiles/tileset.json?t=${n}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const n=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!n)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01");return n}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const n=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!n)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01");return n}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceName(){var e;if(this.url&&typeof this.url=="string"){const n=(e=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:e[1];if(!n)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return n}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}getProperties(e){return[...super.getProperties(e)]}};p(Al,"type",Al.register("ESMsTileset",Al,{chsName:"Modelser实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"})),p(Al,"defaults",{...Je.defaults,layerConfig:{}});let rl=Al;(r=>{r.createDefaultProps=()=>({...Je.createDefaultProps()})})(rl||(rl={})),d.extendClassProps(rl.prototype,rl.createDefaultProps);const W0={defaultValue:[{type:"2",widget:"WidgetBlueprint'/ESFoliage/PoiSheng.PoiSheng'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"3",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"4",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"5",widget:"WidgetBlueprint'/ESFoliage/PoiXiang.PoiXiang'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"6",widget:"WidgetBlueprint'/ESFoliage/PoiCun.PoiCun'",povit:[.5,1],worldScale:.1,hiddenDistance:40}],sampleValue:`
|
|
401
401
|
## 参数类型为 ESPoiType[]
|
|
402
402
|
\`\`\`js
|
|
403
403
|
type Vector2D = [number, number]
|
|
@@ -411,7 +411,7 @@ type ESPoiType = {
|
|
|
411
411
|
}
|
|
412
412
|
|
|
413
413
|
\`\`\`
|
|
414
|
-
`},Da=class Da extends Ot{get typeName(){return"ESPoiTileset"}get defaultProps(){return Da.createDefaultProps()}constructor(t){super(t)}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new Y("路径","路径",!1,!1,[this,"url"]),new Y("poiTypes","类型为 {type: string, povit: Vector2D, widget: string, worldScale: number, hiddenDistance: number}[]",!1,!1,[this,"poiTypes"],Da.defaults.poiTypes,W0.sampleValue),new C("heightOffset","heightOffset",!1,!1,[this,"heightOffset"])])]}};p(Da,"type",Da.register("ESPoiTileset",Da,{chsName:"ESPoiTileset",tags:["ESObjects","_ES_Impl_UE"],description:"ESPoiTileset"})),p(Da,"defaults",{...Ot.defaults,poiTypes:W0.defaultValue});let nl=Da;(r=>{r.createDefaultProps=()=>({...Ot.createDefaultProps(),url:"",poiTypes:d.reactJsonWithUndefined(void 0),heightOffset:40})})(nl||(nl={})),d.extendClassProps(nl.prototype,nl.createDefaultProps);const Ll=class Ll extends ft{get typeName(){return"ESScale"}get defaultProps(){return Ll.createDefaultProps()}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new U("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"]),new tt("定位","放到屏幕的哪个位置",!1,!1,[this,"screenPosition"],[["left","left"],["right","right"]]),new se("位置","位置(bottom,right/left)",!1,!1,[this,"cssPosition"])])]}};p(Ll,"type",Ll.register("ESScale",Ll,{chsName:"比例尺",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"比例尺"})),p(Ll,"defaults",{...ft.defaults,show:!0,screenPosition:"right",cssPosition:[40,18]});let il=Ll;(r=>{r.createDefaultProps=()=>({...ft.createDefaultProps(),show:!0,screenPosition:"right",cssPosition:[40,30]})})(il||(il={})),d.extendClassProps(il.prototype,il.createDefaultProps);const mn=class mn extends At{get typeName(){return"ESGeoExtrudedPolygon"}get defaultProps(){return mn.createDefaultProps()}constructor(t){super(t),this.collision=!1}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new C("高度","高度 m",!0,!1,[this,"height"],mn.defaults.height),new C("拉伸高度","拉伸高度 m",!0,!1,[this,"extrudedHeight"],mn.defaults.extrudedHeight),new U("应用每个位置高度","应用每个位置高度",!0,!1,[this,"perPositionHeight"],mn.defaults.perPositionHeight)],style:[new H("点样式","点样式集合",[]),new U("开启","开启点样式",!1,!1,[this,"pointed"],!1),new C("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new tt("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new it("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new H("线样式","线样式集合",[]),new U("开启","开启线样式",!1,!1,[this,"stroked"],!1),new U("贴地","是否贴地",!1,!1,[this,"strokeGround"],!1),new C("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new tt("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new it("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new H("面样式","面样式集合",[]),new U("开启","开启填充样式",!1,!1,[this,"filled"],!0),new U("贴地","是否贴地",!1,!1,[this,"fillGround"],!1),new it("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1])]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new C("高度","高度 m",!0,!1,[this,"height"],mn.defaults.height),new C("拉伸高度","拉伸高度 m",!0,!1,[this,"extrudedHeight"],mn.defaults.extrudedHeight),new U("应用每个位置高度","应用每个位置高度",!0,!1,[this,"perPositionHeight"],mn.defaults.perPositionHeight)])]}};p(mn,"type",mn.register("ESGeoExtrudedPolygon",mn,{chsName:"拉升多边形体",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"拉升多边形体"})),p(mn,"supportEditingModes",[...At.supportEditingModes,vt.HeightModify]),p(mn,"defaults",{...At.defaults,height:0,extrudedHeight:10,perPositionHeight:!1});let Os=mn;(r=>{r.createDefaultProps=()=>({...At.createDefaultProps(),height:0,extrudedHeight:10,perPositionHeight:!1})})(Os||(Os={})),d.extendClassProps(Os.prototype,Os.createDefaultProps);const Rl=class Rl extends At{constructor(e){super(e);p(this,"_classification",this.dv(new _a));p(this,"_geoExtrudedPolygon",this.dv(new Os));p(this,"combinationClass",!0);this.mainClass=this._geoExtrudedPolygon,this.classification.parentID=this.id,this.geoExtrudedPolygon.parentID=this.id,this.d(this.components.disposableAdd(this._classification)),this.d(this.components.disposableAdd(this._geoExtrudedPolygon));{const{_classification:n,_geoExtrudedPolygon:i}=this;i.perPositionHeight=!0,this.d(d.track([n,"collision"],[this,"collision"])),this.d(d.track([i,"collision"],[this,"collision"])),this.d(d.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(d.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(d.bind([i,"points"],[this,"points"])),this.d(d.bind([i,"extrudedHeight"],[this,"height"])),this.d(d.bind([n,"fillColor"],[this,"overheightColor"])),this.d(d.bind([i,"fillColor"],[this,"standardColor"]));{const s=()=>{const{height:o,points:l,maxHeight:u}=this;if(!l)return;const c=l.map(h=>[h[0],h[1],o]);n.points=c,n.height=u-o,u-o<=0?n.show=!1:n.show=this.show&&this.filled};s();const a=this.dv(d.createNextAnimateFrameEvent(this.heightChanged,this.pointsChanged,this.maxHeightChanged));this.d(a.don(s))}{const s=()=>{const{show:o,filled:l}=this;n.show=o&&l,i.show=o&&l};s();const a=this.dv(d.createNextAnimateFrameEvent(this.showChanged,this.filledChanged));this.d(a.don(s))}this.dispose(this.flyInEvent.don(s=>{i.flyIn(s)})),this.dispose(this.flyToEvent.don(s=>{i.flyTo(s)})),this.dispose(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.dispose(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get typeName(){return"ESHeightLimitAnalysis"}get defaultProps(){return Rl.createDefaultProps()}get classification(){return this._classification}get geoExtrudedPolygon(){return this._geoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new C("高度","控高的高度",!1,!1,[this,"height"],10),new C("最高高度","最高高度",!1,!1,[this,"maxHeight"],200),new it("超高颜色","超高颜色",!1,!1,[this,"overheightColor"],[1,0,0,.5]),new it("标准颜色","标准颜色",!1,!1,[this,"standardColor"],[0,1,0,.5])],style:[new H("点样式","点样式集合",[]),new U("开启","开启点样式",!1,!1,[this,"pointed"],!1),new C("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new tt("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new it("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new H("线样式","线样式集合",[]),new U("开启","开启线样式",!1,!1,[this,"stroked"],!1),new U("贴地","是否贴地",!1,!1,[this,"strokeGround"],!1),new C("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new tt("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new it("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new H("面样式","面样式集合",[]),new U("开启","开启填充样式",!1,!1,[this,"filled"],!0),new U("贴地","是否贴地",!1,!1,[this,"fillGround"],!1),new it("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1])]}}getProperties(e){return[...super.getProperties(e),new C("高度","控高的高度",!1,!1,[this,"height"],10),new C("最高高度","最高高度",!1,!1,[this,"maxHeight"],200),new it("超高颜色","超高颜色",!1,!1,[this,"overheightColor"],[1,0,0,.5]),new it("标准颜色","标准颜色",!1,!1,[this,"standardColor"],[0,1,0,.5])]}};p(Rl,"type",Rl.register("ESHeightLimitAnalysis",Rl,{chsName:"控高分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"控高分析对象"})),p(Rl,"supportEditingModes",[...At.supportEditingModes,vt.HeightModify]);let sl=Rl;(r=>{r.createDefaultProps=()=>({height:10,maxHeight:200,overheightColor:[1,0,0,.5],standardColor:[0,1,0,.5],...At.createDefaultProps()})})(sl||(sl={})),d.extendClassProps(sl.prototype,sl.createDefaultProps);const Pr=class Pr extends Ot{constructor(e){super(e);p(this,"_widgetEvent",this.dv(new d.Event));p(this,"_data",this.dv(d.react(void 0)));{const n=()=>{if(this.url)do{if(typeof this.url=="object"){this.data=this.url;break}if(q0(this.url)){this.data=JSON.parse(this.url);break}fetch(ft.context.getStrFromEnv(this.url)).then(i=>i.json()).then(i=>{this.data=i}).catch(i=>{console.warn("ESEntityCluster数据加载失败",i)})}while(!1)};n(),this.d(this.urlChanged.don(n))}}get typeName(){return"ESEntityCluster"}get defaultProps(){return Pr.createDefaultProps()}get widgetEvent(){return this._widgetEvent}get data(){return this._data.value}set data(e){this._data.value=e}get dataChanged(){return this._data.changed}getFeatures(){if(this._data)return this._data;console.log("数据未加载完成,请稍后重试")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Y("地址","数据Url地址",!1,!1,[this,"url"],Pr.defaults.url),new C("集合范围","用于扩展屏幕空间边界框的像素范围",!1,!1,[this,"pixelRange"],Pr.defaults.pixelRange),new C("最小数量","可以聚合的屏幕空间对象的最小数量",!1,!1,[this,"minimumClusterSize"],Pr.defaults.minimumClusterSize),new tt("高度模式","高度获取模式",!1,!1,[this,"heightReference"],Pr.defaults.heightReferences,"None")]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new Y("url","数据Url地址",!1,!1,[this,"url"],Pr.defaults.url),new C("pixelRange","用于扩展屏幕空间边界框的像素范围",!1,!1,[this,"pixelRange"],Pr.defaults.pixelRange),new C("minimumClusterSize","可以聚合的屏幕空间对象的最小数量",!1,!1,[this,"minimumClusterSize"],Pr.defaults.minimumClusterSize),new Y("style","用于设置聚合和非聚合的显示样式",!1,!1,[this,"style"],Pr.defaults.style),new tt("heightReference","高度获取模式",!1,!1,[this,"heightReference"],Pr.defaults.heightReferences)]),new H("UE","UE",[new U("perspective","是否启用透视效果,自动缩放远处标签",!1,!1,[this,"perspective"],Pr.defaults.perspective)])]}};p(Pr,"type",Pr.register("ESEntityCluster",Pr,{chsName:"Poi聚合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于聚合POI标注,提高性能。"})),p(Pr,"defaults",{...Ot.defaults,url:"",pixelRange:200,minimumClusterSize:2,style:{cluster:[{minValue:2,mode:"SquareV02",style:{}}],nonCluster:{mode:"SquareV03",style:{}}},heightReferences:[["None","None"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["CLAMP_TO_TERRAIN","CLAMP_TO_TERRAIN"]],perspective:!1});let al=Pr;(r=>{r.createDefaultProps=()=>({...Ot.createDefaultProps(),url:"",pixelRange:200,minimumClusterSize:2,style:d.reactJsonWithUndefined(void 0),heightReference:"None",perspective:!1})})(al||(al={})),d.extendClassProps(al.prototype,al.createDefaultProps);class Fh extends d.Destroyable{constructor(){super();p(this,"_player",this.disposeVar(new bi));const e=this._player;{const n=()=>{const i=(this.stopTime??0)-(this.startTime??0);e.duration=i>0?i:0};n(),this.d(this.startTimeChanged.don(n)),this.d(this.stopTimeChanged.don(n))}this.d(d.bind([e,"playing"],[this,"playing"])),this.d(d.bind([e,"loop"],[this,"loop"])),this.d(d.bind([e,"speed"],[this,"speed"])),this.d(e.currentTimeChanged.don(()=>{this.startTime!==void 0&&e.currentTime!==void 0&&(this.currentTime=e.currentTime+this.startTime)})),this.d(this.currentTimeChanged.don(()=>{if(this.currentTime===void 0||this.startTime===void 0)return;const n=this.currentTime-this.startTime;e.currentTime=d.clamp(n,0,e.duration)}))}get player(){return this._player}get ratio(){return this._player.ratio}get ratioChanged(){return this._player.ratioChanged}set ratio(e){this._player.ratio=e}}(r=>{r.createDefaultProps=()=>({...ft.createDefaultProps(),currentTime:void 0,startTime:void 0,stopTime:void 0,playing:void 0,loop:void 0,speed:void 0})})(Fh||(Fh={})),d.extendClassProps(Fh.prototype,Fh.createDefaultProps);const Fl=class Fl extends ft{constructor(e){super(e);p(this,"_absolutePlayer",this.dv(new Fh));const n=this.absolutePlayer;this.d(d.bind([n,"currentTime"],[this,"currentTime"])),this.d(d.bind([n,"startTime"],[this,"startTime"])),this.d(d.bind([n,"stopTime"],[this,"stopTime"])),this.d(d.bind([n,"playing"],[this,"playing"])),this.d(d.bind([n,"loop"],[this,"loop"])),this.d(d.bind([n,"speed"],[this,"speed"]))}get typeName(){return"ESPlayer"}get defaultProps(){return Fl.createDefaultProps()}get absolutePlayer(){return this._absolutePlayer}get ratio(){return this._absolutePlayer.ratio}get ratioChanged(){return this._absolutePlayer.ratioChanged}set ratio(e){this._absolutePlayer.ratio=e}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new Yh("播放器","播放器",[this,"playing"],[this,"ratio"],[this,"loop"]),new Gi("currentTime","currentTime",!1,!1,[this,"currentTime"]),new Gi("startTime","startTime",!1,!1,[this,"startTime"]),new Gi("stopTime","stopTime",!1,!1,[this,"stopTime"]),new U("playing","playing",!1,!1,[this,"playing"]),new U("loop","loop",!1,!1,[this,"loop"]),new C("speed","speed",!1,!1,[this,"speed"])])]}};p(Fl,"type",Fl.register("ESPlayer",Fl,{chsName:"ESPlayer",tags:["ESObjects","_ES_Impl_UE"],description:"ESPlayer"})),p(Fl,"defaults",{...ft.defaults,currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1});let As=Fl;(r=>{r.createDefaultProps=()=>({...ft.createDefaultProps(),currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1})})(As||(As={})),d.extendClassProps(As.prototype,As.createDefaultProps);function H0(r,t=!1){const e=r.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),n=e.length;if(n===0)return e;if(n===1)return(!e[0][2]===void 0||t)&&(e[0][2]=void 0),e;for(let i=1;i<n;++i){if(e[i][2]!==void 0&&!t)continue;const s=e[i-1][1],a=e[i][1],o=es(s),l=es(a),u=d.Vector.distance(o,l);if(u===0){e[i][2]=e[i-1][2];continue}const c=Lc(s,a),h=a[2]-s[2],f=Math.asin(h/u)*180/Math.PI,g=Number.isFinite(c)?c:0,m=Number.isFinite(f)?f:0;e[i][2]=[g,m,0]}return(e[0][2]===void 0||t)&&(e[0][2]=n>1?e[1][2]:void 0),e}function X0(r,t=!1){const e=r.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),n=e.length;if(n===0)return e;if(n===1)return(!e[0][2]===void 0||t)&&(e[0][2]=void 0),e;for(let i=n-2;i>=0;--i){if(e[i][2]!==void 0&&!t)continue;const s=e[i][1],a=e[i+1][1],o=es(s),l=es(a),u=d.Vector.distance(o,l);if(u===0){e[i][2]=e[i+1][2];continue}const c=Lc(s,a),h=a[2]-s[2],f=Math.asin(h/u)*180/Math.PI,g=Number.isFinite(c)?c:0,m=Number.isFinite(f)?f:0;e[i][2]=[g,m,0]}return(e[n-1][2]===void 0||t)&&(e[n-1][2]=n>1?e[n-2][2]:[0,0,0]),e}function lI(r,t=!1){const e=H0(r,t),n=X0(r,t);if(e.length!==n.length)throw new Error("p.length !== n.length");const i=e.length;for(let s=0;s<i;s++){const a=e[s][2],o=n[s][2];a===void 0&&o===void 0?e[s][2]=void 0:a===void 0?e[s][2]=o:o===void 0?e[s][2]=a:e[s][2]=xd(a,o,.5)}return e}function uI(r,t,e){let i;if(!r.timePosRots)return;const s=[],a=r.timePosRots.length;if(!(a<=2)){s.push(r.timePosRots[0]);for(let o=1;o<a-1;++o){const l=r.timePosRots[o-1][0],u=r.timePosRots[o][0],c=r.timePosRots[o+1][0],h=r.accumDistances[o-1],f=r.accumDistances[o],g=r.accumDistances[o+1];do{const m=f-h;if(m===0)continue;const _=m-(i??(t.length==1?t[0]:t[o-1]||t[t.length-1])*.5);let E=(_<0?0:_)/m;Number.isNaN(E)&&(E=0);const M=(1-E)*l+E*u,y=r.getCurrent(M);if(!y)break;s.push([M,y.position,y.rotation])}while(!1);e&&s.push(r.timePosRots[o]);do{const m=g-f;if(m===0)continue;let _=(t.length==1?t[0]:t[o-1]||t[t.length-1])*.5;const E=(t.length==1?t[0]:t[o]||t[t.length-1])*.5||0;_+E>m?(_=m*(_/(_+E)),i=m-_):i=void 0;let M=(_<0?0:_)/m;const y=(1-M)*u+M*c,w=r.getCurrent(y);if(!w)break;s.push([y,w.position,w.rotation])}while(!1)}s.push(r.timePosRots[a-1]),r.timePosRots=s}}function Y0(r,t){if(t<0)return[void 0,0];if(t>r.length-1)return[void 0,r.length-1];let e;do{if(e=r[t][2],e||t-1<0)break;--t}while(!0);return[e,t]}function J0(r,t){if(t<0)return[void 0,0];if(t>r.length-1)return[void 0,r.length-1];let e;do{if(e=r[t][2],e||t+1>=r.length)break;++t}while(!0);return[e,t]}function hI(r,t,e="Lerp"){let n,i,s,a;if(r.length!==0){do{if(t<=r[0][0]){n=r[0][1],i=r[0][2],s=0,a=0;break}else if(t>=r[r.length-1][0]){const[u,c,h]=r[r.length-1];n=c,i=h,s=r.length-2,a=1;break}const l=r.findIndex(([u])=>t<=u);if(l===-1)throw new Error("nextIndex === -1");s=l-1;{const[u,c]=r[s],[h,f]=r[l],g=(t-u)/(h-u),m=Dd(c),_=Dd(f),E=d.Vector.lerp(m,_,g);n=h0(E),a=g}{let[u,c]=Y0(r,s),[h,f]=J0(r,l);if(e==="Lerp")if(u&&h){if(c<0||f>=r.length)throw new Error("Invalid rotation index");const g=(t-r[c][0])/(r[f][0]-r[c][0]);i=xd(u,h,g)}else u?i=u:h?i=h:i=void 0;else e==="Prev"?u&&(i=u):e==="Next"&&h&&(i=h)}}while(!1);return{position:n,rotation:i,index:s,ratio:a}}}function cI(r){try{const t=JSON.parse(r);if(Array.isArray(t)&&t.length>0){const e=typeof t[0][0]=="number",n=Array.isArray(t[0][1])&&t[0][1].length===3;return e&&n?t:void 0}throw new Error("解析有问题")}catch{const e=r.split(/\n|\r\n/),n=[],i=e.length;for(let s=0;s<i;++s){const a=e[s],o=a.split(/[^0-9e\.\+\-]+/).filter(l=>l!=="").map(l=>+l);o.length<4?console.warn(`第${s+1}行数据无法解析成路径的数据, 原内容为: ${a}`):o.length<7?n.push([o[0],[o[1],o[2],o[3]],void 0]):n.push([o[0],[o[1],o[2],o[3]],[o[4],o[5],o[6]]])}return n}}function fI(r,t,e){const{timePosRots:n}=r;if(!n)throw new Error("!timePosRots");if(n.length===0)throw new Error("timePosRots.length === 0");t=Math.max(t,n[0][0]),e=Math.min(e,n[n.length-1][0]);const i=r.getCurrent(t),s=r.getCurrent(e);if(!i||!s)return;const a=[];i.ratio<1&&a.push([t,i.position,i.rotation]);for(let o=i.index+1;o<=s.index;++o)a.push(n[o]);return s.ratio>0&&a.push([e,s.position,s.rotation]),a}const dI=`
|
|
414
|
+
`},Da=class Da extends Ot{get typeName(){return"ESPoiTileset"}get defaultProps(){return Da.createDefaultProps()}constructor(t){super(t)}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new Y("路径","路径",!1,!1,[this,"url"]),new Y("poiTypes","类型为 {type: string, povit: Vector2D, widget: string, worldScale: number, hiddenDistance: number}[]",!1,!1,[this,"poiTypes"],Da.defaults.poiTypes,W0.sampleValue),new C("heightOffset","heightOffset",!1,!1,[this,"heightOffset"])])]}};p(Da,"type",Da.register("ESPoiTileset",Da,{chsName:"ESPoiTileset",tags:["ESObjects","_ES_Impl_UE"],description:"ESPoiTileset"})),p(Da,"defaults",{...Ot.defaults,poiTypes:W0.defaultValue});let nl=Da;(r=>{r.createDefaultProps=()=>({...Ot.createDefaultProps(),url:"",poiTypes:d.reactJsonWithUndefined(void 0),heightOffset:40})})(nl||(nl={})),d.extendClassProps(nl.prototype,nl.createDefaultProps);const Ll=class Ll extends ft{get typeName(){return"ESScale"}get defaultProps(){return Ll.createDefaultProps()}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new U("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"]),new tt("定位","放到屏幕的哪个位置",!1,!1,[this,"screenPosition"],[["left","left"],["right","right"]]),new se("位置","位置(bottom,right/left)",!1,!1,[this,"cssPosition"])])]}};p(Ll,"type",Ll.register("ESScale",Ll,{chsName:"比例尺",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"比例尺"})),p(Ll,"defaults",{...ft.defaults,show:!0,screenPosition:"right",cssPosition:[40,18]});let il=Ll;(r=>{r.createDefaultProps=()=>({...ft.createDefaultProps(),show:!0,screenPosition:"right",cssPosition:[40,30]})})(il||(il={})),d.extendClassProps(il.prototype,il.createDefaultProps);const mn=class mn extends At{get typeName(){return"ESGeoExtrudedPolygon"}get defaultProps(){return mn.createDefaultProps()}constructor(t){super(t),this.collision=!1}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new C("高度","高度 m",!0,!1,[this,"height"],mn.defaults.height),new C("拉伸高度","拉伸高度 m",!0,!1,[this,"extrudedHeight"],mn.defaults.extrudedHeight),new U("应用每个位置高度","应用每个位置高度",!0,!1,[this,"perPositionHeight"],mn.defaults.perPositionHeight)],style:[new H("点样式","点样式集合",[]),new U("开启","开启点样式",!1,!1,[this,"pointed"],!1),new C("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new tt("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new it("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new H("线样式","线样式集合",[]),new U("开启","开启线样式",!1,!1,[this,"stroked"],!1),new U("贴地","是否贴地",!1,!1,[this,"strokeGround"],!1),new C("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new tt("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new it("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new H("面样式","面样式集合",[]),new U("开启","开启填充样式",!1,!1,[this,"filled"],!0),new U("贴地","是否贴地",!1,!1,[this,"fillGround"],!1),new it("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1])]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new C("高度","高度 m",!0,!1,[this,"height"],mn.defaults.height),new C("拉伸高度","拉伸高度 m",!0,!1,[this,"extrudedHeight"],mn.defaults.extrudedHeight),new U("应用每个位置高度","应用每个位置高度",!0,!1,[this,"perPositionHeight"],mn.defaults.perPositionHeight)])]}};p(mn,"type",mn.register("ESGeoExtrudedPolygon",mn,{chsName:"拉升多边形体",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"拉升多边形体"})),p(mn,"supportEditingModes",[...At.supportEditingModes,vt.HeightModify]),p(mn,"defaults",{...At.defaults,height:0,extrudedHeight:10,perPositionHeight:!1});let Os=mn;(r=>{r.createDefaultProps=()=>({...At.createDefaultProps(),height:0,extrudedHeight:10,perPositionHeight:!1})})(Os||(Os={})),d.extendClassProps(Os.prototype,Os.createDefaultProps);const Rl=class Rl extends At{constructor(e){super(e);p(this,"_classification",this.dv(new _a));p(this,"_geoExtrudedPolygon",this.dv(new Os));p(this,"combinationClass",!0);this.mainClass=this._geoExtrudedPolygon,this.classification.parentID=this.id,this.geoExtrudedPolygon.parentID=this.id,this.d(this.components.disposableAdd(this._classification)),this.d(this.components.disposableAdd(this._geoExtrudedPolygon));{const{_classification:n,_geoExtrudedPolygon:i}=this;i.perPositionHeight=!0,this.d(d.track([n,"collision"],[this,"collision"])),this.d(d.track([i,"collision"],[this,"collision"])),this.d(d.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(d.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(d.bind([i,"points"],[this,"points"])),this.d(d.bind([i,"extrudedHeight"],[this,"height"])),this.d(d.bind([n,"fillColor"],[this,"overheightColor"])),this.d(d.bind([i,"fillColor"],[this,"standardColor"]));{const s=()=>{const{height:o,points:l,maxHeight:u}=this;if(!l)return;const c=l.map(h=>[h[0],h[1],o]);n.points=c,n.height=u-o,u-o<=0?n.show=!1:n.show=this.show&&this.filled};s();const a=this.dv(d.createNextAnimateFrameEvent(this.heightChanged,this.pointsChanged,this.maxHeightChanged));this.d(a.don(s))}{const s=()=>{const{show:o,filled:l}=this;n.show=o&&l,i.show=o&&l};s();const a=this.dv(d.createNextAnimateFrameEvent(this.showChanged,this.filledChanged));this.d(a.don(s))}this.dispose(this.flyInEvent.don(s=>{i.flyIn(s)})),this.dispose(this.flyToEvent.don(s=>{i.flyTo(s)})),this.dispose(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.dispose(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get typeName(){return"ESHeightLimitAnalysis"}get defaultProps(){return Rl.createDefaultProps()}get classification(){return this._classification}get geoExtrudedPolygon(){return this._geoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new C("高度","控高的高度",!1,!1,[this,"height"],10),new C("最高高度","最高高度",!1,!1,[this,"maxHeight"],200),new it("超高颜色","超高颜色",!1,!1,[this,"overheightColor"],[1,0,0,.5]),new it("标准颜色","标准颜色",!1,!1,[this,"standardColor"],[0,1,0,.5])],style:[new H("点样式","点样式集合",[]),new U("开启","开启点样式",!1,!1,[this,"pointed"],!1),new C("点大小","点大小(pointSize)",!1,!1,[this,"pointSize"],1),new tt("点类型","点类型(pointSizeType)",!1,!1,[this,"pointSizeType"],[["screen","screen"],["world","world"]],"screen"),new it("点颜色","点颜色(pointColor)",!1,!1,[this,"pointColor"],[1,1,1,1]),new H("线样式","线样式集合",[]),new U("开启","开启线样式",!1,!1,[this,"stroked"],!1),new U("贴地","是否贴地",!1,!1,[this,"strokeGround"],!1),new C("线宽","线宽(strokeWidth)",!1,!1,[this,"strokeWidth"],1),new tt("线类型","线类型(strokeWidthType)",!1,!1,[this,"strokeWidthType"],[["screen","screen"],["world","world"]],"screen"),new it("线颜色","线颜色(strokeColor)",!1,!1,[this,"strokeColor"],[1,1,1,1]),new H("面样式","面样式集合",[]),new U("开启","开启填充样式",!1,!1,[this,"filled"],!0),new U("贴地","是否贴地",!1,!1,[this,"fillGround"],!1),new it("填充颜色","填充颜色(fillColor)",!1,!1,[this,"fillColor"],[1,1,1,1])]}}getProperties(e){return[...super.getProperties(e),new C("高度","控高的高度",!1,!1,[this,"height"],10),new C("最高高度","最高高度",!1,!1,[this,"maxHeight"],200),new it("超高颜色","超高颜色",!1,!1,[this,"overheightColor"],[1,0,0,.5]),new it("标准颜色","标准颜色",!1,!1,[this,"standardColor"],[0,1,0,.5])]}};p(Rl,"type",Rl.register("ESHeightLimitAnalysis",Rl,{chsName:"控高分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"控高分析对象"})),p(Rl,"supportEditingModes",[...At.supportEditingModes,vt.HeightModify]);let sl=Rl;(r=>{r.createDefaultProps=()=>({height:10,maxHeight:200,overheightColor:[1,0,0,.5],standardColor:[0,1,0,.5],...At.createDefaultProps()})})(sl||(sl={})),d.extendClassProps(sl.prototype,sl.createDefaultProps);const Sr=class Sr extends Ot{constructor(e){super(e);p(this,"_widgetEvent",this.dv(new d.Event));p(this,"_data",this.dv(d.react(void 0)));{const n=()=>{if(this.url)do{if(typeof this.url=="object"){this.data=this.url;break}if(q0(this.url)){this.data=JSON.parse(this.url);break}fetch(ft.context.getStrFromEnv(this.url)).then(i=>i.json()).then(i=>{this.data=i}).catch(i=>{console.warn("ESEntityCluster数据加载失败",i)})}while(!1)};n(),this.d(this.urlChanged.don(n))}}get typeName(){return"ESEntityCluster"}get defaultProps(){return Sr.createDefaultProps()}get widgetEvent(){return this._widgetEvent}get data(){return this._data.value}set data(e){this._data.value=e}get dataChanged(){return this._data.changed}getFeatures(){if(this._data)return this._data;console.log("数据未加载完成,请稍后重试")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Y("地址","数据Url地址",!1,!1,[this,"url"],Sr.defaults.url),new C("集合范围","用于扩展屏幕空间边界框的像素范围",!1,!1,[this,"pixelRange"],Sr.defaults.pixelRange),new C("最小数量","可以聚合的屏幕空间对象的最小数量",!1,!1,[this,"minimumClusterSize"],Sr.defaults.minimumClusterSize),new tt("高度模式","高度获取模式",!1,!1,[this,"heightReference"],Sr.defaults.heightReferences,"None")]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new Y("url","数据Url地址",!1,!1,[this,"url"],Sr.defaults.url),new C("pixelRange","用于扩展屏幕空间边界框的像素范围",!1,!1,[this,"pixelRange"],Sr.defaults.pixelRange),new C("minimumClusterSize","可以聚合的屏幕空间对象的最小数量",!1,!1,[this,"minimumClusterSize"],Sr.defaults.minimumClusterSize),new Y("style","用于设置聚合和非聚合的显示样式",!1,!1,[this,"style"],Sr.defaults.style),new tt("heightReference","高度获取模式",!1,!1,[this,"heightReference"],Sr.defaults.heightReferences)]),new H("UE","UE",[new U("perspective","是否启用透视效果,自动缩放远处标签",!1,!1,[this,"perspective"],Sr.defaults.perspective)])]}};p(Sr,"type",Sr.register("ESEntityCluster",Sr,{chsName:"Poi聚合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于聚合POI标注,提高性能。"})),p(Sr,"defaults",{...Ot.defaults,url:"",pixelRange:200,minimumClusterSize:2,style:{cluster:[{minValue:2,mode:"SquareV02",style:{}}],nonCluster:{mode:"SquareV03",style:{}}},heightReferences:[["None","None"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["CLAMP_TO_TERRAIN","CLAMP_TO_TERRAIN"]],perspective:!1});let al=Sr;(r=>{r.createDefaultProps=()=>({...Ot.createDefaultProps(),url:"",pixelRange:200,minimumClusterSize:2,style:d.reactJsonWithUndefined(void 0),heightReference:"None",perspective:!1})})(al||(al={})),d.extendClassProps(al.prototype,al.createDefaultProps);class Fh extends d.Destroyable{constructor(){super();p(this,"_player",this.disposeVar(new bi));const e=this._player;{const n=()=>{const i=(this.stopTime??0)-(this.startTime??0);e.duration=i>0?i:0};n(),this.d(this.startTimeChanged.don(n)),this.d(this.stopTimeChanged.don(n))}this.d(d.bind([e,"playing"],[this,"playing"])),this.d(d.bind([e,"loop"],[this,"loop"])),this.d(d.bind([e,"speed"],[this,"speed"])),this.d(e.currentTimeChanged.don(()=>{this.startTime!==void 0&&e.currentTime!==void 0&&(this.currentTime=e.currentTime+this.startTime)})),this.d(this.currentTimeChanged.don(()=>{if(this.currentTime===void 0||this.startTime===void 0)return;const n=this.currentTime-this.startTime;e.currentTime=d.clamp(n,0,e.duration)}))}get player(){return this._player}get ratio(){return this._player.ratio}get ratioChanged(){return this._player.ratioChanged}set ratio(e){this._player.ratio=e}}(r=>{r.createDefaultProps=()=>({...ft.createDefaultProps(),currentTime:void 0,startTime:void 0,stopTime:void 0,playing:void 0,loop:void 0,speed:void 0})})(Fh||(Fh={})),d.extendClassProps(Fh.prototype,Fh.createDefaultProps);const Fl=class Fl extends ft{constructor(e){super(e);p(this,"_absolutePlayer",this.dv(new Fh));const n=this.absolutePlayer;this.d(d.bind([n,"currentTime"],[this,"currentTime"])),this.d(d.bind([n,"startTime"],[this,"startTime"])),this.d(d.bind([n,"stopTime"],[this,"stopTime"])),this.d(d.bind([n,"playing"],[this,"playing"])),this.d(d.bind([n,"loop"],[this,"loop"])),this.d(d.bind([n,"speed"],[this,"speed"]))}get typeName(){return"ESPlayer"}get defaultProps(){return Fl.createDefaultProps()}get absolutePlayer(){return this._absolutePlayer}get ratio(){return this._absolutePlayer.ratio}get ratioChanged(){return this._absolutePlayer.ratioChanged}set ratio(e){this._absolutePlayer.ratio=e}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new Yh("播放器","播放器",[this,"playing"],[this,"ratio"],[this,"loop"]),new Gi("currentTime","currentTime",!1,!1,[this,"currentTime"]),new Gi("startTime","startTime",!1,!1,[this,"startTime"]),new Gi("stopTime","stopTime",!1,!1,[this,"stopTime"]),new U("playing","playing",!1,!1,[this,"playing"]),new U("loop","loop",!1,!1,[this,"loop"]),new C("speed","speed",!1,!1,[this,"speed"])])]}};p(Fl,"type",Fl.register("ESPlayer",Fl,{chsName:"ESPlayer",tags:["ESObjects","_ES_Impl_UE"],description:"ESPlayer"})),p(Fl,"defaults",{...ft.defaults,currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1});let As=Fl;(r=>{r.createDefaultProps=()=>({...ft.createDefaultProps(),currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1})})(As||(As={})),d.extendClassProps(As.prototype,As.createDefaultProps);function H0(r,t=!1){const e=r.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),n=e.length;if(n===0)return e;if(n===1)return(!e[0][2]===void 0||t)&&(e[0][2]=void 0),e;for(let i=1;i<n;++i){if(e[i][2]!==void 0&&!t)continue;const s=e[i-1][1],a=e[i][1],o=es(s),l=es(a),u=d.Vector.distance(o,l);if(u===0){e[i][2]=e[i-1][2];continue}const c=Lc(s,a),h=a[2]-s[2],f=Math.asin(h/u)*180/Math.PI,g=Number.isFinite(c)?c:0,m=Number.isFinite(f)?f:0;e[i][2]=[g,m,0]}return(e[0][2]===void 0||t)&&(e[0][2]=n>1?e[1][2]:void 0),e}function X0(r,t=!1){const e=r.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),n=e.length;if(n===0)return e;if(n===1)return(!e[0][2]===void 0||t)&&(e[0][2]=void 0),e;for(let i=n-2;i>=0;--i){if(e[i][2]!==void 0&&!t)continue;const s=e[i][1],a=e[i+1][1],o=es(s),l=es(a),u=d.Vector.distance(o,l);if(u===0){e[i][2]=e[i+1][2];continue}const c=Lc(s,a),h=a[2]-s[2],f=Math.asin(h/u)*180/Math.PI,g=Number.isFinite(c)?c:0,m=Number.isFinite(f)?f:0;e[i][2]=[g,m,0]}return(e[n-1][2]===void 0||t)&&(e[n-1][2]=n>1?e[n-2][2]:[0,0,0]),e}function lI(r,t=!1){const e=H0(r,t),n=X0(r,t);if(e.length!==n.length)throw new Error("p.length !== n.length");const i=e.length;for(let s=0;s<i;s++){const a=e[s][2],o=n[s][2];a===void 0&&o===void 0?e[s][2]=void 0:a===void 0?e[s][2]=o:o===void 0?e[s][2]=a:e[s][2]=xd(a,o,.5)}return e}function uI(r,t,e){let i;if(!r.timePosRots)return;const s=[],a=r.timePosRots.length;if(!(a<=2)){s.push(r.timePosRots[0]);for(let o=1;o<a-1;++o){const l=r.timePosRots[o-1][0],u=r.timePosRots[o][0],c=r.timePosRots[o+1][0],h=r.accumDistances[o-1],f=r.accumDistances[o],g=r.accumDistances[o+1];do{const m=f-h;if(m===0)continue;const _=m-(i??(t.length==1?t[0]:t[o-1]||t[t.length-1])*.5);let E=(_<0?0:_)/m;Number.isNaN(E)&&(E=0);const M=(1-E)*l+E*u,y=r.getCurrent(M);if(!y)break;s.push([M,y.position,y.rotation])}while(!1);e&&s.push(r.timePosRots[o]);do{const m=g-f;if(m===0)continue;let _=(t.length==1?t[0]:t[o-1]||t[t.length-1])*.5;const E=(t.length==1?t[0]:t[o]||t[t.length-1])*.5||0;_+E>m?(_=m*(_/(_+E)),i=m-_):i=void 0;let M=(_<0?0:_)/m;const y=(1-M)*u+M*c,w=r.getCurrent(y);if(!w)break;s.push([y,w.position,w.rotation])}while(!1)}s.push(r.timePosRots[a-1]),r.timePosRots=s}}function Y0(r,t){if(t<0)return[void 0,0];if(t>r.length-1)return[void 0,r.length-1];let e;do{if(e=r[t][2],e||t-1<0)break;--t}while(!0);return[e,t]}function J0(r,t){if(t<0)return[void 0,0];if(t>r.length-1)return[void 0,r.length-1];let e;do{if(e=r[t][2],e||t+1>=r.length)break;++t}while(!0);return[e,t]}function hI(r,t,e="Lerp"){let n,i,s,a;if(r.length!==0){do{if(t<=r[0][0]){n=r[0][1],i=r[0][2],s=0,a=0;break}else if(t>=r[r.length-1][0]){const[u,c,h]=r[r.length-1];n=c,i=h,s=r.length-2,a=1;break}const l=r.findIndex(([u])=>t<=u);if(l===-1)throw new Error("nextIndex === -1");s=l-1;{const[u,c]=r[s],[h,f]=r[l],g=(t-u)/(h-u),m=Dd(c),_=Dd(f),E=d.Vector.lerp(m,_,g);n=h0(E),a=g}{let[u,c]=Y0(r,s),[h,f]=J0(r,l);if(e==="Lerp")if(u&&h){if(c<0||f>=r.length)throw new Error("Invalid rotation index");const g=(t-r[c][0])/(r[f][0]-r[c][0]);i=xd(u,h,g)}else u?i=u:h?i=h:i=void 0;else e==="Prev"?u&&(i=u):e==="Next"&&h&&(i=h)}}while(!1);return{position:n,rotation:i,index:s,ratio:a}}}function cI(r){try{const t=JSON.parse(r);if(Array.isArray(t)&&t.length>0){const e=typeof t[0][0]=="number",n=Array.isArray(t[0][1])&&t[0][1].length===3;return e&&n?t:void 0}throw new Error("解析有问题")}catch{const e=r.split(/\n|\r\n/),n=[],i=e.length;for(let s=0;s<i;++s){const a=e[s],o=a.split(/[^0-9e\.\+\-]+/).filter(l=>l!=="").map(l=>+l);o.length<4?console.warn(`第${s+1}行数据无法解析成路径的数据, 原内容为: ${a}`):o.length<7?n.push([o[0],[o[1],o[2],o[3]],void 0]):n.push([o[0],[o[1],o[2],o[3]],[o[4],o[5],o[6]]])}return n}}function fI(r,t,e){const{timePosRots:n}=r;if(!n)throw new Error("!timePosRots");if(n.length===0)throw new Error("timePosRots.length === 0");t=Math.max(t,n[0][0]),e=Math.min(e,n[n.length-1][0]);const i=r.getCurrent(t),s=r.getCurrent(e);if(!i||!s)return;const a=[];i.ratio<1&&a.push([t,i.position,i.rotation]);for(let o=i.index+1;o<=s.index;++o)a.push(n[o]);return s.ratio>0&&a.push([e,s.position,s.rotation]),a}const dI=`
|
|
415
415
|
timePosRots是一个内部包含三个元素的数组,第一个表示时间戳,单位毫秒,第二个表示经纬度,第三个表示姿态(偏航、俯仰、翻转)。示例代码如下:
|
|
416
416
|
\`\`\`
|
|
417
417
|
[
|
|
@@ -456,7 +456,7 @@ timePosRots是一个内部包含三个元素的数组,第一个表示时间戳
|
|
|
456
456
|
]
|
|
457
457
|
]
|
|
458
458
|
\`\`\`
|
|
459
|
-
`,Br=class Br extends d.Destroyable{constructor(e,n){super();p(this,"_scratchCurrentInfo",{position:[0,0,0],rotation:[0,0,0],index:0});p(this,"_currentInfo",this.disposeVar(d.react(void 0,(e,n)=>!1)));p(this,"_player");p(this,"_flyToEvent",this.disposeVar(new d.Event));p(this,"_accumDistancesChanged",this.disposeVar(new d.Event));p(this,"_accumDistancesChangedInit",this.dispose(this.timePosRotsChanged.disposableOn(()=>(this._accumDistancesDirty=!0,this._accumDistancesChanged.emit()))));p(this,"_accumDistancesDirty",!1);p(this,"_accumDistances",[]);p(this,"_getCurrentFunc",this.disposeVar(d.react(void 0)));this._player=this.disposeVar(new bi);const i=()=>{const s=this.getCurrent(this.currentTime??0);if(s===void 0)this._currentInfo.value=void 0;else{const{index:a,position:o,rotation:l,ratio:u}=s;this._scratchCurrentInfo.index=a,this._scratchCurrentInfo.position=o,this._scratchCurrentInfo.rotation=l,this._scratchCurrentInfo.ratio=u,this._currentInfo.value=this._scratchCurrentInfo}};i(),this.currentTimeChanged.disposableOn(i),this.timePosRotsChanged.disposableOn(i),this.rotLerpModeChanged.disposableOn(i),this.dispose(d.bind([this._player,"loop"],[this,"loop"]));{const s=()=>{if(this.startTime===void 0||this.currentTime===void 0)return;const a=this.currentTime-this.startTime;(this._player.currentTime===void 0||Math.abs(a-this._player.currentTime)>.01)&&(this._player.currentTime=a)};s(),this.dispose(this.currentTimeChanged.disposableOn(s))}{const s=()=>{if(this.startTime===void 0||this._player.currentTime===void 0)return;const a=this._player.currentTime+this.startTime;(this.currentTime===void 0||Math.abs(a-this.currentTime)>.01)&&(this.currentTime=a)};s(),this.dispose(this._player.currentTimeChanged.disposableOn(s))}this.dispose(d.bind([this._player,"duration"],[this,"duration"])),this.dispose(d.bind([this._player,"playing"],[this,"playing"])),this.dispose(d.bind([this._player,"speed"],[this,"speed"]));{const s=()=>{(this.autoComputeTimeFromTimePosRots??!0)&&this.computeTimeFromTimePosRots()};s();const a=this.disposeVar(d.createNextAnimateFrameEvent(this.autoComputeTimeFromTimePosRotsChanged,this.timePosRotsChanged));this.dispose(a.disposableOn(s))}{const s=()=>{const a=this.timePosRots;if(!a)return;let o=0;const l=a.length;for(let u=0;u<l;++u){const c=a[u][0];if(c<0)console.warn("地理路径的时间戳不能小于0!");else if(c<o){console.warn(`地理路径的时间戳需要满足从小到大的数据,元素越靠后,时间越靠后!当前不满足条件的元素是index: ${u} time: ${c}`);break}}};s(),this.dispose(this.timePosRotsChanged.disposableOn(s))}{const s=this.disposeVar(d.createProcessingFromAsyncFunc(async a=>{if(!this.dataUri)return;await a.promise(d.sleep(1e3));const o=await a.promise(fetch(this.dataUri)),l=await a.promise(o.text());this.timePosRots=Br.parseData(l)}));this.dispose(this.dataUriChanged.disposableOn(()=>{s.restart()})),this.dispose(this.dataTextChanged.disposableOn(()=>{this.dataText&&(this.timePosRots=Br.parseData(this.dataText))}))}}get currentInfo(){return this._currentInfo.value}get currentInfoChanged(){return this._currentInfo.changed}get currentIndex(){return this._currentInfo.value&&this._currentInfo.value.index}get currentIndexChanged(){return this._currentInfo.changed}get currentPosition(){return this._currentInfo.value&&this._currentInfo.value.position}get currentPositionChanged(){return this._currentInfo.changed}get currentRotation(){return this._currentInfo.value&&this._currentInfo.value.rotation}get currentRotationChanged(){return this._currentInfo.changed}get player(){return this._player}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get accumDistancesChanged(){return this._accumDistancesChanged}get accumDistances(){do{if(!this._accumDistancesDirty)break;if(!this.timePosRots||this.timePosRots.length<2){this._accumDistances=[];break}const e=this.timePosRots.length;let n=0;const i=[];let s=es(this.timePosRots[0][1]);i.push(n);for(let a=1;a<e;++a){const o=es(this.timePosRots[a][1]),l=d.Vector.distance(o,s);s=o,n+=l,i.push(n)}this._accumDistances=i}while(!1);return this._accumDistances}get totalDistanceChanged(){return this._accumDistancesChanged}get totalDistance(){return this.accumDistances.length>0?this.accumDistances[this.accumDistances.length-1]:0}getCurrent(e){return this.getCurrentFunc?this.getCurrentFunc(e,this):this.timePosRots&&hI(this.timePosRots,e,this.rotLerpMode)}subPath(e,n){return this.timePosRots&&fI(this,e,n)}computeRotIfUndefinedUsingPrevLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=Br.computeRotIfUndefinedUsingPrevLine(this.timePosRots,e)}computeRotIfUndefinedUsingNextLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=Br.computeRotIfUndefinedUsingNextLine(this.timePosRots,e)}computeRotIfUndefinedUsingLerp(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=Br.computeRotIfUndefinedUsingLerp(this.timePosRots,e)}computeRotIfUndefined(e=!1){this.computeRotIfUndefinedUsingPrevLine(e)}addAroundPoints(e,n){uI(this,e,n)}get getCurrentFunc(){return this._getCurrentFunc.value}set getCurrentFunc(e){this._getCurrentFunc.value=e}get getCurrentFuncChanged(){return this._getCurrentFunc.changed}computeTimeFromTimePosRots(){const e=this.timePosRots;if(!e||e.length<=1){this.startTime=void 0,this.stopTime=void 0,this.duration=void 0;return}this.startTime=e[0][0],this.stopTime=e[e.length-1][0],this.duration=this.stopTime-this.startTime}get ratio(){return this.player.ratio}set ratio(e){this.player.ratio=e}get ratioChanged(){return this.player.ratioChanged}};p(Br,"computeRotIfUndefinedUsingPrevLine",H0),p(Br,"computeRotIfUndefinedUsingNextLine",X0),p(Br,"computeRotIfUndefinedUsingLerp",lI),p(Br,"getLeftRotation",Y0),p(Br,"getRightRotation",J0),p(Br,"parseData",cI),p(Br,"defaults",{timePosRots:[],startTime:0,stopTime:3e3,loop:!1,duration:3e3,playing:!1,dataText:""}),p(Br,"timePosRotsMd",dI);let Ea=Br;(r=>{r.createDefaultProps=()=>({show:!1,currentPoiShow:!0,timePosRots:d.reactDeepArrayWithUndefined(void 0,(t,e)=>t[0]===e[0]&&t[1].every((n,i)=>n===e[1][i])&&t[2]===e[2]===void 0||t[2]!==void 0&&e[2]!==void 0&&t[2].every((n,i)=>e[2][i]),t=>[t[0],[...t[1]],t[2]&&[...t[2]]||void 0]),autoComputeTimeFromTimePosRots:!0,leadTime:0,trailTime:0,startTime:void 0,stopTime:void 0,loop:!1,currentTime:0,duration:void 0,speed:1,playing:!1,polylineShow:!0,width:1,ground:!1,color:d.reactArray([1,1,1,1]),hasDash:!1,gapColor:d.reactArray([0,0,0,0]),dashLength:16,dashPattern:255,hasArrow:!1,depthTest:!1,arcType:"GEODESIC",allowPicking:!1,dataUri:"",dataText:void 0,rotLerpMode:"Lerp",debug:!1})})(Ea||(Ea={})),d.extendClassProps(Ea.prototype,Ea.createDefaultProps);const Ws=class Ws extends hn{constructor(e){super(e);p(this,"_path");p(this,"_currentPositionChanged",this.disposeVar(new d.Event));p(this,"_currentRotationChanged",this.disposeVar(new d.Event));p(this,"_currentChanged",this.disposeVar(new d.Event));p(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);p(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());this.strokeStyle={width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1},this._path=this.disposeVar(new Ea),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentPositionChanged.emit(this._path.currentPosition))),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentRotationChanged.emit(this.currentRotation))),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentChanged.emit(this.current))),this._path.show=!0,this._path.polylineShow=!1,this._path.currentPoiShow=!1;{const n=()=>{if(!this.timeStamps||!this.points){this._path.timePosRots=void 0;return}const s=this.timeStamps.length,a=this.points.length,o=Math.min(s,a),l=[];for(let u=0;u<o;++u)l.push([this.timeStamps[u],this.points[u]]);this._path.timePosRots=l,this.rotationRadius.some(u=>u>0)?(this._path.addAroundPoints(this.rotationRadius,!0),this._path.computeRotIfUndefinedUsingLerp(!0),this._path.rotLerpMode="Lerp"):(this._path.computeRotIfUndefinedUsingPrevLine(!0),this._path.rotLerpMode="Next")},i=this.disposeVar(d.createNextAnimateFrameEvent(this.timeStampsChanged,this.pointsChanged,this.rotationRadiusChanged));n(),this.dispose(i.disposableOn(n))}}get typeName(){return"ESPath"}get defaultProps(){return Ws.createDefaultProps()}get path(){return this._path}get currentPosition(){return this._path.currentPosition}get currentPositionChanged(){return this._currentPositionChanged}get currentRotation(){const e=this._path.currentRotation;if(e)return[Tu(e[0]-90),e[1],e[2]]}get currentRotationChanged(){return this._currentRotationChanged}get current(){return{position:this.currentPosition,rotation:this.currentRotation}}get currentChanged(){return this._currentChanged}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new pf("时间序列","时间序列",!0,!1,[this,"timeStamps"],[]),new C("线条流速","速度 m/s",!1,!1,[this,"speed"],1),new tt("模式","materialMode",!1,!1,[this,"materialMode"],Ws.defaults.materialModes,"singleArrow"),new Y("拐弯半径","拐弯半径,单位米",!1,!1,[this,"rotationRadius"])]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new pf("时间序列","时间序列",!0,!1,[this,"timeStamps"],[]),new Qe("当前位置","当前位置",!0,!0,[this,"currentPosition"]),new C("速度","速度 m/s",!1,!1,[this,"speed"]),new tt("materialMode","materialMode",!1,!1,[this,"materialMode"],Ws.defaults.materialModes),new Y("拐弯半径","拐弯半径,单位米",!1,!1,[this,"rotationRadius"],[5])])]}};p(Ws,"type",Ws.register("ESPath",Ws,{chsName:"ESPath",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPath"})),p(Ws,"defaults",{...Et.defaults,materialModes:[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","pureColor"]]});let Ls=Ws;(r=>{r.createDefaultProps=()=>({...Et.createDefaultProps(),timeStamps:d.reactArrayWithUndefined(void 0),speed:1,materialMode:"singleArrow",stroked:!0,strokeStyle:d.reactJson({width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1}),rotationRadius:[5]})})(Ls||(Ls={})),d.extendClassProps(Ls.prototype,Ls.createDefaultProps);const Hs=class Hs extends ${get typeName(){return"ESGeoDivTextPoi"}get defaultProps(){return Hs.createDefaultProps()}constructor(t){super(t)}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new U("文本编辑交互","文本编辑交互.",!1,!1,[this,"textEditingInteraction"]),new U("文本编辑","文本编辑.",!1,!1,[this,"textEditing"]),new C("宽度","宽度",!0,!1,[this,"width"],Hs.defaults.width),new Xh("内容","内容",!0,!1,[this,"text"],Hs.defaults.text),new Rr("原点比例和偏移","原点比例和偏移.",!1,!1,[this,"originRatioAndOffset"]),new C("透明度","透明度",!1,!1,[this,"opacity"]),new C("字体大小","字体大小",!1,!1,[this,"fontSize"]),new it("字体颜色"," 字体颜色.",!1,!1,[this,"color"]),new it("背景颜色"," 背景颜色.",!1,!1,[this,"backgroundColor"]),new Rr("内边距","上,右,下,左顺序.",!1,!1,[this,"padding"]),new Rr("边框圆角","左上,右上,右下,左下.",!1,!1,[this,"borderRadius"]),new it("边框颜色"," 边框色.",!1,!1,[this,"borderColor"]),new C("边框宽度","边框宽度",!1,!1,[this,"borderWidth"]),new tt("文字位置","文字位置",!1,!1,[this,"textAlign"],[["center","center"],["left","left"],["right","right"]]),new tt("边框类型","边框类型",!1,!1,[this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]])])]}};p(Hs,"type",Hs.register("ESGeoDivTextPoi",Hs,{chsName:"图标点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"图标点"})),p(Hs,"defaults",{...$.defaults,allowTextEditing:!0,width:80,text:"请输入文字",originRatioAndOffset:[.5,1,0,0],opacity:1,fontSize:14,color:[1,1,1,1],backgroundColor:[0,0,0,.8],padding:[5,5,5,5],borderRadius:[6,6,6,6],borderColor:[1,1,1,1],borderWidth:0,textAlign:"left",borderStyle:"solid"});let ol=Hs;(r=>{r.createDefaultProps=()=>({text:void 0,width:void 0,textEditingInteraction:!1,textEditing:!1,originRatioAndOffset:d.reactArray([.5,1,0,0]),opacity:1,fontSize:14,textAlign:"left",color:d.reactArray([1,1,1,1]),backgroundColor:d.reactArray([0,0,0,.8]),padding:d.reactArray([5,5,5,5]),borderRadius:d.reactArray([6,6,6,6]),borderWidth:0,borderColor:d.reactArray([1,1,1,1]),borderStyle:"solid",...$.createDefaultProps()})})(ol||(ol={})),d.extendClassProps(ol.prototype,ol.createDefaultProps);const Ru=class Ru extends ${get typeName(){return"ESCityBasePoint"}get defaultProps(){return{...Ru.createDefaultProps()}}constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new it("颜色","颜色",!1,!1,[this,"color"],[1,1,0,1])]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new it("颜色","颜色",!1,!1,[this,"color"])])]}};p(Ru,"type",Ru.register("ESCityBasePoint",Ru,{chsName:"城市基点(Czm)",tags:["ESObjects","CityObjects","_ES_Impl_Cesium"],description:"城市基点(Czm)"}));let ll=Ru;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),color:d.reactArray([1,1,0,1])})})(ll||(ll={})),d.extendClassProps(ll.prototype,ll.createDefaultProps);const pI=[{id:"document",version:"1.0"},{id:"Vehicle",availability:"2012-08-04T16:00:00Z/2012-08-04T16:14:15.251Z",billboard:{eyeOffset:{cartesian:[0,0,0]},horizontalOrigin:"CENTER",image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEISURBVEhLvVXBDYQwDOuojHKj8LhBbpTbpBCEkZsmIVTXq1RVQGrHiWlLmTTqPiZBlyLgy/KSZQ5JSHDQ/mCYCsC8106kDU0AdwRnvYZArWRcAl0dcYJq1hWCb3hBrumbDAVMwAC82WoRvgMnVMDBnB0nYZFTbE6BBvdUGqVqCbjBIk3PyFFR/NU7EKzru+qZsau3ryPwwCRLKYOzutZuCL6fUmWeJGzNzL/RxAMrUmASSCkkAayk2IxPlwhAAYGpsiHQjbLccfdOY5gKkCXAMi7SscAwbQpAnKyctWyUZ6z8ja3OGMepwD8asz+9FnSvbhU8uVOHFIwQsI3/p0CfhuqCSQuxLqsN6mu8SS+N42MAAAAASUVORK5CYII=",pixelOffset:{cartesian2:[0,0]},scale:.8333333333333334,show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}],verticalOrigin:"BOTTOM"},label:{fillColor:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",rgba:[255,255,0,255]}],font:"bold 10pt Segoe UI Semibold",horizontalOrigin:"LEFT",outlineColor:{rgba:[0,0,0,255]},pixelOffset:{cartesian2:[10,0]},scale:1,show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}],style:"FILL",text:"Vehicle",verticalOrigin:"CENTER"},path:{material:{solidColor:{color:{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",rgba:[255,255,0,255]}}},width:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",number:5}],show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}]},position:{interpolationAlgorithm:"LAGRANGE",interpolationDegree:1,epoch:"2012-08-04T16:00:00Z",cartesian:[0,-23797546637012e-7,-466533288013588e-8,362813368924173e-8,100,-237951008905552e-8,-466541964840452e-8,362818220006795e-8,200,-23795684769522e-7,-46655553441867e-7,362797083323261e-8,300,-237963893786855e-8,-466569163561896e-8,362775082085873e-8,400,-237970929834665e-8,-46658279679646e-7,362753080187124e-8,500,-237983728064915e-8,-46658477494347e-7,362742212874017e-8,600,-237962498289073e-8,-466590750853722e-8,36274841191848e-7,700,-237938612743523e-8,-466602954174431e-8,362748383297459e-8,800,-237914726777171e-8,-466615156669944e-8,36274835403492e-7,900,-237890840390057e-8,-466627358340244e-8,362748324130864e-8,1e3]}}],gI=`第一个packet代表了cesium场景(cesium时间轴的范围,当前时刻,倍速等信息)之外,其他的packet都可以理解为描述某一时间范围内的entity的行为。
|
|
459
|
+
`,Br=class Br extends d.Destroyable{constructor(e,n){super();p(this,"_scratchCurrentInfo",{position:[0,0,0],rotation:[0,0,0],index:0});p(this,"_currentInfo",this.disposeVar(d.react(void 0,(e,n)=>!1)));p(this,"_player");p(this,"_flyToEvent",this.disposeVar(new d.Event));p(this,"_accumDistancesChanged",this.disposeVar(new d.Event));p(this,"_accumDistancesChangedInit",this.dispose(this.timePosRotsChanged.disposableOn(()=>(this._accumDistancesDirty=!0,this._accumDistancesChanged.emit()))));p(this,"_accumDistancesDirty",!1);p(this,"_accumDistances",[]);p(this,"_getCurrentFunc",this.disposeVar(d.react(void 0)));this._player=this.disposeVar(new bi);const i=()=>{const s=this.getCurrent(this.currentTime??0);if(s===void 0)this._currentInfo.value=void 0;else{const{index:a,position:o,rotation:l,ratio:u}=s;this._scratchCurrentInfo.index=a,this._scratchCurrentInfo.position=o,this._scratchCurrentInfo.rotation=l,this._scratchCurrentInfo.ratio=u,this._currentInfo.value=this._scratchCurrentInfo}};i(),this.currentTimeChanged.disposableOn(i),this.timePosRotsChanged.disposableOn(i),this.rotLerpModeChanged.disposableOn(i),this.dispose(d.bind([this._player,"loop"],[this,"loop"]));{const s=()=>{if(this.startTime===void 0||this.currentTime===void 0)return;const a=this.currentTime-this.startTime;(this._player.currentTime===void 0||Math.abs(a-this._player.currentTime)>.01)&&(this._player.currentTime=a)};s(),this.dispose(this.currentTimeChanged.disposableOn(s))}{const s=()=>{if(this.startTime===void 0||this._player.currentTime===void 0)return;const a=this._player.currentTime+this.startTime;(this.currentTime===void 0||Math.abs(a-this.currentTime)>.01)&&(this.currentTime=a)};s(),this.dispose(this._player.currentTimeChanged.disposableOn(s))}this.dispose(d.bind([this._player,"duration"],[this,"duration"])),this.dispose(d.bind([this._player,"playing"],[this,"playing"])),this.dispose(d.bind([this._player,"speed"],[this,"speed"]));{const s=()=>{(this.autoComputeTimeFromTimePosRots??!0)&&this.computeTimeFromTimePosRots()};s();const a=this.disposeVar(d.createNextAnimateFrameEvent(this.autoComputeTimeFromTimePosRotsChanged,this.timePosRotsChanged));this.dispose(a.disposableOn(s))}{const s=()=>{const a=this.timePosRots;if(!a)return;let o=0;const l=a.length;for(let u=0;u<l;++u){const c=a[u][0];if(c<0)console.warn("地理路径的时间戳不能小于0!");else if(c<o){console.warn(`地理路径的时间戳需要满足从小到大的数据,元素越靠后,时间越靠后!当前不满足条件的元素是index: ${u} time: ${c}`);break}}};s(),this.dispose(this.timePosRotsChanged.disposableOn(s))}{const s=this.disposeVar(d.createProcessingFromAsyncFunc(async a=>{if(!this.dataUri)return;await a.promise(d.sleep(1e3));const o=await a.promise(fetch(this.dataUri)),l=await a.promise(o.text());this.timePosRots=Br.parseData(l)}));this.dispose(this.dataUriChanged.disposableOn(()=>{s.restart()})),this.dispose(this.dataTextChanged.disposableOn(()=>{this.dataText&&(this.timePosRots=Br.parseData(this.dataText))}))}}get currentInfo(){return this._currentInfo.value}get currentInfoChanged(){return this._currentInfo.changed}get currentIndex(){return this._currentInfo.value&&this._currentInfo.value.index}get currentIndexChanged(){return this._currentInfo.changed}get currentPosition(){return this._currentInfo.value&&this._currentInfo.value.position}get currentPositionChanged(){return this._currentInfo.changed}get currentRotation(){return this._currentInfo.value&&this._currentInfo.value.rotation}get currentRotationChanged(){return this._currentInfo.changed}get player(){return this._player}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get accumDistancesChanged(){return this._accumDistancesChanged}get accumDistances(){do{if(!this._accumDistancesDirty)break;if(!this.timePosRots||this.timePosRots.length<2){this._accumDistances=[];break}const e=this.timePosRots.length;let n=0;const i=[];let s=es(this.timePosRots[0][1]);i.push(n);for(let a=1;a<e;++a){const o=es(this.timePosRots[a][1]),l=d.Vector.distance(o,s);s=o,n+=l,i.push(n)}this._accumDistances=i}while(!1);return this._accumDistances}get totalDistanceChanged(){return this._accumDistancesChanged}get totalDistance(){return this.accumDistances.length>0?this.accumDistances[this.accumDistances.length-1]:0}getCurrent(e){return this.getCurrentFunc?this.getCurrentFunc(e,this):this.timePosRots&&hI(this.timePosRots,e,this.rotLerpMode)}subPath(e,n){return this.timePosRots&&fI(this,e,n)}computeRotIfUndefinedUsingPrevLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=Br.computeRotIfUndefinedUsingPrevLine(this.timePosRots,e)}computeRotIfUndefinedUsingNextLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=Br.computeRotIfUndefinedUsingNextLine(this.timePosRots,e)}computeRotIfUndefinedUsingLerp(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=Br.computeRotIfUndefinedUsingLerp(this.timePosRots,e)}computeRotIfUndefined(e=!1){this.computeRotIfUndefinedUsingPrevLine(e)}addAroundPoints(e,n){uI(this,e,n)}get getCurrentFunc(){return this._getCurrentFunc.value}set getCurrentFunc(e){this._getCurrentFunc.value=e}get getCurrentFuncChanged(){return this._getCurrentFunc.changed}computeTimeFromTimePosRots(){const e=this.timePosRots;if(!e||e.length<=1){this.startTime=void 0,this.stopTime=void 0,this.duration=void 0;return}this.startTime=e[0][0],this.stopTime=e[e.length-1][0],this.duration=this.stopTime-this.startTime}get ratio(){return this.player.ratio}set ratio(e){this.player.ratio=e}get ratioChanged(){return this.player.ratioChanged}};p(Br,"computeRotIfUndefinedUsingPrevLine",H0),p(Br,"computeRotIfUndefinedUsingNextLine",X0),p(Br,"computeRotIfUndefinedUsingLerp",lI),p(Br,"getLeftRotation",Y0),p(Br,"getRightRotation",J0),p(Br,"parseData",cI),p(Br,"defaults",{timePosRots:[],startTime:0,stopTime:3e3,loop:!1,duration:3e3,playing:!1,dataText:""}),p(Br,"timePosRotsMd",dI);let Ea=Br;(r=>{r.createDefaultProps=()=>({show:!1,currentPoiShow:!0,timePosRots:d.reactDeepArrayWithUndefined(void 0,(t,e)=>t[0]===e[0]&&t[1].every((n,i)=>n===e[1][i])&&t[2]===e[2]===void 0||t[2]!==void 0&&e[2]!==void 0&&t[2].every((n,i)=>e[2][i]),t=>[t[0],[...t[1]],t[2]&&[...t[2]]||void 0]),autoComputeTimeFromTimePosRots:!0,leadTime:0,trailTime:0,startTime:void 0,stopTime:void 0,loop:!1,currentTime:0,duration:void 0,speed:1,playing:!1,polylineShow:!0,width:1,ground:!1,color:d.reactArray([1,1,1,1]),hasDash:!1,gapColor:d.reactArray([0,0,0,0]),dashLength:16,dashPattern:255,hasArrow:!1,depthTest:!1,arcType:"GEODESIC",allowPicking:!1,dataUri:"",dataText:void 0,rotLerpMode:"Lerp",debug:!1})})(Ea||(Ea={})),d.extendClassProps(Ea.prototype,Ea.createDefaultProps);const Ws=class Ws extends hn{constructor(e){super(e);p(this,"_path");p(this,"_currentPositionChanged",this.disposeVar(new d.Event));p(this,"_currentRotationChanged",this.disposeVar(new d.Event));p(this,"_currentChanged",this.disposeVar(new d.Event));p(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);p(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());this.strokeStyle={width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1},this._path=this.disposeVar(new Ea),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentPositionChanged.emit(this._path.currentPosition))),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentRotationChanged.emit(this.currentRotation))),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentChanged.emit(this.current))),this._path.show=!0,this._path.polylineShow=!1,this._path.currentPoiShow=!1;{const n=()=>{if(!this.timeStamps||!this.points){this._path.timePosRots=void 0;return}const s=this.timeStamps.length,a=this.points.length,o=Math.min(s,a),l=[];for(let u=0;u<o;++u)l.push([this.timeStamps[u],this.points[u]]);this._path.timePosRots=l,this.rotationRadius.some(u=>u>0)?(this._path.addAroundPoints(this.rotationRadius,!0),this._path.computeRotIfUndefinedUsingLerp(!0),this._path.rotLerpMode="Lerp"):(this._path.computeRotIfUndefinedUsingPrevLine(!0),this._path.rotLerpMode="Next")},i=this.disposeVar(d.createNextAnimateFrameEvent(this.timeStampsChanged,this.pointsChanged,this.rotationRadiusChanged));n(),this.dispose(i.disposableOn(n))}}get typeName(){return"ESPath"}get defaultProps(){return Ws.createDefaultProps()}get path(){return this._path}get currentPosition(){return this._path.currentPosition}get currentPositionChanged(){return this._currentPositionChanged}get currentRotation(){const e=this._path.currentRotation;if(e)return[Tu(e[0]-90),e[1],e[2]]}get currentRotationChanged(){return this._currentRotationChanged}get current(){return{position:this.currentPosition,rotation:this.currentRotation}}get currentChanged(){return this._currentChanged}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new pf("时间序列","时间序列",!0,!1,[this,"timeStamps"],[]),new C("线条流速","速度 m/s",!1,!1,[this,"speed"],1),new tt("模式","materialMode",!1,!1,[this,"materialMode"],Ws.defaults.materialModes,"singleArrow"),new Y("拐弯半径","拐弯半径,单位米",!1,!1,[this,"rotationRadius"])]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new pf("时间序列","时间序列",!0,!1,[this,"timeStamps"],[]),new Qe("当前位置","当前位置",!0,!0,[this,"currentPosition"]),new C("速度","速度 m/s",!1,!1,[this,"speed"]),new tt("materialMode","materialMode",!1,!1,[this,"materialMode"],Ws.defaults.materialModes),new Y("拐弯半径","拐弯半径,单位米",!1,!1,[this,"rotationRadius"],[5])])]}};p(Ws,"type",Ws.register("ESPath",Ws,{chsName:"ESPath",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPath"})),p(Ws,"defaults",{...Et.defaults,materialModes:[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","pureColor"]]});let Ls=Ws;(r=>{r.createDefaultProps=()=>({...Et.createDefaultProps(),timeStamps:d.reactArrayWithUndefined(void 0),speed:1,materialMode:"singleArrow",stroked:!0,strokeStyle:d.reactJson({width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1}),rotationRadius:[5]})})(Ls||(Ls={})),d.extendClassProps(Ls.prototype,Ls.createDefaultProps);const Hs=class Hs extends ${get typeName(){return"ESGeoDivTextPoi"}get defaultProps(){return Hs.createDefaultProps()}constructor(t){super(t)}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new U("文本编辑交互","文本编辑交互.",!1,!1,[this,"textEditingInteraction"]),new U("文本编辑","文本编辑.",!1,!1,[this,"textEditing"]),new C("宽度","宽度",!0,!1,[this,"width"],Hs.defaults.width),new Xh("内容","内容",!0,!1,[this,"text"],Hs.defaults.text),new Lr("原点比例和偏移","原点比例和偏移.",!1,!1,[this,"originRatioAndOffset"]),new C("透明度","透明度",!1,!1,[this,"opacity"]),new C("字体大小","字体大小",!1,!1,[this,"fontSize"]),new it("字体颜色"," 字体颜色.",!1,!1,[this,"color"]),new it("背景颜色"," 背景颜色.",!1,!1,[this,"backgroundColor"]),new Lr("内边距","上,右,下,左顺序.",!1,!1,[this,"padding"]),new Lr("边框圆角","左上,右上,右下,左下.",!1,!1,[this,"borderRadius"]),new it("边框颜色"," 边框色.",!1,!1,[this,"borderColor"]),new C("边框宽度","边框宽度",!1,!1,[this,"borderWidth"]),new tt("文字位置","文字位置",!1,!1,[this,"textAlign"],[["center","center"],["left","left"],["right","right"]]),new tt("边框类型","边框类型",!1,!1,[this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]])])]}};p(Hs,"type",Hs.register("ESGeoDivTextPoi",Hs,{chsName:"图标点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"图标点"})),p(Hs,"defaults",{...$.defaults,allowTextEditing:!0,width:80,text:"请输入文字",originRatioAndOffset:[.5,1,0,0],opacity:1,fontSize:14,color:[1,1,1,1],backgroundColor:[0,0,0,.8],padding:[5,5,5,5],borderRadius:[6,6,6,6],borderColor:[1,1,1,1],borderWidth:0,textAlign:"left",borderStyle:"solid"});let ol=Hs;(r=>{r.createDefaultProps=()=>({text:void 0,width:void 0,textEditingInteraction:!1,textEditing:!1,originRatioAndOffset:d.reactArray([.5,1,0,0]),opacity:1,fontSize:14,textAlign:"left",color:d.reactArray([1,1,1,1]),backgroundColor:d.reactArray([0,0,0,.8]),padding:d.reactArray([5,5,5,5]),borderRadius:d.reactArray([6,6,6,6]),borderWidth:0,borderColor:d.reactArray([1,1,1,1]),borderStyle:"solid",...$.createDefaultProps()})})(ol||(ol={})),d.extendClassProps(ol.prototype,ol.createDefaultProps);const Ru=class Ru extends ${get typeName(){return"ESCityBasePoint"}get defaultProps(){return{...Ru.createDefaultProps()}}constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new it("颜色","颜色",!1,!1,[this,"color"],[1,1,0,1])]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new it("颜色","颜色",!1,!1,[this,"color"])])]}};p(Ru,"type",Ru.register("ESCityBasePoint",Ru,{chsName:"城市基点(Czm)",tags:["ESObjects","CityObjects","_ES_Impl_Cesium"],description:"城市基点(Czm)"}));let ll=Ru;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),color:d.reactArray([1,1,0,1])})})(ll||(ll={})),d.extendClassProps(ll.prototype,ll.createDefaultProps);const pI=[{id:"document",version:"1.0"},{id:"Vehicle",availability:"2012-08-04T16:00:00Z/2012-08-04T16:14:15.251Z",billboard:{eyeOffset:{cartesian:[0,0,0]},horizontalOrigin:"CENTER",image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEISURBVEhLvVXBDYQwDOuojHKj8LhBbpTbpBCEkZsmIVTXq1RVQGrHiWlLmTTqPiZBlyLgy/KSZQ5JSHDQ/mCYCsC8106kDU0AdwRnvYZArWRcAl0dcYJq1hWCb3hBrumbDAVMwAC82WoRvgMnVMDBnB0nYZFTbE6BBvdUGqVqCbjBIk3PyFFR/NU7EKzru+qZsau3ryPwwCRLKYOzutZuCL6fUmWeJGzNzL/RxAMrUmASSCkkAayk2IxPlwhAAYGpsiHQjbLccfdOY5gKkCXAMi7SscAwbQpAnKyctWyUZ6z8ja3OGMepwD8asz+9FnSvbhU8uVOHFIwQsI3/p0CfhuqCSQuxLqsN6mu8SS+N42MAAAAASUVORK5CYII=",pixelOffset:{cartesian2:[0,0]},scale:.8333333333333334,show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}],verticalOrigin:"BOTTOM"},label:{fillColor:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",rgba:[255,255,0,255]}],font:"bold 10pt Segoe UI Semibold",horizontalOrigin:"LEFT",outlineColor:{rgba:[0,0,0,255]},pixelOffset:{cartesian2:[10,0]},scale:1,show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}],style:"FILL",text:"Vehicle",verticalOrigin:"CENTER"},path:{material:{solidColor:{color:{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",rgba:[255,255,0,255]}}},width:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",number:5}],show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}]},position:{interpolationAlgorithm:"LAGRANGE",interpolationDegree:1,epoch:"2012-08-04T16:00:00Z",cartesian:[0,-23797546637012e-7,-466533288013588e-8,362813368924173e-8,100,-237951008905552e-8,-466541964840452e-8,362818220006795e-8,200,-23795684769522e-7,-46655553441867e-7,362797083323261e-8,300,-237963893786855e-8,-466569163561896e-8,362775082085873e-8,400,-237970929834665e-8,-46658279679646e-7,362753080187124e-8,500,-237983728064915e-8,-46658477494347e-7,362742212874017e-8,600,-237962498289073e-8,-466590750853722e-8,36274841191848e-7,700,-237938612743523e-8,-466602954174431e-8,362748383297459e-8,800,-237914726777171e-8,-466615156669944e-8,36274835403492e-7,900,-237890840390057e-8,-466627358340244e-8,362748324130864e-8,1e3]}}],gI=`第一个packet代表了cesium场景(cesium时间轴的范围,当前时刻,倍速等信息)之外,其他的packet都可以理解为描述某一时间范围内的entity的行为。
|
|
460
460
|
\`\`\`
|
|
461
461
|
[{
|
|
462
462
|
"id": "document",
|
|
@@ -531,13 +531,13 @@ timePosRots是一个内部包含三个元素的数组,第一个表示时间戳
|
|
|
531
531
|
${K0}
|
|
532
532
|
\`\`\`
|
|
533
533
|
|
|
534
|
-
`,Q0=Date.now();new Date(Q0).toISOString(),new Date(Q0+864e5).toISOString();const Ge=class Ge extends ft{constructor(e){super(e);p(this,"_flyToEvent",this.disposeVar(new d.Event));p(this,"_resetClockEvent",this.disposeVar(new d.Event))}get typeName(){return"ESCzml"}get defaultProps(){return Ge.createDefaultProps()}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get resetClockEvent(){return this._resetClockEvent}resetClock(){this._resetClockEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new Y("数据","数据",!0,!1,[this,"data"],Ge.defaults.data,Ge.defaults.dataMd),new Y("路径","路径",!1,!1,[this,"uri"],""),new U("启用","启用",!1,!1,[this,"clockEnabled"],!1),new C("倍速","倍速.",!1,!1,[this,"multiplier"],Ge.defaults.multiplier),new U("自动设置时钟","自动设置时钟",!1,!1,[this,"autoResetClock"],!0),new Gi("开始时间","开始时间",!0,!1,[this,"startTime"],Ge.defaults.startTime),new Gi("结束时间","结束时间",!0,!1,[this,"stopTime"],Ge.defaults.stopTime),new Gi("当前时间","当前时间",!0,!1,[this,"currentTime"],Ge.defaults.currentTime),new tt("clockStep","clockStep",!1,!1,[this,"clockStep"],[["TICK_DEPENDENT","TICK_DEPENDENT"],["SYSTEM_CLOCK_MULTIPLIER","SYSTEM_CLOCK_MULTIPLIER"],["SYSTEM_CLOCK","SYSTEM_CLOCK"]],"SYSTEM_CLOCK_MULTIPLIER"),new tt("clockRange","clockRange",!1,!1,[this,"clockRange"],[["UNBOUNDED","UNBOUNDED"],["CLAMPED","CLAMPED"],["LOOP_STOP","LOOP_STOP"]],"UNBOUNDED"),new U("是否启用动画","是否启用动画",!1,!1,[this,"shouldAnimate"],!1)],general:[...e.general,new nt("唯一标识","id",!1,!0,[this,"id"]),new nt("名称","name",!0,!1,[this,"name"]),new U("是否显示","show",!1,!1,[this,"show"],!0),new U("开启碰撞","collision",!1,!1,[this,"collision"],!1),new U("允许拾取","allowPicking",!1,!1,[this,"allowPicking"],!1)]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new U("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"]),new U("允许拾取","是否允许拾取",!1,!1,[this,"allowPicking"]),new mt("飞入","飞入",["number"],n=>this.flyTo(n),[1e3]),new Y("数据","数据",!0,!1,[this,"data"],Ge.defaults.data,Ge.defaults.dataMd),new Y("路径","路径",!1,!1,[this,"uri"]),new U("自动设置时钟","自动设置时钟",!1,!1,[this,"autoResetClock"]),new mt("重设时钟","根据当前加载的数据重设始终",[],()=>this.resetClock(),[]),new Fi("loadFnStr","loadFnStr",!0,!1,[this,"loadFuncStr"],Ge.defaults.defaultLoadFuncStr,Ge.defaults.defaultLoadFuncDocStr)]),new H("时钟","时钟",[new U("启用","启用",!1,!1,[this,"clockEnabled"]),new Gi("开始时间","开始时间",!0,!1,[this,"startTime"],Ge.defaults.startTime),new Gi("结束时间","结束时间",!0,!1,[this,"stopTime"],Ge.defaults.stopTime),new Gi("当前时间","当前时间",!0,!1,[this,"currentTime"],Ge.defaults.currentTime),new C("倍速","倍速.",!1,!1,[this,"multiplier"],Ge.defaults.multiplier),new tt("clockStep","clockStep",!1,!1,[this,"clockStep"],[["TICK_DEPENDENT","TICK_DEPENDENT"],["SYSTEM_CLOCK_MULTIPLIER","SYSTEM_CLOCK_MULTIPLIER"],["SYSTEM_CLOCK","SYSTEM_CLOCK"]]),new tt("clockRange","clockRange",!1,!1,[this,"clockRange"],[["UNBOUNDED","UNBOUNDED"],["CLAMPED","CLAMPED"],["LOOP_STOP","LOOP_STOP"]]),new U("是否启用动画","是否启用动画",!1,!1,[this,"shouldAnimate"])])]}};p(Ge,"type",Ge.register("ESCzml",Ge,{chsName:"ESCzml",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Czml数据加载"})),p(Ge,"defaults",{...ft.defaults,show:!0,allowPicking:!0,data:pI,dataMd:gI,autoResetClock:!0,clockEnabled:!1,startTime:()=>Date.now(),stopTime:()=>Date.now()+864e5,currentTime:()=>Date.now(),multiplier:1,clockStep:"SYSTEM_CLOCK_MULTIPLIER",clockRange:"UNBOUNDED",shouldAnimate:!1,uri:"${earthsdk3-assets-script-dir}/assets/misc/simple.czml",defaultLoadFuncStr:K0,defaultLoadFuncDocStr:mI});let ul=Ge;(r=>{r.createDefaultProps=()=>({show:!0,uri:"",allowPicking:!1,data:d.reactJsonWithUndefined(void 0),autoResetClock:!0,clockEnabled:!1,startTime:void 0,stopTime:void 0,currentTime:void 0,multiplier:1,clockStep:"SYSTEM_CLOCK_MULTIPLIER",clockRange:"UNBOUNDED",shouldAnimate:!1,loadFuncStr:void 0,...ft.createDefaultProps()})})(ul||(ul={})),d.extendClassProps(ul.prototype,ul.createDefaultProps);const Gl=class Gl extends ft{get typeName(){return"ESNavigator"}get defaultProps(){return Gl.createDefaultProps()}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new U("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"]),new C("尺寸","尺寸",!1,!1,[this,"cssSize"]),new se("位置","位置(top,right)",!1,!1,[this,"cssPosition"]),new ku("图片地址","图片地址",!1,!1,[this,"imgUrl"])])]}};p(Gl,"type",Gl.register("ESNavigator",Gl,{chsName:"导航控件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"导航控件"})),p(Gl,"defaults",{...ft.defaults,show:!0,cssPosition:[170,30],cssSize:100,imgUrl:ft.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/zhinanzhen.png")});let hl=Gl;(r=>{r.createDefaultProps=()=>({...ft.createDefaultProps(),show:!0,cssSize:100,cssPosition:[170,30],imgUrl:r.defaults.imgUrl})})(hl||(hl={})),d.extendClassProps(hl.prototype,hl.createDefaultProps);const Li=class Li extends ft{get typeName(){return"ESViewerStatusBar"}get defaultProps(){return Li.createDefaultProps()}constructor(t){super(t)}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new U("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"],Li.defaults.show),new C("高度","height",!0,!1,[this,"height"],Li.defaults.height),new C("文字大小","fontSize",!0,!1,[this,"fontSize"],Li.defaults.fontSize),new it("背景颜色"," 背景颜色",!0,!1,[this,"bgColor"],Li.defaults.bgColor)])]}};p(Li,"type",Li.register("ESViewerStatusBar",Li,{chsName:"状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"})),p(Li,"defaults",{...ft.defaults,show:!0,height:30,fontSize:14,bgColor:[71,71,71,.8]});let cl=Li;(r=>{r.createDefaultProps=()=>({...ft.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:d.reactArray([.2784313725490196,.2784313725490196,.2784313725490196,.8])})})(cl||(cl={})),d.extendClassProps(cl.prototype,cl.createDefaultProps);const Ri=class Ri extends ft{get typeName(){return"ESViewerStatusBarScale"}get defaultProps(){return Ri.createDefaultProps()}constructor(t){super(t)}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new U("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"],Ri.defaults.show),new C("高度","height",!0,!1,[this,"height"],Ri.defaults.height),new C("文字大小","fontSize",!0,!1,[this,"fontSize"],Ri.defaults.fontSize),new it("背景颜色"," 背景颜色",!0,!1,[this,"bgColor"],Ri.defaults.bgColor)])]}};p(Ri,"type",Ri.register("ESViewerStatusBarScale",Ri,{chsName:"比例尺状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"})),p(Ri,"defaults",{...ft.defaults,show:!0,height:30,fontSize:14,bgColor:[71,71,71,.8]});let fl=Ri;(r=>{r.createDefaultProps=()=>({...ft.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:d.reactArray([.2784313725490196,.2784313725490196,.2784313725490196,.8])})})(fl||(fl={})),d.extendClassProps(fl.prototype,fl.createDefaultProps);const kl=class kl extends ${get typeName(){return"ESGaussianSplatting"}get defaultProps(){return kl.createDefaultProps()}constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new nt("路径","url",!0,!1,[this,"url"]),new C("进度","progress",!1,!0,[this,"progress"],0)]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new nt("路径","url",!0,!1,[this,"url"]),new C("进度","progress",!1,!0,[this,"progress"],0)])]}};p(kl,"type",kl.register("ESGaussianSplatting",kl,{chsName:"高斯溅射模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于加载高斯溅射模型的 ES 对象"})),p(kl,"defaults",{...$.defaults});let dl=kl;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),url:"",progress:0})})(dl||(dl={})),d.extendClassProps(dl.prototype,dl.createDefaultProps);const Xs=class Xs extends ${get typeName(){return"ESStaticMesh"}get defaultProps(){return Xs.createDefaultProps()}constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()},e=[new nt("mesh地址","mesh地址",!1,!1,[this,"mesh"],Xs.defaults.mesh)];return t.basic.push(...e),t}getProperties(t){return[...super.getProperties(t),new H("ESStaticMesh","ESStaticMesh",[new nt("mesh地址","mesh地址",!1,!1,[this,"mesh"],Xs.defaults.mesh)])]}};p(Xs,"type",Xs.register("ESStaticMesh",Xs,{chsName:"静态网格",tags:["ESObjects","_ES_Impl_UE"],description:"Unreal的Mesh对象"})),p(Xs,"defaults",{...$.defaults,mesh:"StaticMesh'/Engine/BasicShapes/Sphere.Sphere'"});let pl=Xs;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),mesh:""})})(pl||(pl={})),d.extendClassProps(pl.prototype,pl.createDefaultProps);const zl=class zl extends Et{constructor(e){super(e);p(this,"_startEvent",this.dv(new d.Event));p(this,"_clearEvent",this.dv(new d.Event));p(this,"_eSGeoExtrudedPolygon");this._eSGeoExtrudedPolygon=this.disposeVar(new Os),this._eSGeoExtrudedPolygon.parentID=this.id,this.ad(this.components.disposableAdd(this._eSGeoExtrudedPolygon)),this.eSGeoExtrudedPolygon.perPositionHeight=!0,this.eSGeoExtrudedPolygon.extrudedHeight=0,this.stroked=!0,this.strokeWidth=2,this.strokeColor=[1,0,0,1],this.ad(d.track([this.eSGeoExtrudedPolygon,"show"],[this,"show"])),this.ad(d.track([this.eSGeoExtrudedPolygon,"stroked"],[this,"stroked"])),this.ad(d.track([this.eSGeoExtrudedPolygon,"strokeWidth"],[this,"strokeWidth"])),this.ad(d.track([this.eSGeoExtrudedPolygon,"strokeColor"],[this,"strokeColor"])),this.ad(d.track([this.eSGeoExtrudedPolygon,"filled"],[this,"filled"])),this.ad(d.track([this.eSGeoExtrudedPolygon,"fillColor"],[this,"fillColor"])),this.ad(d.track([this.eSGeoExtrudedPolygon,"points"],[this,"points"])),this.ad(this.clearEvent.don(()=>{this.points=void 0,this.depths=void 0,this.windowPositions=void 0}))}get typeName(){return"ESSkylineAnalysis"}get defaultProps(){return zl.createDefaultProps()}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get eSGeoExtrudedPolygon(){return this._eSGeoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new mt("开始分析","开始分析",[],()=>this.start(),[]),new mt("清除分析","清除分析",[],()=>this.clear(),[]),new Y("屏幕坐标","windowPositions",!1,!0,[this,"windowPositions"]),new Y("深度值","depths",!1,!0,[this,"depths"]),new C("半径","半径",!0,!1,[this,"radius"],1e4)]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new mt("开始分析","开始分析",[],()=>this.start(),[]),new mt("清除分析","清除分析",[],()=>this.clear(),[]),new Y("屏幕坐标","windowPositions",!1,!0,[this,"windowPositions"]),new Y("深度值","depths",!1,!0,[this,"depths"]),new C("半径","半径",!0,!1,[this,"radius"],1e4)])]}};p(zl,"type",zl.register("ESSkylineAnalysis",zl,{chsName:"天际线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"分析类"})),p(zl,"defaults",{...Et.defaults,windowPositions:[],depths:[],radius:1e4});let gl=zl;(r=>{r.createDefaultProps=()=>({...Et.createDefaultProps(),windowPositions:gf(void 0),depths:d.reactArrayWithUndefined(void 0),radius:d.react(void 0)})})(gl||(gl={})),d.extendClassProps(gl.prototype,gl.createDefaultProps);const Fn=class Fn extends Ot{get typeName(){return"ESHeatMap"}get defaultProps(){return Fn.createDefaultProps()}constructor(t){super(t)}getESProperties(){const t=super.getESProperties();return{...t,basic:[...t.basic,new Y("data","数据",!0,!1,[this,"data"]),new Y("gradient","渐变",!0,!1,[this,"gradient"],Fn.defaults.gradient),new C("radius","半径",!0,!1,[this,"radius"],Fn.defaults.radius),new C("blur","模糊",!0,!1,[this,"blur"],Fn.defaults.blur),new U("is3D","3D",!0,!1,[this,"is3D"])]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new Y("data","数据",!0,!1,[this,"data"]),new Y("gradient","渐变",!0,!1,[this,"gradient"],Fn.defaults.gradient),new C("radius","半径",!0,!1,[this,"radius"],Fn.defaults.radius),new C("blur","模糊",!0,!1,[this,"blur"],Fn.defaults.blur),new U("is3D","3D",!0,!1,[this,"is3D"])])]}};p(Fn,"type",Fn.register("ESHeatMap",Fn,{chsName:"热力图",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于热力图的显示"})),p(Fn,"defaults",{...Ot.defaults,is3D:!1,data:[],radius:10,gradient:{".5":"green",".7":"yellow",".95":"red"},blur:.85});let ml=Fn;(r=>{r.createDefaultProps=()=>({...Ot.createDefaultProps(),is3D:d.react(void 0),data:d.reactPositions(void 0),gradient:d.reactJsonWithUndefined(void 0),radius:d.react(void 0),blur:d.react(void 0)})})(ml||(ml={})),d.extendClassProps(ml.prototype,ml.createDefaultProps);function B0(r){return typeof r=="string"?document.getElementById(r):r}function Ud(r){if(!r)throw new Error("container is not defined");r.innerHTML="";const t=document.createElement("div");return t.style.cssText="width: 100%; height: 100%; margin: 0px; padding: 0px; border: none; overflow: hidden; position: relative; z-index: 0; background: rgba(0,0,0,0);",r.appendChild(t),t}class Z0 extends d.Destroyable{constructor(e,n){super();p(this,"_listeningSceneObjects",new Map);this._sceneObjectsMananger=e,this._createSceneObjectListeningFunc=n;const i=this._listeningSceneObjects,s=(a,o)=>{if(a)for(let l of a){const u=i.get(l);u&&(u.destroy(),i.delete(l))}if(o)for(let l of o){if(i.get(l)){console.warn(`listeningSceneObjects已存在某对象:${l.name}`,l);debugger}const c=this.createSceneObjectListeningFunc(l);c&&i.set(l,c)}};s(void 0,this._sceneObjectsMananger.sceneObjects),this.dispose(this._sceneObjectsMananger.sceneObjectsToChange.disposableOn(s)),this.dispose(()=>{for(let a of this._listeningSceneObjects.values())a.destroy();this._listeningSceneObjects.clear()})}get listeningSceneObjects(){return this._listeningSceneObjects}get createSceneObjectListeningFunc(){return this._createSceneObjectListeningFunc}}class vI extends d.Destroyable{constructor(t){super(),this._esObjectsManager=t;{const e=this._esObjectsManager;class n extends d.Destroyable{constructor(s){super(),this._esPath=s,this.dv(new d.ObjResettingWithEvent(e.activeViewerChanged,()=>{const a=e.activeViewer;if(!a)return;class o extends d.Destroyable{constructor(u){if(super(),this._esPath=u,!a)throw new Error("!viewer");const c=()=>{const h=e.activeViewer;h&&(this._esPath.path.currentTime=h.simulationTime)};c(),this.d(a.simulationTimeChanged.don(c))}}return new o(this._esPath)}))}}this.dv(new Z0(e.sceneObjectsManager,i=>{if(i instanceof Ls)return new n(i)}))}{const e=this._esObjectsManager;class n extends d.Destroyable{constructor(s){super();const a=()=>{const o=e.activeViewer;o&&(o.simulationTime=s.currentTime??0)};a(),this.d(s.currentTimeChanged.don(a))}}this.dv(new Z0(e.sceneObjectsManager,i=>{if(i instanceof As)return new n(i)}))}}}class yI extends d.Destroyable{constructor(t){super(),t.forEach(e=>{this.d(e.path.currentPositionChanged.don(n=>{n&&e.sceneObjects.forEach(i=>{Reflect.has(i,"position")&&(i.position=[...n])})})),this.d(e.path.currentRotationChanged.don(n=>{n&&e.sceneObjects.forEach(i=>{Reflect.has(i,"rotation")&&(i.rotation=[...n])})}))})}}class _I extends d.Destroyable{constructor(e){super();p(this,"_player");p(this,"_channels",this.dv(d.reactArray([])));this._objectManager=e,this._player=this._objectManager.player,this.dv(new d.ObjResettingWithEvent(this.channelsChanged,()=>{if(this.channels.length===0)return;const n=[];for(let i=0;i<this.channels.length;i++){const s=this.channels[i],a=ft.getSceneObjById(s.pathId);if(!a||!(a instanceof Ls))continue;const l=s.sceneObjectIds.map(u=>ft.getSceneObjById(u)).filter(u=>u!==void 0);l.length!==0&&n.push({path:a,sceneObjects:l})}if(n.length!==0)return new yI(n)}))}get player(){return this._player}get channels(){return this._channels.value}get channelsChanged(){return this._channels.changed}set channels(e){this._channels.value=e}}function $c(r){if(r.data){const{type:t,value:e}=r.data;if(t==="UITreeA"&&e instanceof Ar){const{sceneObject:n}=e;if(n)return n.id}}}function wI(r,t){const{property:e,customEventName:n,otherParams:i}=t,{dragstartDataMananger:s}=r;if(!(e instanceof li)){if(!(e instanceof sp)){if(e instanceof nt){const[a,o]=d.getReactFuncs(e.reactVar);if(n==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const l=i[0];if(l.preventDefault(),!l.dataTransfer)return;$c(s)?l.dataTransfer.dropEffect="move":l.dataTransfer.dropEffect="none"}else if(n==="ondrop"){if(!i)throw new Error("!otherParams");i[0].preventDefault();const u=$c(s);u!==void 0&&o(u)}}else if(e instanceof tp){const[a,o]=d.getReactFuncs(e.reactVar);if(n==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const l=i[0];if(l.preventDefault(),!l.dataTransfer)return;$c(s)?l.dataTransfer.dropEffect="move":l.dataTransfer.dropEffect="none"}else if(n==="ondrop"){if(!i)throw new Error("!otherParams");const l=i[0].$event,u=i[0].strinsPropDom,c=i[0].index;l.preventDefault();const h=$c(s);if(h!==void 0){u[c].firstChild.value=h;const f=new Event("input",{bubbles:!0,cancelable:!0});u[c].firstChild.dispatchEvent(f)}}}else if(e instanceof ep){const[a,o]=d.getReactFuncs(e.reactVar)}}}}function $0(r,t,e,n){if(e)n.currentActiveEditing=[r,t];else if(n.currentActiveEditing){const[i,s]=n.currentActiveEditing;i===r&&s===t&&(e||(n.currentActiveEditing=void 0))}}const EI=["editing","positionEditing","locationEditing","pointEditing","rotationEditing"];class SI extends d.Destroyable{constructor(t,e){super(),this._sceneObject=t;const n=this._sceneObject;for(let i of EI){const s=i+"Changed",a=n[s];if(a){{const o=n[i];$0(n,i,o,e)}this.dispose(a.disposableOn(o=>$0(n,i,o,e)))}}}get sceneObject(){return this._sceneObject}}class PI extends d.Destroyable{constructor(){super();p(this,"_currentActiveEditing",this.disposeVar(d.reactArrayWithUndefined(void 0)));p(this,"_currentActiveEditingLastChangedTime",0);this.dispose(this._currentActiveEditing.changed.disposableOn((e,n)=>{if(this._currentActiveEditingLastChangedTime=Date.now(),n){const[i,s]=n;i[s]===!0&&(i[s]=!1)}if(e){const[i,s]=e;i[s]=!0}})),ft.context.sceneObjCreatedEvent.don(e=>{e.dv(new SI(e,this))})}get currentActiveEditing(){return this._currentActiveEditing.value}set currentActiveEditing(e){this._currentActiveEditing.value=e}get currentActiveEditingChanged(){return this._currentActiveEditing.changed}get currentActiveEditingLastChangedTime(){return this._currentActiveEditingLastChangedTime}}class CI extends d.Destroyable{constructor(){super();p(this,"_sceneObjects",new Set);p(this,"_sceneObjectsToChange",this.dv(new d.Event));this.d(()=>{const e=d.length(this._sceneObjects);e!==0&&console.warn(`场景对象管理器销毁时仍然管理着${e}个场景对象!`)})}get sceneObjects(){return this._sceneObjects}get sceneObjectsToChange(){return this._sceneObjectsToChange}addSceneObject(e){if(this._sceneObjects.has(e))return console.warn(`创建失败:对象${e.typeName+":"+e.id}已经存在于场景对象管理器中!}`),!1;do this._sceneObjectsToChange.emit([],[e]),this._sceneObjects.add(e);while(!1);return!0}deleteSceneObject(e){if(!this._sceneObjects.has(e))return console.warn(`删除失败:对象${e.typeName+":"+e.id}不存在于场景对象管理器中!}`),!1;do this._sceneObjectsToChange.emit([e],[]),this._sceneObjects.delete(e);while(!1);return!0}createSceneObject(e,n){const i=ft.context.createSceneObject(e,n);return i&&this.addSceneObject(i),i}createSceneObjectFromClass(e,n){const i=ft.context.createSceneObjectFromClass(e,n);return i&&this.addSceneObject(i),i}createSceneObjectFromJson(e){const n=ft.context.createSceneObjectFromJson(e);return n&&this.addSceneObject(n),n}}function j0(r,t){return r.length===t.length&&r.every((e,n)=>e===t[n])}class II extends d.Destroyable{constructor(t){super(),this._viewer=t,this.d(d.track([this._viewer,"currentTime"],[this._viewer,"simulationTime"]))}}class MI extends d.Destroyable{constructor(t,e){super(),this._viewer=t,this._activeViewer=e;const n=Di.createCommonProps(),i=[];Object.keys(n).forEach(l=>{const u=this._activeViewer[l+"Changed"];i.push(u)});const s=this.dv(d.createNextAnimateFrameEvent(...i)),a=()=>{this._viewer.status!=="Created"||this._activeViewer.status!=="Created"||Object.keys(n).forEach(l=>{this._viewer[l]=this._activeViewer[l]})};this.d(s.don(a));const o=this.dv(d.createAnimateFrame());o.restart(void 0,async()=>{if(this._viewer.status!=="Created"||this._activeViewer.status!=="Created")return;const l=this._activeViewer.getCurrentCameraInfo(),u=this._viewer.getCurrentCameraInfo();if(!l)return;const{position:c,rotation:h}=l;u&&j0(c,u.position)&&j0(h,u.rotation)||this._viewer.flyIn(c,h,0)}),this.d(()=>o.cancel())}}const NI=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" width="40" height="40" style="shape-rendering: auto; display: block; background: rgba(255, 255, 255, 0);" xmlns:xlink="http://www.w3.org/1999/xlink"><g><circle stroke-linecap="round" fill="none" stroke-dasharray="50.26548245743669 50.26548245743669" stroke="#ffffff" stroke-width="8" r="32" cy="50" cx="50">
|
|
534
|
+
`,Q0=Date.now();new Date(Q0).toISOString(),new Date(Q0+864e5).toISOString();const Ge=class Ge extends ft{constructor(e){super(e);p(this,"_flyToEvent",this.disposeVar(new d.Event));p(this,"_resetClockEvent",this.disposeVar(new d.Event))}get typeName(){return"ESCzml"}get defaultProps(){return Ge.createDefaultProps()}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get resetClockEvent(){return this._resetClockEvent}resetClock(){this._resetClockEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new Y("数据","数据",!0,!1,[this,"data"],Ge.defaults.data,Ge.defaults.dataMd),new Y("路径","路径",!1,!1,[this,"uri"],""),new U("启用","启用",!1,!1,[this,"clockEnabled"],!1),new C("倍速","倍速.",!1,!1,[this,"multiplier"],Ge.defaults.multiplier),new U("自动设置时钟","自动设置时钟",!1,!1,[this,"autoResetClock"],!0),new Gi("开始时间","开始时间",!0,!1,[this,"startTime"],Ge.defaults.startTime),new Gi("结束时间","结束时间",!0,!1,[this,"stopTime"],Ge.defaults.stopTime),new Gi("当前时间","当前时间",!0,!1,[this,"currentTime"],Ge.defaults.currentTime),new tt("clockStep","clockStep",!1,!1,[this,"clockStep"],[["TICK_DEPENDENT","TICK_DEPENDENT"],["SYSTEM_CLOCK_MULTIPLIER","SYSTEM_CLOCK_MULTIPLIER"],["SYSTEM_CLOCK","SYSTEM_CLOCK"]],"SYSTEM_CLOCK_MULTIPLIER"),new tt("clockRange","clockRange",!1,!1,[this,"clockRange"],[["UNBOUNDED","UNBOUNDED"],["CLAMPED","CLAMPED"],["LOOP_STOP","LOOP_STOP"]],"UNBOUNDED"),new U("是否启用动画","是否启用动画",!1,!1,[this,"shouldAnimate"],!1)],general:[...e.general,new nt("唯一标识","id",!1,!0,[this,"id"]),new nt("名称","name",!0,!1,[this,"name"]),new U("是否显示","show",!1,!1,[this,"show"],!0),new U("开启碰撞","collision",!1,!1,[this,"collision"],!1),new U("允许拾取","allowPicking",!1,!1,[this,"allowPicking"],!1)]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new U("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"]),new U("允许拾取","是否允许拾取",!1,!1,[this,"allowPicking"]),new mt("飞入","飞入",["number"],n=>this.flyTo(n),[1e3]),new Y("数据","数据",!0,!1,[this,"data"],Ge.defaults.data,Ge.defaults.dataMd),new Y("路径","路径",!1,!1,[this,"uri"]),new U("自动设置时钟","自动设置时钟",!1,!1,[this,"autoResetClock"]),new mt("重设时钟","根据当前加载的数据重设始终",[],()=>this.resetClock(),[]),new Fi("loadFnStr","loadFnStr",!0,!1,[this,"loadFuncStr"],Ge.defaults.defaultLoadFuncStr,Ge.defaults.defaultLoadFuncDocStr)]),new H("时钟","时钟",[new U("启用","启用",!1,!1,[this,"clockEnabled"]),new Gi("开始时间","开始时间",!0,!1,[this,"startTime"],Ge.defaults.startTime),new Gi("结束时间","结束时间",!0,!1,[this,"stopTime"],Ge.defaults.stopTime),new Gi("当前时间","当前时间",!0,!1,[this,"currentTime"],Ge.defaults.currentTime),new C("倍速","倍速.",!1,!1,[this,"multiplier"],Ge.defaults.multiplier),new tt("clockStep","clockStep",!1,!1,[this,"clockStep"],[["TICK_DEPENDENT","TICK_DEPENDENT"],["SYSTEM_CLOCK_MULTIPLIER","SYSTEM_CLOCK_MULTIPLIER"],["SYSTEM_CLOCK","SYSTEM_CLOCK"]]),new tt("clockRange","clockRange",!1,!1,[this,"clockRange"],[["UNBOUNDED","UNBOUNDED"],["CLAMPED","CLAMPED"],["LOOP_STOP","LOOP_STOP"]]),new U("是否启用动画","是否启用动画",!1,!1,[this,"shouldAnimate"])])]}};p(Ge,"type",Ge.register("ESCzml",Ge,{chsName:"ESCzml",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Czml数据加载"})),p(Ge,"defaults",{...ft.defaults,show:!0,allowPicking:!0,data:pI,dataMd:gI,autoResetClock:!0,clockEnabled:!1,startTime:()=>Date.now(),stopTime:()=>Date.now()+864e5,currentTime:()=>Date.now(),multiplier:1,clockStep:"SYSTEM_CLOCK_MULTIPLIER",clockRange:"UNBOUNDED",shouldAnimate:!1,uri:"${earthsdk3-assets-script-dir}/assets/misc/simple.czml",defaultLoadFuncStr:K0,defaultLoadFuncDocStr:mI});let ul=Ge;(r=>{r.createDefaultProps=()=>({show:!0,uri:"",allowPicking:!1,data:d.reactJsonWithUndefined(void 0),autoResetClock:!0,clockEnabled:!1,startTime:void 0,stopTime:void 0,currentTime:void 0,multiplier:1,clockStep:"SYSTEM_CLOCK_MULTIPLIER",clockRange:"UNBOUNDED",shouldAnimate:!1,loadFuncStr:void 0,...ft.createDefaultProps()})})(ul||(ul={})),d.extendClassProps(ul.prototype,ul.createDefaultProps);const Gl=class Gl extends ft{get typeName(){return"ESNavigator"}get defaultProps(){return Gl.createDefaultProps()}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new U("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"]),new C("尺寸","尺寸",!1,!1,[this,"cssSize"]),new se("位置","位置(top,right)",!1,!1,[this,"cssPosition"]),new ku("图片地址","图片地址",!1,!1,[this,"imgUrl"])])]}};p(Gl,"type",Gl.register("ESNavigator",Gl,{chsName:"导航控件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"导航控件"})),p(Gl,"defaults",{...ft.defaults,show:!0,cssPosition:[170,30],cssSize:100,imgUrl:ft.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/zhinanzhen.png")});let hl=Gl;(r=>{r.createDefaultProps=()=>({...ft.createDefaultProps(),show:!0,cssSize:100,cssPosition:[170,30],imgUrl:r.defaults.imgUrl})})(hl||(hl={})),d.extendClassProps(hl.prototype,hl.createDefaultProps);const Li=class Li extends ft{get typeName(){return"ESViewerStatusBar"}get defaultProps(){return Li.createDefaultProps()}constructor(t){super(t)}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new U("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"],Li.defaults.show),new C("高度","height",!0,!1,[this,"height"],Li.defaults.height),new C("文字大小","fontSize",!0,!1,[this,"fontSize"],Li.defaults.fontSize),new it("背景颜色"," 背景颜色",!0,!1,[this,"bgColor"],Li.defaults.bgColor)])]}};p(Li,"type",Li.register("ESViewerStatusBar",Li,{chsName:"状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"})),p(Li,"defaults",{...ft.defaults,show:!0,height:30,fontSize:14,bgColor:[71,71,71,.8]});let cl=Li;(r=>{r.createDefaultProps=()=>({...ft.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:d.reactArray([.2784313725490196,.2784313725490196,.2784313725490196,.8])})})(cl||(cl={})),d.extendClassProps(cl.prototype,cl.createDefaultProps);const Ri=class Ri extends ft{get typeName(){return"ESViewerStatusBarScale"}get defaultProps(){return Ri.createDefaultProps()}constructor(t){super(t)}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new U("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"],Ri.defaults.show),new C("高度","height",!0,!1,[this,"height"],Ri.defaults.height),new C("文字大小","fontSize",!0,!1,[this,"fontSize"],Ri.defaults.fontSize),new it("背景颜色"," 背景颜色",!0,!1,[this,"bgColor"],Ri.defaults.bgColor)])]}};p(Ri,"type",Ri.register("ESViewerStatusBarScale",Ri,{chsName:"比例尺状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"})),p(Ri,"defaults",{...ft.defaults,show:!0,height:30,fontSize:14,bgColor:[71,71,71,.8]});let fl=Ri;(r=>{r.createDefaultProps=()=>({...ft.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:d.reactArray([.2784313725490196,.2784313725490196,.2784313725490196,.8])})})(fl||(fl={})),d.extendClassProps(fl.prototype,fl.createDefaultProps);const kl=class kl extends ${get typeName(){return"ESGaussianSplatting"}get defaultProps(){return kl.createDefaultProps()}constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new nt("路径","url",!0,!1,[this,"url"]),new C("进度","progress",!1,!0,[this,"progress"],0)]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new nt("路径","url",!0,!1,[this,"url"]),new C("进度","progress",!1,!0,[this,"progress"],0)])]}};p(kl,"type",kl.register("ESGaussianSplatting",kl,{chsName:"高斯溅射模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于加载高斯溅射模型的 ES 对象"})),p(kl,"defaults",{...$.defaults});let dl=kl;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),url:"",progress:0})})(dl||(dl={})),d.extendClassProps(dl.prototype,dl.createDefaultProps);const Xs=class Xs extends ${get typeName(){return"ESStaticMesh"}get defaultProps(){return Xs.createDefaultProps()}constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()},e=[new nt("mesh地址","mesh地址",!1,!1,[this,"mesh"],Xs.defaults.mesh)];return t.basic.push(...e),t}getProperties(t){return[...super.getProperties(t),new H("ESStaticMesh","ESStaticMesh",[new nt("mesh地址","mesh地址",!1,!1,[this,"mesh"],Xs.defaults.mesh)])]}};p(Xs,"type",Xs.register("ESStaticMesh",Xs,{chsName:"静态网格",tags:["ESObjects","_ES_Impl_UE"],description:"Unreal的Mesh对象"})),p(Xs,"defaults",{...$.defaults,mesh:"StaticMesh'/Engine/BasicShapes/Sphere.Sphere'"});let pl=Xs;(r=>{r.createDefaultProps=()=>({...$.createDefaultProps(),mesh:""})})(pl||(pl={})),d.extendClassProps(pl.prototype,pl.createDefaultProps);const zl=class zl extends Et{constructor(e){super(e);p(this,"_startEvent",this.dv(new d.Event));p(this,"_clearEvent",this.dv(new d.Event));p(this,"_eSGeoExtrudedPolygon");this._eSGeoExtrudedPolygon=this.disposeVar(new Os),this._eSGeoExtrudedPolygon.parentID=this.id,this.ad(this.components.disposableAdd(this._eSGeoExtrudedPolygon)),this.eSGeoExtrudedPolygon.perPositionHeight=!0,this.eSGeoExtrudedPolygon.extrudedHeight=0,this.stroked=!0,this.strokeWidth=2,this.strokeColor=[1,0,0,1],this.ad(d.track([this.eSGeoExtrudedPolygon,"show"],[this,"show"])),this.ad(d.track([this.eSGeoExtrudedPolygon,"stroked"],[this,"stroked"])),this.ad(d.track([this.eSGeoExtrudedPolygon,"strokeWidth"],[this,"strokeWidth"])),this.ad(d.track([this.eSGeoExtrudedPolygon,"strokeColor"],[this,"strokeColor"])),this.ad(d.track([this.eSGeoExtrudedPolygon,"filled"],[this,"filled"])),this.ad(d.track([this.eSGeoExtrudedPolygon,"fillColor"],[this,"fillColor"])),this.ad(d.track([this.eSGeoExtrudedPolygon,"points"],[this,"points"])),this.ad(this.clearEvent.don(()=>{this.points=void 0,this.depths=void 0,this.windowPositions=void 0}))}get typeName(){return"ESSkylineAnalysis"}get defaultProps(){return zl.createDefaultProps()}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get eSGeoExtrudedPolygon(){return this._eSGeoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new mt("开始分析","开始分析",[],()=>this.start(),[]),new mt("清除分析","清除分析",[],()=>this.clear(),[]),new Y("屏幕坐标","windowPositions",!1,!0,[this,"windowPositions"]),new Y("深度值","depths",!1,!0,[this,"depths"]),new C("半径","半径",!0,!1,[this,"radius"],1e4)]}}getProperties(e){return[...super.getProperties(e),new H("通用","通用",[new mt("开始分析","开始分析",[],()=>this.start(),[]),new mt("清除分析","清除分析",[],()=>this.clear(),[]),new Y("屏幕坐标","windowPositions",!1,!0,[this,"windowPositions"]),new Y("深度值","depths",!1,!0,[this,"depths"]),new C("半径","半径",!0,!1,[this,"radius"],1e4)])]}};p(zl,"type",zl.register("ESSkylineAnalysis",zl,{chsName:"天际线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"分析类"})),p(zl,"defaults",{...Et.defaults,windowPositions:[],depths:[],radius:1e4});let gl=zl;(r=>{r.createDefaultProps=()=>({...Et.createDefaultProps(),windowPositions:gf(void 0),depths:d.reactArrayWithUndefined(void 0),radius:d.react(void 0)})})(gl||(gl={})),d.extendClassProps(gl.prototype,gl.createDefaultProps);const Rn=class Rn extends Ot{get typeName(){return"ESHeatMap"}get defaultProps(){return Rn.createDefaultProps()}constructor(t){super(t)}getESProperties(){const t=super.getESProperties();return{...t,basic:[...t.basic,new Y("data","数据",!0,!1,[this,"data"]),new Y("gradient","渐变",!0,!1,[this,"gradient"],Rn.defaults.gradient),new C("radius","半径",!0,!1,[this,"radius"],Rn.defaults.radius),new C("blur","模糊",!0,!1,[this,"blur"],Rn.defaults.blur),new U("is3D","3D",!0,!1,[this,"is3D"])]}}getProperties(t){return[...super.getProperties(t),new H("通用","通用",[new Y("data","数据",!0,!1,[this,"data"]),new Y("gradient","渐变",!0,!1,[this,"gradient"],Rn.defaults.gradient),new C("radius","半径",!0,!1,[this,"radius"],Rn.defaults.radius),new C("blur","模糊",!0,!1,[this,"blur"],Rn.defaults.blur),new U("is3D","3D",!0,!1,[this,"is3D"])])]}};p(Rn,"type",Rn.register("ESHeatMap",Rn,{chsName:"热力图",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于热力图的显示"})),p(Rn,"defaults",{...Ot.defaults,is3D:!1,data:[],radius:10,gradient:{".5":"green",".7":"yellow",".95":"red"},blur:.85});let ml=Rn;(r=>{r.createDefaultProps=()=>({...Ot.createDefaultProps(),is3D:d.react(void 0),data:d.reactPositions(void 0),gradient:d.reactJsonWithUndefined(void 0),radius:d.react(void 0),blur:d.react(void 0)})})(ml||(ml={})),d.extendClassProps(ml.prototype,ml.createDefaultProps);function B0(r){return typeof r=="string"?document.getElementById(r):r}function Ud(r){if(!r)throw new Error("container is not defined");r.innerHTML="";const t=document.createElement("div");return t.style.cssText="width: 100%; height: 100%; margin: 0px; padding: 0px; border: none; overflow: hidden; position: relative; z-index: 0; background: rgba(0,0,0,0);",r.appendChild(t),t}class Z0 extends d.Destroyable{constructor(e,n){super();p(this,"_listeningSceneObjects",new Map);this._sceneObjectsMananger=e,this._createSceneObjectListeningFunc=n;const i=this._listeningSceneObjects,s=(a,o)=>{if(a)for(let l of a){const u=i.get(l);u&&(u.destroy(),i.delete(l))}if(o)for(let l of o){if(i.get(l)){console.warn(`listeningSceneObjects已存在某对象:${l.name}`,l);debugger}const c=this.createSceneObjectListeningFunc(l);c&&i.set(l,c)}};s(void 0,this._sceneObjectsMananger.sceneObjects),this.dispose(this._sceneObjectsMananger.sceneObjectsToChange.disposableOn(s)),this.dispose(()=>{for(let a of this._listeningSceneObjects.values())a.destroy();this._listeningSceneObjects.clear()})}get listeningSceneObjects(){return this._listeningSceneObjects}get createSceneObjectListeningFunc(){return this._createSceneObjectListeningFunc}}class vI extends d.Destroyable{constructor(t){super(),this._esObjectsManager=t;{const e=this._esObjectsManager;class n extends d.Destroyable{constructor(s){super(),this._esPath=s,this.dv(new d.ObjResettingWithEvent(e.activeViewerChanged,()=>{const a=e.activeViewer;if(!a)return;class o extends d.Destroyable{constructor(u){if(super(),this._esPath=u,!a)throw new Error("!viewer");const c=()=>{const h=e.activeViewer;h&&(this._esPath.path.currentTime=h.simulationTime)};c(),this.d(a.simulationTimeChanged.don(c))}}return new o(this._esPath)}))}}this.dv(new Z0(e.sceneObjectsManager,i=>{if(i instanceof Ls)return new n(i)}))}{const e=this._esObjectsManager;class n extends d.Destroyable{constructor(s){super();const a=()=>{const o=e.activeViewer;o&&(o.simulationTime=s.currentTime??0)};a(),this.d(s.currentTimeChanged.don(a))}}this.dv(new Z0(e.sceneObjectsManager,i=>{if(i instanceof As)return new n(i)}))}}}class yI extends d.Destroyable{constructor(t){super(),t.forEach(e=>{this.d(e.path.currentPositionChanged.don(n=>{n&&e.sceneObjects.forEach(i=>{Reflect.has(i,"position")&&(i.position=[...n])})})),this.d(e.path.currentRotationChanged.don(n=>{n&&e.sceneObjects.forEach(i=>{Reflect.has(i,"rotation")&&(i.rotation=[...n])})}))})}}class _I extends d.Destroyable{constructor(e){super();p(this,"_player");p(this,"_channels",this.dv(d.reactArray([])));this._objectManager=e,this._player=this._objectManager.player,this.dv(new d.ObjResettingWithEvent(this.channelsChanged,()=>{if(this.channels.length===0)return;const n=[];for(let i=0;i<this.channels.length;i++){const s=this.channels[i],a=ft.getSceneObjById(s.pathId);if(!a||!(a instanceof Ls))continue;const l=s.sceneObjectIds.map(u=>ft.getSceneObjById(u)).filter(u=>u!==void 0);l.length!==0&&n.push({path:a,sceneObjects:l})}if(n.length!==0)return new yI(n)}))}get player(){return this._player}get channels(){return this._channels.value}get channelsChanged(){return this._channels.changed}set channels(e){this._channels.value=e}}function $c(r){if(r.data){const{type:t,value:e}=r.data;if(t==="UITreeA"&&e instanceof Or){const{sceneObject:n}=e;if(n)return n.id}}}function wI(r,t){const{property:e,customEventName:n,otherParams:i}=t,{dragstartDataMananger:s}=r;if(!(e instanceof li)){if(!(e instanceof sp)){if(e instanceof nt){const[a,o]=d.getReactFuncs(e.reactVar);if(n==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const l=i[0];if(l.preventDefault(),!l.dataTransfer)return;$c(s)?l.dataTransfer.dropEffect="move":l.dataTransfer.dropEffect="none"}else if(n==="ondrop"){if(!i)throw new Error("!otherParams");i[0].preventDefault();const u=$c(s);u!==void 0&&o(u)}}else if(e instanceof tp){const[a,o]=d.getReactFuncs(e.reactVar);if(n==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const l=i[0];if(l.preventDefault(),!l.dataTransfer)return;$c(s)?l.dataTransfer.dropEffect="move":l.dataTransfer.dropEffect="none"}else if(n==="ondrop"){if(!i)throw new Error("!otherParams");const l=i[0].$event,u=i[0].strinsPropDom,c=i[0].index;l.preventDefault();const h=$c(s);if(h!==void 0){u[c].firstChild.value=h;const f=new Event("input",{bubbles:!0,cancelable:!0});u[c].firstChild.dispatchEvent(f)}}}else if(e instanceof ep){const[a,o]=d.getReactFuncs(e.reactVar)}}}}function $0(r,t,e,n){if(e)n.currentActiveEditing=[r,t];else if(n.currentActiveEditing){const[i,s]=n.currentActiveEditing;i===r&&s===t&&(e||(n.currentActiveEditing=void 0))}}const EI=["editing","positionEditing","locationEditing","pointEditing","rotationEditing"];class SI extends d.Destroyable{constructor(t,e){super(),this._sceneObject=t;const n=this._sceneObject;for(let i of EI){const s=i+"Changed",a=n[s];if(a){{const o=n[i];$0(n,i,o,e)}this.dispose(a.disposableOn(o=>$0(n,i,o,e)))}}}get sceneObject(){return this._sceneObject}}class PI extends d.Destroyable{constructor(){super();p(this,"_currentActiveEditing",this.disposeVar(d.reactArrayWithUndefined(void 0)));p(this,"_currentActiveEditingLastChangedTime",0);this.dispose(this._currentActiveEditing.changed.disposableOn((e,n)=>{if(this._currentActiveEditingLastChangedTime=Date.now(),n){const[i,s]=n;i[s]===!0&&(i[s]=!1)}if(e){const[i,s]=e;i[s]=!0}})),ft.context.sceneObjCreatedEvent.don(e=>{e.dv(new SI(e,this))})}get currentActiveEditing(){return this._currentActiveEditing.value}set currentActiveEditing(e){this._currentActiveEditing.value=e}get currentActiveEditingChanged(){return this._currentActiveEditing.changed}get currentActiveEditingLastChangedTime(){return this._currentActiveEditingLastChangedTime}}class CI extends d.Destroyable{constructor(){super();p(this,"_sceneObjects",new Set);p(this,"_sceneObjectsToChange",this.dv(new d.Event));this.d(()=>{const e=d.length(this._sceneObjects);e!==0&&console.warn(`场景对象管理器销毁时仍然管理着${e}个场景对象!`)})}get sceneObjects(){return this._sceneObjects}get sceneObjectsToChange(){return this._sceneObjectsToChange}addSceneObject(e){if(this._sceneObjects.has(e))return console.warn(`创建失败:对象${e.typeName+":"+e.id}已经存在于场景对象管理器中!}`),!1;do this._sceneObjectsToChange.emit([],[e]),this._sceneObjects.add(e);while(!1);return!0}deleteSceneObject(e){if(!this._sceneObjects.has(e))return console.warn(`删除失败:对象${e.typeName+":"+e.id}不存在于场景对象管理器中!}`),!1;do this._sceneObjectsToChange.emit([e],[]),this._sceneObjects.delete(e);while(!1);return!0}createSceneObject(e,n){const i=ft.context.createSceneObject(e,n);return i&&this.addSceneObject(i),i}createSceneObjectFromClass(e,n){const i=ft.context.createSceneObjectFromClass(e,n);return i&&this.addSceneObject(i),i}createSceneObjectFromJson(e){const n=ft.context.createSceneObjectFromJson(e);return n&&this.addSceneObject(n),n}}function j0(r,t){return r.length===t.length&&r.every((e,n)=>e===t[n])}class II extends d.Destroyable{constructor(t){super(),this._viewer=t,this.d(d.track([this._viewer,"currentTime"],[this._viewer,"simulationTime"]))}}class MI extends d.Destroyable{constructor(t,e){super(),this._viewer=t,this._activeViewer=e;const n=Di.createCommonProps(),i=[];Object.keys(n).forEach(l=>{const u=this._activeViewer[l+"Changed"];i.push(u)});const s=this.dv(d.createNextAnimateFrameEvent(...i)),a=()=>{this._viewer.status!=="Created"||this._activeViewer.status!=="Created"||Object.keys(n).forEach(l=>{this._viewer[l]=this._activeViewer[l]})};this.d(s.don(a));const o=this.dv(d.createAnimateFrame());o.restart(void 0,async()=>{if(this._viewer.status!=="Created"||this._activeViewer.status!=="Created")return;const l=this._activeViewer.getCurrentCameraInfo(),u=this._viewer.getCurrentCameraInfo();if(!l)return;const{position:c,rotation:h}=l;u&&j0(c,u.position)&&j0(h,u.rotation)||this._viewer.flyIn(c,h,0)}),this.d(()=>o.cancel())}}const NI=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" width="40" height="40" style="shape-rendering: auto; display: block; background: rgba(255, 255, 255, 0);" xmlns:xlink="http://www.w3.org/1999/xlink"><g><circle stroke-linecap="round" fill="none" stroke-dasharray="50.26548245743669 50.26548245743669" stroke="#ffffff" stroke-width="8" r="32" cy="50" cx="50">
|
|
535
535
|
<animateTransform values="0 50 50;360 50 50" keyTimes="0;1" dur="1s" repeatCount="indefinite" type="rotate" attributeName="transform"></animateTransform>
|
|
536
536
|
</circle><g></g></g></svg>
|
|
537
|
-
`,bI='<svg t="1747028305766" class="icon" viewBox="0 0 1032 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3881" width="40" height="40"><path d="M0.1536 547.700736c-0.205824-0.187392-0.205824-0.49152 0.008192-0.68608l80.672768-73.590784a0.63488 0.63488 0 0 1 0.7936-0.029696l263.043072 203.0336c0.667648 0.515072 1.738752 0.498688 2.393088-0.038912l609.191936-500.133888a0.605184 0.605184 0 0 1 0.768 0.022528l74.84928 67.229696a0.454656 0.454656 0 0 1-0.002048 0.685056l-685.234176 618.19904a1.14688 1.14688 0 0 1-1.518592-0.012288L0.1536 547.700736z" fill="#ffffff" p-id="3882"></path></svg>',TI='<svg t="1747028398107" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1146" width="40" height="40"><path d="M415.744006 1.033277A0.992256 0.992256 0 0 1 416.747526 0.000061h189.5045c0.569344 0 1.017856 0.45056 1.001472 1.033216l-21.227518 754.803667a1.062912 1.062912 0 0 1-1.05984 1.032192h-146.933752c-0.569344 0-1.04448-0.45056-1.059839-1.032192L415.744006 1.033277zM511.510528 1024c-52.595709 0-95.231994-39.866366-95.231994-89.043963 0-49.176573 42.636285-89.042939 95.231994-89.042938 52.594685 0 95.231994 39.866366 95.231994 89.042938 0 49.177597-42.637309 89.043963-95.231994 89.043963z" fill="#ffffff" p-id="1147"></path></svg>',Vl=class Vl extends d.Destroyable{constructor(t){super();const e=()=>{const n=this.dv(new wa);this.d(d.track([n,"show"],[t,"useDefaultStatusDiv"]));{const i=()=>{n.show=(t.useDefaultStatusDiv??!0)&&t.status!=="Created"};i(),this.d(t.useDefaultStatusDivChanged.don(i)),this.d(t.statusChanged.don(i)),n.cssText="width:100%;height:100%;position:absolute;left:0px;top:0px;"}t.add(n),this.d(()=>t.delete(n)),n.instanceClass=class extends d.Destroyable{constructor(a,o,l){super();p(this,"_div",document.createElement("div"));if(this._subContainer=a,!l)return;this._subContainer.appendChild(this._div),this.d(()=>this._subContainer.removeChild(this._div));{const m=()=>{o.show?this._div.style.opacity="1":this._div.style.opacity="0"};m(),this.d(o.showChanged.don(m))}let u,c,h,f,g;this._div.style.pointerEvents="none",this._div.style.position="absolute",this._div.style.width="100%",this._div.style.height="100%",this._div.style.backgroundColor="rgba(0, 0, 0, 0.4)",this._div.style.zIndex="100",this._div.style.transition="opacity 2s",u=document.createElement("div"),this._div.appendChild(u),u.style.width="auto",u.style.position="absolute",u.style.left="50%",u.style.top="50%",u.style.transform="translate(-50%,-50%)",u.style.background="rgba(120, 120, 0, 0.7)",u.style.color="white",u.style.fontSize="10px",u.style.background="none",u.style.display="flex",u.style.justifyContent="center",u.style.alignItems="center",c=document.createElement("div"),u.appendChild(c),c.style.pointerEvents="none",c.style.display="block",c.style.width="40px",c.innerHTML=Vl.defaultsSvg.loadingSvg,c.style.filter="drop-shadow(0px 0px 1px black)",h=document.createElement("div"),u.appendChild(h),h.style.pointerEvents="none",h.style.marginLeft="10px",h.style.display="flex",h.style.flexFlow="column",h.style.maxWidth="300px",f=document.createElement("div"),h.appendChild(f),f.style.fontSize="14px",f.style.fontWeight="800",f.style.marginBottom="5px",f.style.textShadow="0 0 2px black",g=document.createElement("div"),h.appendChild(g),g.style.fontWeight="400",g.style.textShadow="0 0 2px black";{const m=()=>{let E="Raw";l.status==="Raw"?E="初始状态":l.status==="Creating"?E="正在创建":l.status==="Created"?E="创建完成":l.status==="Error"?E="创建失败":l.status==="Reconnecting"&&(E="重新连接"),f.innerText=`${E}(${l.status})`,g.innerText=`${l.statusLog}`,(l.status==="Creating"||l.status==="Reconnecting")&&(c.innerHTML=Vl.defaultsSvg.loadingSvg),l.status==="Created"&&(c.innerHTML=Vl.defaultsSvg.successSvg),l.status==="Error"&&(c.innerHTML=Vl.defaultsSvg.warnSvg)};m();const _=this.dv(d.createNextAnimateFrameEvent(l.statusLogChanged,l.statusChanged));this.d(_.don(m))}}update(){const a=255*Math.random()|0,o=255*Math.random()|0,l=255*Math.random()|0;this._div.style.background=`rgba(${a}, ${o}, ${l}, 0.8)`}}};this.d(t.containerChanged.don(()=>{e()}))}};p(Vl,"defaultsSvg",{loadingSvg:NI,successSvg:bI,warnSvg:TI});let qd=Vl;class DI extends d.Destroyable{constructor(t,e,n){super(),this._subContainer=t,this._overlayContainer=e,this._viewer=n;const i=this._subContainer,s=this._overlayContainer,a=this._viewer,o=()=>{const c=a.zIndex??"";i.style.zIndex=c,s.style.zIndex=c};o(),this.d(a.zIndexChanged.don(o));const l=()=>{i.style.display=a.show??!0?"block":"none"};l(),this.d(a.showChanged.don(l));const u=()=>{i.style.opacity=`${a.opacity??1}`};u(),this.d(a.opacityChanged.don(u))}}function jc(r){let t=d.getExtProp(r,"_relativeContainer");return t||(t=document.createElement("div"),t.style.position="relative",t.style.width="100%",t.style.height="100%",t.style.padding="0",t.style.margin="0",r.appendChild(t),d.setExtProp(r,"_relativeContainer",t)),t}class xI extends d.Destroyable{constructor(e,n){super();p(this,"_subContainer",document.createElement("div"));p(this,"_overlayContainer",document.createElement("div"));p(this,"_containerStyleController");this._container=e,this._viewer=n,this._containerStyleController=this.dv(new DI(this._subContainer,this._overlayContainer,this._viewer));const{subContainer:i,overlayContainer:s}=this;i.tabIndex=-1,i.style.outline="none",i.style.width="100%",i.style.height="100%",i.onpointerdown=()=>i.focus(),s.style.position="relative",s.setAttribute("earthsdk3","earthsdk3-overlayContainer"),i.setAttribute("earthsdk3","earthsdk3-subContainer"),jc(this._container).appendChild(i),this.d(()=>jc(this._container).removeChild(i)),jc(this._container).appendChild(s),this.d(()=>jc(this._container).removeChild(s))}get subContainer(){return this._subContainer}get overlayContainer(){return this._overlayContainer}get containerStyleController(){return this._containerStyleController}get container(){return this._container}}class OI extends d.Destroyable{constructor(){super(...arguments);p(this,"registerObjsMap",new Map)}register(e,n){return this.registerObjsMap.has(e)&&console.warn(`register warn:${e}已经被注册,再次注册会覆盖。`),this.registerObjsMap.set(e,n),e}getViewerConstructor(e){const n=this.registerObjsMap.get(e);if(!n){console.warn(`未找到${e}类!`);return}return n}createViewer(e){const n=e.type,i=this.getViewerConstructor(n);if(!i)throw new Error(`没有找到类型为${n}的Viewer构造器!`);return new i(e)}}class tv extends d.Destroyable{constructor(t,e,n=!1,i=!1){if(super(),this._viewer=t,!e)throw new Error("ViewerCustomInteraction: container is null");const s=this.dv(d.DomElementEvent.create(e,"pointerdown")),a=this.dv(d.DomElementEvent.create(e,"pointermove")),o=this.dv(d.DomElementEvent.create(e,"pointerup")),l=this.dv(d.DomElementEvent.create(e,"pointerout")),u=this.dv(d.DomElementEvent.create(e,"pointerover")),c=this.dv(new d.PointerClick),h=this.dv(new d.PointerHover),f=()=>{const v=this._viewer.hoverTime*1e3;h.delayTime=v};this.d(this._viewer.hoverTimeChanged.don(()=>{f()})),this.d(s.don(v=>c.pointerDown(v))),this.d(a.don(v=>c.pointerMove(v))),this.d(o.don(v=>c.pointerUp(v))),this.d(l.don(v=>c.pointerOut(v))),this.d(s.don(v=>h.pointerDown(v))),this.d(a.don(v=>h.pointerMove(v))),this.d(o.don(v=>h.pointerUp(v))),this.d(l.don(v=>h.pointerOut(v)));const{x:g,y:m}=e.getBoundingClientRect(),_=i?g:0,E=i?m:0;this.d(h.hoverEvent.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);this._viewer.hoverEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(c.clickEvent.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);this._viewer.clickEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(c.dbclickEvent.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);v.button===0&&this._viewer.dblclickEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(s.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);v.button===0&&this._viewer.pointerDownEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(o.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);v.button===0&&this._viewer.pointerUpEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(a.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);this._viewer.pointerMoveEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(u.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);this._viewer.pointerOverEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(l.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);this._viewer.pointerOutEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})}));const M=this.dv(d.DomElementEvent.create(e,"keydown"));this.d(M.don(v=>this._viewer.keyDownEvent.emit(v)));const y=this.dv(d.DomElementEvent.create(e,"keyup"));this.d(y.don(v=>this._viewer.keyUpEvent.emit(v)));const w=this.dv(d.DomElementEvent.create(e,"wheel"));this.d(w.don(v=>this._viewer.wheelEvent.emit(v)))}}class AI extends d.Destroyable{constructor(e){super();p(this,"viewer");const n=this.viewer=e;this.ad(new d.ObjResettingWithEvent(n.rollerShutterChanged,()=>{const i=n.container;if(!i||!n.rollerShutter)return;const s=new d.Destroyable;this.viewer.splitPosition=.5;let a=this.getRollerShutterDIV();return i.appendChild(a),s.d(()=>{this.viewer.splitPosition=0,i.removeChild(a)}),s}))}getRollerShutterDIV(){let e=document.createElement("div");e.style.position="absolute",e.style.left="50%",e.style.top="0",e.style.backgroundColor="#d3d3d3",e.style.width="5px",e.style.height="100%",e.style.zIndex="9999";const n=i=>{if(!e.parentElement)return;i.preventDefault?i.preventDefault():i.returnValue=!1;const a=i.x/e.parentElement.offsetWidth;e.style.left=`${100*a}%`,this.viewer.splitPosition=a};return e.addEventListener("mouseenter",i=>{e.style.cursor="ew-resize"}),e.addEventListener("mouseleave",i=>{e.style.cursor="default"}),e.addEventListener("mousedown",i=>{e.style.cursor="ew-resize",document.addEventListener("mousemove",n)}),document.addEventListener("mouseup",i=>{e.style.cursor="default",document.removeEventListener("mousemove",n)}),e}}class LI extends d.Destroyable{constructor(e){super();p(this,"rollerShutterAnalysis");this.rollerShutterAnalysis=this.ad(new AI(e))}}const fs=class fs extends d.Destroyable{constructor(e){super();p(this,"_forceRecreateEvent",this.dv(new d.Event));p(this,"_container",this.dv(d.react(void 0)));p(this,"_containerSize",this.dv(d.react(void 0)));p(this,"_editingEvent",this.disposeVar(new d.Event));p(this,"_status",this.dv(d.react("Raw")));p(this,"_statusLog",this.dv(d.react("")));p(this,"_statusContainer",this.dv(new qd(this)));p(this,"_useCustomInteraction",this.dv(d.react(!0)));p(this,"_resetInteractionEvent",this.dv(d.createNextAnimateFrameEvent(this.containerChanged,this._useCustomInteraction.changed,this._forceRecreateEvent)));p(this,"_interactionResetting",this.dv(new d.ObjResettingWithEvent(this._resetInteractionEvent,()=>{if(!(!this.container||!this._useCustomInteraction.value))return new tv(this,this.container)})));p(this,"_viewerChanged",this.dv(new d.Event));p(this,"_containerResetEvent",this.dv(d.createNextAnimateFrameEvent(this.containerChanged,this._forceRecreateEvent)));p(this,"_containerResetting",this.dv(new d.ObjResettingWithEvent(this._containerResetEvent,()=>{if(this.container)return new xI(this.container,this)})));p(this,"_sceneObjectsMap",new Map);p(this,"_id");p(this,"_typeName");p(this,"_updateFuncReact",this.dv(d.react(void 0)));p(this,"_toDestroyFuncReact",this.dv(d.react(void 0)));p(this,"_statusInfo",fs.defaults.statusInfo);p(this,"_navigationMode",this.dv(d.react("Map")));p(this,"_syncViewer",this.dv(d.react(void 0)));p(this,"_syncEventDon",this.dv(new d.ObjResettingWithEvent(this.syncViewerChanged,()=>{const e=this.syncViewer;if(e)return new MI(this,e)})));p(this,"_timeSyncdon",this.dv(new d.ObjResettingWithEvent(this.timeSyncChanged,()=>{if(this.timeSync)return new II(this)})));p(this,"_hoverEvent",this.dv(new d.Event));p(this,"_pointerOverEvent",this.dv(new d.Event));p(this,"_pointerMoveEvent",this.dv(new d.Event));p(this,"_pointerDownEvent",this.dv(new d.Event));p(this,"_pointerUpEvent",this.dv(new d.Event));p(this,"_pointerOutEvent",this.dv(new d.Event));p(this,"_clickEvent",this.dv(new d.Event));p(this,"_dblclickEvent",this.dv(new d.Event));p(this,"_keyDownEvent",this.dv(new d.Event));p(this,"_keyUpEvent",this.dv(new d.Event));p(this,"_wheelEvent",this.dv(new d.Event));p(this,"_actived",this.dv(d.react(!1)));this._id=e.id??d.createGuid();const n=B0(e.container);if(n)this._container.value=Ud(n),this._typeName=e.type,this._initName();else throw new Error("container is not defined");{const i=()=>{n&&(this.show??!0?n.style.display="block":n.style.display="none")};i(),this.d(this.showChanged.don(i))}{const i=this._sceneObjectsMap,s=()=>{for(let[o,l]of i.entries())if(!l&&o){const u=Oa.context.createEngineObject(o,this);u&&i.set(o,u)}},a=()=>{for(let[o,l]of i.entries())l&&!l.isDestroyed()&&l.destroy(),i.set(o,void 0)};this.d(a),this.d(this.viewerChanged.don(o=>{a(),o&&s()}))}{const i=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(s){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};i(),this.d(this.execOnceFuncStrChanged.don(i))}{const i=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(a){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${a}`)}};i(),this.d(this.updateFuncStrChanged.don(i));let s;this.d(()=>s&&s.destroy()),this.d(this.updateFuncChanged.don(()=>{s&&s.cancel(),this.updateFunc&&(s=s||d.createAnimateFrame(),s.restart(void 0,a=>{this.updateFunc&&this.updateFunc(this,a)}))}))}{const i=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(s){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`),this.toDestroyFunc=void 0}};i(),this.d(this.toDestroyFuncStrChanged.don(i)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}this.ad(new LI(this))}forceRecreate(){this._forceRecreateEvent.emit()}get container(){return this._container.value}set container(e){this._container.value=e}set containerOrId(e){if(typeof e=="string"){const n=document.getElementById(e);n&&n instanceof HTMLDivElement?this._container.value=Ud(n):console.warn("containerOrId warn: !(container instanceof HTMLDivElement)")}else e instanceof HTMLDivElement?this._container.value=Ud(e):console.warn("containerOrId warn: setting container failed!")}get containerChanged(){return this._container.changed}get containerSize(){return this._containerSize.value}set containerSize(e){this._containerSize.value=e}get containerSizeChanged(){return this._containerSize.changed}get editingEvent(){return this._editingEvent}get status(){return this._status.value}get statusChanged(){return this._status.changed}setStatus(e){this._status.value=e}get statusLog(){return this._statusLog.value}get statusLogChanged(){return this._statusLog.changed}setStatusLog(e){this._statusLog.value=e}get useCustomInteraction(){return this._useCustomInteraction.value}set useCustomInteraction(e){this._useCustomInteraction.value=e}get viewerChanged(){return this._viewerChanged}get containerResetEvent(){return this._containerResetEvent}get subContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.subContainer}get subContainerChanged(){return this._containerResetting.objChanged}get overlayContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.overlayContainer}get overlayContainerChanged(){return this._containerResetting.objChanged}get sceneObjectsMap(){return this._sceneObjectsMap}get sceneObjects(){return this._sceneObjectsMap.keys()}getEngineObject(e){return this.sceneObjectsMap.get(e)}add(...e){for(let n of e)if(!this.has(n)){ft.context.addSceneObject(n);const i=Oa.context.createEngineObject(n,this);i&&this._sceneObjectsMap.set(n,i),n.viewerAttached.emit(this)}}delete(...e){for(let n of e)if(this.has(n)){const i=this._sceneObjectsMap.get(n);i&&i.destroy(),ft.context.deleteSceneObject(n),this._sceneObjectsMap.delete(n),n.viewerDetached.emit(this)}}disposableAdd(...e){return this.add(...e),()=>this.delete(...e)}disAdd(...e){return this.disposableAdd(...e)}has(e){return this._sceneObjectsMap.has(e)}clearAllSceneObjects(){for(let e of this.sceneObjects)this.delete(e)}get id(){return this._id}set id(e){console.warn("ESViewer id is readonly")}get typeName(){return this._typeName}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return fs.createDefaultProps()}_getJson(e=!0){const n={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let s,a=this.defaultProps[i];a instanceof d.ReactiveVariable?s=a.equals(this[i]):s=a===this[i],s||(n[i]=this[i])}else n[i]=this[i];return n}_setJson(e,n,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const s=n||[];s.push("id","type");const a=Object.keys(this.defaultProps).filter(o=>!s.includes(o));for(let o of a)if(o in e)this[o]=e[o]===null?void 0:e[o];else if(!(i??!1)){let l=this.defaultProps[o];l instanceof d.ReactiveVariable&&(l=l.value),this[o]=l}}get json(){return this._getJson()}set json(e){this._setJson(e,["devTags"])}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get navigationMode(){return this._navigationMode.value}get navigationModeChanged(){return this._navigationMode.changed}getNavigationMode(){return this._navigationMode.value}getEngineType(){return this._typeName}get syncViewer(){return this._syncViewer.value}set syncViewer(e){this._syncViewer.value=e}get syncViewerChanged(){return this._syncViewer.changed}syncOtherViewer(e){e&&e.syncViewer&&(e.syncViewer=void 0),e===this?this._syncViewer.value=void 0:this._syncViewer.value=e}setCurrentTime(e){try{this.currentTime=typeof e=="string"?Date.parse(e):e}catch(n){console.warn(`时间格式不正确! value: ${e} error: ${n}`)}}async getVersion(){return window.g_XE3CopyRights??{}}get hoverEvent(){return this._hoverEvent}get pointerOverEvent(){return this._pointerOverEvent}get pointerMoveEvent(){return this._pointerMoveEvent}get pointerDownEvent(){return this._pointerDownEvent}get pointerUpEvent(){return this._pointerUpEvent}get pointerOutEvent(){return this._pointerOutEvent}get clickEvent(){return this._clickEvent}get dblclickEvent(){return this._dblclickEvent}get keyDownEvent(){return this._keyDownEvent}get keyUpEvent(){return this._keyUpEvent}get wheelEvent(){return this._wheelEvent}getProperties(e){return[new H("ESViewer","ESViewer",[new mt("强制刷新","重载",[],()=>this.forceRecreate(),[]),new U("debug","debug",!0,!1,[this,"debug"],fs.defaults.debug),new U("是否可见","是否可见",!0,!1,[this,"show"]),new tt("位置点单位","lonLatFormat",!0,!1,[this,"lonLatFormat"],[["度","DECIMAL_DEGREE"],["度分","DEGREES_DECIMAL_MINUTES"],["度分秒","SEXAGESIMAL_DEGREE"]]),new U("是否开启文字避让","textAvoidance",!0,!1,[this,"textAvoidance"],!1),new nt("ionAccessToken","ionAccessToken",!1,!1,[this,"ionAccessToken"]),new C("时钟","时钟",!1,!1,[this,"currentTime"]),new U("globeShow","globeShow",!0,!1,[this,"globeShow"]),new U("atmosphere","atmosphere",!1,!1,[this,"atmosphere"])]),new C("飞行像素范围","默认飞行定位时对象包围球所占的屏幕像素大小",!1,!1,[this,"flyToBoundingSize"]),new C("编辑高度偏移","编辑时默认的高度偏移",!1,!1,[this,"editingHeightOffset"]),new H("Globe","Globe",[new Y("地形着色器","可以设置地形全局坡度,坡向,高程带,等高线等",!1,!1,[this,"terrainShader"])])]}get actived(){return this._actived.value}set actived(e){this._actived.value=e}get activedChanged(){return this._actived.changed}};p(fs,"context",new OI),p(fs,"register",fs.context.register.bind(fs.context)),p(fs,"defaults",{show:!0,debug:!1,statusInfo:{fps:0,position:[0,0,0],rotation:[0,0,0],length:0},terrainShader:{slope:{show:!1},aspect:{show:!1},elevationRamp:{show:!1,minHeight:-414,maxHeight:8777,color:[]},elevationContour:{show:!1,color:[1,0,0,1],spacing:150,width:2}},globeShow:!0,splitPosition:0});let Di=fs;(r=>{r.createBaseProps=()=>({name:"未命名场景对象",extras:d.reactJson(void 0),devTags:d.reactArrayWithUndefined(void 0),debug:void 0,show:void 0,opacity:void 0,zIndex:void 0,useDefaultStatusDiv:!0,execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0}),r.createCommonProps=()=>({globeShow:!0,ionAccessToken:"",lonLatFormat:"DECIMAL_DEGREE",fov:60,textAvoidance:!1,flyToBoundingSize:256,hoverTime:2,currentTime:Date.now(),simulationTime:Date.now(),timeSync:!1,rain:0,snow:0,cloud:0,fog:0,depthOfField:0,atmosphere:!0,editingPointSize:void 0,editingPointColor:d.reactArrayWithUndefined(void 0),editingAuxiliaryPointColor:d.reactArrayWithUndefined(void 0),editingLineWidth:void 0,editingLineColor:d.reactArrayWithUndefined(void 0),editingAxisSize:void 0,editingAuxiliaryPointSize:void 0,editingHeightOffset:0,editingLineShow:!0,editingEventListening:!0,terrainShader:r.defaults.terrainShader,splitPosition:d.react(void 0),rollerShutter:!1}),r.createDefaultProps=()=>({...(0,r.createBaseProps)(),...(0,r.createCommonProps)()})})(Di||(Di={})),d.extendClassProps(Di.prototype,Di.createDefaultProps);function ev(r,t){const e=r._lastCameraInfo;if(e){const n=t.viewerChanged.don(i=>{if(!i||!e)return;const{position:s,rotation:a}=e;t.flyIn(s,a,0),r._lastCameraInfo=void 0,n()})}}const RI=r=>{const t=Di.createCommonProps(),e={};try{Object.keys(t).forEach(n=>{e[n]=r[n]})}catch(n){console.warn(n)}return e},rv=(r,t)=>{const e=Di.createCommonProps();try{Object.keys(e).forEach(n=>{r[n]=t[n]})}catch(n){console.warn(n)}};class FI extends d.Destroyable{constructor(e){super();p(this,"_viewersChanged",this.disposeVar(new d.Event));p(this,"_viewers",new Set);p(this,"_viewersToChange",this.dv(new d.Event));this._sceneObjectsManager=e,this.d(()=>{for(const n of this._viewers)this.destroyViewer(n);this._viewers.clear()}),this.viewers.forEach(n=>{const i=this._sceneObjectsManager.sceneObjects;n.add(...i)}),this.d(()=>{const n=this._sceneObjectsManager.sceneObjects;this.viewers.forEach(i=>{i.delete(...n)})}),this.d(this._sceneObjectsManager.sceneObjectsToChange.don((n,i)=>{this.viewers.forEach(s=>{i.forEach(a=>{Ds(s.devTags,a.devTags)&&(s.has(a)?console.warn(`${s.typeName}中已存${a.typeName},检查逻辑是否有问题!`):s.add(a))}),n.forEach(a=>{Ds(s.devTags,a.devTags)&&(s.has(a)?s.delete(a):console.warn(`${s.typeName}中不存在${a.typeName},检查逻辑是否有问题!`))})}),i.length>0&&i.forEach(s=>{s.d(s.devTagsChanged.don(()=>{this.viewers.forEach(a=>{a.has(s)&&a.delete(s),console.log("sceneObjectsToChange",a.devTags,s.devTags,Ds(a.devTags,s.devTags)),Ds(a.devTags,s.devTags)&&(a.has(s)?console.warn(`${a.typeName}中已存${s.typeName},检查逻辑是否有问题!`):a.add(s))})}))})})),this.d(this.viewersChanged.don((n,i)=>{const s=this._sceneObjectsManager.sceneObjects;i.forEach(a=>{for(let o of s)Ds(a.devTags,o.devTags)&&(a.has(o)?console.warn(`${a.typeName}中已存${o.typeName},检查逻辑是否有问题!`):a.add(o))}),n.forEach(a=>{for(let o of s)Ds(a.devTags,o.devTags)&&(a.has(o)?a.delete(o):console.warn(`${a.typeName}中不存在${o.typeName},检查逻辑是否有问题!`))}),i.length>0&&i.forEach(a=>{a.d(a.devTagsChanged.don(()=>{a.clearAllSceneObjects();const o=this._sceneObjectsManager.sceneObjects;for(let l of o)console.log("viewersChanged",a.devTags,l.devTags,Ds(a.devTags,l.devTags)),Ds(a.devTags,l.devTags)&&(a.has(l)?console.warn(`${a.typeName}中已存${l.typeName},检查逻辑是否有问题!`):a.add(l))}))})}))}get viewersChanged(){return this._viewersChanged}get viewers(){return this._viewers}getViewers(){return[...this._viewers]}get viewersToChange(){return this._viewersToChange}createViewer(e){const n=Di.context.createViewer(e);return this._viewers.add(n),this._viewersChanged.emit([],[n]),n}destroyViewer(e){return e.isDestroyed()?!0:(this._viewers.delete(e),this._viewersChanged.emit([e],[]),e.destroy(),e.isDestroyed())}}class Sa extends d.Destroyable{constructor(...e){super();p(this,"_drgm",this.dv(new d0));p(this,"_sobjm",this.dv(new CI));p(this,"_vrm",this.dv(new FI(this._sobjm)));p(this,"_sceneObjectEditingManager",this.disposeVar(new PI));p(this,"_activeViewer",this.dv(d.react(void 0)));p(this,"_syncOtherViewersToActived",this.dv(d.react(!1)));p(this,"_cmrvm",this.createSceneObjectFromClass(ya));p(this,"_cmrvmdon",this.d(()=>this._cmrvm&&this.destroySceneObject(this._cmrvm)));p(this,"_asset",{type:"ESObjectsManager",version:"0.1.0",createdTime:"",modifiedTime:"",name:"未命名项目"});p(this,"_sceneTree",this.dv(new Ah("default",this.dragstartDataMananger,24,this)));p(this,"_propUiTreeManager",this.dv(new Du(24)));p(this,"_sceneTreeMap",new Map);p(this,"_viewerCreatedEvent",this.dv(new d.Event));p(this,"_lastCameraInfo");p(this,"_lastActiveViewerJson");p(this,"syncEvent",this.dv(d.createNextAnimateFrameEvent(this.activeViewerChanged,this.syncOtherViewersToActivedChanged)));p(this,"_syncEventDon",this.d(this.syncEvent.don(()=>{const e=this.syncOtherViewersToActived;this.viewers.forEach(n=>{e?n.syncOtherViewer(this.activeViewer):n.syncOtherViewer(void 0)})})));p(this,"_player",this.createSceneObjectFromClass(As));p(this,"_playerdon",this.d(()=>this._player&&this.destroySceneObject(this._player)));p(this,"_esPlyarAndPathTime",this.dv(new vI(this)));p(this,"_pathAnimationManager",this.dv(new _I(this)))}static get envs(){return ft.context.environmentVariables}getSceneObjectById(e){return ft.getSceneObjectById(e)}getSceneObject(e){return ft.getSceneObject(e)}get $refs(){return ft.$refs}get dragstartDataMananger(){return this._drgm}get sceneObjectsManager(){return this._sobjm}get viewers(){return this._vrm.viewers}getViewers(){return this._vrm.getViewers()}get sceneObjectEditingManager(){return this._sceneObjectEditingManager}get activeViewer(){return this._activeViewer.value}set activeViewer(e){this._activeViewer.value=e}get activeViewerChanged(){return this._activeViewer.changed}get syncOtherViewersToActived(){return this._syncOtherViewersToActived.value}set syncOtherViewersToActived(e){this._syncOtherViewersToActived.value=e}get syncOtherViewersToActivedChanged(){return this._syncOtherViewersToActived.changed}get cameraViewsManager(){return this._cmrvm}get json(){var h;const e=this._asset.createdTime||new Date().toISOString(),n=new Date().toISOString(),i=this._asset.name||"未命名项目",a={type:"ESObjectsManager",version:this._asset.version||"0.1.0",createdTime:e,modifiedTime:n,name:i},o=this.sceneTree.json,l=this._cmrvm.views,u=[...this._vrm.viewers].map(f=>f.json),c=(h=this.activeViewer)==null?void 0:h.getCurrentCameraInfo();return{asset:a,viewers:u,sceneTree:o,viewCollection:l,lastView:c}}set json(e){try{if(!e.asset)return;if(!e.asset.type||e.asset.type!=="ESObjectsManager"){console.warn("json装配失败! asset.type 不存在或者不是'ESObjectsManager'");return}if(this._asset.createdTime=e.asset&&e.asset.createdTime||new Date().toISOString(),this._asset.modifiedTime=e.asset&&e.asset.modifiedTime||"",this._asset.name=e.asset&&e.asset.name||"未命名项目",this._asset.version=e.asset&&e.asset.version||"0.1.0",e.sceneTree&&(this.sceneTree.json=e.sceneTree),e.viewCollection&&(this._cmrvm.views=e.viewCollection),!e.viewers||!Array.isArray(e.viewers)){console.warn("viewers is not an array or does not exist !");return}if(this._vrm.viewers.size===0||e.viewers.length===0){console.warn("viewers is empty !");return}this._vrm.viewers.forEach(n=>{const i=e.viewers.find(s=>s.id===n.id);i&&(n.json=i)})}catch(n){console.error(`ESObjectsManager解析json数据时发生错误! error: ${n}`)}}get sceneTree(){return this._sceneTree}get jsonLoadingEvent(){return this._sceneTree.jsonLoadingEvent}get propUiTreeManager(){return this._propUiTreeManager}propTreeCallback(e){return wI(this,e)}getSceneTrees(){return[...this._sceneTreeMap.values()]}getSceneTree(e="default"){if(e==="default")return this._sceneTree;if(!this._sceneTreeMap.has(e)){console.warn(`id为${e}的SceneTree不存在!`);return}return this._sceneTreeMap.get(e)}createSceneTree(e,n=24){if(this._sceneTreeMap.has(e)||e==="default")console.warn(`id为${e}的SceneTree已存在!`);else{const i=this.dv(new Ah(e,this.dragstartDataMananger,n,this));this._sceneTreeMap.set(e,i)}return this.getSceneTree(e)}get viewerCreatedEvent(){return this._viewerCreatedEvent}createViewer(e){const n=this._vrm.createViewer(e);this.activeViewer||(this.activeViewer=n);const i=this.d(n.viewerChanged.don(s=>{s&&(this._viewerCreatedEvent.emit(n),i())}));return n}destroyViewer(e){return this._activeViewer.value===e&&(this._activeViewer.value=void 0),this._vrm.destroyViewer(e)}switchViewer(e,n=!0,i=!0,s=!0){var u;this.activeViewer&&this.activeViewer.getNavigationMode()!=="Map"&&this.activeViewer.changeToMap(),!this._lastCameraInfo&&n&&(this._lastCameraInfo=(u=this.activeViewer)==null?void 0:u.getCurrentCameraInfo()),!this._lastActiveViewerJson&&i&&(this._lastActiveViewerJson=this.activeViewer?RI(this.activeViewer):void 0),s&&this.activeViewer&&this.destroyViewer(this.activeViewer);const a=e.id,o=a?[...this.getViewers()].find(c=>c.id===a):[...this.getViewers()].find(c=>c.typeName===e.type);if(o)if(a&&o.typeName!==e.type)console.warn(`id为${a}的viewer的typeName和option.type${e.type}不相同!,虽然id一致但是typeName不同,所以会销毁并创建新的viewer`),this.destroyViewer(o);else return console.log("ESViewer exists, will be used"),n&&ev(this,o),i&&this._lastActiveViewerJson&&(rv(o,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),o.container===B0(e.container)?(o.containerOrId=e.container,o.forceRecreate()):o.containerOrId=e.container,this.activeViewer=o,o;console.log("No ESViewer exists, will be created");const l=this.createViewer(e);return n&&ev(this,l),i&&this._lastActiveViewerJson&&(rv(l,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),this.activeViewer=l,l}switchToCesiumViewer(...e){if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)){const{container:n,viewSync:i,attributeSync:s,destroy:a,id:o}=e[0];return this.switchViewer({type:"ESCesiumViewer",container:n,id:o},i??!0,s??!0,a??!0)}else if(typeof e[0]=="string"||e[0]instanceof HTMLDivElement){const n={container:e[0],viewSync:e[1]??!0,attributeSync:e[2]??!0,destroy:e[3]??!0,id:e[4]},{container:i,viewSync:s,attributeSync:a,destroy:o,id:l}=n;return this.switchViewer({type:"ESCesiumViewer",container:i,id:l},s,a,o)}}switchToUEViewer(...e){let n,i={viewSync:!0,attributeSync:!0,destroy:!0};if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("uri")){const{container:l,uri:u,app:c,token:h,viewSync:f,attributeSync:g,destroy:m,id:_}=e[0];n={type:"ESUeViewer",container:l,id:_,options:{uri:u,app:c,token:h}},i={viewSync:f??!0,attributeSync:g??!0,destroy:m??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("ws")){const{container:l,ws:u,esmsg:c,viewSync:h,attributeSync:f,id:g,destroy:m}=e[0];n={type:"ESUeViewer",container:l,id:g,options:{ws:u,esmsg:c}},i={viewSync:h??!0,attributeSync:f??!0,destroy:m??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("project")){const{container:l,project:u,baseUrl:c,viewSync:h,attributeSync:f,id:g,destroy:m}=e[0];n={type:"ESUeViewer",container:l,id:g,options:{project:u,baseUrl:c}},i={viewSync:h??!0,attributeSync:f??!0,destroy:m??!0}}else(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?(n={type:"ESUeViewer",container:e[0],id:e[6],options:{ws:e[1],esmsg:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}):typeof e[1]=="string"&&e[1].startsWith("http")?(n={type:"ESUeViewer",container:e[0],id:e[7],options:{uri:e[1],app:e[2],token:e[3]??void 0}},i={viewSync:e[4]??!0,attributeSync:e[5]??!0,destroy:e[6]??!0}):(n={type:"ESUeViewer",container:e[0],id:e[6],options:{project:e[1],baseUrl:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}));if(!n)throw new Error("参数错误");const{viewSync:s,attributeSync:a,destroy:o}=i;return this.switchViewer(n,s,a,o)}createCesiumViewer(...e){let n;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?n={...e[0],type:"ESCesiumViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(n={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESCesiumViewer"}),!n)throw new Error("参数错误");return this.createViewer(n)}createUeViewer(...e){let n;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?n={...e[0],type:"ESUeViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?n={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{ws:e[1],esmsg:e[2]??void 0}}:typeof e[1]=="string"&&e[1].startsWith("http")?n={type:"ESUeViewer",container:e[0],id:e[4]??void 0,options:{uri:e[1],app:e[2],token:e[3]??void 0}}:n={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{project:e[1],baseUrl:e[2]??void 0}}),!n)throw new Error("参数错误");return this.createViewer(n)}createSceneObject(e,n){return this._sobjm.createSceneObject(e,n)}createSceneObjectFromClass(e,n){return this._sobjm.createSceneObjectFromClass(e,n)}createSceneObjectFromJson(e){return this._sobjm.createSceneObjectFromJson(e)}destroySceneObject(e){const n=this._sobjm.deleteSceneObject(e);return e.destroy(),n}destroyAllSceneObjects(){const e=[...this._sobjm.sceneObjects];for(let n of e)n!=this._player&&n!=this._cmrvm&&this.destroySceneObject(n)}get player(){return this._player}get esPlyarAndPathTime(){return this._esPlyarAndPathTime}get pathAnimationManager(){return this._pathAnimationManager}}p(Sa,"getSceneObjById",ft.context.getSceneObjectById.bind(ft.context)),p(Sa,"getEnv",ft.context.getEnv.bind(ft.context)),p(Sa,"setEnv",ft.context.setEnv.bind(ft.context)),(r=>{r.createDefaultProps=()=>({})})(Sa||(Sa={})),d.extendClassProps(Sa.prototype,Sa.createDefaultProps);function GI(){const r=navigator.userAgent;let t="Unknown";/Windows/.test(r)?t="Windows":/Macintosh/.test(r)?t="MacOS":/Linux/.test(r)?t="Linux":/Android/.test(r)?t="Android":/iOS|iPhone|iPad|iPod/.test(r)&&(t="iOS");let e="Unknown";return/x64|x86_64|Win64|WOW64/.test(r)?e="x64":/x86|i686|Win32/.test(r)?e="x86":/arm64|aarch64/.test(r)?e="arm64":/arm/.test(r)&&(e="arm"),{os:t.toLocaleLowerCase(),arch:e.toLocaleLowerCase()}}const kI=Date.now();function nv(r){const{os:t,arch:e}=GI(),n={version:r.version,commitdate:r.date,commitId:r.commitId,runningTime:(Date.now()-kI)/1e3/60|0,date:new Date().toLocaleString(),href:window.location.href,os:t,arch:e},s={method:"GET",headers:new Headers,redirect:"follow"},a=window.encodeURIComponent(JSON.stringify(n));fetch(`https://account.bjxbsj.cn/api/product/record?product=EarthSDKJS&content=${a}`,s).then(o=>o.text()).then(o=>console.log(o)).catch(o=>console.log("error",o))}N.copyright=void 0;try{const r="earthsdk3",t="3.2.0-beta.7",e="2025-07-09T00:49:51.000Z",n="北京西部世界科技有限公司",i="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="86cd78d39a95619b7116ef4bdb191f0d2e005181",o=((Date.now()-1752022191e3)/36e5).toFixed(1),l=`%c🌏 ${r}%c ${t}.${s.slice(0,8)}.${e} (距今${o}个小时)
|
|
537
|
+
`,bI='<svg t="1747028305766" class="icon" viewBox="0 0 1032 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3881" width="40" height="40"><path d="M0.1536 547.700736c-0.205824-0.187392-0.205824-0.49152 0.008192-0.68608l80.672768-73.590784a0.63488 0.63488 0 0 1 0.7936-0.029696l263.043072 203.0336c0.667648 0.515072 1.738752 0.498688 2.393088-0.038912l609.191936-500.133888a0.605184 0.605184 0 0 1 0.768 0.022528l74.84928 67.229696a0.454656 0.454656 0 0 1-0.002048 0.685056l-685.234176 618.19904a1.14688 1.14688 0 0 1-1.518592-0.012288L0.1536 547.700736z" fill="#ffffff" p-id="3882"></path></svg>',TI='<svg t="1747028398107" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1146" width="40" height="40"><path d="M415.744006 1.033277A0.992256 0.992256 0 0 1 416.747526 0.000061h189.5045c0.569344 0 1.017856 0.45056 1.001472 1.033216l-21.227518 754.803667a1.062912 1.062912 0 0 1-1.05984 1.032192h-146.933752c-0.569344 0-1.04448-0.45056-1.059839-1.032192L415.744006 1.033277zM511.510528 1024c-52.595709 0-95.231994-39.866366-95.231994-89.043963 0-49.176573 42.636285-89.042939 95.231994-89.042938 52.594685 0 95.231994 39.866366 95.231994 89.042938 0 49.177597-42.637309 89.043963-95.231994 89.043963z" fill="#ffffff" p-id="1147"></path></svg>',Vl=class Vl extends d.Destroyable{constructor(t){super();const e=()=>{const n=this.dv(new wa);this.d(d.track([n,"show"],[t,"useDefaultStatusDiv"]));{const i=()=>{n.show=(t.useDefaultStatusDiv??!0)&&t.status!=="Created"};i(),this.d(t.useDefaultStatusDivChanged.don(i)),this.d(t.statusChanged.don(i)),n.cssText="width:100%;height:100%;position:absolute;left:0px;top:0px;"}t.add(n),this.d(()=>t.delete(n)),n.instanceClass=class extends d.Destroyable{constructor(a,o,l){super();p(this,"_div",document.createElement("div"));if(this._subContainer=a,!l)return;this._subContainer.appendChild(this._div),this.d(()=>this._subContainer.removeChild(this._div));{const m=()=>{o.show?this._div.style.opacity="1":this._div.style.opacity="0"};m(),this.d(o.showChanged.don(m))}let u,c,h,f,g;this._div.style.pointerEvents="none",this._div.style.position="absolute",this._div.style.width="100%",this._div.style.height="100%",this._div.style.backgroundColor="rgba(0, 0, 0, 0.4)",this._div.style.zIndex="100",this._div.style.transition="opacity 2s",u=document.createElement("div"),this._div.appendChild(u),u.style.width="auto",u.style.position="absolute",u.style.left="50%",u.style.top="50%",u.style.transform="translate(-50%,-50%)",u.style.background="rgba(120, 120, 0, 0.7)",u.style.color="white",u.style.fontSize="10px",u.style.background="none",u.style.display="flex",u.style.justifyContent="center",u.style.alignItems="center",c=document.createElement("div"),u.appendChild(c),c.style.pointerEvents="none",c.style.display="block",c.style.width="40px",c.innerHTML=Vl.defaultsSvg.loadingSvg,c.style.filter="drop-shadow(0px 0px 1px black)",h=document.createElement("div"),u.appendChild(h),h.style.pointerEvents="none",h.style.marginLeft="10px",h.style.display="flex",h.style.flexFlow="column",h.style.maxWidth="300px",f=document.createElement("div"),h.appendChild(f),f.style.fontSize="14px",f.style.fontWeight="800",f.style.marginBottom="5px",f.style.textShadow="0 0 2px black",g=document.createElement("div"),h.appendChild(g),g.style.fontWeight="400",g.style.textShadow="0 0 2px black";{const m=()=>{let E="Raw";l.status==="Raw"?E="初始状态":l.status==="Creating"?E="正在创建":l.status==="Created"?E="创建完成":l.status==="Error"?E="创建失败":l.status==="Reconnecting"&&(E="重新连接"),f.innerText=`${E}(${l.status})`,g.innerText=`${l.statusLog}`,(l.status==="Creating"||l.status==="Reconnecting")&&(c.innerHTML=Vl.defaultsSvg.loadingSvg),l.status==="Created"&&(c.innerHTML=Vl.defaultsSvg.successSvg),l.status==="Error"&&(c.innerHTML=Vl.defaultsSvg.warnSvg)};m();const _=this.dv(d.createNextAnimateFrameEvent(l.statusLogChanged,l.statusChanged));this.d(_.don(m))}}update(){const a=255*Math.random()|0,o=255*Math.random()|0,l=255*Math.random()|0;this._div.style.background=`rgba(${a}, ${o}, ${l}, 0.8)`}}};this.d(t.containerChanged.don(()=>{e()}))}};p(Vl,"defaultsSvg",{loadingSvg:NI,successSvg:bI,warnSvg:TI});let qd=Vl;class DI extends d.Destroyable{constructor(t,e,n){super(),this._subContainer=t,this._overlayContainer=e,this._viewer=n;const i=this._subContainer,s=this._overlayContainer,a=this._viewer,o=()=>{const c=a.zIndex??"";i.style.zIndex=c,s.style.zIndex=c};o(),this.d(a.zIndexChanged.don(o));const l=()=>{i.style.display=a.show??!0?"block":"none"};l(),this.d(a.showChanged.don(l));const u=()=>{i.style.opacity=`${a.opacity??1}`};u(),this.d(a.opacityChanged.don(u))}}function jc(r){let t=d.getExtProp(r,"_relativeContainer");return t||(t=document.createElement("div"),t.style.position="relative",t.style.width="100%",t.style.height="100%",t.style.padding="0",t.style.margin="0",r.appendChild(t),d.setExtProp(r,"_relativeContainer",t)),t}class xI extends d.Destroyable{constructor(e,n){super();p(this,"_subContainer",document.createElement("div"));p(this,"_overlayContainer",document.createElement("div"));p(this,"_containerStyleController");this._container=e,this._viewer=n,this._containerStyleController=this.dv(new DI(this._subContainer,this._overlayContainer,this._viewer));const{subContainer:i,overlayContainer:s}=this;i.tabIndex=-1,i.style.outline="none",i.style.width="100%",i.style.height="100%",i.onpointerdown=()=>i.focus(),s.style.position="relative",s.setAttribute("earthsdk3","earthsdk3-overlayContainer"),i.setAttribute("earthsdk3","earthsdk3-subContainer"),jc(this._container).appendChild(i),this.d(()=>jc(this._container).removeChild(i)),jc(this._container).appendChild(s),this.d(()=>jc(this._container).removeChild(s))}get subContainer(){return this._subContainer}get overlayContainer(){return this._overlayContainer}get containerStyleController(){return this._containerStyleController}get container(){return this._container}}class OI extends d.Destroyable{constructor(){super(...arguments);p(this,"registerObjsMap",new Map)}register(e,n){return this.registerObjsMap.has(e)&&console.warn(`register warn:${e}已经被注册,再次注册会覆盖。`),this.registerObjsMap.set(e,n),e}getViewerConstructor(e){const n=this.registerObjsMap.get(e);if(!n){console.warn(`未找到${e}类!`);return}return n}createViewer(e){const n=e.type;console.log(e);const i=this.getViewerConstructor(n);if(!i)throw new Error(`没有找到类型为${n}的Viewer构造器!`);return new i(e)}}class tv extends d.Destroyable{constructor(t,e,n=!1,i=!1){if(super(),this._viewer=t,!e)throw new Error("ViewerCustomInteraction: container is null");const s=this.dv(d.DomElementEvent.create(e,"pointerdown")),a=this.dv(d.DomElementEvent.create(e,"pointermove")),o=this.dv(d.DomElementEvent.create(e,"pointerup")),l=this.dv(d.DomElementEvent.create(e,"pointerout")),u=this.dv(d.DomElementEvent.create(e,"pointerover")),c=this.dv(new d.PointerClick),h=this.dv(new d.PointerHover),f=()=>{const v=this._viewer.hoverTime*1e3;h.delayTime=v};this.d(this._viewer.hoverTimeChanged.don(()=>{f()})),this.d(s.don(v=>c.pointerDown(v))),this.d(a.don(v=>c.pointerMove(v))),this.d(o.don(v=>c.pointerUp(v))),this.d(l.don(v=>c.pointerOut(v))),this.d(s.don(v=>h.pointerDown(v))),this.d(a.don(v=>h.pointerMove(v))),this.d(o.don(v=>h.pointerUp(v))),this.d(l.don(v=>h.pointerOut(v)));const{x:g,y:m}=e.getBoundingClientRect(),_=i?g:0,E=i?m:0;this.d(h.hoverEvent.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);this._viewer.hoverEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(c.clickEvent.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);this._viewer.clickEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(c.dbclickEvent.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);v.button===0&&this._viewer.dblclickEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(s.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);v.button===0&&this._viewer.pointerDownEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(o.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);v.button===0&&this._viewer.pointerUpEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(a.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);this._viewer.pointerMoveEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(u.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);this._viewer.pointerOverEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(l.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);this._viewer.pointerOutEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})}));const M=this.dv(d.DomElementEvent.create(e,"keydown"));this.d(M.don(v=>this._viewer.keyDownEvent.emit(v)));const y=this.dv(d.DomElementEvent.create(e,"keyup"));this.d(y.don(v=>this._viewer.keyUpEvent.emit(v)));const w=this.dv(d.DomElementEvent.create(e,"wheel"));this.d(w.don(v=>this._viewer.wheelEvent.emit(v)))}}class AI extends d.Destroyable{constructor(e){super();p(this,"viewer");const n=this.viewer=e;this.ad(new d.ObjResettingWithEvent(n.rollerShutterChanged,()=>{const i=n.container;if(!i||!n.rollerShutter)return;const s=new d.Destroyable;this.viewer.splitPosition=.5;let a=this.getRollerShutterDIV();return i.appendChild(a),s.d(()=>{this.viewer.splitPosition=0,i.removeChild(a)}),s}))}getRollerShutterDIV(){let e=document.createElement("div");e.style.position="absolute",e.style.left="50%",e.style.top="0",e.style.backgroundColor="#d3d3d3",e.style.width="5px",e.style.height="100%",e.style.zIndex="9999";const n=i=>{if(!e.parentElement)return;i.preventDefault?i.preventDefault():i.returnValue=!1;const a=i.x/e.parentElement.offsetWidth;e.style.left=`${100*a}%`,this.viewer.splitPosition=a};return e.addEventListener("mouseenter",i=>{e.style.cursor="ew-resize"}),e.addEventListener("mouseleave",i=>{e.style.cursor="default"}),e.addEventListener("mousedown",i=>{e.style.cursor="ew-resize",document.addEventListener("mousemove",n)}),document.addEventListener("mouseup",i=>{e.style.cursor="default",document.removeEventListener("mousemove",n)}),e}}class LI extends d.Destroyable{constructor(e){super();p(this,"rollerShutterAnalysis");this.rollerShutterAnalysis=this.ad(new AI(e))}}const fs=class fs extends d.Destroyable{constructor(e){super();p(this,"_forceRecreateEvent",this.dv(new d.Event));p(this,"_container",this.dv(d.react(void 0)));p(this,"_containerSize",this.dv(d.react(void 0)));p(this,"_editingEvent",this.disposeVar(new d.Event));p(this,"_status",this.dv(d.react("Raw")));p(this,"_statusLog",this.dv(d.react("")));p(this,"_statusContainer",this.dv(new qd(this)));p(this,"_useCustomInteraction",this.dv(d.react(!0)));p(this,"_resetInteractionEvent",this.dv(d.createNextAnimateFrameEvent(this.containerChanged,this._useCustomInteraction.changed,this._forceRecreateEvent)));p(this,"_interactionResetting",this.dv(new d.ObjResettingWithEvent(this._resetInteractionEvent,()=>{if(!(!this.container||!this._useCustomInteraction.value))return new tv(this,this.container)})));p(this,"_viewerChanged",this.dv(new d.Event));p(this,"_containerResetEvent",this.dv(d.createNextAnimateFrameEvent(this.containerChanged,this._forceRecreateEvent)));p(this,"_containerResetting",this.dv(new d.ObjResettingWithEvent(this._containerResetEvent,()=>{if(this.container)return new xI(this.container,this)})));p(this,"_sceneObjectsMap",new Map);p(this,"_id");p(this,"_typeName");p(this,"_updateFuncReact",this.dv(d.react(void 0)));p(this,"_toDestroyFuncReact",this.dv(d.react(void 0)));p(this,"_statusInfo",fs.defaults.statusInfo);p(this,"_navigationMode",this.dv(d.react("Map")));p(this,"_syncViewer",this.dv(d.react(void 0)));p(this,"_syncEventDon",this.dv(new d.ObjResettingWithEvent(this.syncViewerChanged,()=>{const e=this.syncViewer;if(e)return new MI(this,e)})));p(this,"_timeSyncdon",this.dv(new d.ObjResettingWithEvent(this.timeSyncChanged,()=>{if(this.timeSync)return new II(this)})));p(this,"_hoverEvent",this.dv(new d.Event));p(this,"_pointerOverEvent",this.dv(new d.Event));p(this,"_pointerMoveEvent",this.dv(new d.Event));p(this,"_pointerDownEvent",this.dv(new d.Event));p(this,"_pointerUpEvent",this.dv(new d.Event));p(this,"_pointerOutEvent",this.dv(new d.Event));p(this,"_clickEvent",this.dv(new d.Event));p(this,"_dblclickEvent",this.dv(new d.Event));p(this,"_keyDownEvent",this.dv(new d.Event));p(this,"_keyUpEvent",this.dv(new d.Event));p(this,"_wheelEvent",this.dv(new d.Event));p(this,"_actived",this.dv(d.react(!1)));this._id=e.id??d.createGuid();const n=B0(e.container);if(n)this._container.value=Ud(n),this._typeName=e.type,this._initName();else throw new Error("container is not defined");{const i=()=>{n&&(this.show??!0?n.style.display="block":n.style.display="none")};i(),this.d(this.showChanged.don(i))}{const i=this._sceneObjectsMap,s=()=>{for(let[o,l]of i.entries())if(!l&&o){const u=Oa.context.createEngineObject(o,this);u&&i.set(o,u)}},a=()=>{for(let[o,l]of i.entries())l&&!l.isDestroyed()&&l.destroy(),i.set(o,void 0)};this.d(a),this.d(this.viewerChanged.don(o=>{a(),o&&s()}))}{const i=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(s){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};i(),this.d(this.execOnceFuncStrChanged.don(i))}{const i=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(a){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${a}`)}};i(),this.d(this.updateFuncStrChanged.don(i));let s;this.d(()=>s&&s.destroy()),this.d(this.updateFuncChanged.don(()=>{s&&s.cancel(),this.updateFunc&&(s=s||d.createAnimateFrame(),s.restart(void 0,a=>{this.updateFunc&&this.updateFunc(this,a)}))}))}{const i=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(s){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`),this.toDestroyFunc=void 0}};i(),this.d(this.toDestroyFuncStrChanged.don(i)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}this.ad(new LI(this))}forceRecreate(){this._forceRecreateEvent.emit()}get container(){return this._container.value}set container(e){this._container.value=e}set containerOrId(e){if(typeof e=="string"){const n=document.getElementById(e);n&&n instanceof HTMLDivElement?this._container.value=Ud(n):console.warn("containerOrId warn: !(container instanceof HTMLDivElement)")}else e instanceof HTMLDivElement?this._container.value=Ud(e):console.warn("containerOrId warn: setting container failed!")}get containerChanged(){return this._container.changed}get containerSize(){return this._containerSize.value}set containerSize(e){this._containerSize.value=e}get containerSizeChanged(){return this._containerSize.changed}get editingEvent(){return this._editingEvent}get status(){return this._status.value}get statusChanged(){return this._status.changed}setStatus(e){this._status.value=e}get statusLog(){return this._statusLog.value}get statusLogChanged(){return this._statusLog.changed}setStatusLog(e){this._statusLog.value=e}get useCustomInteraction(){return this._useCustomInteraction.value}set useCustomInteraction(e){this._useCustomInteraction.value=e}get viewerChanged(){return this._viewerChanged}get containerResetEvent(){return this._containerResetEvent}get subContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.subContainer}get subContainerChanged(){return this._containerResetting.objChanged}get overlayContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.overlayContainer}get overlayContainerChanged(){return this._containerResetting.objChanged}get sceneObjectsMap(){return this._sceneObjectsMap}get sceneObjects(){return this._sceneObjectsMap.keys()}getEngineObject(e){return this.sceneObjectsMap.get(e)}add(...e){for(let n of e)if(!this.has(n)){ft.context.addSceneObject(n);const i=Oa.context.createEngineObject(n,this);i&&this._sceneObjectsMap.set(n,i),n.viewerAttached.emit(this)}}delete(...e){for(let n of e)if(this.has(n)){const i=this._sceneObjectsMap.get(n);i&&i.destroy(),ft.context.deleteSceneObject(n),this._sceneObjectsMap.delete(n),n.viewerDetached.emit(this)}}disposableAdd(...e){return this.add(...e),()=>this.delete(...e)}disAdd(...e){return this.disposableAdd(...e)}has(e){return this._sceneObjectsMap.has(e)}clearAllSceneObjects(){for(let e of this.sceneObjects)this.delete(e)}get id(){return this._id}set id(e){console.warn("ESViewer id is readonly")}get typeName(){return this._typeName}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return fs.createDefaultProps()}_getJson(e=!0){const n={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let s,a=this.defaultProps[i];a instanceof d.ReactiveVariable?s=a.equals(this[i]):s=a===this[i],s||(n[i]=this[i])}else n[i]=this[i];return n}_setJson(e,n,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const s=n||[];s.push("id","type");const a=Object.keys(this.defaultProps).filter(o=>!s.includes(o));for(let o of a)if(o in e)this[o]=e[o]===null?void 0:e[o];else if(!(i??!1)){let l=this.defaultProps[o];l instanceof d.ReactiveVariable&&(l=l.value),this[o]=l}}get json(){return this._getJson()}set json(e){this._setJson(e,["devTags"])}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get navigationMode(){return this._navigationMode.value}get navigationModeChanged(){return this._navigationMode.changed}getNavigationMode(){return this._navigationMode.value}getEngineType(){return this._typeName}get syncViewer(){return this._syncViewer.value}set syncViewer(e){this._syncViewer.value=e}get syncViewerChanged(){return this._syncViewer.changed}syncOtherViewer(e){e&&e.syncViewer&&(e.syncViewer=void 0),e===this?this._syncViewer.value=void 0:this._syncViewer.value=e}setCurrentTime(e){try{this.currentTime=typeof e=="string"?Date.parse(e):e}catch(n){console.warn(`时间格式不正确! value: ${e} error: ${n}`)}}async getVersion(){return window.g_XE3CopyRights??{}}get hoverEvent(){return this._hoverEvent}get pointerOverEvent(){return this._pointerOverEvent}get pointerMoveEvent(){return this._pointerMoveEvent}get pointerDownEvent(){return this._pointerDownEvent}get pointerUpEvent(){return this._pointerUpEvent}get pointerOutEvent(){return this._pointerOutEvent}get clickEvent(){return this._clickEvent}get dblclickEvent(){return this._dblclickEvent}get keyDownEvent(){return this._keyDownEvent}get keyUpEvent(){return this._keyUpEvent}get wheelEvent(){return this._wheelEvent}getProperties(e){return[new H("ESViewer","ESViewer",[new mt("强制刷新","重载",[],()=>this.forceRecreate(),[]),new U("debug","debug",!0,!1,[this,"debug"],fs.defaults.debug),new U("是否可见","是否可见",!0,!1,[this,"show"]),new tt("位置点单位","lonLatFormat",!0,!1,[this,"lonLatFormat"],[["度","DECIMAL_DEGREE"],["度分","DEGREES_DECIMAL_MINUTES"],["度分秒","SEXAGESIMAL_DEGREE"]]),new U("是否开启文字避让","textAvoidance",!0,!1,[this,"textAvoidance"],!1),new nt("ionAccessToken","ionAccessToken",!1,!1,[this,"ionAccessToken"]),new C("时钟","时钟",!1,!1,[this,"currentTime"]),new U("globeShow","globeShow",!0,!1,[this,"globeShow"]),new U("atmosphere","atmosphere",!1,!1,[this,"atmosphere"])]),new C("飞行像素范围","默认飞行定位时对象包围球所占的屏幕像素大小",!1,!1,[this,"flyToBoundingSize"]),new C("编辑高度偏移","编辑时默认的高度偏移",!1,!1,[this,"editingHeightOffset"]),new H("Globe","Globe",[new Y("地形着色器","可以设置地形全局坡度,坡向,高程带,等高线等",!1,!1,[this,"terrainShader"])])]}get actived(){return this._actived.value}set actived(e){this._actived.value=e}get activedChanged(){return this._actived.changed}};p(fs,"context",new OI),p(fs,"register",fs.context.register.bind(fs.context)),p(fs,"defaults",{show:!0,debug:!1,statusInfo:{fps:0,position:[0,0,0],rotation:[0,0,0],length:0},terrainShader:{slope:{show:!1},aspect:{show:!1},elevationRamp:{show:!1,minHeight:-414,maxHeight:8777,color:[]},elevationContour:{show:!1,color:[1,0,0,1],spacing:150,width:2}},globeShow:!0,splitPosition:0});let Di=fs;(r=>{r.createBaseProps=()=>({name:"未命名场景对象",extras:d.reactJson(void 0),devTags:d.reactArrayWithUndefined(void 0),debug:void 0,show:void 0,opacity:void 0,zIndex:void 0,useDefaultStatusDiv:!0,execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0}),r.createCommonProps=()=>({globeShow:!0,ionAccessToken:"",lonLatFormat:"DECIMAL_DEGREE",fov:60,textAvoidance:!1,flyToBoundingSize:256,hoverTime:2,currentTime:Date.now(),simulationTime:Date.now(),timeSync:!1,rain:0,snow:0,cloud:0,fog:0,depthOfField:0,atmosphere:!0,editingPointSize:void 0,editingPointColor:d.reactArrayWithUndefined(void 0),editingAuxiliaryPointColor:d.reactArrayWithUndefined(void 0),editingLineWidth:void 0,editingLineColor:d.reactArrayWithUndefined(void 0),editingAxisSize:void 0,editingAuxiliaryPointSize:void 0,editingHeightOffset:0,editingLineShow:!0,editingEventListening:!0,terrainShader:r.defaults.terrainShader,splitPosition:d.react(void 0),rollerShutter:!1}),r.createDefaultProps=()=>({...(0,r.createBaseProps)(),...(0,r.createCommonProps)()})})(Di||(Di={})),d.extendClassProps(Di.prototype,Di.createDefaultProps);function ev(r,t){const e=r._lastCameraInfo;if(e){const n=t.viewerChanged.don(i=>{if(!i||!e)return;const{position:s,rotation:a}=e;t.flyIn(s,a,0),r._lastCameraInfo=void 0,n()})}}const RI=r=>{const t=Di.createCommonProps(),e={};try{Object.keys(t).forEach(n=>{e[n]=r[n]})}catch(n){console.warn(n)}return e},rv=(r,t)=>{const e=Di.createCommonProps();try{Object.keys(e).forEach(n=>{r[n]=t[n]})}catch(n){console.warn(n)}};class FI extends d.Destroyable{constructor(e){super();p(this,"_viewersChanged",this.disposeVar(new d.Event));p(this,"_viewers",new Set);p(this,"_viewersToChange",this.dv(new d.Event));this._sceneObjectsManager=e,this.d(()=>{for(const n of this._viewers)this.destroyViewer(n);this._viewers.clear()}),this.viewers.forEach(n=>{const i=this._sceneObjectsManager.sceneObjects;n.add(...i)}),this.d(()=>{const n=this._sceneObjectsManager.sceneObjects;this.viewers.forEach(i=>{i.delete(...n)})}),this.d(this._sceneObjectsManager.sceneObjectsToChange.don((n,i)=>{this.viewers.forEach(s=>{i.forEach(a=>{Ds(s.devTags,a.devTags)&&(s.has(a)?console.warn(`${s.typeName}中已存${a.typeName},检查逻辑是否有问题!`):s.add(a))}),n.forEach(a=>{Ds(s.devTags,a.devTags)&&(s.has(a)?s.delete(a):console.warn(`${s.typeName}中不存在${a.typeName},检查逻辑是否有问题!`))})}),i.length>0&&i.forEach(s=>{s.d(s.devTagsChanged.don(()=>{this.viewers.forEach(a=>{a.has(s)&&a.delete(s),console.log("sceneObjectsToChange",a.devTags,s.devTags,Ds(a.devTags,s.devTags)),Ds(a.devTags,s.devTags)&&(a.has(s)?console.warn(`${a.typeName}中已存${s.typeName},检查逻辑是否有问题!`):a.add(s))})}))})})),this.d(this.viewersChanged.don((n,i)=>{const s=this._sceneObjectsManager.sceneObjects;i.forEach(a=>{for(let o of s)Ds(a.devTags,o.devTags)&&(a.has(o)?console.warn(`${a.typeName}中已存${o.typeName},检查逻辑是否有问题!`):a.add(o))}),n.forEach(a=>{for(let o of s)Ds(a.devTags,o.devTags)&&(a.has(o)?a.delete(o):console.warn(`${a.typeName}中不存在${o.typeName},检查逻辑是否有问题!`))}),i.length>0&&i.forEach(a=>{a.d(a.devTagsChanged.don(()=>{a.clearAllSceneObjects();const o=this._sceneObjectsManager.sceneObjects;for(let l of o)console.log("viewersChanged",a.devTags,l.devTags,Ds(a.devTags,l.devTags)),Ds(a.devTags,l.devTags)&&(a.has(l)?console.warn(`${a.typeName}中已存${l.typeName},检查逻辑是否有问题!`):a.add(l))}))})}))}get viewersChanged(){return this._viewersChanged}get viewers(){return this._viewers}getViewers(){return[...this._viewers]}get viewersToChange(){return this._viewersToChange}createViewer(e){const n=Di.context.createViewer(e);return this._viewers.add(n),this._viewersChanged.emit([],[n]),n}destroyViewer(e){return e.isDestroyed()?!0:(this._viewers.delete(e),this._viewersChanged.emit([e],[]),e.destroy(),e.isDestroyed())}}class Sa extends d.Destroyable{constructor(...e){super();p(this,"_drgm",this.dv(new d0));p(this,"_sobjm",this.dv(new CI));p(this,"_vrm",this.dv(new FI(this._sobjm)));p(this,"_sceneObjectEditingManager",this.disposeVar(new PI));p(this,"_activeViewer",this.dv(d.react(void 0)));p(this,"_syncOtherViewersToActived",this.dv(d.react(!1)));p(this,"_cmrvm",this.createSceneObjectFromClass(ya));p(this,"_cmrvmdon",this.d(()=>this._cmrvm&&this.destroySceneObject(this._cmrvm)));p(this,"_asset",{type:"ESObjectsManager",version:"0.1.0",createdTime:"",modifiedTime:"",name:"未命名项目"});p(this,"_sceneTree",this.dv(new Ah("default",this.dragstartDataMananger,24,this)));p(this,"_propUiTreeManager",this.dv(new Du(24)));p(this,"_sceneTreeMap",new Map);p(this,"_viewerCreatedEvent",this.dv(new d.Event));p(this,"_lastCameraInfo");p(this,"_lastActiveViewerJson");p(this,"syncEvent",this.dv(d.createNextAnimateFrameEvent(this.activeViewerChanged,this.syncOtherViewersToActivedChanged)));p(this,"_syncEventDon",this.d(this.syncEvent.don(()=>{const e=this.syncOtherViewersToActived;this.viewers.forEach(n=>{e?n.syncOtherViewer(this.activeViewer):n.syncOtherViewer(void 0)})})));p(this,"_player",this.createSceneObjectFromClass(As));p(this,"_playerdon",this.d(()=>this._player&&this.destroySceneObject(this._player)));p(this,"_esPlyarAndPathTime",this.dv(new vI(this)));p(this,"_pathAnimationManager",this.dv(new _I(this)))}static get envs(){return ft.context.environmentVariables}getSceneObjectById(e){return ft.getSceneObjectById(e)}getSceneObject(e){return ft.getSceneObject(e)}get $refs(){return ft.$refs}get dragstartDataMananger(){return this._drgm}get sceneObjectsManager(){return this._sobjm}get viewers(){return this._vrm.viewers}getViewers(){return this._vrm.getViewers()}get sceneObjectEditingManager(){return this._sceneObjectEditingManager}get activeViewer(){return this._activeViewer.value}set activeViewer(e){this._activeViewer.value=e}get activeViewerChanged(){return this._activeViewer.changed}get syncOtherViewersToActived(){return this._syncOtherViewersToActived.value}set syncOtherViewersToActived(e){this._syncOtherViewersToActived.value=e}get syncOtherViewersToActivedChanged(){return this._syncOtherViewersToActived.changed}get cameraViewsManager(){return this._cmrvm}get json(){var h;const e=this._asset.createdTime||new Date().toISOString(),n=new Date().toISOString(),i=this._asset.name||"未命名项目",a={type:"ESObjectsManager",version:this._asset.version||"0.1.0",createdTime:e,modifiedTime:n,name:i},o=this.sceneTree.json,l=this._cmrvm.views,u=[...this._vrm.viewers].map(f=>f.json),c=(h=this.activeViewer)==null?void 0:h.getCurrentCameraInfo();return{asset:a,viewers:u,sceneTree:o,viewCollection:l,lastView:c}}set json(e){try{if(!e.asset)return;if(!e.asset.type||e.asset.type!=="ESObjectsManager"){console.warn("json装配失败! asset.type 不存在或者不是'ESObjectsManager'");return}if(this._asset.createdTime=e.asset&&e.asset.createdTime||new Date().toISOString(),this._asset.modifiedTime=e.asset&&e.asset.modifiedTime||"",this._asset.name=e.asset&&e.asset.name||"未命名项目",this._asset.version=e.asset&&e.asset.version||"0.1.0",e.sceneTree&&(this.sceneTree.json=e.sceneTree),e.viewCollection&&(this._cmrvm.views=e.viewCollection),!e.viewers||!Array.isArray(e.viewers)){console.warn("viewers is not an array or does not exist !");return}if(this._vrm.viewers.size===0||e.viewers.length===0){console.warn("viewers is empty !");return}this._vrm.viewers.forEach(n=>{const i=e.viewers.find(s=>s.id===n.id);i&&(n.json=i)})}catch(n){console.error(`ESObjectsManager解析json数据时发生错误! error: ${n}`)}}get sceneTree(){return this._sceneTree}get jsonLoadingEvent(){return this._sceneTree.jsonLoadingEvent}get propUiTreeManager(){return this._propUiTreeManager}propTreeCallback(e){return wI(this,e)}getSceneTrees(){return[...this._sceneTreeMap.values()]}getSceneTree(e="default"){if(e==="default")return this._sceneTree;if(!this._sceneTreeMap.has(e)){console.warn(`id为${e}的SceneTree不存在!`);return}return this._sceneTreeMap.get(e)}createSceneTree(e,n=24){if(this._sceneTreeMap.has(e)||e==="default")console.warn(`id为${e}的SceneTree已存在!`);else{const i=this.dv(new Ah(e,this.dragstartDataMananger,n,this));this._sceneTreeMap.set(e,i)}return this.getSceneTree(e)}get viewerCreatedEvent(){return this._viewerCreatedEvent}createViewer(e){const n=this._vrm.createViewer(e);this.activeViewer||(this.activeViewer=n);const i=this.d(n.viewerChanged.don(s=>{s&&(this._viewerCreatedEvent.emit(n),i())}));return n}destroyViewer(e){return this._activeViewer.value===e&&(this._activeViewer.value=void 0),this._vrm.destroyViewer(e)}switchViewer(e,n=!0,i=!0,s=!0){var u;this.activeViewer&&this.activeViewer.getNavigationMode()!=="Map"&&this.activeViewer.changeToMap(),!this._lastCameraInfo&&n&&(this._lastCameraInfo=(u=this.activeViewer)==null?void 0:u.getCurrentCameraInfo()),!this._lastActiveViewerJson&&i&&(this._lastActiveViewerJson=this.activeViewer?RI(this.activeViewer):void 0),s&&this.activeViewer&&this.destroyViewer(this.activeViewer);const a=e.id,o=a?[...this.getViewers()].find(c=>c.id===a):[...this.getViewers()].find(c=>c.typeName===e.type);if(o)if(a&&o.typeName!==e.type)console.warn(`id为${a}的viewer的typeName和option.type${e.type}不相同!,虽然id一致但是typeName不同,所以会销毁并创建新的viewer`),this.destroyViewer(o);else return console.log("ESViewer exists, will be used"),n&&ev(this,o),i&&this._lastActiveViewerJson&&(rv(o,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),o.container===B0(e.container)?(o.containerOrId=e.container,o.forceRecreate()):o.containerOrId=e.container,this.activeViewer=o,o;console.log("No ESViewer exists, will be created");const l=this.createViewer(e);return console.log(e),console.log(this),n&&ev(this,l),i&&this._lastActiveViewerJson&&(rv(l,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),this.activeViewer=l,l}switchToCesiumViewer(...e){if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)){const{container:n,viewSync:i,attributeSync:s,destroy:a,id:o}=e[0];return this.switchViewer({type:"ESCesiumViewer",container:n,id:o},i??!0,s??!0,a??!0)}else if(typeof e[0]=="string"||e[0]instanceof HTMLDivElement){const n={container:e[0],viewSync:e[1]??!0,attributeSync:e[2]??!0,destroy:e[3]??!0,id:e[4]},{container:i,viewSync:s,attributeSync:a,destroy:o,id:l}=n;return this.switchViewer({type:"ESCesiumViewer",container:i,id:l},s,a,o)}}switchToUEViewer(...e){let n,i={viewSync:!0,attributeSync:!0,destroy:!0};if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("uri")){const{container:l,uri:u,app:c,token:h,viewSync:f,attributeSync:g,destroy:m,id:_}=e[0];n={type:"ESUeViewer",container:l,id:_,options:{uri:u,app:c,token:h}},i={viewSync:f??!0,attributeSync:g??!0,destroy:m??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("ws")){const{container:l,ws:u,esmsg:c,viewSync:h,attributeSync:f,id:g,destroy:m}=e[0];n={type:"ESUeViewer",container:l,id:g,options:{ws:u,esmsg:c}},i={viewSync:h??!0,attributeSync:f??!0,destroy:m??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("project")){const{container:l,project:u,baseUrl:c,viewSync:h,attributeSync:f,id:g,destroy:m}=e[0];n={type:"ESUeViewer",container:l,id:g,options:{project:u,baseUrl:c}},i={viewSync:h??!0,attributeSync:f??!0,destroy:m??!0}}else(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?(n={type:"ESUeViewer",container:e[0],id:e[6],options:{ws:e[1],esmsg:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}):typeof e[1]=="string"&&e[1].startsWith("http")?(n={type:"ESUeViewer",container:e[0],id:e[7],options:{uri:e[1],app:e[2],token:e[3]??void 0}},i={viewSync:e[4]??!0,attributeSync:e[5]??!0,destroy:e[6]??!0}):(n={type:"ESUeViewer",container:e[0],id:e[6],options:{project:e[1],baseUrl:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}));if(!n)throw new Error("参数错误");const{viewSync:s,attributeSync:a,destroy:o}=i;return this.switchViewer(n,s,a,o)}createCesiumViewer(...e){let n;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?n={...e[0],type:"ESCesiumViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(n={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESCesiumViewer"}),!n)throw new Error("参数错误");return this.createViewer(n)}createOpenLayersViewer(...e){let n;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?n={...e[0],type:"ESOlViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(n={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESOlViewer"}),!n)throw new Error("参数错误");return this.createViewer(n)}createUeViewer(...e){let n;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?n={...e[0],type:"ESUeViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?n={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{ws:e[1],esmsg:e[2]??void 0}}:typeof e[1]=="string"&&e[1].startsWith("http")?n={type:"ESUeViewer",container:e[0],id:e[4]??void 0,options:{uri:e[1],app:e[2],token:e[3]??void 0}}:n={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{project:e[1],baseUrl:e[2]??void 0}}),!n)throw new Error("参数错误");return this.createViewer(n)}createSceneObject(e,n){return this._sobjm.createSceneObject(e,n)}createSceneObjectFromClass(e,n){return this._sobjm.createSceneObjectFromClass(e,n)}createSceneObjectFromJson(e){return this._sobjm.createSceneObjectFromJson(e)}destroySceneObject(e){const n=this._sobjm.deleteSceneObject(e);return e.destroy(),n}destroyAllSceneObjects(){const e=[...this._sobjm.sceneObjects];for(let n of e)n!=this._player&&n!=this._cmrvm&&this.destroySceneObject(n)}get player(){return this._player}get esPlyarAndPathTime(){return this._esPlyarAndPathTime}get pathAnimationManager(){return this._pathAnimationManager}}p(Sa,"getSceneObjById",ft.context.getSceneObjectById.bind(ft.context)),p(Sa,"getEnv",ft.context.getEnv.bind(ft.context)),p(Sa,"setEnv",ft.context.setEnv.bind(ft.context)),(r=>{r.createDefaultProps=()=>({})})(Sa||(Sa={})),d.extendClassProps(Sa.prototype,Sa.createDefaultProps);function GI(){const r=navigator.userAgent;let t="Unknown";/Windows/.test(r)?t="Windows":/Macintosh/.test(r)?t="MacOS":/Linux/.test(r)?t="Linux":/Android/.test(r)?t="Android":/iOS|iPhone|iPad|iPod/.test(r)&&(t="iOS");let e="Unknown";return/x64|x86_64|Win64|WOW64/.test(r)?e="x64":/x86|i686|Win32/.test(r)?e="x86":/arm64|aarch64/.test(r)?e="arm64":/arm/.test(r)&&(e="arm"),{os:t.toLocaleLowerCase(),arch:e.toLocaleLowerCase()}}const kI=Date.now();function nv(r){const{os:t,arch:e}=GI(),n={version:r.version,commitdate:r.date,commitId:r.commitId,runningTime:(Date.now()-kI)/1e3/60|0,date:new Date().toLocaleString(),href:window.location.href,os:t,arch:e},s={method:"GET",headers:new Headers,redirect:"follow"},a=window.encodeURIComponent(JSON.stringify(n));fetch(`https://account.bjxbsj.cn/api/product/record?product=EarthSDKJS&content=${a}`,s).then(o=>o.text()).then(o=>console.log(o)).catch(o=>console.log("error",o))}N.copyright=void 0;try{const r="earthsdk3",t="3.3.0-beta.1",e="2025-07-14T10:15:14.000Z",n="北京西部世界科技有限公司",i="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="28c321c9f83bd5014ca1221e6423a406e169d3fb",o=((Date.now()-1752488114e3)/36e5).toFixed(1),l=`%c🌏 ${r}%c ${t}.${s.slice(0,8)}.${e} (距今${o}个小时)
|
|
538
538
|
%c${i?i+`
|
|
539
539
|
`:""}当前网站正在使用${r},此软件版权归${n}所有
|
|
540
|
-
`;N.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","
|
|
540
|
+
`;N.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","28c321c9f83bd5014ca1221e6423a406e169d3fb")},get info(){return l},get date(){return"2025-07-14T10:15:14.000Z"},get author(){return"suplyang"},get version(){return"3.3.0-beta.1"},get name(){return"earthsdk3"},get commitId(){return"28c321c9f83bd5014ca1221e6423a406e169d3fb"},print(){console.info(this.info,`
|
|
541
541
|
font-size: 18px;
|
|
542
542
|
font-weight: 1000;
|
|
543
543
|
line-height: 1;
|
|
@@ -554,4 +554,4 @@ ${K0}
|
|
|
554
554
|
color: rgb(0, 120, 215);
|
|
555
555
|
padding-bottom: 2px;
|
|
556
556
|
padding-left: 35px;
|
|
557
|
-
`)}}),window.g_XE3CopyRights=window.g_XE3CopyRights||{},window.g_XE3CopyRights[r]=N.copyright,window.g_XE3SendProductUsageInfo=window.g_XE3SendProductUsageInfo||!0,window.g_XE3SendProductUsageInfo&&(setTimeout(()=>nv(N.copyright),6e4),setInterval(()=>nv(N.copyright),864e5)),window.g_earthsdk_copyright_print=window.g_earthsdk_copyright_print??!0,window.g_earthsdk_copyright_print&&N.copyright.print()}catch{console.warn("版本信息有误!")}return N.BasePropTreeItem=Ld,N.Boolean2Property=_v,N.Boolean2sProperty=Sv,N.Boolean3Property=wv,N.Boolean3sProperty=Pv,N.Boolean4Property=Ev,N.Boolean4sProperty=Cv,N.BooleanProperty=U,N.BooleansProperty=cv,N.ColorProperty=it,N.ColorRgbProperty=Nv,N.DashPatternProperty=bv,N.DateProperty=Gi,N.DatesProperty=pf,N.DragStartDataManager=d0,N.ES3DTileset=Je,N.ESAlarm=eo,N.ESApertureEffect=ro,N.ESAreaMeasurement=Rh,N.ESBlastParticleSystem=no,N.ESBoxClipping=io,N.ESCameraView=va,N.ESCameraViewCollection=ya,N.ESCameraVisibleRange=so,N.ESCar=ao,N.ESCityBasePoint=ll,N.ESClassification=_a,N.ESClippingPlane=oo,N.ESCustomDiv=wa,N.ESCzml=ul,N.ESDataMesh=lo,N.ESDatasmithRuntimeModel=Xo,N.ESDirectionMeasurement=Ao,N.ESDistanceMeasurement=uo,N.ESDynamicWater=Yo,N.ESEntityCluster=al,N.ESExcavate=xs,N.ESFireParticleSystem=ho,N.ESForestTileset=co,N.ESGaussianSplatting=dl,N.ESGeoDiv=fo,N.ESGeoDivTextPoi=ol,N.ESGeoExtrudedPolygon=Os,N.ESGeoJson=Lo,N.ESGeoLineString=hn,N.ESGeoPolygon=At,N.ESGeoRectangle=po,N.ESGeoVector=Et,N.ESGeoWater=Jo,N.ESGltfModel=go,N.ESHeatMap=ml,N.ESHeightLimitAnalysis=sl,N.ESHeightMeasurement=Ro,N.ESHole=jo,N.ESHuman=rs,N.ESHumanPoi=$o,N.ESImageLabel=mo,N.ESImageryLayer=vo,N.ESJEditingMode=vt,N.ESJLonLatFormat=op,N.ESJPickedResult=Fv,N.ESLabel=Re,N.ESLevelRuntimeModel=Ko,N.ESLocalCircle=Fo,N.ESLocalPolygon=is,N.ESLocalPolygonZ=Go,N.ESLocalRectangle=ko,N.ESLocalSkyBox=yo,N.ESLocalVector=Ti,N.ESLocalVector2D=
|
|
557
|
+
`)}}),window.g_XE3CopyRights=window.g_XE3CopyRights||{},window.g_XE3CopyRights[r]=N.copyright,window.g_XE3SendProductUsageInfo=window.g_XE3SendProductUsageInfo||!0,window.g_XE3SendProductUsageInfo&&(setTimeout(()=>nv(N.copyright),6e4),setInterval(()=>nv(N.copyright),864e5)),window.g_earthsdk_copyright_print=window.g_earthsdk_copyright_print??!0,window.g_earthsdk_copyright_print&&N.copyright.print()}catch{console.warn("版本信息有误!")}return N.BasePropTreeItem=Ld,N.Boolean2Property=_v,N.Boolean2sProperty=Sv,N.Boolean3Property=wv,N.Boolean3sProperty=Pv,N.Boolean4Property=Ev,N.Boolean4sProperty=Cv,N.BooleanProperty=U,N.BooleansProperty=cv,N.ColorProperty=it,N.ColorRgbProperty=Nv,N.DashPatternProperty=bv,N.DateProperty=Gi,N.DatesProperty=pf,N.DragStartDataManager=d0,N.ES3DTileset=Je,N.ESAlarm=eo,N.ESApertureEffect=ro,N.ESAreaMeasurement=Rh,N.ESBlastParticleSystem=no,N.ESBoxClipping=io,N.ESCameraView=va,N.ESCameraViewCollection=ya,N.ESCameraVisibleRange=so,N.ESCar=ao,N.ESCityBasePoint=ll,N.ESClassification=_a,N.ESClippingPlane=oo,N.ESCustomDiv=wa,N.ESCzml=ul,N.ESDataMesh=lo,N.ESDatasmithRuntimeModel=Xo,N.ESDirectionMeasurement=Ao,N.ESDistanceMeasurement=uo,N.ESDynamicWater=Yo,N.ESEntityCluster=al,N.ESExcavate=xs,N.ESFireParticleSystem=ho,N.ESForestTileset=co,N.ESGaussianSplatting=dl,N.ESGeoDiv=fo,N.ESGeoDivTextPoi=ol,N.ESGeoExtrudedPolygon=Os,N.ESGeoJson=Lo,N.ESGeoLineString=hn,N.ESGeoPolygon=At,N.ESGeoRectangle=po,N.ESGeoVector=Et,N.ESGeoWater=Jo,N.ESGltfModel=go,N.ESHeatMap=ml,N.ESHeightLimitAnalysis=sl,N.ESHeightMeasurement=Ro,N.ESHole=jo,N.ESHuman=rs,N.ESHumanPoi=$o,N.ESImageLabel=mo,N.ESImageryLayer=vo,N.ESJEditingMode=vt,N.ESJLonLatFormat=op,N.ESJPickedResult=Fv,N.ESLabel=Re,N.ESLevelRuntimeModel=Ko,N.ESLocalCircle=Fo,N.ESLocalPolygon=is,N.ESLocalPolygonZ=Go,N.ESLocalRectangle=ko,N.ESLocalSkyBox=yo,N.ESLocalVector=Ti,N.ESLocalVector2D=Yr,N.ESLocationMeasurement=_o,N.ESMsTileset=rl,N.ESNavigator=hl,N.ESObjectWithLocation=$,N.ESObjectsManager=Sa,N.ESParticleSystemPrimitive=wo,N.ESPath=Ls,N.ESPathImpl=Ea,N.ESPipeFence=zo,N.ESPipeline=Qo,N.ESPipeserTileset=Vo,N.ESPit=ss,N.ESPlayer=As,N.ESPoi2D=ns,N.ESPoi3D=Eo,N.ESPoiTileset=nl,N.ESPolygonFence=Uo,N.ESPolygonFlattenedPlane=So,N.ESPolygonWithHole=Wo,N.ESRectangle=qo,N.ESRtsFeatureEditing=el,N.ESRtsTileset=tl,N.ESScale=il,N.ESSceneObject=ft,N.ESSceneObjectWithId=VC,N.ESSeparateFoliage=Po,N.ESSkylineAnalysis=gl,N.ESStaticMesh=pl,N.ESSubmergingAnalysis=Co,N.ESSunshineAnalysis=Io,N.ESSurfaceAreaMeasurement=Ho,N.ESTerrainLayer=Mo,N.ESTextLabel=No,N.ESUEWidget=bo,N.ESUnrealActor=To,N.ESVideoFusion=Do,N.ESViewShed=xo,N.ESViewer=Di,N.ESViewerStatusBar=cl,N.ESViewerStatusBarScale=fl,N.ESVisibilityAnalysis=Bo,N.ESVisualObject=Ot,N.ESVolumeMeasurement=Zo,N.ESWidget=Oo,N.EngineObject=Oa,N.EnumProperty=tt,N.EnumStringsProperty=Tv,N.EvalStringProperty=Fi,N.FunctionProperty=mt,N.GroupPropTreeItem=Fd,N.GroupProperty=H,N.JsonProperty=Y,N.LeafPropTreeItem=Rd,N.LongStringProperty=Xh,N.MaximumScreenSpaceErrorProperty=uv,N.MinmaxProperty=Dv,N.NearFarScalerProperty=xv,N.NonreactiveJsonStringProperty=ip,N.Number2Property=se,N.Number2sProperty=rp,N.Number3Property=Qe,N.Number3sProperty=df,N.Number4Property=Lr,N.Number4WithUndefinedProperty=vv,N.Number4sProperty=yv,N.NumberProperty=C,N.NumberRangeProperty=Ov,N.NumberSliderProperty=Kt,N.NumbersProperty=hv,N.ParamsProperty=np,N.PickedInfo=Rv,N.Player=bi,N.PlayerProperty=Yh,N.PositionProperty=li,N.PositionsProperty=sp,N.PositionsSetPropety=Lv,N.PropTree=S0,N.PropUiTreeManager=Du,N.Property=Ys,N.ReactVarProperty=Rt,N.RotationProperty=Jh,N.SceneObjectFromId=Gd,N.SceneTree=Ah,N.SceneTreeContextMenu=E0,N.SceneTreeItem=Or,N.SceneTreeItemDragDrop=w0,N.String2Property=fv,N.String2sProperty=ep,N.String3Property=dv,N.String3sProperty=gv,N.String4Property=pv,N.String4sProperty=mv,N.StringNumberProperty=Iv,N.StringNumbersProperty=Mv,N.StringProperty=nt,N.StringsProperty=tp,N.TreeItemDragDrop=p0,N.UriProperty=ku,N.ViewPlayerProperty=ap,N.ViewerCustomInteraction=tv,N.Watcher=Lh,N.WatcherTools=C0,N.WithUndefinedProperty=ff,N.addTreesCallFunc=x0,N.bindCustomEditing=v0,N.booleanPointInPolygon=l1,N.cartesianDistance=f0,N.clamp0_360=Tu,N.clampN180_180=m0,N.createPropTreeFromSceneObject=P0,N.cutDownTreesCallFunc=L0,N.defaultInitSceneObjectOnCreatingFunc=wC,N.defaultLight122FromEnvironmentMapManager=Ad,N.defaultUpdateSceneObjectOnPickingFunc=_C,N.equalsN3=mf,N.geoAlong=u1,N.geoArea=ld,N.geoBuffer=dm,N.geoCenterOfMass=h1,N.geoDestination=c1,N.geoDifference=pm,N.geoDistance=ud,N.geoHeading=Lc,N.geoIntersect=cm,N.geoLineIntersect=f1,N.geoNearestPointOnLine=p1,N.geoPointToLineDistance=g1,N.geoPolygonFromCircle=gm,N.geoPolygonOverlap=hd,N.geoRhumbDestination=m1,N.geoRhumbDistance=hm,N.geoRhumbHeading=v1,N.geoUnion=fm,N.getDefaultValue=CC,N.getDistancesFromPositions=Oh,N.getGeoBoundingSphereFromPositions=y1,N.getMidpoint=d1,N.getMinMaxCorner=mm,N.getSceneObjectTreeItem=EC,N.getXyzFromPostion=Dd,N.growthSimulationCallFunc=R0,N.hasSameTags=g0,N.hasSameViewerTags=Ds,N.inOrderRunning=IC,N.isJSONString=PC,N.lbhToWebMerc=vC,N.lbhToXyz=es,N.lerpAngle=Kc,N.lerpRotation=xd,N.map=up,N.optionsStr=D0,N.reactPosition2Ds=gf,N.registerCreatedEventUpdate=HC,N.registerEventUpdate=FC,N.removeAllTreesCallFunc=O0,N.rpToap=SC,N.setSceneObjectTreeItem=Jc,N.updateTreeParamsCallFunc=A0,N.webMercToLbh=yC,N.xyzToLbh=h0,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"}),N}({},xbsj_base);
|