Cesium-Examples/libs/plotting/leaflet/11.1.1/iclient-plot-leaflet-es6.min.js
2025-03-11 17:51:04 +08:00

11 lines
1018 KiB
JavaScript

/*!
*
* iclient-plot-leaflet.(https://iclient.supermap.io)
* Copyright© 2000 - 2023 SuperMap Software Co.Ltd
* version: v11.1.1
*
*/(()=>{var t={705:()=>{L.Path.include({onBefore:function(t){this._renderer._beforePath(this,t),this._reset(),this._renderer._addPath(this)}})},714:()=>{L.SVG.include({_drawPlottingLayers:function(t){t.map(function(e){return e instanceof L.Polyline&&e._update(),e instanceof L.Polygon&&e._update(),t})},getEvents:function(){var t=this;this._map.on("layeradd",function(e){e.layer===t&&(L.DomEvent.on(t._container,"mousemove",L.Util.throttle(t._onMouseMove,32,t),t),L.DomEvent.on(t._container,"mouseout",t._handleMouseOut,t))});var e=L.Renderer.prototype.getEvents.call(this);return e.zoomstart=this._onZoomStart,e},_onClick:function(t){var e,i=this._map.mouseEventToLayerPoint(t),o=[],l=[];for(var s in this._layers){var n=this._layers[s];if(n.options.interactive&&"function"==typeof n._containsPoint&&n._containsPoint(i)&&!this._map._draggableMoved(n)&&(e=n,Object.prototype.hasOwnProperty.call(e,"_eventParents")&&null!=e._eventParents))for(var a in e._eventParents)l.push(e),o.push(e._eventParents[a])}if(e&&l.length>1){if(o.length>0){var r=!1,p=[],u=[];for(let t=0,e=o.length;t<e;t++)o[t].isSelected&&o[t].moveend&&(r=!0),o[t].enableEdit&&(p.push(o[t]),u.push(l[t]));for(let e=0,i=p.length;e<i;e++){if(p[e].isSelected&&p[e].moveend){p[e].moveend=!1,this._fireEvent([u[e]],t),p[e].moveend=!0;break}if(p[e].isSelected&&p.length>1){this._fireEvent([u[e]],t);break}if(!r){this._fireEvent([u[u.length-1]],t);break}}}}else e&&e._eventParents[0]&&e._eventParents[0].fire(t.type,t)},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(L.DomUtil.removeClass(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,e){var i,o;for(var l in this._layers)(i=this._layers[l]).options.interactive&&"function"==typeof i._containsPoint&&i._containsPoint(e)&&(o=i);o!==this._hoveredLayer&&(this._handleMouseOut(t),o&&(L.DomUtil.addClass(this._container,"leaflet-interactive"),this._fireEvent([o],t,"mouseover"),this._hoveredLayer=o)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_updateTextPt:function(t,e,i,o){var l;if(t.setAttributeNS(null,"x",e.x),t.setAttributeNS(null,"y",e.y),i.options.display&&t.setAttributeNS(null,"display",i.options.display),!0===i.options.fontStroke&&(i.options.fontStrokeColor&&t.setAttributeNS(null,"stroke",i.options.fontStrokeColor),i.options.fontStrokeWidth&&t.setAttributeNS(null,"stroke-width",i.options.fontStrokeWidth)),i.options.labelRotation&&t.setAttributeNS(null,"transform","rotate("+i.options.labelRotation+" "+e.x+","+e.y+")"),i.options.fontColor&&t.setAttributeNS(null,"fill",i.options.fontColor),i.options.fontOpacity&&t.setAttributeNS(null,"opacity",i.options.fontOpacity),i.options.fontFamily&&t.setAttributeNS(null,"font-family",i.options.fontFamily),i.options.fontSize&&t.setAttributeNS(null,"font-size",i.options.fontSize),i.options.fontWeight&&t.setAttributeNS(null,"font-weight",i.options.fontWeight),i.options.fontStyle&&t.setAttributeNS(null,"font-layer.options",i.options.fontStyle),L.Browser.gecko){if(100!==i.options.fontPercent&&0!==i.options.fontSpace&&(l=i.options.fontSpace+i.options.fontPercent/100*parseFloat(i.options.fontSize)*i.options.text.length),100!==i.options.fontPercent&&0===i.options.fontSpace){var s=document.createElement("span");document.body.appendChild(s),s.style.width="auto",s.style.height="auto",i.options.fontSize&&(s.style.fontSize=new String(i.options.fontSize)+"px"),i.options.fontFamily&&(s.style.fontFamily=i.options.fontFamily),i.options.fontWeight&&(s.style.fontWeight=i.options.fontWeight),s.style.position="absolute",s.style.visibility="hidden",s.innerHTML=i.options.text;var n=s.clientWidth;l=i.options.fontPercent/100*n+i.options.text.length}t.setAttributeNS(null,"textLength",l),t.setAttributeNS(null,"lengthAdjust","spacingAndGlyphs")}t.setAttributeNS(null,"pointer-events","visible");var a=i.options.labelAlign||"cm";t.setAttributeNS(null,"text-anchor",L.SVG.LABEL_ALIGN[a[0]]||"middle"),!0===L.Browser.gecko&&t.setAttributeNS(null,"dominant-baseline",L.SVG.LABEL_ALIGN[a[1]]||"central");for(var r=function(){let t=L.SVG.LABEL_VFACTOR[a[1]];null==t&&(t=-.5);let e=t*(u-1);return L.Browser.ie&&(null===(t=L.SVG.LABEL_IE_VOFFSET[a[1]])&&(t=.35),e+=t),e},p=i.options.text.split("\n"),u=p.length;t.childNodes.length>u;)t.removeChild(t.lastChild);for(var h=0;h<u;h++){var g=e.x;if(0!==i.options.fontSpace||100!==i.options.fontPercent&&L.Browser.ie){let e=SuperMap.Plot.PlottingUtil.getTextWidth(i.options,p[h]);"c"===a[0]?g-=e/2:"r"===a[0]&&(g-=e);for(var c=0,y=p[h].split(""),P="",S=0;S<y.length;S++){let e=o+"tspan"+h+S;i._tspanNodeObj&&i._tspanNodeObj[e]||(i._tspanNodeObj[e]=L.SVG.create("tspan"));let l=i._tspanNodeObj[e];!1===L.Browser.gecko&&l.setAttributeNS(null,"baseline-shift",L.SVG.LABEL_VSHIFT[a[1]]||"-35%");var d=SuperMap.Plot.PlottingUtil.getTextWidth(i.options,y[S]);l.setAttributeNS(null,"textLength",d),l.setAttributeNS(null,"lengthAdjust","spacingAndGlyphs"),l.setAttribute("x",g+c+(0===h?0:d>>>1)),0!==S?l.setAttribute("dy","0em"):0===h?l.setAttribute("dy",r()+"em"):l.setAttribute("dy","1em");let s=""===y[S]?" ":y[S];i.options.isUnicode?L.Browser.ie||L.Browser.ielt9?(this.element.innerHTML=s,l.textContent=this.element.innerHTML):l.innerHTML=s:l.textContent=s,l.parentNode||t.appendChild(l),P+=y[S],c=SuperMap.Plot.PlottingUtil.getTextWidth(i.options,P)+parseFloat(i.options.fontSpace)*(i.options.fontPercent/100)}}else{let l=o+"tspan"+h;i._tspanNodeObj&&i._tspanNodeObj[l]||(i._tspanNodeObj[l]=L.SVG.create("tspan"));let s=i._tspanNodeObj[l];if(!1===L.Browser.gecko&&s.setAttributeNS(null,"baseline-shift",L.SVG.LABEL_VSHIFT[a[1]]||"-35%"),100!==i.options.fontPercent){let t=SuperMap.Plot.PlottingUtil.getTextWidth(i.options,p[h]);s.setAttributeNS(null,"textLength",t),s.setAttributeNS(null,"lengthAdjust","spacingAndGlyphs")}s.setAttribute("x",e.x),0==h?s.setAttribute("dy",r()+"em"):s.setAttribute("dy","1em");let n=""===p[h]?" ":p[h];i.options.isUnicode?L.Browser.ie||L.Browser.ielt9?(this.element.innerHTML=n,s.textContent=this.element.innerHTML):s.innerHTML=n:s.textContent=n,s.parentNode||t.appendChild(s)}}t.parentNode||this._rootGroup.appendChild(t)},_updateText:function(t){if(t.options.text&&0!==t.options.text.length)if(t.options.fontSize<6||t.options.fontPercent<=0)t._removeNode();else{for(var e in t._eventParents)if(t._eventParents[e].symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&!1===t._eventParents[e].textDisplay)return void t._removeNode();void 0===t.options.fontPercent&&(t.options.fontPercent=100),t.options.fontPercent<0&&(t.options.fontPercent=0),t.options.fontPercent>400&&(t.options.fontPercent=400),void 0===t.options.fontSpace&&(t.options.fontSpace=0),t.options.fontSpace>30?t.options.fontSpace=30:t.options.fontSpace<0&&(t.options.fontSpace=0);var i=t._latlng,o=this._map.latLngToLayerPoint(i);if(void 0!=o){if(t.options.labelXOffset||t.options.labelYOffset){var l=isNaN(t.options.labelXOffset)?0:t.options.labelXOffset,s=isNaN(t.options.labelYOffset)?0:t.options.labelYOffset;o.x+=l,o.y-=s}if(!0===t.options.fontShadow){t._shadowTextNode&&t._shadowTextNode.parentNode||(t._shadowTextNode=L.SVG.create("text"),this._rootGroup.appendChild(t._shadowTextNode));var n=L.point(o.x,o.y);if(t.options.fontShadowOffsetX&&(n.x+=t.options.fontShadowOffsetX),t.options.fontShadowOffsetY&&(n.y+=t.options.fontShadowOffsetY),0!==t.options.labelRotation){var a=o.x,r=o.y,p=t.options.labelRotation*Math.PI/180,u=Math.sqrt(Math.pow(n.x-a,2)+Math.pow(n.y-r,2)),h=p+Math.atan2(n.y-r,n.x-a);n.x=a+u*Math.cos(h),n.y=r+u*Math.sin(h)}var g=t.options.fontStroke;t.options.fontStroke=!1;var c=t.options.fontColor;t.options.fontColor=t.options.fontShadowColor,this._updateTextPt(t._shadowTextNode,n,t,"shadow"),t.options.fontColor=c,t.options.fontStroke=g}else t._shadowTextNode&&t._shadowTextNode.parentNode&&(this._rootGroup.removeChild(t._shadowTextNode),delete t._shadowTextNode);if(t._textNode&&t._textNode.parentNode||(t._textNode=L.SVG.create("text"),this._rootGroup.appendChild(t._textNode),t.options.interactive&&L.DomUtil.addClass(t._textNode,"leaflet-interactive"),t.addInteractiveTarget(t._textNode)),this._updateTextPt(t._textNode,o,t,"label"),!0===t.options.fontBackground){var y=t._shadowTextNode;if(y&&y.parentNode||(y=t._textNode),!y||!y.parentNode)return;t._backgroundTextNode&&t._backgroundTextNode.parentNode||(t._backgroundTextNode=L.SVG.create("rect"),!0===t.options.fontShadow?this._rootGroup.insertBefore(t._backgroundTextNode,t._shadowTextNode):this._rootGroup.insertBefore(t._backgroundTextNode,t._textNode));var P=t._textNode.getBBox();t._backgroundTextNode.x.baseVal.value=P.x,t._backgroundTextNode.y.baseVal.value=P.y,t._backgroundTextNode.width.baseVal.value=P.width,t._backgroundTextNode.height.baseVal.value=P.height,t._backgroundTextNode.style.fill=t.options.fontBackgroundColor,t.options.labelRotation&&t._backgroundTextNode.setAttributeNS(null,"transform","rotate("+t.options.labelRotation+" "+o.x+","+o.y+")")}else t._backgroundTextNode&&t._backgroundTextNode.parentNode&&(this._rootGroup.removeChild(t._backgroundTextNode),delete t._backgroundTextNode)}else t._removeNode()}else t._removeNode()},_updateImage:function(t){if(t._imageNode&&t._imageNode.parentNode||(t._imageNode=L.SVG.create("image"),this._rootGroup.appendChild(t._imageNode)),t._imageNode.setAttributeNS(null,"cx",t._point.x),t._imageNode.setAttributeNS(null,"cy",t._point.y),t._imageNode.setAttributeNS(null,"r",1),t._imageNode.style.visibility="",t.options.graphicTitle){t._imageNode.setAttributeNS(null,"title",t.options.graphicTitle);var e=L.SVG.create("title");e.textContent=style.graphicTitle,t._imageNode.appendChild(e)}t.options.graphicWidth&&t.options.graphicHeight&&t._imageNode.setAttributeNS(null,"preserveAspectRatio","none");var i=t.options.graphicWidth||t.options.graphicHeight,o=t.options.graphicHeight||t.options.graphicWidth;i=i||2*t.options.pointRadius,o=o||2*t.options.pointRadius;var l=void 0!=t.options.graphicXOffset?t.options.graphicXOffset:-.5*i,s=void 0!=t.options.graphicYOffset?t.options.graphicYOffset:-.5*o,n=t.options.graphicOpacity||t.options.fillOpacity;t._imageNode.setAttributeNS(null,"x",(t._point.x+l).toFixed()),t._imageNode.setAttributeNS(null,"y",(t._point.y+s).toFixed()),t._imageNode.setAttributeNS(null,"width",i),t._imageNode.setAttributeNS(null,"height",o),t._imageNode.setAttributeNS("http://www.w3.org/1999/xlink","href",t.options.externalGraphic),t._imageNode.setAttributeNS(null,"style","opacity: "+n),t._imageNode.onclick=L.SVG.preventDefault;var a=t.options.rotation;void 0===a&&void 0===t._imageNode._rotation||!t._point||(t._imageNode._rotation=a,a|=0,t._imageNode.setAttributeNS(null,"transform","rotate("+a+" "+t._point.x+" "+t._point.y+")")),t._imageNode.setAttributeNS(null,"fill","none"),t._imageNode.setAttributeNS(null,"stroke","none"),t.options.pointerEvents?(t._imageNode.setAttributeNS(null,"pointer-events",t.options.pointerEvents),t._imageNode.style.pointerEvents=t.options.pointerEvents):(t._imageNode.setAttributeNS(null,"pointer-events","visiblepainted"),t._imageNode.style.pointerEvents="visiblepainted"),null!=t.options.cursor&&t._imageNode.setAttributeNS(null,"cursor",style.cursor)},_updateArc:function(t){if(this._drawing&&!t._empty()){var e=t._point,i=t._radius,o="a"+i+","+(t._radiusY||i)+" 0 1,0 ";sRadian=(360-t.options.endAngle)*(Math.PI/180),eRadian=(360-t.options.startAngle)*(Math.PI/180);var l=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+o+2*i+",0 "+o+2*-i+",0 ";this._setPath(t,l)}}}),L.SVG.LABEL_ALIGN={l:"start",r:"end",b:"bottom",t:"hanging"},L.SVG.LABEL_VSHIFT={t:"-83%",b:"0"},L.SVG.LABEL_VFACTOR={t:0,b:-1},L.SVG.LABEL_IE_VOFFSET={t:.86,b:0},L.SVG.preventDefault=function(t){t.preventDefault&&t.preventDefault()}},630:()=>{L.supermap.TiledMapLayer.include({setVisibility:function(t){return t?this.setOpacity(100):this.setOpacity(0),0},getVisibility:function(){return 0!=this.options.opacity}})}},e={};function i(o){var l=e[o];if(void 0!==l)return l.exports;var s=e[o]={exports:{}};return t[o](s,s.exports,i),s.exports}(()=>{"use strict";var t=window.SuperMap=window.SuperMap||{};t.Plot=t.Plot||{},window.SuperMapAlgoPlot=t.Plot||{},SuperMap.Plot.ArrowTailType={ARROWTAIL_NONE:0,ARROWTAIL_LINE:1,ARROWTAIL_CURVE:2,ARROWTAIL_COATTAIL:3,ARROWTAIL_COATTAIL_POLYBODY:4},SuperMap.Plot.ArrowHeadType={ARROWHEAD_POLYLINE:0,ARROWHEAD_TRIANGLE:1,ARROWHEAD_COATTAIL:2,ARROWHEAD_TRIANGLE_SOLID:3,ARROWHEAD_WITH_EAR:4,ARROWHEAD_WITHOUT_EAR:5,ARROWHEAD_COATTAIL_HOLLOW:6},SuperMap.Plot.ArrowBodyType={ARROWBODY_POLYLINE:0,ARROWBODY_POLYBEZIER:1,ARROWBODY_PARALLEL:2,ARROWBODY_TRAPEZOID:3,ARROWBODY_MULTIPOLYBEZIER:4,ARROWBODY_COATTAIL:5},SuperMap.Plot.SymbolType={DOTSYMBOL:1,ALGOSYMBOL:2,TEXTSYMBOL:34,ELLIPSESYMBOL:31,CIRCLESYMBOL:29,RECTANGLESYMBOL:26,ARBITRARYPOLYGONSYMBOL:32,POLYLINESYMBOL:24,PARALLELOGRAM:28,ARCSYMBOL:44,NEWARCSYMBOL:4401,REGULARPOLYGON:410,CHORDSYMBOL:370,NEWCHORDSYMBOL:3701,PIESYMBOL:380,NEWPIESYMBOL:3801,KIDNEY:390,POLYBEZIERSYMBOL:590,PARALLELLINE:48,BRACESYMBOL:400,ANNOFRAMESYMBOL:320,ANNOFRAMESYMBOLM:321,TRAPEZOIDSYMBOL:350,POLYBEZIERCLOSESYMBOL:360,GROUPOBJECT:1e3,LINERELATION:1001,INTERFERENCEBEAM:1002,POLYGONREGION:1003,ARCREGION:1004,AIRROUTE:1005,NAVYROUTE:1006,MISSILEROUTE:1007,NAVYDEPLOYMENT:1008,AIRDEPLOYMENT:1009,SATELLITE:1010,SATELLITETIMEWINDOWS:1011,SYMBOLTEXT:1012,RUNWAY:1013,CURVEEIGHT:1014,ROUTENODE:1015,ARROWLINE:1016,PATHTEXT:1017,LITERATESIGN:1018,CONCENTRICCIRCLE:1019,FLAGGROUP:1020,SYMBOLTEXT1:1021,COMBINATIONALCIRCLE:1022,FREECURVE:1023,SYMBOLTEXTBOX:1024,NODECHAIN:1025,LINEMARKING:1026,AVOIDREGION:1027,WIRE:1028,LINEARARROW:1029,PICTURE:3e3},SuperMap.Plot.LineRelationType={SOLID:0,DASH:1,ARROW:2},SuperMap.Plot.AlgoSurroundLineType={NONE:0,INNER:1,OUT:2,ALL:3},SuperMap.Plot.RouteNodeType={RENDEZVOUS:"RENDEZVOUS",EXPANDING:"EXPANDING",VOLLEY:"VOLLEY",STANDBY:"STANDBY",SUPPLY:"SUPPLY",TAKEOFF:"TAKEOFF",INITIAL:"INITIAL",VISUALINITAL:"VISUALINITAL",LANCH:"LANCH",TURNING:"TURNING",AIMING:"AIMING",COMMONROUTE:"COMMONROUTE",WEAPONLAUNCH:"WEAPONLAUNCH",TARGET:"TARGET",ATTACK:"ATTACK",SUPPRESS:"SUPPRESS",EIGHTSPIRAL:"EIGHTSPIRAL",HAPPYVALLEY:"HAPPYVALLEY"},SuperMap.Plot.RelLineText={ONLINE:0,ONLEFTLINE:1,ONRIGHTLINE:2,ONBOTHLINE:3},SuperMap.Plot.RadiusLineType={NONE:0,SOLID:1,ARROW:2},SuperMap.Plot.Position={TOP:4,BOTTOM:5,LEFT:6,RIGHT:7},SuperMap.Plot.AnnoPosition={LEFTTOP:0,LEFTBOTTOM:1,RIGHTTOP:2,RIGHTBOTTOM:3,TOP:4,BOTTOM:5,LEFT:6,RIGHT:7,MIDDLE:8,ANCHOR:9},SuperMap.Plot.ArrowLineType={DOUBLELINE:0,TRIANGLESOLID:1,NONE:2},SuperMap.Plot.TextBoxType={WITHTIPBOX:0,RECTBOX:1,LINEBOX:2,NONEBOX:3},SuperMap.Plot.PositionOffsetType={LINE:0,GRADIENTLINE:1},SuperMap.Plot.AlignType={LEFT:0,RIGHT:1,UP:2,DOWN:3,VERTICALCENTER:4,HORIZONTALCENTER:5},SuperMap.Plot.EditMode={ADDCONTROLPOINT:0,EDITCONTROLPOINT:1,EDITCIRCUMRECTANGLE:2,REMOVECONTROLPOINT:3};SuperMap.Plot.EqualLargeType={WIDTH:0,HEIGHT:1,SAME:2},SuperMap.Plot.UniformDistributionType={LEVEL:0,VERTICAL:1};SuperMap.Plot.TransactionType={CREATE:0,EDIT:1,REMOVE:2},SuperMap.Plot.Event=SuperMap.Plot.Event||{};SuperMap.Plot.Event.beforefeatureadded="beforefeatureadded",SuperMap.Plot.Event.featureadded="featureadded",SuperMap.Plot.Event.beforefeaturesselected="beforefeaturesselected",SuperMap.Plot.Event.featuresselected="featuresselected",SuperMap.Plot.Event.updateFeature="updateFeature",SuperMap.Plot.Event.beforefeaturesunselected="beforefeaturesunselected",SuperMap.Plot.Event.featuresunselected="featuresunselected",SuperMap.Plot.Event.beforefeaturesmodified="beforefeaturesmodified",SuperMap.Plot.Event.featuresmodified="featuresmodified",SuperMap.Plot.Event.beforefeaturesremoved="beforefeaturesremoved",SuperMap.Plot.Event.featuresremoved="featuresremoved",SuperMap.Plot.Event.beforefeaturesadded="beforefeaturesadded",SuperMap.Plot.Event.featuresadded="featuresadded",SuperMap.Plot.Event.movingtargetsselected="featuresselected",SuperMap.Plot.Event.movingtargetsunselected="featuresunselected",SuperMap.Plot.Event.movingtargetcontextmenu="featurecontextmenu",SuperMap.Plot.Event.initializecompleted="initializecompleted",SuperMap.Plot.Event.cachecompleted="cachecompleted",SuperMap.Plot.Event.plottinglayeradded="plottinglayeradded",SuperMap.Plot.Event.plottinglayerremoved="plottinglayerremoved",SuperMap.Plot.Event.plottinglayeractive="plottinglayeractive",SuperMap.Plot.Event.childplotlayeradded="childplotlayeradded",SuperMap.Plot.Event.childplotlayerremoved="childplotlayerremoved",SuperMap.Plot.Event.childplotlayeractive="childplotlayeractive",SuperMap.Plot.Event.reseteditmarkersvalues="reseteditmarkersvalues",SuperMap.Plot.Event.reseteditmarkers="reseteditmarkers",SuperMap.Plot.Event.animationcreated="animationcreated",SuperMap.Plot.Event.animationdeleted="animationdeleted",SuperMap.Plot.Event.animationmodify="animationmodify",SuperMap.Plot.Event.animationbegin="animationbegin",SuperMap.Plot.Event.animationend="animationend",SuperMap.Plot.Event.animatitonpropertyconfig="animatitonpropertyconfig",SuperMap.Plot.Event.wayfeaturedrawfinished="wayfeaturedrawfinished",SuperMap.Plot.Event.wayfeaturemodifyfinished="wayfeaturemodifyfinished";SuperMap.Plot.GOAnimationType={ANIMATION_UNKNOWN:-1,ANIMATION_WAY:0,ANIMATION_BLINK:1,ANIMATION_ATTRIBUTE:2,ANIMATION_SHOW:3,ANIMATION_ROTATE:4,ANIMATION_SCALE:5,ANIMATION_GROW:6,ANIMATION_HIDE_EXP:12,ANIMATION_REDUCE_EXP:13,ANIMATION_MOVEIN_EXP:14,ANIMATION_MOVEOUT_EXP:15,ANIMATION_ZOOMIN_EXP:16,ANIMATION_ZOOMOUT_EXP:17,ANIMATION_CURVE_EXP:18,ANIMATION_BROKENLINE_EXP:19,ANIMATION_GROW_EXP:20,ANIMATION_WAY_EXP:21,ANIMATION_BLINK_EXP:22,ANIMATION_SHOW_EXP:23,ANIMATION_MOVEVIEW_EXP:24},SuperMap.Plot.BlinkAnimationBlinkStyle={Blink_Frequency:0,Blink_Number:1},SuperMap.Plot.BlinkAnimationReplaceStyle={Replace_NoColor:0,Replace_Color:1},SuperMap.Plot.RotateDirection={ClockWise:0,AntiClockWise:1},SuperMap.Plot.WayPathType={POLYLINE:0,CURVE:1};var e=SuperMap.Plot.GOAnimationState={UNKNOWN:0,PLAYING:1,PAUSE:2,STOP:3,RESET:4},o=SuperMap.Plot.AnimationPlayType={PLAYFROMNOW:0,PLAYSAMELASTONE:1,PLAYAFTERLASTONE:2,UNKNOWN:3};SuperMap.PlotCommonServiceBase=class extends SuperMap.CommonServiceBase{constructor(t,e){super(t,e),this.CLASS_NAME="SuperMap.PlotCommonServiceBase"}destroy(){super.destroy()}_commit(t){"POST"!==t.method&&"PUT"!==t.method||(t.params&&(t.url=SuperMap.Util.urlAppend(t.url,SuperMap.Util.getParameterString(t.params||{}))),t.params=t.data),SuperMap.FetchRequest.commit(t.method,t.url,t.params,{headers:t.headers,withCredentials:t.withCredentials,crossOrigin:t.crossOrigin,timeout:t.async?0:null,proxy:t.proxy}).then(function(t){return t.text()}).then(function(e){var i=(new SuperMap.Format.JSON).read(e);i||(i={error:e}),i.error?(t.scope?SuperMap.Function.bind(t.failure,t.scope):t.failure)(i.error):(i.succeed=void 0==i.succeed||i.succeed,(t.scope?SuperMap.Function.bind(t.success,t.scope):t.success)(i))})}};SuperMap.EditSmlFileParameters=class{constructor(t){t=t||{},this.method=t.method?t.method:"POST",this.sitData=t.sitData?t.sitData:null,this.smlFileName=t.smlFileName?t.smlFileName:"",this.isCover=!!t.isCover&&t.isCover,this.CLASS_NAME="SuperMap.EditSmlFileParameters"}destroy(){this.method="POST",this.sitData=null,this.isCover=!1,this.smlFileName=""}static toJsonParameters(t){if(t)return SuperMap.Plot.PlottingUtil.toJSON(t.sitData)}};class l extends SuperMap.PlotCommonServiceBase{constructor(t,e){super(t,e),(e=e||{})&&SuperMap.Util.extend(this,e);var i=this;i.events=new SuperMap.Events(i,null,i.EVENT_TYPES,!0),i.eventListeners instanceof Object&&i.events.on(i.eventListeners),this.CLASS_NAME="SuperMap.EditSmlFileService"}destroy(){super.destroy()}processAsync(t){if(t){var e=this,i=t.method,o=e.url.substr(e.url.length-1,1);e.url+="/"==o?"smlInfos/":"/smlInfos/",e.url+=t.smlFileName+".json",e.url+="?isCover="+t.isCover;var l=null;t.method&&"POST"===t.method&&(l=SuperMap.EditSmlFileParameters.toJsonParameters(t)),e.request({method:i,data:l,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}}SuperMap.EditSmlFileService=l;class s extends SuperMap.PlotCommonServiceBase{constructor(t,e){super(t,e),(e=e||{})&&SuperMap.Util.extend(this,e);var i;i=this.url.substr(this.url.length-1,1),this.url+="/"==i?"symbolLibs.json?":"/symbolLibs.json?",this.CLASS_NAME="SuperMap.GetLibIDsService"}destroy(){super.destroy()}processAsync(){this.request({method:"GET",data:null,scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}}SuperMap.GetLibIDsService=s;SuperMap.GetLibInfoParameter=class{constructor(t){t=t||{},this.libID=t.libID,this.CLASS_NAME="SuperMap.GetLibInfoParameter"}destroy(){this.libID=null}};class n extends SuperMap.PlotCommonServiceBase{constructor(t,e){super(t,e),(e=e||{})&&SuperMap.Util.extend(this,e);var i;i=this.url.substr(this.url.length-1,1),this.url+="/"==i?"symbolLibs/":"/symbolLibs/",this.CLASS_NAME="SuperMap.GetLibInfoService"}destroy(){super.destroy()}processAsync(t){var e=this;t&&null!==t.libID&&(e.libID=t.libID),e.url+=e.libID,e.url+=".json",e.request({method:"GET",data:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}SuperMap.GetLibInfoService=n;SuperMap.GetSMLInfosParameters=class{constructor(t){t=t||{},this.start=t.start,this.count=t.count?t.count:null,this.CLASS_NAME="SuperMap.GetSMLInfosParameters"}destroy(){this.start=null,this.count=null}static toUrlParameters(t){if(t){var e="";return null!==t.start&&(e="?start="+encodeURIComponent(t.start)),!t.count||null===t.count&&0===t.count||(e+="&count="+encodeURIComponent(t.count)),e}}};class a extends SuperMap.PlotCommonServiceBase{constructor(t,e){super(t,e),(e=e||{})&&SuperMap.Util.extend(this,e);var i,o=this;o.events=new SuperMap.Events(o,null,o.EVENT_TYPES,!0),o.eventListeners instanceof Object&&o.events.on(o.eventListeners),i=o.url.substr(o.url.length-1,1),o.url+="/"==i?"smlInfos":"/smlInfos",o.url+=".json",this.CLASS_NAME="SuperMap.GetSMLInfosService"}destroy(){super.destroy()}processAsync(t){if(t){var e=this;e.url+=SuperMap.GetSMLInfosParameters.toUrlParameters(t),e.request({method:"GET",data:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}}SuperMap.GetSMLInfosService=a;SuperMap.GetSymbolInfoParameters=class{constructor(t){t=t||{},this.libID=t.libID,this.code=t.code,this.inputPoints=t.inputPoints?t.inputPoints:null,this.symbolRank=t.symbolRank?t.symbolRank:0,this.negativeImage=!!t.negativeImage&&t.negativeImage,this.surroundLineType=t.surroundLineType?t.surroundLineType:0,this.subSymbols=t.subSymbols?t.subSymbols:null,this.scaleValues=t.scaleValues?t.scaleValues:null,this.scalePoints=t.scalePoints?t.scalePoints:null,this.newScalePoint=t.newScalePoint?t.newScalePoint:null,this.newScalePointIndex=t.newScalePointIndex?t.newScalePointIndex:0,this.CLASS_NAME="SuperMap.GetSymbolInfoParameters"}destroy(){var t=this;t.libID=null,t.code=null,t.inputPoints=null,t.symbolRank=null,t.negativeImage=null,t.surroundLineType=null,t.subSymbols=null,t.scaleValues=null,t.scalePoints=null,t.newScalePoint=null,t.newScalePointIndex=null}static toUrlParameters(t){if(t&&null!==t.libID&&null!==t.code){var e="libID="+encodeURIComponent(t.libID)+"&code="+encodeURIComponent(t.code);if(t.inputPoints&&null!==t.inputPoints&&0!==t.inputPoints.length){let i="[";for(let e=0;e<t.inputPoints.length;e++)e===t.inputPoints.length-1?i+='{"x":'+t.inputPoints[e].x+', "y":'+t.inputPoints[e].y+"}]":i+='{"x":'+t.inputPoints[e].x+', "y":'+t.inputPoints[e].y+"},";e+="&inputPoints="+encodeURIComponent(i)}if(t.scalePoints&&null!==t.scalePoints&&0!==t.scalePoints.length){let i="[";for(let e=0;e<t.scalePoints.length;e++)e===t.scalePoints.length-1?i+='{"x":'+t.scalePoints[e].x+', "y":'+t.scalePoints[e].y+"}]":i+='{"x":'+t.scalePoints[e].x+', "y":'+t.scalePoints[e].y+"},";e+="&scalePoints="+encodeURIComponent(i)}if(t.scaleValues&&null!==t.scaleValues&&0!==t.scaleValues.length){let i="[";for(let e=0;e<t.scaleValues.length;e++)e===t.scaleValues.length-1?i+=t.scaleValues[e]+"]":i+=t.scaleValues[e]+",";e+="&scaleValues="+encodeURIComponent(i)}if(t.subSymbols&&null!==t.subSymbols&&0!==t.subSymbols.length){let i="[";for(let e=0;e<t.subSymbols.length;e++)e===t.subSymbols.length-1?i+=t.subSymbols[e].code+"]":i+=t.subSymbols[e].code+",";e+="&subSymbols="+encodeURIComponent(i)}return t.newScalePoint&&null!==t.newScalePoint&&(e+="&newScalePoint="+encodeURIComponent('{"x":'+t.newScalePoint.x+', "y":'+t.newScalePoint.y+"}")),t.newScalePointIndex&&null!==t.newScalePointIndex&&(e+="&newScalePointIndex="+encodeURIComponent(t.newScalePointIndex)),t.symbolRank&&null!==t.symbolRank&&(e+="&symbolRank="+encodeURIComponent(t.symbolRank)),t.negativeImage&&null!==t.negativeImage&&(e+="&negativeImage="+encodeURIComponent(t.negativeImage)),t.surroundLineType&&null!==t.surroundLineType&&(e+="&surroundLineType="+encodeURIComponent(t.surroundLineType)),e}}};class r extends SuperMap.PlotCommonServiceBase{constructor(t,e){super(t,e=e||{});var i;i=this.url.substr(this.url.length-1,1),this.url+="/"==i?"graphicObject.json?":"/graphicObject.json?",this.CLASS_NAME="SuperMap.GetSymbolInfoService"}destroy(){super.destroy()}processAsync(t){if(t){var e,i=this;e=SuperMap.GetSymbolInfoParameters.toUrlParameters(t),i.url+=e,t.dynamicToken&&(i.url+="&dynamicToken="+t.dynamicToken),"MSIE"===SuperMap.Browser.name.toUpperCase()&&(i.url=encodeURI(i.url)),i.request({method:"GET",params:null,scope:i,success:i.myServiceProcessCompleted,failure:i.serviceProcessFailed})}}myServiceProcessCompleted(t){null!=(t=SuperMap.Util.transformResult(t))&&null!=t.textStyle2D&&null!=t.textStyle2D.fontHeight&&(t.textStyle2D.fontHeight=3),this.events.triggerEvent("processCompleted",{result:t})}}SuperMap.GetSymbolInfoService=r;SuperMap.Plot.DefaultStyle=class{constructor(t){t=t||{},this.lineColor=t.lineColor?t.lineColor:"#ff0000",this.lineWidth=t.lineWidth?t.lineWidth:2,this.lineType=t.lineType?t.lineType:0,this.lineOpacity=t.lineOpacity?t.lineOpacity:1,this.lineCap=t.lineCap?t.lineCap:"round",this.flagTextSize=t.flagTextSize?t.flagTextSize:60,this.maxScale=t.maxScale?t.maxScale:5,this.minScale=t.minScale?t.minScale:1,this.dotSymbolSize=t.dotSymbolSize?t.dotSymbolSize:40,this.dotTextSpace=t.dotTextSpace?t.dotTextSpace:7,this.scaleByMap=!!t.scaleByMap&&t.scaleByMap,this.fillColor=t.fillColor?t.fillColor:"#ff0000",this.fillOpacity=t.fillOpacity?t.fillOpacity:.31,this.fontColor=t.fontColor?t.fontColor:"#000000",this.fontOpacity=t.fontOpacity?t.fontOpacity:1,this.fontStroke=!!t.fontStroke&&t.fontStroke,this.fontStrokeColor=t.fontStrokeColor?t.fontStrokeColor:"#ff0000",this.fontStrokeWidth=t.fontStrokeWidth?t.fontStrokeWidth:"2px",this.fontBackground=!!t.fontBackground&&t.fontBackground,this.fontBackgroundColor=t.fontBackgroundColor?t.fontBackgroundColor:"#ff0000",this.fontShadow=!!t.fontShadow&&t.fontShadow,this.fontShadowColor=t.fontShadowColor?t.fontShadowColor:"#ff0000",this.fontShadowOffsetX=t.fontShadowOffsetX?t.fontShadowOffsetX:0,this.fontShadowOffsetY=t.fontShadowOffsetY?t.fontShadowOffsetY:0,this.fontSize=t.fontSize?t.fontSize:14,this.fontSpace=t.fontSpace?t.fontSpace:0,this.fontPercent=t.fontPercent?t.fontPercent:100,this.fontFamily=t.fontFamily?t.fontFamily:"微软雅黑",this.fontWeight=t.fontWeight?t.fontWeight:"bold",this.fontStyle=t.fontStyle?t.fontStyle:"",this.surroundLineType=t.surroundLineType?t.surroundLineType:0,this.surroundLineColor=t.surroundLineColor?t.surroundLineColor:"#ffff00",this.surroundLineWidth=t.surroundLineWidth?t.surroundLineWidth:4,this.surroundLineColorOpacity=t.surroundLineColorOpacity?t.surroundLineColorOpacity:1,this.fontStyle=t.fontStyle?t.fontStyle:"",this.fillBackColor=t.fillBackColor?t.fillBackColor:"#ff0000",this.fillBackOpacity=t.fillBackOpacity?t.fillBackOpacity:1,this.fillGradientMode=t.fillGradientMode?t.fillGradientMode:"NONE",this.fillCenterOffsetX=t.fillCenterOffsetX?t.fillCenterOffsetX:0,this.fillCenterOffsetY=t.fillCenterOffsetY?t.fillCenterOffsetY:0,this.fillAngle=t.fillAngle?t.fillAngle:0,this.fillSymbolID=t.fillSymbolID?t.fillSymbolID:1,this.defaultFlag=!!t.defaultFlag&&t.defaultFlag,this.CLASS_NAME="SuperMap.Plot.DefaultStyle",this.parserConfiguration()}parserConfiguration(){"undefined"!=typeof DefaultStyleConfiguration&&("undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.flagTextSize&&(this.flagTextSize=parseFloat(DefaultStyleConfiguration.flagTextSize)),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.maxScale&&(this.maxScale=parseFloat(DefaultStyleConfiguration.maxScale)),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.minScale&&(this.minScale=parseFloat(DefaultStyleConfiguration.minScale)),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.dotSymbolSize&&(this.dotSymbolSize=parseFloat(DefaultStyleConfiguration.dotSymbolSize)),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.dotTextSpace&&(this.dotTextSpace=parseFloat(DefaultStyleConfiguration.dotTextSpace)),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.scaleByMap&&(this.scaleByMap=DefaultStyleConfiguration.scaleByMap),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.strokeWidth&&(this.lineWidth=parseFloat(DefaultStyleConfiguration.strokeWidth)),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.strokeColor&&(this.lineColor=DefaultStyleConfiguration.strokeColor),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.strokeOpacity&&(this.lineOpacity=parseFloat(DefaultStyleConfiguration.strokeOpacity)),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.strokeDashstyle&&(this.lineType=DefaultStyleConfiguration.strokeDashstyle),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.strokeLinecap&&(this.lineCap=DefaultStyleConfiguration.strokeLinecap),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fillColor&&(this.fillColor=DefaultStyleConfiguration.fillColor),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fillOpacity&&(this.fillOpacity=parseFloat(DefaultStyleConfiguration.fillOpacity)),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fontColor&&(this.fontColor=DefaultStyleConfiguration.fontColor),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fontOpacity&&(this.fontOpacity=parseFloat(DefaultStyleConfiguration.fontOpacity)),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fontStroke&&(this.fontStroke=DefaultStyleConfiguration.fontStroke),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fontStrokeColor&&(this.fontStrokeColor=DefaultStyleConfiguration.fontStrokeColor),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fontStrokeWidth&&(this.fontStrokeWidth=parseFloat(DefaultStyleConfiguration.fontStrokeWidth)),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fontBackground&&(this.fontBackground=DefaultStyleConfiguration.fontBackground),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fontBackgroundColor&&(this.fontBackgroundColor=DefaultStyleConfiguration.fontBackgroundColor),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fontShadow&&(this.fontShadow=DefaultStyleConfiguration.fontShadow),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fontShadowColor&&(this.fontShadowColor=DefaultStyleConfiguration.fontShadowColor),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fontShadowOffsetX&&(this.fontShadowOffsetX=DefaultStyleConfiguration.fontShadowOffsetX),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fontShadowOffsetY&&(this.fontShadowOffsetY=DefaultStyleConfiguration.fontShadowOffsetY),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fontSpace&&(this.fontSpace=parseInt(DefaultStyleConfiguration.fontSpace)),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fontPercent&&(this.fontPercent=parseFloat(DefaultStyleConfiguration.fontPercent)),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fontSize&&(this.fontSize=parseFloat(DefaultStyleConfiguration.fontSize)),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fontFamily&&(this.fontFamily=DefaultStyleConfiguration.fontFamily),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fontWeight&&(this.fontWeight=DefaultStyleConfiguration.fontWeight),"undefined"==typeof DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fontStyle&&(this.fontStyle=DefaultStyleConfiguration.fontStyle),DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.surroundLineType&&(this.surroundLineType=parseFloat(DefaultStyleConfiguration.surroundLineType)),DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.surroundLineColor&&(this.surroundLineColor=DefaultStyleConfiguration.surroundLineColor),DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.surroundLineWidth&&(this.surroundLineWidth=parseFloat(DefaultStyleConfiguration.surroundLineWidth)),DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.surroundLineColorOpacity&&(this.surroundLineColorOpacity=parseFloat(DefaultStyleConfiguration.surroundLineColorOpacity)),DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fillBackColor&&(this.fillBackColor=DefaultStyleConfiguration.fillBackColor),DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fillBackOpacity&&(this.fillBackOpacity=parseFloat(DefaultStyleConfiguration.fillBackOpacity)),DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fillGradientMode&&(this.fillGradientMode=DefaultStyleConfiguration.fillGradientMode),DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fillAngle&&(this.fillAngle=parseFloat(DefaultStyleConfiguration.fillAngle)),DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fillCenterOffsetX&&(this.fillCenterOffsetX=parseFloat(DefaultStyleConfiguration.fillCenterOffsetX)),DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fillCenterOffsetY&&(this.fillCenterOffsetY=parseFloat(DefaultStyleConfiguration.fillCenterOffsetY)),DefaultStyleConfiguration&&void 0!==DefaultStyleConfiguration.fillSymbolID&&(this.fillSymbolID=parseFloat(DefaultStyleConfiguration.fillSymbolID)))}destroy(){this.lineColor=null,this.lineWidth=null,this.dotSymbolSize=null,this.lineType=null,this.defaultFlag=null,this.flagTextSize=null,this.maxScale=null,this.minScale=null,this.dotTextSpace=null,this.scaleByMap=null,this.lineOpacity=null,this.lineCap=null,this.fillColor=null,this.fillOpacity=null,this.fontColor=null,this.fontOpacity=null,this.fontSize=null,this.fontFamily=null,this.fontWeight=null,this.fontStyle=null,this.fontPercent=null,this.fontSpace=null,this.surroundLineType=null,this.surroundLineColor=null,this.surroundLineWidth=null,this.surroundLineColorOpacity=null,this.fillBackColor=null,this.fillBackOpacity=null,this.fillGradientMode=null,this.fillAngle=null,this.fillCenterOffsetX=null,this.fillCenterOffsetY=null,this.fillSymbolID=null}};SuperMap.Plot.ExtendProperty=class{constructor(t){t=t||{},this.properties=t.properties?t.properties:[],this.CLASS_NAME="SuperMap.Plot.ExtendProperty"}addProperty(t,e){var i=this.findProperty(t);return null==i?this.properties.push(new SuperMap.Plot.Property(t,e)):i.setValue(e),!0}deleteProperty(t){for(var e=0;e<this.properties.length;e++)if(this.properties[e].key===t)return this.properties.slice(e,1),!0;return!1}findProperty(t){for(var e=0;e<this.properties.length;e++)if(this.properties[e].key===t)return this.properties[e];return null}getPropertyValue(t){for(var e=0;e<this.properties.length;e++)if(this.properties[e].key===t)return this.properties[e].value;return null}getPropertyByIndex(t){return t<this.properties.length?this.properties[t]:null}getPropertyCount(){return this.properties.length}destroy(){this.properties=null}};SuperMap.Plot.LayerDataStruct=class{constructor(t){t=t||{},this.layerName=t.layerName?t.layerName:null,this.spatialAnalystUrl=t.spatialAnalystUrl?t.spatialAnalystUrl:null,this.useCanvas2=!!t.useCanvas2&&t.useCanvas2,this.useCanvas=!!t.useCanvas&&t.useCanvas,this.features=t.features?t.features:null,this.CLASS_NAME="SuperMap.Plot.LayerDataStruct"}destroy(){this.layerName=null,this.spatialAnalystUrl=null,this.useCanvas2=null,this.useCanvas=null,this.features=null}toJSON(){for(var t=[],e=0;e<this.features.length;e++)t.push(this.features[e].getSymbolData());return'{"layerName":'+SuperMap.Plot.PlottingUtil.toJSON(this.layerName)+', "spatialAnalystUrl":'+SuperMap.Plot.PlottingUtil.toJSON(this.spatialAnalystUrl)+', "useCanvas2":'+SuperMap.Plot.PlottingUtil.toJSON(this.useCanvas2)+', "useCanvas":'+SuperMap.Plot.PlottingUtil.toJSON(this.useCanvas)+', "isEditable":'+SuperMap.Plot.PlottingUtil.toJSON(this.isEditable)+', "isLocked":'+SuperMap.Plot.PlottingUtil.toJSON(this.isLocked)+', "visibility":'+SuperMap.Plot.PlottingUtil.toJSON(this.visibility)+',"features":'+SuperMap.Plot.PlottingUtil.toJSON(t)+"}"}};SuperMap.Plot.MapInfoStruct=class{constructor(t){t=t||{},this.zoom=t.zoom?t.zoom:null,this.centerX=t.centerX?t.centerX:null,this.centerY=t.centerY?t.centerY:null,this.CLASS_NAME="SuperMap.Plot.MapInfoStruct"}destroy(){this.zoom=null,this.centerX=null,this.centerY=null}fromJSON(t){void 0!==t.zoom&&(this.zoom=t.zoom),void 0!==t.centerX&&(this.centerX=t.centerX),void 0!==t.centerY&&(this.centerY=t.centerY)}toJSON(){return'{"zoom":'+SuperMap.Plot.PlottingUtil.toJSON(this.zoom)+',"centerX":'+SuperMap.Plot.PlottingUtil.toJSON(this.centerX)+',"centerY":'+SuperMap.Plot.PlottingUtil.toJSON(this.centerY)+"}"}};SuperMap.Plot.OrbitPoint=class{constructor(t,e,i,o,l){this.x=parseFloat(t),this.y=parseFloat(e),(i||0==i)&&(this.z=parseFloat(i)),o&&(this.number=o),l&&(this.time=l),this.CLASS_NAME="SuperMap.Plot.OrbitPoint"}destroy(){this.x=null,this.y=null,this.z=null,this.index=null,this.time=null}clone(t){return null==t&&(t=new SuperMap.Plot.OrbitPoint(this.x,this.y,this.z)),SuperMap.Util.applyDefaults(t,this),t}};SuperMap.Plot.Property=class{constructor(t,e){t&&(this.key=t),e&&(this.value=e),this.CLASS_NAME="SuperMap.Plot.Property"}setKey(t){this.key=t}getKey(){return this.key}setValue(t){this.value=t}getValue(){return this.value}destroy(){this.key=null,this.value=null}clone(){return new SuperMap.Plot.Property(this.key,this.value)}};class p{constructor(t){t=t||{},this.id=t.id?t.id:SuperMap.Plot.PlottingUtil.generateUuid(),this.x=t.x?t.x:null,this.y=t.y?t.y:null,this.z=t.z?t.z:null,this.type=t.type?t.type:null,this.name=t.name?t.name:null,this.rotate=t.rotate?t.rotate:0,this.towardNodes=t.towardNodes?t.towardNodes:[],this.style=t.style?t.style:{},0===Object.keys(this.style).length&&(this.style=SuperMap.Util.cloneObject(L.supermap.plotting.PlottingObject.prototype._defaultStyle)),this.CLASS_NAME="SuperMap.Plot.RouteNode"}destroy(){this.type=null,this.position=null,this.name=null,this.id=null,this.rotate=null,this.towardNodes&&null!==this.towardNodes||(this.towardNodes=null);for(var t=0;t<this.towardNodes.length;t++)this.towardNodes[t].destroy();this.towardNodes=null}clone(){var t={id:this.id,type:this.type,name:this.name,rotate:this.rotate,towardNodes:this.towardNodes},e=new p(t);return e.positionPoint=this.positionPoint.clone(),e.style={},e.style=SuperMap.Util.copyAttributes(e.style,this.style),e}parseSymbolData(t){for(var e in this.id=t.id,this.type=t.type,this.name=t.name,this.rotate=t.rotate,t.positionPoint?(this.x=t.positionPoint.x,this.y=t.positionPoint.y,this.z=t.positionPoint.z):(this.x=t.x,this.y=t.y,this.z=t.z),this.style=SuperMap.Plot.AnalysisSymbol.getStyle(t,!0),t.towardNodes){var i=new SuperMap.Plot.TowardNode;this.towardNodes.push(i.parseSymbolData(t.towardNodes[e]))}return this}setSymbolData(){var t={};for(var e in t.id=this.id,t.type=this.type,t.name=this.name,t.rotate=this.rotate,t.x=this.x,t.y=this.y,t.z=this.z,SuperMap.Plot.AnalysisSymbol.setStyle(this.style,t,!0),t.towardNodes=[],this.towardNodes)t.towardNodes.push(this.towardNodes[e].setSymbolData());return t}}SuperMap.Plot.RouteNode=p;SuperMap.Plot.SitDataStruct=class{constructor(t){t=t||{},this.smlInfo=t.smlInfo?t.smlInfo:null,this.mapInfo=t.mapInfo?t.mapInfo:null,this.layerDatas=t.layerDatas?t.layerDatas:null,this.CLASS_NAME="SuperMap.Plot.SitDataStruct"}destroy(){this.smlInfo=null,this.mapInfo=null,this.layerDatas=null}};SuperMap.Plot.SMLInfoStruct=class{constructor(t){t&&(this.SMLName=t.SMLName,this.SMLDesc=t.SMLDesc,this.SMLSeclevel=t.SMLSeclevel,this.SMLDepat=t.SMLDepat,this.SMLAuthor=t.SMLAuthor,this.SMLTime=t.SMLTime),this.CLASS_NAME="SuperMap.Plot.SMLInfoStruct"}destroy(){this.SMLName="",this.SMLDesc="",this.SMLAuthor="",this.SMLSeclevel="",this.SMLDepat="",this.SMLTime=""}fromJSON(t){this.SMLName=t.SMLName,this.SMLDesc=t.SMLDesc,this.SMLSeclevel=t.SMLSeclevel,this.SMLDepat=t.SMLDepat,this.SMLAuthor=t.SMLAuthor,this.SMLTime=t.SMLTime}toJSON(){return'{"SMLName":'+SuperMap.Plot.PlottingUtil.toJSON(this.SMLName)+',"SMLDesc":'+SuperMap.Plot.PlottingUtil.toJSON(this.SMLDesc)+',"SMLSeclevel":'+SuperMap.Plot.PlottingUtil.toJSON(this.SMLSeclevel)+',"SMLDepat":'+SuperMap.Plot.PlottingUtil.toJSON(this.SMLDepat)+',"SMLAuthor":'+SuperMap.Plot.PlottingUtil.toJSON(this.SMLAuthor)+',"SMLTime":'+SuperMap.Plot.PlottingUtil.toJSON(this.SMLTime)+"}"}};SuperMap.Plot.SubSymbol=class{constructor(t,e,i){i=i||{},this.libID=t,this.code=e,this.symbolData=i.symbolData?i.symbolData:null,this.textContent=i.textContent?i.textContent:null,this.totalNum=i.totalNum?i.totalNum:null,this.CLASS_NAME="SuperMap.Plot.SubSymbol"}destroy(){this.libID=null,this.code=null,this.symbolData=null,this.totalNum=null}clone(){var t=new SuperMap.Plot.SubSymbol(this.libID,this.code);return t.symbolData={},t.symbolData=SuperMap.Util.copyAttributes(t.symbolData,this.symbolData),t.textContent=this.textContent,t.totalNum=this.totalNum,t}};SuperMap.Plot.SymbolText=class{constructor(t,e,i,o){o=o||{},this.textContent=t,this.textPosition=e,void 0!==this.textPosition&&null!==this.textPosition||(this.textPosition=0),this.offsetX=o.offsetX?o.offsetX:0,this.offsetY=o.offsetY?o.offsetY:0,this.border=null!=o.border&&o.border,this.showRelationLine=null==o.showRelationLine||o.showRelationLine,this.paddingX=o.paddingX?o.paddingX:0,this.paddingY=o.paddingY?o.paddingY:0,this.style={display:"display",color:"#ff0000",lineSymbolID:0,opacity:"1.00",weight:2,lineCap:"square",lineJoin:"square",surroundLineColor:"#ffff00",surroundLineColorOpacity:"1.00",surroundLineWidth:4,fillSymbolID:1,fillColor:"#ff0000",fillOpacity:"0.31",fillBackColor:"#ff0000",fillBackOpacity:"1.00",fillGradientMode:"NONE",fontColor:"#000000",fontFamily:"Microsoft YaHei",fontSize:"12",fontStroke:!1,fontStrokeColor:"#ff0000",fontStrokeWidth:"2px",fontBackground:!1,fontBackgroundColor:"#ff0000",fontShadow:!1,fontShadowColor:"#ff0000",fontShadowOffsetX:0,fontShadowOffsetY:0,fontSpace:0,fontPercent:100,sizeFixed:!0,labelAlign:"lt",labelRotation:-0,labelXOffset:0,labelYOffset:0,fillAngle:0,fillCenterOffsetX:0,fillCenterOffsetY:0},null!=i&&(this.style=SuperMap.Util.copyAttributes(this.style,i)),this.lineStyle={color:"#ff0000",lineSymbolID:0,opacity:1,weight:2},null!=o.lineStyle&&(this.lineStyle=SuperMap.Util.copyAttributes(this.lineStyle,o.lineStyle)),this.CLASS_NAME="SuperMap.Plot.SymbolText"}destroy(){this.textContent=null,this.textPosition=null,this.offsetX=null,this.offsetY=null,this.border=null,this.paddingX=null,this.paddingY=null,this.showRelationLine=null,this.style=null,this.lineStyle=null}clone(){var t={offsetX:this.offsetX,offsetY:this.offsetY,border:this.border,paddingX:this.paddingX,paddingY:this.paddingY,showRelationLine:this.showRelationLine},e={};e=SuperMap.Util.copyAttributes(e,this.style);var i=new SuperMap.Plot.SymbolText(this.textContent,this.textPosition,e,t),o={};return o=SuperMap.Util.copyAttributes(o,this.lineStyle),i.lineStyle=o,i}setSymbolData(){var t={};return t.textContent=this.textContent,t.textPosition=this.textPosition,t.offsetX=this.offsetX,t.offsetY=this.offsetY,t.border=this.border,t.paddingX=this.paddingX,t.paddingY=this.paddingY,t.showRelationLine=this.showRelationLine,null!=this.lineStyle&&(t.lineStyle={},null!=this.lineStyle.color&&(t.lineStyle.color=this.lineStyle.color),null!=this.lineStyle.lineSymbolID&&(t.lineStyle.lineSymbolID=this.lineStyle.lineSymbolID),null!=this.lineStyle.dashArray&&(t.lineStyle.dashArray=this.lineStyle.dashArray),null!=this.lineStyle.opacity&&(t.lineStyle.opacity=this.lineStyle.opacity),null!=this.lineStyle.weight&&(t.lineStyle.weight=this.lineStyle.weight)),SuperMap.Plot.AnalysisSymbol.setStyle(this.style,t,!0),t}parseSymbolData(t){return this.textContent=t.textContent,this.textPosition=t.textPosition,this.offsetX=t.offsetX,this.offsetY=t.offsetY,null!=t.border&&(this.border=t.border),null!=t.paddingX&&(this.paddingX=t.paddingX),null!=t.paddingY&&(this.paddingY=t.paddingY),null!=t.showRelationLine&&(this.showRelationLine=t.showRelationLine),null!=t.lineStyle&&(null==this.lineStyle&&(this.lineStyle=null),null!=t.lineStyle.color&&(this.lineStyle.color=t.lineStyle.color),null!=t.lineStyle.lineSymbolID&&(this.lineStyle.lineSymbolID=t.lineStyle.lineSymbolID),null!=t.lineStyle.dashArray&&(this.lineStyle.dashArray=t.lineStyle.dashArray),null!=t.lineStyle.opacity&&(this.lineStyle.opacity=t.lineStyle.opacity),null!=t.lineStyle.weight&&(this.lineStyle.weight=t.lineStyle.weight)),SuperMap.Plot.AnalysisSymbol.getStyle(t,!0),this}};SuperMap.Plot.BloodVolume=class{constructor(t,e,i,o){o=o||{},this.volume=t,this.position=e,void 0!==this.position&&null!==this.position||(this.position=SuperMap.Plot.Position.TOP),this.offsetX=o.offsetX?o.offsetX:0,this.offsetY=o.offsetY?o.offsetY:0,this.width=o.width?o.width:null,this.height=o.height?o.height:null,this.style={display:"display",color:"#808080",opacity:1,weight:4,remainingVolumeColor:"#00ff00",remainingVolumeOpacity:.8,consumeVolumeColor:"#000000",consumeVolumeOpacity:.8},null!=i&&(this.style=SuperMap.Util.copyAttributes(this.style,i)),this.CLASS_NAME="SuperMap.Plot.BloodVolume"}destroy(){this.volume=null,this.position=null,this.offsetX=null,this.offsetY=null,this.width=null,this.height=null,this.style=null}clone(){var t={offsetX:this.offsetX,offsetY:this.offsetY,width:this.width,height:this.height},e={};return e=SuperMap.Util.copyAttributes(e,this.style),new SuperMap.Plot.BloodVolume(this.volume,this.position,e,t)}setSymbolData(){var t={};t.volume=this.volume,t.position=this.position,t.offsetX=25.4*this.offsetX/SuperMap.Plot.PlottingUtil.DPI,t.offsetY=25.4*this.offsetY/SuperMap.Plot.PlottingUtil.DPI*-1,t.width=25.4*this.width/SuperMap.Plot.PlottingUtil.DPI,t.height=25.4*this.height/SuperMap.Plot.PlottingUtil.DPI,t.visible=null!=this.style.display&&"none"!=this.style.display,t.lineWidth=25.4*this.style.weight/SuperMap.Plot.PlottingUtil.DPI;let e=SuperMap.Plot.PlottingUtil.colorStringToRGB(this.style.color);t.lineColor={alpha:255*this.style.opacity,red:e.red,green:e.green,blue:e.blue};let i=SuperMap.Plot.PlottingUtil.colorStringToRGB(this.style.remainingVolumeColor);t.remainingColor={alpha:255*this.style.remainingVolumeOpacity,red:i.red,green:i.green,blue:i.blue};let o=SuperMap.Plot.PlottingUtil.colorStringToRGB(this.style.consumeVolumeColor);return t.consumeColor={alpha:255*this.style.consumeVolumeOpacity,red:o.red,green:o.green,blue:o.blue},t}parseSymbolData(t){return this.volume=t.volume,this.position=t.position,this.offsetX=Math.ceil(t.offsetX*SuperMap.Plot.PlottingUtil.DPI/25.4),this.offsetY=-1*Math.ceil(t.offsetY*SuperMap.Plot.PlottingUtil.DPI/25.4),null!=t.width&&(this.width=Math.ceil(t.width*SuperMap.Plot.PlottingUtil.DPI/25.4)),null!=t.height&&(this.height=Math.ceil(t.height*SuperMap.Plot.PlottingUtil.DPI/25.4)),null==this.style&&(this.style={}),null!=t.style?(null!=t.style.display&&(this.style.display=t.style.display),null!=t.style.color&&(this.style.color=t.style.color),null!=t.style.opacity&&(this.style.opacity=t.style.opacity),null!=t.style.weight&&(this.style.weight=t.style.weight),null!=t.style.remainingVolumeColor&&(this.style.remainingVolumeColor=t.style.remainingVolumeColor),null!=t.style.remainingVolumeOpacity&&(this.style.remainingVolumeOpacity=t.style.remainingVolumeOpacity),null!=t.style.consumeVolumeColor&&(this.style.consumeVolumeColor=t.style.consumeVolumeColor),t.style.consumeVolumeOpacity&&(this.style.consumeVolumeOpacity=t.style.consumeVolumeOpacity)):(null!=t.visible&&!1===t.visible&&(this.style.display="none"),null!=t.lineColor&&(this.style.color=SuperMap.Plot.PlottingUtil.colorRGBToString(t.lineColor),this.style.opacity=(t.lineColor.alpha/255).toFixed(2)),null!=t.lineWidth&&(this.style.weight=Math.ceil(t.lineWidth*SuperMap.Plot.PlottingUtil.DPI/25.4)),null!=t.remainingColor&&(this.style.remainingVolumeColor=SuperMap.Plot.PlottingUtil.colorRGBToString(t.remainingColor),this.style.remainingVolumeOpacity=(t.remainingColor.alpha/255).toFixed(2)),null!=t.consumeColor&&(this.style.consumeVolumeColor=SuperMap.Plot.PlottingUtil.colorRGBToString(t.consumeColor),this.style.consumeVolumeOpacity=(t.consumeColor.alpha/255).toFixed(2))),this}};SuperMap.Plot.PictureFrame=class{constructor(t,e,i){i=i||{},this.path=t,this.position=e,void 0!==this.position&&null!==this.position||(this.position=SuperMap.Plot.Position.TOP),this.offsetX=i.offsetX?i.offsetX:0,this.offsetY=i.offsetY?i.offsetY:0,this.width=i.width?i.width:32,this.height=i.height?i.height:32,this.CLASS_NAME="SuperMap.Plot.PictureFrame"}destroy(){this.path=null,this.position=null,this.offsetX=null,this.offsetY=null,this.width=null,this.height=null}clone(){var t={offsetX:this.offsetX,offsetY:this.offsetY,width:this.width,height:this.height};return new SuperMap.Plot.PictureFrame(this.path,this.position,t)}setSymbolData(){var t={};return t.path=this.path,t.position=this.position,t.offsetX=this.offsetX,t.offsetY=this.offsetY,t.width=this.width,t.height=this.height,t}parseSymbolData(t){return this.path=t.path,this.position=t.position,null!=t.offsetX&&(this.offsetX=t.offsetX),null!=t.offsetY&&(this.offsetY=t.offsetY),null!=t.width&&(this.width=t.width),null!=t.height&&(this.height=t.height),this}};SuperMap.Plot.Trajectory=class{constructor(t,e,i,o,l){l=l||{},this.latlngs=[],this.trajectoryLength=t,null==this.trajectoryLength&&(this.trajectoryLength=15),this.showTrackingLine=e,null==this.showTrackingLine&&(this.showTrackingLine=!0),this.showTrackingPoint=i,null==this.showTrackingPoint&&(this.showTrackingPoint=!1),this.saveTrackingPoint=null!=l.saveTrackingPoint&&l.saveTrackingPoint,this.trackingPointStyle=null!=l.trackingPointStyle?l.trackingPointStyle:0,this.trackingPointRadius=null!=l.trackingPointRadius?l.trackingPointRadius:2,this.style={color:"#ff0000",opacity:1,weight:1},null!=o&&(this.style=SuperMap.Util.copyAttributes(this.style,o)),this.CLASS_NAME="SuperMap.Plot.Trajectory"}addLatLng(t){this.latlngs.length>0&&SuperMap.Plot.PlottingUtil.equalFuzzy(t.lat,this.latlngs[this.latlngs.length-1].lat)&&SuperMap.Plot.PlottingUtil.equalFuzzy(t.lng,this.latlngs[this.latlngs.length-1].lng)||(!1===this.saveTrackingPoint&&-1!==this.trajectoryLength&&this.trajectoryLength>0?this.latlngs.length<this.trajectoryLength?this.latlngs.push(L.latLng(t.lat,t.lng)):(this.latlngs.splice(0,this.latlngs.length-this.trajectoryLength+1),this.latlngs.push(L.latLng(t.lat,t.lng))):-1!==this.trajectoryLength&&!0!==this.saveTrackingPoint||this.latlngs.push(L.latLng(t.lat,t.lng)))}getDisplayLatLngs(t){var e=[];if("none"===this.style.display)return e;let i=[],o=0;this.trajectoryLength>0&&this.latlngs.length>this.trajectoryLength&&(o+=this.latlngs.length-this.trajectoryLength);for(var l=o;l<this.latlngs.length&&!t.contains(this.latlngs[l]);l++)if(!0===this.showTrackingLine&&l!==this.latlngs.length-1){0===i.length&&(i.push(t.getNorthWest()),i.push(t.getNorthEast()),i.push(t.getSouthEast()),i.push(t.getSouthWest()),i.push(t.getNorthWest()));let e=!1;for(let t=0;t<i.length-1;t++)if(SuperMap.Plot.PlottingUtil.isCross(this.latlngs[l],this.latlngs[l+1],i[t],i[t+1])){e=!0;break}if(e)break}let s=o;for(l>o&&(s=l),l=s;l<this.latlngs.length;l++)e.push(this.latlngs[l]);return e}generateUuidKey(){return this.trackingPointStyle.toString()+"_"+this.trackingPointRadius.toString()+"_"+this.style.color+"_"+this.style.weight.toString()}destroy(){this.latlngs.length=0,this.trajectoryLength=null,this.showTrackingLine=null,this.showTrackingPoint=null,this.saveTrackingPoint=null,this.style=null}clone(){var t={saveTrackingPoint:this.saveTrackingPoint},e={};return e=SuperMap.Util.copyAttributes(e,this.style),new SuperMap.Plot.Trajectory(this.trajectoryLength,this.showTrackingLine,this.showTrackingPoint,e,t)}setSymbolData(){var t={};return t.trajectoryLength=this.trajectoryLength,t.showTrackingLine=this.showTrackingLine,t.showTrackingPoint=this.showTrackingPoint,t.saveTrackingPoint=this.saveTrackingPoint,SuperMap.Plot.AnalysisSymbol.setStyle(this.style,t,!0),t}parseSymbolData(t){return this.trajectoryLength=t.trajectoryLength,this.showTrackingLine=t.showTrackingLine,this.showTrackingPoint=t.showTrackingPoint,this.saveTrackingPoint=t.saveTrackingPoint,SuperMap.Plot.AnalysisSymbol.getStyle(symbolTextData,!0),this}};SuperMap.Plot.DetectionRange=class{constructor(t,e,i){i=i||{},this.radius=t,this.pixelRadius=i.pixelRadius?i.pixelRadius:0,this.points=i.points?i.points:0,this.style={display:"display",color:"#ff0000",opacity:1,weight:1,fill:!0,fillColor:"#ff0000",fillOpacity:.5},null!=e&&(this.style=SuperMap.Plot.PlottingUtil.copyAttributes(this.style,e)),this.CLASS_NAME="SuperMap.Plot.DetectionRange"}destroy(){this.pixelRadius=null,this.radius=null,this.points=null,this.style=null}clone(){var t={points:this.points,pixelRadius:this.pixelRadius},e={};return e=SuperMap.Util.copyAttributes(e,this.style),new SuperMap.Plot.DetectionRange(this.radius,e,t)}setSymbolData(){var t={};return t.radius=this.radius,t.pixelRadius=this.pixelRadius,t.points=this.points,null!=this.style&&(t.style={},null!=this.style.display&&(t.style.display=this.style.display),null!=this.style.color&&(t.style.color=this.style.color),null!=this.style.opacity&&(t.style.opacity=this.style.opacity),null!=this.style.weight&&(t.style.weight=this.style.weight),null!=this.style.fill&&(t.style.fill=this.style.fill),null!=this.style.fillColor&&(t.style.fillColor=this.style.fillColor),null!=this.style.fillOpacity&&(t.style.fillOpacity=this.style.fillOpacity)),t}parseSymbolData(t){if(this.radius=t.radius,this.pixelRadius=t.pixelRadius,t.points){this.points=[];for(var e=0;e<t.points.length;e++)this.points.push(new SuperMap.Geometry.Point(t.points[e].x,t.points[e].y))}return null!=t.style&&(null==this.style&&(this.style={}),null!=t.style.display&&(this.style.display=t.style.display),null!=t.style.color&&(this.style.color=t.style.color),null!=t.style.opacity&&(this.style.opacity=t.style.opacity),null!=t.style.weight&&(this.style.weight=t.style.weight),null!=t.style.fill&&(this.style.remainingVolumeColor=t.style.fill),null!=t.style.fillColor&&(this.style.remainingVolumeOpacity=t.style.fillColor),null!=t.style.fillOpacity&&(this.style.consumeVolumeColor=t.style.fillOpacity)),this}};SuperMap.Plot.TimeWindowParameter=class{constructor(t,e,i){this.startOrbitPoint=t,this.endOrbitPoint=e,this.type=i,this.CLASS_NAME="SuperMap.Plot.TimeWindowParameter"}destroy(){this.startOrbitPoint=null,this.endOrbitPoint=null,this.type=null}};class u{constructor(t){t=t||{},this.routeNodeId=t.routeNodeId?t.routeNodeId:null,this.relLineText=t.relLineText?t.relLineText:SuperMap.Plot.RelLineText.ONLEFTLINE,this.index=t.index?t.index:0,this.textContent=t.textContent?t.textContent:null,this.offsetX=t.offsetX?t.offsetX:null,this.offsetY=t.offsetY?t.offsetY:null,this.style=t.style?t.style:{fontSize:12,fontFamily:"Microsoft YaHei"},this.CLASS_NAME="SuperMap.Plot.TowardNode"}destroy(){this.routeNodeId=null,this.relLineText=null,this.textContent=null,this.style=null}clone(){var t={routeNodeId:this.routeNodeId,relLineText:this.relLineText,textContent:this.textContent,style:SuperMap.Util.cloneObject(this.style)};return new u(t)}parseSymbolData(t){return this.routeNodeId=t.routeNodeId,this.relLineText=t.relLineText,this.index=t.index,this.textContent=t.textContent,this.offsetX=t.offsetX,this.offsetY=t.offsetY,this.style=SuperMap.Plot.AnalysisSymbol.getStyle(t,!0),this}setSymbolData(){var t={};return t.routeNodeId=this.routeNodeId,t.relLineText=this.relLineText,t.index=this.index,t.textContent=this.textContent,t.offsetX=this.offsetX,t.offsetY=this.offsetY,SuperMap.Util.applyDefaults(this.style,L.supermap.plotting.PlottingObject.prototype._defaultStyle),SuperMap.Plot.AnalysisSymbol.setStyle(this.style,t,!0),t}}SuperMap.Plot.TowardNode=u;SuperMap.Plot.Transaction=class{constructor(t){t=t||{},this.transType=t.transType?t.transType:SuperMap.Plot.TransactionType.EDIT,this.transInfos=[],this.CLASS_NAME="SuperMap.Plot.Transaction"}destroy(){this.transInfos=null,this.transType=null}};SuperMap.Plot.TransactionInfo=class{constructor(t){t=t||{},this.layer=t.layer?t.layer:null,this.feature=t.feature?t.feature:null,this.uuid=t.uuid?t.uuid:null,this.functionName=t.functionName?t.functionName:null,this.undoParams=t.undoParams?t.undoParams:null,this.redoParams=t.redoParams?t.redoParams:null,this.propertyName=t.propertyName?t.propertyName:null,this.undoValue=t.undoValue?t.undoValue:null,this.redoValue=t.redoValue?t.redoValue:null,this.CLASS_NAME="SuperMap.Plot.TransactionInfo"}};SuperMap.Plot.CalculateCanvasGradient=class{constructor(t,e){this.feature=t,this._bounds=e}destroy(){this.feature=null}getContext(){return this.feature._map.getRenderer(this.feature.layer)._ctx}calculateObjectByBounds(){var t=this.feature._map.latLngToLayerPoint(L.latLng(this._bounds.getNorth(),this._bounds.getWest())),e=this.feature._map.latLngToLayerPoint(L.latLng(this._bounds.getSouth(),this._bounds.getEast())),i=this.feature._map.latLngToLayerPoint(L.latLng(this._bounds.getCenter()));if(t.x!==e.x||t.y!==e.y){var o=Math.max(t.x,e.x),l=Math.max(t.y,e.y),s=Math.min(t.x,e.x),n=Math.min(t.y,e.y);return{ptMinX:s,ptMinY:n,width:Math.abs(o-s),height:Math.abs(l-n),center:i,r:Math.abs(t.x-e.x)>Math.abs(e.y-e.y)?Math.abs(t.x-e.x):Math.abs(t.y-e.y)}}}createGradient(){var t=null;if(this.getContext()instanceof CanvasRenderingContext2D){var e=this.calculateObjectByBounds();if("LINEAR"===this.feature.style.fillGradientMode){var i=this.getGradientDirection(this.feature.style.fillAngle);if(t=this.getContext().createLinearGradient(e.ptMinX+e.width*i.x1,e.ptMinY+e.height*i.y1,e.ptMinX+e.width*i.x2,e.ptMinY+e.height*i.y2),0===this.feature.style.fillCenterOffsetX&&0===this.feature.style.fillCenterOffsetY)t.addColorStop(0,SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillColor,this.feature.style.fillOpacity)),t.addColorStop(1,SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillBackColor,this.feature.style.fillOpacity));else{var o=this.feature.style.fillAngle;0===o||180===o||90===o||270===o?(t.addColorStop(0,SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillBackColor,this.feature.style.fillOpacity)),0!==o&&180!==o||t.addColorStop(this.feature.style.fillCenterOffsetX,SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillColor,this.feature.style.fillOpacity)),90!==o&&270!==o||t.addColorStop(this.feature.style.fillCenterOffsetY,SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillColor,this.feature.style.fillOpacity)),t.addColorStop(1,SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillBackColor,this.feature.style.fillOpacity))):(t.addColorStop(0,SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillBackColor,this.feature.style.fillOpacity)),t.addColorStop(this.feature.style.fillCenterOffsetX>=this.feature.style.fillCenterOffsetY?this.feature.style.fillCenterOffsetX:this.feature.style.fillCenterOffsetY*Math.cos(this.feature.style.fillAngle*Math.PI/180),SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillColor,this.feature.style.fillOpacity)),t.addColorStop(1,SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillBackColor,this.feature.style.fillOpacity)))}}if("RADIAL"===this.feature.style.fillGradientMode){var l=this.feature.style.fillCenterOffsetX*e.r,s=this.feature.style.fillCenterOffsetY*e.r,n=e.r/Math.sqrt(2)+Math.abs(l)>e.r/Math.sqrt(2)+Math.abs(s)?e.r/Math.sqrt(2)+Math.abs(l):e.r/Math.sqrt(2)+Math.abs(s);(t=this.getContext().createRadialGradient(e.center.x+l,e.center.y-s,0,e.center.x+l,e.center.y-s,n)).addColorStop(0,SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillColor,this.feature.style.fillOpacity)),this.feature.style.fillColor,this.feature.style.fillBackColor,t.addColorStop(1,SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillBackColor,this.feature.style.fillOpacity))}return t}}createTextureFill(t){if(0!==t.length){var e=document.createElement("canvas");document.body.appendChild(e);var i=e.getContext("2d");e.width=8,e.height=8;var o=e.width,l=e.height,s=SuperMap.Plot.PlottingUtil.colorStringToRGB(t[0].color);i.strokeStyle=`rgba(${s.red},${s.green},${s.blue},${t[0].opacity})`,i.lineWidth=1;var n=SuperMap.Plot.PlottingUtil.colorStringToRGB(t[1].color);switch(i.fillStyle=`rgba(${n.red},${n.green},${n.blue},${t[1].opacity})`,i.fillRect(0,0,e.width,e.height),i.beginPath(),t[0].fillID){case 0:case 1:break;case 2:i.moveTo(0,l),i.lineTo(o,0);break;case 3:i.moveTo(0,0),i.lineTo(o,0),i.moveTo(0,0),i.lineTo(0,l);break;case 4:i.moveTo(0,l),i.lineTo(o,0),i.moveTo(0,0),i.lineTo(o,l);break;case 5:i.moveTo(0,0),i.lineTo(o,l);break;case 6:i.moveTo(0,0),i.lineTo(o,0);break;case 7:i.moveTo(0,0),i.lineTo(0,l)}i.closePath(),i.stroke(),i.fill();var a=i.createPattern(e,"repeat");return document.body.removeChild(e),a}}createFillMode(t){if(void 0!==this.feature.style.fillSymbolID)if(t.fill=this.feature.style.fill,t.fillSymbolID=this.feature.style.fillSymbolID,0===this.feature.style.fillSymbolID||1===this.feature.style.fillSymbolID||!0===this.feature.style.fill||!1===this.feature.style.fill)0===this.feature.style.fillSymbolID?t.fill=!0:1===this.feature.style.fillSymbolID&&(t.fill=!1),t.fillColor=this.feature.style.fillColor,t.fillOpacity=this.feature.style.fillOpacity;else if(this.feature.style.fillColor!==this.feature.style.fillBackColor||this.feature.style.fillBackOpacity>0&&this.feature.style.fillBackOpacity<1){var e=[];e.push({fillID:this.feature.style.fillSymbolID,color:this.feature.style.fillColor,opacity:this.feature.style.fillOpacity},{fillID:this.feature.style.fillSymbolID,color:this.feature.style.fillBackColor,opacity:this.feature.style.fillBackOpacity}),t.fill=!0,t.fillColor=this.createTextureFill(e),t.fillOpacity=this.feature.style.fillColor}else t.fill=!0,t.fillColor=this.feature.style.fillColor,t.fillOpacity=this.feature.style.fillOpacity;else t.fill=this.feature.style.fill,t.fillColor=this.feature.style.fillColor,t.fillOpacity=this.feature.style.fillOpacity}getGradientDirection(t){var e=function(t){return{x:Math.cos(t),y:Math.sin(t)}},i=function(t){return t*Math.PI/180},o=e(i(180-t%360)),l=e(i(360-t%360)),s=Math.pow(2,-52);return(o.x<=0||Math.abs(o.x)<=s)&&(o.x=0),(o.y<=0||Math.abs(o.y)<=s)&&(o.y=0),(l.x<=0||Math.abs(l.x)<=s)&&(l.x=0),(l.y<=0||Math.abs(l.y)<=s)&&(l.y=0),{x1:o.x,y1:o.y,x2:l.x,y2:l.y}}};SuperMap.Plot.CalculateSVGGradient=class{constructor(t){this.feature=t}destroy(){this.feature=null}createGradient(){var t=!1;this.feature.layer._renderer._container.defs||(this.feature.layer._renderer._container.defs=L.SVG.create("defs"),t=!0);var e=null;"LINEAR"===this.feature.style.fillGradientMode&&(e=document.getElementById("linearGradient_"+this.feature.uuid)),"RADIAL"===this.feature.style.fillGradientMode&&(e=document.getElementById("radialGradient_"+this.feature.uuid));var i=this.createGradientDirection();for("LINEAR"===this.feature.style.fillGradientMode?((e=null===e?L.SVG.create("linearGradient"):e).setAttributeNS(null,"x1",i.x1),e.setAttributeNS(null,"y1",i.y1),e.setAttributeNS(null,"x2",i.x2),e.setAttributeNS(null,"y2",i.y2)):"RADIAL"===this.feature.style.fillGradientMode&&((e=null===e?L.SVG.create("radialGradient"):e).setAttributeNS(null,"cx",i.cx),e.setAttributeNS(null,"cy",i.cy),e.setAttributeNS(null,"fx",i.fx),e.setAttributeNS(null,"fy",i.fy),e.setAttributeNS(null,"r",i.r));e.hasChildNodes();)e.removeChild(e.firstChild);for(var o=0,l=i.colors.length;o<l;o++){var s=L.SVG.create("stop");s.setAttributeNS(null,"offset",i.colors[o].offset),s.setAttributeNS(null,"style","stop-color:"+SuperMap.Plot.PlottingUtil.colorRGBA(i.colors[o].color,i.colors[o].opacity)),e.appendChild(s)}return 0===e.id.length&&e.setAttributeNS(null,"id",e.tagName+"_"+this.feature.uuid),this.feature.layer._renderer._container.defs.appendChild(e),t&&this.feature.layer._renderer._container.appendChild(this.feature.layer._renderer._container.defs),e.id}createTextureFill(t){var e=!1;this.feature.layer._renderer._container.defs||(this.feature.layer._renderer._container.defs=L.SVG.create("defs"),e=!0);var i=document.getElementById("patternFill_"+this.feature.uuid);function o(t){var e="";return 2===t.fillID?e="rotate(-45)":3===t.fillID||6===t.fillID?e="rotate(0)":4===t.fillID||5===t.fillID?e="rotate(45)":7===t.fillID&&(e="rotate(90)"),e}function l(t,e,i){var o=L.SVG.create("path");o.setAttributeNS(null,"d",t),o.setAttributeNS(null,"stroke",i.color),o.setAttributeNS(null,"stroke-width","2"),o.setAttributeNS(null,"stroke-linecap","square"),o.setAttributeNS(null,"stroke-opacity",i.opacity),e.appendChild(o)}function s(t,e,i){var o=L.SVG.create("polygon");o.setAttributeNS(null,"points",t),o.setAttributeNS(null,"fill",i.color),o.setAttributeNS(null,"fill-opacity",i.opacity),e.appendChild(o)}return i?(i.setAttributeNS(null,"patternTransform",o(t[0]).toString()),3===t[0].fillID||6===t[0].fillID||7===t[0].fillID?(i.setAttributeNS(null,"width",7.3),i.setAttributeNS(null,"height",7.3),i.childNodes[0].setAttributeNS(null,"points","0 0 0 7.3 7.3 7.3 7.3 0"),i.childNodes[1].setAttributeNS(null,"d","M 7.3 0 L 0 0")):(i.setAttributeNS(null,"width",5.4),i.setAttributeNS(null,"height",5.4),i.childNodes[0].setAttributeNS(null,"points","0 0 0 5.4 5.4 5.4 5.4 0"),i.childNodes[1].setAttributeNS(null,"d","M 5.4 0 L 0 0")),i.childNodes[0].setAttributeNS(null,"fill",t[1].color),i.childNodes[0].setAttributeNS(null,"fill-opacity",t[1].opacity),i.childNodes[1].setAttributeNS(null,"stroke",t[0].color),i.childNodes[1].setAttributeNS(null,"stroke-opacity",t[0].opacity),3===t[0].fillID||4===t[0].fillID?(i.childNodes[2]&&(i.childNodes[2].setAttributeNS(null,"stroke",t[0].color),i.childNodes[2].setAttributeNS(null,"stroke-opacity",t[0].opacity)),3===t[0].fillID?null===i&&l("M 0 7.3 L 0 0",i,t[0]):4===t[0].fillID&&null===i&&l("M 0 5.4 L 0 0",i,t[0])):i.childNodes[2]&&i.removeChild(i.childNodes[2]),0===i.id.length&&i.setAttributeNS(null,"id","patternFill_"+this.feature.uuid),i.id):((i=null===i?L.SVG.create("pattern"):i).setAttributeNS(null,"x",0),i.setAttributeNS(null,"y",0),3===t[0].fillID||6===t[0].fillID||7===t[0].fillID?(i.setAttributeNS(null,"width",7.3),i.setAttributeNS(null,"height",7.3)):(i.setAttributeNS(null,"width",5.4),i.setAttributeNS(null,"height",5.4)),i.setAttributeNS(null,"patternUnits","userSpaceOnUse"),i.setAttributeNS(null,"patternTransform",o(t[0]).toString()),3===t[0].fillID||6===t[0].fillID||7===t[0].fillID?(s("0 0 0 7.3 7.3 7.3 7.3 0",i,t[1]),l("M 7.3 0 L 0 0",i,t[0])):(s("0 0 0 5.4 5.4 5.4 5.4 0",i,t[1]),l("M 5.4 0 L 0 0",i,t[0])),4===t[0].fillID?l("M 0 5.4 L 0 0",i,t[0]):3===t[0].fillID&&l("M 0 7.3 L 0 0",i,t[0]),this.feature.layer._renderer._container.defs.appendChild(i),e&&this.feature.layer._renderer._container.appendChild(this.feature.layer._renderer._container.defs),0===i.id.length&&i.setAttributeNS(null,"id","patternFill_"+this.feature.uuid),i.id)}createFillMode(t){if(void 0!==this.feature.style.fillSymbolID)if(t.fill=this.feature.style.fill,t.fillSymbolID=this.feature.style.fillSymbolID,0===this.feature.style.fillSymbolID||1===this.feature.style.fillSymbolID||!0===this.feature.style.fill||!1===this.feature.style.fill)0===this.feature.style.fillSymbolID?t.fill=!0:1===this.feature.style.fillSymbolID&&(t.fill=!1),t.fillColor=this.feature.style.fillColor,t.fillOpacity=this.feature.style.fillOpacity;else if(this.feature.style.fillColor!==this.feature.style.fillBackColor||this.feature.style.fillBackOpacity>0&&this.feature.style.fillBackOpacity<1){var e=[];e.push({fillID:this.feature.style.fillSymbolID,color:this.feature.style.fillColor,opacity:this.feature.style.fillOpacity},{fillID:this.feature.style.fillSymbolID,color:this.feature.style.fillBackColor,opacity:this.feature.style.fillBackOpacity}),this.feature._map.getRenderer(this.feature.layer)instanceof L.SVG?(t.fillOpacity=1,t.fillColor="url(#"+this.createTextureFill(e)+")",t.fill=t.fillColor):new SuperMap.Plot.CalculateCanvasGradient(this.feature,this.feature.getBounds()).createTextureFill(e)}else t.fill=!0,t.fillColor=this.feature.style.fillColor,t.fillOpacity=this.feature.style.fillOpacity;else t.fill=this.feature.style.fill,t.fillColor=this.feature.style.fillColor,t.fillOpacity=this.feature.style.fillOpacity}createGradientDirection(){var t=[];if("LINEAR"===this.feature.style.fillGradientMode){if(null!==this.feature.style.fillCenterOffsetX&&void 0!==this.feature.style.fillCenterOffsetX&&(0===this.feature.style.fillAngle||180===this.feature.style.fillAngle?(t.push({offset:0,color:this.feature.style.fillBackColor,opacity:this.feature.style.fillOpacity}),t.push({offset:this.feature.style.fillCenterOffsetX,color:this.feature.style.fillColor,opacity:this.feature.style.fillOpacity}),t.push({offset:1,color:this.feature.style.fillBackColor,opacity:this.feature.style.fillOpacity})):90===this.feature.style.fillAngle||270===this.feature.style.fillAngle?(t.push({offset:0,color:this.feature.style.fillBackColor,opacity:this.feature.style.fillOpacity}),t.push({offset:this.feature.style.fillCenterOffsetY,color:this.feature.style.fillColor,opacity:this.feature.style.fillOpacity}),t.push({offset:1,color:this.feature.style.fillBackColor,opacity:this.feature.style.fillOpacity})):(t.push({offset:0,color:this.feature.style.fillBackColor,opacity:this.feature.style.fillOpacity}),t.push({offset:this.feature.style.fillCenterOffsetX/2*(Math.sqrt(2)/2)*Math.abs(Math.sin(this.feature.style.fillAngle*Math.PI/180)),color:this.feature.style.fillColor,opacity:this.feature.style.fillOpacity}),t.push({offset:1,color:this.feature.style.fillBackColor,opacity:this.feature.style.fillOpacity}))),this.feature.style.fillAngle>=360&&(this.feature.style.fillAngle=0),0===this.feature.style.fillAngle)return{x1:0,y1:0,x2:1,y2:0,colors:t};if(90===this.feature.style.fillAngle)return{x1:0,y1:1,x2:0,y2:0,colors:t};if(180===this.feature.style.fillAngle)return{x1:1,y1:0,x2:0,y2:0,colors:t};if(270===this.feature.style.fillAngle)return{x1:0,y1:0,x2:0,y2:1,colors:t};if(0<this.feature.style.fillAngle&&this.feature.style.fillAngle<=45)return{x1:0,y1:1,x2:1,y2:(1-Math.tan(this.feature.style.fillAngle*Math.PI/180))/2,colors:t};if(45<this.feature.style.fillAngle&&this.feature.style.fillAngle<90)return{x1:0,y1:1,x2:(1-Math.tan((this.feature.style.fillAngle-45)*Math.PI/180))/2,y2:0,colors:t};if(90<this.feature.style.fillAngle&&this.feature.style.fillAngle<=135)return{x1:1,y1:1,x2:Math.tan((this.feature.style.fillAngle-90)*Math.PI/180)/2,y2:0,colors:t};if(135<this.feature.style.fillAngle&&this.feature.style.fillAngle<180)return{x1:1,y1:1,x2:0,y2:Math.tan((this.feature.style.fillAngle-135)*Math.PI/180)/2,colors:t};if(180<this.feature.style.fillAngle&&this.feature.style.fillAngle<=225)return{x1:1,y1:0,x2:0,y2:Math.tan((this.feature.style.fillAngle-180)*Math.PI/180)/2,colors:t};if(225<this.feature.style.fillAngle&&this.feature.style.fillAngle<270)return{x1:1,y1:0,x2:Math.tan((this.feature.style.fillAngle-225)*Math.PI/180)/2,y2:0,colors:t};if(270<this.feature.style.fillAngle&&this.feature.style.fillAngle<=315)return{x1:0,y1:0,x2:1-Math.tan((this.feature.style.fillAngle-270)*Math.PI/180)/2,y2:1,colors:t};if(315<this.feature.style.fillAngle&&this.feature.style.fillAngle<360)return{x1:0,y1:0,x2:1,y2:Math.tan((this.feature.style.fillAngle-315)*Math.PI/180)/2,colors:t}}else if("RADIAL"===this.feature.style.fillGradientMode)if(null!==this.feature.style.fillCenterOffsetX&&void 0!==this.feature.style.fillCenterOffsetX&&null!==this.feature.style.fillCenterOffsetY&&void 0!==this.feature.style.fillCenterOffsetY&&(t.push({offset:0,color:this.feature.style.fillColor,opacity:this.feature.style.fillOpacity}),this.feature.style.fillColor,this.feature.style.fillBackColor,t.push({offset:1,color:this.feature.style.fillBackColor,opacity:this.feature.style.fillOpacity})),this.feature.style.fillCenterOffsetX<=.5&&this.feature.style.fillCenterOffsetX>=0||this.feature.style.fillCenterOffsetX<=0&&this.feature.style.fillCenterOffsetX>=-1){if(this.feature.style.fillCenterOffsetY>=0&&this.feature.style.fillCenterOffsetY<=.5||this.feature.style.fillCenterOffsetY>=-.5&&this.feature.style.fillCenterOffsetY<=0)return{cx:.5,cy:.5,fx:.5+this.feature.style.fillCenterOffsetX,fy:.5-this.feature.style.fillCenterOffsetY,r:.5*Math.sqrt(2),colors:t};if(this.feature.style.fillCenterOffsetY>=.5&&this.feature.style.fillCenterOffsetY<=.8||this.feature.style.fillCenterOffsetY>=-.8&&this.feature.style.fillCenterOffsetY<=-.5)return{cx:.5,cy:.5,fx:.5+this.feature.style.fillCenterOffsetX,fy:.5-this.feature.style.fillCenterOffsetY,r:.8*Math.sqrt(2),colors:t};if(this.feature.style.fillCenterOffsetY>=.8&&this.feature.style.fillCenterOffsetY<=1||this.feature.style.fillCenterOffsetY>=-1&&this.feature.style.fillCenterOffsetY<=-.8)return{cx:.5,cy:.5,fx:.5+this.feature.style.fillCenterOffsetX,fy:.5-this.feature.style.fillCenterOffsetY,r:Math.sqrt(2),colors:t}}else if(this.feature.style.fillCenterOffsetX<=.8&&this.feature.style.fillCenterOffsetX>.5||this.feature.style.fillCenterOffsetX<=-.5&&this.feature.style.fillCenterOffsetX>=-.8){if(this.feature.style.fillCenterOffsetY>=0&&this.feature.style.fillCenterOffsetY<=.5||this.feature.style.fillCenterOffsetY>=-.5&&this.feature.style.fillCenterOffsetY<=0)return{cx:.5,cy:.5,fx:.5+this.feature.style.fillCenterOffsetX,fy:.5-this.feature.style.fillCenterOffsetY,r:.8*Math.sqrt(2),colors:t};if(this.feature.style.fillCenterOffsetY>=.5&&this.feature.style.fillCenterOffsetY<=.8||this.feature.style.fillCenterOffsetY>=-.8&&this.feature.style.fillCenterOffsetY<=-.5)return{cx:.5,cy:.5,fx:.5+this.feature.style.fillCenterOffsetX,fy:.5-this.feature.style.fillCenterOffsetY,r:.8*Math.sqrt(2),colors:t};if(this.feature.style.fillCenterOffsetY>=.8&&this.feature.style.fillCenterOffsetY<=1||this.feature.style.fillCenterOffsetY>=-1&&this.feature.style.fillCenterOffsetY<=-.8)return{cx:.5,cy:.5,fx:.5+this.feature.style.fillCenterOffsetX,fy:.5-this.feature.style.fillCenterOffsetY,r:Math.sqrt(2),colors:t}}else if(this.feature.style.fillCenterOffsetX<=1&&this.feature.style.fillCenterOffsetX>.8||this.feature.style.fillCenterOffsetX<=-.8&&this.feature.style.fillCenterOffsetX>=-1){if(this.feature.style.fillCenterOffsetY>=0&&this.feature.style.fillCenterOffsetY<=.5||this.feature.style.fillCenterOffsetY>=-.5&&this.feature.style.fillCenterOffsetY<=0)return{cx:.5,cy:.5,fx:.5+this.feature.style.fillCenterOffsetX,fy:.5-this.feature.style.fillCenterOffsetY,r:Math.sqrt(2),colors:t};if(this.feature.style.fillCenterOffsetY>=.5&&this.feature.style.fillCenterOffsetY<=.8||this.feature.style.fillCenterOffsetY>=-.8&&this.feature.style.fillCenterOffsetY<=-.5)return{cx:.5,cy:.5,fx:.5+this.feature.style.fillCenterOffsetX,fy:.5-this.feature.style.fillCenterOffsetY,r:Math.sqrt(2),colors:t};if(this.feature.style.fillCenterOffsetY>=.8&&this.feature.style.fillCenterOffsetY<=1||this.feature.style.fillCenterOffsetY>=-1&&this.feature.style.fillCenterOffsetY<=-.8)return{cx:.5,cy:.5,fx:.5+this.feature.style.fillCenterOffsetX,fy:.5-this.feature.style.fillCenterOffsetY,r:Math.sqrt(2),colors:t}}}};
/* Copyright© 2000 - 2018 SuperMap Software Co.Ltd. All rights reserved.
* This program are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
class h{constructor(t,e,i,o){this.x=parseFloat(t),this.y=parseFloat(e),this.tag=o||0==o?parseFloat(o):null,this.type=i||"Point",this.CLASS_NAME="SuperMapAlgoPlot"}clone(t){return null==t&&(t=new h(this.x,this.y)),SuperMap.Util.applyDefaults(t,this),t}calculateBounds(){this.bounds=new Bounds(this.x,this.y,this.x,this.y)}equals(t){var e=!1;return null!=t&&(e=this.x===t.x&&this.y===t.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(t.x)&&isNaN(t.y)),e}move(t,e){this.x=this.x+t,this.y=this.y+e,this.clearBounds()}toShortString(){return this.x+", "+this.y}destroy(){this.x=null,this.y=null,this.tag=null,super.destroy()}getVertices(t){return[this]}}SuperMapAlgoPlot.Point=h;SuperMapAlgoPlot.AnalysisSymbol=SuperMapAlgoPlot.AnalysisSymbol||{};SuperMapAlgoPlot.AnalysisSymbol.analysisBasicInfo=function(t){let e=new Object;return e.libID=t.libID,e.code=t.code,e.symbolType=t.symbolType,e.symbolName=t.symbolName,e.textContent=t.textContent,e.minEditPts=t.algoMinEditPts,e.maxEditPts=t.algoMaxEditPts,e.surroundLineType=t.surroundLineType,e},SuperMapAlgoPlot.AnalysisSymbol.analysisDotBasicInfo=function(t){let e=SuperMapAlgoPlot.PlottingUtil.DPI,i=new Object;i.anchorPoint=new SuperMapAlgoPlot.Point(t.anchorPoint.x,t.anchorPoint.y);let o=0,l=0;return void 0!==t.symbolSizeInLib?(o=Math.round(t.symbolSizeInLib.x*e/25.4/10),l=Math.round(t.symbolSizeInLib.y*e/25.4/10)):(o=Math.round(t.symbolSize.x*e/25.4/10),l=Math.round(t.symbolSize.y*e/25.4/10)),i.symbolSizeInLib=new SuperMap.Size(o,l),i.symbolSizeInLib.w=o,i.symbolSizeInLib.h=l,t.middleMarkBounds&&(i.middleMarkBounds=new SuperMap.Bounds(t.middleMarkBounds.leftBottom.x,t.middleMarkBounds.leftBottom.y,t.middleMarkBounds.rightTop.x,t.middleMarkBounds.rightTop.y)),i},SuperMapAlgoPlot.AnalysisSymbol.analysisAlgoBasicInfo=function(t,e){let i=new Object;if(i.subSymbols=[],i.scalePoints=[],i.scaleValues=[],e&&t.subSymbols)for(let e=0;e<t.subSymbols.length;e++)i.subSymbols.push(new SuperMapAlgoPlot.SubSymbol(t.libID,t.subSymbols[e]));if(t.scalePoints){i.scalePoints=[];for(let e=0;e<t.scalePoints.length;e++){let o=new SuperMapAlgoPlot.Point(t.scalePoints[e].x,t.scalePoints[e].y);o.tag=e,o.isScalePoint=!0,i.scalePoints.push(o)}}if(t.scaleValues)for(let e=0;e<t.scaleValues.length;e++)i.scaleValues.push(t.scaleValues[e]);return i},SuperMapAlgoPlot.AnalysisSymbol.analysisSymbolCells=function(t,e){let i=[];if(t&&(function(t,i){if(t.innerCells&&t.innerCells.length)for(let o=0;o<t.innerCells.length;o++){let l=t.innerCells[o];if(t.symbolIsCanFill&&l.type!==SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL){let o=new Object,s=SuperMapAlgoPlot.AnalysisSymbol.getStyle(t,e);o.type=32,o.style={fillSymbolID:s.fillSymbolID,fillColor:s.fillColor,fillOpacity:s.fillOpacity,strokeOpacity:0,strokeWidth:0,fillLimit:!1,lineColorLimit:!0,lineWidthLimit:!0},o.positionPoints=[];for(let t=0;t<l.positionPoints.length;t++){let e=new SuperMapAlgoPlot.Point(l.positionPoints[t].x,l.positionPoints[t].y);o.positionPoints.push(e)}i.push(o)}}}(t,i),t.innerCells)){let o=t.innerCells;if(0!==o.length)for(let t=0;t<o.length;t++)i.push(SuperMapAlgoPlot.AnalysisSymbol.analysisInnerCell(o[t],e))}return i},SuperMapAlgoPlot.AnalysisSymbol.analysisInnerCell=function(t,e){let i=new Object;if(i.positionPoints=[],t){if(void 0!==t.polybezierClose&&(i.polybezierClose=t.polybezierClose),i.type=t.type,i.surroundLineFlag=t.surroundLineFlag,i.textContent=t.textContent,i.style=SuperMapAlgoPlot.AnalysisSymbol.getStyle(t,e),null!=t.positionPoints){let e=t.positionPoints;for(let t=0;t<e.length;t++){let o=new SuperMapAlgoPlot.Point(e[t].x,e[t].y);i.positionPoints.push(o)}}if(i.style.lineColorLimit=t.lineColorLimit,i.style.lineTypeLimit=t.lineTypeLimit,i.style.lineWidthLimit=t.lineWidthLimit,i.style.fillLimit=t.fillLimit,i.style.fillColorLimit=t.fillColorLimit,i.style.fontColorLimit=t.fontColorLimit,i.style.surroundLineLimit=t.surroundLineLimit,i.style.surroundLineFlag=t.surroundLineFlag,i.style.surroundLineType=t.surroundLineType,34==t.type?i.style.fontColorLimit=!0:i.style.fontColorLimit=t.fontColorLimit,i.type===SuperMapAlgoPlot.SymbolType.RECTANGLESYMBOL){let t=i.positionPoints[0],e=i.positionPoints[1],o=t.clone(),l=new SuperMapAlgoPlot.Point(e.x,t.y),s=e.clone(),n=new SuperMapAlgoPlot.Point(t.x,e.y);i.positionPoints=[],i.positionPoints.push(o),i.positionPoints.push(l),i.positionPoints.push(s),i.positionPoints.push(n),i.type=SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL}i.type===SuperMapAlgoPlot.SymbolType.TEXTSYMBOL&&(i.style.fontSizeLimit=!0)}return i},SuperMapAlgoPlot.AnalysisSymbol.getStyle=function(t,e){function i(t){let e=t.red.toString(16);e.length<2&&(e="0"+e);let i=t.green.toString(16);i.length<2&&(i="0"+i);let o=t.blue.toString(16);return o.length<2&&(o="0"+o),"#"+e+i+o}function o(t){return"TOPLEFT"===t?"lt":"TOPCENTER"===t?"ct":"TOPRIGHT"===t?"rt":"BOTTOMLEFT"===t?"lb":"BOTTOMCENTER"===t?"cb":"BOTTOMRIGHT"===t?"rb":"MIDDLELEFT"===t?"lm":"MIDDLECENTER"===t?"cm":"MIDDLERIGHT"===t?"rm":0===t?"lt":1===t?"ct":2===t?"rt":6===t?"lb":7===t?"cb":8===t?"rb":9===t?"lm":10===t?"cm":11===t?"rm":"lt"}var l=SuperMapAlgoPlot.PlottingUtil.DPI,s={};return t.style?(e?(s.fillSymbolID=t.style.fillSymbolID,s.fillSymbolID||(s.fill=t.style.fill)):(!1===t.style.fill?t.style.fillSymbolID=1:!0===t.style.fill&&(t.style.fillSymbolID=0),s.fillSymbolID=t.style.fillSymbolID),void 0!==t.style.strokeGradientMode&&null!=t.style.strokeGradientMode?1===t.style.strokeGradientMode?s.strokeGradientMode="LINEAR":2===t.style.strokeGradientMode?s.strokeGradientMode="RADIAL":"LINEAR"!==t.style.strokeGradientMode&&"RADIAL"!==t.style.strokeGradientMode&&(s.strokeGradientMode="NONE"):s.strokeGradientMode="NONE",t.style.strokeBackColor?void 0!==t.style.strokeBackColor.red?(s.strokeBackColor=i(t.style.strokeBackColor),s.strokeBackOpacity=(t.style.strokeBackColor.alpha/255).toFixed(2)):(s.strokeBackColor=t.style.strokeBackColor,s.strokeBackOpacity=t.style.strokeBackOpacity):t.style.fillBackColor&&(void 0!==t.style.fillBackColor.red?(s.strokeBackColor=i(t.style.fillBackColor),s.strokeBackOpacity=(t.style.fillBackColor.alpha/255).toFixed(2)):(s.strokeBackColor=t.style.strokeBackColor,s.strokeBackOpacity=t.style.strokeBackOpacity)),void 0!==t.style.fillGradientMode&&null!=t.style.fillGradientMode&&(1===t.style.fillGradientMode?s.fillGradientMode="LINEAR":2===t.style.fillGradientMode?s.fillGradientMode="RADIAL":"LINEAR"!==t.style.fillGradientMode&&"RADIAL"!==t.style.fillGradientMode&&(s.fillGradientMode="NONE")),null!=t.style.fillGradientAngle&&void 0!==t.style.fillGradientAngle?s.fillAngle=t.style.fillGradientAngle:void 0!==t.style.fillAngle&&null!=t.style.fillAngle&&(s.fillAngle=t.style.fillAngle),void 0!==t.style.fillGradientOffsetRatioX&&null!=t.style.fillGradientOffsetRatioX?s.fillCenterOffsetX=t.style.fillGradientOffsetRatioX/100:void 0!==t.style.fillCenterOffsetX&&null!=t.style.fillCenterOffsetX&&(s.fillCenterOffsetX=t.style.fillCenterOffsetX/100),void 0!==t.style.fillGradientOffsetRatioY&&null!=t.style.fillGradientOffsetRatioY?s.fillCenterOffsetY=t.style.fillGradientOffsetRatioY/100:void 0!==t.style.fillCenterOffsetY&&null!=t.style.fillCenterOffsetY&&(s.fillCenterOffsetY=t.style.fillCenterOffsetY/100),void 0!==t.style.fillForeColor&&(s.fillColor=i(t.style.fillForeColor)),void 0!==t.style.fillOpaqueRate&&(s.fillOpacity=(t.style.fillOpaqueRate/100).toFixed(2),100!==t.style.fillOpaqueRate||1===t.style.fillGradientMode&&2===t.style.fillGradientMode||(s.fillOpacity=(t.style.fillForeColor.alpha/255).toFixed(2))),void 0!==t.style.fillBackColor&&(void 0!==t.style.fillBackColor.red?s.fillBackColor=i(t.style.fillBackColor):s.fillBackColor=t.style.fillBackColor),0===t.style.fillBackOpaque?s.fillBackOpacity=0:t.style.fillBackColor&&t.style.fillBackColor.alpha?s.fillBackOpacity=(t.style.fillBackColor.alpha/255).toFixed(2):s.fillBackOpacity=t.style.fillBackOpacity,void 0!==t.style.lineColor&&(!0===e?(s.color=i(t.style.lineColor),s.opacity=(t.style.lineColor.alpha/255).toFixed(2)):(s.strokeColor=i(t.style.lineColor),s.strokeOpacity=(t.style.lineColor.alpha/255).toFixed(2))),!0===e?null!=t.style.lineWidth?s.weight=Math.ceil(t.style.lineWidth*l/25.4):null!=t.style.weight&&(s.weight=t.style.weight):null!=t.style.lineWidth?s.strokeWidth=Math.ceil(t.style.lineWidth*l/25.4):null!=t.style.strokeWidth&&(s.strokeWidth=t.style.strokeWidth),e?(s.lineSymbolID=t.style.lineSymbolID,s.lineSymbolID||(s.dashArray=t.style.dashArray),!s.dashArray&&t.style.strokeDashstyle&&("dash"===t.style.strokeDashstyle?s.lineSymbolID=1:"dot"===t.style.strokeDashstyle?s.lineSymbolID=2:"dashdot"===t.style.strokeDashstyle?s.lineSymbolID=3:s.lineSymbolID=0)):1===t.style.lineSymbolID?s.strokeDashstyle="dash":2===t.style.lineSymbolID?s.strokeDashstyle="dot":3===t.style.lineSymbolID?s.strokeDashstyle="dashdot":t.style.strokeDashstyle?s.strokeDashstyle=t.style.strokeDashstyle:s.strokeDashstyle="solid",t.textStyle2D&&null!=t.textStyle2D?(void 0!==t.textStyle2D.sizeFixed&&(s.sizeFixed=t.textStyle2D.sizeFixed),void 0!==t.textStyle2D.fontName&&(s.fontFamily=t.textStyle2D.fontName),void 0!==t.textStyle2D.fontHeight&&(s.fontSize=Math.ceil(t.textStyle2D.fontHeight*l/25.4)),void 0!==t.textStyle2D.foreColor&&(s.fontColor=i(t.textStyle2D.foreColor),s.fontOpacity=(t.textStyle2D.foreColor.alpha/255).toFixed(2)),void 0!==t.textStyle2D.align&&(s.labelAlign=o(t.textStyle2D.align)),void 0!==t.textStyle2D.rotation&&(s.labelRotation=-t.textStyle2D.rotation),null!=t.textStyle2D.bold&&(t.textStyle2D.bold?s.fontWeight="bold":s.fontWeight="normal"),s.labelXOffset=0,s.labelYOffset=0,null!=t.textStyle2D.outline?s.fontStroke=t.textStyle2D.outline:t.textStyle2D&&void 0!==t.textStyle2D.outline&&(s.fontStroke=t.textStyle2D.outline),void 0!==t.style.fontStrokeColor?s.fontStrokeColor=t.style.fontStrokeColor:t.textStyle2D&&void 0!==t.textStyle2D.backColor&&(s.fontStrokeColor=i(t.textStyle2D.backColor)),t.textStyle2D&&null!=t.textStyle2D.outlineWidth?s.fontStrokeWidth=t.style.outlineWidth*l/25.4:null!=s.fontStrokeWidth&&(s.fontStroke=t.style.fontStrokeWidth),void 0!==t.style.fontBackground&&(s.fontBackground=t.style.fontBackground),void 0!==t.style.fontBackgroundColor&&(s.fontBackgroundColor=t.style.fontBackgroundColor),void 0!==t.style.fontShadow&&(s.fontShadow=t.style.fontShadow),void 0!==t.style.fontShadowColor&&(s.fontShadowColor=t.style.fontShadowColor),void 0!==t.style.fontShadowOffsetX&&(s.fontShadowOffsetX=t.style.fontShadowOffsetX*l/25.4),void 0!==t.style.fontShadowOffsetY&&(s.fontShadowOffsetY=t.style.fontShadowOffsetY*l/25.4)):t.textStyle&&null!=t.textStyle&&(void 0!==t.textStyle.sizeFixed&&(s.sizeFixed=t.textStyle.sizeFixed),void 0!==t.textStyle.fontName&&(s.fontFamily=t.textStyle.fontName),void 0!==t.textStyle.fontHeight&&(s.sizeFixed?s.fontSize=Math.ceil(t.textStyle.fontHeight*l/25.4):s.fontSize=t.textStyle.fontHeight),void 0!==t.textStyle.foreColor&&(s.fontColor=i(t.textStyle.foreColor),s.fontOpacity=(t.textStyle.foreColor.alpha/255).toFixed(2)),void 0!==t.textStyle.align&&(s.labelAlign=o(t.textStyle.align)),void 0!==t.textStyle.rotation&&(s.labelRotation=-t.textStyle.rotation),null!=t.textStyle.bold&&(t.textStyle.bold?s.fontWeight="bold":s.fontWeight="normal"),s.labelXOffset=0,s.labelYOffset=0),void 0!=t.style.fontStroke?s.fontStroke=t.style.fontStroke:t.textStyle2D&&null!=t.textStyle2D.outline&&(s.fontStroke=t.textStyle2D.outline),null!=t.style.fontStrokeColor?s.fontStrokeColor=t.style.fontStrokeColor:t.textStyle2D&&null!=t.textStyle2D.fontStrokeColor?s.fontStrokeColor=t.textStyle2D.fontStrokeColor:t.textStyle2D&&null!=t.textStyle2D.backColor&&(s.fontStrokeColor=i(t.textStyle2D.backColor)),t.textStyle2D&&null!=t.textStyle2D.outlineWidth?s.fontStrokeWidth=t.style.outlineWidth*l/25.4:null!=s.fontStrokeWidth&&(s.fontStroke=t.style.fontStrokeWidth),void 0!==t.style.fontBackground?s.fontBackground=t.style.fontBackground:t.textStyle2D&&null!=t.textStyle2D.backOpaque&&(s.fontBackground=t.textStyle2D.backOpaque),null!=t.style.fontBackgroundColor?s.fontBackgroundColor=t.style.fontBackgroundColor:t.textStyle2D&&null!=t.textStyle2D.fontBackgroundColor?s.fontBackgroundColor=t.textStyle2D.fontBackgroundColor:t.textStyle2D&&null!=t.textStyle2D.backColor&&(s.fontBackgroundColor=i(t.textStyle2D.backColor)),null!=t.style.fontShadow?s.fontShadow=t.style.fontShadow:t.textStyle2D&&null!=t.textStyle2D.shadow&&(s.fontShadow=t.textStyle2D.shadow),void 0!==t.style.fontShadowColor?s.fontShadowColor=t.style.fontShadowColor:t.textStyle2D&&null!=t.textStyle2D.shadowColor&&(s.fontShadowColor=i(t.textStyle2D.shadowColor)),void 0!==t.style.fontShadowOffsetX?s.fontShadowOffsetX=t.style.fontShadowOffsetX*l/25.4:t.textStyle2D&&null!=t.textStyle2D.shadowOffsetX&&(s.fontShadowOffsetX=t.textStyle2D.shadowOffsetX*l/25.4),void 0!==t.style.fontShadowOffsetY?s.fontShadowOffsetY=t.style.fontShadowOffsetY*l/25.4:t.textStyle2D&&null!=t.textStyle2D.shadowOffsetY&&(s.fontShadowOffsetY=t.textStyle2D.shadowOffsetY*l/25.4),void 0!==t.style.fontSpace&&(s.fontSpace=t.style.fontSpace),void 0!==t.style.fontPercent&&(s.fontPercent=t.style.fontPercent),null!=t.style.fontWeight&&(s.fontWeight=t.style.fontWeight),void 0!==t.style.fontStyle&&(s.fontStyle=t.style.fontStyle),void 0!==t.surroundLineColor&&null!=t.surroundLineColor&&(s.surroundLineColor=i(t.surroundLineColor),s.surroundLineColorOpacity=(t.surroundLineColor.alpha/255).toFixed(2)),void 0!==t.surroundLineWidth2D&&null!=t.surroundLineWidth2D?s.surroundLineWidth=Math.round(t.surroundLineWidth2D*l/25.4):void 0!==t.surroundLineWidth&&null!=t.surroundLineWidth&&(s.surroundLineWidth=Math.round(t.surroundLineWidth*l/25.4)),null!=t.style.graphicWidth&&(s.graphicWidth=t.style.graphicWidth),null!=t.style.graphicHeight&&(s.graphicHeight=t.style.graphicHeight),null!=t.style.graphicOpacity&&(s.graphicOpacity=t.style.graphicOpacity),null!=t.style.graphicXOffset&&(s.graphicXOffset=t.style.graphicXOffset),null!=t.style.graphicYOffset&&(s.graphicYOffset=t.style.graphicYOffset),!1===t.visible?s.display="none":s.display="display",s):s},SuperMapAlgoPlot.AnalysisSymbol.setStyle=function(t,e,i){let o=SuperMapAlgoPlot.PlottingUtil.DPI;if(null!=e)return e.style||(e.style={}),e.textStyle2D||(e.textStyle2D={}),i?(e.style.fillSymbolID=t.fillSymbolID,e.style.fillSymbolID||(e.style.fill=t.fill)):(!1===t.fill?t.fillSymbolID=1:!0===t.fill&&(t.fillSymbolID=0),e.style.fillSymbolID=t.fillSymbolID),null!=t.fillGradientMode&&(e.style.fillGradientMode=t.fillGradientMode),null!=t.fillGradientMode&&("LINEAR"===t.fillGradientMode?e.style.fillGradientMode=1:"RADIAL"===t.fillGradientMode?e.style.fillGradientMode=2:e.style.fillGradientMode=0),null!=t.strokeGradientMode&&("LINEAR"===t.strokeGradientMode?e.style.strokeGradientMode=1:"RADIAL"===t.strokeGradientMode?e.style.strokeGradientMode=2:e.style.strokeGradientMode=0),null!=t.strokeBackColor&&(e.style.strokeBackColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.strokeBackColor)),null!=t.strokeBackOpacity&&null!=t.strokeBackColor&&(e.style.strokeBackColor.alpha=255*t.strokeBackOpacity),null!=t.fillAngle&&void 0!==t.fillAngle&&(e.style.fillAngle=t.fillAngle,e.style.fillGradientAngle=t.fillAngle),null!=t.fillCenterOffsetX&&void 0!==t.fillCenterOffsetX&&(e.style.fillCenterOffsetX=100*t.fillCenterOffsetX,e.style.fillGradientOffsetRatioX=100*t.fillCenterOffsetX),null!=t.fillCenterOffsetY&&void 0!==t.fillCenterOffsetY&&(e.style.fillCenterOffsetY=100*t.fillCenterOffsetY,e.style.fillGradientOffsetRatioY=100*t.fillCenterOffsetY),null!=t.fillColor&&(e.style.fillForeColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.fillColor)),void 0!==t.fillOpacity&&null!=t.fillOpacity&&(e.style.fillOpaqueRate=100*t.fillOpacity,e.style.fillForeColor.alpha=255),null!=t.fillBackColor&&(e.style.fillBackColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.fillBackColor)),null!=t.fillBackOpacity&&(0===t.fillBackOpacity?(e.style.fillBackOpaque=0,e.style.fillBackColor.alpha=255):e.style.fillBackColor&&(e.style.fillBackOpaque=1,e.style.fillBackColor.alpha=255*t.fillBackOpacity)),!0===i&&t.color?e.style.lineColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.color):t.strokeColor&&(e.style.lineColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.strokeColor)),!0===i&&null!=t.opacity&&void 0!==t.opacity?(e.style.lineColor.alpha=255*t.opacity,e.style.lineColor.alpha<1&&(e.style.lineColor.alpha=1)):null!=t.strokeOpacity&&void 0!==t.strokeOpacity&&(e.style.lineColor.alpha=255*t.strokeOpacity,e.style.lineColor.alpha<1&&(e.style.lineColor.alpha=1)),!0===i&&t.weight?e.style.lineWidth=25.4*t.weight/o:t.strokeWidth&&(e.style.lineWidth=25.4*t.strokeWidth/o),i?(e.style.lineSymbolID=t.lineSymbolID,e.style.lineSymbolID||(e.style.dashArray=t.dashArray)):"dot"===t.strokeDashstyle?e.style.lineSymbolID=2:"dash"===t.strokeDashstyle||"longdash"===t.strokeDashstyle?e.style.lineSymbolID=1:"dashdot"===t.strokeDashstyle||"longdashdot"===t.strokeDashstyle?e.style.lineSymbolID=3:e.style.lineSymbolID=0,null!=t.fontFamily&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.fontName=t.fontFamily:e.textStyle&&null!=e.textStyle&&(e.textStyle.fontName=t.fontFamily)),null!=t.sizeFixed&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.sizeFixed=t.sizeFixed:e.textStyle&&null!=e.textStyle&&(e.textStyle.sizeFixed=t.sizeFixed)),null!=t.fontSize&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.fontHeight=25.4*t.fontSize/o:e.textStyle&&null!=e.textStyle&&(e.textStyle.fontHeight=25.4*t.fontSize/o)),null!=t.fontWeight&&(e.textStyle2D&&null!=e.textStyle2D?"bold"===t.fontWeight?e.textStyle2D.bold=!0:e.textStyle2D.bold=!1:e.textStyle&&null!=e.textStyle&&("bold"===t.fontWeight?e.textStyle.bold=!0:e.textStyle.bold=!1)),null!=t.fontColor&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.foreColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.fontColor):e.textStyle&&null!=e.textStyle&&(e.textStyle.foreColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.fontColor))),null!=t.fontOpacity&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.foreColor.alpha=255*t.fontOpacity:e.textStyle&&null!=e.textStyle&&(e.textStyle.foreColor.alpha=255*t.fontOpacity)),null!=t.labelRotation&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.rotation=-t.labelRotation:e.textStyle&&null!=e.textStyle&&(e.textStyle.rotation=-t.labelRotation)),void 0!==t.fontStroke&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.outline=t.fontStroke:e.textStyle&&null!=e.textStyle&&(e.textStyle.outline=t.fontStroke)),null!=t.fontStrokeColor&&(e.textStyle2D.fontStrokeColor=t.fontStrokeColor),void 0!==t.fontStrokeWidth&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.outlineWidth=25.4*t.fontStrokeWidth/o:e.textStyle&&null!=e.textStyle&&(e.textStyle.outlineWidth=25.4*t.fontStrokeWidth/o)),void 0!==t.fontBackground&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.backOpaque=t.fontBackground:e.textStyle&&null!=e.textStyle&&(e.textStyle.backOpaque=t.fontBackground)),void 0!==t.fontBackgroundColor&&(e.textStyle2D.fontBackgroundColor=t.fontBackgroundColor),null!=t.fontBackground&&!0===t.fontBackground?e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.backColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.fontBackgroundColor):e.textStyle&&null!=e.textStyle&&(e.textStyle.backColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.fontBackgroundColor)):null!=t.fontStroke&&!0===t.fontStroke&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.backColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.fontStrokeColor):e.textStyle&&null!=e.textStyle&&(e.textStyle.backColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.fontStrokeColor))),void 0!==t.fontShadow&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.shadow=t.fontShadow:e.textStyle&&null!=e.textStyle&&(e.textStyle.shadow=t.fontShadow)),void 0!==t.fontShadowColor&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.shadowColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.fontShadowColor):e.textStyle&&null!=e.textStyle&&(e.textStyle.shadowColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.fontShadowColor))),void 0!==t.fontShadowOffsetX&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.shadowOffsetX=25.4*t.fontShadowOffsetX/o:e.textStyle&&null!=e.textStyle&&(e.textStyle.shadowOffsetX=25.4*t.fontShadowOffsetX/o)),void 0!==t.fontShadowOffsetY&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.shadowOffsetY=25.4*t.fontShadowOffsetY/o:e.textStyle&&null!=e.textStyle&&(e.textStyle.shadowOffsetY=25.4*t.fontShadowOffsetY/o)),void 0!==t.fontSpace&&(e.style.fontSpace=t.fontSpace),void 0!==t.fontPercent&&(e.style.fontPercent=t.fontPercent),void 0!==t.fontWeight&&(e.style.fontWeight=t.fontWeight),void 0!==t.fontStyle&&(e.style.fontStyle=t.fontStyle),t.surroundLineColor&&(e.surroundLineColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.surroundLineColor)),null!=t.surroundLineColorOpacity&&void 0!==t.surroundLineColorOpacity&&(e.surroundLineColor.alpha=255*t.surroundLineColorOpacity),null!=t.surroundLineWidth&&(e.surroundLineWidth2D=25.4*t.surroundLineWidth/o),void 0!==t.labelAlign&&("lt"===t.labelAlign?e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.align=0:e.textStyle&&null!=e.textStyle&&(e.textStyle.align=0):"ct"===t.labelAlign?e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.align=1:e.textStyle&&null!=e.textStyle&&(e.textStyle.align=1):"rt"===t.labelAlign?e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.align=2:e.textStyle&&null!=e.textStyle&&(e.textStyle.align=2):"lb"===t.labelAlign?e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.align=6:e.textStyle&&null!=e.textStyle&&(e.textStyle.align=6):"cb"===t.labelAlign?e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.align=7:e.textStyle&&null!=e.textStyle&&(e.textStyle.align=7):"rb"===t.labelAlign?e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.align=8:e.textStyle&&null!=e.textStyle&&(e.textStyle.align=8):"lm"===t.labelAlign?e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.align=9:e.textStyle&&null!=e.textStyle&&(e.textStyle.align=9):"cm"===t.labelAlign?e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.align=10:e.textStyle&&null!=e.textStyle&&(e.textStyle.align=10):"rm"===t.labelAlign&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.align=11:e.textStyle&&null!=e.textStyle&&(e.textStyle.align=11))),null!=t.graphicWidth&&(e.style.graphicWidth=t.graphicWidth),null!=t.graphicHeight&&(e.style.graphicHeight=t.graphicHeight),null!=t.graphicOpacity&&(e.style.graphicOpacity=t.graphicOpacity),null!=t.graphicXOffset&&(e.style.graphicXOffset=t.graphicXOffset),null!=t.graphicYOffset&&(e.style.graphicYOffset=t.graphicYOffset),t.display&&"none"===t.display?e.visible=!1:e.visible=!0,t},SuperMapAlgoPlot.AnalysisSymbol.mergeDefaultStyleToFeature=function(t,e,i){let o,l;o=t.style,l=!0!==i?t.geometry:t,e&&!0===e.defaultFlag&&!1===l.isEdit&&(l.surroundLineType=e.surroundLineType,o.surroundLineColor=e.surroundLineColor,o.surroundLineWidth=e.surroundLineWidth,o.surroundLineColorOpacity=e.surroundLineColorOpacity,o.fillBackColor=e.fillBackColor,o.fillBackOpacity=e.fillBackOpacity,o.fillGradientMode=e.fillGradientMode,o.fillCenterOffsetX=e.fillCenterOffsetX,o.fillCenterOffsetY=e.fillCenterOffsetY,o.fillAngle=e.fillAngle,!0===i?(o.color=e.lineColor,o.weight=e.lineWidth,o.opacity=e.lineOpacity,o.lineSymbolID=e.lineType,o.lineCap=e.lineCap,o.lineJoin=e.lineJoin):(o.strokeColor=e.lineColor,o.strokeWidth=e.lineWidth,o.strokeOpacity=e.lineOpacity,o.strokeDashstyle=e.lineType,o.strokeLinecap=e.lineCap,o.strokeLinejoin=e.lineJoin),o.fillSymbolID=e.fillSymbolID,o.fillColor=e.fillColor,o.fillOpacity=e.fillOpacity,o.fontColor=e.fontColor,o.fontOpacity=e.fontOpacity,o.fontSize=e.fontSize,o.fontFamily=e.fontFamily,o.fontWeight=e.fontWeight,o.fontStyle=e.fontStyle,o.fontStroke=e.fontStroke,o.fontStrokeColor=e.fontStrokeColor,o.fontStrokeWidth=e.fontStrokeWidth,o.fontBackground=e.fontBackground,o.fontBackgroundColor=e.fontBackgroundColor,o.fontShadow=e.fontShadow,o.fontShadowColor=e.fontShadowColor,o.fontShadowOffsetX=e.fontShadowOffsetX,o.fontShadowOffsetY=e.fontShadowOffsetY,o.fontSpace=e.fontSpace,o.fontPercent=e.fontPercent,o.strokeGradientMode=e.strokeGradientMode,o.strokeBackColor=e.strokeBackColor,o.strokeBackOpacity=e.strokeBackOpacity)},SuperMapAlgoPlot.AnalysisSymbol.mergeSymbolDataAndServerData=function(t,e){Object.prototype.hasOwnProperty.call(t,"algoMinEditPts")||(t.algoMinEditPts=e.algoMinEditPts),Object.prototype.hasOwnProperty.call(t,"algoMaxEditPts")||(t.algoMaxEditPts=e.algoMaxEditPts),Object.prototype.hasOwnProperty.call(t,"innerCells")||(t.innerCells=SuperMap.Util.cloneObject(e.innerCells)),Object.prototype.hasOwnProperty.call(t,"symbolRanks")||(t.symbolRanks=SuperMap.Util.cloneObject(e.symbolRanks)),Object.prototype.hasOwnProperty.call(t,"symbolSizeInLib")||(t.symbolSizeInLib=SuperMap.Util.cloneObject(e.symbolSize)),Object.prototype.hasOwnProperty.call(t,"middleMarkExist")||(t.middleMarkExist=SuperMap.Util.cloneObject(e.middleMarkExist)),Object.prototype.hasOwnProperty.call(t,"middleMarkBounds")||(t.middleMarkBounds=SuperMap.Util.cloneObject(e.middleMarkBounds)),Object.prototype.hasOwnProperty.call(t,"anchorPoint")||(t.anchorPoint=SuperMap.Util.cloneObject(e.anchorPoint))},SuperMapAlgoPlot.AnalysisSymbol.setSymbolData=function(t,e,i){null==e&&(e={}),Object.prototype.hasOwnProperty.call(e,"type")||(0!=t.libID||t.code!=SuperMap.Plot.SymbolType.GROUPOBJECT&&t.code!=SuperMap.Plot.SymbolType.FLAGGROUP?e.type="GRAPHICOBJECT":e.type="GraphicCollection"),Object.prototype.hasOwnProperty.call(e,"version")||(e.version=2),e.isEdit=!0,e.uuid=t.uuid,e.associatedUuid=t.associatedUuid,Object.prototype.hasOwnProperty.call(e,"rotate2D")?e.rotate2D.x=t.dRotate:e.rotate2D={x:t.dRotate,y:0,z:0},Object.prototype.hasOwnProperty.call(e,"scale2D")?e.scale2D.x=t.dScale:e.scale2D={x:t.dScale,y:0,z:0},e.libID=t.libID,e.code=t.code,e.algoMaxEditPts=t.maxEditPts,e.algoMinEditPts=t.minEditPts,e.symbolType=t.symbolType,e.symbolName=t.symbolName,e.annotationPosition=null!=t.annotationPosition?t.annotationPosition:t.textPosition,e.textContent=t.textContent,e.textDisplay=t.textDisplay,e.scaleByMap=t.scaleByMap,e.resolution=t.resolution,e.isLocked=t.isLocked,e.note=t.note,e.custom=t.custom,e.subSymbols=[];for(let i=0;i<t.subSymbols.length;i++){let o=t.subSymbols[i];e.subSymbols.push({libID:o.libID,code:o.code,symbolData:o.symbolData,textContent:o.textContent,totalNum:o.totalNum})}e.extendProperty=[];let o=t.getExtendProperty().getPropertyCount();for(let i=0;i<o;i++){let o=t.getExtendProperty().getPropertyByIndex(i);e.extendProperty.push({key:o.key,value:o.value})}e.avoidRegions=[];for(let i=0;i<t.avoidRegions.length;i++){for(var l=[],s=0;s<t.avoidRegions[0].latLngs.length;s++)l.push({x:t.avoidRegions[0].getLatLngs()[s].lng,y:t.avoidRegions[0].getLatLngs()[s].lat,z:0});e.avoidRegions.push(l)}if(!0===i?SuperMapAlgoPlot.AnalysisSymbol.setStyle(t.style,e,i):null!=t.feature&&SuperMapAlgoPlot.AnalysisSymbol.setStyle(t.feature.style,e),t.symbolType===SuperMapAlgoPlot.SymbolType.AIRROUTE||t.symbolType===SuperMapAlgoPlot.SymbolType.NAVYROUTE||t.symbolType===SuperMapAlgoPlot.SymbolType.MISSILEROUTE){for(var n in e.routeNodes=[],t.routeNodes)e.routeNodes.push(t.routeNodes[n].setSymbolData());e.arrRoutePts=t.arrRoutePts,i||SuperMapAlgoPlot.AnalysisSymbol.setStyle(t.lineStyle,e)}else if(t.symbolType===SuperMapAlgoPlot.SymbolType.GROUPOBJECT||t.symbolType===SuperMapAlgoPlot.SymbolType.FLAGGROUP||t.symbolType===SuperMapAlgoPlot.SymbolType.NAVYDEPLOYMENT||t.symbolType===SuperMapAlgoPlot.SymbolType.AIRDEPLOYMENT){if(e.subAssociatedUuids=t.subAssociatedUuids,e.geometries=[],i)for(s=0;s<t.subObjects.length;s++)e.geometries.push(t.subObjects[s].getSymbolData());else for(let i=0;i<t.components.length;i++)e.geometries.push(t.components[i].geometry.getSymbolData());0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.FLAGGROUP?e.ratios=t.ratio:0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.AIRDEPLOYMENT?(e.colNum=t.colNum,e.speceDis=t.speceDis,e.isShowTooltip=t.isShowTooltip):0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.NAVYDEPLOYMENT&&(e.colNum=t.colNum,e.speceDis=t.speceDis)}else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.SYMBOLTEXT){let i=[];for(let e in t.symbolTexts)i.push(t.symbolTexts[e].setSymbolData());e.symbolTexts=i,e.addFrame=t.addFrame}else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.SYMBOLTEXT1)e.space=t.space,e.offsetX=t.offsetX,e.offsetY=t.offsetY;else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.TRAJECTORY)e.trajectoryType=t.trajectoryType,e.trajectoryLength=t.trajectoryLength,e.showTrackingLine=t.showTrackingLine,e.showTrackingPoint=t.showTrackingPoint,e.trackingPointRadius=t.trackingPointRadius,e.saveTrackingPoint=t.saveTrackingPoint;else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.SATELLITE){if(Object.prototype.hasOwnProperty.call(e,"scaleValues"))for(let i=0;i<t.scaleValues.length;i++)e.scaleValues.length>i?e.scaleValues[i]=t.scaleValues[i]:e.scaleValues.push(t.scaleValues[i]);else e.scaleValues=[],e.scaleValues=t.scaleValues;e.visible=t.visible,e.orbitPoints=t.orbitPoints}else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.SATELLITETIMEWINDOWS)e.timeWindows=t.timeWindows;else{let o;o=!0===i?L.Util.latLngsToSuperMapPoints(t.getLatLngs()):t.controlPoints,e.localePoints=[];let l=o.length;t.symbolType===SuperMapAlgoPlot.SymbolType.ELLIPSESYMBOL&&(l=3);for(let t=0;t<l;t++)e.localePoints.push({x:o[t].x,y:o[t].y,z:0});if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.LINERELATION)e.endAssociation=t.endAssociatedUuid,e.lineRelationType=t.lineRelationType,e.startAssociation=t.startAssociatedUuid,e.subSectionCount=t.subSectionCount;else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.PICTURE){if(e.path=t.path,e.symbolTexts=[],null!=t.symbolTexts&&0!=t.symbolTexts.length)for(let i=0;i<t.symbolTexts.length;i++)e.symbolTexts.push(t.symbolTexts[i].setSymbolData());if(e.bloodVolumes=[],null!=t.bloodVolumes&&0!=t.bloodVolumes.length)for(let i=0;i<t.bloodVolumes.length;i++)e.bloodVolumes.push(t.bloodVolumes[i].setSymbolData());null!=t.trajectory&&(e.trajectory=t.trajectory.setSymbolData()),null!=e.antoRotation&&(t.antoRotation=e.antoRotation)}else if(t.symbolType===SuperMapAlgoPlot.SymbolType.DOTSYMBOL){e.surroundLineType=t.surroundLineType,e.symbolRank=t.symbolRank,e.negativeImage=t.negativeImage,e.horizontalMirror=t.horizontalMirror,e.verticalMirror=t.verticalMirror,e.space=25.4*t.space/SuperMapAlgoPlot.PlottingUtil.DPI,e.flagTextSize=t.flagTextSize,e.maxScale=t.maxScale,e.minScale=t.minScale,e.actualScale=t.actualScale,void 0!==t.fontSize&&(e.fontSize=t.fontSize),void 0!==t.strokeWidth&&(e.strokeWidth=t.strokeWidth);let i=25.4*t.symbolSize.w*10/SuperMapAlgoPlot.PlottingUtil.DPI,o=25.4*t.symbolSize.h*10/SuperMapAlgoPlot.PlottingUtil.DPI;e.symbolSize={x:i,y:o};let l=25.4*t.symbolSizeInLib.w*10/SuperMapAlgoPlot.PlottingUtil.DPI,s=25.4*t.symbolSizeInLib.h*10/SuperMapAlgoPlot.PlottingUtil.DPI;if(e.symbolSizeInLib={x:l,y:s},e.positionOffset=t.positionOffset,e.positionOffsetType=t.positionOffsetType,e.positionOffsetX=25.4*t.positionOffsetX*10/SuperMapAlgoPlot.PlottingUtil.DPI,e.positionOffsetY=25.4*t.positionOffsetY*10/SuperMapAlgoPlot.PlottingUtil.DPI*-1,!1===t.widthHeightLimit||!0===t.widthHeightLimit?e.limitWidthHeight=t.widthHeightLimit:e.limitWidthHeight=t.limitWidthHeight,e.symbolTexts=[],null!=t.symbolTexts&&0!=t.symbolTexts.length)for(let i=0;i<t.symbolTexts.length;i++)e.symbolTexts.push(t.symbolTexts[i].setSymbolData());if(e.bloodVolumes=[],null!=t.bloodVolumes&&0!=t.bloodVolumes.length)for(let i=0;i<t.bloodVolumes.length;i++)e.bloodVolumes.push(t.bloodVolumes[i].setSymbolData());if(e.pictureFrames=[],null!=t.pictureFrames&&0!=t.pictureFrames.length)for(let i=0;i<t.pictureFrames.length;i++)e.pictureFrames.push(t.pictureFrames[i].setSymbolData());null!=t.trajectory&&(e.trajectory=t.trajectory.setSymbolData()),null!=e.antoRotation&&(t.antoRotation=e.antoRotation)}else{if(e.surroundLineType=t.surroundLineType,Object.prototype.hasOwnProperty.call(e,"scaleValues"))for(let i=0;i<t.scaleValues.length;i++)e.scaleValues.length>i?e.scaleValues[i]=t.scaleValues[i]:e.scaleValues.push(t.scaleValues[i]);else e.scaleValues=[],e.scaleValues=t.scaleValues;e.subSymbolScaleValue=t.subSymbolScaleValue,e.baseScale=t.baseScale,e.strokeWidth=t.strokeWidth,e.polylineConnectLocationPoint=t.polylineConnectLocationPoint,22===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.ALGOSYMBOL?(e.arrowHeadType=t.arrowHeadType,e.arrowBodyType=t.arrowBodyType,e.arrowTailType=t.arrowTailType):0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.ARROWLINE?e.arrowAngle=t.arrowAngle:0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.COMBINATIONALCIRCLE?e.defaultRadius=t.defaultRadius:0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.CONCENTRICCIRCLE||(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.LINEMARKING?(e.islocationCircle=t.islocationCircle,e.textBoxType=t.textBoxType):0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.SYMBOLTEXTBOX?(e.roundBox=t.roundBox,e.textBoxType=t.textBoxType):0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.PATHTEXT?(e.isAvoid=t.isAvoid,e.isCurve=t.isCurve,e.relLineText=t.relLineText,e.showPathLine=t.showPathLine,e.textToLineDistance=t.textToLineDistance,e.showPathLineArrow=t.showPathLineArrow):0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.ARCREGION&&(i?(e.centerPoint={x:t.centerPoint.lng,y:t.centerPoint.lat},e.circlePts=t.circlePts,e.spatialAnalystUrl=t.spatialAnalystUrl):e.centerPoint=t.centerPoint,e.endAngle=t.endAngle,e.radius=t.radius,e.radiusPosAngle=t.radiusPosAngle,e.startAngle=t.startAngle,e.textPosition=t.textPosition,e.radiusLineType=t.radiusLineType,e.radiusText=t.radiusText))}}t.symbolData=e},SuperMapAlgoPlot.AnalysisSymbol.parseSymbolData=function(t,e,i){if(null!=e){if(null!=e.isEdit&&(t.isEdit=e.isEdit),Object.prototype.hasOwnProperty.call(e,"version")&&(t.version=e.version),Object.prototype.hasOwnProperty.call(e,"libID")&&(t.libID=parseInt(e.libID)),Object.prototype.hasOwnProperty.call(e,"code")&&(t.code=parseInt(e.code)),Object.prototype.hasOwnProperty.call(e,"algoMaxEditPts")&&(t.maxEditPts=parseInt(e.algoMaxEditPts)),Object.prototype.hasOwnProperty.call(e,"algoMinEditPts")&&(t.minEditPts=parseInt(e.algoMinEditPts)),Object.prototype.hasOwnProperty.call(e,"symbolType")&&(t.symbolType=parseInt(e.symbolType)),Object.prototype.hasOwnProperty.call(e,"symbolName")&&(t.symbolName=e.symbolName),Object.prototype.hasOwnProperty.call(e,"textContent")&&(t.textContent=e.textContent),Object.prototype.hasOwnProperty.call(e,"bubbleHeight")&&(t.bubbleHeight=e.bubbleHeight),Object.prototype.hasOwnProperty.call(e,"bubbleWidth")&&(t.bubbleWidth=e.bubbleWidth),Object.prototype.hasOwnProperty.call(e,"description")&&(t.description=e.description),Object.prototype.hasOwnProperty.call(e,"mediaList")&&(t.mediaList=e.mediaList),null!=e.dScale?t.dScale=e.dScale:void 0!==e.scale2D&&(t.dScale=e.scale2D.x),null!=e.dRotate?t.dRotate=e.dRotate:void 0!==e.rotate2D&&(t.dRotate=e.rotate2D.x),null!=e.resolution&&(t.resolution=e.resolution),null!=e.uuid&&(t.uuid=e.uuid),null!=e.associatedUuid&&(t.associatedUuid=e.associatedUuid),null!=e.textDisplay&&(t.textDisplay=e.textDisplay),null!=e.annotationPosition&&(i?t.annotationPosition=e.annotationPosition:t.textPosition=e.annotationPosition),null!=e.scaleByMap&&(t.scaleByMap=e.scaleByMap),void 0!==e.isLocked&&(t.isLocked=e.isLocked),void 0!==e.note&&(t.note=e.note),void 0!==e.custom&&(t.custom=e.custom),e.extendProperty)for(let i=0;i<e.extendProperty.length;i++){let o=e.extendProperty[i];t.extendProperty.addProperty(o.key,o.value)}if(Object.prototype.hasOwnProperty.call(e,"subSymbols")&&null!=e.subSymbols){t.subSymbols=[];for(let i=0;i<e.subSymbols.length;i++){let o=e.subSymbols[i].libID;void 0===o&&(o=t.libID);let l=e.subSymbols[i].code;if(void 0===l)continue;let s={};void 0!==e.subSymbols[i].textContent&&(s.textContent=e.subSymbols[i].textContent),void 0!==e.subSymbols[i].totalNum&&(s.totalNum=e.subSymbols[i].totalNum),void 0!==e.subSymbols[i].symbolData&&(s.symbolData=e.subSymbols[i].symbolData),t.subSymbols.push(new SuperMapAlgoPlot.SubSymbol(o,l,s))}}if(e.avoidRegions&&0!==e.avoidRegions.length)for(let s=0;s<e.avoidRegions.length;s++){var o=null;if(Object.prototype.hasOwnProperty.call(e.avoidRegions[s][0],"controlPoints")){var l={libID:0,code:SuperMapAlgoPlot.SymbolType.AVOIDREGION,map:t.map,symbolData:e.avoidRegions[s][0]};if(i)(o=L.supermap.plotting.avoidRegion(0,SuperMapAlgoPlot.SymbolType.AVOIDREGION,[],l)).style=SuperMapAlgoPlot.AnalysisSymbol.getStyle(t.symbolData.avoidRegions[s][1],!0);else{o=new SuperMap.Geometry.AvoidRegion(l);let t=new SuperMap.Feature.Vector(o);t.style=SuperMapAlgoPlot.AnalysisSymbol.getStyle(e.avoidRegions[s][1],i),o.feature=t,o.calculateParts()}}else{let l=[];for(let t=0;t<e.avoidRegions[s].length;t++)l.push(new SuperMapAlgoPlot.Point(e.avoidRegions[s][t].x,e.avoidRegions[s][t].y));if(i){let e={libID:0,code:SuperMapAlgoPlot.SymbolType.AVOIDREGION,map:t.map,latLngs:L.Util.superMapPointsToLatLngs(l)};o=L.supermap.plotting.avoidRegion(0,SuperMapAlgoPlot.SymbolType.AVOIDREGION,[],e)}else{let e={libID:0,code:SuperMapAlgoPlot.SymbolType.AVOIDREGION,map:t.map,controlPoints:l};o=new SuperMap.Geometry.AvoidRegion(e);let i=new SuperMap.Feature.Vector(o);o.feature=i,o.calculateParts()}}t.avoidRegions.push(o)}if(!0===i){var s=SuperMapAlgoPlot.AnalysisSymbol.getStyle(e,!0);SuperMap.Util.applyDefaults(s,t.style),t.style=s}if(t.symbolType===SuperMapAlgoPlot.SymbolType.AIRROUTE||t.symbolType===SuperMapAlgoPlot.SymbolType.NAVYROUTE||t.symbolType===SuperMapAlgoPlot.SymbolType.MISSILEROUTE){for(var n in t.routeNodes=[],e.routeNodes){var a=new SuperMapAlgoPlot.RouteNode;t.routeNodes.push(a.parseSymbolData(e.routeNodes[n]))}t.arrRoutePts=[];for(let o=0;o<e.arrRoutePts.length;o++){let l=[];for(let t=0;t<e.arrRoutePts[o].length;t++)Object.prototype.hasOwnProperty.call(e.arrRoutePts[o][t],"lat")&&Object.prototype.hasOwnProperty.call(e.arrRoutePts[o][t],"lng")?l.push(new SuperMapAlgoPlot.Point(e.arrRoutePts[o][t].lng,e.arrRoutePts[o][t].lat)):void 0===e.arrRoutePts[o][t].x&&void 0===e.arrRoutePts[o][t].y||l.push(new SuperMapAlgoPlot.Point(e.arrRoutePts[o][t].x,e.arrRoutePts[o][t].y));i&&(l=L.Util.superMapPointsToLatLngs(l)),t.arrRoutePts.push(l)}i||(t.lineStyle=SuperMapAlgoPlot.AnalysisSymbol.getStyle(e,!1))}else if(t.symbolType===SuperMapAlgoPlot.SymbolType.GROUPOBJECT||t.symbolType===SuperMapAlgoPlot.SymbolType.FLAGGROUP||t.symbolType===SuperMapAlgoPlot.SymbolType.NAVYDEPLOYMENT||t.symbolType===SuperMapAlgoPlot.SymbolType.AIRDEPLOYMENT){if(null!=e.subAssociatedUuids&&(t.subAssociatedUuids=e.subAssociatedUuids),null!=e.geometries)if(i){var r=[];for(let t=0;t<e.geometries.length;t++){let i=e.geometries[t];i.uuid=SuperMapAlgoPlot.PlottingUtil.generateUuid();let o=L.supermap.plotting.PlottingObject.createSymbol(i.libID,i.code,null,{symbolData:i});r.push(o)}t.subObjects=r}else for(let i=0;i<e.geometries.length;i++){let o=e.geometries[i],l=SuperMap.Geometry.PlottingGeometry.createFeature(o.libID,o.code,null,{symbolData:o,map:t.map});l.geometry.ownGroupObj=t,t.components.push(l)}else if(i){r=[];for(let t=0;t<e.subFeatures.length;t++){let i=e.subFeatures[t];i.uuid=SuperMapAlgoPlot.PlottingUtil.generateUuid();let o=L.supermap.plotting.PlottingObject.createSymbol(i.libID,i.code,null,{symbolData:i});r.push(o)}t.subObjects=r}else for(let i=0;i<e.subFeatures.length;i++){let o=e.subFeatures[i],l=SuperMap.Geometry.PlottingGeometry.createFeature(o.libID,o.code,null,{symbolData:o,map:t.map});l.geometry.ownGroupObj=t,t.components.push(l)}0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.FLAGGROUP&&(null!=e.ratios?t.ratios=e.ratios:null!=e.ratio&&(t.ratios=e.ratio)),0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.AIRDEPLOYMENT&&(t.colNum=e.colNum,t.speceDis=e.speceDis,t.isShowTooltip=e.isShowTooltip),0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.NAVYDEPLOYMENT&&(t.colNum=e.colNum,t.speceDis=e.speceDis)}else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.SYMBOLTEXT){t.addFrame=e.addFrame,t.symbolTexts=[];for(let i=0,o=e.symbolTexts.length;i<o;i++){let o=new SuperMapAlgoPlot.SymbolText;o.parseSymbolData(e.symbolTexts[i]),t.symbolTexts.push(o)}}else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.SYMBOLTEXT1)void 0!==e.space&&(t.space=e.space),void 0!==e.offsetX&&(t.offsetX=e.offsetX),void 0!==e.offsetY&&(t.offsetY=e.offsetY);else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.TRAJECTORY)void 0!==e.trajectoryType&&(t.trajectoryType=e.trajectoryType),void 0!==e.trajectoryLength&&(t.trajectoryLength=e.trajectoryLength),void 0!==e.showTrackingLine&&(t.showTrackingLine=e.showTrackingLine),void 0!==e.showTrackingPoint&&(t.showTrackingPoint=e.showTrackingPoint),void 0!==e.trackingPointRadius&&(t.trackingPointRadius=e.trackingPointRadius),void 0!==e.saveTrackingPoint&&(t.saveTrackingPoint=e.saveTrackingPoint);else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.SATELLITE){if(e.scaleValues&&0!==e.scaleValues.length){t.scaleValues=[];for(let i=0;i<e.scaleValues.length;i++)t.scaleValues.push(e.scaleValues[i])}if(e.subSymbol&&(t.subSymbols=[e.subSymbol]),t.visible=e.visible,e.orbitPoints){t.orbitPoints=[];for(let i=0;i<e.orbitPoints.length;i++)t.orbitPoints.push(new SuperMapAlgoPlot.OrbitPoint(e.orbitPoints[i].x,e.orbitPoints[i].y,e.orbitPoints[i].z,e.orbitPoints[i].number,e.orbitPoints[i].time))}}else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.SATELLITETIMEWINDOWS){t.timeWindows=e.timeWindows;for(let i=0;i<t.timeWindows.length;i++)"Time"!==e.type&&"number"!==e.type||(t.timeWindows[i].type=e.type)}else{if(e.localePoints){t.controlPoints=[];for(let i=0;i<e.localePoints.length;i++)t.controlPoints.push(new SuperMapAlgoPlot.Point(e.localePoints[i].x,e.localePoints[i].y));!0===i&&(t.latLngs=L.Util.superMapPointsToLatLngs(t.controlPoints),delete t.controlPoints)}if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.LINERELATION)null!=e.startAssociation?t.startAssociatedUuid=e.startAssociation:null!=e.startAssociatedUuid&&(t.startAssociatedUuid=e.startAssociatedUuid),null!=e.endAssociation?t.endAssociatedUuid=e.endAssociation:null!=e.endAssociatedUuid&&(t.endAssociatedUuid=e.endAssociatedUuid),null!=e.lineRelationType&&(t.lineRelationType=e.lineRelationType),null!=e.subSectionCount&&(t.subSectionCount=e.subSectionCount);else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.PICTURE){if(t.path=e.path,null!=e.symbolTexts&&0!==e.symbolTexts.length){t.symbolTexts=[];for(let i=0;i<e.symbolTexts.length;i++){let o=new SuperMapAlgoPlot.SymbolText;o.parseSymbolData(e.symbolTexts[i]),t.symbolTexts.push(o)}}if(null!=e.bloodVolumes&&0!==e.bloodVolumes.length){t.bloodVolumes=[];for(let i=0;i<e.bloodVolumes.length;i++){let o=new SuperMapAlgoPlot.BloodVolume;o.parseSymbolData(e.bloodVolumes[i]),t.bloodVolumes.push(o)}}if(null!=e.trajectory){let i=new SuperMapAlgoPlot.Trajectory;i.parseSymbolData(e.trajectory),t.trajectory=i}null!=e.antoRotation&&(t.antoRotation=e.antoRotation)}else if(t.symbolType===SuperMapAlgoPlot.SymbolType.DOTSYMBOL){t.surroundLineType=e.surroundLineType,t.symbolRank=e.symbolRank,t.negativeImage=e.negativeImage,t.horizontalMirror=e.horizontalMirror,t.verticalMirror=e.verticalMirror;let i=SuperMapAlgoPlot.AnalysisSymbol.analysisDotBasicInfo(e);if(t.anchorPoint=i.anchorPoint,t.symbolSizeInLib=i.symbolSizeInLib,t.middleMarkBounds=i.middleMarkBounds,void 0!==e.actualScale&&(t.actualScale=e.actualScale),void 0!==e.limitWidthHeight&&(t.limitWidthHeight=e.limitWidthHeight),void 0!==e.fontSize&&(t.fontSize=e.fontSize),void 0!==e.strokeWidth&&(t.strokeWidth=e.strokeWidth),void 0!==e.space&&(t.space=e.space*SuperMapAlgoPlot.PlottingUtil.DPI/25.4),void 0!==e.flagTextSize&&(t.flagTextSize=e.flagTextSize),void 0!==e.maxScale&&(t.maxScale=e.maxScale),void 0!==e.minScale&&(t.minScale=e.minScale),!1!==t.isEdit){let i={x:0,y:0};-1===e.symbolSize.x&&-1===e.symbolSize.x?(i.x=e.symbolSizeInLib.x*SuperMapAlgoPlot.PlottingUtil.DPI/25.4/10,i.y=e.symbolSizeInLib.y*SuperMapAlgoPlot.PlottingUtil.DPI/25.4/10):(i.x=e.symbolSize.x*SuperMapAlgoPlot.PlottingUtil.DPI/25.4/10,i.y=e.symbolSize.y*SuperMapAlgoPlot.PlottingUtil.DPI/25.4/10),t.setSymbolSize(i.x,i.y,!1)}if(void 0!==e.positionOffset&&null!==e.positionOffset&&(t.positionOffset=e.positionOffset),void 0!==e.positionOffsetType&&null!==e.positionOffsetType&&(t.positionOffsetType=e.positionOffsetType),void 0!==e.positionOffsetX&&null!==e.positionOffsetX&&(t.positionOffsetX=e.positionOffsetX*SuperMapAlgoPlot.PlottingUtil.DPI/25.4/10),void 0!==e.positionOffsetY&&null!==e.positionOffsetY&&(t.positionOffsetY=e.positionOffsetY*SuperMapAlgoPlot.PlottingUtil.DPI/25.4/10*-1),null!=e.symbolTexts&&0!==e.symbolTexts.length){t.symbolTexts=[];for(let i=0;i<e.symbolTexts.length;i++){let o=new SuperMapAlgoPlot.SymbolText;o.parseSymbolData(e.symbolTexts[i]),t.symbolTexts.push(o)}}if(null!=e.bloodVolumes&&0!==e.bloodVolumes.length){t.bloodVolumes=[];for(let i=0;i<e.bloodVolumes.length;i++){let o=new SuperMapAlgoPlot.BloodVolume;o.parseSymbolData(e.bloodVolumes[i]),t.bloodVolumes.push(o)}}if(null!=e.pictureFrames&&0!==e.pictureFrames.length){t.pictureFrames=[];for(let i=0;i<e.pictureFrames.length;i++){let o=new SuperMapAlgoPlot.PictureFrame;o.parseSymbolData(e.pictureFrames[i]),t.pictureFrames.push(o)}}if(null!=e.trajectory){let i=new SuperMapAlgoPlot.Trajectory;i.parseSymbolData(e.trajectory),t.trajectory=i}null!=e.antoRotation&&(t.antoRotation=e.antoRotation)}else{if(t.surroundLineType=e.surroundLineType,e.scaleValues&&0!==e.scaleValues.length){t.scaleValues=[];for(let i=0;i<e.scaleValues.length;i++)t.scaleValues.push(e.scaleValues[i])}if(void 0!==e.strokeWidth&&null!==e.strokeWidth&&(t.strokeWidth=e.strokeWidth),void 0!==e.baseScale&&null!==e.baseScale&&(t.baseScale=e.baseScale),void 0!==e.polylineConnectLocationPoint&&null!==e.polylineConnectLocationPoint&&(t.polylineConnectLocationPoint=e.polylineConnectLocationPoint),22===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.ALGOSYMBOL)void 0!==e.arrowHeadType&&null!==e.arrowHeadType&&(t.arrowHeadType=e.arrowHeadType),void 0!==e.arrowBodyType&&null!==e.arrowBodyType&&(t.arrowBodyType=e.arrowBodyType),void 0!==e.arrowTailType&&null!==e.arrowTailType&&(t.arrowTailType=e.arrowTailType);else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.ARROWLINE)t.arrowAngle=e.arrowAngle,void 0!==e.arrowTypeStart&&(t.scaleValues[1]=e.arrowTypeStart),void 0!==e.arrowTypeEnd&&(t.scaleValues[2]=e.arrowTypeEnd);else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.COMBINATIONALCIRCLE){if(e.radius&&0!==e.radius.length&&0===t.scaleValues.length)for(let i=0;i<e.radius.length;i++)t.scaleValues.push(e.radius[i])}else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.CONCENTRICCIRCLE)Object.prototype.hasOwnProperty.call(t.symbolData,"startAngle")&&(t.scaleValues[0]=t.symbolData.startAngle),Object.prototype.hasOwnProperty.call(t.symbolData,"endAngle")&&(t.scaleValues[1]=t.symbolData.endAngle);else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.LINEMARKING)void 0!==e.islocationCircle&&null!==e.islocationCircle&&(t.islocationCircle=e.islocationCircle),void 0!==e.textBoxType&&null!==e.textBoxType&&(t.textBoxType=e.textBoxType),e.tipPoint&&(this.scaleValues[1]=e.tipPoint.x,this.scaleValues[2]=e.tipPoint.y);else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.SYMBOLTEXTBOX)void 0!==e.roundBox&&null!==e.roundBox&&(t.roundBox=e.roundBox),void 0!==e.textBoxType&&null!==e.textBoxType&&(t.textBoxType=e.textBoxType),e.tipPoint&&(this.scaleValues[1]=e.tipPoint.x,this.scaleValues[2]=e.tipPoint.y);else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOLM)e.tipPoint1&&(this.scaleValues[0]=e.tipPoint1.x,this.scaleValues[1]=e.tipPoint1.y),e.tipPoint2&&(this.scaleValues[2]=e.tipPoint2.x,this.scaleValues[3]=e.tipPoint2.y);else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.PATHTEXT)t.isAvoid=e.isAvoid,t.isCurve=e.isCurve,t.relLineText=e.relLineText,t.showPathLine=e.showPathLine,t.textToLineDistance=e.textToLineDistance,t.showPathLineArrow=e.showPathLineArrow;else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.ARCREGION){if(i){if(t.centerPoint=L.latLng(e.centerPoint.y,e.centerPoint.x),t.symbolData.circlePts){for(var p=[],u=0;u<e.circlePts.length;u++)p.push(new SuperMapAlgoPlot.Point(e.circlePts[u].x,e.circlePts[u].y));0!==p.length&&(t.circlePts=p)}t.spatialAnalystUrl=e.spatialAnalystUrl}else t.centerPoint=new SuperMapAlgoPlot.Point(e.centerPoint.x,e.centerPoint.y);t.endAngle=e.endAngle,t.radius=e.radius,t.radiusPosAngle=e.radiusPosAngle,t.startAngle=e.startAngle,t.textPosition=e.textPosition,t.radiusLineType=e.radiusLineType,t.radiusText=e.radiusText}else 0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.POLYGONREGION&&(Object.prototype.hasOwnProperty.call(t.symbolData,"textPosition")?t.scaleValues[1]=t.symbolData.textPosition:void 0===t.scaleValues[1]&&(t.scaleValues[1]=t.symbolData.annotationPosition))}}}};SuperMapAlgoPlot.PlottingUtil=SuperMapAlgoPlot.PlottingUtil||{};SuperMapAlgoPlot.PlottingUtil.DEFAULT_PRECISION=14,SuperMapAlgoPlot.PlottingUtil.DPI=96,SuperMapAlgoPlot.PlottingUtil.RTOD=57.29577951308232,SuperMapAlgoPlot.PlottingUtil.DTOR=.017453292519943295,SuperMapAlgoPlot.PlottingUtil.dirAngle=function(t,e){let i,o,l,s,n,a;i=e.x,o=e.y,n=i-(l=t.x),a=o-(s=t.y);var r=Math.atan2(a,n);return r<0&&(r+=2*Math.PI),r},SuperMapAlgoPlot.PlottingUtil.generateUuid=function(){let t=[];for(let e=0;e<36;e++)t[e]="0123456789abcdef".substr(Math.floor(16*Math.random()),1);return t[14]="4",t[19]="0123456789abcdef".substr(3&t[19]|8,1),t[8]=t[13]=t[18]=t[23]="-",t.join("")},SuperMapAlgoPlot.PlottingUtil.cloneObject=function(t){return JSON.parse(JSON.stringify(t))},SuperMapAlgoPlot.PlottingUtil.colorRGBA=function(t,e){let i=t.substring(1,3),o=parseInt(i,16),l=t.substring(3,5),s=parseInt(l,16),n=t.substring(5);return"rgba("+o+","+s+","+parseInt(n,16)+","+e+")"},SuperMapAlgoPlot.PlottingUtil.colorRGBToString=function(t){let e=t.red.toString(16);e.length<2&&(e="0"+e);let i=t.green.toString(16);i.length<2&&(i="0"+i);let o=t.blue.toString(16);return o.length<2&&(o="0"+o),"#"+e+i+o},SuperMapAlgoPlot.PlottingUtil.colorStringToRGB=function(t){var e={};let i=t.substring(1,3);e.red=parseInt(i,16);let o=t.substring(3,5);e.green=parseInt(o,16);let l=t.substring(5);return e.blue=parseInt(l,16),e},SuperMapAlgoPlot.PlottingUtil.decimalToHex=function(t){let e=t.toString(16);for(;e.length<8;)e="0"+e;let i=e.substring(0,2),o=e.substring(2,4),l=e.substring(4,6);return{color:"#"+e.substring(6)+l+o,alpha:parseInt(i,16)/255}},SuperMapAlgoPlot.PlottingUtil.hexToDecimal=function(t,e){let i=t.substring(1,3),o=t.substring(3,5),l=t.substring(5),s=parseInt(l+o+i,16),n=Math.round(255*e).toString(16);return parseInt(n+"000000",16)+s},SuperMapAlgoPlot.PlottingUtil.getAlign=function(t){return"TOPLEFT"===t?"lt":"TOPCENTER"===t?"ct":"TOPRIGHT"===t?"rt":"BOTTOMLEFT"===t?"lb":"BOTTOMCENTER"===t?"cb":"BOTTOMRIGHT"===t?"rb":"MIDDLELEFT"===t?"lm":"MIDDLECENTER"===t?"cm":"MIDDLERIGHT"===t?"rm":"lt"},SuperMapAlgoPlot.PlottingUtil.trim=function(t){return null==t?"":t.replace(/(^\s*)|(\s*$)/g,"")},SuperMapAlgoPlot.PlottingUtil.getTextWidth=function(t,e){e=e.replace(new RegExp(" ","g"),"_");var i=1;t.fontSize<12&&(i=t.fontSize/12);let o=document.createElement("span");document.body.appendChild(o),o.style.width="auto",o.style.height="auto",t.fontStyle&&(o.style.fontStyle=t.fontStyle),t.fontSize&&(o.style.fontSize=new String(t.fontSize)+"px"),t.fontFamily&&(o.style.fontFamily=t.fontFamily),t.fontWeight&&(o.style.fontWeight=t.fontWeight),o.style.position="absolute",o.style.visibility="hidden",o.style.display="inline-block",o.innerHTML=e;var l=o.clientWidth,s=e.length;return null!=t.fontSpace&&null!=t.fontPercent?l=t.fontPercent/100*l+t.fontSpace*(t.fontPercent/100)*(s-1):null==t.fontSpace&&null!=t.fontPercent?l=t.fontPercent/100*l:null!=t.fontSpace&&null==t.fontPercent&&(l+=t.fontSpace*(s-1)),document.body.removeChild(o),l*i},SuperMapAlgoPlot.PlottingUtil.getTextCount=function(t){let e=0,i=0;for(let o=0;o<t.length;o++)t.charCodeAt(o)>255?e++:i++;return e+i/2},SuperMapAlgoPlot.PlottingUtil.toJSON=function(t){var e=t;if(null==e)return null;switch(e.constructor){case String:return e=(e=(e=(e=(e=(e=(e='"'+e.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","&lt;")).replace(">","&gt;")).replace(/%/g,"%2525")).replace(/&/g,"%26");case Array:for(var i=[],o=0,l=e.length;o<l;o++)i.push(SuperMapAlgoPlot.PlottingUtil.toJSON(e[o]));return"["+i.join(",")+"]";case Number:return isFinite(e)?String(e):null;case Boolean:return String(e);case Date:return"{'__type':\"System.DateTime\",'Year':"+e.getFullYear()+",'Month':"+(e.getMonth()+1)+",'Day':"+e.getDate()+",'Hour':"+e.getHours()+",'Minute':"+e.getMinutes()+",'Second':"+e.getSeconds()+",'Millisecond':"+e.getMilliseconds()+",'TimezoneOffset':"+e.getTimezoneOffset()+"}";default:if(null!=e.toJSON&&"function"==typeof e.toJSON)return e.toJSON();if("object"==typeof e){if(e.length){let t=[];for(let i=0,o=e.length;i<o;i++)t.push(SuperMapAlgoPlot.PlottingUtil.toJSON(e[i]));return"["+t.join(",")+"]"}let t=[];for(let i in e)"function"!=typeof e[i]&&"CLASS_NAME"!==i&&"parent"!==i&&t.push('"'+i+'":'+SuperMapAlgoPlot.PlottingUtil.toJSON(e[i]));return t.length>0?"{"+t.join(",")+"}":"{}"}return e.toString()}},SuperMapAlgoPlot.PlottingUtil.copyFeature=function(t){var e=null;if(null!=t&&t.geometry){let i=t.geometry.clone();e=new SuperMap.Feature.Vector(i),t.style&&(e.style=SuperMapAlgoPlot.PlottingUtil.copyAttributes(e.style,t.style)),i.feature=e,i.calculateParts()}return e},SuperMapAlgoPlot.PlottingUtil.inverse=function(t){for(var e=[],i=t.length-1;i>=0;i--)e.push(t[i]);return e},SuperMapAlgoPlot.PlottingUtil.getSurroundLinePts=function(t,e){var i=[],o=[];for(let l=0;l<t.length-1;l++){let s,n,a=[];if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[l].x,t[l+1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[l].y,t[l+1].y))continue;a.push(t[l]),a.push(t[l+1]);let r=SuperMapAlgoPlot.PlottingUtil.parallel(a,e);if(s=r[0],n=r[1],0!=i.length){let t=SuperMapAlgoPlot.PlottingUtil.intersectLines(s,n,i[0],i[1]);if(t.isIntersectLines){let e=t.intersectPoint,i=SuperMapAlgoPlot.PlottingUtil.distance(s,n);SuperMapAlgoPlot.PlottingUtil.distance(e,n)>2*i?o.push(n):(o[o.length-1]=e,o.push(n))}else o.push(n)}else o.push(s),o.push(n);(i=[]).push(o[o.length-2]),i.push(o[o.length-1])}if(t[0].x===t[t.length-1].x&&t[0].y===t[t.length-1].y&&1<o.length){let t=SuperMapAlgoPlot.PlottingUtil.intersectLines(o[0],o[1],o[o.length-2],o[o.length-1]);if(t.isIntersectLines){let e=t.intersectPoint;o[o.length-1]=e,o[0]=e}}return o},SuperMapAlgoPlot.PlottingUtil.copyFontStyle=function(t,e){void 0===t.labelAlign&&void 0!==e.labelAlign&&(t.labelAlign=e.labelAlign),!0!==t.fontSizeLimit&&(void 0!==e.fontSize&&(t.fontSize=e.fontSize),void 0!==e.fontWeight&&(t.fontWeight=e.fontWeight),void 0!==e.fontStyle&&(t.fontStyle=e.fontStyle),void 0!==e.fontSpace&&(t.fontSpace=e.fontSpace),void 0!==e.fontPercent&&(t.fontPercent=e.fontPercent)),t.strokeWidth=e.strokeWidth},SuperMapAlgoPlot.PlottingUtil.getDataFromServer=function(t,e,i,o,l,s,n,a){let r;if(void 0!==s&&(r=s),"undefined"!=typeof SuperMap&&void 0!==SuperMap.GetSymbolInfoService){let s=new SuperMap.GetSymbolInfoService(t);s.events.on({processCompleted:n,processFailed:a,scope:r});let p=new SuperMap.GetSymbolInfoParameters;p.libID=e,p.code=i,l&&SuperMapAlgoPlot.PlottingUtil.extend(p,l),o&&null!=o&&(SuperMapAlgoPlot.PlottingUtil.isArray(o)||(o=[o]),p.inputPoints=o),s.processAsync(p)}else if(void 0!==typeof SuperMap&&void 0!==typeof SuperMap.REST&&void 0!==typeof SuperMap.REST.GetSymbolInfoService){let s=new SuperMap.REST.GetSymbolInfoService(t);s.events.on({processCompleted:n,processFailed:a,scope:r});let p=new SuperMap.REST.GetSymbolInfoParameters;if(p.libID=e,p.code=i,l&&SuperMapAlgoPlot.PlottingUtil.extend(p,l),o&&null!=o&&(SuperMapAlgoPlot.PlottingUtil.isArray(o)||(o=[o]),p.inputPoints=o),l&&l.credential){let t=l.credential;s.processAsync(p,t)}else s.processAsync(p)}},SuperMapAlgoPlot.PlottingUtil.innerOutlineDir=function(t){function e(t,e){function i(t){let e=Math.atan2(t.y,t.x);return e<0&&(e+=2*Math.PI),e}let o=i(e)-i(t);return o<-Math.PI&&(o+=2*Math.PI),o>Math.PI&&(o-=2*Math.PI),o}if(t.length<3)return 1;let i=0,o={x:0,y:0},l={x:0,y:0};for(let s=2;s<t.length;s++)l.x=t[s].x-t[s-1].x,l.y=t[s].y-t[s-1].y,o.x=t[s-1].x-t[s-2].x,o.y=t[s-1].y-t[s-2].y,i+=e(o,l);return l.x=t[1].x-t[0].x,l.y=t[1].y-t[0].y,o.x=t[0].x-t[t.length-1].x,o.y=t[0].y-t[t.length-1].y,(i+=e(o,l))>=0?-1:1},SuperMapAlgoPlot.PlottingUtil.isNear=function(t,e){return e||(e=SuperMapAlgoPlot.PlottingUtil.TORLERANCE_STATIC),t<e&&t>-e},SuperMapAlgoPlot.PlottingUtil.equalFuzzy=function(t,e,i){return i||(i=1e-18),Math.abs(t-e)<=i},SuperMapAlgoPlot.PlottingUtil.intersectLines=function(t,e,i,o){var l={isIntersectLines:!1};if(t.x===e.x&&t.y===e.y||i.x===o.x&&i.y===o.y)return l;let s=e.x-t.x,n=e.y-t.y,a=o.x-i.x,r=o.y-i.y,p=s*r-a*n;if(SuperMapAlgoPlot.PlottingUtil.isNear(p))return l;let u=(s*(t.y-i.y)-n*(t.x-i.x))/p,h=new SuperMapAlgoPlot.Point(0,0);return h.x=u*a+i.x,h.y=u*r+i.y,l.isIntersectLines=!0,l.intersectPoint=h,l},SuperMap.Plot.PlottingUtil.limitSigDigs=function(t,e){var i=0;if(e>0){var o=new Number(t);i=parseFloat(o.toPrecision(e))}return i},SuperMap.Plot.PlottingUtil.containsPoint=function(t,e){for(var i=SuperMap.Plot.PlottingUtil.getPolygonCenterPt(t.components),o=SuperMap.Plot.PlottingUtil.distance(i,e),l=0,s=SuperMap.Plot.PlottingUtil.radian(e,t.components[0]),n=1;n<t.components.length;n++){var a=SuperMap.Plot.PlottingUtil.radian(e,t.components[n]);s>a&&(s=a,l=n)}return o<SuperMap.Plot.PlottingUtil.distance(i,t.components[l])},SuperMap.Plot.PlottingUtil.intersects=function(t,e){var i=!1;if("SuperMap.Geometry.Point"===e.CLASS_NAME)i=t.containsPoint(e);else if("SuperMap.Geometry.LineString"===e.CLASS_NAME)i=e.intersects(t);else if("SuperMap.Geometry.LinearRing"===e.CLASS_NAME)i=SuperMap.Geometry.LineString.prototype.intersects.apply(this,[e]);else for(var o=0,l=e.components.length;o<l&&!(i=e.components[o].intersects(this));++o);return i},SuperMapAlgoPlot.PlottingUtil.getEnvelopePoints=function(t){function e(t,e){if(t.length!==e.length)return!1;for(let i=0;i<t.length;i++)if(t[i].x!==e[i].x||t[i].y!==e[i].y)return!1;return!0}function i(t,e,i){for(let o=0;o<t.length;o++)if(SuperMap.Plot.PlottingUtil.containsPoint(t[o].components[0],e))return i.index=o,!0;return!1}function o(t,e,i){let o=t.components[0].components,l=new SuperMapAlgoPlot.Point(0,0);for(let t=0;t<o.length-1;t++)if(SuperMapAlgoPlot.PlottingUtil.intersectLineSegs(e,i,o[t],o[t+1],l))return l;return null}function l(t,e){if(0===t.length||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(e[0].x,e[e.length-1].x,.5)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(e[0].y,e[e.length-1].y,.5))return e;let i=e[e.length-1];for(let o=0;o<t.length;o++)if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[o][0].x,i.x,.5)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[o][0].y,i.y,.5)){e=e.concat(t[o]),t.splice(o,1);let i=l(t,e);if(void 0!==i&&0!==i.length)return i}else if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[o][t[o].length-1].x,i.x,.5)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[o][t[o].length-1].y,i.y,.5)){for(let i=t[o].length-1;i>=0;i--)e.push(t[o][i]);t.splice(o,1);let i=l(t,e);if(void 0!==i&&0!==i.length)return i}return e}if(SuperMapAlgoPlot.PlottingUtil.isArray(t)||(t=[t]),0===t.length)return[];if(1===t.length)return t[0];for(let i=0;i<t.length;i++)for(let o=i+1;o<t.length;)e(t[i],t[o])?t.splice(o,1):o++;let s=[];for(let e=0;e<t.length;e++)s.push(new SuperMap.Geometry.Polygon([new SuperMap.Geometry.LinearRing(t[e])]));let n=[];for(let e=0;e<t.length;e++){let l=[],a=[],r=-1,p=-1,u=s.slice();u.splice(e,1);let h={};for(let n=0;n<t[e].length;n++)if(i(u,t[e][n],h)){if(0!==a.length){let i=o(s[h.index],t[e][n-1],t[e][n]);i&&i!==t[e][n-1]&&i!==t[e][n]&&a.push(i),l.push(a),a=[]}}else{if(0===n&&(r=l.length),n===t[e].length-1&&(p=l.length),0===a.length&&void 0!==h.index){let i=o(s[h.index],t[e][n-1],t[e][n]);i&&i!==t[e][n-1]&&i!==t[e][n]&&a.push(i)}a.push(t[e][n].clone())}if(0!==a.length&&l.push(a),r<l.length&&p<l.length&&r!==p){for(let t=0;t<l[r].length;t++)l[p].push(l[r][t]);l.splice(r,1)}n=n.concat(l)}let a=[];for(;0!==n.length;){let t=n[0];n.splice(0,1);let e=l(n,t);void 0!==e&&(t=e),t.length>2&&a.push(t)}return a},SuperMapAlgoPlot.PlottingUtil.isRight=function(t,e,i){let o=e,l=i,s=e,n=t;return(l.x-o.x)*(n.y-s.y)-(n.x-s.x)*(l.y-o.y)<0},SuperMapAlgoPlot.PlottingUtil.radian=function(t,e){let i,o,l=0;return i=e.x-t.x,o=e.y-t.y,(l=Math.atan2(o,i))<0&&(l+=2*Math.PI),l},SuperMapAlgoPlot.PlottingUtil.findBisectorPoint=function(t,e,i,o){let l=SuperMapAlgoPlot.PlottingUtil.radian(e,t),s=(l+SuperMapAlgoPlot.PlottingUtil.radian(e,i))/2,n=Math.cos(s-l+Math.PI/2),a=o;SuperMapAlgoPlot.PlottingUtil.isNear(n,.15)||(a=o/n);let r=e.x+a*Math.cos(s),p=e.y+a*Math.sin(s);return new SuperMapAlgoPlot.Point(r,p)},SuperMapAlgoPlot.PlottingUtil.findPoint=function(t,e,i,o){if(t===e||Math.abs(i)<1e-18)return t;let l=SuperMapAlgoPlot.PlottingUtil.radian(t,e)+o*Math.PI/180;var s=t.x+i*Math.cos(l),n=t.y+i*Math.sin(l);return new SuperMapAlgoPlot.Point(s,n)},SuperMapAlgoPlot.PlottingUtil.isSameQuadrant=function(t,e,i,o){let l=(e.x-t.x)*(o.x-i.x),s=(e.y-t.y)*(o.y-i.y);return!(Math.abs(l)<1e-18&&Math.abs(s)<1e-18)&&((l>0||Math.abs(l)<1e-18)&&(s>0||Math.abs(s)<1e-18))},SuperMapAlgoPlot.PlottingUtil.isCross=function(t,e,i,o){let l=new SuperMapAlgoPlot.Point(0,0);return!(!SuperMapAlgoPlot.PlottingUtil.intersectLineSegs(t,e,i,o,l)||l==t||l===e||l===i||l==o)},SuperMapAlgoPlot.PlottingUtil.intersectLineSegs=function(t,e,i,o,l){if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.x,e.x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.y,e.y))return l.x=t.x,l.y=t.y,!1;if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(i.x,o.x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(i.y,o.y))return l.x=i.x,l.y=i.y,!1;let s=0,n=0;if(s=t.x>e.x?t.x:e.x,n=t.x<e.x?t.x:e.x,i.x-s>1e-16&&o.x-s>1e-16||i.x-n<-1e-16&&o.x-n<-1e-16)return!1;if(s=t.y>e.y?t.y:e.y,n=t.y<e.y?t.y:e.y,i.y-s>1e-16&&o.y-s>1e-16||i.y-n<-1e-16&&o.y-n<-1e-16)return!1;let a=e.x-t.x,r=e.y-t.y,p=o.x-i.x,u=o.y-i.y,h=t.x-i.x,g=t.y-i.y,c=a*u-p*r,y=c;if(Math.abs(a)>1e-18&&Math.abs(p)>1e-18&&(y/=a*p),Math.abs(y)<1e-18)return t===i?(l.x=t.x,l.y=t.y,!SuperMapAlgoPlot.PlottingUtil.isSameQuadrant(t,e,i,o)):e===o?(l.x=e.x,l.y=e.y,!SuperMapAlgoPlot.PlottingUtil.isSameQuadrant(t,e,i,o)):t===o?(l.x=t.x,l.y=t.y,SuperMapAlgoPlot.PlottingUtil.isSameQuadrant(t,e,i,o)):e===i&&(l.x=e.x,l.y=e.y,SuperMapAlgoPlot.PlottingUtil.isSameQuadrant(t,e,i,o));let P=(a*g-r*h)/c,S=(p*g-u*h)/c;return!(P<0&&(Math.abs(P*p)>1e-16||Math.abs(P*u)>1e-16))&&(!(P>1&&(Math.abs((P-1)*p)>1e-16||Math.abs((P-1)*u)>1e-16))&&(!(S<0&&(Math.abs(S*a)>1e-16||Math.abs(S*r)>1e-16))&&(!(S>1&&(Math.abs((S-1)*a)>1e-16||Math.abs((S-1)*r)>1e-16))&&(Math.abs(P)<1e-18?(l.x=i.x,l.y=i.y,!0):Math.abs(P-1)<1e-18?(l.x=o.x,l.y=o.y,!0):Math.abs(S)<1e-18?(l.x=t.x,l.y=t.y,!0):Math.abs(S-1)<1e-18?(l.x=e.x,l.y=e.y,!0):!(P<0&&(Math.abs(P*p)>1e-16||Math.abs(P*u)>1e-16))&&(!(P>1&&(Math.abs((P-1)*p)>1e-16||Math.abs((P-1)*u)>1e-16))&&(!(S<0&&(Math.abs(S*a)>1e-16||Math.abs(S*r)>1e-16))&&(!(S>1&&(Math.abs((S-1)*a)>1e-16||Math.abs((S-1)*r)>1e-16))&&(l.x=P*p+i.x,l.y=P*u+i.y,!0))))))))},SuperMapAlgoPlot.PlottingUtil.parallel=function(t,e){let i=[],o=t.length;if(!t||null==t||t.length<2)return i;let l=!1;t.length>3&&t[0].x===t[t.length-1].x&&t[0].y===t[t.length-1].y&&(l=!0),l?(i[0]=SuperMapAlgoPlot.PlottingUtil.findBisectorPoint(t[t.length-2],t[0],t[1],e),i[t.length-1]=i[0]):(i[0]=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],e,90),i[t.length-1]=SuperMapAlgoPlot.PlottingUtil.findPoint(t[t.length-1],t[t.length-2],-e,90));let s=t[0],n=t[1],a=t[1];for(let l=1;l<t.length-1;l++)if(n=t[l],t[l]!==t[l-1]&&(s=t[l-1]),t[l]!==t[l+1]){a=t[l+1];let o=SuperMapAlgoPlot.PlottingUtil.findBisectorPoint(s,n,a,e);SuperMapAlgoPlot.PlottingUtil.isCross(s,i[l-1],n,o)&&(o=i[l-1]),i[l]=o}else{let r=l;for(;r<o-1;){if(t[r]!==t[r+1]){a=t[r+1];break}r++}if(r<o-1){let t=SuperMapAlgoPlot.PlottingUtil.FindBisectorPoint(s,n,a,e);for(SuperMapAlgoPlot.PlottingUtil.isCross(s,i[l-1],n,t)&&(t=i[l-1]);l<r;)i[l]=t,l++;l=r-1}}return i},SuperMapAlgoPlot.PlottingUtil.distance=function(t,e){let i=[];i.push(t),i.push(e);let o=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(i).pts;if(0===o.length){let t=i[0],e=i[1];return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}{let t=o[0],e=o[1];return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}},SuperMapAlgoPlot.PlottingUtil.projectPoint=function(t,e,i){if(e===i)return e;let o=new SuperMapAlgoPlot.Point(0,0),l=i.x-e.x,s=e.y-i.y,n=l*l,a=s*s,r=l*s,p=l*l+s*s;return o.x=(r*(e.y-t.y)+e.x*a+t.x*n)/p,o.y=(r*(e.x-t.x)+e.y*n+t.y*a)/p,o},SuperMapAlgoPlot.PlottingUtil.pointToLineDis=function(t,e,i){let o=SuperMapAlgoPlot.PlottingUtil.projectPoint(t,e,i);return SuperMapAlgoPlot.PlottingUtil.distance(t,o)},SuperMapAlgoPlot.PlottingUtil.pointToPloyLineDis=function(t,e,i){if(e===i)return SuperMapAlgoPlot.PlottingUtil.distance(t,e);let o=(e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y),l=(i.x-t.x)*(i.x-t.x)+(i.y-t.y)*(i.y-t.y),s=(e.x-i.x)*(e.x-i.x)+(e.y-i.y)*(e.y-i.y),n=(o+s-l)/(2*s);n<0?n=0:n>1&&(n=1);let a=(i.x-e.x)*n+e.x,r=(i.y-e.y)*n+e.y,p=(a-t.x)*(a-t.x)+(r-t.y)*(r-t.y);return Math.sqrt(p)},SuperMapAlgoPlot.PlottingUtil.isCounterClockwise=function(t,e,i){return(i.x-e.x)*(t.y-e.y)-(t.x-e.x)*(i.y-e.y)>0},SuperMapAlgoPlot.PlottingUtil.clearSamePts=function(t){let e=t.length;for(let i=0;i<e-1;)SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[i].x,t[i+1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[i].y,t[i+1].y)?(t.splice(i,1),e--):i++;return t},SuperMapAlgoPlot.PlottingUtil.getBeizerCtrlPt=function(t){let e=[],i=t.length;if(i<3)for(let o=0;o<i;++o)e[o]=t[o].clone();else{let o=0;for(let l=0;l<3*i-2;l+=3)e[l]=t[o].clone(),e[l+1]=new SuperMapAlgoPlot.Point(0,0),e[l+2]=new SuperMapAlgoPlot.Point(0,0),o++;for(let o=1;o<i-1;o++)SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(8,3,t[o-1],t[o],t[o+1],e[3*o+1],e[3*o+2]);SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.6,e[0],e[3],e[4],e[2]),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.6,e[3*i-3],e[3*i-6],e[3*i-4],e[3*i-2]),e[1]=t[0].clone(),e[3*i-1]=t[i-1].clone()}return e},SuperMapAlgoPlot.PlottingUtil.isOnLine=function(t,e,i){if(e.x===i.x&&e.y===i.y)return!1;if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(i.x,e.x))return SuperMapAlgoPlot.PlottingUtil.equalFuzzy(i.x,t.x);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(i.y,e.y))return SuperMapAlgoPlot.PlottingUtil.equalFuzzy(i.y,t.y);if(e.x===t.x&&e.y===t.y||t.x===i.x&&t.y===i.y)return!0;var o=(t.y-i.y)*(i.x-e.x)-(i.y-e.y)*(t.x-i.x);return(o/=(i.x-e.x)*(t.x-i.x))<1e-10&&o>1e-10},SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt=function(t,e){let i=t.slice();!0===e&&i.push(i[0]);let o=[],l=[];for(let t=0;t<i.length-1;t++)i[t+1].x-i[0].x>-360&&i[t+1].x-i[0].x<-180&&o.push(t+1),i[t+1].x-i[0].x<360&&i[t+1].x-i[0].x>180&&l.push(t+1);if(l.length>o.length)for(let t=0;t<l.length;t++)i[l[t]].x=i[l[t]].x-360;else for(let t=0;t<o.length;t++)i[o[t]].x=i[o[t]].x+360;let s=SuperMapAlgoPlot.PlottingUtil.getBeizerCtrlPt(i),n=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsWithCtrlPt(s);for(let t=0;t<n.length;t++)n[t].x>180?n[t].x=n[t].x-360:n[t].x<-180&&(n[t].x=n[t].x+360);return n},SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsWithCtrlPt=function(t){let e=t.length,i=[];if(t.length<3)for(let o=0;o<e;o++)i[o]=t[o].clone();else for(let o=0;o<e;o+=3){if(o+4>=e)continue;let l=t[o].x,s=t[o].y,n=t[o+2].x,a=t[o+2].y,r=t[o+4].x,p=t[o+4].y,u=t[o+3].x,h=t[o+3].y;if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l,n,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(s,a,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(r,u,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(p,h,1e-10))i.push(new SuperMapAlgoPlot.Point(l,s)),i.push(new SuperMapAlgoPlot.Point(r,p));else for(let t=0;t<=1;t+=.03125){let e,o,g,c,y=t*t,P=y*t;e=1-3*t+3*y-P,o=3*(t-2*y+P),g=3*(y-P),c=P;let S=new SuperMapAlgoPlot.Point(e*l+o*n+g*r+c*u,e*s+o*a+g*p+c*h);i.push(S)}}return i},SuperMapAlgoPlot.PlottingUtil.computeBeizerPoints0=function(t,e,i){let o=SuperMapAlgoPlot.PlottingUtil.polylineDistance(e),l=[],s=[],n=[];if(t){s.push(e[0]);let t=i[0],a=i[1],r=e[0].x+o*t,p=e[0].y+o*a;s.push(new SuperMapAlgoPlot.Point(r,p)),l.push(new SuperMapAlgoPlot.Point(r,p));for(let t=1;t<e.length-1;t++){let n=i[4*t-2],a=i[4*t-1],r=e[t].x+o*n,p=e[t].y+o*a;s.push(new SuperMapAlgoPlot.Point(r,p)),l.push(new SuperMapAlgoPlot.Point(r,p)),s.push(new SuperMapAlgoPlot.Point(e[t].x,e[t].y)),n=i[4*t],a=i[4*t+1],r=e[t].x+o*n,p=e[t].y+o*a,s.push(new SuperMapAlgoPlot.Point(r,p)),l.push(new SuperMapAlgoPlot.Point(r,p))}let u=e.length-1;t=i[4*u-2],a=i[4*u-1],r=e[u].x+o*t,p=e[u].y+o*a,s.push(new SuperMapAlgoPlot.Point(r,p)),l.push(new SuperMapAlgoPlot.Point(r,p)),s.push(new SuperMapAlgoPlot.Point(e[u].x,e[u].y)),s.push(new SuperMapAlgoPlot.Point(e[u].x,e[u].y)),s.push(new SuperMapAlgoPlot.Point(e[u].x,e[u].y)),n=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsWithCtrlPt(s)}else{i=[];let t=(s=SuperMapAlgoPlot.PlottingUtil.getBeizerCtrlPt(e))[1].x-s[0].x,a=s[1].y-s[0].y,r=t/o,p=a/o;i.push(r),i.push(p),l.push(s[1]);for(let t=1;t<e.length-1;t++){let e=(s[3*t-1].x-s[3*t].x)/o,n=(s[3*t-1].y-s[3*t].y)/o;i.push(e),i.push(n),l.push(s[3*t-1]);let a=(s[3*t+1].x-s[3*t].x)/o,r=(s[3*t+1].y-s[3*t].y)/o;i.push(a),i.push(r),l.push(s[3*t+1])}t=s[3*(e.length-1)-1].x-s[3*(e.length-1)].x,a=s[3*(e.length-1)-1].y-s[3*(e.length-1)].y,r=t/o,p=a/o,i.push(r),i.push(p),l.push(s[3*(e.length-1)-1]),n=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsWithCtrlPt(s)}return{scalePoints:l,scaleValues:i,beizerPoints:n}},SuperMapAlgoPlot.PlottingUtil.computeBeizerPoints=function(t,e,i){let o=SuperMapAlgoPlot.PlottingUtil.polylineDistance(e),l=[],s=[],n=[];if(t){s.push(new SuperMapAlgoPlot.Point(e[0].x,e[0].y)),s.push(new SuperMapAlgoPlot.Point(e[0].x,e[0].y));let t=i[0],a=i[1],r=e[0].x+o*t,p=e[0].y+o*a;s.push(new SuperMapAlgoPlot.Point(r,p)),l.push(new SuperMapAlgoPlot.Point(r,p));for(let t=1;t<e.length-1;t++){s.push(new SuperMapAlgoPlot.Point(e[t].x,e[t].y));let n=i[4*t-2],a=i[4*t-1],r=e[t].x+o*n,p=e[t].y+o*a;s.push(new SuperMapAlgoPlot.Point(r,p)),l.push(new SuperMapAlgoPlot.Point(r,p)),n=i[4*t],a=i[4*t+1],r=e[t].x+o*n,p=e[t].y+o*a,s.push(new SuperMapAlgoPlot.Point(r,p)),l.push(new SuperMapAlgoPlot.Point(r,p))}let u=e.length-1;s.push(new SuperMapAlgoPlot.Point(e[u].x,e[u].y)),t=i[4*u-2],a=i[4*u-1],r=e[u].x+o*t,p=e[u].y+o*a,s.push(new SuperMapAlgoPlot.Point(r,p)),l.push(new SuperMapAlgoPlot.Point(r,p)),s.push(new SuperMapAlgoPlot.Point(e[u].x,e[u].y)),n=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsWithCtrlPt(s)}else{i=[];let t=(s=SuperMapAlgoPlot.PlottingUtil.getBeizerCtrlPt(e))[2].x-s[0].x,a=s[2].y-s[0].y,r=t/o,p=a/o;i.push(r),i.push(p),l.push(s[2]);for(let t=1;t<e.length-1;t++){let e=(s[3*t+1].x-s[3*t].x)/o,n=(s[3*t+1].y-s[3*t].y)/o;i.push(e),i.push(n),l.push(s[3*t+1]);let a=(s[3*t+2].x-s[3*t].x)/o,r=(s[3*t+2].y-s[3*t].y)/o;i.push(a),i.push(r),l.push(s[3*t+2])}t=s[3*(e.length-1)+1].x-s[3*(e.length-1)].x,a=s[3*(e.length-1)+1].y-s[3*(e.length-1)].y,r=t/o,p=a/o,i.push(r),i.push(p),l.push(s[3*(e.length-1)+1]),n=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsWithCtrlPt(s)}return{scalePoints:l,scaleValues:i,beizerPoints:n}},SuperMapAlgoPlot.PlottingUtil.getBeizerInputPoints=function(t){var e=[],i=t.length;if(i<3)e.push(t);else for(var o=0;o<i;o+=3)e.push(t[o]);return e},SuperMapAlgoPlot.PlottingUtil.getTrianglePoints=function(t,e,i,o,l,s,n){let a=i.x,r=i.y,p=o.x,u=o.y,h=l.x,g=l.y;SuperMapAlgoPlot.PlottingUtil.getPointsByTriangle(t,e,a,r,p,u,h,g,s,n)},SuperMapAlgoPlot.PlottingUtil.getPointsByTriangle=function(t,e,i,o,l,s,n,a,r,p){let u=l+(n-i),h=s+(a-o),g=0,c=0;if(i==n)g=i,c=h;else if(o==a)g=u,c=o;else{let t=1*(a-o)/(n-i),e=o-i*t;c=t*(g=(h+u/t-e)/(t+1/t))+e}let y=Math.sqrt(1*(l-u)*(l-u)+1*(s-h)*(s-h)),P=Math.sqrt(1*(i-l)*(i-l)+1*(o-s)*(o-s)),S=Math.sqrt(1*(l-n)*(l-n)+1*(s-a)*(s-a)),d=0;u=g+(u-g)*(d=P+S?1+(S-P)*t/(S+P):1),h=c+(h-c)*d,0==y&&(y=1),r.x=l+(l-u)*P/(e*y),r.y=s+(s-h)*P/(e*y),p.x=l+(u-l)*S/(e*y),p.y=s+(h-s)*S/(e*y)},SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints=function(t,e,i,o,l){let s=e.x,n=e.y,a=i.x,r=i.y,p=o.x,u=o.y;return SuperMapAlgoPlot.PlottingUtil.getPointsByTrapezoid(t,s,n,a,r,p,u,l)},SuperMapAlgoPlot.PlottingUtil.getPointsByTrapezoid=function(t,e,i,o,l,s,n,a){let r=0,p=0,u=0,h=0;if(0==Math.abs(i-l))r=e+o-s,p=n;else if(0==Math.abs(e-o))r=s,p=i+l-n;else{let t=1*(i-l)/(e-o),a=n-t*s;p=t*(r=((l+i)/2+(e+o)/(2*t)-a)/(t+1/t))+a,r=2*r-s,p=2*p-n}let g=Math.sqrt(1*(e-o)*(e-o)+1*(i-l)*(i-l)),c=Math.sqrt(1*(e-r)*(e-r)+1*(i-p)*(i-p));return g>0?(u=e+(o-e)*c/g,h=i+(l-i)*c/g):(u=e,h=i),a.x=u+(r-u)*t,a.y=h+(p-h)*t,a},SuperMapAlgoPlot.PlottingUtil.pointIsOnPolyLine=function(t,e,i){if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.x,e.x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.y,e.y)||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.x,i.x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.y,i.y))return!0;let o=t.x-e.x,l=t.y-e.y,s=t.x-i.x,n=t.y-i.y,a=(o*s+l*n)/(Math.sqrt(o*o+l*l)*Math.sqrt(s*s+n*n));return!!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(a,-1,.1)},SuperMapAlgoPlot.PlottingUtil.pointIsOnPolyLines=function(t,e){if(!e||0===e.length)return{isOnPolyLine:!1,index:-1};let i=!1,o=-1;for(let l=0;l<e.length-1;l++)if(i=SuperMapAlgoPlot.PlottingUtil.pointIsOnPolyLine(t,e[l],e[l+1])){o=l;break}return{isOnPolyLine:i,index:o}},SuperMapAlgoPlot.PlottingUtil.computePointToLineMinDis=function(t,e){let i=-1,o=-1;for(let l=0;l<e.length-1;l++){let s=e[l],n=e[l+1],a=SuperMapAlgoPlot.PlottingUtil.projectPoint(t,s,n);if(!SuperMapAlgoPlot.PlottingUtil.pointIsOnPolyLine(a,s,n))continue;let r=SuperMapAlgoPlot.PlottingUtil.distance(t,a);i<0?(i=r,o&&(o=l)):i>r&&(i=r,o=l)}return o&&i<0&&(o=-1),{minDis:i,index:o}},SuperMapAlgoPlot.PlottingUtil.findPointInLine=function(t,e,i){if(t===e||Math.abs(i)<1e-18)return t;let o=e.x-t.x,l=e.y-t.y,s=i/Math.sqrt(o*o+l*l),n=t.x+o*s,a=t.y+l*s;return new SuperMapAlgoPlot.Point(n,a)},SuperMapAlgoPlot.PlottingUtil.operateControlPoints=function(t){let e=t,i=e.length;if(3==i){let i=new SuperMapAlgoPlot.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(1,t[0],t[1],t[2],i),e.push(i)}if(i>4&&(e.splice(4,i-4),i=e.length),SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(t[0],t[1],e[2])){let t=e[0];e[0]=e[1],e[1]=t}if(!SuperMapAlgoPlot.PlottingUtil.pointIsRightToVerticle(e[0],e[1],e[2])){let t=e[2];e[2]=e[3],e[3]=t}return e},SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine=function(t,e,i){return(e.x-t.x)*(i.y-t.y)-(i.x-t.x)*(e.y-t.y)<0},SuperMapAlgoPlot.PlottingUtil.pointIsRightToVerticle=function(t,e,i){let o=new SuperMapAlgoPlot.Point(.5*(e.x+t.x),.5*(e.y+t.y)),l=new SuperMapAlgoPlot.Point(e.x-t.x,e.y-t.y),s=new SuperMapAlgoPlot.Point(i.x-o.x,i.y-o.y);return l.x*s.x+l.y*s.y>0},SuperMapAlgoPlot.PlottingUtil.linePnt=function(t,e,i){let o=SuperMapAlgoPlot.PlottingUtil.distance(t,e);if(0==o)return t;{let l=i/o;return SuperMapAlgoPlot.PlottingUtil.findPointOnLineByRatio(l,t,e)}},SuperMapAlgoPlot.PlottingUtil.findPointOnLineByRatio=function(t,e,i){let o=new SuperMapAlgoPlot.Point(0,0);return o.x=e.x+(i.x-e.x)*t,o.y=e.y+(i.y-e.y)*t,o},SuperMapAlgoPlot.PlottingUtil.rotateAngle=function(t,e,i){let o=e,l=Math.cos(o),s=Math.sin(o),n=i.x-t.x,a=i.y-t.y;return i.x=n*l-a*s+t.x,i.y=n*s+a*l+t.y,i},SuperMapAlgoPlot.PlottingUtil.resize=function(t,e,i){return i.x=t.x+e*(i.x-t.x),i.y=t.y+e*(i.y-t.y),i},SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine=function(t,e){if(e<0||t.length<2)return{index:-1,pt:null};if(Math.abs(e)<1e-18)return{index:0,pt:t[0]};let i=0;for(let o=0;o<t.length-1;o++)if((i+=SuperMapAlgoPlot.PlottingUtil.distance(t[o],t[o+1]))>e||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(i,e)){let l=i-e,s=t[o+1],n=t[o],a=l/SuperMapAlgoPlot.PlottingUtil.distance(s,n),r=new SuperMapAlgoPlot.Point(0,0);return r.x=s.x+(n.x-s.x)*a,r.y=s.y+(n.y-s.y)*a,{index:o,pt:r}}return{index:-1,pt:null}},SuperMapAlgoPlot.PlottingUtil.polylineDistance=function(t){if(0===t.length)return 0;let e=0;for(let i=0;i<t.length-1;i++)e+=SuperMapAlgoPlot.PlottingUtil.distance(t[i],t[i+1]);return e},SuperMapAlgoPlot.PlottingUtil.rotate=function(t,e,i,o){let l=o.x-t.x,s=o.y-t.y,n=l*e-s*i+t.x,a=l*i+s*e+t.y;return new SuperMapAlgoPlot.Point(n,a)},SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale=function(t,e,i){let o=e.x,l=e.y,s=i.x,n=i.y,a=Math.sqrt(1*(o-s)*(o-s)+1*(l-n)*(l-n)),r=0,p=0;return 0==a?(r=o,p=l):(r=o+(s-o)*t/a,p=l+(n-l)*t/a),new SuperMapAlgoPlot.Point(r,p)},SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale=function(t,e,i){let o=e.x,l=e.y,s=i.x,n=i.y,a=0,r=0,p=Math.sqrt(1*(o-s)*(o-s)+1*(l-n)*(l-n));return 0===p?(a=o,r=l):(a=o+(o-s)*t/p,r=l+(l-n)*t/p),new SuperMapAlgoPlot.Point(a,r)},SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine=function(t,e,i){let o=e.x,l=e.y,s=i.x,n=i.y,a=Math.sqrt(1*(o-s)*(o-s)+1*(l-n)*(l-n)),r=0,p=0;0==a?(p=0,r=t):(r=t*(o-s)/a,p=t*(l-n)/a);let u=-p+s,h=+r+n,g=+p+s,c=-r+n;return{pntLeft:new SuperMapAlgoPlot.Point(g,c),pntRight:new SuperMapAlgoPlot.Point(u,h)}},SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment=function(t,e,i){let o,l,s=0,n=0,a=0,r=1;if(n=e.x!==t.x?(e.y-t.y)/(e.x-t.x):1.7976931348623157e308,a=i.x!==t.x?(i.y-t.y)/(i.x-t.x):1.7976931348623157e308,s=i.y!==e.y?(i.x-e.x)/(e.y-i.y):1.7976931348623157e308,(o=e.x>=t.x&&e.y>=t.y?1:e.x<t.x&&e.y>t.y?2:e.x<=t.x&&e.y<=t.y?3:4)==(l=i.x>t.x&&i.y>t.y?1:i.x<t.x&&i.y>t.y?2:i.x<t.x&&i.y<t.y?3:4))(n<s&&a<s||n>s&&a>s)&&(r=0);else switch(o){case 1:(4==l&&n<s||2==l&&n>s)&&(r=0);break;case 2:(1==l&&n<s||3==l&&n>s)&&(r=0);break;case 3:(2==l&&n<s||4==l&&n>s)&&(r=0);break;case 4:(3==l&&n<s||1==l&&n>s)&&(r=0)}let p=new SuperMapAlgoPlot.Point(0,0);return SuperMapAlgoPlot.PlottingUtil.equalFuzzy(s-1.7976931348623157e308,0)?(p.x=t.x,p.y=e.y):SuperMapAlgoPlot.PlottingUtil.equalFuzzy(s,0)?(p.x=e.x,p.y=t.y):(p.x=(s*(e.y-t.y)+s*s*t.x+e.x)/(s*s+1),p.y=t.y+s*(p.x-t.x)),{isOnline:1===r,projectPoint:p}},SuperMapAlgoPlot.PlottingUtil.coordinateTrans=function(t,e,i){let o=SuperMapAlgoPlot.PlottingUtil.distance(new SuperMapAlgoPlot.Point(0,0),e),l=SuperMapAlgoPlot.PlottingUtil.radian(new SuperMapAlgoPlot.Point(0,0),e)+i*Math.PI/180,s=o*Math.cos(l)+t.x,n=o*Math.sin(l)+t.y;return new SuperMapAlgoPlot.Point(s,n)},SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen=function(t,e,i){let o,l,s=(i.x-e.x)*(i.x-e.x)+(i.y-e.y)*(i.y-e.y),n=Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y)),a=Math.sqrt((t.x-i.x)*(t.x-i.x)+(t.y-i.y)*(t.y-i.y));if(0==a||0==n)o=0,l=0;else if(0==s)o=n,l=0;else{let t=(n*n+a*a-s)/2/n/a,e=0;t>=1?(t=1,e=0):e=Math.sqrt(1-t*t),o=a*t,l=a*e}return{dLen1:o,dLen2:l}},SuperMapAlgoPlot.PlottingUtil.paraLine=function(t,e,i){let o=[];if(2>t.length)return o;if(i){let i=t[1].clone();i=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[0],Math.PI/2,i),o.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[0],i,e));for(let l=1;l<t.length-1;l++){if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[l].x,t[l+1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[l].y,t[l+1].y))continue;let s=SuperMapAlgoPlot.PlottingUtil.radian(t[l],t[l+1]),n=SuperMapAlgoPlot.PlottingUtil.radian(t[l],t[l-1])-s;for(;n<0;)n+=2*Math.PI;let a,r=n/2;a=r>Math.PI/2?r-Math.PI/2:Math.PI/2-r;let p=e/Math.cos(a);i=t[l+1].clone(),i=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[l],r,i),o.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[l],i,p))}i=t[t.length-2].clone(),i=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[t.length-1],-1*Math.PI/2,i),o.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[t.length-1],i,e))}else{let i=t[1].clone();i=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[0],-Math.PI/2,i),o.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[0],i,e));for(let l=1;l<t.length-1;l++){if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[l].x,t[l+1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[l].y,t[l+1].y))continue;let s=SuperMapAlgoPlot.PlottingUtil.radian(t[l],t[l+1]),n=SuperMapAlgoPlot.PlottingUtil.radian(t[l],t[l-1])-s;for(;n<0;)n+=2*Math.PI;let a,r=Math.PI-n/2;a=r>Math.PI/2?r-Math.PI/2:Math.PI/2-r;let p=e/Math.cos(a);i=t[l-1].clone(),i=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[l],r,i),o.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[l],i,p))}i=t[t.length-2].clone(),i=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[t.length-1],Math.PI/2,i),o.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[t.length-1],i,e))}return o},SuperMapAlgoPlot.PlottingUtil.circlePoint=function(t,e,i,o){o*=Math.PI/180;let l=t.x+e*Math.cos(o),s=t.y+i*Math.sin(o);return new SuperMapAlgoPlot.Point(l,s)},SuperMapAlgoPlot.PlottingUtil.getPolygonCenterPt=function(t){if(!t||0===t.length)return null;let e=0,i=0;for(let o=0;o<t.length;o++)e+=t[o].x,i+=t[o].y;return new SuperMapAlgoPlot.Point(e/t.length,i/t.length)},SuperMapAlgoPlot.PlottingUtil.ptIsInPolygon=function(t,e){if(!t||0===t.length)return!1;let i=0,o=t.length;for(let l=0;l<o;l++){let s=t[l],n=t[(l+1)%o];if(s.y===n.y)continue;let a=s.y<n.y?s.y:n.y,r=s.y>n.y?s.y:n.y;e.y<a||e.y>r||(e.y-s.y)*(n.x-s.x)/(n.y-s.y)+s.x>e.x&&i++}return i%2==1},SuperMapAlgoPlot.PlottingUtil.projectPtOnPolyLine=function(t,e){if(2>e.length)return{index:-1,pt:null};for(let i=0;i<e.length-1;i++){let o=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(t,e[i],e[i+1]);if(o.isOnline)return{index:i,pt:o.projectPoint}}return{index:-1,pt:null}},SuperMapAlgoPlot.PlottingUtil.isPloyClockwise=function(t){let e=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),i=e.length;if(i<3)return;let o=e[0].y*(e[i-1].x-e[1].x);e.push(e[0].clone());for(let t=1;t<i;++t)o+=e[t].y*(e[t-1].x-e[t+1].x);return o>0?0:1},SuperMapAlgoPlot.PlottingUtil.isSamePt=function(t,e){return!(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.x,e.x)||!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.y,e.y))},SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance=function(t,e){let i=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(e,t);return{index:i.index,pts:i.pt,bfind:-1!==i.index}},SuperMapAlgoPlot.PlottingUtil.ptInBounds=function(t,e){return t.x>e.left&&t.x<e.right&&t.y<e.top&&t.y>e.bottom},SuperMapAlgoPlot.PlottingUtil.InnerAngle=function(t,e,i){if(t==e||t==i)return 0;let o=SuperMapAlgoPlot.PlottingUtil.distance(t,e),l=SuperMapAlgoPlot.PlottingUtil.distance(t,i),s=SuperMapAlgoPlot.PlottingUtil.distance(e,i),n=(o*o+l*l-s*s)/(2*o*l);return n>1&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(n,1)?n=1:n<1&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(n,-1)&&(n=-1),Math.acos(n)},SuperMapAlgoPlot.PlottingUtil.plumbLineLen=function(t,e,i){return SuperMapAlgoPlot.PlottingUtil.distance(t,e)*Math.sin(SuperMapAlgoPlot.PlottingUtil.InnerAngle(e,t,i))},SuperMapAlgoPlot.PlottingUtil.paraPolygon=function(t,e,i){let o=[],l=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),s=l.length;if(s<2)return o;let n=new SuperMapAlgoPlot.Point(0,0);if(i){if(s<3)n=l[1].clone(),SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[0],Math.PI,n),o.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[0],n,e));else{let t=SuperMapAlgoPlot.PlottingUtil.radian(l[0],l[1]),i=SuperMapAlgoPlot.PlottingUtil.radian(l[0],l[l.length-1])-t;for(;i<0;)i+=2*Math.PI;let s,a=i/2;s=a>Math.PI/2?a-Math.PI/2:Math.PI/2-a;let r=e/Math.cos(s);n=l[1].clone(),n=SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[0],a,n),o.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[0],n,r))}for(let t=1;t<s-1;t++){let i=SuperMapAlgoPlot.PlottingUtil.radian(l[t],l[t+1]),s=SuperMapAlgoPlot.PlottingUtil.radian(l[t],l[t-1])-i;for(;s<0;)s+=2*Math.PI;let a,r=s/2;a=r>Math.PI/2?r-Math.PI/2:Math.PI/2-r;let p=e/Math.cos(a);n=l[t+1].clone(),n=SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[t],r,n),o.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[t],n,p))}if(s<3)n=l[s-2].clone(),SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[s-1],0,n),o.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[s-1],n,e));else{let t=SuperMapAlgoPlot.PlottingUtil.radian(l[s-1],l[0]),i=SuperMapAlgoPlot.PlottingUtil.radian(l[s-1],l[s-2])-t;for(;i<0;)i+=2*Math.PI;let a,r=i/2;a=r>Math.PI/2?r-Math.PI/2:Math.PI/2-r;let p=e/Math.cos(a);n=l[0].clone(),n=SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[s-1],r,n),o.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[s-1],n,p))}}else{if(s<3){let t=l[1].clone();SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[0],0,t),o.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[0],t,e))}else{let t=SuperMapAlgoPlot.PlottingUtil.radian(l[0],l[1]),i=SuperMapAlgoPlot.PlottingUtil.radian(l[0],l[s-1])-t;for(;i<0;)i+=2*Math.PI;let a,r=Math.PI-i/2;a=r>Math.PI/2?r-Math.PI/2:Math.PI/2-r;let p=e/Math.cos(a);n=l[s-1].clone(),n=SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[0],r,n),o.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[0],n,p))}for(let t=1;t<s-1;t++){let i=SuperMapAlgoPlot.PlottingUtil.radian(l[t],l[t+1]),s=SuperMapAlgoPlot.PlottingUtil.radian(l[t],l[t-1])-i;for(;s<0;)s+=2*Math.PI;let a,r=Math.PI-s/2;a=r>Math.PI/2?r-Math.PI/2:Math.PI/2-r;let p=e/Math.cos(a);n=l[t-1].clone(),n=SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[t],r,n),o.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[t],n,p))}if(s<3)n=l[s-2].clone(),SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[s-1],Math.PI,n),o.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[s-1],n,e));else{let t=SuperMapAlgoPlot.PlottingUtil.radian(l[s-1],l[0]),i=SuperMapAlgoPlot.PlottingUtil.radian(l[s-1],l[s-2])-t;for(;i<0;)i+=2*Math.PI;let a,r=Math.PI-i/2;a=r>Math.PI/2?r-Math.PI/2:Math.PI/2-r;let p=e/Math.cos(a);n=l[s-2].clone(),n=SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[s-1],r,n),o.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[s-1],n,p))}}return o},SuperMapAlgoPlot.PlottingUtil.getOutRectangleDis=function(t){if(2>t.length)return 0;let e=t[0].x,i=t[0].x,o=t[0].y,l=t[0].y;for(let s=1;s<t.length;s++)e<t[s].x&&(e=t[s].x),i>t[s].x&&(i=t[s].x),o<t[s].y&&(o=t[s].y),l>t[s].y&&(l=t[s].y);return SuperMapAlgoPlot.PlottingUtil.distance(new SuperMapAlgoPlot.Point(e,o),new SuperMapAlgoPlot.Point(i,l))},SuperMapAlgoPlot.PlottingUtil.clonePoints=function(t){let e=[];if(void 0===t||null===t)return e;if(SuperMapAlgoPlot.PlottingUtil.isArray(t)||(t=[t]),t&&null!=t)for(let i=0;i<t.length;i++)void 0!==t[i]&&null!==t[i]&&t[i].clone&&e.push(t[i].clone());return e},SuperMapAlgoPlot.PlottingUtil.extend=function(t,e){if("function"==typeof SuperMap.Util.extend)return SuperMap.Util.extend(t,e);if(t=t||{},e){for(let i in e){let o=e[i];void 0!==o&&(t[i]=o)}!("function"==typeof window.Event&&e instanceof window.Event)&&e.hasOwnProperty&&e.hasOwnProperty.call("toString")&&(t.toString=e.toString)}return t},SuperMapAlgoPlot.PlottingUtil.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},SuperMapAlgoPlot.PlottingUtil.indexOf=function(t,e){if(null==t)return-1;if("function"==typeof t.indexOf)return t.indexOf(e);for(let i=0,o=t.length;i<o;i++)if(t[i]===e)return i;return-1},SuperMapAlgoPlot.PlottingUtil.copyAttributes=function(t,e){if(t=t||{},e)for(let i in e){let o=e[i];void 0!==o&&"CLASS_NAME"!==i&&"function"!=typeof o&&(t[i]=o)}return t},SuperMapAlgoPlot.PlottingUtil.cloneObject=function(t){if(null===t||"object"!=typeof t)return t;if(t instanceof Date){let e=new Date;return e.setTime(t.getTime()),e}if(t instanceof Array){return t.slice(0)}if(t instanceof Object){let e={};for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=SuperMapAlgoPlot.PlottingUtil.cloneObject(t[i]));return e}throw new Error("Unable to copy obj! Its type isn't supported.")},SuperMapAlgoPlot.PlottingUtil.rad=function(t){return t*Math.PI/180},SuperMapAlgoPlot.PlottingUtil.deg=function(t){return 180*t/Math.PI},SuperMapAlgoPlot.PlottingUtil.VincentyConstants={a:6378137,b:6356752.3142,f:1/298.257223563},SuperMapAlgoPlot.PlottingUtil.distVincenty=function(t,e){var i,o,l,s=SuperMapAlgoPlot.PlottingUtil.VincentyConstants,n=s.a,a=s.b,r=s.f;"undefined"!=typeof L&&void 0!==L.LatLng&&t instanceof L.LatLng&&e instanceof L.LatLng?(i=SuperMapAlgoPlot.PlottingUtil.rad(e.lng-t.lng),o=Math.atan((1-r)*Math.tan(SuperMapAlgoPlot.PlottingUtil.rad(t.lat))),l=Math.atan((1-r)*Math.tan(SuperMapAlgoPlot.PlottingUtil.rad(e.lat)))):(i=SuperMapAlgoPlot.PlottingUtil.rad(e.lon-t.lon),o=Math.atan((1-r)*Math.tan(SuperMapAlgoPlot.PlottingUtil.rad(t.lat))),l=Math.atan((1-r)*Math.tan(SuperMapAlgoPlot.PlottingUtil.rad(e.lat))));for(var p=Math.sin(o),u=Math.cos(o),h=Math.sin(l),g=Math.cos(l),c=i,y=2*Math.PI,P=20;Math.abs(c-y)>1e-12&&--P>0;){var S=Math.sin(c),d=Math.cos(c),m=Math.sqrt(g*S*(g*S)+(u*h-p*g*d)*(u*h-p*g*d));if(0==m)return 0;var f=p*h+u*g*d,M=Math.atan2(m,f),b=Math.asin(u*g*S/m),A=Math.cos(b)*Math.cos(b),T=f-2*p*h/A,v=r/16*A*(4+r*(4-3*A));y=c,c=i+(1-v)*r*Math.sin(b)*(M+v*m*(T+v*f*(2*T*T-1)))}if(0==P)return NaN;var _=A*(n*n-a*a)/(a*a),x=_/1024*(256+_*(_*(74-47*_)-128));return(a*(1+_/16384*(4096+_*(_*(320-175*_)-768)))*(M-x*m*(T+x/4*(f*(2*T*T-1)-x/6*T*(4*m*m-3)*(4*T*T-3))))).toFixed(3)/1e3},SuperMapAlgoPlot.PlottingUtil.destinationVincenty=function(t,e,i){var o,l,s=SuperMapAlgoPlot.PlottingUtil,n=s.VincentyConstants,a=n.a,r=n.b,p=n.f;"undefined"!=typeof L&&void 0!==L.LatLng&&t instanceof L.LatLng?(o=t.lng,l=t.lat):(o=t.lon,l=t.lat);for(var u=i,h=s.rad(e),g=Math.sin(h),c=Math.cos(h),y=(1-p)*Math.tan(s.rad(l)),P=1/Math.sqrt(1+y*y),S=y*P,d=Math.atan2(y,c),m=P*g,f=1-m*m,M=f*(a*a-r*r)/(r*r),b=1+M/16384*(4096+M*(M*(320-175*M)-768)),A=M/1024*(256+M*(M*(74-47*M)-128)),T=u/(r*b),v=2*Math.PI;Math.abs(T-v)>1e-12;){var _=Math.cos(2*d+T),x=Math.sin(T),O=Math.cos(T);v=T,T=u/(r*b)+A*x*(_+A/4*(O*(2*_*_-1)-A/6*_*(4*x*x-3)*(4*_*_-3)))}var w=S*x-P*O*c,I=Math.atan2(S*O+P*x*c,(1-p)*Math.sqrt(m*m+w*w)),C=p/16*f*(4+p*(4-3*f)),E=Math.atan2(x*g,P*O-S*x*c)-(1-C)*p*m*(T+C*x*(_+C*O*(2*_*_-1)));return"undefined"!=typeof L&&void 0!==L.LatLng&&t instanceof L.LatLng?L.latLng(s.deg(I),o+s.deg(E)):new SuperMap.LonLat(o+s.deg(E),s.deg(I))},SuperMapAlgoPlot.PlottingUtil.midPoint=function(t,e){var i=new SuperMapAlgoPlot.Point(0,0);return i.x=.5*(t.x+e.x),i.y=.5*(t.y+e.y),i},SuperMapAlgoPlot.PlottingUtil.makeDottedLine=function(t,e){for(var i,o,l=[],s=e,n=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t),a=e,r=t[0].clone(),p=1,u=0,h=!0,g=!0;u<n;){var c;(o=[]).push(r),u+=s;var y=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(u,t);if(c=y.index,i=y.pts,!(h=y.bfind))break;if(p<c)for(let e=p;e<c;e++)o.push(t[e]);o.push(i),l.push(o),u+=a;var P=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(u,t);if(c=P.index,r=P.pts,p=c+1,!(g=P.bfind))break}if(!h){(o=[]).push(r);for(let e=p;e<t.length;e++)o.push(t[e]);2===o.length&&0===SuperMapAlgoPlot.PlottingUtil.distance(o[0],o[1])||l.push(o)}if(!g){var S=t[t.length-1],d=SuperMapAlgoPlot.PlottingUtil.distance(i,S);if(d*=.01,!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(d,0)){var m=SuperMapAlgoPlot.PlottingUtil.linePnt(S,i,d);(o=[]).push(m),o.push(S),l.push(o)}}return l};SuperMapAlgoPlot.Primitives=SuperMapAlgoPlot.Primitives||{};SuperMapAlgoPlot.Primitives={nSegmentCount:72,initialize:function(t){t&&t.nSegmentCount&&(this.nSegmentCount=t.nSegmentCount)},polyline:function(t){return t},parallelline:function(t){if(t&&t.length>=3){let e=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]);SuperMapAlgoPlot.PlottingUtil.isRight(t[0],t[1],t[2])&&(e=-e);let i=[];for(let e=1;e<t.length;e++)i.push(t[e].clone());let o=SuperMapAlgoPlot.PlottingUtil.parallel(i,e);return t[0].x=o[0].x,t[0].y=o[0].y,[i,o]}return[]},kidney:function(t,e){if(t){let i=[];return i=e?this.getKendyShapePts(t):t,SuperMapAlgoPlot.PlottingUtil.clearSamePts(i),i}},bezier:function(t,e){if(t){let i=[];return i=e?SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t):t,SuperMapAlgoPlot.PlottingUtil.clearSamePts(i),i}},loopbezier:function(t,e){if(t){t[0].x===t[t.length-1].x&&t[0].y===t[t.length-1].y||t.push(t[0]);let i=[];return i=e?SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t):t,SuperMapAlgoPlot.PlottingUtil.clearSamePts(i),i}},parallelogram:function(t){if(t&&t.length>=3){let e=t[0].x+(t[2].x-t[1].x),i=t[0].y+(t[2].y-t[1].y),o=new SuperMapAlgoPlot.Point(e,i),l=[];return l.push.apply(l,t),l.push(o),l.push(l[0]),l}},polygon:function(t){if(t&&t.length>2)return t},circle:function(t){if(t&&2===t.length){let e=t[0],i=t[1],o=[],l=Math.sqrt((i.x-e.x)*(i.x-e.x)+(i.y-e.y)*(i.y-e.y)),s=360/this.nSegmentCount;for(let t=0;t<this.nSegmentCount;t++){let i=(t*s+1)*Math.PI/180,n=new SuperMapAlgoPlot.Point(Math.cos(i)*l+e.x,Math.sin(i)*l+e.y);o[t]=n}return o}},rectangle:function(t){if(t&&2===t.length){let e=t[0],i=t[1],o=e.clone();return[o,new SuperMapAlgoPlot.Point(i.x,e.y),i.clone(),new SuperMapAlgoPlot.Point(e.x,i.y),o]}},sector:function(t){if(t&&t.length>=3){let e=this.getArcInfo(t[0],t[1],t[2]);e.dStartAngle*=Math.PI/180,e.dEndAngle*=Math.PI/180;let i=(e.dEndAngle-e.dStartAngle)/this.nSegmentCount,o=this.getArcSpatialData(e.pntCenter,e.dRadius,e.dRadius,0,e.dStartAngle,e.dEndAngle,i);if(o.push(e.pntCenter),0!==o.length)return o}},lune:function(t){if(t&&t.length>=3){let e=this.getArcInfo(t[0],t[1],t[2]);e.dStartAngle*=Math.PI/180,e.dEndAngle*=Math.PI/180;let i=(e.dEndAngle-e.dStartAngle)/this.nSegmentCount,o=this.getArcSpatialData(e.pntCenter,e.dRadius,e.dRadius,0,e.dStartAngle,e.dEndAngle,i);if(0!==o.length)return o}},arc:function(t){if(t&&t.length>=3){let e=this.getArcInfo(t[0],t[1],t[2]);e.dStartAngle*=Math.PI/180,e.dEndAngle*=Math.PI/180;let i=(e.dEndAngle-e.dStartAngle)/this.nSegmentCount,o=this.getArcSpatialData(e.pntCenter,e.dRadius,e.dRadius,0,e.dStartAngle,e.dEndAngle,i);if(0!==o.length)return o}},ellipse:function(t,e,i,o,l){if(!0===i){if((!o||null==o)&&t&&t.length>=3&&(o=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1])),(!l||null==l)&&t&&t.length>=3){let e=SuperMapAlgoPlot.PlottingUtil.projectPoint(t[2],t[0],t[1]);l=SuperMapAlgoPlot.PlottingUtil.distance(e,t[2])}}else l=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[2]),o=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]);if(e&&null!=e?e*=Math.PI/180:e=SuperMapAlgoPlot.PlottingUtil.radian(t[0],t[1]),t&&t.length>0){let s=0,n=2*Math.PI,a=n/this.nSegmentCount,r=this.getArcSpatialData(t[0],o,l,e,s,n,a);if(!0===i){let i=Math.sin(e),o=Math.cos(e);t[2].x>t[1].x?(t[2].x=t[0].x-l*i,t[2].y=t[0].y+l*o):(t[2].x=t[0].x+l*i,t[2].y=t[0].y-l*o)}return r}},getArcSpatialData:function(t,e,i,o,l,s,n){let a=[];if(Math.abs(n)<1e-9)return a;for(;s<l;)s+=2*Math.PI;for(;s>l+2*Math.PI;)l+=2*Math.PI;let r=Math.cos(o)*e,p=Math.sin(o)*e,u=Math.cos(o)*i,h=Math.sin(o)*i,g=this.calcEllipseRadian(l,e,i),c=this.calcEllipseRadian(s,e,i);c-g<1e-5&&(c+=2*Math.PI);let y=Math.round(Math.abs((c-g)/n)+1);if(y<2)return a;for(var P=0;P<y-1;g+=n,P++){P===y-2&&(g=s);let e=t.x+r*Math.cos(g)-h*Math.sin(g),i=t.y+p*Math.cos(g)+u*Math.sin(g);a.push(new SuperMapAlgoPlot.Point(e,i))}return 0>a.length&&(a[a.length-1].x=t.x+r*Math.cos(c)-h*Math.sin(c),a[a.length-1].y=t.y+p*Math.cos(c)+u*Math.sin(c)),a},getArcCircleSpatialData:function(t,e,i,o){let l=[];for(;o<i;)o+=2*Math.PI;for(;o>i+2*Math.PI;)i+=2*Math.PI;o-i<1e-10&&(o+=2*Math.PI);for(var s=(o-i)/50,n=i;n<o;n+=s){let i=t.x+e*Math.cos(n),o=t.y+e*Math.sin(n);l.push(new SuperMapAlgoPlot.Point(i,o))}let a=t.x+e*Math.cos(o),r=t.y+e*Math.sin(o);return l.push(new SuperMapAlgoPlot.Point(a,r)),l},getArcInfo:function(t,e,i){let o={};o.pntCenter=new SuperMapAlgoPlot.Point(0,0),o.dRadius=0,o.dStartAngle=0,o.dEndAngle=0;let l=e.x-t.x,s=e.y-t.y;if(Math.abs(l)<1e-9){let l={},s={};l.x=(e.x+t.x)/2,l.y=(e.y+t.y)/2,s.x=(e.x+i.x)/2,s.y=(e.y+i.y)/2;let n=0;Math.abs(i.x-e.x)>=1e-9&&(n=(i.y-e.y)/(i.x-e.x)),o.pntCenter.y=l.y,Math.abs(n)<1e-9?o.pntCenter.x=s.x:o.pntCenter.x=s.x-n*(l.y-s.y)}else{let n={},a={};n.x=(e.x+t.x)/2,n.y=(e.y+t.y)/2,a.x=(e.x+i.x)/2,a.y=(e.y+i.y)/2;let r=s/l,p=1;Math.abs(r)<1e-9?(o.pntCenter.x=n.x,Math.abs(i.x-e.x<1e-9)?o.pntCenter.y=a.y:o.pntCenter.y=-(i.x-e.x)/(i.y-e.y)*(o.pntCenter.x-a.x)+a.y):Math.abs(i.x-e.x)<1e-9?(o.pntCenter.y=a.y,o.pntCenter.x=-r*(o.pntCenter.y-n.y)+n.x):(p=(i.y-e.y)/(i.x-e.x),o.pntCenter.x=(r*p*(n.y-a.y)+p*n.x-r*a.x)/(p-r),o.pntCenter.y=(a.x-n.x+p*a.y-r*n.y)/(p-r))}let n=Math.atan2(t.y-o.pntCenter.y,t.x-o.pntCenter.x),a=Math.atan2(i.y-o.pntCenter.y,i.x-o.pntCenter.x);if(SuperMapAlgoPlot.PlottingUtil.isCounterClockwise(t,e,i)){for(;n>=2*Math.PI;)n-=2*Math.PI;for(;n<0;)n+=2*Math.PI;for(;a>2*Math.PI;)a-=2*Math.PI;for(;a<n;)a+=2*Math.PI}else{for(;a>=2*Math.PI;)a-=2*Math.PI;for(;a<0;)a+=2*Math.PI;for(;n>2*Math.PI;)n-=2*Math.PI;for(;a>n;)n+=2*Math.PI;let t=n;n=a,a=t}return o.dRadius=Math.sqrt((o.pntCenter.x-t.x)*(o.pntCenter.x-t.x)+(o.pntCenter.y-t.y)*(o.pntCenter.y-t.y)),o.dEndAngle=180*a/Math.PI,o.dStartAngle=180*n/Math.PI,o},calcEllipseRadian:function(t,e,i){let o=t,l=e*Math.sin(t),s=i*Math.cos(t),n=Math.atan2(l,s);if(t>Math.PI)for(;o>Math.PI;)o-=2*Math.PI,n+=2*Math.PI;else if(t<-Math.PI)for(;o<-Math.PI;)o+=2*Math.PI,n-=2*Math.PI;return n},getKendyShapePts:function(t){let e=[];if(2>(t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length)return e;let i=this.calcShapePoints(t);if(12!=i.length)return e;i.push(i[0]),i.push(i[1]),i.splice(0,1);for(let t=0;t<i.length-3;t+=3){let o=[];o=this.getBezierPtsWithScalePts(i[t],i[t+1],i[t+2],i[t+3]),e=e.concat(o)}return e},calcShapePoints:function(t){let e=[],i=[],o=t.length;if(0===o)return;if(1===o)return void e.push(t[0]);if(2==o){let e=this.calcProtudeC3(t[0],t[1]);i.push(t[0]),i.push(t[1]),i.push(e)}else if(i.push(t[0]),i.push(t[1]),i.push(t[2]),(SuperMapAlgoPlot.PlottingUtil.isSamePt(t[0],t[2])||SuperMapAlgoPlot.PlottingUtil.isSamePt(t[1],t[2]))&&(e.push(t[0]),e.push(t[1])),SuperMapAlgoPlot.PlottingUtil.isSamePt(t[0],t[1]))return e.push(t[0]),void e.push(t[2]);i=this.reNormalizeKidneyCtrlPoints(i);let l=new SuperMapAlgoPlot.Point(0,0),s=new SuperMapAlgoPlot.Point(0,0);l.x=.5*(i[0].x+i[1].x),l.y=.5*(i[0].y+i[1].y),s.x=l.x-.1*(i[2].x-l.x),s.y=l.y-.1*(i[2].y-l.y);let n=this.GetPtsByTriangle(3,0,i[1],i[0],s);e.push(n.pr),e.push(s),e.push(n.pl);let a=this.GetPtsByTriangle(4,2,i[2],i[0],i[1]);e.push(a.pr),e.push(i[1]),e.push(a.pl);let r=this.GetPtsByTriangle(2,0,i[0],i[1],i[2]);e.push(r.pr),e.push(i[2]),e.push(r.pl);let p=this.GetPtsByTriangle(4,1,i[1],i[2],i[0]);return e.push(p.pr),e.push(i[0]),e.push(p.pl),e},calcProtudeC3:function(t,e){let i=new SuperMapAlgoPlot.Point(0,0),o=0;return i.x=.5*(t.x+e.x),i.y=.5*(t.y+e.y),o=SuperMapAlgoPlot.PlottingUtil.distance(e,t)/2.7,this.GetPointsOfNormal(o,t,i).pt3},GetPointsOfNormal:function(t,e,i){let o=new SuperMapAlgoPlot.Point(0,0),l=new SuperMapAlgoPlot.Point(0,0),s=new SuperMapAlgoPlot.Point(0,0),n=0;return 0==(n=SuperMapAlgoPlot.PlottingUtil.distance(e,i))?(s.y=0,s.x=t):(s.x=t*(e.x-i.x)/n,s.y=t*(e.y-i.y)/n),o.x=-s.y+i.x,o.y=s.x+i.y,l.x=s.y+i.x,l.y=-s.x+i.y,{pt3:o,pt4:l}},reNormalizeKidneyCtrlPoints:function(t){let e=[];e.push(new SuperMapAlgoPlot.Point(0,0)),e.push(new SuperMapAlgoPlot.Point(0,0)),e.push(new SuperMapAlgoPlot.Point(0,0));let i=t.length;if(i<2)return e;if(2==i)e[0]=t[0],e[1]=t[1],e[2]=this.calcProtudeC3(t[0],t[1]);else{let i=t[0],o=t[1],l=t[2],s=0,n=0,a=0;if(s=SuperMapAlgoPlot.PlottingUtil.distance(o,i),n=SuperMapAlgoPlot.PlottingUtil.distance(l,o),a=SuperMapAlgoPlot.PlottingUtil.distance(i,l),n>=s&&n>=a){let t=i.clone();i=l.clone(),l=t.clone()}else if(a>=s&&a>=n){let t=l.clone();l=o.clone(),o=t.clone()}if(!SuperMapAlgoPlot.PlottingUtil.isRight(l,i,o)){let t=i.clone();i=o.clone(),o=t.clone()}e[0]=i,e[1]=o,e[2]=l}return e},GetPtsByTriangle:function(t,e,i,o,l){let s=new SuperMapAlgoPlot.Point(0,0),n=0,a=0;return n=SuperMapAlgoPlot.PlottingUtil.distance(l,i),a=SuperMapAlgoPlot.PlottingUtil.distance(o,l),1==e&&(n*=2),2==e&&(a*=2),s.x=(n*o.x+a*i.x)/(n+a),s.y=(n*o.y+a*i.y)/(n+a),{pl:this.GetWhichPtOfNormal(t,i,s,l),pr:this.GetWhichPtOfNormal(t,o,s,l)}},GetWhichPtOfNormal:function(t,e,i,o){let l,s=0,n=0;n=SuperMapAlgoPlot.PlottingUtil.distance(o,e)/t;let a=this.GetPointsOfNormal(n,i,o);return l=(s=SuperMapAlgoPlot.PlottingUtil.distance(e,a.pt4))>=(n=SuperMapAlgoPlot.PlottingUtil.distance(e,a.pt3))?a.pt3:a.pt4},getBezierPtsWithScalePts:function(t,e,i,o){let l=[],s=t.x,n=t.y,a=e.x,r=e.y,p=i.x,u=i.y,h=o.x,g=o.y;if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(s,a,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(n,r,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(p,h,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(u,g,1e-10))l.push(new SuperMapAlgoPlot.Point(s,n)),l.push(new SuperMapAlgoPlot.Point(p,u));else for(let t=0;t<=1;t+=.03125){let e,i,o,c,y=t*t,P=y*t;e=1-3*t+3*y-P,i=3*(t-2*y+P),o=3*(y-P),c=P;let S=new SuperMapAlgoPlot.Point(e*s+i*a+o*p+c*h,e*n+i*r+o*u+c*g);l.push(S)}return l},getSpatialData:function(t,e,i,o){switch(null==o&&(o=!0),t){case 24:return this.polyline(e);case 390:return this.kidney(e,o);case 590:return this.bezier(e,o);case 360:return this.loopbezier(e,o);case 28:return this.parallelogram(e);case 32:return this.polygon(e);case 29:return this.circle(e);case 26:return this.rectangle(e);case 380:return this.sector(e);case 370:return this.lune(e);case 44:return this.arc(e);case 31:return this.ellipse(e,i,o);case 48:return this.parallelline(e);default:return e}}};SuperMapAlgoPlot.RouteNodePrimitives=SuperMapAlgoPlot.RouteNodePrimitives||{};SuperMapAlgoPlot.RouteNodePrimitives={initialize:function(){},rendezvousPoint:function(){let t=[],e=new Object;e.type=SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),e.positionPoints.push(new SuperMapAlgoPlot.Point(0,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};let i=new Object;return i.type=SuperMapAlgoPlot.SymbolType.TEXTSYMBOL,i.positionPoints=[],i.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),i.textContent="会",i.style={surroundLineFlag:!1,fontSize:14,fontSizeLimit:!0},i.style.labelAlign="cm",t.push(i),t.push(e),t},expandingPoint:function(){let t=[],e=new Object;e.type=SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),e.positionPoints.push(new SuperMapAlgoPlot.Point(0,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};let i=new Object;return i.type=SuperMapAlgoPlot.SymbolType.TEXTSYMBOL,i.positionPoints=[],i.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),i.textContent="展",i.style={surroundLineFlag:!1,fontSize:14,fontSizeLimit:!0},i.style.labelAlign="cm",t.push(i),t.push(e),t},volleyPoint:function(){let t=[],e=new Object;e.type=SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),e.positionPoints.push(new SuperMapAlgoPlot.Point(0,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};let i=new Object;return i.type=SuperMapAlgoPlot.SymbolType.TEXTSYMBOL,i.positionPoints=[],i.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),i.textContent="齐",i.style={surroundLineFlag:!1,fontSize:14,fontSizeLimit:!0},i.style.labelAlign="cm",t.push(i),t.push(e),t},standbyPoint_Outer:function(t,e){let i=[],o=new SuperMapAlgoPlot.Point(0,0),l=new SuperMapAlgoPlot.Point(0,30);t||(t=90);let s=new Object;s.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,s.positionPoints=[];for(let e=t+10;e<170+t;e+=10){let t=SuperMapAlgoPlot.PlottingUtil.findPoint(o,l,30,e);s.positionPoints.push(t)}s.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},i.push(s);let n=s.positionPoints[s.positionPoints.length-1],a=s.positionPoints[s.positionPoints.length-2],r=SuperMapAlgoPlot.PlottingUtil.findPoint(n,a,9,22.5),p=SuperMapAlgoPlot.PlottingUtil.findPoint(n,a,9,-22.5),u=new Object;u.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,u.positionPoints=[],u.positionPoints.push(r),u.positionPoints.push(n.clone()),u.positionPoints.push(p),u.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},i.push(u);let h=new Object;h.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,h.positionPoints=[];for(let e=190+t;e<350+t;e+=10){let t=SuperMapAlgoPlot.PlottingUtil.findPoint(o,l,30,e);h.positionPoints.push(t)}h.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},i.push(h);let g=h.positionPoints[h.positionPoints.length-1],c=h.positionPoints[h.positionPoints.length-2],y=SuperMapAlgoPlot.PlottingUtil.findPoint(g,c,9,22.5),P=SuperMapAlgoPlot.PlottingUtil.findPoint(g,c,9,-22.5),S=new Object;S.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,S.positionPoints=[],S.positionPoints.push(y),S.positionPoints.push(g.clone()),S.positionPoints.push(P),S.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},i.push(S);for(let t=0;t<i.length;t++)for(let l=0;l<i[t].positionPoints.length;l++){let s=e*(Math.PI/180);SuperMapAlgoPlot.PlottingUtil.rotateAngle(o,s,i[t].positionPoints[l])}return i},standbyPoint_Inner:function(){let t=[],e=new Object;e.type=SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(-20,0)),e.positionPoints.push(new SuperMapAlgoPlot.Point(20,10)),e.positionPoints.push(new SuperMapAlgoPlot.Point(20,-10)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(e);let i=new Object;i.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,i.positionPoints=[],i.positionPoints.push(new SuperMapAlgoPlot.Point(-5,0)),i.positionPoints.push(new SuperMapAlgoPlot.Point(17,0)),i.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(i);let o=new Object;return o.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,o.positionPoints=[],o.positionPoints.push(new SuperMapAlgoPlot.Point(-2,1.5)),o.positionPoints.push(new SuperMapAlgoPlot.Point(-5,0)),o.positionPoints.push(new SuperMapAlgoPlot.Point(-2,-1.5)),o.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(o),t},supplyPoint:function(){let t=[],e=new Object;e.type=SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),e.positionPoints.push(new SuperMapAlgoPlot.Point(0,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};let i=new Object;return i.type=SuperMapAlgoPlot.SymbolType.TEXTSYMBOL,i.positionPoints=[],i.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),i.textContent="补",i.style={surroundLineFlag:!1,fontSize:14,fontSizeLimit:!0},i.style.labelAlign="cm",t.push(i),t.push(e),t},takeoffPoint:function(){let t=[],e=new Object;return e.type=SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(-15,25)),e.positionPoints.push(new SuperMapAlgoPlot.Point(15,25)),e.positionPoints.push(new SuperMapAlgoPlot.Point(15,-25)),e.positionPoints.push(new SuperMapAlgoPlot.Point(0,-35)),e.positionPoints.push(new SuperMapAlgoPlot.Point(-15,-25)),e.positionPoints.push(new SuperMapAlgoPlot.Point(-15,25)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(e),t},initialPoint:function(){let t=[],e=new Object;return e.type=SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(-30,30)),e.positionPoints.push(new SuperMapAlgoPlot.Point(30,30)),e.positionPoints.push(new SuperMapAlgoPlot.Point(30,-30)),e.positionPoints.push(new SuperMapAlgoPlot.Point(-30,-30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(e),t},visualInitalPoint:function(){let t=[],e=new Object;return e.type=SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,30)),e.positionPoints.push(new SuperMapAlgoPlot.Point(30,0)),e.positionPoints.push(new SuperMapAlgoPlot.Point(0,-30)),e.positionPoints.push(new SuperMapAlgoPlot.Point(-30,0)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(e),t},lanchPoint:function(){let t=[],e=new Object;return e.type=SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,30)),e.positionPoints.push(new SuperMapAlgoPlot.Point(20,-30)),e.positionPoints.push(new SuperMapAlgoPlot.Point(-20,-30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(e),t},turningPoint:function(){let t=[],e=new Object;return e.type=SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),e.positionPoints.push(new SuperMapAlgoPlot.Point(0,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(e),t},aimingPoint:function(){let t=[],e=new Object;return e.type=SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,-30)),e.positionPoints.push(new SuperMapAlgoPlot.Point(20,30)),e.positionPoints.push(new SuperMapAlgoPlot.Point(-20,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(e),t},targetPoint:function(){let t=[],e=new Object;return e.type=SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,30)),e.positionPoints.push(new SuperMapAlgoPlot.Point(30,-30)),e.positionPoints.push(new SuperMapAlgoPlot.Point(-30,-30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(e),t},eightSpiralPoint:function(){let t=[],e=new Object;e.type=SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(30,0)),e.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};let i=new Object;return i.type=SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,i.positionPoints=[],i.positionPoints.push(new SuperMapAlgoPlot.Point(-30,0)),i.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),i.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(e),t.push(i),t},happyValleyPoint:function(){let t=[],e=new Object;e.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(-30,20)),e.positionPoints.push(new SuperMapAlgoPlot.Point(30,20)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};let i=new Object;i.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,i.positionPoints=[],i.positionPoints.push(new SuperMapAlgoPlot.Point(30,-20)),i.positionPoints.push(new SuperMapAlgoPlot.Point(-30,-20)),i.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};let o=new Object;o.type=SuperMapAlgoPlot.SymbolType.ARCSYMBOL,o.positionPoints=[],o.positionPoints.push(new SuperMapAlgoPlot.Point(-30,20)),o.positionPoints.push(new SuperMapAlgoPlot.Point(-50,0)),o.positionPoints.push(new SuperMapAlgoPlot.Point(-30,-20)),o.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};let l=new Object;return l.type=SuperMapAlgoPlot.SymbolType.ARCSYMBOL,l.positionPoints=[],l.positionPoints.push(new SuperMapAlgoPlot.Point(30,20)),l.positionPoints.push(new SuperMapAlgoPlot.Point(50,0)),l.positionPoints.push(new SuperMapAlgoPlot.Point(30,-20)),l.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(e),t.push(i),t.push(o),t.push(l),t},attackPoint:function(){let t=[],e=new Object;e.type=SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),e.positionPoints.push(new SuperMapAlgoPlot.Point(0,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};let i=new Object;return i.type=SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,i.positionPoints=[],i.positionPoints.push(new SuperMapAlgoPlot.Point(0,20)),i.positionPoints.push(new SuperMapAlgoPlot.Point(20,-20)),i.positionPoints.push(new SuperMapAlgoPlot.Point(-20,-20)),i.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(i),t.push(e),t},suppressPoint:function(){let t=[],e=new Object;e.type=SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),e.positionPoints.push(new SuperMapAlgoPlot.Point(0,30)),e.style={surroundLineFlag:!1,fontSize:14};let i=new Object;return i.type=SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,i.positionPoints=[],i.positionPoints.push(new SuperMapAlgoPlot.Point(-15,15)),i.positionPoints.push(new SuperMapAlgoPlot.Point(15,15)),i.positionPoints.push(new SuperMapAlgoPlot.Point(15,-15)),i.positionPoints.push(new SuperMapAlgoPlot.Point(-15,-15)),i.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(i),t.push(e),t},getRouteNodeCells:function(t,e,i){switch(t){case SuperMapAlgoPlot.RouteNodeType.RENDEZVOUS:return this.rendezvousPoint();case SuperMapAlgoPlot.RouteNodeType.EXPANDING:return this.expandingPoint();case SuperMapAlgoPlot.RouteNodeType.VOLLEY:return this.volleyPoint();case SuperMapAlgoPlot.RouteNodeType.STANDBY:return e?this.standbyPoint_Inner():this.standbyPoint_Outer(null,i);case SuperMapAlgoPlot.RouteNodeType.SUPPLY:return this.supplyPoint();case SuperMapAlgoPlot.RouteNodeType.TAKEOFF:return this.takeoffPoint();case SuperMapAlgoPlot.RouteNodeType.INITIAL:return this.initialPoint();case SuperMapAlgoPlot.RouteNodeType.VISUALINITAL:return this.visualInitalPoint();case SuperMapAlgoPlot.RouteNodeType.LANCH:case SuperMapAlgoPlot.RouteNodeType.WEAPONLAUNCH:return this.lanchPoint();case SuperMapAlgoPlot.RouteNodeType.TURNING:case SuperMapAlgoPlot.RouteNodeType.COMMONROUTE:return this.turningPoint();case SuperMapAlgoPlot.RouteNodeType.AIMING:return this.aimingPoint();case SuperMapAlgoPlot.RouteNodeType.TARGET:return this.targetPoint();case SuperMapAlgoPlot.RouteNodeType.ATTACK:return this.attackPoint();case SuperMapAlgoPlot.RouteNodeType.SUPPRESS:return this.suppressPoint();case SuperMapAlgoPlot.RouteNodeType.EIGHTSPIRAL:return this.eightSpiralPoint();case SuperMapAlgoPlot.RouteNodeType.HAPPYVALLEY:return this.happyValleyPoint();default:return[]}},getRouteNodeNameByType:function(t){switch(t){case SuperMapAlgoPlot.RouteNodeType.RENDEZVOUS:return"会合点";case SuperMapAlgoPlot.RouteNodeType.EXPANDING:return"展开点";case SuperMapAlgoPlot.RouteNodeType.VOLLEY:return"齐射点";case SuperMapAlgoPlot.RouteNodeType.STANDBY:return"待机点";case SuperMapAlgoPlot.RouteNodeType.SUPPLY:return"补给点";case SuperMapAlgoPlot.RouteNodeType.TAKEOFF:return"起飞点";case SuperMapAlgoPlot.RouteNodeType.INITIAL:return"初始点";case SuperMapAlgoPlot.RouteNodeType.VISUALINITAL:return"可视化初始点";case SuperMapAlgoPlot.RouteNodeType.LANCH:return"发射点";case SuperMapAlgoPlot.RouteNodeType.WEAPONLAUNCH:return"武器发射点";case SuperMapAlgoPlot.RouteNodeType.TURNING:return"转弯点";case SuperMapAlgoPlot.RouteNodeType.COMMONROUTE:return"普通航路点";case SuperMapAlgoPlot.RouteNodeType.AIMING:return"目标瞄准点";case SuperMapAlgoPlot.RouteNodeType.TARGET:return"目标点";case SuperMapAlgoPlot.RouteNodeType.ATTACK:return"攻击点";case SuperMapAlgoPlot.RouteNodeType.SUPPRESS:return"压制点";case SuperMapAlgoPlot.RouteNodeType.EIGHTSPIRAL:return"八字盘旋点";case SuperMapAlgoPlot.RouteNodeType.HAPPYVALLEY:return"跑马圈点";default:return""}}};SuperMapAlgoPlot.AddPoint_WayType={UNKNOWN:0,POLYLINE:1,CURVE:2,CURVE_WITHCONTROLPT:3,POLYLINE_CLOSE:4,CURVE_CLOSE:5};SuperMapAlgoPlot.Path2D=class{constructor(){this.m_pData=null,this.CLASS_NAME="SuperMapAlgoPlot.Path2D"}MoveTo(t){this.ensureData(),this.detach();var e=this.getDataPtr();if(e.require_StartNewFigure=!1,0==e.elements[e.elements.length-1].GetType())e.elements[e.elements.length-1].SetPosition(t.x,t.y);else{var i=new SuperMapAlgoPlot.Element(t.x,t.y,0);e.elements.push(i)}e.cStart=e.elements.length-1}LineTo(t){this.ensureData(),this.detach();var e=this.getDataPtr();if(e.MaybeStartNewFigure(),e.elements[e.elements.length-1].GetX()!=t.x||e.elements[e.elements.length-1].GetY()!=t.y){var i=new SuperMapAlgoPlot.Element(t.x,t.y,1);e.elements.push(i)}}CurveTo(t,e,i){this.ensureData(),this.detach();var o=this.getDataPtr();if(o.elements[o.elements.length-1].GetX()!=t.x||o.elements[o.elements.length-1].GetY()!=t.y||t.x!=e.x||t.y!=e.y||e.x!=i.x||e.y!=i.y){o.MaybeStartNewFigure();var l=new SuperMapAlgoPlot.Element(t.x,t.y,2),s=new SuperMapAlgoPlot.Element(e.x,e.y,3),n=new SuperMapAlgoPlot.Element(i.x,i.y,3);o.elements.push(l),o.elements.push(s),o.elements.push(n)}}CubicTo(t,e,i){this.ensureData(),this.detach();var o=this.getDataPtr();if(o.elements[o.elements.length-1].GetX()!=t.x||o.elements[o.elements.length-1].GetY()!=t.y||t.x!=e.x||t.y!=e.y||e.x!=i.x||e.y!=i.y){o.MaybeStartNewFigure();var l=new SuperMapAlgoPlot.Element(t.x,t.y,2),s=new SuperMapAlgoPlot.Element(e.x,e.y,3),n=new SuperMapAlgoPlot.Element(i.x,i.y,3);o.elements.push(l),o.elements.push(s),o.elements.push(n)}}ToSubPathPolygons(t){var e,i,o=this.getDataPtr();if(this.IsEmpty())return!1;var l=[],s=this.GetElementCount();for(let M=0;M<s;M++){var n=o.elements[M];switch(n.GetType()){case 0:l.length>1&&t.push(l),l=[],e=n.GetX(),i=n.GetY(),l.push(new SuperMapAlgoPlot.Point(e,i));break;case 1:e=n.GetX(),i=n.GetY(),l.push(new SuperMapAlgoPlot.Point(e,i));break;case 2:if(3!=o.elements[M+1].GetType()||3!=o.elements[M+1].GetType())break;var a=o.elements[M-1].GetX(),r=o.elements[M-1].GetY(),p=n.GetX(),u=n.GetY(),h=o.elements[M+1].GetX(),g=o.elements[M+1].GetY(),c=o.elements[M+2].GetX(),y=o.elements[M+2].GetY();for(let t=0;t<=1;t+=.03125){var P=t*t,S=P*t,d=1-3*t+3*P-S,m=3*(t-2*P+S),f=3*(P-S),L=S;l.push(new SuperMapAlgoPlot.Point(d*a+m*p+f*h+L*c,d*r+m*u+f*g+L*y))}M+=2}}return l.length>1&&t.push(l),!0}ensureData(){null==this.m_pData&&this.ensureData_helper()}ensureData_helper(){var t=new SuperMapAlgoPlot.Path2DData,e=new SuperMapAlgoPlot.Element(0,0,0);t.elements.push(e),null==this.m_pData||this.mtDeRef(this.m_pData.ref)||(this.m_pData=null),this.m_pData=t}detach(){1!=this.m_pData.ref&&this.detach_helper(),this.setBoundsDirty(!0)}detach_helper(){var t=new SuperMapAlgoPlot.Path2DData;null==this.m_pData||this.mtDeRef(this.m_pData.ref)||(this.m_pData=null),this.m_pData=t}setBoundsDirty(t){this.getDataPtr().isBoundsDirty=t}getDataPtr(){return this.m_pData}IsEmpty(){if(null==this.m_pData)return!0;var t=this.m_pData.elements.length;return 0==t||1==t&&0==this.m_pData.elements[0].GetType()}GetElementCount(){return null!=this.m_pData?this.m_pData.elements.length:0}static mtRef(t){return 0!=++t}static mtDeRef(t){return 0!=--t}};SuperMapAlgoPlot.Element=class{constructor(t,e,i){this.m_x=t,this.m_y=e,this.m_type=i,this.CLASS_NAME="SuperMapAlgoPlot.Element"}GetX(){return this.m_x}GetY(){return this.m_y}GetType(){return this.m_type}GetPosition(){return SuperMapAlgoPlot.Point(this.m_x,this.m_y)}SetPosition(t,e){this.m_x=t,this.m_y=e}SetType(t){this.m_type=t}IsCurveTo(){return 2==this.m_type}IsLineTo(){return 1==this.m_type}IsMoveTo(){return 0==this.m_type}Equal(t){return SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.m_x,t.m_x,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.m_y,t.m_y,1e-10)&&this.m_type==t.m_type}clone(){return new SuperMapAlgoPlot.Path2D.Element(this.m_x,this.m_y,this.m_type)}};SuperMapAlgoPlot.Path2DData=class{constructor(t){if(t){this.cStart=t.cStart,this.fillRule=t.fillRule,this.require_StartNewFigure=t.require_StartNewFigure,this.isBoundsDirty=t.isBoundsDirty,this.bounds=new SuperMap.Bounds(t.bounds.left,t.bounds.bottom,t.bounds.right,t.bounds.top),this.ref=1,this.elements=[];for(let e=0;e<t.elements.length;e++)this.elements.push(t.elements[e].clone())}else this.ref=1,this.bounds=new SuperMap.Bounds(0,0,0,0),this.elements=[];this.CLASS_NAME="SuperMapAlgoPlot.Path2DData"}IsClosed(){var t=this.elements[this.cStart],e=this.elements[this.elements.length-1];return t.GetX()==e.GetX()&&t.GetY()==e.GetY()}Close(){this.require_StartNewFigure=!0;var t=this.elements[this.cStart],e=this.elements[this.elements.length-1];t!=e&&(t.Equal(e)?e.SetPosition(t.GetX(),t.GetY()):this.elements.push(new SuperMapAlgoPlot.Element(t.GetX(),t.GetY(),SuperMapAlgoPlot.ElementType.LineToElement)))}MaybeStartNewFigure(){if(this.require_StartNewFigure){var t=this.elements[this.elements.length-1].clone();t.SetType(0),this.elements.push(t),this.require_StartNewFigure=!1}}};SuperMapAlgoPlot.ArrowToolkit=SuperMapAlgoPlot.ArrowToolkit||{};SuperMapAlgoPlot.ArrowToolkit.ConstValue={MAX_ARRAY_SIZE:128,sv_AtScaleParameter:1.5,sv_AtLenDivAtWidth:1.35,sv_AtWidthDivAwWidth:.5,DUOJIANTOU_TAIL_RATE_1:8,DUOJIANTOU_TAIL_RATE_2:3,DUOJIANTOU_TAIL_RATE_3:.6},SuperMapAlgoPlot.ArrowToolkit.ArrowTailType={ARROWTAIL_NONE:0,ARROWTAIL_LINE:1,ARROWTAIL_CURVE:2,ARROWTAIL_COATTAIL:3,ARROWTAIL_COATTAIL_POLYBODY:4},SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType={ARROWHEAD_POLYLINE:0,ARROWHEAD_TRIANGLE:1,ARROWHEAD_COATTAIL:2,ARROWHEAD_TRIANGLE_SOLID:3,ARROWHEAD_COATTAIL_HOLLOW:6,ARROWHEAD_WITH_EAR:4,ARROWHEAD_WITHOUT_EAR:5},SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType={ARROWBODY_POLYLINE:0,ARROWBODY_POLYBEZIER:1,ARROWBODY_COATTAIL:5,ARROWBODY_PARALLEL:2,ARROWBODY_TRAPEZOID:3,ARROWBODY_MULTIPOLYBEZIER:4},SuperMapAlgoPlot.ArrowToolkit.parallel=function(t,e){var i={leftParallelPts:[],rightParallelPts:[]};return 1===t.length||2===t.length&&t[0].x===t[1].x&&t[0].y===t[1].y?i:(i.leftParallelPts=SuperMapAlgoPlot.PlottingUtil.parallel(t,e),i.rightParallelPts=SuperMapAlgoPlot.PlottingUtil.parallel(t,-e),i)},SuperMapAlgoPlot.ArrowToolkit.trapezoid=function(t,e,i){var o={leftParallelPts:[],rightParallelPts:[]};if(1===t.length||2===t.length&&t[0].x===t[1].x&&t[0].y===t[1].y)return o;for(let s=0;s<t.length-1;s++){t[s].x===t[s+1].x&&t[s].y===t[s+1].y&&(o.leftParallelPts.push(o.leftParallelPts[o.leftParallelPts.length-1]),o.rightParallelPts.push(o.rightParallelPts[o.rightParallelPts.length-1]));var l=t[s+1];l=SuperMapAlgoPlot.PlottingUtil.rotate(t[s],0,1,l),o.leftParallelPts.push(SuperMapAlgoPlot.PlottingUtil.findPointInLine(t[s],l,e)),l=t[s],l=SuperMapAlgoPlot.PlottingUtil.rotate(t[s+1],0,-1,l),o.leftParallelPts.push(SuperMapAlgoPlot.PlottingUtil.findPointInLine(t[s+1],l,i)),l=t[s+1],l=SuperMapAlgoPlot.PlottingUtil.rotate(t[s],0,-1,l),o.rightParallelPts.push(SuperMapAlgoPlot.PlottingUtil.findPointInLine(t[s],l,e)),l=t[s],l=SuperMapAlgoPlot.PlottingUtil.rotate(t[s+1],0,1,l),o.rightParallelPts.push(SuperMapAlgoPlot.PlottingUtil.findPointInLine(t[s+1],l,i))}return o},SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePts=function(t,e,i){var o={};switch(t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts,i){case SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_PARALLEL:case SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_TRAPEZOID:var l=e[0],s=e[1],n=e[2],a=SuperMapAlgoPlot.PlottingUtil.equalFuzzy(n,0);if(!a&&t.length>2){var r=t.length;t.splice(2,r-2)}var p=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t);o.arrowTouLen=p*l;var u=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(t,p-o.arrowTouLen).pt,h=[],g=o.arrowTouLen*n,c=o.arrowTouLen*s,y=t.length-1;for(let e=0;e<y;e++)h.push(t[e]);h.push(u);var P={leftParallelPts:[],rightParallelPts:[]};P=!0===a?SuperMapAlgoPlot.ArrowToolkit.parallel(h,c):SuperMapAlgoPlot.ArrowToolkit.trapezoid(h,g,c);var S=t[t.length-1];t[t.length-1]=u,t.push(S);o.leftBodyPts=P.leftParallelPts,o.rightBodyPts=P.rightParallelPts,o.OpectrlPoints=null;break;case SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_MULTIPOLYBEZIER:{var d=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t);if(0==d)return;let i=SuperMapAlgoPlot.ArrowToolkit.OperateCtrlPts(t);var m=i.length;m--;var f=SuperMapAlgoPlot.ArrowToolkit.generateMultiBezier(i,m,e,d);t=[];for(let e=0;e<i.length;e++)t.push(i[e]);o.arrowTouLen=f.arrowTouLen,o.leftBodyPts=f.leftBodyPts,o.rightBodyPts=f.rightBodyPts,o.OpectrlPoints=i}}return t=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(t),o.leftBodyPts=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(o.leftBodyPts),o.rightBodyPts=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(o.rightBodyPts),o.OpectrlPoints=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(o.OpectrlPoints),o},SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone=function(t){var e=!0,i=[];if(t.length<=1)return{pts:t,isEast:e};var o=!1;if(void 0!==t[t.length-1].z&&(o=!0),!o)return{pts:t,isEast:e};for(let e=0;e<t.length;e++){let o=new Cesium.PlotPoint3D(t[e].x,t[e].y,t[e].z);i.push(o)}var l=SuperMapAlgoPlot.PlottingUtil.clonePoints(i);let s=[],n=[];for(let t=0;t<l.length-1;t++)l[t+1].x-l[0].x>-360&&l[t+1].x-l[0].x<-180&&s.push(t+1),l[t+1].x-l[0].x<360&&l[t+1].x-l[0].x>180&&n.push(t+1);if(n.length>s.length){for(let t=0;t<n.length;t++)l[n[t]].x=l[n[t]].x-360;e=!1}else{for(let t=0;t<s.length;t++)l[s[t]].x=l[s[t]].x+360;e=!0}return{pts:l,isEast:e}},SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone=function(t){if(null===t||t.length<=1)return t;var e=!1;if(void 0!==t[0].z&&(e=!0),!e)return t;var i=[];for(let e=0;e<t.length;e++){let o=new Cesium.PlotPoint3D(t[e].x,t[e].y,t[e].z);i.push(o)}var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(i);for(let t=0;t<o.length;t++)o[t].x>180?o[t].x=o[t].x-360:o[t].x<-180&&(o[t].x=o[t].x+360);return o},SuperMapAlgoPlot.ArrowToolkit.eastCrossZone=function(t){var e=!1;if(void 0!==t[0].z&&(e=!0),!e)return t;var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(t);for(let t=0;t<i.length;t++)i[t].x<0&&i[t].x>-180&&(i[t].x=i[t].x+360);return i},SuperMapAlgoPlot.ArrowToolkit.westCrossZone=function(t){var e=!1;if(void 0!==t[0].z&&(e=!0),!e)return t;var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(t);for(let t=0;t<i.length;t++)i[t].x>0&&i[t].x<180&&(i[t].x=i[t].x-360);return i},SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePts=function(t,e,i,o,l){var s=[];switch(t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts,e=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(e).pts,l){case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITH_EAR:case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITHOUT_EAR:var n=i[0],a=i[1],r=0,p=0;3==i.length&&(r=i[2]),4==i.length&&(r=i[2],p=i[3]);var u=0;if(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(r,0)&&!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(p,0)){var h=SuperMapAlgoPlot.PlottingUtil.clonePoints(t);h.splice(h.length-1,1),u=SuperMapAlgoPlot.PlottingUtil.polylineDistance(h)*r*p}var g=new SuperMapAlgoPlot.Point((e[0].x+e[1].x)/2,(e[0].y+e[1].y)/2);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(a,0)){var c=o*n,y=t[t.length-1];return y=SuperMapAlgoPlot.PlottingUtil.rotate(g,0,1,y),s.push(SuperMapAlgoPlot.PlottingUtil.findPointInLine(g,y,c)),s.push(t[t.length-1]),y=t[t.length-1],y=SuperMapAlgoPlot.PlottingUtil.rotate(g,0,-1,y),s.push(SuperMapAlgoPlot.PlottingUtil.findPointInLine(g,y,c)),t=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(t),s=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(s)}var P=o*a,S=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(P,g,t[t.length-1]);P=o*n,P+=u;var d=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(P,t[t.length-1],S),m=d.pntLeft,f=d.pntRight,L=t[t.length-1];return s.push(f),s.push(L),s.push(m),t=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(t),s=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(s)}},SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine=function(t,e,i,o){var l=[];if(2>t.length)return l;t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts;var s,n=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t),a=SuperMapAlgoPlot.PlottingUtil.equalFuzzy(e,0);switch(i){case SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYLINE:l=l.concat(t),o&&!a&&SuperMapAlgoPlot.PlottingUtil.distance(t[t.length-1],t[t.length-2])>e&&(s=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(t,n-e),l.splice(l.length-1,1),l.push(s.pt));break;case SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYBEZIER:if(2==t.length)l=l.concat(t),o&&!a&&SuperMapAlgoPlot.PlottingUtil.distance(t[t.length-1],t[t.length-2])>e&&(s=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(t,n-e),l.splice(l.length-1,1),l.push(s.pt));else{var r=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t),p=SuperMapAlgoPlot.PlottingUtil.polylineDistance(r);if(a)l=l.concat(r);else{var u=r[r.length-1];if(!a&&(e<p||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(p,e,1e-7))){for(var h=r.length-1;h>1;h--){if(!(e>SuperMapAlgoPlot.PlottingUtil.distance(u,r[h]))){var g=SuperMapAlgoPlot.PlottingUtil.findPoint(u,r[h],e,0);r.push(g),l=r;break}r.splice(h,1)}o||l.push(u)}else l=l.concat(r)}}break;case SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_COATTAIL:var c=e;if(c>n)return l;var y,P,S=Math.ceil(n/(1.4*c)),d=0,m=[];for(let e=0;e<S;e++)y=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(c*d,t),P=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(c*(d+1),t),y.bfind&&P.bfind&&(m.push(y.pts),m.push(P.pts)),d=1.4*(e+1);l=m}return l=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(l)},SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePtsBySingleLine=function(t,e,i){var o=[];if(2>t.length)return o;switch(t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts,i){case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_POLYLINE:{let i=t[0],l=t[1],s=SuperMapAlgoPlot.PlottingUtil.distance(i,l);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(s,e,1e-7)||s>e){let s=SuperMapAlgoPlot.PlottingUtil.findPoint(i,l,e,0),n=e*Math.tan(.125*Math.PI),a=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(n,t[0],s);o.push(a.pntLeft),o.push(t[0]),o.push(a.pntRight)}else{l=t[2];let s=SuperMapAlgoPlot.PlottingUtil.findPoint(i,l,e,0),n=e*Math.tan(.125*Math.PI),a=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(n,t[0],s);o.push(a.pntLeft),o.push(t[0]),o.push(a.pntRight)}break}case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE:break;case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE_SOLID:{let i=t[0],l=t[1],s=SuperMapAlgoPlot.PlottingUtil.distance(i,l);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(s,e,1e-7)||s>e){let s=e*Math.tan(.125*Math.PI),n=SuperMapAlgoPlot.PlottingUtil.findPoint(i,l,e,0),a=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(s,t[0],n);o.push(a.pntLeft),o.push(i),o.push(a.pntRight),o.push(a.pntLeft)}else{l=t[2];let s=e*Math.tan(.125*Math.PI),n=SuperMapAlgoPlot.PlottingUtil.findPoint(i,l,e,0),a=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(s,t[0],n);o.push(a.pntLeft),o.push(i),o.push(a.pntRight),o.push(a.pntLeft)}break}case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL:{let i=t[0],l=2*Math.sqrt(e*e/3),s=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l/2,s,1e-7)||s>l/2){let e=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],l,20),s=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],l,-20),n=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],l/2,0);o.push(i),o.push(e),o.push(n),o.push(s),o.push(i)}else{i=t[2];let e=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],l,20),s=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],l,-20),n=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],l/2,0);o.push(i),o.push(e),o.push(n),o.push(s),o.push(i)}break}case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL_HOLLOW:{var l=[];let i=t[0],h=2*Math.sqrt(e*e/3),g=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(h/1.4,g,1e-7)||g>h/1.4){let e=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],h,20),g=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],h,-20),c=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],h/1.4,0);l.push(i),l.push(e),l.push(c),l.push(g),l.push(i);var s=new SuperMapAlgoPlot.Point((l[0].x+l[1].x)/2,(l[0].y+l[1].y)/2),n=new SuperMapAlgoPlot.Point((l[3].x+l[4].x)/2,(l[3].y+l[4].y)/2),a=new SuperMapAlgoPlot.Point((s.x+n.x)/2,(s.y+n.y)/2),r=.75*SuperMapAlgoPlot.PlottingUtil.distance(s,n)/2,p=SuperMapAlgoPlot.PlottingUtil.findPointInLine(a,s,r),u=SuperMapAlgoPlot.PlottingUtil.findPointInLine(a,n,r);o.push(l[0]),o.push(p),o.push(l[1]),o.push(l[2]),o.push(l[3]),o.push(u),o.push(l[4])}else{i=t[0];let e=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],h,20),g=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],h,-20),c=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],h/1.4,0);l.push(i),l.push(e),l.push(c),l.push(g),l.push(i);s=new SuperMapAlgoPlot.Point((l[0].x+l[1].x)/2,(l[0].y+l[1].y)/2),n=new SuperMapAlgoPlot.Point((l[3].x+l[4].x)/2,(l[3].y+l[4].y)/2),a=new SuperMapAlgoPlot.Point((s.x+n.x)/2,(s.y+n.y)/2),r=.75*SuperMapAlgoPlot.PlottingUtil.distance(s,n)/2,p=SuperMapAlgoPlot.PlottingUtil.findPointInLine(a,s,r),u=SuperMapAlgoPlot.PlottingUtil.findPointInLine(a,n,r);o.push(l[0]),o.push(p),o.push(l[1]),o.push(l[2]),o.push(l[3]),o.push(u),o.push(l[4])}break}}return o=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(o)},SuperMapAlgoPlot.ArrowToolkit.generateArrowTailShapePts=function(t,e,i,o){var l=e.length,s=[],n=0;t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts;for(let e=0;e<t.length-1;e++)n+=SuperMapAlgoPlot.PlottingUtil.distance(t[e],t[e+1]);var a=n*i;switch(o){case SuperMapAlgoPlot.ArrowToolkit.ArrowTailType.ARROWTAIL_NONE:break;case SuperMapAlgoPlot.ArrowToolkit.ArrowTailType.ARROWTAIL_LINE:var r=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],a,90),p=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],a,-90);s.push(r),s.push(p);break;case SuperMapAlgoPlot.ArrowToolkit.ArrowTailType.ARROWTAIL_CURVE:{let o=new SuperMapAlgoPlot.Point(.5*(e[0].x+e[l-1].x),.5*(e[0].y+e[l-1].y)),s=SuperMapAlgoPlot.PlottingUtil.distance(e[0],e[l-1]);var u=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(s*i,o,t[t.length-1]),h=new SuperMapAlgoPlot.Point(0,0),g=new SuperMapAlgoPlot.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(SuperMapAlgoPlot.ArrowToolkit.ConstValue.DUOJIANTOU_TAIL_RATE_1,SuperMapAlgoPlot.ArrowToolkit.ConstValue.DUOJIANTOU_TAIL_RATE_2,e[0],u,e[l-1],h,g);var c=new SuperMapAlgoPlot.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(SuperMapAlgoPlot.ArrowToolkit.ConstValue.DUOJIANTOU_TAIL_RATE_3,e[0],u,h,c);var y=new SuperMapAlgoPlot.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(SuperMapAlgoPlot.ArrowToolkit.ConstValue.DUOJIANTOU_TAIL_RATE_3,e[l-1],u,g,y)}break;case SuperMapAlgoPlot.ArrowToolkit.ArrowTailType.ARROWTAIL_COATTAIL:var P=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],a,157.5),S=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],a,-157.5);s.push(P),s.push(t[0]),s.push(S);break;case SuperMapAlgoPlot.ArrowToolkit.ArrowTailType.ARROWTAIL_COATTAIL_POLYBODY:{let t=new SuperMapAlgoPlot.Point(.5*(e[0].x+e[l-1].x),.5*(e[0].y+e[l-1].y)),o=SuperMapAlgoPlot.PlottingUtil.distance(e[0],e[l-1]);var d=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(o*i,e[0],t);s.push(e[l-1]),s.push(d.pntLeft),s.push(e[0])}}return t=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(t),s=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(s)},SuperMapAlgoPlot.ArrowToolkit.generateArrowTailShapePtsBySingleLine=function(t,e,i){var o=[];switch(t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts,i){case SuperMapAlgoPlot.ArrowToolkit.ArrowTailType.ARROWTAIL_NONE:break;case SuperMapAlgoPlot.ArrowToolkit.ArrowTailType.ARROWTAIL_LINE:var l=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],e,90),s=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],e,-90);o.push(l),o.push(s);break;case SuperMapAlgoPlot.ArrowToolkit.ArrowTailType.ARROWTAIL_COATTAIL:var n=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],e,157.5),a=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],e,-157.5);o.push(n),o.push(t[0]),o.push(a)}return o=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(o)},SuperMapAlgoPlot.ArrowToolkit.OperateCtrlPts=function(t){var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(t);if(3==e.length){var i=((e[0].x+e[1].x)/2+e[2].x)/2,o=((e[0].y+e[1].y)/2+e[2].y)/2,l=new SuperMapAlgoPlot.Point(i,o),s=e[2].clone();e[2]=l,e.push(s)}return e},SuperMapAlgoPlot.ArrowToolkit.generateMultiBezier=function(t,e,i,o){var l=0,s=[],n=[],a=[],r=[],p=[],u=[],h=i[0],g=i[1],c=(t[0].x+t[1].x)/2,y=(t[0].y+t[1].y)/2,P=Math.abs(c-t[2].x),S=Math.abs(y-t[2].y),d=0;if(P>0&&S>0){var m=1/(c-t[2].x),f=-1/(y-t[2].y),L=1*t[2].y/(y-t[2].y)-1*t[2].x/(c-t[2].x);d=Math.abs(m*t[0].x+f*t[0].y+L)/Math.sqrt(m*m+f*f)}else S<=1e-4?d=Math.abs(y-t[1].y):P<=1e-4&&(d=Math.abs(c-t[1].x));var M=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(d,t[2],new SuperMapAlgoPlot.Point(c,y)),b=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(t[1],t[2],t[0]);b?(s[1]=t[1],n[1]=t[0]):(s[1]=t[0],n[1]=t[1]),t[1]=new SuperMapAlgoPlot.Point((t[0].x+t[1].x)/2,(t[0].y+t[1].y)/2);var A=Math.sqrt((M.pntLeft.x-M.pntRight.x)*(M.pntLeft.x-M.pntRight.x)+(M.pntLeft.y-M.pntRight.y)*(M.pntLeft.y-M.pntRight.y))*SuperMapAlgoPlot.ArrowToolkit.ConstValue.sv_AtWidthDivAwWidth,T=(l=A*SuperMapAlgoPlot.ArrowToolkit.ConstValue.sv_AtLenDivAtWidth)*g;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(h,0)||(T=(l=o*h)*g);var v,_,x=SuperMapAlgoPlot.PlottingUtil.distance(t[e],t[e-1]),O=2*l;x<O&&(T=(l=x/2)*g),t.push(t[e]),v=0,_=0;var w=0,I=[];for(w=2;w<=e;w++)v+=SuperMapAlgoPlot.PlottingUtil.distance(t[w],t[w-1]);for(v-=l,w=2;w<=e-1;w++)_+=SuperMapAlgoPlot.PlottingUtil.distance(t[w],t[w-1]),I[w]=T+(A-T)*Math.pow((v-_)/v,SuperMapAlgoPlot.ArrowToolkit.ConstValue.sv_AtScaleParameter);I[e]=T;var C,E,D=new SuperMapAlgoPlot.Point(0,0),U=new SuperMapAlgoPlot.Point(0,0),N=new SuperMapAlgoPlot.Point(0,0);for(w=2;w<=e-1;w++)SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(0,3,t[w-1],t[w],t[w+1],U,N),w==e-1&&SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,t[e],t[e-1],N,D),C=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(I[w],U,t[w]),(b=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(N,U,C.pntRight))?(s[w]=new SuperMapAlgoPlot.Point(C.pntRight.x,C.pntRight.y),n[w]=new SuperMapAlgoPlot.Point(C.pntLeft.x,C.pntLeft.y)):(s[w]=new SuperMapAlgoPlot.Point(C.pntLeft.x,C.pntLeft.y),n[w]=new SuperMapAlgoPlot.Point(C.pntRight.x,C.pntRight.y));for(Math.sqrt(1*(t[e].x-D.x)*(t[e].x-D.x)+1*(t[e].y-D.y)*(t[e].y-D.y))>0&&(t[e]=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(l,t[e],D)),C=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(T,t[e+1],t[e]),(b=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(t[e],t[e+1],C.pntLeft))?(n[e]=new SuperMapAlgoPlot.Point(C.pntLeft.x,C.pntLeft.y),s[e]=new SuperMapAlgoPlot.Point(C.pntRight.x,C.pntRight.y)):(n[e]=new SuperMapAlgoPlot.Point(C.pntRight.x,C.pntRight.y),s[e]=new SuperMapAlgoPlot.Point(C.pntLeft.x,C.pntLeft.y)),w=2;w<e;w++)SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(3,3,s[w-1],s[w],s[w+1],U,N),a[w]=new SuperMapAlgoPlot.Point(U.x,U.y),r[w]=new SuperMapAlgoPlot.Point(N.x,N.y),SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(3,3,n[w-1],n[w],n[w+1],U,N),p[w]=new SuperMapAlgoPlot.Point(U.x,U.y),u[w]=new SuperMapAlgoPlot.Point(N.x,N.y),2==w&&(SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,s[1],s[2],a[2],D),r[1]=new SuperMapAlgoPlot.Point(D.x,D.y),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,n[1],n[2],p[2],D),u[1]=new SuperMapAlgoPlot.Point(D.x,D.y)),w==e-1&&(O=(x=SuperMapAlgoPlot.PlottingUtil.distance(s[e],s[e-1]))/3,(E=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(O,t[e],t[e+1])).x+=s[e].x-t[e].x,E.y+=s[e].y-t[e].y,O=(x=A-T)*Math.pow(O/v,SuperMapAlgoPlot.ArrowToolkit.ConstValue.sv_AtScaleParameter),C=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(O,s[e],E),a[e]=new SuperMapAlgoPlot.Point(C.pntLeft.x,C.pntLeft.y),O=(x=SuperMapAlgoPlot.PlottingUtil.distance(n[e],n[e-1]))/3,(E=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(O,t[e],t[e+1])).x+=n[e].x-t[e].x,E.y+=n[e].y-t[e].y,O=(x=A-T)*Math.pow(O/v,SuperMapAlgoPlot.ArrowToolkit.ConstValue.sv_AtScaleParameter),C=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(O,n[e],E),p[e]=new SuperMapAlgoPlot.Point(C.pntRight.x,C.pntRight.y));return{arrowTouLen:l,leftBodyPts:SuperMapAlgoPlot.ArrowToolkit.genArrowBody(e,s,a,r),rightBodyPts:SuperMapAlgoPlot.ArrowToolkit.genArrowBody(e,n,p,u)}},SuperMapAlgoPlot.ArrowToolkit.genArrowBody=function(t,e,i,o){var l=new SuperMapAlgoPlot.Path2D;if(!(t<2)){l.MoveTo(e[1]);for(let s=1;s<=t-1;s++)l.CubicTo(o[s],i[s+1],e[s+1]);var s=[];return l.ToSubPathPolygons(s),s[0]}};SuperMapAlgoPlot.AlgoSymbol=class{addScalePoint(t,e){if(null!=t){void 0!==e&&null!==e||(e=this.scalePoints.length);var i=new SuperMapAlgoPlot.Point(t.x,t.y);i.isScalePoint=!0,i.tag=e,this.scalePoints.push(i)}}setOptions(t){if(t)for(let e in this)t[e]&&(this[e]=t[e])}getAlgorithmResult(t){t.components=this.components,t.scalePoints=this.scalePoints,t.scaleValues=this.scaleValues}constructor(t){t=t||{},this.style=null,this.libID=t.libID?t.libID:0,this.code=t.code?t.code:0,this.maxEditPts=t.maxEditPts?t.maxEditPts:SuperMapAlgoPlot.AlgoSymbolFactory.getMaxEditPts(t.libID,t.code),this.minEditPts=t.minEditPts?t.minEditPts:SuperMapAlgoPlot.AlgoSymbolFactory.getMinEditPts(t.libID,t.code),this.isEdit=!!t.isEdit&&t.isEdit,this.controlPoints=t.controlPoints?t.controlPoints:[],this.scalePoints=t.scalePoints?t.scalePoints:[],this.scaleValues=t.scaleValues?t.scaleValues:[],this.subSymbols=t.subSymbols?t.subSymbols:SuperMapAlgoPlot.AlgoSymbolFactory.getDefaultSubSymbols(t.libID,t.code),this.polylineConnectLocationPoint=!!t.polylineConnectLocationPoint&&t.polylineConnectLocationPoint,this.style=t.style?t.style:SuperMapAlgoPlot.PlottingUtil.copyAttributes(this.style,SuperMapAlgoPlot.AlgoSymbolFactory.getDefaultStyle(t.libID,t.code)),this.textContent=t.textContent?t.textContent:"",this.map=t.map?t.map:null,this.scene=t.scene?t.scene:null,this.subSymbolDefaultPixelSize=t.subSymbolDefaultPixelSize?t.subSymbolDefaultPixelSize:30,this.symScaleDefinition=t.symScaleDefinition?t.symScaleDefinition:1,this.components=[],this.symbolType=0===this.libID?this.code:2}destroy(){this.minEditPts=null,this.maxEditPts=null,this.controlPoints.length=0,this.controlPoints=null,this.scalePoints.length=0,this.scalePoints=null,this.scaleValues.length=0,this.scaleValues=null,this.subSymbols.length=0,this.subSymbols=null,this.subSymbolSize=0,this.components=null,this.style=null}init(){if(this.components.length=0,this.scalePoints.length=0,this.controlPoints.length>=2&&this.controlPoints.length<this.minEditPts&&this.calAssistantLine(),this.maxEditPts<this.controlPoints.length&&this.symbolType!==SuperMapAlgoPlot.SymbolType.ELLIPSESYMBOL){var t=this.controlPoints.shift(),e=this.controlPoints.pop();this.controlPoints=[],this.controlPoints.push(t,e)}}finish(){}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(this.controlPoints);if(t=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),this.controlPoints.length>=this.minEditPts){var e={textContent:this.textContent,type:this.symbolType,surroundLineFlag:!1,positionPoints:t,style:{}};if(e.type===SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL&&e.positionPoints.push(e.positionPoints[0]),this.symbolType===SuperMapAlgoPlot.SymbolType.PARALLELLINE){if(this.controlPoints&&this.controlPoints.length>=3){var i=!1;void 0!==this.controlPoints[0].z&&(i=!0);var o=SuperMapAlgoPlot.PlottingUtil.distance(this.controlPoints[0],this.controlPoints[1]);SuperMapAlgoPlot.PlottingUtil.isRight(this.controlPoints[0],this.controlPoints[1],this.controlPoints[2])&&(o=-o);var l=[];for(let t=1;t<this.controlPoints.length;t++)l.push(this.controlPoints[t].clone());var s=SuperMapAlgoPlot.PlottingUtil.parallel(l,o);if(this.controlPoints[0].x=s[0].x,this.controlPoints[0].y=s[0].y,i)for(let t=0;t<l.length;t++)s[t].z=l[t].z;this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,l),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,s)}}else this.components.push(e)}}modifyPoint(t,e){this.computeScaleValues(t,e),this.calculateParts()}computeScaleValues(){}getLonLatDistanceFromPixel(t){if(null===this.map)return 0;var e,i;if(this.map&&"undefined"!=typeof L&&void 0!==L.Map&&this.map instanceof L.Map){var o=this.map.layerPointToLatLng(L.point(0,0)),l=this.map.layerPointToLatLng(L.point(t*this.symScaleDefinition,0));e=new SuperMapAlgoPlot.Point(o.lng,o.lat),i=new SuperMapAlgoPlot.Point(l.lng,l.lat)}else this.map&&"undefined"!=typeof SuperMap&&void 0!==SuperMap.Map&&this.map instanceof SuperMap.Map&&(o=this.map.getLonLatFromPixel(new SuperMap.Pixel(0,0)),l=this.map.getLonLatFromPixel(new SuperMap.Pixel(t*this.symScaleDefinition,0)),e=new SuperMapAlgoPlot.Point(o.lon,o.lat),i=new SuperMapAlgoPlot.Point(l.lon,l.lat));return SuperMapAlgoPlot.PlottingUtil.distance(e,i)}getPixelDistanceFromLonLat(t){if(null===this.map)return 0;var e,i;if(this.map&&"undefined"!=typeof L&&void 0!==L.Map&&this.map instanceof L.Map){var o=this.map.latLngToLayerPoint(L.latLng(0,0)),l=this.map.latLngToLayerPoint(L.latLng(t,0));e=new SuperMapAlgoPlot.Point(o.x,o.y),i=new SuperMapAlgoPlot.Point(l.x,l.y)}else this.map&&"undefined"!=typeof SuperMap&&void 0!==SuperMap.Map&&this.map instanceof SuperMap.Map&&(o=this.map.getPixelFromLonLat(new SuperMap.LonLat(0,0)),l=this.map.getPixelFromLonLat(new SuperMap.LonLat(t,0)),e=new SuperMapAlgoPlot.Point(o.x,o.y),i=new SuperMapAlgoPlot.Point(l.x,l.y));return SuperMapAlgoPlot.PlottingUtil.distance(e,i)}getPixelFromLonLat(t,e){if(this.map&&"undefined"!=typeof L&&void 0!==L.Map&&this.map instanceof L.Map){var i=this.map.latLngToLayerPoint(L.latLng(e,t));return{x:i.x,y:i.y}}if(this.map&&"undefined"!=typeof SuperMap&&void 0!==SuperMap.Map&&this.map instanceof SuperMap.Map){var o=this.map.getPixelFromLonLat(new SuperMap.LonLat(t,e));return{x:o.x,y:o.y}}}getLonLatFromPixel(t,e){if(this.map&&"undefined"!=typeof L&&void 0!==L.Map&&this.map instanceof L.Map){var i=this.map.layerPointToLatLng(L.point(t,e));return{lon:i.lng,lat:i.lat}}if(this.map&&"undefined"!=typeof SuperMap&&void 0!==SuperMap.Map&&this.map instanceof SuperMap.Map){var o=this.map.getLonLatFromPixel(new SuperMap.Pixel(t,e));return{lon:o.lon,lat:o.lat}}}pixelBoundsToLonLat(t){var e=this.getLonLatFromPixel(t.left,t.top),i=this.getLonLatFromPixel(t.right,t.bottom);return new SuperMap.Bounds(e.lon,i.lat,i.lon,e.lat)}annotationContent(t,e,i,o){var l=this.textContent;if(0!==l.length){var s=l.split("\n");l="";var n=0,a={};SuperMap.Util.copyAttributes(a,this.style),a.fontSize*=this.symScaleDefinition;for(var r=0;r<s.length;r++){n++;var p=s[r],u=SuperMapAlgoPlot.PlottingUtil.getTextWidth(a,p),h=this.getPixelFromLonLat(t,e),g=this.getPixelFromLonLat(i,o),c=parseFloat(Math.abs(g.x-h.x)),y=parseFloat(Math.abs(h.y-g.y)),P=0;if(a.weight?P=parseFloat(a.fontSize)+2*a.weight+.2*parseFloat(a.fontSize)+n:this.style.strokeWidth&&(P=parseFloat(a.fontSize)+2*a.strokeWidth+.2*parseFloat(a.fontSize)+n),P>y)break;if(u>=c){var S=p.split("");p="";var d="",m=S.length;for(let t=0;t<m;t++){if(d+=S[t],SuperMapAlgoPlot.PlottingUtil.getTextWidth(a,d)>=c){var f=S[t];if(S[t]="\n",n++,a.weight?P=parseFloat(a.fontSize)*n+n+2*a.weight+.2*parseFloat(a.fontSize):this.style.strokeWidth&&(P=parseFloat(a.fontSize)*n+n+2*a.strokeWidth+.2*parseFloat(a.fontSize)),!(P<y)){0===l.length?l=p:(l+="\n",l+=p);break}S[t]+=f,d=f}p+=S[t],t===m-1&&(0===l.length?l=p:(l+="\n",l+=p))}}else 0===l.length?l=p:(l+="\n",l+=p)}if(0!==l.length){var L=a.labelAlign,M=0,b=0;"l"===L[0]?M=t:"r"===L[0]?M=i:"c"===L[0]&&(M=(t+i)/2),"t"===L[1]?b=e:"b"===L[1]?b=o:"m"===L[1]&&(b=(e+o)/2);var A=new SuperMapAlgoPlot.Point(M,b),T={};T.positionPoints=[A],T.type=SuperMapAlgoPlot.SymbolType.TEXTSYMBOL,T.textContent=l,T.style={surroundLineFlag:!1,labelAlign:L},this.components.push(T)}}}addCell(t,e,i,o){if(t&&e){var l={};l.type=t,l.textContent=o,l.positionPoints=e,null==i?l.style={surroundLineFlag:!1}:(l.style=i,null==i.surroundLineFlag&&(l.style.surroundLineFlag=!1)),this.components.push(l)}}addText(t,e,i,o,l){if(t&&e){var s={};s.type=SuperMapAlgoPlot.SymbolType.TEXTSYMBOL,s.textContent=t,s.positionPoints=[e];var n=i/t.length/2;s.style={},s.style.surroundLineFlag=!1,s.style.labelRotation=-o,s.style.fontSize=n,void 0===l?s.style.fontColor="#000000":(s.style.fontColor=l,s.style.fontColorLimit=!0),s.style.fontSizeLimit=!0,s.style.sizeFixed=!1,s.style.labelAlign="cm",s.style.label=t,this.components.push(s)}}getLinePts(t,e,i){var o=new Object;if(e>.5)return o.startIndex=0,o.startPt=t[0],o.endIndex=t.length-1,o.endPt=t[t.length-1],o;null==i&&(i=.5);var l=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t),s=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(l*(i-e),t),n=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(l*(i+e),t);return o.startIndex=s.index,o.startPt=s.pts,o.endIndex=n.index,o.endPt=n.pts,o}computeDashLine(t,e,i){var o=[],l=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i);if(l<=0)return[];for(var s,n=i[0],a=1,r=0,p=!0,u=!0;r<l;){let l=[];var h;l.push(n),r+=t;var g=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(r,i);if(h=g.index,s=g.pts,!(p=g.bfind))break;if(a<h)for(let t=a;t<h;t++)l.push(i[t]);l.push(s),o.push(l),r+=e;var c=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(r,i);if(h=c.index,n=c.pts,a=h+1,!(u=c.bfind))break}if(!p){let t=[];t.push(n);for(let e=a;e<i.length;e++)t.push(i[e]);2===t.length&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]),0)||o.push(t)}if(!u){var y=i[i.length-1],P=SuperMapAlgoPlot.PlottingUtil.distance(s,y);if(P*=.01,!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(P,0)){var S=SuperMapAlgoPlot.PlottingUtil.linePnt(y,s,P);let t=[];t.push(S),t.push(y),o.push(t)}}return o}addArrow(t,e){if(t.length<2)return t;var i,o=SuperMapAlgoPlot.PlottingUtil.polylineDistance(this.controlPoints);void 0===e&&(this.isEdit,e=.5*this.getSubSymbolScaleValue());var l=t.slice();i=o*e;var s,n=t[t.length-1],a=i*Math.cos(.125*Math.PI);if(t.length>2){var r=-1;for(let e=t.length-2;e>=0;e--)if(i<SuperMapAlgoPlot.PlottingUtil.distance(n,t[e])){r=e;break}t.splice(r+1,t.length-r),t.push(n)}if(t.length>1){SuperMapAlgoPlot.PlottingUtil.distance(t[t.length-1],t[t.length-2])>a&&(s=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(a,[t[t.length-1],t[t.length-2]])).bfind&&(t.splice(t.length-1,1),t.push(s.pts)),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,t);var p=t[t.length-1],u=n,h=i;if(void 0===p)return t;var g=SuperMapAlgoPlot.PlottingUtil.radian(p,u)*SuperMapAlgoPlot.PlottingUtil.RTOD,c=SuperMapAlgoPlot.PlottingUtil.circlePoint(u,h,h,g+157.5),y=SuperMapAlgoPlot.PlottingUtil.circlePoint(u,h,h,g+202.5),P={surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0,lineTypeLimit:!0,surroundLineLimit:!0,surroundLineType:SuperMapAlgoPlot.AlgoSurroundLineType.NONE};this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,[c,n,y],P)}else this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,l)}addArrowWithOutLine(t,e){if(t.length<2)return t;var i,o=SuperMapAlgoPlot.PlottingUtil.polylineDistance(this.controlPoints);void 0===e&&(this.isEdit,e=.5*this.getSubSymbolScaleValue());var l=t.slice();i=o*e;var s,n=t[t.length-1],a=i*Math.cos(.125*Math.PI);if(t.length>2){var r=-1;for(let e=t.length-2;e>=0;e--)if(i<SuperMapAlgoPlot.PlottingUtil.distance(n,t[e])){r=e;break}t.splice(r+1,t.length-r),t.push(n)}if(t.length>1){SuperMapAlgoPlot.PlottingUtil.distance(t[t.length-1],t[t.length-2])>a&&(s=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(a,[t[t.length-1],t[t.length-2]])).bfind&&(t.splice(t.length-1,1),t.push(s.pts));var p=t[t.length-1],u=n,h=i;if(void 0===p)return t;var g=SuperMapAlgoPlot.PlottingUtil.radian(p,u)*SuperMapAlgoPlot.PlottingUtil.RTOD,c=SuperMapAlgoPlot.PlottingUtil.circlePoint(u,h,h,g+157.5),y=SuperMapAlgoPlot.PlottingUtil.circlePoint(u,h,h,g+202.5),P={surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0,lineTypeLimit:!0,surroundLineLimit:!0,surroundLineType:SuperMapAlgoPlot.AlgoSurroundLineType.NONE};this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,[c,n,y],P)}else this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,l)}addDovetailArrow(t,e){if(t.length<2)return t;var i,o=SuperMapAlgoPlot.PlottingUtil.polylineDistance(this.controlPoints);void 0===e&&(this.isEdit,e=.5*this.getSubSymbolScaleValue()),i=o*e;var l=t[t.length-1];if(t.length>2){var s=-1;for(let e=t.length-2;e>=0;e--)if(i<SuperMapAlgoPlot.PlottingUtil.distance(l,t[e])){s=e;break}t.splice(s+1,t.length-s),t.push(l)}this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,t);var n=t[t.length-2],a=t[t.length-1],r=i;if(void 0===n)return t;if(!(SuperMapAlgoPlot.PlottingUtil.distance(n,a)<i)){var p=SuperMapAlgoPlot.PlottingUtil.radian(n,a)*SuperMapAlgoPlot.PlottingUtil.RTOD,u=SuperMapAlgoPlot.PlottingUtil.circlePoint(a,r,r,p+157.5),h=SuperMapAlgoPlot.PlottingUtil.circlePoint(a,r,r,p+202.5),g=SuperMapAlgoPlot.PlottingUtil.circlePoint(a,.5*r,.5*r,p+180),c=[];c.push(u),c.push(t[t.length-1]),c.push(h),c.push(g);var y={surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0,lineTypeLimit:!0,surroundLineLimit:!0,surroundLineType:SuperMapAlgoPlot.AlgoSurroundLineType.NONE};this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,c,y)}}getDefaultSubSymbolSize(){var t=0;if(this.map){var e=this.getLonLatFromPixel(0,0),i=this.getLonLatFromPixel(this.subSymbolDefaultPixelSize,0),o=new SuperMapAlgoPlot.Point(e.lon,e.lat),l=new SuperMapAlgoPlot.Point(i.lon,i.lat);t=SuperMapAlgoPlot.PlottingUtil.distance(o,l)}if(0===t){if(0!==this.subSymbolSize)return this.subSymbolSize;var s=0;for(let t=0;t<this.controlPoints.length-1;t++)s+=SuperMapAlgoPlot.PlottingUtil.distance(this.controlPoints[t],this.controlPoints[t+1]);t=.3*s}return t}getTextBounds(t,e){" "===e&&(e="_");var i=document.createElement("span");document.body.appendChild(i),i.style.width="auto",i.style.height="auto",t.fontSize&&(i.style.fontSize=new String(t.fontSize)+"px"),t.fontFamily&&(i.style.fontFamily=t.fontFamily),t.fontWeight&&(i.style.fontWeight=t.fontWeight),i.style.position="absolute",i.style.visibility="hidden",i.innerHTML=e;var o=new SuperMap.Bounds(i.clientLeft,i.clientTop+i.clientHeight-6,i.clientLeft+i.clientWidth,i.clientTop+4),l=this.pixelBoundsToLonLat(o);return document.body.removeChild(i),l}calAssistantLine(){var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);this.symbolType===SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOL&&(t.splice(1,0,new SuperMapAlgoPlot.Point(this.controlPoints[1].x,this.controlPoints[0].y)),t.push(new SuperMapAlgoPlot.Point(this.controlPoints[0].x,this.controlPoints[1].y)),t.push(new SuperMapAlgoPlot.Point(this.controlPoints[0].x,this.controlPoints[0].y)));var e={type:24,surroundLineFlag:!1,positionPoints:t,style:{color:"#0000ff",opacity:1,weight:1,dashArray:"5, 5",strokeColor:"#0000ff",strokeOpacity:1,strokeWidth:1,strokeDashstyle:"dash",lineColorLimit:!0,lineTypeLimit:!0,lineWidthLimit:!0,surroundLineFlag:!1}};this.components.push(e)}getSubSymbolScaleValue(t,e){var i=0;i=t&&!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t,0)?t:SuperMapAlgoPlot.PlottingUtil.polylineDistance(this.controlPoints);var o=this.getDefaultSubSymbolSize()/i;return void 0===e&&(e=.3),(o>e||o<=0)&&(o=e),o}computeSubSymbol(t,e,i,o,l,s){if(null==t.symbolData||null==t.symbolData.innerCells)return null;void 0===l&&(l=0),void 0===s&&(s=0);var n=SuperMapAlgoPlot.AnalysisSymbol.analysisSymbolCells(t.symbolData,!0),a=0,r=0,p=0,u=0;for(let t=0;t<n.length;t++){null!=n[t].polybezierClose&&(n[t].type===SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL||n[t].type===SuperMapAlgoPlot.SymbolType.POLYBEZIERCLOSESYMBOL?(n[t].type,SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL,n[t].positionPoints=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsWithCtrlPt(n[t].positionPoints),n[t].isClosed&&n[t].positionPoints[0]!==n[t].positionPoints[symbolCell.positionPoints.length-1]&&n[t].positionPoints.push(n[t].positionPoints[0])):n[t].type===SuperMapAlgoPlot.SymbolType.KIDNEY&&(n[t].positionPoints=SuperMapAlgoPlot.Primitives.getSpatialData(n[t].type,n[t].positionPoints)));var h=SuperMapAlgoPlot.Primitives.getSpatialData(n[t].type,n[t].positionPoints,n[t].textContent,0,n[t].isCalculate);for(let t=0,e=h.length;t<e;t++)a<h[t].x&&(a=h[t].x),r<h[t].y&&(r=h[t].y),p>h[t].x&&(p=h[t].x),u>h[t].y&&(u=h[t].y)}var g=new SuperMapAlgoPlot.Point(a,r),c=new SuperMapAlgoPlot.Point(p,u),y=(g.y-c.y)/i,P=(g.x-c.x)/i,S=P>y?P:y,d=new SuperMapAlgoPlot.Point(.5*(g.x+c.x),.5*(g.y+c.y));d.x+=l*(g.x-c.x),d.y+=s*(g.y-c.y);for(let t=0,i=n.length;t<i;t++){for(let i=0,l=n[t].positionPoints.length;i<l;i++)n[t].positionPoints[i].x-=d.x,n[t].positionPoints[i].y-=d.y,n[t].positionPoints[i].x/=S,n[t].positionPoints[i].y/=S,SuperMapAlgoPlot.PlottingUtil.rotateAngle(new SuperMapAlgoPlot.Point(0,0),o*Math.PI/180,n[t].positionPoints[i]),n[t].positionPoints[i].x+=e.x,n[t].positionPoints[i].y+=e.y;n[t].type===SuperMapAlgoPlot.SymbolType.TEXTSYMBOL&&(n[t].style.fontSize/=10*S,n[t].style.labelRotation=-o,n[t].style.sizeFixed=!1),n[t].isCalculate=!1,n[t].style.surroundLineType=0,n[t].style.surroundLineLimit=!0,n[t].style.lineTypeLimit=!0,this.components.push(n[t])}return n}ComputeZValue(t,e,i){var o=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(t,e,i),l=new SuperMapAlgoPlot.Point(o.projectPoint.x,o.projectPoint.y),s=SuperMapAlgoPlot.PlottingUtil.distance(e,i),n=SuperMapAlgoPlot.PlottingUtil.distance(e,t),a=SuperMapAlgoPlot.PlottingUtil.distance(i,t);if(!o.isOnline){if(n>=s)return i.z;if(a>=s)return e.z}return l.x!=e.x&&e.x!=i.x?e.z+(l.x-e.x)/(e.x-i.x)*(e.z-i.z):l.y!=e.y&&e.y!=i.y?e.z+(l.y-e.y)/(e.y-i.y)*(e.z-i.z):0==(n=SuperMapAlgoPlot.PlottingUtil.distance(e,l))?e.z:e.z-(e.z-i.z)*(n/s)}ComputeBeizerZValueByDis(t,e,i){if(t.length<2)return!1;var o=[];for(let e=0;e<t.length;e++)o.push({x:t[e].x,y:t[e].y});var l=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o);if(0==l)return!1;var s=SuperMapAlgoPlot.PlottingUtil.polylineDistance(e),n=[];n.push(o[0]);var a=-1,r=0,p=e[0];for(let L=1;L<o.length;L++){n.push(o[L]);var u=SuperMapAlgoPlot.PlottingUtil.polylineDistance(n)/l,h=s*u,g=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(h,e),c=g.index,y=g.pts;if(g.bfind){var P=t[L-1].z,S=t[L].z,d=s*(u-r),m=0;for(let t=++a;t<=c;t++){var f=P+(S-P)*((m+=t==a?SuperMapAlgoPlot.PlottingUtil.distance(p,e[t]):SuperMapAlgoPlot.PlottingUtil.distance(e[t-1],e[t]))/d);i.push({x:e[t].x,y:e[t].y,z:f})}a=c}r=u,p=y}for(let o=a+1;o<e.length;o++)i.push({x:e[o].x,y:e[o].y,z:t[t.length-1].z});return!0}ComputeHeight(t,e,i,o){if(i!=o){if(0!=t.length)if(1==t.length)e.push({x:t[0].x,y:t[0].y,z:i});else if(2==t.length)e.push({x:t[0].x,y:t[0].y,z:i}),e.push({x:t[1].x,y:t[1].y,z:o});else{var l=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t);if(0!=l){var s=[];s.push(t[0]),e.push({x:t[0].x,y:t[0].y,z:i});for(let a=1;a<t.length-1;a++){s.push(t[a]);var n=i+(o-i)*SuperMapAlgoPlot.PlottingUtil.polylineDistance(s)/l;e.push({x:t[a].x,y:t[a].y,z:n})}e.push({x:t[t.length-1].x,y:t[t.length-1].y,z:o})}else for(let o=0;o<t.length;o++)e.push({x:t[o].x,y:t[o].y,z:i})}}else for(let o=0;o<t.length;o++)e.push({x:t[o].x,y:t[o].y,z:i})}};SuperMapAlgoPlot.ArrowLine=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.arrowAngle=t.arrowAngle?t.arrowAngle:45,0===this.scaleValues.length&&(this.scaleValues.push(.3),this.scaleValues.push(0),this.scaleValues.push(0)),this.CLASS_NAME="SuperMapAlgoPlot.ArrowLine"}calculateParts(){if(this.init(),!(null==this.controlPoints||this.controlPoints.length<this.minEditPts)){var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t);var e=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t);e=SuperMapAlgoPlot.PlottingUtil.clearSamePts(e);var i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(e);this.isEdit||(this.scaleValues[0]=.5*this.getSubSymbolScaleValue(i));var o,l=this.scaleValues[0]*i,s=this.arrowAngle*Math.PI/180/2,n=(o=e.length>2?SuperMapAlgoPlot.PlottingUtil.radian(e[e.length-1],e[e.length-2]):SuperMapAlgoPlot.PlottingUtil.radian(e[1],e[0]))-s,a=e[e.length-1].x+l*Math.cos(n),r=e[e.length-1].y+l*Math.sin(n),p=new SuperMapAlgoPlot.Point(a,r),u=o+s,h=e[e.length-1].x+l*Math.cos(u),g=e[e.length-1].y+l*Math.sin(u),c=new SuperMapAlgoPlot.Point(h,g),y=[];y.push(p),y.push(e[e.length-1].clone()),y.push(c);var P={surroundLineFlag:!1,fillLimit:!0,lineTypeLimit:!0},S=SuperMapAlgoPlot.PlottingUtil.radian(e[0],e[1]);n=S-s,a=e[0].x+l*Math.cos(n),r=e[0].y+l*Math.sin(n),p=new SuperMapAlgoPlot.Point(a,r),u=S+s,h=e[0].x+l*Math.cos(u),g=e[0].y+l*Math.sin(u),c=new SuperMapAlgoPlot.Point(h,g);var d=[];d.push(p),d.push(e[0].clone()),d.push(c);var m=this.scaleValues[1]===SuperMapAlgoPlot.ArrowLineType.DOUBLELINE?SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,f=this.scaleValues[2]===SuperMapAlgoPlot.ArrowLineType.DOUBLELINE?SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL;this.scaleValues[1]===SuperMapAlgoPlot.ArrowLineType.DOUBLELINE?this.addCell(m,d,P):this.scaleValues[1]===SuperMapAlgoPlot.ArrowLineType.TRIANGLESOLID&&this.addCell(m,d,P),this.scaleValues[2]===SuperMapAlgoPlot.ArrowLineType.DOUBLELINE?this.addCell(f,y,P):this.scaleValues[2]===SuperMapAlgoPlot.ArrowLineType.TRIANGLESOLID&&this.addCell(f,y,P),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,e),this.finish()}}};SuperMapAlgoPlot.RegularPolygon=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(1),this.CLASS_NAME="SuperMapAlgoPlot.RegularPolygon"}calculateParts(){if(this.init(),!(this.controlPoints.length<this.minEditPts)){var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints),e=this.controlPoints.length+1,i=2*Math.PI/e;if(!this.isEdit){var o=this.controlPoints[this.controlPoints.length-1],l=new SuperMapAlgoPlot.Point(this.controlPoints[this.controlPoints.length-1].x,this.controlPoints[this.controlPoints.length-1].y);SuperMapAlgoPlot.PlottingUtil.rotateAngle(this.controlPoints[0],i,l),this.scaleValues[0]=SuperMapAlgoPlot.PlottingUtil.distance(t[0],this.calculateMidPt(o,l))/SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[t.length-1])}var s=[],n=this.controlPoints[this.controlPoints.length-1].clone();s.push(n.clone()),n=SuperMapAlgoPlot.PlottingUtil.rotateAngle(this.controlPoints[0],i/2,n);var a=SuperMapAlgoPlot.PlottingUtil.findPointOnLineByRatio(this.scaleValues[0],this.controlPoints[0],n);s.push(a);for(let t=1;t<e;t++)n=SuperMapAlgoPlot.PlottingUtil.rotateAngle(this.controlPoints[0],i/2,n),s.push(n.clone()),n=SuperMapAlgoPlot.PlottingUtil.rotateAngle(this.controlPoints[0],i/2,n),a=SuperMapAlgoPlot.PlottingUtil.findPointOnLineByRatio(this.scaleValues[0],this.controlPoints[0],n),s.push(a);var r=s[1];this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,s,{surroundLineFlag:!1,fill:!1}),this.addScalePoint(r),this.finish()}}calculateMidPt(t,e){return new SuperMapAlgoPlot.Point((t.x+e.x)/2,(t.y+e.y)/2)}modifyPoint(t,e){if(0===t&&!0===e.isScalePoint){var i=SuperMapAlgoPlot.PlottingUtil.distance(this.controlPoints[0],this.controlPoints[this.controlPoints.length-1]),o=this.scalePoints[0],l=SuperMapAlgoPlot.PlottingUtil.projectPoint(e,this.controlPoints[0],o),s=SuperMapAlgoPlot.PlottingUtil.distance(this.controlPoints[0],l);this.scaleValues[0]=s/i}this.calculateParts()}};SuperMapAlgoPlot.Brace=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(.1),this.scaleValues.push(.1)),this.CLASS_NAME="SuperMapAlgoPlot.Brace"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e=t[0],i=t[1],o=SuperMapAlgoPlot.PlottingUtil.distance(e,i);this.scaleValues.length<2&&(this.scaleValues=[],this.scaleValues.push(.1),this.scaleValues.push(.1));var l=this.scaleValues[0],s=this.scaleValues[1],n=new SuperMapAlgoPlot.Point(o*l,o*l),a=new SuperMapAlgoPlot.Point(o*(.5-s/2),0),r=new SuperMapAlgoPlot.Point(.5*o,-o*s),p=new SuperMapAlgoPlot.Point(o*(.5+s/2),0),u=new SuperMapAlgoPlot.Point(o*(1-l),o*l),h=[],g=180*Math.PI/180,c=270*Math.PI/180,y=3*Math.PI/180;for(let t=g;t<=c;t+=y){let e=new SuperMapAlgoPlot.Point(n.x+o*l,n.y);e=SuperMapAlgoPlot.PlottingUtil.rotateAngle(n,t,e),h.push(e)}h.push(a),h.push(r),h.push(p),g=270*Math.PI/180,c=360*Math.PI/180;for(let t=g;t<=c;t+=y){let e=new SuperMapAlgoPlot.Point(u.x+o*l,u.y);e=SuperMapAlgoPlot.PlottingUtil.rotateAngle(u,t,e),h.push(e)}var P=SuperMapAlgoPlot.PlottingUtil.radian(e,i),S=[];for(let t=0;t<h.length;t++){var d=new SuperMapAlgoPlot.Point(h[t].x+e.x,h[t].y+e.y);d=SuperMapAlgoPlot.PlottingUtil.rotateAngle(e,P,d),S.push(d)}this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,S),this.scalePoints=[];var m=new SuperMapAlgoPlot.Point(o*l,0),f=new SuperMapAlgoPlot.Point(m.x+e.x,m.y+e.y);(f=SuperMapAlgoPlot.PlottingUtil.rotateAngle(e,P,f)).isScalePoint=!0,f.tag=0,this.addScalePoint(f);var L=new SuperMapAlgoPlot.Point(r.x+e.x,r.y+e.y);SuperMapAlgoPlot.PlottingUtil.rotateAngle(e,P,L),L.isScalePoint=!0,L.tag=1,this.addScalePoint(L)}}modifyPoint(t,e){if(!0===e.isScalePoint){var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints),o=SuperMapAlgoPlot.PlottingUtil.distance(i[0],i[1]);if(0==t){let t=SuperMapAlgoPlot.PlottingUtil.distance(i[0],e)/o;t>0&&t<.4&&(this.scaleValues[0]=t)}else if(1==t){var l=new SuperMapAlgoPlot.Point((i[0].x+i[1].x)/2,(i[0].y+i[1].y)/2);let t=SuperMapAlgoPlot.PlottingUtil.distance(e,l)/o;0<t&&.2>t&&(this.scaleValues[1]=t)}}this.calculateParts()}};SuperMapAlgoPlot.Trapezoid=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.CLASS_NAME="SuperMapAlgoPlot.Trapezoid"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=2&&t.length<this.minEditPts&&this.calAssistantLine(),!(t.length<this.minEditPts)){var e=[],i=t[0],o=t[1],l=t[2],s=new SuperMapAlgoPlot.Point(0,0);this.GetPointsByTrapezoid(1,l,o,i,s),e.push(i),e.push(o),e.push(l),e.push(s);var n=SuperMapAlgoPlot.PlottingUtil.intersectLines(i,o,l,s),a=n.intersectPoint;n.isIntersectLines&&(a.x>i.x&&a.x<o.x||a.y>i.y&&a.y<o.y||a.x<i.x&&a.x>o.x||a.y<i.y&&a.y>o.y)&&(e[0]=s,e[3]=i),4==e.length&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,e)}}GetPointsByTrapezoid(t,e,i,o,l){var s=e.x,n=e.y,a=i.x,r=i.y,p=o.x,u=o.y,h=0,g=0,c=0,y=0;if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(Math.abs(n-r),0))h=s+a-p,g=u;else if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(Math.abs(s-a),0))h=p,g=n+r-u;else{var P=1*(n-r)/(s-a),S=u-P*p;g=P*(h=((r+n)/2+(s+a)/(2*P)-S)/(P+1/P))+S,h=2*h-p,g=2*g-u}var d=Math.sqrt(1*(s-a)*(s-a)+1*(n-r)*(n-r)),m=Math.sqrt(1*(s-h)*(s-h)+1*(n-g)*(n-g));d>0?(c=s+(a-s)*m/d,y=n+(r-n)*m/d):(c=s,y=n);var f=c+(h-c)*t,L=y+(g-y)*t;l.x=f,l.y=L}};SuperMapAlgoPlot.GeoTooltipBox=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.126),this.CLASS_NAME="SuperMapAlgoPlot.GeoTooltipBox"}destroy(){super.destroy()}calculateParts(){this.init();var t=this.scaleValues[0];if(!(t<0||t>1)){if(t=(1-t)/2,this.controlPoints.length>=this.minEditPts){var e,i,o,l,s,n;this.controlPoints[2]&&(this.controlPoints[2].isFixedPos=!0),this.controlPoints[0].x<this.controlPoints[1].x?(e=this.controlPoints[0].x,o=this.controlPoints[1].x):(e=this.controlPoints[1].x,o=this.controlPoints[0].x),this.controlPoints[0].y<this.controlPoints[1].y?(l=this.controlPoints[0].y,i=this.controlPoints[1].y):(l=this.controlPoints[1].y,i=this.controlPoints[0].y),s=this.controlPoints[2].x,n=this.controlPoints[2].y;var a=0,r=(i-l)/(o-e);a=s<e?n>i?Math.abs((n-i)/(s-e))>r?2:1:n<l&&Math.abs((n-l)/(s-e))>r?4:1:s>o?n>i?Math.abs((n-i)/(s-o))>r?2:3:n<l&&Math.abs((n-l)/(s-o))>r?4:3:n>i?2:n<l?4:0,this.scalePoints=[];var p=[];switch(p.push(new SuperMapAlgoPlot.Point(e,l)),p.push(new SuperMapAlgoPlot.Point(e,i)),p.push(new SuperMapAlgoPlot.Point(o,i)),p.push(new SuperMapAlgoPlot.Point(o,l)),a){case 0:break;case 1:this.addScalePoint(new SuperMapAlgoPlot.Point(e,i-(i-l)*t)),p.splice(a,0,new SuperMapAlgoPlot.Point(e,i-(i-l)*t)),p.splice(a,0,this.controlPoints[2].clone()),p.splice(a,0,new SuperMapAlgoPlot.Point(e,l+(i-l)*t));break;case 2:this.addScalePoint(new SuperMapAlgoPlot.Point(o-(o-e)*t,i)),p.splice(a,0,new SuperMapAlgoPlot.Point(o-(o-e)*t,i)),p.splice(a,0,this.controlPoints[2].clone()),p.splice(a,0,new SuperMapAlgoPlot.Point(e+(o-e)*t,i));break;case 3:this.addScalePoint(new SuperMapAlgoPlot.Point(o,i-(i-l)*t)),p.splice(a,0,new SuperMapAlgoPlot.Point(o,l+(i-l)*t)),p.splice(a,0,this.controlPoints[2].clone()),p.splice(a,0,new SuperMapAlgoPlot.Point(o,i-(i-l)*t));break;case 4:this.addScalePoint(new SuperMapAlgoPlot.Point(o-(o-e)*t,l)),p.splice(a,0,new SuperMapAlgoPlot.Point(e+(o-e)*t,l)),p.splice(a,0,this.controlPoints[2].clone()),p.splice(a,0,new SuperMapAlgoPlot.Point(o-(o-e)*t,l))}this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,p),this.annotationContent(e,i,o,l)}this.finish()}}modifyPoint(t,e){if(!0===e.isScalePoint&&0==t){var i,o,l,s,n,a,r=this.scalePoints[0];this.controlPoints[0].x<this.controlPoints[1].x?(i=this.controlPoints[0].x,l=this.controlPoints[1].x):(i=this.controlPoints[1].x,l=this.controlPoints[0].x),this.controlPoints[0].y<this.controlPoints[1].y?(s=this.controlPoints[0].y,o=this.controlPoints[1].y):(s=this.controlPoints[1].y,o=this.controlPoints[0].y),n=this.controlPoints[2].x,a=this.controlPoints[2].y;var p=(o-s)/(l-i),u=.25;switch(n<i?a>o?Math.abs((a-o)/(n-i))>p?2:1:a<s&&Math.abs((a-s)/(n-i))>p?4:1:n>l?a>o?Math.abs((a-o)/(n-l))>p?2:3:a<s&&Math.abs((a-s)/(n-l))>p?4:3:a>o?2:a<s?4:0){case 1:case 3:var h=r.y+(e.y-r.y);h>o&&(h=o),h<(o+s)/2&&(h=(o+s)/2),u=1-2*(o-h)/(o-s);break;case 2:case 4:var g=r.x+(e.x-r.x);g>l&&(g=l),g<(i+l)/2&&(g=(i+l)/2),u=1-2*(l-g)/(l-i)}u<0&&(u=0),u>1&&(u=1),this.scaleValues[0]=u}this.calculateParts()}};SuperMapAlgoPlot.GeoTooltipBoxM=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(0),this.scaleValues.push(0),this.scaleValues.push(0),this.scaleValues.push(0)),this.CLASS_NAME="SuperMapAlgoPlot.GeoTooltipBoxM"}destroy(){super.destory()}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=this.minEditPts){var e,i,o,l;t[0].x<t[1].x?(e=t[0].x,o=t[1].x):(e=t[1].x,o=t[0].x),t[0].y<t[1].y?(l=t[0].y,i=t[1].y):(l=t[1].y,i=t[0].y),this.scalePoints=[];var s=[];s.push(new SuperMapAlgoPlot.Point(e,l)),s.push(new SuperMapAlgoPlot.Point(e,i)),s.push(new SuperMapAlgoPlot.Point(o,i)),s.push(new SuperMapAlgoPlot.Point(o,l)),this.isEdit||(this.scaleValues[0]=e,this.scaleValues[1]=l-.3*(i-l),this.scaleValues[2]=e+.5*(o-e),this.scaleValues[3]=l-.3*(i-l));var n=[],a=[];for(let t=0;t<this.scaleValues.length/2;t++)n.push(this.getAction(this.scaleValues[2*t],this.scaleValues[2*t+1],e,i,o,l)),a.push(new SuperMapAlgoPlot.Point(this.scaleValues[2*t],this.scaleValues[2*t+1]));var r,p,u,h,g=a.length,c=[],y=[],P=[],S=[],d=[];for(let t=0;t<n.length;t++)0===n[t]&&c.push(a[t]),1===n[t]&&y.push(a[t]),2===n[t]&&P.push(a[t]),3===n[t]&&S.push(a[t]),4===n[t]&&d.push(a[t]);var m=n.slice();m.sort();var f=new SuperMapAlgoPlot.Point(0,0);if(m[0]===m[m.length-1]&&0!==m[0]){var L=[];switch(m[0]){case 0:break;case 1:r=1/(2*y.length+1);var M=new SuperMapAlgoPlot.Point;for(let t=0;t<2*y.length;t++)M=new SuperMapAlgoPlot.Point(e,l+(i-l)*r*(t+1)),L.unshift(M);break;case 2:p=1/(2*P.length+1);var b=new SuperMapAlgoPlot.Point;for(let t=0;t<2*P.length;t++)b=new SuperMapAlgoPlot.Point(e+(o-e)*p*(t+1),i),L.unshift(b);break;case 3:u=1/(2*S.length+1);var A=new SuperMapAlgoPlot.Point;for(let t=0;t<2*S.length;t++)A=new SuperMapAlgoPlot.Point(o,l+(i-l)*u*(t+1)),L.push(A);break;case 4:h=1/(2*d.length+1);var T=new SuperMapAlgoPlot.Point;for(let t=0;t<2*d.length;t++)T=new SuperMapAlgoPlot.Point(e+(o-e)*h*(t+1),l),L.push(T)}for(let t=0;t<g;t++)for(let e=0;e<g;e++){let i=SuperMapAlgoPlot.PlottingUtil.intersectLineSegs(L[2*t+1],a[t],L[2*e],a[e],f);if(i&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(f.x,L[2*t+1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(f.y,L[2*t+1].y)&&(i=!1),i){let i=a[e].clone();a[e]=a[t],a[t]=i}}for(let t=0;t<g;t++)s.splice(m[0],0,L[2*t]),s.splice(m[0],0,a[t]),s.splice(m[0],0,L[2*t+1])}else{var v,_,x=[],O=[],w=[],I=[];for(let t=0;t<n.length;t++)switch(n[t]){case 0:break;case 1:r=1/(2*y.length+1);for(let t=0;t<2*y.length;t++){var C=new SuperMapAlgoPlot.Point(e,l+(i-l)*r*(t+1));x.unshift(C)}for(let t=0;t<y.length;t++)for(let e=1;e<y.length;e++)(v=SuperMapAlgoPlot.PlottingUtil.intersectLineSegs(x[2*t+1],y[t],x[2*e],y[e],f))&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(f.x,x[2*t+1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(f.y,x[2*t+1].y)&&(v=!1),v&&(_=y[e].clone(),y[e]=y[t],y[t]=_);break;case 2:p=1/(2*P.length+1);for(let t=0;t<2*P.length;t++){var E=new SuperMapAlgoPlot.Point(e+(o-e)*p*(t+1),i);O.unshift(E)}for(let t=0;t<P.length;t++)for(let e=1;e<P.length;e++)(v=SuperMapAlgoPlot.PlottingUtil.intersectLineSegs(O[2*t+1],P[t],O[2*e],P[e],f))&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(f.x,O[2*t+1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(f.y,O[2*t+1].y)&&(v=!1),v&&(_=P[e].clone(),P[e]=P[t],P[t]=_);break;case 3:u=1/(2*S.length+1);for(let t=0;t<2*S.length;t++){var D=new SuperMapAlgoPlot.Point(o,l+(i-l)*u*(t+1));w.push(D)}for(let t=0;t<S.length;t++)for(let e=1;e<S.length;e++)(v=SuperMapAlgoPlot.PlottingUtil.intersectLineSegs(w[2*t+1],S[t],w[2*e],S[e],f))&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(f.x,w[2*t+1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(f.y,w[2*t+1].y)&&(v=!1),v&&(_=S[e].clone(),S[e]=S[t],S[t]=_);break;case 4:h=1/(2*d.length+1);for(let t=0;t<2*d.length;t++){var U=new SuperMapAlgoPlot.Point(e+(o-e)*h*(t+1),l);I.push(U)}for(let t=0;t<d.length;t++)for(let e=1;e<d.length;e++)(v=SuperMapAlgoPlot.PlottingUtil.intersectLineSegs(I[2*t+1],d[t],I[2*e],d[e],f))&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(f.x,I[2*t+1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(f.y,I[2*t+1].y)&&(v=!1),v&&(_=d[e].clone(),d[e]=d[t],d[t]=_)}for(let t=0;t<d.length;t++)s.splice(4,0,I[2*t]),s.splice(4,0,d[t]),s.splice(4,0,I[2*t+1]);for(let t=0;t<S.length;t++)s.splice(3,0,w[2*t]),s.splice(3,0,S[t]),s.splice(3,0,w[2*t+1]);for(let t=0;t<P.length;t++)s.splice(2,0,O[2*t]),s.splice(2,0,P[t]),s.splice(2,0,O[2*t+1]);for(let t=0;t<y.length;t++)s.splice(1,0,x[2*t]),s.splice(1,0,y[t]),s.splice(1,0,x[2*t+1])}for(let t=0;t<a.length;t++)this.addScalePoint(a[t],t)}this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,s),this.annotationContent(e,i,o,l),this.finish()}modifyPoint(t,e){!0===e.isScalePoint&&(null==t&&void 0===t||(this.scaleValues[2*t]=e.x,this.scaleValues[2*t+1]=e.y)),this.calculateParts()}getAction(t,e,i,o,l,s){var n=(o-s)/(l-i);return t<i?e>o?Math.abs((e-o)/(t-i))>n?2:1:e<s&&Math.abs((e-s)/(t-i))>n?4:1:t>l?e>o?Math.abs((e-o)/(t-l))>n?2:3:e<s&&Math.abs((e-s)/(t-l))>n?4:3:e>o?2:e<s?4:0}};SuperMapAlgoPlot.SymbolTextBox=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.roundBox=!!t.roundBox&&t.roundBox,this.textBoxType=t.textBoxType?t.textBoxType:SuperMapAlgoPlot.TextBoxType.WITHTIPBOX,0===this.scaleValues.length&&(this.scaleValues.push(.126),this.scaleValues.push(0),this.scaleValues.push(0)),this.CLASS_NAME="SuperMapAlgoPlot.SymbolTextBox"}destroy(){this.roundBox=null,this.textBoxType=null,super.destroy()}calculateParts(){this.init();var t=this.scaleValues[0];if(!(t<0||t>1)){if(t=(1-t)/2,this.controlPoints.length>=this.minEditPts){var e,i,o,l;this.scalePoints=[];var s=[];this.controlPoints[0].x<this.controlPoints[1].x?(e=this.controlPoints[0].x,o=this.controlPoints[1].x):(e=this.controlPoints[1].x,o=this.controlPoints[0].x),this.controlPoints[0].y<this.controlPoints[1].y?(l=this.controlPoints[0].y,i=this.controlPoints[1].y):(l=this.controlPoints[1].y,i=this.controlPoints[0].y);var n=1,a=2,r=3,p=4;if(this.roundBox){var u=Math.max(e,o),h=Math.min(e,o),g=Math.max(i,l),c=Math.min(i,l),y=.1*Math.min(Math.abs(e-o),Math.abs(i-l)),P=new SuperMapAlgoPlot.Point(h+y,c+y),S=new SuperMapAlgoPlot.Point(h+y,g-y),d=new SuperMapAlgoPlot.Point(u-y,g-y),m=new SuperMapAlgoPlot.Point(u-y,c+y),f=this.calculateArc(P,y,3*Math.PI/2,Math.PI,-1,180),L=this.calculateArc(S,y,Math.PI,Math.PI/2,-1,180),M=this.calculateArc(d,y,Math.PI/2,0,-1,180),b=this.calculateArc(m,y,2*Math.PI,3*Math.PI/2,-1,180);n=f.length,a=f.length+L.length,r=f.length+L.length+M.length,p=f.length+L.length+M.length+b.length,s=f.concat(L,M,b)}else s.push(new SuperMapAlgoPlot.Point(e,l)),s.push(new SuperMapAlgoPlot.Point(e,i)),s.push(new SuperMapAlgoPlot.Point(o,i)),s.push(new SuperMapAlgoPlot.Point(o,l));this.isEdit||(this.scaleValues[1]=e+.1*(o-e),this.scaleValues[2]=l+-.3*(i-l));var A=new SuperMapAlgoPlot.Point(this.scaleValues[1],this.scaleValues[2]),T=this.getAction(this.scaleValues[1],this.scaleValues[2],e,i,o,l);if(this.textBoxType===SuperMapAlgoPlot.TextBoxType.WITHTIPBOX)switch(this.addScalePoint(A,0),T){case 0:break;case 1:this.addScalePoint(new SuperMapAlgoPlot.Point(e,i-(i-l)*t)),s.splice(n,0,new SuperMapAlgoPlot.Point(e,i-(i-l)*t)),s.splice(n,0,A),s.splice(n,0,new SuperMapAlgoPlot.Point(e,l+(i-l)*t));break;case 2:this.addScalePoint(new SuperMapAlgoPlot.Point(o-(o-e)*t,i)),s.splice(a,0,new SuperMapAlgoPlot.Point(o-(o-e)*t,i)),s.splice(a,0,A),s.splice(a,0,new SuperMapAlgoPlot.Point(e+(o-e)*t,i));break;case 3:this.addScalePoint(new SuperMapAlgoPlot.Point(o,i-(i-l)*t)),s.splice(r,0,new SuperMapAlgoPlot.Point(o,l+(i-l)*t)),s.splice(r,0,A),s.splice(r,0,new SuperMapAlgoPlot.Point(o,i-(i-l)*t));break;case 4:this.addScalePoint(new SuperMapAlgoPlot.Point(o-(o-e)*t,l)),s.splice(p,0,new SuperMapAlgoPlot.Point(e+(o-e)*t,l)),s.splice(p,0,A),s.splice(p,0,new SuperMapAlgoPlot.Point(o-(o-e)*t,l))}0!==s.length&&(this.textBoxType===SuperMapAlgoPlot.TextBoxType.NONEBOX?this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,s,{surroundLineFlag:!1,weight:0,lineWidthLimit:!0}):this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,s))}else this.controlPoints.length>=2&&this.controlPoints.length<this.minEditPts&&this.addCell(SuperMapAlgoPlot.SymbolType.RECTANGLESYMBOL,this.controlPoints);this.annotationContent(e,i,o,l),this.finish()}}modifyPoint(t,e){if(!0===e.isScalePoint)if(0===t)this.scaleValues[1]=e.x,this.scaleValues[2]=e.y;else if(1===t){var i,o,l,s,n,a,r=this.scalePoints[0];this.controlPoints[0].x<this.controlPoints[1].x?(i=this.controlPoints[0].x,l=this.controlPoints[1].x):(i=this.controlPoints[1].x,l=this.controlPoints[0].x),this.controlPoints[0].y<this.controlPoints[1].y?(s=this.controlPoints[0].y,o=this.controlPoints[1].y):(s=this.controlPoints[1].y,o=this.controlPoints[0].y),n=this.scaleValues[1],a=this.scaleValues[2];var p=(o-s)/(l-i),u=.25;switch(n<i?a>o?Math.abs((a-o)/(n-i))>p?2:1:a<s&&Math.abs((a-s)/(n-i))>p?4:1:n>l?a>o?Math.abs((a-o)/(n-l))>p?2:3:a<s&&Math.abs((a-s)/(n-l))>p?4:3:a>o?2:a<s?4:0){case 1:case 3:var h=r.y+(e.y-r.y);h>o&&(h=o),h<(o+s)/2&&(h=(o+s)/2),u=1-2*(o-h)/(o-s);break;case 2:case 4:var g=r.x+(e.x-r.x);g>l&&(g=l),g<(i+l)/2&&(g=(i+l)/2),u=1-2*(l-g)/(l-i)}u<0&&(u=0),u>1&&(u=1),this.scaleValues[0]=u}this.calculateParts()}calculateArc(t,e,i,o,l,s){(!l||1!=l&&-1!=l)&&(l=-1),s||(s=360);var n=Math.PI/s/2,a=n*l,r=Math.abs(o-i),p=[];for(let o=i,l=0;l<r;l+=n){var u=new SuperMapAlgoPlot.Point(Math.cos(o)*e+t.x,Math.sin(o)*e+t.y);p.push(u),o=(o=(o+=a)<0?o+2*Math.PI:o)>2*Math.PI?o-2*Math.PI:o}return p}getAction(t,e,i,o,l,s){var n=(o-s)/(l-i);return t<i?e>o?Math.abs((e-o)/(t-i))>n?2:1:e<s&&Math.abs((e-s)/(t-i))>n?4:1:t>l?e>o?Math.abs((e-o)/(t-l))>n?2:3:e<s&&Math.abs((e-s)/(t-l))>n?4:3:e>o?2:e<s?4:0}};SuperMapAlgoPlot.ConcentricCircle=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),void 0===this.scaleValues[0]&&(this.scaleValues[0]=0),void 0===this.scaleValues[1]&&(this.scaleValues[1]=360),this.CLASS_NAME="SuperMapAlgoPlot.ConcentricCircle"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!(null==(t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t))||t.length<2)){for(;this.scaleValues[0]>360;)this.scaleValues[0]-=360;for(;this.scaleValues[0]<0;)this.scaleValues[0]+=360;for(;this.scaleValues[1]>360;)this.scaleValues[1]-=360;for(;this.scaleValues[1]<0;)this.scaleValues[1]+=360;for(;this.scaleValues[1]<=this.scaleValues[0];)this.scaleValues[1]+=360;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.scaleValues[1],this.scaleValues[0])&&(this.scaleValues[1]+=360);var e=[];for(let c=0;c<t.length-1;c++){var i=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[c+1]),o=[],l=Math.PI/180,s=(this.scaleValues[1]-this.scaleValues[0])/72;for(let e=this.scaleValues[0];e<this.scaleValues[1]+s/2;e+=s){var n=t[0].x+i*Math.cos(e*l),a=t[0].y+i*Math.sin(e*l);o.push(new SuperMapAlgoPlot.Point(n,a))}if(c>0){var r=[];for(let t=0;t<e.length;t++)r.push(e[t]);for(let t=o.length-1;t>=0;t--)r.push(o[t]);this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,r,{surroundLineFlag:!1,lineWidthLimit:!0,weight:0,strokeWidth:0})}e.length=0;for(let t=0;t<o.length;t++)e.push(o[t]);if(this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[t[0],t[c+1]],{surroundLineFlag:!1,fillLimit:!0,fill:!1}),c<2){var p=c%2,u=t[0].x+i/2*Math.cos(this.scaleValues[p]*l),h=t[0].y+i/2*Math.sin(this.scaleValues[p]*l),g=new SuperMapAlgoPlot.Point(u,h);g.isScalePoint=!0,g.tag=c,this.addScalePoint(g)}}}}modifyPoint(t,e){if(!0===e.isScalePoint){for(var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints),o=180*SuperMapAlgoPlot.PlottingUtil.radian(i[0],e)/Math.PI;o>360;)o-=360;for(;o<0;)o+=360;t%2==0?this.scaleValues[0]=o:t%2==1&&(this.scaleValues[1]=o)}this.calculateParts()}};SuperMapAlgoPlot.CombinationalCircle=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.angleRange=[],this.defaultRadius=t.defaultRadius?t.defaultRadius:60,this.CLASS_NAME="SuperMapAlgoPlot.CombinationalCircle"}calculateParts(){if(this.init(),this.controlPoints=SuperMapAlgoPlot.PlottingUtil.clearSamePts(this.controlPoints),null==this.controlPoints||this.controlPoints.length<1)return;var t=this.getCircleLonLat(this.controlPoints[0],this.defaultRadius);this.angleRange=[];for(let e=0;e<this.controlPoints.length;e++)null==this.scaleValues[e]&&(this.scaleValues[e]=t),this.angleRange.push([{Start:0,End:360}]);var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);for(let t=0;t<e.length;t++)if(0!==this.angleRange[t].length&&(0!==this.angleRange[t][0].Start||0!==this.angleRange[t][0].End))for(let p=t+1;p<e.length;p++)if(0!==this.angleRange[p].length&&(0!==this.angleRange[p][0].Start||0!==this.angleRange[p][0].End)){var i=SuperMapAlgoPlot.PlottingUtil.distance(e[t],e[p]);if(i<this.scaleValues[t]+this.scaleValues[p])if(i>Math.abs(this.scaleValues[t]-this.scaleValues[p]))for(let u=0;u<2;u++){var o,l,s;0==u?(s=t,o=SuperMapAlgoPlot.PlottingUtil.radian(e[t],e[p])*SuperMapAlgoPlot.PlottingUtil.RTOD,l=Math.acos((i*i+this.scaleValues[t]*this.scaleValues[t]-this.scaleValues[p]*this.scaleValues[p])/(2*i*this.scaleValues[t]))*SuperMapAlgoPlot.PlottingUtil.RTOD):(s=p,o=SuperMapAlgoPlot.PlottingUtil.radian(e[p],e[t])*SuperMapAlgoPlot.PlottingUtil.RTOD,l=Math.acos((i*i+this.scaleValues[p]*this.scaleValues[p]-this.scaleValues[t]*this.scaleValues[t])/(2*i*this.scaleValues[p]))*SuperMapAlgoPlot.PlottingUtil.RTOD);var n=o-l,a=o+l,r=n<0&&a>0||n>360||a>360;n=this.adjustAngle(n),a=this.adjustAngle(a);for(let t=this.angleRange[s].length-1;t>=0;t--)if(r){if(a>this.angleRange[s][t].End||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(a,this.angleRange[s][t].End)){this.angleRange[s].splice(t,1);continue}if(a>this.angleRange[s][t].Start&&(this.angleRange[s][t].Start=a),n<this.angleRange[s][t].Start||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(n,this.angleRange[s][t].Start)){this.angleRange[s].splice(t,1);continue}n<this.angleRange[s][t].End&&(this.angleRange[s][t].End=n)}else if(n<this.angleRange[s][t].Start&&a>this.angleRange[s][t].End)this.angleRange[s].splice(t,1);else if(n>this.angleRange[s][t].Start&&a<this.angleRange[s][t].End)this.angleRange[s].push({Start:this.angleRange[s][t].Start,End:n}),this.angleRange[s].push({Start:a,End:this.angleRange[s][t].End}),this.angleRange[s].splice(t,1);else{if(n>this.angleRange[s][t].End)continue;if(n>this.angleRange[s][t].Start&&(this.angleRange[s][t].End=n),a<this.angleRange[s][t].Start)continue;a<this.angleRange[s][t].End&&(this.angleRange[s][t].Start=a)}}else{if(this.scaleValues[t]<this.scaleValues[p]){this.angleRange[t][0].Start=0,this.angleRange[t][0].End=0;break}this.angleRange[p][0].Start=0,this.angleRange[p][0].End=0}}var p=[];for(let t=0;t<e.length;t++)if(0!==this.angleRange[t].length&&(0!==this.angleRange[t][0].Start||0!==this.angleRange[t][0].End))for(let i=this.angleRange[t].length-1;i>=0;i--){for(var u=this.adjustAngle(this.angleRange[t][i].Start),h=this.adjustAngle(this.angleRange[t][i].End);h<u;)h+=360;if(h-u==360)this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[e[t],new SuperMapAlgoPlot.Point(e[t].x,e[t].y+this.scaleValues[t])]);else{var g=[],c=(h-u)/72;for(let i=u;i<h+c/2;i+=c){var y=e[t].x+this.scaleValues[t]*Math.cos(i*SuperMapAlgoPlot.PlottingUtil.DTOR),P=e[t].y+this.scaleValues[t]*Math.sin(i*SuperMapAlgoPlot.PlottingUtil.DTOR);g.push(new SuperMapAlgoPlot.Point(y,P))}p.push(g)}}var S=[];let d=[];for(;0!==p.length;){var m=p[0];p.splice(0,1),void 0!==(m=this.generatePolygon(p,m))&&(S.push(m),d.push(m))}var f=S.length;for(let t=f-1;t>=0;t--)for(let e=0;e<S[t].length;e++){var L=-1,M=-1;for(let i=0;i<f;i++)if(parseInt(i)!==t){var b=S[i];if(SuperMapAlgoPlot.PlottingUtil.ptIsInPolygon(b,S[t][e])){L=t,S[M=parseInt(i)].push(S[M][0]),S[L].push(S[L][0]),S[M]=S[M].concat(S[L]),S.splice(L,1),f=S.length;break}}if(-1!==L&&-1!==M)break}var A={surroundLineFlag:!1,lineWidthLimit:!0,weight:0,strokeWidth:0,surroundLineType:0};for(let t=0;t<S.length;t++)S[t][0]!=S[t][S[t].length-1]&&S[t].push(S[t][0]),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,S[t],A);for(let t=0;t<d.length;t++)d[t][0]!=d[t][d[t].length-1]&&d[t].push(d[t][0]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,d[t]);for(let t=0;t<e.length;t++){var T=new SuperMapAlgoPlot.Point(e[t].x+this.scaleValues[t],e[t].y);T.isScalePoint=!0,T.tag=t,this.addScalePoint(T)}}generatePolygon(t,e){if(0===t.length||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(e[0].x,e[e.length-1].x,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(e[0].y,e[e.length-1].y,1e-10))return e;var i,o=e[e.length-1];for(let l=0;l<t.length;l++)if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[l][0].x,o.x,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[l][0].y,o.y,1e-10)){if(e=e.concat(t[l]),t.splice(l,1),void 0!==(i=this.generatePolygon(t,e))&&0!==i.length)return i}else if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[l][t[l].length-1].x,o.x,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[l][t[l].length-1].y,o.y,1e-10)){for(let i=t[l].length-1;i>=0;i--)e.push(t[l][i]);if(t.splice(l,1),void 0!==(i=this.generatePolygon(t,e))&&0!==i.length)return i}}modifyPoint(t,e){if(!0===e.isScalePoint){if(t<0||t>=this.controlPoints.length)return;var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints),o=SuperMapAlgoPlot.PlottingUtil.distance(i[t],e);this.scaleValues[t]=o}this.calculateParts()}adjustAngle(t){for(;t>360;)t-=360;for(;t<0;)t+=360;return t}getCircleLonLat(t,e){return null===this.map?2*this.getDefaultSubSymbolSize():this.map&&"undefined"!=typeof L&&void 0!==L.Map&&this.map instanceof L.Map?((i=this.map.latLngToLayerPoint(L.latLng(t.y,t.x))).x+=e,this.map.layerPointToLatLng(L.point(i.x,i.y)).lng-t.x):this.map&&"undefined"!=typeof SuperMap&&void 0!==SuperMap.Map&&this.map instanceof SuperMap.Map?((i=this.map.getPixelFromLonLat(new SuperMap.LonLat(t.x,t.y))).x+=e,this.map.getLonLatFromPixel(new SuperMap.Pixel(i.x,i.y)).lon-t.x):void 0;var i}};SuperMapAlgoPlot.FreeCurve=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.CLASS_NAME="SuperMapAlgoPlot.FreeCurve"}calculateParts(){if(this.init(),!(null==this.controlPoints||this.controlPoints.length<this.minEditPts)){this.scalePoints=[];var t=[];if(this.controlPoints.length<3)t.push(this.controlPoints[0]),t.push(this.controlPoints[1]);else{if(!this.isEdit){var e=this.getLonLatFromPixel(0,0),i=this.getLonLatFromPixel(100,100),o=Math.abs(e.lon-i.lon),l=this.reSample(this.controlPoints,o/50);l.length<3&&(l=this.controlPoints),this.controlPoints=[],this.controlPoints=this.controlPoints.concat(l)}var s=SuperMapAlgoPlot.PlottingUtil.computeBeizerPoints(this.isEdit,this.controlPoints,this.scaleValues);s.scalePoints=SuperMapAlgoPlot.PlottingUtil.clearSamePts(s.scalePoints),s.scaleValues=SuperMapAlgoPlot.PlottingUtil.clearSamePts(s.scaleValues),this.scaleValues=s.scaleValues;for(let t=0,e=s.scalePoints.length;t<e;t++){var n=s.scalePoints[t];n.isScalePoint=!0,n.tag=t,this.addScalePoint(n)}t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints)}this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,t)}}modifyPoint(t,e){if(!0===e.isScalePoint){if(t<0||t>2*this.controlPoints.length-1)return;var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(2>i.length)return;var o=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i),l=-1;l=t%2==0?Math.floor(t/2):Math.floor((t+1)/2);var s=(e.x-i[l].x)/o,n=(e.y-i[l].y)/o;this.scaleValues[2*t]=s,this.scaleValues[2*t+1]=n}this.calculateParts()}reSample(t,e){var i=[];if(null==t||e<0)return i;var o=t.length;if(o>2){var l=new SuperMapAlgoPlot.Point(0,0),s=0,n=0,a=0,r=2*Math.PI;l=t[0],i.push(l);var p=!1,u=!1,h=!1;for(let P=1;P<o;P++)if(n=Math.sqrt((t[P].y-l.y)*(t[P].y-l.y)+(t[P].x-l.x)*(t[P].x-l.x)),SuperMapAlgoPlot.PlottingUtil.equalFuzzy(0,n))p&&(l=t[P-1],P--,i.push(l),a=0,r=2*Math.PI,p=!1,u=!1,h=!1);else{var g=(t[P].x-l.x)/n,c=(t[P].y-l.y)/n;if(s=c>0||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(0,c)?Math.acos(g):2*Math.PI-Math.acos(g),r>2*Math.PI&&s+2*Math.PI<r?(s+=2*Math.PI,a<0&&(a+=2*Math.PI)):a<0&&s-2*Math.PI>a&&(s-=2*Math.PI,r>2*Math.PI&&(r-=2*Math.PI)),s>a&&s<r||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(0,s-a)||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(0,s-r)){var y=Math.atan(e/n);u?a<s-y&&(a=s-y):(u=!0,a=s-y),h?r>s+y&&(r=s+y):(h=!0,r=s+y),p=!0}else l=t[P-1],P--,i.push(l),a=0,r=2*Math.PI,p=!1,u=!1,h=!1}return i.push(t[o-1]),i}return i}reSampleByAngle(t,e){var i=[],o=t.length;if(null==t||o<=0||e<=0)return i;for(var l=t,s=o,n=!1;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l[0].x,l[s-1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l[0].y,l[s-1].y);){if((s-=1)<=0)return i;n=!0}var a,r,p=[];for(a=0;a<s;a++)p.push(0);for(p[0]=1,p[s-1]=1,r=0,a=1;a<s-1;a++)if(SuperMapAlgoPlot.PlottingUtil.distance(l[r],l[a])>1e-10&&SuperMapAlgoPlot.PlottingUtil.distance(l[r],l[a+1])>1e-10){var u=180*SuperMapAlgoPlot.PlottingUtil.InnerAngle(l[a],l[r],l[a+1])/Math.PI;u>e&&u<180-e&&(p[a]=1,r++)}var h=0;for(a=0;a<s;a++)1==p[a]&&h++;if(h>0){for(n&&h++,i=[],r=0,a=0;a<s;a++)1==p[a]&&(i[r++]=l[a]);return n&&(i[r]=i[0]),i}return i}};SuperMapAlgoPlot.NodeChain=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(0),this.scaleValues[1]=.1),this.CLASS_NAME="SuperMapAlgoPlot.NodeChain"}destroy(){super.destroy()}calculateParts(){if(this.init(),this.controlPoints&&null!==this.controlPoints){var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,t),this.isEdit||(this.scaleValues[1]=.25*this.getSubSymbolScaleValue());var e=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t),i=e*this.scaleValues[0],o=e*this.scaleValues[1];if(0<this.subSymbols.length&&null!==this.subSymbols[0]&&void 0!==this.subSymbols[0])if(this.subSymbols[0].code>0)for(let e=0;e<t.length;e++){var l=new SuperMapAlgoPlot.Point(t[e].x,t[e].y+i);this.computeSubSymbol(this.subSymbols[0],l,2*o,0)}else this.addCircles(t,i,o);else this.addCircles(t,i,o);var s=new SuperMapAlgoPlot.Point(t[0].x,t[0].y+i);this.addScalePoint(s);var n=SuperMapAlgoPlot.PlottingUtil.circlePoint(s,o,o,90);this.addScalePoint(n)}}}addCircles(t,e,i){var o={surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0};for(let n=0;n<t.length;n++){var l=new SuperMapAlgoPlot.Point(t[n].x,t[n].y+e),s=this.getCirclePts(l,i);this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,s,o)}}getCirclePts(t,e){var i=[];for(let l=0;l<=360;l+=12){var o=SuperMapAlgoPlot.PlottingUtil.circlePoint(t,e,e,l);i.push(o)}return i}modifyPoint(t,e){if(!0===e.isScalePoint){var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((i=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i)).length<this.minEditPts)return;var o=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i);if(0===t)this.scaleValues[0]=(e.y-i[0].y)/o;else if(1===t){var l=o*this.scaleValues[0],s=new SuperMapAlgoPlot.Point(i[0].x,i[0].y+l),n=SuperMapAlgoPlot.PlottingUtil.distance(e,s);this.scaleValues[1]=n/o}}this.calculateParts()}};SuperMapAlgoPlot.Runway=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.2),this.CLASS_NAME="SuperMapAlgoPlot.Runway"}destroy(){super.destroy()}calculateParts(){if(this.init(),this.controlPoints.length>=this.minEditPts){var t=this.controlPoints[0],e=this.controlPoints[1],i=SuperMapAlgoPlot.PlottingUtil.distance(t,e),o=this.scaleValues[0]*i,l=SuperMapAlgoPlot.PlottingUtil.parallel(this.controlPoints,o/2),s=SuperMapAlgoPlot.PlottingUtil.parallel(this.controlPoints,-o/2),n=180*SuperMapAlgoPlot.PlottingUtil.radian(t,e)/Math.PI,a=[];for(let e=n+90;e<=n+270;e+=10){var r=SuperMapAlgoPlot.PlottingUtil.circlePoint(t,o/2,o/2,e);a.push(r)}var p=[];for(let t=n-90;t<=n+90;t+=10){var u=SuperMapAlgoPlot.PlottingUtil.circlePoint(e,o/2,o/2,t);p.push(u)}var h=[];(h=(h=(h=(h=h.concat(a)).concat(s)).concat(p)).concat(l)).push(h[0]),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,h);var g=new SuperMapAlgoPlot.Point(a[0].x,a[0].y);this.addScalePoint(g)}}modifyPoint(t,e){if(!0===e.isScalePoint&&0==t){var i=SuperMapAlgoPlot.PlottingUtil.distance(e,this.controlPoints[0]),o=SuperMapAlgoPlot.PlottingUtil.distance(this.controlPoints[0],this.controlPoints[1]);this.scaleValues[0]=2*i/o}this.calculateParts()}};SuperMapAlgoPlot.CurveEight=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.CLASS_NAME="SuperMapAlgoPlot.CurveEight"}destroy(){super.destroy()}calculateParts(){if(this.init(),this.controlPoints&&null!==this.controlPoints&&!(this.minEditPts>this.controlPoints.length))if(2===this.controlPoints.length){let t=this.controlPoints[0].clone(),e=this.controlPoints[1].clone(),i=SuperMapAlgoPlot.PlottingUtil.distance(t,e)/2,o=180*SuperMapAlgoPlot.PlottingUtil.radian(t,e)/Math.PI,l=new SuperMapAlgoPlot.Point((t.x+e.x)/2,(t.y+e.y)/2),s=SuperMapAlgoPlot.PlottingUtil.circlePoint(l,i,i,o+90),n=SuperMapAlgoPlot.PlottingUtil.circlePoint(l,3*i,3*i,o+90);this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[s,new SuperMapAlgoPlot.Point(s.x+i,s.y)]),this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[n,new SuperMapAlgoPlot.Point(n.x+i,n.y)])}else{let n=this.controlPoints[0].clone(),a=this.controlPoints[1].clone(),r=this.controlPoints[2].clone(),p=0;p=SuperMapAlgoPlot.PlottingUtil.isRight(r,n,a)?180*SuperMapAlgoPlot.PlottingUtil.radian(a,n)/Math.PI+90:180*SuperMapAlgoPlot.PlottingUtil.radian(n,a)/Math.PI+90;let u=SuperMapAlgoPlot.PlottingUtil.distance(n,a)/2,h=new SuperMapAlgoPlot.Point((n.x+a.x)/2,(n.y+a.y)/2),g=SuperMapAlgoPlot.PlottingUtil.circlePoint(h,u,u,p),c=SuperMapAlgoPlot.PlottingUtil.plumbLineLen(r,n,a);if(c<=4*u){var t=SuperMapAlgoPlot.PlottingUtil.circlePoint(h,3*u,3*u,p);this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[g,new SuperMapAlgoPlot.Point(g.x+u,g.y)]),this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[t,new SuperMapAlgoPlot.Point(t.x+u,t.y)])}else{let t=SuperMapAlgoPlot.PlottingUtil.circlePoint(h,c-u,c-u,p),n=180*Math.acos(u/(c-2*u))/Math.PI,a=p-n,r=p-180+n,y=p-180-n+360;var e=[];for(let t=p+n-360;t<=a;t+=4){let i=SuperMapAlgoPlot.PlottingUtil.circlePoint(g,u,u,t);e.push(i)}var i=SuperMapAlgoPlot.PlottingUtil.circlePoint(g,u,u,a);e.push(i);var o=[];for(let e=r;e<y;e+=4){let i=SuperMapAlgoPlot.PlottingUtil.circlePoint(t,u,u,e);o.push(i)}var l=SuperMapAlgoPlot.PlottingUtil.circlePoint(t,u,u,y);o.push(l);var s=[];s=s.concat(e);for(let t=o.length-1;t>=0;t--)s.push(o[t]);this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,s)}}}};SuperMapAlgoPlot.PathText=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.relLineText=t.relLineText?t.relLineText:0,this.showPathLine=!t.showPathLine||t.showPathLine,this.showPathLineArrow=!!t.showPathLineArrow&&t.showPathLineArrow,this.isCurve=!!t.isCurve&&t.isCurve,this.isAvoid=!!t.isAvoid&&t.isAvoid,this.textToLineDistance=t.textToLineDistance?t.textToLineDistance:0,this.fontSpace=t.fontSpace?t.fontSpace:0,this.dNowPassedDistance=t.dNowPassedDistance?t.dNowPassedDistance:2,this.isScalePoint=!1,this.oldPathTextStart=void 0,this.oldDNowPassedDistance=2,this.CLASS_NAME="SuperMapAlgoPlot.PathText"}calculateParts(){if(this.init(),null!==this.controlPoints&&0!==this.controlPoints.length&&!(this.controlPoints.length<this.minEditPts)){SuperMap.Util.isArray(this.textContent)||(this.textContent=[this.textContent]);var t=[];if(t=this.isCurve?SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(this.controlPoints):SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints),this.relLineText===SuperMapAlgoPlot.RelLineText.ONBOTHLINE){this.relLineText=SuperMapAlgoPlot.RelLineText.ONRIGHTLINE,this.textPathPts=this.getTextPathPts(t,!1),this.computeText(this.textPathPts,this.textContent[0],t),this.relLineText=SuperMapAlgoPlot.RelLineText.ONLEFTLINE;var e=this.showPathLine;this.showPathLine=!1,this.textPathPts=this.getTextPathPts(t,!0),this.textContent.length>1?this.computeText(this.textPathPts,this.textContent[1],t):this.computeText(this.textPathPts,this.textContent[0],t),this.relLineText=SuperMapAlgoPlot.RelLineText.ONBOTHLINE,this.showPathLine=e}else this.relLineText===SuperMapAlgoPlot.RelLineText.ONRIGHTLINE?this.textPathPts=this.getTextPathPts(t,!1):this.relLineText===SuperMapAlgoPlot.RelLineText.ONLEFTLINE?this.textPathPts=this.getTextPathPts(t,!0):this.textPathPts=t,this.computeText(this.textPathPts,this.textContent[0],t);this.finish()}}getTextPathPts(t,e){t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t);var i=this.getLonLatDistanceFromPixel(this.textToLineDistance);if(0>=i)return SuperMapAlgoPlot.PlottingUtil.clonePoints(t);var o=SuperMapAlgoPlot.PlottingUtil.paraLine(t,i,e);return SuperMapAlgoPlot.PlottingUtil.clearSamePts(o)}computeText(t,e,i){if(!(t.length<2)){var o=e.length,l=t,s=l.length,n=0;for(let t=0;t<l.length-1;t++)n+=SuperMapAlgoPlot.PlottingUtil.distance(l[t],l[t+1]);var a={index:-1,pt:l[0]},r=0,p=0,u=180/Math.PI,h=this.getTextBounds(this.style,e),g="lm";g=this.relLineText===SuperMapAlgoPlot.RelLineText.ONLINE?"lm":this.relLineText===SuperMapAlgoPlot.RelLineText.ONLEFTLINE?"lb":"lt",this.isScalePoint||(this.dNowPassedDistance=this.oldDNowPassedDistance),this.dNowPassedDistance<=0&&(this.dNowPassedDistance=0);var c=[];for(let t=0;t<o;t++){var y=this.getTextBounds(this.style,e.charAt(t));c.push(new SuperMap.Bounds(0,-h.getHeight(),y.getWidth(),0))}var P,S=!1,d=!1,m=!0,f=0,L=0,M=[];for(this.fontSpace=m?(n-2*this.dNowPassedDistance-h.getWidth())/(o+1):(n-2*this.dNowPassedDistance-h.getHeight())/(o+1),this.fontSpace<0&&(this.fontSpace=0);r<=this.dNowPassedDistance&&p<s-1;)p++,r+=SuperMapAlgoPlot.PlottingUtil.distance(l[p-1],l[p]);var b=this.oldPathTextStart;b=this.isScalePoint||!this.oldPathTextStart?SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(l,this.dNowPassedDistance):this.oldPathTextStart;var A=SuperMapAlgoPlot.PlottingUtil.radian(l[p-1],l[p])*u;A>180&&(A-=360),A<-180&&(A+=360),A>90&&A<=180?(f=-180,S=!0,d=!0):A>-180&&A<-90&&(f=180,S=!0,d=!0),m=!0,0!=f?this.relLineText===SuperMapAlgoPlot.RelLineText.ONLINE||(g=this.relLineText===SuperMapAlgoPlot.RelLineText.ONLEFTLINE?"lt":"lb"):this.relLineText===SuperMapAlgoPlot.RelLineText.ONLINE||(g=this.relLineText===SuperMapAlgoPlot.RelLineText.ONLEFTLINE?"lb":"lt");for(let t=0;t<o&&!(this.dNowPassedDistance>n);t++){0===t&&(this.oldDNowPassedDistance=this.dNowPassedDistance);var T=t;for(d&&(T=o-t-1),P=c[T],L=m?P.getWidth():P.getHeight(),S&&(this.dNowPassedDistance+=L);r<=this.dNowPassedDistance&&p<s-1;)p++,r+=SuperMapAlgoPlot.PlottingUtil.distance(l[p-1],l[p]);A=SuperMapAlgoPlot.PlottingUtil.radian(l[p-1],l[p])*u,this.dNowPassedDistance=this.dNowPassedDistance+this.fontSpace,a=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(l,this.dNowPassedDistance);for(var v=0;v<l.length-1;v++){var _=[];if(_.push(l[v]),_.push(l[v+1]),!a.pt)break;SuperMapAlgoPlot.PlottingUtil.pointIsOnPolyLines(a.pt,_).isOnPolyLine&&(A=SuperMapAlgoPlot.PlottingUtil.radian(l[v],l[v+1])*u)}var x=A+f;if(a.index<0)break;P.add(a.pt.x,a.pt.y);var O=e.charAt(T),w={};w.type=SuperMapAlgoPlot.SymbolType.TEXTSYMBOL,w.textContent=O,w.positionPoints=[a.pt],w.style={surroundLineFlag:!1,labelAlign:g,labelRotation:-x},M.push(w),S||(this.dNowPassedDistance+=L)}var I=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(l,this.dNowPassedDistance);if(this.showPathLine){if(this.relLineText===SuperMapAlgoPlot.RelLineText.ONLINE&&this.isAvoid){if(b.index>=0){var C=[];for(let t=0;t<=b.index;t++)C.push(i[t]);C.push(b.pt),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,C)}if(I.index>=0){var E=[];E.push(I.pt);for(let t=I.index+1;t<i.length;t++)E.push(i[t]);this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,E)}}else this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,i);if(this.showPathLineArrow&&this.addArrow(i),b.pt){var D=SuperMapAlgoPlot.PlottingUtil.distance(l[0],b.pt),U=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(l,D);this.addScalePoint(U.pt)}}for(let t=0;t<M.length;t++)this.components.push(M[t]);this.isScalePoint=!1,this.oldPathTextStart=b}}addArrow(t){if(t.length<2)return t;var e=SuperMapAlgoPlot.PlottingUtil.polylineDistance(this.controlPoints)*(this.isEdit,null==this.getSubSymbolScaleValue()?.05:.5*this.getSubSymbolScaleValue()),i=t[t.length-1];if(t.length>2){var o=-1;for(let l=t.length-2;l>=0;l--)if(e<SuperMapAlgoPlot.PlottingUtil.distance(i,t[l])){o=l;break}t.splice(o+1,t.length-o),t.push(i)}var l=t[t.length-2],s=t[t.length-1],n=e;if(void 0===l)return t;if(!(SuperMapAlgoPlot.PlottingUtil.distance(l,s)<e)){var a=SuperMapAlgoPlot.PlottingUtil.radian(l,s)*SuperMapAlgoPlot.PlottingUtil.RTOD,r=SuperMapAlgoPlot.PlottingUtil.circlePoint(s,n,n,a+157.5),p=SuperMapAlgoPlot.PlottingUtil.circlePoint(s,n,n,a+202.5);this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,[r,t[t.length-1],p],{surroundLineFlag:!1,fillLimit:!0,lineTypeLimit:!0,fill:!0})}}modifyPoint(t,e){if(e.isScalePoint){for(var i=0,o=0;o<this.controlPoints.length-1;o++){var l=[];l.push(this.controlPoints[o]),l.push(this.controlPoints[o+1]),SuperMapAlgoPlot.PlottingUtil.pointIsOnPolyLines(e,l).isOnPolyLine||i++}if(i===this.controlPoints.length-1)return;this.isScalePoint=!0;var s=SuperMapAlgoPlot.PlottingUtil.distance(this.textPathPts[0],e);this.dNowPassedDistance=s}this.calculateParts()}};SuperMapAlgoPlot.LineMarking=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.islocationCircle=!!t.islocationCircle&&t.islocationCircle,this.textBoxType=t.textBoxType?t.textBoxType:SuperMapAlgoPlot.TextBoxType.RECTBOX,0===this.scaleValues.length&&(this.scaleValues.push(.126),this.scaleValues.push(0),this.scaleValues.push(0),this.scaleValues.push(4)),this.CLASS_NAME="SuperMapAlgoPlot.LineMarking"}destroy(){this.islocationCircle=null,this.textBoxType=null,super.destroy()}calculateParts(){this.init(),this.controlPoints=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints),this.controlPoints=SuperMapAlgoPlot.PlottingUtil.clearSamePts(this.controlPoints);var t=this.scaleValues[0];if(!(t<0||t>1)){if(t=(1-t)/2,this.controlPoints.length>=this.minEditPts){var e,i,o,l;this.scalePoints=[];var s=[];this.controlPoints[0].x<this.controlPoints[1].x?(e=this.controlPoints[0].x,o=this.controlPoints[1].x):(e=this.controlPoints[1].x,o=this.controlPoints[0].x),this.controlPoints[0].y<this.controlPoints[1].y?(l=this.controlPoints[0].y,i=this.controlPoints[1].y):(l=this.controlPoints[1].y,i=this.controlPoints[0].y),s.push(new SuperMapAlgoPlot.Point(e,l)),s.push(new SuperMapAlgoPlot.Point(e,i)),s.push(new SuperMapAlgoPlot.Point(o,i)),s.push(new SuperMapAlgoPlot.Point(o,l)),!1===this.isEdit&&(this.scaleValues[1]=e+.1*(o-e),this.scaleValues[2]=l+-.3*(i-l));var n=this.getAction(this.scaleValues[1],this.scaleValues[2],e,i,o,l),a=new SuperMapAlgoPlot.Point(this.scaleValues[1],this.scaleValues[2]);if(this.textBoxType===SuperMapAlgoPlot.TextBoxType.RECTBOX||this.textBoxType===SuperMapAlgoPlot.TextBoxType.LINEBOX){var r=[];switch(n){case 0:this.addScalePoint(a);break;case 1:this.addScalePoint(a),r.push(new SuperMapAlgoPlot.Point(e,i-(i-l)*t)),r.push(a);break;case 2:this.addScalePoint(a),r.push(new SuperMapAlgoPlot.Point(o-(o-e)*t,i)),r.push(a);break;case 3:this.addScalePoint(a),r.push(new SuperMapAlgoPlot.Point(o,i-(i-l)*t)),r.push(a);break;case 4:this.addScalePoint(a),r.push(new SuperMapAlgoPlot.Point(o-(o-e)*t,l)),r.push(a)}this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,r)}if(0!==s.length&&this.textBoxType===SuperMapAlgoPlot.TextBoxType.RECTBOX)this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,s);else if(0!==s.length&&this.textBoxType===SuperMapAlgoPlot.TextBoxType.LINEBOX){var p=[];switch(n){case 0:break;case 1:p=(p=p.concat(s[0])).concat(s[1]);break;case 2:p=(p=p.concat(s[1])).concat(s[2]);break;case 3:p=(p=p.concat(s[2])).concat(s[3]);break;case 4:p=(p=p.concat(s[3])).concat(s[0])}0!==p.length?this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,p):this.addCell(SuperMapAlgoPlot.SymbolType.RECTANGLESYMBOL,this.controlPoints)}this.islocationCircle&&this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[a,new SuperMapAlgoPlot.Point(a.x-.05,a.y-.05)]),this.annotationContent(e,i,o,l)}else this.controlPoints.length>=2&&this.controlPoints.length<this.minEditPts&&this.addCell(SuperMapAlgoPlot.SymbolType.RECTANGLESYMBOL,this.controlPoints);this.finish()}}modifyPoint(t,e){!0===e.isScalePoint&&(this.scaleValues[1]=e.x,this.scaleValues[2]=e.y),this.calculateParts()}getAction(t,e,i,o,l,s){var n=(o-s)/(l-i);return t<i?e>o?Math.abs((e-o)/(t-i))>n?2:1:e<s&&Math.abs((e-s)/(t-i))>n?4:1:t>l?e>o?Math.abs((e-o)/(t-l))>n?2:3:e<s&&Math.abs((e-s)/(t-l))>n?4:3:e>o?2:e<s?4:0}};SuperMapAlgoPlot.LineRelation=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.subSectionCount=t.subSectionCount?t.subSectionCount:10,this.CLASS_NAME="SuperMapAlgoPlot.LineRelation"}destroy(){this.subSectionCount=null,super.destroy()}calculateParts(){this.init();for(let t=0;t<this.controlPoints.length;t++)this.controlPoints[t].tag=t;var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);null!==t&&t.length>=this.minEditPts&&this.computeLine(t)}computeLine(t){this.components.length=0;var e=t[0],i=t[t.length-1];this.subSectionCount<=1&&(this.subSectionCount=10);var o=SuperMapAlgoPlot.PlottingUtil.distance(e,i)/(2*this.subSectionCount-1);if(this.lineRelationType===SuperMapAlgoPlot.LineRelationType.SOLID)this.addCell(24,t,{surroundLineFlag:!1});else if(this.lineRelationType===SuperMapAlgoPlot.LineRelationType.DASH)for(let t=0;t<this.subSectionCount;t++){let l=SuperMapAlgoPlot.PlottingUtil.findPoint(e,i,2*t*o,0),s=SuperMapAlgoPlot.PlottingUtil.findPoint(e,i,(2*t+1)*o,0);this.addCell(24,[l,s],{surroundLineFlag:!1})}else if(this.lineRelationType===SuperMapAlgoPlot.LineRelationType.ARROW)for(let t=0;t<this.subSectionCount;t++){let l=SuperMapAlgoPlot.PlottingUtil.findPoint(e,i,2*t*o,0),s=SuperMapAlgoPlot.PlottingUtil.findPoint(e,i,(2*t+1)*o,0),n=SuperMapAlgoPlot.PlottingUtil.findPoint(s,l,o,60),a=SuperMapAlgoPlot.PlottingUtil.findPoint(s,l,o,-60);this.addCell(24,[n,s,a],{surroundLineFlag:!1})}}};SuperMapAlgoPlot.PolygonRegion=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),void 0===this.scaleValues[0]&&(this.scaleValues[0]=0),void 0===this.scaleValues[1]&&(this.scaleValues[1]=0),this.CLASS_NAME="SuperMapAlgoPlot.PolygonRegion"}destroy(){super.destroy()}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(null!=(t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t))&&t.length>=this.minEditPts){if(this.addCell(32,t,{surroundLineFlag:!1}),this.textContent&&null!=this.textContent&&this.textContent.length>0){var e=[];this.scaleValues[1]>t.length&&(this.scaleValues[1]=0);var i={labelRotation:0,surroundLineFlag:!1,labelAlign:"lt"};if(0===this.scaleValues[1])e=[SuperMapAlgoPlot.PlottingUtil.getPolygonCenterPt(t)];else{var o=null,l=null;this.scaleValues[1]===t.length?(o=t[t.length-1],l=t[0]):(o=t[this.scaleValues[1]-1],l=t[this.scaleValues[1]]),i.labelRotation=-SuperMapAlgoPlot.PlottingUtil.radian(o,l)/Math.PI*180;var s=this.scaleValues[0]*SuperMapAlgoPlot.PlottingUtil.distance(o,l);e=[SuperMapAlgoPlot.PlottingUtil.findPoint(o,l,s,0)]}this.addCell(34,e,i,this.textContent);var n=new SuperMapAlgoPlot.Point(e[0].x,e[0].y);n.isScalePoint=!0,n.tag=0,this.scalePoints=[],this.addScalePoint(n)}}else this.controlPoints.length>=2&&this.controlPoints.length<this.minEditPts&&this.calAssistantLine()}modifyPoint(t,e){if(!0===e.isScalePoint){var i=0,o=SuperMapAlgoPlot.PlottingUtil.distance(e,this.controlPoints[0]);for(let t=1;t<this.controlPoints.length;t++){var l=SuperMapAlgoPlot.PlottingUtil.distance(e,this.controlPoints[t]);l<o&&(o=l,i=t)}var s=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);(s=SuperMapAlgoPlot.PlottingUtil.clearSamePts(s)).push(s[0].clone());var n=SuperMapAlgoPlot.PlottingUtil.computePointToLineMinDis(e,s);if(-1===n.minDis)this.scaleValues[1]=i+1,this.offsetX=0,this.offsetY=0;else{var a=SuperMapAlgoPlot.PlottingUtil.projectPoint(e,s[n.index],s[n.index+1]),r=SuperMapAlgoPlot.PlottingUtil.distance(e,a),p=SuperMapAlgoPlot.PlottingUtil.getPolygonCenterPt(this.controlPoints),u=SuperMapAlgoPlot.PlottingUtil.distance(e,p);if(u<r&&u<o)this.scaleValues[1]=0,this.scaleValues[0]=0;else if(o<r&&o<u)this.scaleValues[1]=i+1,this.scaleValues[0]=0;else if(r<o&&r<u){this.scaleValues[1]=n.index+1;var h=null,g=null;this.scaleValues[1]===this.controlPoints.length?(h=this.controlPoints[this.controlPoints.length-1],g=this.controlPoints[0]):(h=this.controlPoints[this.scaleValues[1]-1],g=this.controlPoints[this.scaleValues[1]]);var c=SuperMapAlgoPlot.PlottingUtil.distance(a,h),y=SuperMapAlgoPlot.PlottingUtil.distance(h,g);this.scaleValues[0]=c/y}}}this.calculateParts()}parseSymbolData(){super.parseSymbolData(),this.symbolData&&(this.scaleValues[1]=this.symbolData.annotationPosition)}setSymbolData(){super.setSymbolData(),this.symbolData&&(this.symbolData.annotationPosition=this.scaleValues[1])}};SuperMapAlgoPlot.Wire=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.05),this.CLASS_NAME="SuperMapAlgoPlot.Wire"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){this.isEdit||(this.scaleValues[0]=2*this.getSubSymbolScaleValue());var e=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t);e=SuperMapAlgoPlot.PlottingUtil.clearSamePts(e);var i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(e);this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,e);var o=i*this.scaleValues[0],l=i*this.scaleValues[0]/2,s=SuperMapAlgoPlot.PlottingUtil.clonePoints(e),n=parseInt((i-l)/o);for(let t=0;t<=n&&!(l+o*t>i);t++){var a=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(s,l+o*t);if(-1!==a.index){var r=new SuperMapAlgoPlot.Point(a.pt.x,a.pt.y),p=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(o/2,e[a.index],r);this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[p.pntLeft,p.pntRight])}}this.finish()}}};SuperMapAlgoPlot.LinearArrow=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(15),this.scaleValues.push(7.5),this.scaleValues.push(0),this.scaleValues.push(15),this.scaleValues.push(7.5),this.scaleValues.push(0)),this.CLASS_NAME="SuperMapAlgoPlot.LinearArrow"}calculateParts(){if(this.init(),!(null==this.controlPoints||this.controlPoints.length<this.minEditPts)){var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){if(this.scalePoints=[],this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,t),!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.scaleValues[0],0)&&!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.scaleValues[1],0)){let e=this.scaleValues[0]*(this.style.weight||this.style.strokeWidth),i=this.scaleValues[1]*(this.style.weight||this.style.strokeWidth),o=this.getLonLatDistanceFromPixel(e),l=this.getLonLatDistanceFromPixel(i),s=SuperMapAlgoPlot.PlottingUtil.findPointInLine(t[0],t[1],o),n=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(l,t[1],s),a=[];if(a.push(n.pntLeft),a.push(t[0]),a.push(n.pntRight),this.addScalePoint(n.pntLeft,0),SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.scaleValues[2],0))this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,a,{fillLimit:!0,fill:!0}),this.addScalePoint(s,1);else if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.scaleValues[2],1))this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,a),this.addScalePoint(t[0],1);else{let e=o*this.scaleValues[2],i=SuperMapAlgoPlot.PlottingUtil.findPointInLine(s,t[0],e);a.push(i),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,a,{fillLimit:!0,fill:!0}),this.addScalePoint(i,1)}}if(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.scaleValues[3],0)&&!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.scaleValues[4],0)){let e=this.scaleValues[3]*(this.style.weight||this.style.strokeWidth),i=this.scaleValues[4]*(this.style.weight||this.style.strokeWidth),o=this.getLonLatDistanceFromPixel(e),l=this.getLonLatDistanceFromPixel(i),s=SuperMapAlgoPlot.PlottingUtil.findPointInLine(t[1],t[0],o),n=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(l,t[0],s),a=[];if(a.push(n.pntLeft),a.push(t[1]),a.push(n.pntRight),this.addScalePoint(n.pntLeft,2),SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.scaleValues[5],0))this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,a,{fillLimit:!0,fill:!0}),this.addScalePoint(s,3);else if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.scaleValues[5],1))this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,a),this.addScalePoint(t[1],3);else{let e=o*this.scaleValues[5],i=SuperMapAlgoPlot.PlottingUtil.findPointInLine(s,t[1],e);a.push(i),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,a,{fillLimit:!0,fill:!0}),this.addScalePoint(i,3)}}this.finish()}}}modifyPoint(t,e){if(!0===e.isScalePoint){var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(i=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i),0===t){let t=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,i[0],i[1]);if(t.isOnline){let o=this.scaleValues[0]*(this.style.weight||this.style.strokeWidth),l=this.getLonLatDistanceFromPixel(o),s=l*this.scaleValues[2],n=SuperMapAlgoPlot.PlottingUtil.findPointInLine(i[0],i[1],l),a=SuperMapAlgoPlot.PlottingUtil.findPointInLine(n,i[0],s);l=SuperMapAlgoPlot.PlottingUtil.distance(i[0],t.projectPoint),o=this.getPixelDistanceFromLonLat(l),this.scaleValues[0]=o/(this.style.weight||this.style.strokeWidth);let r=SuperMapAlgoPlot.PlottingUtil.distance(e,t.projectPoint),p=this.getPixelDistanceFromLonLat(r);this.scaleValues[1]=p/(this.style.weight||this.style.strokeWidth),s=SuperMapAlgoPlot.PlottingUtil.distance(a,t.projectPoint),this.scaleValues[2]=s/l}}else if(1===t){let t=this.scaleValues[0]*(this.style.weight||this.style.strokeWidth),o=this.getLonLatDistanceFromPixel(t),l=SuperMapAlgoPlot.PlottingUtil.findPointInLine(i[0],i[1],o),s=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,l,i[0]);if(s.isOnline){let t=SuperMapAlgoPlot.PlottingUtil.distance(l,s.projectPoint);this.scaleValues[2]=t/o,this.scaleValues[2]<0?this.scaleValues[2]=0:this.scaleValues[2]>1&&(this.scaleValues[2]=1)}}else if(2===t){let t=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,i[0],i[1]);if(t.isOnline){let o=this.scaleValues[3]*(this.style.weight||this.style.strokeWidth),l=this.getLonLatDistanceFromPixel(o),s=l*this.scaleValues[5],n=SuperMapAlgoPlot.PlottingUtil.findPointInLine(i[1],i[0],l),a=SuperMapAlgoPlot.PlottingUtil.findPointInLine(n,i[1],s);l=SuperMapAlgoPlot.PlottingUtil.distance(i[1],t.projectPoint),o=this.getPixelDistanceFromLonLat(l),this.scaleValues[3]=o/(this.style.weight||this.style.strokeWidth);let r=SuperMapAlgoPlot.PlottingUtil.distance(e,t.projectPoint),p=this.getPixelDistanceFromLonLat(r);this.scaleValues[4]=p/(this.style.weight||this.style.strokeWidth),s=SuperMapAlgoPlot.PlottingUtil.distance(a,t.projectPoint),this.scaleValues[5]=s/l}}else if(3===t){let t=this.scaleValues[3]*(this.style.weight||this.style.strokeWidth),o=this.getLonLatDistanceFromPixel(t),l=SuperMapAlgoPlot.PlottingUtil.findPointInLine(i[1],i[0],o),s=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,l,i[1]);if(s.isOnline){let t=SuperMapAlgoPlot.PlottingUtil.distance(l,s.projectPoint);this.scaleValues[5]=t/o,this.scaleValues[5]<0?this.scaleValues[5]=0:this.scaleValues[5]>1&&(this.scaleValues[5]=1)}}}this.calculateParts()}};SuperMapAlgoPlot.Polybezier=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t)}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e=[];if(this.m_bIsAnimation)t.length<3?(e.push(t[0]),e.push(t[1])):e=e.concat(t);else if(this.isEdit||(this.scaleValues=[]),this.scalePoints=[],t.length<3)e.push(t[0]),e.push(t[1]);else{var i=SuperMapAlgoPlot.PlottingUtil.computeBeizerPoints(this.isEdit,t,this.scaleValues);this.scaleValues=i.scaleValues;for(let t=0;t<i.scalePoints.length;t++)this.addScalePoint(i.scalePoints[t]);e=i.beizerPoints}SuperMapAlgoPlot.PlottingUtil.clearSamePts(e),e.length<=0||(this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,e),this.finish())}}computeScaleValues(t,e){if(!0===e.isScalePoint){if(t<0||t>2*this.controlPoints.length-1)return;var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(i=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i),this.minEditPts>i.length)return;var o=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(i);o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o);var l=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i),s=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l,0)||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(s,0))return;var n=-1;n=t%2==0?Math.floor(t/2):Math.floor((t+1)/2);var a=(e.x-i[n].x)/l,r=(e.y-i[n].y)/l;this.scaleValues[2*t]=a,this.scaleValues[2*t+1]=r}}};SuperMapAlgoPlot.NewPie=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.CLASS_NAME="SuperMapAlgoPlot.NewPie"}destroy(){super.destroy()}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=this.minEditPts){var e=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]),i=SuperMapAlgoPlot.PlottingUtil.radian(t[0],t[2]),o=SuperMapAlgoPlot.PlottingUtil.radian(t[0],t[1]),l=[];l.push(t[0]),(l=l.concat(SuperMapAlgoPlot.Primitives.getArcCircleSpatialData(t[0],e,i,o))).push(t[0]),0!==l.length&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,l)}}};SuperMapAlgoPlot.NewArc=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.CLASS_NAME="SuperMapAlgoPlot.NewArc"}destroy(){super.destroy()}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=this.minEditPts){var e=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]),i=SuperMapAlgoPlot.PlottingUtil.radian(t[0],t[2]),o=SuperMapAlgoPlot.PlottingUtil.radian(t[0],t[1]),l=SuperMapAlgoPlot.Primitives.getArcCircleSpatialData(t[0],e,i,o);0!==l.length&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,l)}}};SuperMapAlgoPlot.NewChord=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.CLASS_NAME="SuperMapAlgoPlot.NewChord"}destroy(){super.destroy()}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=this.minEditPts){var e=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]),i=SuperMapAlgoPlot.PlottingUtil.radian(t[0],t[2]),o=SuperMapAlgoPlot.PlottingUtil.radian(t[0],t[1]),l=[];l.push(t[1]),(l=l.concat(SuperMapAlgoPlot.Primitives.getArcCircleSpatialData(t[0],e,i,o))).push(t[1]),0!==l.length&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,l)}}};SuperMapAlgoPlot.AlgoSymbol1001=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(.1),this.scaleValues.push(.2),this.scaleValues.push(0),this.scaleValues.push(.3),this.scaleValues.push(.08)),this.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1001"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints),e=(t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length;if(e>=this.minEditPts){this.scalePoints=[];var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),o=!1;void 0!==i[0].z&&(o=!0);var l=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePts(t,this.scaleValues,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_PARALLEL),s=l.arrowTouLen,n=l.leftBodyPts,a=l.rightBodyPts,r=[];r.push(n[n.length-1]),r.push(a[a.length-1]);var p=[];p.push(this.scaleValues[3]),p.push(this.scaleValues[4]),p.push(this.scaleValues[0]),p.push(this.scaleValues[1]);var u=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePts(t,r,p,s,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITHOUT_EAR),h=[];if(o){var g=[],c=[],y=[];for(let t=0;t<e-1;t++)c.push({x:n[t].x,y:n[t].y,z:i[t].z}),y.push({x:a[t].x,y:a[t].y,z:i[t].z});var P={x:i[e-2].x,y:i[e-2].y,z:i[e-2].z},S={x:i[e-1].x,y:i[e-1].y,z:i[e-1].z},d=this.ComputeZValue(n[e-1],S,P);c.push({x:n[e-1].x,y:n[e-1].y,z:d});var m=this.ComputeZValue(a[e-1],S,P);y.push({x:a[e-1].x,y:a[e-1].y,z:m});for(let t=0;t<u.length;t++){var f=this.ComputeZValue(u[t],S,P);g.push({x:u[t].x,y:u[t].y,z:f})}h=(h=h.concat(c)).concat(g);for(let t=y.length-1;t>=0;t--)h.push(y[t]);let t=new SuperMapAlgoPlot.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2),o=new SuperMapAlgoPlot.Point(t.x,t.y);o.isScalePoint=!0,o.tag=0,this.addScalePoint(o);let l=new SuperMapAlgoPlot.Point(n[n.length-1].x,n[n.length-1].y);l.isScalePoint=!0,l.tag=1,this.addScalePoint(l);let s=new SuperMapAlgoPlot.Point(u[0].x,u[0].y);s.isScalePoint=!0,s.tag=2,this.addScalePoint(s);for(let t=0;t<this.scalePoints.length;t++){let e=new SuperMapAlgoPlot.Point(this.scalePoints[t].x,this.scalePoints[t].y);this.scalePoints[t].z=this.ComputeZValue(e,S,P)}}else{h=(h=h.concat(n)).concat(u);for(let t=a.length-1;t>=0;t--)h.push(a[t]);let t=new SuperMapAlgoPlot.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2),e=new SuperMapAlgoPlot.Point(t.x,t.y);e.isScalePoint=!0,e.tag=0,this.addScalePoint(e);let i=new SuperMapAlgoPlot.Point(n[n.length-1].x,n[n.length-1].y);i.isScalePoint=!0,i.tag=1,this.addScalePoint(i);let o=new SuperMapAlgoPlot.Point(u[0].x,u[0].y);o.isScalePoint=!0,o.tag=2,this.addScalePoint(o)}this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,h,{surroundLineFlag:!1,lineWidthLimit:!0,strokeWidth:0,weight:0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,h)}}modifyPoint(t,e){if(!0===e.isScalePoint){var i=new SuperMapAlgoPlot.Point(this.scalePoints[0].x,this.scalePoints[0].y),o=new SuperMapAlgoPlot.Point(this.scalePoints[1].x,this.scalePoints[1].y),l=new SuperMapAlgoPlot.Point(this.scalePoints[2].x,this.scalePoints[2].y),s=this.scaleValues[0],n=SuperMapAlgoPlot.PlottingUtil.polylineDistance(this.controlPoints),a=n*s;if(0==t){let t=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,this.controlPoints[this.controlPoints.length-2],this.controlPoints[this.controlPoints.length-1]),i=t.projectPoint;if(t.isOnline){let t=SuperMapAlgoPlot.PlottingUtil.distance(i,this.controlPoints[this.controlPoints.length-1]);this.scaleValues[0]=t/n}}else if(1==t){let t=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,o,l).projectPoint,s=SuperMapAlgoPlot.PlottingUtil.distance(t,i);this.scaleValues[1]=s/a}else if(2==t){let t=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,this.controlPoints[1],l).projectPoint,o=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(t,i,this.controlPoints[1]),s=o.projectPoint,n=SuperMapAlgoPlot.PlottingUtil.distance(s,i);!0===o.inOnline?this.scaleValues[4]=-n/a:this.scaleValues[4]=n/a}}this.calculateParts()}};SuperMapAlgoPlot.AlgoSymbol1002=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.MIN_GEOPT_COUNT=2,this.MAX_GEOPT_COUNT=1024,this.SV1_defaultATLenDivABLen=0,this.SV2_defaultAYPosScale=.65,this.SV_AJCtrl=.6,this.SV_ArrowWoCtrl=.6,this.SV2_DefaultAJWidDiviedByATLen=.148,this.SV3_DefaultAEWidDividedByATLen=.4,this.SV4_DefaultAELenDividedByATLen=.3,this.SV_ATScaleParameter=1.25,this.SV_ATLenDividedByATWid=1.35,this.SV_ATWidDividedByArrowWeiWid=.5,this.AB_VERTEX_COUNT=4,this.MIN_PTCOUNT_PERARROW=3,this.ATL_DIV_AWW=.7,this.ATL_DIV_ABL=.12,this.ATL_DIV_ABL_1=.18,this.DEFAULT_ARROW_TAIL_POS=.12,this.DUOJIANTOU_TAIL_RATE_1=8,this.DUOJIANTOU_TAIL_RATE_2=3,this.DUOJIANTOU_TAIL_RATE_3=.6,this.AB_CTRLPT_RATE1=0,this.AB_CTRLPT_RATE2=3,this.AB_CTRLPT_RATE3=.5,this.MIN_SCALEVALUE=.1,this.MAX_SCALEVALUE=1,this.m_scalePoints=null,this.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1002"}calculateParts(){this.init(),this.m_scalePoints=[];var t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=2&&t.length<this.minEditPts&&this.calAssistantLine(),!(t.length<this.minEditPts)){var e=this.operateCtrlPts(t),i=e.length,o=Math.floor(i/this.MIN_PTCOUNT_PERARROW),l=this.scaleValues.length;if(l<2*o-1){0==l&&(this.scaleValues.push(this.SV1_defaultATLenDivABLen),l++);var s=2*o-1-l;for(let t=0;t<s;t+=2)this.scaleValues.splice(l/2+1,0,this.SV1_defaultATLenDivABLen),this.scaleValues.splice(this.scaleValues.length,0,this.SV2_defaultAYPosScale)}else if(l>2*o-1){for(let t=0;t<o;t++)this.scaleValues.push(this.SV1_defaultATLenDivABLen);for(let t=0;t<o-1;t++)this.scaleValues.push(this.SV2_defaultAYPosScale)}var n=this.arrowMeshs(e);SuperMapAlgoPlot.PlottingUtil.clearSamePts(n.shapePts);var a=!1;if(void 0!==t[0].z&&(a=!0),a){var r=this.operateCtrlPts3D(t),p=n.arrLeftPts2D,u=n.arrRightPts2D,h=n.arrHeadPts2D;if(o!=p.length&&o!=u.length&&o!=h.length)return!1;var g=[];for(let t=0;t<o;t++){var c=[];for(let e=3*t;e<3*(t+1)&&e<r.length;e++)c.push(r[e]);g.push(c)}var y=[],P=[],S=[];for(let t=0;t<o;t++)if(!(2>g[t].length)){var d=p[t][p[t].length-1],m=u[t][0],f=new SuperMapAlgoPlot.Point(.5*(d.x+m.x),.5*(d.y+m.y)),L=g[t][g[t].length-1],M=g[t][g[t].length-2],b=this.ComputeZValue(f,L,M),A={x:f.x,y:f.y,z:b},T=[],v=[];for(let e=0;e<g[t].length-1;e++)if(0==t)v.push(g[t][e]);else{let i={x:g[t][e].x,y:g[t][e].y,z:.5*(g[t][e].z+g[t-1][e].z)};v.push(i)}v.push(A),this.ComputeBeizerZValueByDis(v,p[t],T),y.push(T),T=[];var _=[];_.push(A);for(let e=g[t].length-2;e>=0;e--)if(t==o-1)_.push(g[t][e]);else{let i={x:g[t][e].x,y:g[t][e].y,z:.5*(g[t][e].z+g[t+1][e].z)};_.push(i)}this.ComputeBeizerZValueByDis(_,u[t],T),P.push(T),T=[];var x=h[t];for(let t=0;t<x.length;t++){let e=this.ComputeZValue(x[t],L,M);T.push({x:x[t].x,y:x[t].y,z:e})}S.push(T)}var O=[];for(let t=0;t<o;t++)O=(O=(O=O.concat(y[t])).concat(S[t])).concat(P[t]);return SuperMapAlgoPlot.PlottingUtil.clearSamePts(O),n.shapePts.length>0&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,O,{surroundLineFlag:!1}),this.scalePoints=this.scalePoints.concat(this.m_scalePoints),!0}n.shapePts.length>0&&(this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,n.shapePts,{surroundLineFlag:!1,lineWidthLimit:!0,strokeWidth:0,weight:0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,n.shapePts,{surroundLineFlag:!1})),this.scalePoints=[];for(let t=0;t<this.m_scalePoints.length;t++)this.m_scalePoints[t].isScalePoint=!0,this.m_scalePoints[t].tag=t,this.addScalePoint(this.m_scalePoints[t])}}modifyPoint(t,e){if(!0===e.isScalePoint){var i=this.operateCtrlPts(this.controlPoints),o=i.length,l=Math.floor(o/this.MIN_PTCOUNT_PERARROW),s=0;if(t<l){var n=[],a=t*this.MIN_PTCOUNT_PERARROW;n[0]=i[a],n[1]=i[a+1],n[2]=i[a+2];var r=SuperMapAlgoPlot.PlottingUtil.polylineDistance(n),p=new SuperMapAlgoPlot.Point(0,0),u=new SuperMapAlgoPlot.Point(0,0),h=new SuperMapAlgoPlot.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(this.AB_CTRLPT_RATE1,this.AB_CTRLPT_RATE2,n[0],n[1],n[2],p,u),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(this.AB_CTRLPT_RATE3,n[2],n[1],u,h),s=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(n[2],h,e).dLen1/(this.SV4_DefaultAELenDividedByATLen+1)/r}else{var g=[],c=[],y=(t-l)*this.MIN_PTCOUNT_PERARROW;g[0]=i[y],g[1]=i[y+1],g[2]=i[y+2];var P=(t-l+1)*this.MIN_PTCOUNT_PERARROW;c[0]=i[P],c[1]=i[P+1],c[2]=i[P+2];var S=new SuperMapAlgoPlot.Point(0,0),d=new SuperMapAlgoPlot.Point(0,0),m=new SuperMapAlgoPlot.Point(0,0);S.x=.5*(g[2].x+c[2].x),d.x=.5*(g[1].x+c[1].x),m.x=.5*(g[0].x+c[0].x),S.y=.5*(g[2].y+c[2].y),d.y=.5*(g[1].y+c[1].y),m.y=.5*(g[0].y+c[0].y);var f=SuperMapAlgoPlot.PlottingUtil.distance(S,d),L=SuperMapAlgoPlot.PlottingUtil.distance(m,d);let o=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(S,d,e),n=o.dLen1;s=n<f?n/(f+L):((n=(o=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(d,m,e)).dLen1)+f)/(f+L)}s>this.MAX_SCALEVALUE?s=this.MAX_SCALEVALUE:s<this.MIN_SCALEVALUE&&(s=this.MIN_SCALEVALUE),this.scaleValues[t]=s}this.calculateParts()}arrowMeshs(t){var e=[],i=[],o=[];t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts;var l=new SuperMapAlgoPlot.Path2D,s=t.length,n=Math.floor(s/this.MIN_PTCOUNT_PERARROW),a=this.generateAWWidth(n,t),r=[],p=[],u=0,h=0,g=0,c=[];for(h=0,g=0;h<n;h++,g+=this.MIN_PTCOUNT_PERARROW){c[0]=t[g],c[1]=t[g+1],c[2]=t[g+2],u=this.scaleValues[h];var y=this.generateArrowBodyPts(c,a[h],u);u=y.dATLenDivABLen,r[h]=y.arrowBodyPts,p.push(u)}var P=[],S=0,d=0,m=0,f=[],L=[];for(h=0;h<n-1;h++,d+=this.MIN_PTCOUNT_PERARROW){m=d+this.MIN_PTCOUNT_PERARROW,f[0]=t[d],f[1]=t[d+1],f[2]=t[d+2],L[0]=t[m],L[1]=t[m+1],L[2]=t[m+2],S=this.scaleValues[n+h];var M=this.generateAYPts(f,r[h],L,r[h+1],S);P.push(M.arrowLeftYaoPts),P.push(M.arrowRightYaoPts)}var b=[],A=r[0],T=[],v=0,_=[];l.MoveTo(A[0]),l.CurveTo(A[1],A[2],A[3]),l.CurveTo(A[4],A[5],A[6]),l.ToSubPathPolygons(T),e.push(T[0]),v=T[0].length;for(let t=7;t<10;t++)l.LineTo(A[t]);for(T=[],l.ToSubPathPolygons(T);v<T[0].length;v++)_.push(T[0][v]);for(o.push(_),b.push(A[0]),b.push(t[0]),h=1,g=this.MIN_PTCOUNT_PERARROW;h<n;h++,g+=this.MIN_PTCOUNT_PERARROW){var x=r[h],O=h+h-2,w=P[O];for(l.LineTo(w[0]),l.CurveTo(w[1],w[2],w[3]),T=[],_=[],l.ToSubPathPolygons(T);v<T[0].length;v++)_.push(T[0][v]);i.push(_);var I=P[O+1];for(l.CurveTo(I[1],I[2],I[3]),T=[],_=[],l.ToSubPathPolygons(T);v<T[0].length;v++)_.push(T[0][v]);e.push(_);for(let t=7;t<10;t++)l.LineTo(x[t]);for(T=[],_=[],l.ToSubPathPolygons(T);v<T[0].length;v++)_.push(T[0][v]);o.push(_),b.push(t[g].clone())}var C=r[n-1];for(l.LineTo(C[10]),l.CurveTo(C[11],C[12],C[13]),l.CurveTo(C[14],C[15],C[16]),T=[],_=[],l.ToSubPathPolygons(T);v<T[0].length;v++)_.push(T[0][v]);i.push(_),b.push(C[16]);var E=[];return l.ToSubPathPolygons(E),{shapePts:E[0],arrLeftPts2D:e,arrRightPts2D:i,arrHeadPts2D:o}}operateCtrlPts(t){t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts;var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),i=e.length,o=Math.floor(i/this.MIN_PTCOUNT_PERARROW),l=i%this.MIN_PTCOUNT_PERARROW,s=new SuperMapAlgoPlot.Point;if(2==l&&(s.x=.5*(e[i-2].x+e[i-1].x),s.y=.5*(e[i-2].y+e[i-1].y),s.x==e[i-1].x&&s.y==e[i-1].y||(e.push(e[i-1].clone()),e[i-1]=s,i++,o++)),i>3){var n=o-1;for(let t=0,i=n;t<n;i--,t++){var a=i*this.MIN_PTCOUNT_PERARROW;for(let t=0;t<a;t+=this.MIN_PTCOUNT_PERARROW)if(!SuperMapAlgoPlot.PlottingUtil.isRight(e[t+3],e[t+1],e[t+2])){var r=e[t];e[t]=e[t+3],e[t+3]=r,r=e[t+1],e[t+1]=e[t+4],e[t+4]=r,r=e[t+2],e[t+2]=e[t+5],e[t+5]=r}}}return e=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(t,e)}operateCtrlPts3D(t){var e=t,i=e.length,o=Math.floor(i/this.MIN_PTCOUNT_PERARROW),l={x:0,y:0,z:0};if(2==i%3&&(l.x=.5*(e[i-2].x+e[i-1].x),l.y=.5*(e[i-2].y+e[i-1].y),l.z=.5*(e[i-2].z+e[i-1].z),l.x==e[i-1].x&&l.y==e[i-1].y&&l.z==e[i-1].z||(e.push(e[i-1]),e[i-1]=l,i++,o++)),i>3){var s=o-1;for(let t=0,i=s;t<s;i--,t++){var n=3*i;for(let t=0;t<n;t+=3)if(!SuperMapAlgoPlot.PlottingUtil.isRight(e[t+3],e[t+1],e[t+2])){var a=e[t];e[t]=e[t+3],e[t+3]=a,a=e[t+1],e[t+1]=e[t+4],e[t+4]=a,a=e[t+2],e[t+2]=e[t+5],e[t+5]=a}}}return e}generateAWWidth(t,e){var i=[];if(t>0)if(1==t)i.push(0);else{var o=SuperMapAlgoPlot.PlottingUtil.distance(e[0],e[this.MIN_PTCOUNT_PERARROW]);i.push(o);for(var l=1,s=this.MIN_PTCOUNT_PERARROW;l<t-1;l++,s+=this.MIN_PTCOUNT_PERARROW)o=.5*(SuperMapAlgoPlot.PlottingUtil.distance(e[s-this.MIN_PTCOUNT_PERARROW],e[s])+SuperMapAlgoPlot.PlottingUtil.distance(e[s],e[s+this.MIN_PTCOUNT_PERARROW])),i.push(o);o=SuperMapAlgoPlot.PlottingUtil.distance(e[s-this.MIN_PTCOUNT_PERARROW],e[s]),i.push(o)}return i}generateArrowBodyPts(t,e,i){var o=[],l=[],s=[],n=[],a=[],r=[],p=[],u=t.length-1;if(u<2)return{dATLenDivABLen:i=0,arrowBodyPts:o};var h=i,g=this.SV2_DefaultAJWidDiviedByATLen,c=this.SV3_DefaultAEWidDividedByATLen,y=this.SV4_DefaultAELenDividedByATLen,P=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),S=SuperMapAlgoPlot.PlottingUtil.polylineDistance(P),d=0==e?S*this.ATL_DIV_ABL_1:(S+e)*this.ATL_DIV_ABL,m=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(d,P[1],P[0]);l[1]=m.pntLeft.clone(),s[1]=m.pntRight.clone();var f=0;f=SuperMapAlgoPlot.PlottingUtil.equalFuzzy(h,0,1e-14)?d*this.ATL_DIV_AWW:S*h;var L=SuperMapAlgoPlot.PlottingUtil.distance(P[1],P[2]);f+f>L&&(f=.5*L);var M=f*g;P.push(P[u].clone());var b,A=0;b=S-f;var T=[],v=0;for(v=2;v<=u;v++)A+=SuperMapAlgoPlot.PlottingUtil.distance(P[v-1],P[v-2]),SuperMapAlgoPlot.PlottingUtil.equalFuzzy(b,0,1e-14)?T[v]=0:SuperMapAlgoPlot.PlottingUtil.equalFuzzy(b-A,0,1e-14)?T[v]=M:T[v]=M+(d-M)*Math.pow((b-A)/b,this.SV_ATScaleParameter);T[u+1]=M;var _=new SuperMapAlgoPlot.Point(0,0),x=new SuperMapAlgoPlot.Point(0,0),O=new SuperMapAlgoPlot.Point(0,0);for(v=2;v<=u;v++){SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(this.AB_CTRLPT_RATE1,this.AB_CTRLPT_RATE2,P[v-2],P[v-1],P[v],x,O),u==v&&SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(this.AB_CTRLPT_RATE3,P[u],P[u-1],O,_);let t=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(T[v],x,P[v-1]);s[v]=t.pntLeft,l[v]=t.pntRight}var w,I,C=_.clone();if(SuperMapAlgoPlot.PlottingUtil.distance(P[u],C)>0){var E=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(f,P[u],_);P[u]=E.clone()}for(m=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(M,P[u+1],P[u]),l[u+1]=m.pntLeft,s[u+1]=m.pntRight,v=2;v<=u;v++)SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(this.AB_CTRLPT_RATE2,this.AB_CTRLPT_RATE2,l[v-1],l[v],l[v+1],x,O),n[v]=x.clone(),a[v]=O.clone(),SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(this.AB_CTRLPT_RATE2,this.AB_CTRLPT_RATE2,s[v-1],s[v],s[v+1],x,O),r[v]=x.clone(),p[v]=O.clone();SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(this.AB_CTRLPT_RATE3,l[1],l[2],n[2],_),a[1]=_.clone(),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(this.AB_CTRLPT_RATE3,s[1],s[2],r[2],_),p[1]=_.clone(),I=SuperMapAlgoPlot.PlottingUtil.distance(l[u+1],l[u])*(1/3),(w=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(I,P[u],P[u+1])).x+=l[u+1].x-P[u].x,w.y+=l[u+1].y-P[u].y,I=(d-M)*Math.pow(I/b,this.SV_ATScaleParameter+.3),m=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(I,l[u+1],w),n[u+1]=m.pntLeft.clone(),I=SuperMapAlgoPlot.PlottingUtil.distance(s[u+1],s[u])*(1/3),(w=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(I,P[u],P[u+1])).x+=s[u+1].x-P[u].x,w.y+=s[u+1].y-P[u].y,I=(d-M)*Math.pow(I/b,this.SV_ATScaleParameter+.3),m=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(I,s[u+1],w),r[u+1]=m.pntRight.clone();var D=[],U=f*y,N=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(U,P[u],P[u+1]);this.m_scalePoints.push(N.clone()),U=f*c,m=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(U,P[u+1],N),D.push(m.pntRight),D.push(P[u+1]),D.push(m.pntLeft);var R=[];for(R.push(l[u+1]),v=u;v>=1;v--)R.push(n[v+1]),R.push(a[v]),R.push(l[v]);var B=[];for(v=1;v<=u;v++)B.push(s[v]),B.push(p[v]),B.push(r[v+1]);B.push(s[u+1]),o.push.apply(o,B),o.push.apply(o,D),o.push.apply(o,R),i=f/S;var F=[];for(v=R.length-1;v>=0;v--)F.push(R[v]);return{dATLenDivABLen:i,arrowBodyPts:o}}generateAYPts(t,e,i,o,l){var s=new SuperMapAlgoPlot.Point(.5*(t[2].x+i[2].x),.5*(t[2].y+i[2].y)),n=new SuperMapAlgoPlot.Point(.5*(t[1].x+i[1].x),.5*(t[1].y+i[1].y)),a=new SuperMapAlgoPlot.Point(.5*(t[0].x+i[0].x),.5*(t[0].y+i[0].y)),r=SuperMapAlgoPlot.PlottingUtil.distance(s,n),p=SuperMapAlgoPlot.PlottingUtil.distance(a,n),u=l*(r+p),h=new SuperMapAlgoPlot.Point(0,0),g=new SuperMapAlgoPlot.Point(0,0),c=new SuperMapAlgoPlot.Point(0,0);if(u>r){u=r+p-u,h=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(u,a,n);var y=SuperMapAlgoPlot.PlottingUtil.distance(t[1],t[0]),P=SuperMapAlgoPlot.PlottingUtil.distance(i[1],i[0]);y=y*u/p,g=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(y,t[0],t[1]),P=P*u/p,c=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(P,i[0],i[1])}else{h=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(u,s,n);var S=SuperMapAlgoPlot.PlottingUtil.distance(t[1],t[2]),d=SuperMapAlgoPlot.PlottingUtil.distance(i[1],i[2]);S=S*u/r,g=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(S,t[2],t[1]),d=d*u/r,c=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(d,i[2],i[1])}this.m_scalePoints.push(h.clone());var m=this.SV_ArrowWoCtrl*SuperMapAlgoPlot.PlottingUtil.distance(h,g),f=this.SV_ArrowWoCtrl*SuperMapAlgoPlot.PlottingUtil.distance(h,c),L=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(m,h,g),M=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(f,h,c),b=e[11].clone(),A=e[10].clone(),T=o[5].clone(),v=o[6].clone(),_=SuperMapAlgoPlot.PlottingUtil.intersectLines(A,b,h,g),x=SuperMapAlgoPlot.PlottingUtil.distance(_.intersectPoint,A),O=SuperMapAlgoPlot.PlottingUtil.distance(A,h);x=x>O?this.SV_AJCtrl*O:this.SV_AJCtrl*x;var w=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(x,A,b);b=w.clone(),e[11]=w.clone(),_=SuperMapAlgoPlot.PlottingUtil.intersectLines(v,T,h,c),x=(x=SuperMapAlgoPlot.PlottingUtil.distance(_.intersectPoint,v))>(O=SuperMapAlgoPlot.PlottingUtil.distance(v,h))?this.SV_AJCtrl*O:this.SV_AJCtrl*x,T=(w=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(x,v,T)).clone(),o[5]=w.clone();var I=[];I.push(A),I.push(b),I.push(L),I.push(h);var C=[];return C.push(h),C.push(M),C.push(T),C.push(v),{arrowLeftYaoPts:I,arrowRightYaoPts:C}}};SuperMapAlgoPlot.AlgoSymbol1003=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(.3),this.scaleValues.push(.28),this.scaleValues.push(.433333),this.scaleValues.push(.53),this.scaleValues.push(0)),this.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1003"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints),e=(t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length;if(e>=this.minEditPts){if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.controlPoints[0].x,this.controlPoints[1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.controlPoints[0].y,this.controlPoints[1].y))return;var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),o=!1;void 0!==i[0].z&&(o=!0);var l=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePts(t,this.scaleValues,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_TRAPEZOID),s=l.arrowTouLen,n=l.leftBodyPts,a=l.rightBodyPts,r=[];r.push(n[n.length-1]),r.push(a[a.length-1]);var p=[];p.push(this.scaleValues[3]),p.push(this.scaleValues[4]),p.push(0),p.push(0);var u=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePts(t,r,p,s,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITHOUT_EAR),h=[];h=(h=h.concat(n)).concat(u);for(let t=a.length-1;t>=0;t--)h.push(a[t]);if(h.push(n[0]),o){var g=[],c={x:i[1].x,y:i[1].y,z:i[1].z},y={x:i[0].x,y:i[0].y,z:i[0].z};for(let t=0;t<h.length;t++){let e=this.ComputeZValue(h[t],c,y);g.push({x:h[t].x,y:h[t].y,z:e})}let t=new SuperMapAlgoPlot.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2),o=new SuperMapAlgoPlot.Point(t.x,t.y);o.isScalePoint=!0,o.tag=0,this.addScalePoint(o);let l=new SuperMapAlgoPlot.Point(n[n.length-1].x,n[n.length-1].y);l.isScalePoint=!0,l.tag=1,this.addScalePoint(l);let s=new SuperMapAlgoPlot.Point(u[0].x,u[0].y);s.isScalePoint=!0,s.tag=2,this.addScalePoint(s);var P={x:i[e-1].x,y:i[e-1].y,z:i[e-1].z},S={x:i[e-2].x,y:i[e-2].y,z:i[e-2].z},d=[];for(let t=0;t<this.scalePoints.length;t++){var m={x:this.scalePoints[t].x,y:this.scalePoints[t].y};let e=this.ComputeZValue(m,P,S);d.push({x:m.x,y:m.y,z:e})}this.scalePoints=d,this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,g)}else{let t=new SuperMapAlgoPlot.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2),e=new SuperMapAlgoPlot.Point(t.x,t.y);e.isScalePoint=!0,e.tag=0,this.addScalePoint(e);let i=new SuperMapAlgoPlot.Point(n[n.length-1].x,n[n.length-1].y);i.isScalePoint=!0,i.tag=1,this.addScalePoint(i);let o=new SuperMapAlgoPlot.Point(u[0].x,u[0].y);o.isScalePoint=!0,o.tag=2,this.addScalePoint(o),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,h)}}}modifyPoint(t,e){if(!0===e.isScalePoint){var i=new SuperMapAlgoPlot.Point(this.scalePoints[0].x,this.scalePoints[0].y),o=new SuperMapAlgoPlot.Point(this.scalePoints[1].x,this.scalePoints[1].y),l=new SuperMapAlgoPlot.Point(this.scalePoints[2].x,this.scalePoints[2].y),s=this.scaleValues[0];this.controlPoints=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(this.controlPoints).pts;var n=SuperMapAlgoPlot.PlottingUtil.polylineDistance(this.controlPoints),a=n*s;if(0==t){let t=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,this.controlPoints[0],this.controlPoints[1]),i=t.projectPoint;if(t.isOnline){let t=SuperMapAlgoPlot.PlottingUtil.distance(i,this.controlPoints[1]);this.scaleValues[0]=t/n}}else if(1==t){let t=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,o,l).projectPoint,s=SuperMapAlgoPlot.PlottingUtil.distance(t,i),n=a*this.scaleValues[1];this.scaleValues[1]=s/a,this.scaleValues[2]=(a*this.scaleValues[2]+s-n)/a}else if(2==t){let t=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,this.controlPoints[1],l).projectPoint,o=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(t,i,this.controlPoints[1]),s=o.projectPoint,n=SuperMapAlgoPlot.PlottingUtil.distance(s,i);!0===o.inOnline?this.scaleValues[4]=-n/a:this.scaleValues[4]=n/a}}this.calculateParts()}};SuperMapAlgoPlot.AlgoSymbol1004=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.MAX_ARRAY_SIZE=128,this.sv1_DefaultAtLenDivAbLen=.2,this.sv2_DefaultAjWidthDivAtLen=.148,this.sv3_DefaultAeWidthDivAtLen=.4,this.sv4_DefaultAeLenDivAtLen=.312,this.sv_AtScaleParameter=1.5,this.sv_AtLenDivAtWidth=1.35,this.sv_AtWidthDivAwWidth=.5,this.sv_defaultAwLenDivAbLen=.15,0===this.scaleValues.length&&(this.scaleValues.push(this.sv1_DefaultAtLenDivAbLen),this.scaleValues.push(this.sv2_DefaultAjWidthDivAtLen),this.scaleValues.push(this.sv3_DefaultAeWidthDivAtLen),this.scaleValues.push(this.sv4_DefaultAeLenDivAtLen)),this.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1004"}calculateParts(){this.init(),this.applyUse()}applyUse(){var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=2&&t.length<this.minEditPts&&this.calAssistantLine(),!(t.length<this.minEditPts)){var e=this.arrowMeshs(t);SuperMapAlgoPlot.PlottingUtil.clearSamePts(e.shapePts);var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),o=i.length,l=!1;if(void 0!==i[0].z&&(l=!0),l){var s=e.leftBodyPts,n=e.rightBodyPts,a=e.arrowHeadPts,r=e.shapePts,p=[];for(let t=0;t<r.length;t++)p.push({x:r[t].x,y:r[t].y,z:0});if(0==r.length)return!1;var u=this.updateScalePoints(t),h=[],g={x:(i[0].x+i[1].x)/2,y:(i[0].y+i[1].y)/2},c={x:(s[s.length-1].x+n[0].x)/2,y:(s[s.length-1].y+n[0].y)/2},y=this.ComputeZValue(c,i[o-1],i[o-2]),P=0,S=0;s[0].x==i[0].x&&s[0].y==i[0].y?(P=i[0].z,S=i[1].z):(P=i[1].z,S=i[0].z),h.push({x:g.x,y:g.y,z:P});for(let t=2;t<o-1;t++)h.push(i[t]);h.push({x:c.x,y:c.y,z:y});var d=[];this.ComputeBeizerZValueByDis(h,s,d),(h=[]).push({x:c.x,y:c.y,z:y});for(let t=o-2;t>=2;t--)h.push(i[t]);h.push({x:g.x,y:g.y,z:S});var m=[];this.ComputeBeizerZValueByDis(h,n,m);var f=[];for(let t=0;t<a.length;t++){var L=this.ComputeZValue(a[t],i[o-1],i[o-2]);f.push({x:a[t].x,y:a[t].y,z:L})}if(d.length>0&&m.length>0&&f.length>0){p=(p=(p=(p=[]).concat(d)).concat(f)).concat(m),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,p,{surroundLineFlag:!1});var M=[];for(let t=0;t<u.length;t++){var b=this.ComputeZValue(u[t],i[o-1],i[o-2]),A=new SuperMapAlgoPlot.Point(u[t].x,u[t].y);A.z=b,M.push(A)}3!=u.length?this.scalePoints=[]:this.scalePoints=this.scalePoints.concat(M)}}else{if(0==e.shapePts.length)return;if(this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.shapePts,{surroundLineFlag:!1,lineWidthLimit:!0,strokeWidth:0,weight:0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,e.shapePts,{surroundLineFlag:!1}),u=this.updateScalePoints(t),this.scalePoints=[],3!=u.length)u=[];else for(let t=0;t<u.length;t++)u[t].isScalePoint=!0,u[t].tag=t,this.addScalePoint(u[t])}}}computeScaleValues(t,e){if(!0===e.isScalePoint){var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);i=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i),this.scaleValues.length<4&&(this.scaleValues.push(this.sv1_DefaultAtLenDivAbLen),this.scaleValues.push(this.sv2_DefaultAjWidthDivAtLen),this.scaleValues.push(this.sv3_DefaultAeWidthDivAtLen),this.scaleValues.push(this.sv4_DefaultAeLenDivAtLen));var o=i.length;if(o<=2)return;var l,s,n,a,r=this.operateCtrlPts(i);o=r.length,o--;var p=this.calcScaleValueCount(i.length);if(this.scaleValues.length<p){var u=this.calcDefaultScaleValues(o);l=u[0],s=u[1],n=u[2],a=u[3]}else l=this.scaleValues[0],s=this.scaleValues[1],n=this.scaleValues[2],a=this.scaleValues[3];var h=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i),g=[];for(let t=0;t<this.scalePoints.length;t++)g.push(this.scalePoints[t].clone());if(0==g.length)return;g[t]=e.clone();var c,y,P=o-1;c=o<=3?new SuperMapAlgoPlot.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2):r[P-1].clone();var S,d,m,f,L,M,b=new SuperMapAlgoPlot.Point(0,0),A=new SuperMapAlgoPlot.Point(0,0),T=new SuperMapAlgoPlot.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(0,3,c,r[P],r[P+1],A,T),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,r[o],r[o-1],T,b),y=b.clone();var v=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(r[o],y,g[2]);S=v.dLen1,v.dLen2,0==S&&(S=.1),d=S,l=(S/=a+1)/h,1==t?(f=(v=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(r[o],y,g[1])).dLen1,n=(L=v.dLen2)/S,a=(f-S)/S):0==t?(S=(v=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(r[o],y,g[0])).dLen1,s=(m=v.dLen2)/S,(M=SuperMapAlgoPlot.PlottingUtil.distance(r[o],r[o-1]))<2*S&&(S=.5*M),f=(v=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(r[o],y,g[1])).dLen1,n=(L=v.dLen2)/S,(a=(d-S)/S)<.1&&(n=L/(S=d/(1+(a=.1))),s=m/S),l=S/h):2==t&&(l=S/h),m=S*s,(M=SuperMapAlgoPlot.PlottingUtil.distance(r[o],r[o-1]))<2*S&&(m=(S=.5*M)*s,l=S/h),this.scaleValues[0]=l,this.scaleValues[1]=s,this.scaleValues[2]=n,this.scaleValues[3]=a}}arrowMeshs(t){var e=[],i=[],o=[],l=[],s=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),n=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePts(s,this.scaleValues,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_MULTIPOLYBEZIER),a=n.arrowTouLen,r=n.leftBodyPts,p=n.rightBodyPts;if(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(a,0)){var u=[];u.push(r[r.length-1]),u.push(p[p.length-1]);var h=[];h.push(this.scaleValues[2]),h.push(this.scaleValues[3]),h.push(0),h.push(0);var g=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePts(s,u,h,a,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITH_EAR);for(let t=0;t<r.length;t++)e.push(r[t]),i.push(r[t]);for(let t=0;t<g.length;t++)e.push(g[t]),l.push(g[t]);for(let t=p.length-1;t>=0;t--)e.push(p[t]),o.push(p[t])}return{shapePts:e,leftBodyPts:i,rightBodyPts:o,arrowHeadPts:l}}updateScalePoints(t){var e=t.length,i=[];if(!(e<3)){var o=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t);if(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(o,0)){var l=this.operateCtrlPts(t);e=l.length,e--;var s=[];for(let t=0;t<this.scaleValues.length;t++)s.push(this.scaleValues[t]);var n=this.genArrowBodyPts(o,l,s),a=n.ArrowBodyCenterPts,r=this.genAtPts(e,a,s,n.ArrowTouLen),p=this.calc3rdScalePt(e,a,s,n.ArrowTouLen);return i.push(new SuperMapAlgoPlot.Point(n.LeftBodyPtsTemp[e].x,n.LeftBodyPtsTemp[e].y)),i.push(new SuperMapAlgoPlot.Point(r[2].x,r[2].y)),i.push(new SuperMapAlgoPlot.Point(p.x,p.y)),i}}}operateCtrlPts(t){let e=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts;var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(e);if(3===i.length){var o=((i[0].x+i[1].x)/2+i[2].x)/2,l=((i[0].y+i[1].y)/2+i[2].y)/2,s=new SuperMapAlgoPlot.Point(o,l),n=i[2];i[2]=s,i.push(n)}return i}genArrowBodyPts(t,e,i){var o,l,s,n=[],a=[],r=[],p=[],u=[],h=[],g=e.length;if(g--,i.length<this.calcScaleValueCount(g)){var c=this.calcDefaultScaleValues(g);l=c[0],s=c[1]}else l=i[0],s=i[1];var y=SuperMapAlgoPlot.PlottingUtil.clonePoints(e),P=(y[0].x+y[1].x)/2,S=(y[0].y+y[1].y)/2,d=Math.abs(P-y[2].x),m=Math.abs(S-y[2].y),f=0;if(d>0&&m>0){var L=1/(P-y[2].x),M=-1/(S-y[2].y),b=1*y[2].y/(S-y[2].y)-1*y[2].x/(P-y[2].x);f=Math.abs(L*y[0].x+M*y[0].y+b)/Math.sqrt(L*L+M*M)}else m<=1e-4?f=Math.abs(S-y[1].y):d<=1e-4&&(f=Math.abs(P-y[1].x));var A=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(f,y[2],new SuperMapAlgoPlot.Point(P,S)),T=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(y[1],y[2],y[0]);T?(n[1]=y[1],a[1]=y[0]):(n[1]=y[0],a[1]=y[1]),y[1]=new SuperMapAlgoPlot.Point((y[0].x+y[1].x)/2,(y[0].y+y[1].y)/2);var v=Math.sqrt((A.pntLeft.x-A.pntRight.x)*(A.pntLeft.x-A.pntRight.x)+(A.pntLeft.y-A.pntRight.y)*(A.pntLeft.y-A.pntRight.y))*this.sv_AtWidthDivAwWidth,_=(o=v*this.sv_AtLenDivAtWidth)*s;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l,0)||(_=(o=t*l)*s);var x,O,w=SuperMapAlgoPlot.PlottingUtil.distance(y[g],y[g-1]),I=2*o;w<I&&(_=(o=w/2)*s),y.push(y[g].clone()),x=0,O=0;var C=0,E=[];for(C=2;C<=g;C++)x+=SuperMapAlgoPlot.PlottingUtil.distance(y[C],y[C-1]);for(x-=o,C=2;C<=g-1;C++)O+=SuperMapAlgoPlot.PlottingUtil.distance(y[C],y[C-1]),E[C]=_+(v-_)*Math.pow((x-O)/x,this.sv_AtScaleParameter);E[g]=_;var D,U,N=new SuperMapAlgoPlot.Point(0,0),R=new SuperMapAlgoPlot.Point(0,0),B=new SuperMapAlgoPlot.Point(0,0);for(C=2;C<=g-1;C++)SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(0,3,y[C-1],y[C],y[C+1],R,B),C==g-1&&SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,y[g],y[g-1],B,N),D=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(E[C],R,y[C]),(T=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(B,R,D.pntRight))?(n[C]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y),a[C]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y)):(n[C]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y),a[C]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y));for(Math.sqrt(1*(y[g].x-N.x)*(y[g].x-N.x)+1*(y[g].y-N.y)*(y[g].y-N.y))>0&&(y[g]=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(o,y[g],N)),D=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(_,y[g+1],y[g]),(T=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(y[g],y[g+1],D.pntLeft))?(a[g]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y),n[g]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y)):(a[g]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y),n[g]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y)),C=2;C<g;C++)SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(3,3,n[C-1],n[C],n[C+1],R,B),r[C]=new SuperMapAlgoPlot.Point(R.x,R.y),p[C]=new SuperMapAlgoPlot.Point(B.x,B.y),SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(3,3,a[C-1],a[C],a[C+1],R,B),u[C]=new SuperMapAlgoPlot.Point(R.x,R.y),h[C]=new SuperMapAlgoPlot.Point(B.x,B.y),2==C&&(SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,n[1],n[2],r[2],N),p[C]=new SuperMapAlgoPlot.Point(N.x,N.y),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,a[1],a[2],u[2],N),h[C]=new SuperMapAlgoPlot.Point(N.x,N.y)),C==g-1&&(I=(w=SuperMapAlgoPlot.PlottingUtil.distance(n[g],n[g-1]))/3,(U=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(I,y[g],y[g+1])).x+=n[g].x-y[g].x,U.y+=n[g].y-y[g].y,I=(w=v-_)*Math.pow(I/x,this.sv_AtScaleParameter),D=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(I,n[g],U),r[g]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y),I=(w=SuperMapAlgoPlot.PlottingUtil.distance(a[g],a[g-1]))/3,(U=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(I,y[g],y[g+1])).x+=a[g].x-y[g].x,U.y+=a[g].y-y[g].y,I=(w=v-_)*Math.pow(I/x,this.sv_AtScaleParameter),D=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(I,a[g],U),u[g]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y));return{ArrowBodyCenterPts:SuperMapAlgoPlot.PlottingUtil.clonePoints(y),LeftBodyPtsTemp:n,RightBodyPtsTemp:a,LeftBodyPtsLeftCtrlPts:r,LeftBodyPtsRightCtrlPts:p,RightBodyPtsLeftCtrlPts:u,RightBodyPtsRightCtrlPts:h,ArrowTouLen:o}}calcScaleValueCount(){return 4}calcDefaultScaleValues(){var t=[];return t.push(this.sv1_DefaultAtLenDivAbLen),t.push(this.sv2_DefaultAjWidthDivAtLen),t.push(this.sv3_DefaultAeWidthDivAtLen),t.push(this.sv4_DefaultAeLenDivAtLen),t}genAtPts(t,e,i,o){var l=i[2],s=[],n=o*i[3],a=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(n,e[t],e[t+1]);n=o*l;var r=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(n,e[t+1],a);return s.push(new SuperMapAlgoPlot.Point(r.pntLeft.x,r.pntLeft.y)),s.push(e[t+1]),s.push(new SuperMapAlgoPlot.Point(r.pntRight.x,r.pntRight.y)),s}calc3rdScalePt(t,e,i,o){var l=o*i[3];return SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(l,e[t],e[t+1])}};SuperMapAlgoPlot.AlgoSymbol1005=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.1),this.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1005"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)return;this.scaleValues[0]=this.getSubSymbolScaleValue();var e=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t)*this.scaleValues[0],i=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,e,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYBEZIER,!1),o=[];if(t.length>2)for(let e=0;e<i.length;e++){if(i[e].x===t[t.length-2].x||i[e].y===t[t.length-2].y){o.push(i[e]),o.push(i[i.length-1]);break}o.push(i[e])}let l=i[i.length-1],s=i[i.length-2],n=SuperMapAlgoPlot.PlottingUtil.distance(l,s);var a=[];a.push(i[i.length-1]),a.push(i[i.length-2]),a.push(t[t.length-2]),!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(n,e,1e-7)&&n<=e?this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,o):this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,i);var r=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePtsBySingleLine(a,e,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_POLYLINE);r.length>0&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,r,{surroundLineLimit:!0,lineTypeLimit:!0})}};SuperMapAlgoPlot.AlgoSymbol1006=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.QIANJI_RATE1=9,this.QIANJI_RATE2=20,this.QIANJI_RATE4=5,this.QIANJI_RATE3=1/3,this.QIANJI_TAIL_RATE1=8,this.QIANJI_TAIL_RATE2=3,this.QIANJI_TAIL_RATE3=.6,this.SV1_Default=.25,this.SV1_MinValue=0,this.SV1_MaxValue=.5,this.DEFAULT_ARROW_TAIL_POS=.4,this.SCALE_VALUE_COUNT=1,this.MIN_LEN_LeftToRightCenter=1e-7,this.SCALE_AT=1/3,this.SCALE_ATAJ=1/7,this.SCALE_ATAE=1/3,this.SCALE_AW=2/3,this.SCALE_ATAJctrlDefSide=.8,this.SCALE_ATAJctrlSameSide=2/3,this.SCALE_MM_LEFT=.25,this.SCALE_MM_RIGHT=.75,this.BEZIER_K1=1/3,this.QIANJI_OPERATE_RATE1=1,0===this.scaleValues.length&&this.scaleValues.push(this.SV1_Default),this.m_dMaxDis=0,this.m_bIsAnimation=!1,this.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1006"}calculateParts(){this.init(),this.m_scalePoints=[];var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=2&&t.length<this.minEditPts&&this.calAssistantLine(),!(t.length<this.minEditPts)){var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),i=e.length,o=!1;void 0!==e[0].z&&(o=!0);var l=this.arrowMeshs(t);if(o){var s=[];for(let t=0;t<i;t++)s.push(e[t]);var n=l.LeftArowLeftBody,a=l.LeftArowHead,r=l.LeftArowRightBody,p=l.RightArowLeftBody,u=l.RightArowHead,h=l.RightArowRightBody;if(0==n.length)return!1;var g=[],c=[],y=[];if(3==s.length)n[0].x==s[0].x&&n[0].y==s[0].y?(c.push(s[0]),c.push(s[2]),y.push(s[1]),y.push(s[2])):(c.push(s[1]),c.push(s[2]),y.push(s[0]),y.push(s[2]));else{if(4!=s.length)return!1;n[0].x==s[0].x&&n[0].y==s[0].y?(c.push(s[0]),y.push(s[1])):(c.push(s[1]),y.push(s[0])),a[1].x==s[2].x&&a[1].y==s[2].y?(c.push(s[2]),y.push(s[3])):(c.push(s[3]),y.push(s[2]))}var P=new SuperMapAlgoPlot.Point;P=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(n[n.length-1],{x:c[0].x,y:c[0].y},{x:c[1].x,y:c[1].y}).projectPoint;var S=this.ComputeZValue(P,c[1],c[0]),d=[];this.ComputeHeight(n,d,c[0].z,S),g=g.concat(d);for(let t=0;t<a.length;t++){P=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(a[t],{x:c[0].x,y:c[0].y},{x:c[1].x,y:c[1].y}).projectPoint;var m=this.ComputeZValue(P,c[1],c[0]);g.push({x:a[t].x,y:a[t].y,z:m})}P=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(r[0],{x:c[0].x,y:c[0].y},{x:c[1].x,y:c[1].y}).projectPoint,this.ComputeZValue(P,c[1],c[0]),P=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(r[r.length-1],{x:c[0].x,y:c[0].y},{x:c[1].x,y:c[1].y}).projectPoint;var f=this.ComputeZValue(P,c[1],c[0]);P=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(p[0],{x:y[0].x,y:y[0].y},{x:y[1].x,y:y[1].y}).projectPoint;var L=(this.ComputeZValue(P,y[1],y[0])+f)/2,M=[];this.ComputeHeight(r,M,S,L),g=g.concat(M),P=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(p[p.length-1],{x:y[0].x,y:y[0].y},{x:y[1].x,y:y[1].y}).projectPoint;var b=this.ComputeZValue(P,y[1],y[0]),A=[];this.ComputeHeight(p,A,L,b),g=g.concat(A);for(let t=0;t<u.length;t++){P=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(u[t],{x:y[0].x,y:y[0].y},{x:y[1].x,y:y[1].y}).projectPoint;var T=this.ComputeZValue(P,y[1],y[0]);g.push({x:u[t].x,y:u[t].y,z:T})}P=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(h[0],{x:y[0].x,y:y[0].y},{x:y[1].x,y:y[1].y}).projectPoint;var v=this.ComputeZValue(P,y[1],y[0]),_=[];this.ComputeHeight(h,_,v,y[0].z),(g=g.concat(_)).length>0&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,g,{surroundLineFlag:!1}),this.m_scalePoints.length>0&&(this.m_scalePoints[0]={x:this.m_scalePoints[0].x,y:this.m_scalePoints[0].y,z:L});for(let t=0;t<this.m_scalePoints.length;t++)this.m_scalePoints[t].isScalePoint=!0,this.m_scalePoints[t].tag=t,this.addScalePoint(this.m_scalePoints[t]);return!0}var x=l.shapePts;x.length>0&&(this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,x,{surroundLineFlag:!1,lineWidthLimit:!0,strokeWidth:0,weight:0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,x,{surroundLineFlag:!1})),this.scalePoints=[];for(let t=0;t<this.m_scalePoints.length;t++)this.m_scalePoints[t].isScalePoint=!0,this.m_scalePoints[t].tag=t,this.addScalePoint(this.m_scalePoints[t])}}modifyPoint(t,e){if(!0===e.isScalePoint){let t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(this.controlPoints).pts;var i,o=SuperMapAlgoPlot.PlottingUtil.operateControlPoints(t),l=new SuperMapAlgoPlot.Point((o[0].x+o[1].x)/2,(o[0].y+o[1].y)/2),s=new SuperMapAlgoPlot.Point((o[2].x+o[3].x)/2,(o[2].y+o[3].y)/2),n=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,l,s);if(n.isOnline){var a=SuperMapAlgoPlot.PlottingUtil.distance(n.projectPoint,l),r=SuperMapAlgoPlot.PlottingUtil.distance(l,s);(i=SuperMapAlgoPlot.PlottingUtil.equalFuzzy(a,0)?this.SV1_MinValue:a/r)>this.SV1_MaxValue&&(i=this.SV1_MaxValue)}else i=SuperMapAlgoPlot.PlottingUtil.distance(n.projectPoint,l)<SuperMapAlgoPlot.PlottingUtil.distance(n.projectPoint,s)?this.SV1_MinValue:this.SV1_MaxValue;this.scaleValues=[],this.scaleValues.push(i)}this.calculateParts()}arrowMeshs(t){var e=new SuperMapAlgoPlot.Path2D;t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts;var i=[];this.m_bIsAnimation&&4==t.length?i=SuperMapAlgoPlot.PlottingUtil.clonePoints(t):(i=SuperMapAlgoPlot.PlottingUtil.operateControlPoints(t),void 0!==t[0].z&&(i[i.length-1].z=i[i.length-2].z));var o=this.scaleValues[0],l=SuperMapAlgoPlot.PlottingUtil.distance(i[0],i[3]),s=SuperMapAlgoPlot.PlottingUtil.distance(i[1],i[2]),n=i[1].clone(),a=.5*(i[0].x+i[3].x),r=.5*(i[0].y+i[3].y),p=new SuperMapAlgoPlot.Point(a,r),u=.5*(i[1].x+i[2].x),h=.5*(i[1].y+i[2].y),g=new SuperMapAlgoPlot.Point(u,h),c=SuperMapAlgoPlot.PlottingUtil.distance(p,g);c<this.MIN_LEN_LeftToRightCenter&&(c=this.MIN_LEN_LeftToRightCenter),p.x=a+l*(a-u)/(c*this.QIANJI_RATE1),p.y=r+l*(r-h)/(c*this.QIANJI_RATE1),g.x=u+s*(u-a)/(c*this.QIANJI_RATE1),g.y=h+s*(h-r)/(c*this.QIANJI_RATE1);var y=new SuperMapAlgoPlot.Point(0,0),P=new SuperMapAlgoPlot.Point(0,0);y.x=a+l*(a-u)/(c*this.QIANJI_RATE2),y.y=r+l*(r-h)/(c*this.QIANJI_RATE2),P.x=u+s*(u-a)/(c*this.QIANJI_RATE2),P.y=h+s*(h-r)/(c*this.QIANJI_RATE2);var S=new SuperMapAlgoPlot.Point((i[0].x+i[1].x)/2,(i[0].y+i[1].y)/2),d=new SuperMapAlgoPlot.Point((i[2].x+i[3].x)/2,(i[2].y+i[3].y)/2),m=i[3].x-(i[3].x-p.x)*this.SCALE_AT,f=i[3].y-(i[3].y-p.y)*this.SCALE_AT,L=i[2].x-(i[2].x-g.x)*this.SCALE_AT,M=i[2].y-(i[2].y-g.y)*this.SCALE_AT,b=new SuperMapAlgoPlot.Point(0,0),A=new SuperMapAlgoPlot.Point(0,0),T=new SuperMapAlgoPlot.Point(0,0),v=new SuperMapAlgoPlot.Point(0,0);A.x=m-(f-i[3].y)*this.SCALE_ATAJ,A.y=f+(m-i[3].x)*this.SCALE_ATAJ,b.x=m+(f-i[3].y)*this.SCALE_ATAJ,b.y=f-(m-i[3].x)*this.SCALE_ATAJ,v.x=L-(M-i[2].y)*this.SCALE_ATAJ,v.y=M+(L-i[2].x)*this.SCALE_ATAJ,T.x=L+(M-i[2].y)*this.SCALE_ATAJ,T.y=M-(L-i[2].x)*this.SCALE_ATAJ;var _=new SuperMapAlgoPlot.Point(0,0),x=new SuperMapAlgoPlot.Point(0,0),O=new SuperMapAlgoPlot.Point(0,0),w=new SuperMapAlgoPlot.Point(0,0);_.x=3*b.x-2*m-(i[3].x-m)*this.SCALE_ATAE,_.y=3*b.y-2*f-(i[3].y-f)*this.SCALE_ATAE,x.x=3*A.x-2*m-(i[3].x-m)*this.SCALE_ATAE,x.y=3*A.y-2*f-(i[3].y-f)*this.SCALE_ATAE,O.x=3*T.x-2*L-(i[2].x-L)*this.SCALE_ATAE,O.y=3*T.y-2*M-(i[2].y-M)*this.SCALE_ATAE,w.x=3*v.x-2*L-(i[2].x-L)*this.SCALE_ATAE,w.y=3*v.y-2*M-(i[2].y-M)*this.SCALE_ATAE,p.x=a+l*(a-u)/(c*this.QIANJI_RATE4),p.y=r+l*(r-h)/(c*this.QIANJI_RATE4),g.x=u+s*(u-a)/(c*this.QIANJI_RATE4),g.y=h+s*(h-r)/(c*this.QIANJI_RATE4);var I=new SuperMapAlgoPlot.Point(0,0);I.x=i[0].x+(p.x-i[0].x)*this.SCALE_AW,I.y=i[0].y+(p.y-i[0].y)*this.SCALE_AW;var C=new SuperMapAlgoPlot.Point(0,0);C.x=i[1].x+(g.x-i[1].x)*this.SCALE_AW,C.y=i[1].y+(g.y-i[1].y)*this.SCALE_AW;var E=new SuperMapAlgoPlot.Point(0,0);E.x=b.x+(p.x-b.x)*this.SCALE_ATAJctrlSameSide,E.y=b.y+(p.y-b.y)*this.SCALE_ATAJctrlSameSide;var D=new SuperMapAlgoPlot.Point(0,0);D.x=v.x+(g.x-v.x)*this.SCALE_ATAJctrlSameSide,D.y=v.y+(g.y-v.y)*this.SCALE_ATAJctrlSameSide;var U=new SuperMapAlgoPlot.Point(0,0);U.x=A.x+(y.x-A.x)*this.SCALE_ATAJctrlDefSide,U.y=A.y+(y.y-A.y)*this.SCALE_ATAJctrlDefSide;var N=new SuperMapAlgoPlot.Point(0,0);N.x=T.x+(P.x-T.x)*this.SCALE_ATAJctrlDefSide,N.y=T.y+(P.y-T.y)*this.SCALE_ATAJctrlDefSide;var R=new SuperMapAlgoPlot.Point(0,0);R.x=S.x+(d.x-S.x)*o,R.y=S.y+(d.y-S.y)*o,this.m_scalePoints.push(new SuperMapAlgoPlot.Point(R.x,R.y));var B=new SuperMapAlgoPlot.Point(0,0),F=new SuperMapAlgoPlot.Point(0,0);B.x=i[0].x+(i[3].x-i[0].x)*o,B.y=i[0].y+(i[3].y-i[0].y)*o,F.x=i[1].x+(i[2].x-i[1].x)*o,F.y=i[1].y+(i[2].y-i[1].y)*o,B.x=B.x+(R.x-B.x)*this.QIANJI_RATE3,B.y=B.y+(R.y-B.y)*this.QIANJI_RATE3,F.x=F.x+(R.x-F.x)*this.QIANJI_RATE3,F.y=F.y+(R.y-F.y)*this.QIANJI_RATE3;var k=[];k.push(i[0].clone()),k.push(I.clone()),k.push(E.clone()),k.push(b.clone()),e.MoveTo(k[0]),e.CurveTo(k[1],k[2],k[3]);var V,Y,z=[],G=[],W=[],j=[],X=[],H=[];for(e.ToSubPathPolygons(H),V=H[0],Y=H[0].length,e.LineTo(_),e.LineTo(i[3]),e.LineTo(x),(k=[]).push(A),k.push(U),k.push(B),k.push(R),e.LineTo(k[0]),H=[],e.ToSubPathPolygons(H);Y<H[0].length;Y++)z.push(H[0][Y]);for(Y=H[0].length,e.CurveTo(k[1],k[2],k[3]),H=[],e.ToSubPathPolygons(H);Y<H[0].length;Y++)G.push(H[0][Y]);for(Y=H[0].length,(k=[]).push(F),k.push(N),k.push(T),e.CurveTo(k[0],k[1],k[2]),H=[],e.ToSubPathPolygons(H);Y<H[0].length;Y++)W.push(H[0][Y]);for(Y=H[0].length,e.LineTo(O),e.LineTo(i[2]),e.LineTo(w),(k=[]).push(v),k.push(D),k.push(C),k.push(n),e.LineTo(k[0]),H=[],e.ToSubPathPolygons(H);Y<H[0].length;Y++)j.push(H[0][Y]);for(Y=H[0].length,e.CurveTo(k[1],k[2],k[3]),H=[],e.ToSubPathPolygons(H);Y<H[0].length;Y++)X.push(H[0][Y]);return H=[],e.ToSubPathPolygons(H),{shapePts:SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(H[0]),LeftArowLeftBody:SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(V),LeftArowHead:SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(z),LeftArowRightBody:SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(G),RightArowLeftBody:SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(W),RightArowHead:SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(j),RightArowRightBody:SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(X)}}};SuperMapAlgoPlot.AlgoSymbol1007=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.1),this.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1007"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e=!1;void 0!==t[0].z&&(e=!0),this.scaleValues[0]=this.getSubSymbolScaleValue();var i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t)*this.scaleValues[0],o=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,i,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYLINE,!0),l=[];l.push(t[t.length-1]),l.push(o[o.length-1]),l.push(t[t.length-2]);var s=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePtsBySingleLine(l,i,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE_SOLID);if(e){for(var n=t.length,a=[],r=[],p=0;p<n;++p)a.push({x:o[p].x,y:o[p].y,z:t[p].z});var u={x:t[n-1].x,y:t[n-1].y,z:t[n-1].z},h={x:t[n-2].x,y:t[n-2].y,z:t[n-2].z},g=this.ComputeZValue(o[n-1],u,h);a[n-1].z=g;for(var c=0;c<s.length;++c){var y=this.ComputeZValue(s[c],u,h);r.push({x:s[c].x,y:s[c].y,z:y})}this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,a);let e={surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0,surroundLineLimit:!0,lineTypeLimit:!0};r.length>0&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,r,e)}else{this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,o);let t={surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0,lineTypeLimit:!0,surroundLineLimit:!0};s.length>0&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,s,t)}}}};SuperMapAlgoPlot.AlgoSymbol1008=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.1),this.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1008"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){this.scaleValues[0]=this.getSubSymbolScaleValue();var e=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t)*this.scaleValues[0],i=Math.sqrt(e*e/3),o=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,i,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYBEZIER,!0),l=[];l.push(t[t.length-1]),l.push(o[o.length-1]),l.push(t[t.length-2]);var s=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePtsBySingleLine(l,e,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL);o.push(t[t.length-1]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,o),s.length>0&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,s,{surroundLineFlag:!1,fillLimit:!0,fill:!0,lineTypeLimit:!0,surroundLineLimit:!0})}}};SuperMapAlgoPlot.AlgoSymbol1009=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.1),this.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1009"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e=!1;void 0!==t[0].z&&(e=!0),this.scaleValues[0]=this.getSubSymbolScaleValue();var i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t)*this.scaleValues[0],o=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,0,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYLINE,!1),l=[];l.push(o[o.length-1]),l.push(o[o.length-2]),l.push(t[t.length-2]);var s=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePtsBySingleLine(l,i,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_POLYLINE),n=[];n.push(o[0]),n.push(o[1]);var a=SuperMapAlgoPlot.ArrowToolkit.generateArrowTailShapePtsBySingleLine(n,i,SuperMapAlgoPlot.ArrowToolkit.ArrowTailType.ARROWTAIL_COATTAIL);if(e){for(var r=t.length,p=[],u=[],h=[],g=0;g<r;++g)p.push({x:t[g].x,y:t[g].y,z:t[g].z});var c,y={x:t[r-1].x,y:t[r-1].y,z:t[r-1].z},P={x:t[r-2].x,y:t[r-2].y,z:t[r-2].z};c=this.ComputeZValue(o[r-1],y,P),p.push({x:o[r-1].x,y:o[r-1].y,z:c});for(var S=0;S<s.length;++S)c=this.ComputeZValue(s[S],y,P),u.push({x:s[S].x,y:s[S].y,z:c});for(var d={x:t[1].x,y:t[1].y,z:t[1].z},m={x:t[0].x,y:t[0].y,z:t[0].z},f=0;f<a.length;++f)c=this.ComputeZValue(a[f],d,m),h.push({x:a[f].x,y:a[f].y,z:c});let e={surroundLineFlag:!1};this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,p,e),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,u,{surroundLineLimit:!0,lineTypeLimit:!0}),0!==h.length&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,h)}else{let t={surroundLineFlag:!1};this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,o,t),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,s,{surroundLineLimit:!0,lineTypeLimit:!0}),0!==a.length&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,a)}}}};SuperMapAlgoPlot.AlgoSymbol1010=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(0),this.scaleValues.push(.148),this.scaleValues.push(.4),this.scaleValues.push(.312),this.scaleValues.push(.2)),this.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1010"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=2&&t.length<this.minEditPts&&this.calAssistantLine(),!(t.length<this.minEditPts)){var e=this.arrowMeshs(t);if(SuperMapAlgoPlot.PlottingUtil.clearSamePts(e.shapePts),0!==e.shapePts.length){this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.shapePts,{surroundLineFlag:!1}),this.scalePoints=[];for(let t=0;t<e.m_scalePoints.length;t++)this.addScalePoint(e.m_scalePoints[t])}}}modifyPoint(t,e){if(!0===e.isScalePoint){var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);this.scaleValues.length<4&&(this.scaleValues.push(0),this.scaleValues.push(.148),this.scaleValues.push(.4),this.scaleValues.push(.312),this.scaleValues.push(.2));var o,l,s,n,a=i.length;if(a<=2)return;this.scaleValues.length<4?(o=0,l=.148,s=.4,n=.312):(o=this.scaleValues[0],l=this.scaleValues[1],s=this.scaleValues[2],n=this.scaleValues[3]);var r=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i),p=this.operateCtrlPts(i);a=p.length,a--;var u=[];for(let t=0;t<this.scalePoints.length;t++)u.push(this.scalePoints[t].clone());if(0===(u=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(u).pts).length)return;if(u[t]=e.clone(),3===t){var h=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePts(i,this.scaleValues,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_MULTIPOLYBEZIER),g=new SuperMapAlgoPlot.Point(.5*(h.leftBodyPts[0].x+h.rightBodyPts[0].x),.5*(h.leftBodyPts[0].y+h.rightBodyPts[0].y)),c=SuperMapAlgoPlot.PlottingUtil.distance(h.leftBodyPts[0],h.rightBodyPts[0]);this.scaleValues[4]=SuperMapAlgoPlot.PlottingUtil.distance(g,e)/c}else{var y,P,S=a-1;y=a<=3?new SuperMapAlgoPlot.Point((p[0].x+p[1].x)/2,(p[0].y+p[1].y)/2):p[S-1].clone();var d,m,f,L,M,b,A=new SuperMapAlgoPlot.Point(0,0),T=new SuperMapAlgoPlot.Point(0,0),v=new SuperMapAlgoPlot.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(0,3,y,p[S],p[S+1],T,v),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,p[a],p[a-1],v,A),P=A.clone();var _=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(p[a],P,u[2]);d=_.dLen1,_.dLen2,0===d&&(d=.1),m=d,o=(d/=n+1)/r,1===t?(L=(_=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(p[a],P,u[1])).dLen1,s=(M=_.dLen2)/d,n=(L-d)/d):0===t?(d=(_=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(p[a],P,u[0])).dLen1,l=(f=_.dLen2)/d,(b=SuperMapAlgoPlot.PlottingUtil.distance(p[a],p[a-1]))<2*d&&(d=.5*b),L=(_=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(p[a],P,u[1])).dLen1,s=(M=_.dLen2)/d,(n=(m-d)/d)<.1&&(s=M/(d=m/(1+(n=.1))),l=f/d),o=d/r):2===t&&(o=d/r),f=d*l,(b=SuperMapAlgoPlot.PlottingUtil.distance(p[a],p[a-1]))<2*d&&(f=(d=.5*b)*l,o=d/r),this.scaleValues[0]=o,this.scaleValues[1]=l,this.scaleValues[2]=s,this.scaleValues[3]=n}}this.calculateParts()}arrowMeshs(t){var e=[],i=[],o=[],l=[],s=[],n=[],a=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),r=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePts(a,this.scaleValues,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_MULTIPOLYBEZIER),p=r.arrowTouLen,u=r.leftBodyPts,h=r.rightBodyPts;if(a=r.OpectrlPoints,!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(p,0)){var g=[];g.push(u[u.length-1]),g.push(h[h.length-1]);var c=[];c.push(this.scaleValues[2]),c.push(this.scaleValues[3]),c.push(0),c.push(0);var y=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePts(a,g,c,p,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITH_EAR),P=[];P.push(u[0]),P.push(h[0]);var S,d=SuperMapAlgoPlot.ArrowToolkit.generateArrowTailShapePts(t,P,this.scaleValues[4],SuperMapAlgoPlot.ArrowToolkit.ArrowTailType.ARROWTAIL_COATTAIL_POLYBODY);for(let t=0;t<u.length;t++)e.push(u[t]),i.push(u[t]);for(let t=0;t<y.length;t++)e.push(y[t]),l.push(y[t]);for(let t=h.length-1;t>=0;t--)e.push(h[t]),o.push(h[t]);for(let t=1;t<d.length;t++)e.push(d[t]),s.push(d[t]);var m=a.length;m-=2;var f=p*this.scaleValues[3];S=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(f,a[m],a[m+1]);var L=new SuperMapAlgoPlot.Point(i[i.length-1].x,i[i.length-1].y);L.isScalePoint=!0,L.tag=0,n.push(L),(L=new SuperMapAlgoPlot.Point(l[0].x,l[0].y)).isScalePoint=!0,L.tag=1,n.push(L),(L=new SuperMapAlgoPlot.Point(S.x,S.y)).isScalePoint=!0,L.tag=2,n.push(L),(L=new SuperMapAlgoPlot.Point(d[1].x,d[1].y)).isScalePoint=!0,L.tag=3,n.push(L)}return{shapePts:e,leftBodyPts:i,rightBodyPts:o,arrowHeadPts:l,arrowTailPts:s,m_scalePoints:n}}operateCtrlPts(t){let e=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts;var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(e);if(3===i.length){var o=((i[0].x+i[1].x)/2+i[2].x)/2,l=((i[0].y+i[1].y)/2+i[2].y)/2,s=new SuperMapAlgoPlot.Point(o,l),n=i[2];i[2]=s,i.push(n)}return i}};SuperMapAlgoPlot.AlgoSymbol1011=class extends SuperMapAlgoPlot.AlgoSymbol1004{constructor(t){super(t),this.sv1_DefaultAtLenDivAbLen=0,this.sv2_DefaultAjWidthDivAtLen=.148,this.sv3_DefaultAeWidthDivAtLen=.4,this.sv4_DefaultAeLenDivAtLen=.312,this.sv_arrowTailWidth=.05,5!==this.scaleValues.length&&(this.scaleValues=[],this.scaleValues.push(this.sv1_DefaultAtLenDivAbLen),this.scaleValues.push(this.sv2_DefaultAjWidthDivAtLen),this.scaleValues.push(this.sv3_DefaultAeWidthDivAtLen),this.scaleValues.push(this.sv4_DefaultAeLenDivAtLen),this.scaleValues.push(this.sv_arrowTailWidth)),this.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1011"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<2)){var e=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t);if(0!==e){var i=e*this.scaleValues[4],o=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(i,t[1],t[0]);void 0!==t[0].z&&(o.pntLeft.z=t[0].z,o.pntRight.z=t[0].z),this.controlPoints=[],this.controlPoints.push(o.pntLeft),this.controlPoints.push(o.pntRight);for(let e=1;e<t.length;e++)this.controlPoints.push(t[e].clone());var l=[];for(let t=0;t<this.scaleValues.length;t++)l.push(this.scaleValues[t]);this.scaleValues=[];for(let t=0;t<l.length-1;t++)this.scaleValues.push(l[t]);SuperMapAlgoPlot.AlgoSymbol1004.prototype.calculateParts.apply(this,arguments);var s=o.pntRight.clone();s.isScalePoint=!0,s.tag=3,this.addScalePoint(s),this.controlPoints=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),this.scaleValues=[];for(let t=0;t<l.length;t++)this.scaleValues.push(l[t])}}}modifyPoint(t,e){if(!0===e.isScalePoint){var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(i.length<2)return;this.scaleValues.length<5&&(this.scaleValues=[],this.scaleValues.push(this.sv1_DefaultAtLenDivAbLen),this.scaleValues.push(this.sv2_DefaultAjWidthDivAtLen),this.scaleValues.push(this.sv3_DefaultAeWidthDivAtLen),this.scaleValues.push(this.sv4_DefaultAeLenDivAtLen),this.scaleValues.push(this.sv_arrowTailWidth));var o,l=i[0].clone(),s=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i),n=s*this.scaleValues[4],a=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(n,i[1],i[0]);(i=[]).push(a.pntLeft),i.push(a.pntRight);for(let t=1;t<this.controlPoints.length;t++)i.push(this.controlPoints[t].clone());var r,p,u,h,g,c=i.length,y=this.operateCtrlPts(i);c=y.length,c--;var P=this.calcScaleValueCount(i.length);if(P++,this.scaleValues.length<P){var S=this.calcDefaultScaleValues(c);r=S[0],p=S[1],u=S[2],h=S[3],g=this.sv_arrowTailWidth}else r=this.scaleValues[0],p=this.scaleValues[1],u=this.scaleValues[2],h=this.scaleValues[3],g=this.scaleValues[4];o=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i);var d=[];for(let t=0;t<this.scalePoints.length;t++)d.push(this.scalePoints[t].clone());if(0===d.length)return;d[t]=e.clone();var m,f,L=c-1;m=c<=3?new SuperMapAlgoPlot.Point((y[0].x+y[1].x)/2,(y[0].y+y[1].y)/2):y[L-1].clone();var M,b,A,T,v,_,x=new SuperMapAlgoPlot.Point(0,0),O=new SuperMapAlgoPlot.Point(0,0),w=new SuperMapAlgoPlot.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(0,3,m,y[L],y[L+1],O,w),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,y[c],y[c-1],w,x),f=x.clone();var I=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(y[c],f,d[2]);M=I.dLen1,I.dLen2,0===M&&(M=.1),b=M,r=(M/=h+1)/o,1===t?(T=(I=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(y[c],f,d[1])).dLen1,u=(v=I.dLen2)/M,h=(T-M)/M):0===t?(M=(I=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(y[c],f,d[0])).dLen1,p=(A=I.dLen2)/M,(_=SuperMapAlgoPlot.PlottingUtil.distance(y[c],y[c-1]))<2*M&&(M=.5*_),T=(I=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(y[c],f,d[1])).dLen1,u=(v=I.dLen2)/M,(h=(b-M)/M)<.1&&(u=v/(M=b/(1+(h=.1))),p=A/M),r=M/o):2===t?r=M/o:g=SuperMapAlgoPlot.PlottingUtil.distance(e,l)/s,A=M*p,(_=SuperMapAlgoPlot.PlottingUtil.distance(y[c],y[c-1]))<2*M&&(A=(M=.5*_)*p,r=M/o),this.scaleValues[0]=r,this.scaleValues[1]=p,this.scaleValues[2]=u,this.scaleValues[3]=h,this.scaleValues[4]=g}this.calculateParts()}arrowMeshs(t){var e=[],i=[],o=[],l=[],s=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),n=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePts(s,this.scaleValues,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_MULTIPOLYBEZIER),a=n.arrowTouLen,r=n.leftBodyPts,p=n.rightBodyPts;if(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(a,0)){var u=[];u.push(r[r.length-1]),u.push(p[p.length-1]);var h=[];h.push(this.scaleValues[2]),h.push(this.scaleValues[3]),h.push(0),h.push(0);var g=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePts(s,u,h,a,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITH_EAR);for(let t=0;t<r.length;t++)e.push(r[t]),i.push(r[t]);for(let t=0;t<g.length;t++)e.push(g[t]),l.push(g[t]);for(let t=p.length-1;t>=0;t--)e.push(p[t]),o.push(p[t])}return{shapePts:e,leftBodyPts:i,rightBodyPts:o,arrowHeadPts:l}}updateScalePoints(t){var e=t.length,i=[];if(!(e<3)){var o=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t);if(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(o,0)){var l=this.operateCtrlPts(t);e=l.length,e--;var s=[];for(let t=0;t<this.scaleValues.length;t++)s.push(this.scaleValues[t]);var n=this.genArrowBodyPts(o,l,s),a=n.ArrowBodyCenterPts,r=this.genAtPts(e,a,s,n.ArrowTouLen),p=this.calc3rdScalePt(e,a,s,n.ArrowTouLen);return i.push(new SuperMapAlgoPlot.Point(n.LeftBodyPtsTemp[e].x,n.LeftBodyPtsTemp[e].y)),i.push(new SuperMapAlgoPlot.Point(r[2].x,r[2].y)),i.push(new SuperMapAlgoPlot.Point(p.x,p.y)),i}}}operateCtrlPts(t){var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(t);if(3===e.length){var i=((e[0].x+e[1].x)/2+e[2].x)/2,o=((e[0].y+e[1].y)/2+e[2].y)/2,l=new SuperMapAlgoPlot.Point(i,o),s=e[2];e[2]=l,e.push(s)}return e}genArrowBodyPts(t,e,i){var o,l,s,n=[],a=[],r=[],p=[],u=[],h=[],g=e.length;if(g--,i.length<this.calcScaleValueCount(g)){var c=this.calcDefaultScaleValues(g);l=c[0],s=c[1]}else l=i[0],s=i[1];var y=SuperMapAlgoPlot.PlottingUtil.clonePoints(e),P=(y[0].x+y[1].x)/2,S=(y[0].y+y[1].y)/2,d=Math.abs(P-y[2].x),m=Math.abs(S-y[2].y),f=0;if(d>0&&m>0){var L=1/(P-y[2].x),M=-1/(S-y[2].y),b=1*y[2].y/(S-y[2].y)-1*y[2].x/(P-y[2].x);f=Math.abs(L*y[0].x+M*y[0].y+b)/Math.sqrt(L*L+M*M)}else m<=1e-4?f=Math.abs(S-y[1].y):d<=1e-4&&(f=Math.abs(P-y[1].x));var A=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(f,y[2],new SuperMapAlgoPlot.Point(P,S)),T=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(y[1],y[2],y[0]);T?(n[1]=y[1],a[1]=y[0]):(n[1]=y[0],a[1]=y[1]),y[1]=new SuperMapAlgoPlot.Point((y[0].x+y[1].x)/2,(y[0].y+y[1].y)/2);var v=Math.sqrt((A.pntLeft.x-A.pntRight.x)*(A.pntLeft.x-A.pntRight.x)+(A.pntLeft.y-A.pntRight.y)*(A.pntLeft.y-A.pntRight.y))*this.sv_AtWidthDivAwWidth,_=(o=v*this.sv_AtLenDivAtWidth)*s;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l,0)||(_=(o=t*l)*s);var x,O,w=SuperMapAlgoPlot.PlottingUtil.distance(y[g],y[g-1]),I=2*o;w<I&&(_=(o=w/2)*s),y.push(y[g].clone()),x=0,O=0;var C=0,E=[];for(C=2;C<=g;C++)x+=SuperMapAlgoPlot.PlottingUtil.distance(y[C],y[C-1]);for(x-=o,C=2;C<=g-1;C++)O+=SuperMapAlgoPlot.PlottingUtil.distance(y[C],y[C-1]),E[C]=_+(v-_)*Math.pow((x-O)/x,this.sv_AtScaleParameter);E[g]=_;var D,U,N=new SuperMapAlgoPlot.Point(0,0),R=new SuperMapAlgoPlot.Point(0,0),B=new SuperMapAlgoPlot.Point(0,0);for(C=2;C<=g-1;C++)SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(0,3,y[C-1],y[C],y[C+1],R,B),C===g-1&&SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,y[g],y[g-1],B,N),D=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(E[C],R,y[C]),(T=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(B,R,D.pntRight))?(n[C]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y),a[C]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y)):(n[C]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y),a[C]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y));for(Math.sqrt(1*(y[g].x-N.x)*(y[g].x-N.x)+1*(y[g].y-N.y)*(y[g].y-N.y))>0&&(y[g]=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(o,y[g],N)),D=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(_,y[g+1],y[g]),(T=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(y[g],y[g+1],D.pntLeft))?(a[g]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y),n[g]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y)):(a[g]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y),n[g]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y)),C=2;C<g;C++)SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(3,3,n[C-1],n[C],n[C+1],R,B),r[C]=new SuperMapAlgoPlot.Point(R.x,R.y),p[C]=new SuperMapAlgoPlot.Point(B.x,B.y),SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(3,3,a[C-1],a[C],a[C+1],R,B),u[C]=new SuperMapAlgoPlot.Point(R.x,R.y),h[C]=new SuperMapAlgoPlot.Point(B.x,B.y),2===C&&(SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,n[1],n[2],r[2],N),p[C]=new SuperMapAlgoPlot.Point(N.x,N.y),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,a[1],a[2],u[2],N),h[C]=new SuperMapAlgoPlot.Point(N.x,N.y)),C===g-1&&(I=(w=SuperMapAlgoPlot.PlottingUtil.distance(n[g],n[g-1]))/3,(U=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(I,y[g],y[g+1])).x+=n[g].x-y[g].x,U.y+=n[g].y-y[g].y,I=(w=v-_)*Math.pow(I/x,this.sv_AtScaleParameter),D=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(I,n[g],U),r[g]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y),I=(w=SuperMapAlgoPlot.PlottingUtil.distance(a[g],a[g-1]))/3,(U=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(I,y[g],y[g+1])).x+=a[g].x-y[g].x,U.y+=a[g].y-y[g].y,I=(w=v-_)*Math.pow(I/x,this.sv_AtScaleParameter),D=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(I,a[g],U),u[g]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y));return{ArrowBodyCenterPts:SuperMapAlgoPlot.PlottingUtil.clonePoints(y),LeftBodyPtsTemp:n,RightBodyPtsTemp:a,LeftBodyPtsLeftCtrlPts:r,LeftBodyPtsRightCtrlPts:p,RightBodyPtsLeftCtrlPts:u,RightBodyPtsRightCtrlPts:h,ArrowTouLen:o}}calcScaleValueCount(){return 4}calcDefaultScaleValues(){var t=[];return t.push(this.sv1_DefaultAtLenDivAbLen),t.push(this.sv2_DefaultAjWidthDivAtLen),t.push(this.sv3_DefaultAeWidthDivAtLen),t.push(this.sv4_DefaultAeLenDivAtLen),t}genAtPts(t,e,i,o){var l=i[2],s=[],n=o*i[3],a=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(n,e[t],e[t+1]);n=o*l;var r=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(n,e[t+1],a);return s.push(new SuperMapAlgoPlot.Point(r.pntLeft.x,r.pntLeft.y)),s.push(e[t+1]),s.push(new SuperMapAlgoPlot.Point(r.pntRight.x,r.pntRight.y)),s}calc3rdScalePt(t,e,i,o){var l=o*i[3];return SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(l,e[t],e[t+1])}};SuperMapAlgoPlot.AlgoSymbol1012=class extends SuperMapAlgoPlot.AlgoSymbol1005{constructor(t){super(t),this.subSymbolDefaultPixelSize=15,this.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1012"}};SuperMapAlgoPlot.AlgoSymbol1013=class extends SuperMapAlgoPlot.AlgoSymbol1007{constructor(t){super(t),this.subSymbolDefaultPixelSize=15,this.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1013"}};SuperMapAlgoPlot.AlgoSymbol1014=class extends SuperMapAlgoPlot.AlgoSymbol1008{constructor(t){super(t),this.subSymbolDefaultPixelSize=15,this.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1014"}};SuperMapAlgoPlot.AlgoSymbol1015=class extends SuperMapAlgoPlot.AlgoSymbol1009{constructor(t){super(t),this.subSymbolDefaultPixelSize=15,this.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1015"}};SuperMapAlgoPlot.AlgoSymbol1016=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.1),this.arrowHeadType=t.arrowHeadType?t.arrowHeadType:0,this.arrowBodyType=t.arrowBodyType?t.arrowBodyType:0,this.arrowTailType=t.arrowTailType?t.arrowTailType:0,this.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1016"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e={surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fillStyle:0,lineTypeLimit:!0,surroundLineLimit:!0};this.scaleValues[0]=this.getSubSymbolScaleValue();var i,o=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t)*this.scaleValues[0],l=2*Math.sqrt(o*o/3)/1.4,s=Math.sqrt(o*o/3),n=!1;this.arrowBodyType===SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_COATTAIL?i=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,o,this.arrowBodyType,n):this.arrowHeadType===SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE||this.arrowHeadType===SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE_SOLID?(n=!0,i=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,o,this.arrowBodyType,n)):this.arrowHeadType===SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_POLYLINE?i=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,o,this.arrowBodyType,n):this.arrowHeadType===SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL_HOLLOW?(n=!0,i=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,l,this.arrowBodyType,n)):this.arrowHeadType===SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL?(n=!0,i=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,s,this.arrowBodyType,n)):i=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,0,this.arrowBodyType,n);var a=[];this.arrowBodyType===SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_COATTAIL?(a.push(t[t.length-1]),a.push(t[t.length-2]),a.push(t[t.length-2])):n?(a.push(t[t.length-1]),a.push(i[i.length-1]),a.push(t[t.length-2])):(a.push(i[i.length-1]),a.push(i[i.length-2]),a.push(t[t.length-2]));var r,p=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePtsBySingleLine(a,o,this.arrowHeadType);if(i.length>1)if(this.arrowBodyType!==SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_COATTAIL)this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,i);else for(var u=0,h=i.length-1;u<h;u+=2){var g=SuperMapAlgoPlot.PlottingUtil.distance(i[u+1],i[u]),c=180*SuperMapAlgoPlot.PlottingUtil.radian(i[u+1],i[u])/Math.PI,y=SuperMapAlgoPlot.PlottingUtil.circlePoint(i[u+1],.3*g,.3*g,c+30),P=SuperMapAlgoPlot.PlottingUtil.circlePoint(i[u+1],.3*g,.3*g,c+330),S=SuperMapAlgoPlot.PlottingUtil.circlePoint(i[u],.3*g,.3*g,c+30),d=SuperMapAlgoPlot.PlottingUtil.circlePoint(i[u],.3*g,.3*g,c+330),m=[];m.push(y,i[u+1],P,d,i[u],S),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,m,e)}r=this.arrowBodyType===SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYBEZIER?SuperMapAlgoPlot.ArrowToolkit.generateArrowTailShapePtsBySingleLine([i[0],i[1]],o,this.arrowTailType):SuperMapAlgoPlot.ArrowToolkit.generateArrowTailShapePtsBySingleLine([t[0],t[1]],o,this.arrowTailType);var f=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL;this.arrowHeadType!==SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL&&this.arrowHeadType!==SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE_SOLID&&this.arrowHeadType!==SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE&&this.arrowHeadType!==SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL_HOLLOW||(f=SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL),p.length>1&&this.addCell(f,p,e),r.length>1&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,r)}}};SuperMapAlgoPlot.AlgoSymbol1017=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(.1),this.scaleValues.push(.2),this.scaleValues.push(0),this.scaleValues.push(.3),this.scaleValues.push(.3)),this.CLASS_NAME="SuperMap.Geometry.AlgoSymbol1017"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=this.minEditPts){this.scalePoints=[];var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(t);this.isEdit||(this.scaleValues[0]=1.5*this.getSubSymbolScaleValue());var i=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePts(e,this.scaleValues,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_PARALLEL),o=i.arrowTouLen,l=i.leftBodyPts,s=i.rightBodyPts,n=[];n.push(l[l.length-1]),n.push(s[s.length-1]);var a=[];a.push(this.scaleValues[3]),a.push(this.scaleValues[4]),a.push(this.scaleValues[0]),a.push(this.scaleValues[1]);var r=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePts(e,n,a,o,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITHOUT_EAR),p=[];p=(p=p.concat(l)).concat(r);for(let t=s.length-1;t>=0;t--)p.push(s[t]);p.push(p[0]),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,p,{lineWidthLimit:!0,strokeWidth:0,weight:0,surroundLineFlag:!1});var u=SuperMapAlgoPlot.PlottingUtil.clonePoints(l),h=[];for(let t=s.length-1;t>=0;t--)h.push(s[t]);h=h.concat(u),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,h);var g=SuperMapAlgoPlot.PlottingUtil.clonePoints(r);g.push(s[s.length-1]),g.splice(0,0,l[l.length-1]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,g,{lineTypeLimit:!0});var c=new SuperMapAlgoPlot.Point((n[0].x+n[1].x)/2,(n[0].y+n[1].y)/2),y=new SuperMapAlgoPlot.Point(c.x,c.y);y.isScalePoint=!0,y.tag=0,this.scalePoints.push(y);var P=new SuperMapAlgoPlot.Point(l[l.length-1].x,l[l.length-1].y);P.isScalePoint=!0,P.tag=1,this.scalePoints.push(P);var S=new SuperMapAlgoPlot.Point(r[0].x,r[0].y);S.isScalePoint=!0,S.tag=2,this.scalePoints.push(S),this.finish()}}modifyPoint(t,e){if(!0===e.isScalePoint){var i=new SuperMapAlgoPlot.Point(this.scalePoints[0].x,this.scalePoints[0].y),o=new SuperMapAlgoPlot.Point(this.scalePoints[1].x,this.scalePoints[1].y),l=new SuperMapAlgoPlot.Point(this.scalePoints[2].x,this.scalePoints[2].y),s=this.scaleValues[0],n=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);n=SuperMapAlgoPlot.PlottingUtil.clearSamePts(n);var a=SuperMapAlgoPlot.PlottingUtil.polylineDistance(n),r=a*s;if(0==t){let t=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,n[n.length-2],n[n.length-1]),i=t.projectPoint;if(t.isOnline){let t=SuperMapAlgoPlot.PlottingUtil.distance(i,n[n.length-1]);this.scaleValues[0]=t/a}}else if(1==t){let t=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,o,l).projectPoint,s=SuperMapAlgoPlot.PlottingUtil.distance(t,i);this.scaleValues[1]=s/r}else if(2==t){let t=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,n[1],l).projectPoint,o=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(t,i,n[1]),s=o.projectPoint,a=SuperMapAlgoPlot.PlottingUtil.distance(s,i);!1===o.isOnline&&(this.scaleValues[4]=a/r)}}this.calculateParts()}};SuperMapAlgoPlot.AlgoSymbol1018=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.MAX_ARRAY_SIZE=128,this.sv1_DefaultAtLenDivAbLen=0,this.sv2_DefaultAjWidthDivAtLen=.148,this.sv3_DefaultAeWidthDivAtLen=.4,this.sv4_DefaultAeLenDivAtLen=.312,this.sv_AtScaleParameter=1.5,this.sv_AtLenDivAtWidth=1.35,this.sv_AtWidthDivAwWidth=.5,this.sv_defaultAwLenDivAbLen=.15,0===this.scaleValues.length&&(this.scaleValues.push(this.sv1_DefaultAtLenDivAbLen),this.scaleValues.push(this.sv2_DefaultAjWidthDivAtLen),this.scaleValues.push(this.sv3_DefaultAeWidthDivAtLen),this.scaleValues.push(this.sv4_DefaultAeLenDivAtLen)),this.CLASS_NAME="SuperMap.Geometry.AlgoSymbol1018"}calculateParts(){this.init(),this.applyUse()}applyUse(){var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=2&&t.length<this.minEditPts&&this.calAssistantLine(),!(t.length<3)){var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),i=this.arrowMeshs(e),o=SuperMapAlgoPlot.PlottingUtil.clonePoints(i.shapePts);(o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o)).push(o[0]);var l=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i.leftBodyPts),s=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i.rightBodyPts),n=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i.arrowHeadPts);if(0!=i.shapePts.length){var a=SuperMapAlgoPlot.PlottingUtil.polylineDistance(l),r=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.4*a,l),p=[],u=[],h=[];if(r.bfind)for(let t=0;t<=r.index;t++)p.push(l[t]);var g=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.45*a,l),c=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.8*a,l);if(g.bfind&&c.bfind)for(let t=g.index;t<=c.index;t++)u.push(l[t]);var y=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.85*a,l);if(y.bfind)for(let t=y.index;t<l.length;t++)h.push(l[t]);var P=SuperMapAlgoPlot.PlottingUtil.polylineDistance(s),S=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.15*P,s),d=[],m=[],f=[];if(S.bfind)for(let t=0;t<=S.index;t++)d.push(s[t]);var L=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.2*P,s),M=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.55*P,s);if(L.bfind&&M.bfind)for(let t=L.index;t<=M.index;t++)m.push(s[t]);var b=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.6*P,s);if(b.bfind)for(let t=b.index;t<s.length;t++)f.push(s[t]);var A=SuperMapAlgoPlot.PlottingUtil.clonePoints(n);A.splice(0,0,l[l.length-1]),A.push(s[0]),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,o,{lineWidthLimit:!0,strokeWidth:0,weight:0,surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,p,{surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,u,{surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,h,{surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,d,{surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,m,{surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,f,{surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,A,{surroundLineFlag:!1,lineTypeLimit:!0});var T=this.updateScalePoints(e);if(this.scalePoints=[],3!=T.length)T=[];else for(let t=0;t<T.length;t++)T[t].isScalePoint=!0,T[t].tag=t,this.scalePoints.push(T[t]);this.finish()}else this.finish()}}modifyPoint(t,e){if(!0===e.isScalePoint){var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);i=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i),this.scaleValues.length<4&&(this.scaleValues.push(this.sv1_DefaultAtLenDivAbLen),this.scaleValues.push(this.sv2_DefaultAjWidthDivAtLen),this.scaleValues.push(this.sv3_DefaultAeWidthDivAtLen),this.scaleValues.push(this.sv4_DefaultAeLenDivAtLen));var o=i.length;if(o<=2)return;var l,s,n,a,r=this.operateCtrlPts(i);o=r.length,o--;var p=this.calcScaleValueCount(i.length);if(this.scaleValues.length<p){var u=this.calcDefaultScaleValues(o);l=u[0],s=u[1],n=u[2],a=u[3]}else l=this.scaleValues[0],s=this.scaleValues[1],n=this.scaleValues[2],a=this.scaleValues[3];var h=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i),g=[];for(let t=0;t<this.scalePoints.length;t++)g.push(this.scalePoints[t].clone());if(0==g.length)return;g[t]=e.clone();var c,y,P=o-1;c=o<=3?new SuperMapAlgoPlot.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2):r[P-1].clone();var S,d,m,f,L,M,b=new SuperMapAlgoPlot.Point(0,0),A=new SuperMapAlgoPlot.Point(0,0),T=new SuperMapAlgoPlot.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(0,3,c,r[P],r[P+1],A,T),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,r[o],r[o-1],T,b),y=b.clone();var v=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(r[o],y,g[2]);S=v.dLen1,v.dLen2,0==S&&(S=.1),d=S,l=(S/=a+1)/h,1==t?(f=(v=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(r[o],y,g[1])).dLen1,n=(L=v.dLen2)/S,a=(f-S)/S):0==t?(S=(v=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(r[o],y,g[0])).dLen1,s=(m=v.dLen2)/S,(M=SuperMapAlgoPlot.PlottingUtil.distance(r[o],r[o-1]))<2*S&&(S=.5*M),f=(v=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(r[o],y,g[1])).dLen1,n=(L=v.dLen2)/S,(a=(d-S)/S)<.1&&(n=L/(S=d/(1+(a=.1))),s=m/S),l=S/h):2==t&&(l=S/h),m=S*s,(M=SuperMapAlgoPlot.PlottingUtil.distance(r[o],r[o-1]))<2*S&&(m=(S=.5*M)*s,l=S/h),this.scaleValues[0]=l,this.scaleValues[1]=s,this.scaleValues[2]=n,this.scaleValues[3]=a}this.calculateParts()}arrowMeshs(t){var e=[],i=[],o=[],l=[],s=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),n=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePts(s,this.scaleValues,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_MULTIPOLYBEZIER),a=n.arrowTouLen,r=n.leftBodyPts,p=n.rightBodyPts;if(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(a,0)){var u=[];u.push(r[r.length-1]),u.push(p[p.length-1]);var h=[];h.push(this.scaleValues[2]),h.push(this.scaleValues[3]),h.push(0),h.push(0);var g=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePts(s,u,h,a,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITH_EAR);for(let t=0;t<r.length;t++)e.push(r[t]),i.push(r[t]);for(let t=0;t<g.length;t++)e.push(g[t]),l.push(g[t]);for(let t=p.length-1;t>=0;t--)e.push(p[t]),o.push(p[t])}return{shapePts:e,leftBodyPts:i,rightBodyPts:o,arrowHeadPts:l}}updateScalePoints(t){var e=t.length,i=[];if(!(e<3)){var o=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t);if(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(o,0)){var l=this.operateCtrlPts(t);e=l.length,e--;var s=[];for(let t=0;t<this.scaleValues.length;t++)s.push(this.scaleValues[t]);var n=this.genArrowBodyPts(o,l,s),a=n.ArrowBodyCenterPts,r=this.genAtPts(e,a,s,n.ArrowTouLen),p=this.calc3rdScalePt(e,a,s,n.ArrowTouLen);return i.push(new SuperMapAlgoPlot.Point(n.LeftBodyPtsTemp[e].x,n.LeftBodyPtsTemp[e].y)),i.push(new SuperMapAlgoPlot.Point(r[2].x,r[2].y)),i.push(new SuperMapAlgoPlot.Point(p.x,p.y)),i}}}operateCtrlPts(t){var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(t);if(3===e.length){var i=((e[0].x+e[1].x)/2+e[2].x)/2,o=((e[0].y+e[1].y)/2+e[2].y)/2,l=new SuperMapAlgoPlot.Point(i,o),s=e[2];e[2]=l,e.push(s)}return e}genArrowBodyPts(t,e,i){var o,l,s,n=[],a=[],r=[],p=[],u=[],h=[],g=e.length;if(g--,i.length<this.calcScaleValueCount(g)){var c=this.calcDefaultScaleValues(g);l=c[0],s=c[1]}else l=i[0],s=i[1];var y=SuperMapAlgoPlot.PlottingUtil.clonePoints(e),P=(y[0].x+y[1].x)/2,S=(y[0].y+y[1].y)/2,d=Math.abs(P-y[2].x),m=Math.abs(S-y[2].y),f=0;if(d>0&&m>0){var L=1/(P-y[2].x),M=-1/(S-y[2].y),b=1*y[2].y/(S-y[2].y)-1*y[2].x/(P-y[2].x);f=Math.abs(L*y[0].x+M*y[0].y+b)/Math.sqrt(L*L+M*M)}else m<=1e-4?f=Math.abs(S-y[1].y):d<=1e-4&&(f=Math.abs(P-y[1].x));var A=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(f,y[2],new SuperMapAlgoPlot.Point(P,S)),T=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(y[1],y[2],y[0]);T?(n[1]=y[1],a[1]=y[0]):(n[1]=y[0],a[1]=y[1]),y[1]=new SuperMapAlgoPlot.Point((y[0].x+y[1].x)/2,(y[0].y+y[1].y)/2);var v=Math.sqrt((A.pntLeft.x-A.pntRight.x)*(A.pntLeft.x-A.pntRight.x)+(A.pntLeft.y-A.pntRight.y)*(A.pntLeft.y-A.pntRight.y))*this.sv_AtWidthDivAwWidth,_=(o=v*this.sv_AtLenDivAtWidth)*s;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l,0)||(_=(o=t*l)*s);var x,O,w=SuperMapAlgoPlot.PlottingUtil.distance(y[g],y[g-1]),I=2*o;w<I&&(_=(o=w/2)*s),y.push(y[g].clone()),x=0,O=0;var C=0,E=[];for(C=2;C<=g;C++)x+=SuperMapAlgoPlot.PlottingUtil.distance(y[C],y[C-1]);for(x-=o,C=2;C<=g-1;C++)O+=SuperMapAlgoPlot.PlottingUtil.distance(y[C],y[C-1]),E[C]=_+(v-_)*Math.pow((x-O)/x,this.sv_AtScaleParameter);E[g]=_;var D,U,N=new SuperMapAlgoPlot.Point(0,0),R=new SuperMapAlgoPlot.Point(0,0),B=new SuperMapAlgoPlot.Point(0,0);for(C=2;C<=g-1;C++)SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(0,3,y[C-1],y[C],y[C+1],R,B),C==g-1&&SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,y[g],y[g-1],B,N),D=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(E[C],R,y[C]),(T=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(B,R,D.pntRight))?(n[C]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y),a[C]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y)):(n[C]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y),a[C]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y));for(Math.sqrt(1*(y[g].x-N.x)*(y[g].x-N.x)+1*(y[g].y-N.y)*(y[g].y-N.y))>0&&(y[g]=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(o,y[g],N)),D=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(_,y[g+1],y[g]),(T=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(y[g],y[g+1],D.pntLeft))?(a[g]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y),n[g]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y)):(a[g]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y),n[g]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y)),C=2;C<g;C++)SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(3,3,n[C-1],n[C],n[C+1],R,B),r[C]=new SuperMapAlgoPlot.Point(R.x,R.y),p[C]=new SuperMapAlgoPlot.Point(B.x,B.y),SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(3,3,a[C-1],a[C],a[C+1],R,B),u[C]=new SuperMapAlgoPlot.Point(R.x,R.y),h[C]=new SuperMapAlgoPlot.Point(B.x,B.y),2==C&&(SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,n[1],n[2],r[2],N),p[C]=new SuperMapAlgoPlot.Point(N.x,N.y),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,a[1],a[2],u[2],N),h[C]=new SuperMapAlgoPlot.Point(N.x,N.y)),C==g-1&&(I=(w=SuperMapAlgoPlot.PlottingUtil.distance(n[g],n[g-1]))/3,(U=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(I,y[g],y[g+1])).x+=n[g].x-y[g].x,U.y+=n[g].y-y[g].y,I=(w=v-_)*Math.pow(I/x,this.sv_AtScaleParameter),D=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(I,n[g],U),r[g]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y),I=(w=SuperMapAlgoPlot.PlottingUtil.distance(a[g],a[g-1]))/3,(U=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(I,y[g],y[g+1])).x+=a[g].x-y[g].x,U.y+=a[g].y-y[g].y,I=(w=v-_)*Math.pow(I/x,this.sv_AtScaleParameter),D=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(I,a[g],U),u[g]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y));return{ArrowBodyCenterPts:SuperMapAlgoPlot.PlottingUtil.clonePoints(y),LeftBodyPtsTemp:n,RightBodyPtsTemp:a,LeftBodyPtsLeftCtrlPts:r,LeftBodyPtsRightCtrlPts:p,RightBodyPtsLeftCtrlPts:u,RightBodyPtsRightCtrlPts:h,ArrowTouLen:o}}calcScaleValueCount(){return 4}calcDefaultScaleValues(){var t=[];return t.push(this.sv1_DefaultAtLenDivAbLen),t.push(this.sv2_DefaultAjWidthDivAtLen),t.push(this.sv3_DefaultAeWidthDivAtLen),t.push(this.sv4_DefaultAeLenDivAtLen),t}genAtPts(t,e,i,o){var l=i[2],s=[],n=o*i[3],a=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(n,e[t],e[t+1]);n=o*l;var r=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(n,e[t+1],a);return s.push(new SuperMapAlgoPlot.Point(r.pntLeft.x,r.pntLeft.y)),s.push(e[t+1]),s.push(new SuperMapAlgoPlot.Point(r.pntRight.x,r.pntRight.y)),s}calc3rdScalePt(t,e,i,o){var l=o*i[3];return SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(l,e[t],e[t+1])}};SuperMapAlgoPlot.AlgoSymbol1019=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(.5),this.scaleValues.push(.222222),this.scaleValues.push(.5),this.scaleValues.push(.5),this.scaleValues.push(.5)),this.CLASS_NAME="SuperMap.Geometry.AlgoSymbol1019"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts,0==this.scaleValues.length&&(this.scaleValues=[],this.scaleValues.push(.5),this.scaleValues.push(.222222),this.scaleValues.push(.5),this.scaleValues.push(.5),this.scaleValues.push(.5));var e=t[0].clone(),i=t[1].clone(),o=SuperMapAlgoPlot.PlottingUtil.distance(e,i),l=this.scaleValues[0],s=new SuperMapAlgoPlot.Point(0,-o*l),n=new SuperMapAlgoPlot.Point(0,o*l),a=this.scaleValues[1],r=this.scaleValues[3],p=new SuperMapAlgoPlot.Point(o*(1-r),-o*a),u=new SuperMapAlgoPlot.Point(o*(1-r),o*a),h=this.scaleValues[2],g=this.scaleValues[4],c=new SuperMapAlgoPlot.Point(o*(1-g),-o*h),y=new SuperMapAlgoPlot.Point(o*(1-g),o*h),P=new SuperMapAlgoPlot.Point(o,0),S=SuperMapAlgoPlot.PlottingUtil.radian(e,i),d=[];d.push(s),d.push(p),d.push(c),d.push(P),d.push(y),d.push(u),d.push(n),d.push(s);var m=[];for(let t=0;t<d.length;t++){var f=SuperMapAlgoPlot.PlottingUtil.coordinateTrans(e,d[t],S*SuperMapAlgoPlot.PlottingUtil.RTOD);m.push(f)}var L=[];for(let t=m.length-1;t>=0;--t)L.push(m[t]);this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,L,{lineWidthLimit:!0,strokeWidth:0,weight:0,surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[L[2],L[1],L[7],L[6]],{surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[L[6],L[5],L[4],L[3],L[2]],{lineTypeLimit:!0,surroundLineFlag:!1}),this.scalePoints=[];var M=m[0].clone();M.isScalePoint=!0,M.tag=0,this.scalePoints.push(M);var b=m[1].clone();b.isScalePoint=!0,b.tag=1,this.scalePoints.push(b);var A=m[2].clone();A.isScalePoint=!0,A.tag=2,this.scalePoints.push(A),this.scalePoints=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(this.scalePoints),this.finish()}}modifyPoint(t,e){if(e.isScalePoint&&(t>=0||t<3)){var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);i=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i),i=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(i).pts;var o=SuperMapAlgoPlot.PlottingUtil.distance(i[0],i[1]),l=i[0].clone(),s=i[1].clone(),n=e.clone();if(0==t){var a=SuperMapAlgoPlot.PlottingUtil.distance(n,l)/o;this.scaleValues[0]=a}else if(1==t){let t=SuperMapAlgoPlot.PlottingUtil.projectPoint(n,l,s),e=SuperMapAlgoPlot.PlottingUtil.distance(t,n)/o;this.scaleValues[1]=e;let i=SuperMapAlgoPlot.PlottingUtil.distance(t,s)/o;this.scaleValues[3]=i}else if(2==t){let t=SuperMapAlgoPlot.PlottingUtil.projectPoint(n,l,s),e=SuperMapAlgoPlot.PlottingUtil.distance(t,n)/o;this.scaleValues[2]=e;let i=SuperMapAlgoPlot.PlottingUtil.distance(t,s)/o;this.scaleValues[4]=i}}this.calculateParts()}};SuperMapAlgoPlot.AlgoSymbol1020=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(.5),this.scaleValues.push(.222222),this.scaleValues.push(.5),this.scaleValues.push(.5),this.scaleValues.push(.5)),this.CLASS_NAME="SuperMap.Geometry.AlgoSymbol1020"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts,0==this.scaleValues.length&&(this.scaleValues=[],this.scaleValues.push(.5),this.scaleValues.push(.222222),this.scaleValues.push(.5),this.scaleValues.push(.5),this.scaleValues.push(.5));var e=t[0].clone(),i=t[1].clone(),o=SuperMapAlgoPlot.PlottingUtil.distance(e,i),l=this.scaleValues[0],s=new SuperMapAlgoPlot.Point(0,-o*l),n=new SuperMapAlgoPlot.Point(0,o*l),a=this.scaleValues[1],r=this.scaleValues[3],p=new SuperMapAlgoPlot.Point(o*(1-r),-o*a),u=new SuperMapAlgoPlot.Point(o*(1-r),o*a),h=this.scaleValues[2],g=this.scaleValues[4],c=new SuperMapAlgoPlot.Point(o*(1-g),-o*h),y=new SuperMapAlgoPlot.Point(o*(1-g),o*h),P=new SuperMapAlgoPlot.Point(o,0),S=SuperMapAlgoPlot.PlottingUtil.radian(e,i),d=SuperMapAlgoPlot.PlottingUtil.distance(s,p),m=SuperMapAlgoPlot.PlottingUtil.findPointInLine(s,p,.3*d),f=SuperMapAlgoPlot.PlottingUtil.findPointInLine(s,p,.4*d),L=SuperMapAlgoPlot.PlottingUtil.distance(u,n),M=SuperMapAlgoPlot.PlottingUtil.findPointInLine(u,n,.6*L),b=SuperMapAlgoPlot.PlottingUtil.findPointInLine(u,n,.7*L),A=[];A.push(s),A.push(m),A.push(f),A.push(p),A.push(c),A.push(P),A.push(y),A.push(u),A.push(M),A.push(b),A.push(n);var T=[];for(let t=0;t<A.length;t++){var v=SuperMapAlgoPlot.PlottingUtil.coordinateTrans(e,A[t],S*SuperMapAlgoPlot.PlottingUtil.RTOD);T.push(v)}var _=[];for(let t=T.length-1;t>=0;--t)_.push(T[t]);var x=SuperMapAlgoPlot.PlottingUtil.clonePoints(_);x.push(x[0]),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,x,{lineWidthLimit:!0,strokeWidth:0,weight:0,surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[_[0],_[1]]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[_[2],_[3]]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[_[3],_[4],_[5],_[6],_[7]],{lineTypeLimit:!0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[_[7],_[8]]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[_[9],_[10]]),this.scalePoints=[];var O=T[0].clone();O.isScalePoint=!0,O.tag=0,this.scalePoints.push(O);var w=T[3].clone();w.isScalePoint=!0,w.tag=1,this.scalePoints.push(w);var I=T[4].clone();I.isScalePoint=!0,I.tag=2,this.scalePoints.push(I),this.scalePoints=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(this.scalePoints),this.finish()}}modifyPoint(t,e){if(e.isScalePoint&&(t>=0||t<3)){var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);i=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i),i=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(i).pts;var o=SuperMapAlgoPlot.PlottingUtil.distance(i[0],i[1]),l=i[0].clone(),s=i[1].clone(),n=e.clone();if(0==t){let t=SuperMapAlgoPlot.PlottingUtil.distance(n,l)/o;this.scaleValues[0]=t}else if(1==t){let t=SuperMapAlgoPlot.PlottingUtil.projectPoint(n,l,s),e=SuperMapAlgoPlot.PlottingUtil.distance(t,n)/o;this.scaleValues[1]=e;let i=SuperMapAlgoPlot.PlottingUtil.distance(t,s)/o;this.scaleValues[3]=i}else if(2==t){let t=SuperMapAlgoPlot.PlottingUtil.projectPoint(n,l,s),e=SuperMapAlgoPlot.PlottingUtil.distance(t,n)/o;this.scaleValues[2]=e;let i=SuperMapAlgoPlot.PlottingUtil.distance(t,s)/o;this.scaleValues[4]=i}}this.calculateParts()}};SuperMapAlgoPlot.AlgoSymbol1021=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.25),this.CLASS_NAME="SuperMap.Geometry.AlgoSymbol1021",this.QIANJI_RATE1=9,this.QIANJI_RATE2=20,this.QIANJI_RATE4=5,this.QIANJI_RATE3=1/3,this.QIANJI_TAIL_RATE1=8,this.QIANJI_TAIL_RATE2=3,this.QIANJI_TAIL_RATE3=.6,this.SV1_Default=.25,this.SV1_MinValue=0,this.SV1_MaxValue=.5,this.DEFAULT_ARROW_TAIL_POS=.4,this.SCALE_VALUE_COUNT=1,this.MIN_LEN_LeftToRightCenter=1e-7,this.SCALE_AT=1/3,this.SCALE_ATAJ=1/7,this.SCALE_ATAE=1/3,this.SCALE_AW=2/3,this.SCALE_ATAJctrlDefSide=.8,this.SCALE_ATAJctrlSameSide=2/3,this.SCALE_MM_LEFT=.25,this.SCALE_MM_RIGHT=.75,this.BEZIER_K1=1/3,this.QIANJI_OPERATE_RATE1=1,this.m_dMaxDis=0,this.m_bIsAnimation=!1}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t),this.components.length=0,this.m_scalePoints=[],(t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts).length>=2&&t.length<this.minEditPts&&this.calAssistantLine(),!(t.length<3)){var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),i=this.arrowMeshs(e);i.LeftArowHead.unshift(i.LeftArowLeftBody[0][i.LeftArowLeftBody[0].length-1]),i.RightArowHead.unshift(i.RightArowLeftBody[i.RightArowLeftBody.length-1]),i.LeftArowLeftBody[0].push(i.LeftArowHead[0]),i.RightArowLeftBody.push(i.RightArowHead[0]),i.shapePts.push(i.shapePts[0]);var o=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i.LeftArowLeftBody[0]),l=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.4*o,i.LeftArowLeftBody[0]),s=[],n=[];if(l.bfind)for(let t=0;t<=l.index;t++)s.push(i.LeftArowLeftBody[0][t]);var a=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.5*o,i.LeftArowLeftBody[0]);if(a.bfind)for(let t=a.index;t<i.LeftArowLeftBody[0].length-1;t++)n.push(i.LeftArowLeftBody[0][t]);var r=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i.RightArowLeftBody),p=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.4*r,i.RightArowLeftBody),u=[],h=[];if(p.bfind)for(let t=0;t<=p.index;t++)u.push(i.RightArowLeftBody[t]);var g=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.5*r,i.RightArowLeftBody);if(g.bfind)for(let t=g.index;t<i.RightArowLeftBody.length-1;t++)h.push(i.RightArowLeftBody[t]);var c=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i.RightArowRightBody),y=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.4*c,i.RightArowRightBody),P=[],S=[];if(y.bfind)for(let t=0;t<=y.index;t++)P.push(i.RightArowRightBody[t]);var d=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.5*c,i.RightArowRightBody);if(d.bfind)for(let t=d.index;t<i.RightArowRightBody.length-1;t++)S.push(i.RightArowRightBody[t]);i.shapePts.length>0&&(this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,i.shapePts,{strokeWidth:0,weight:0,lineWidthLimit:!0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,s),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,n),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,i.LeftArowHead,{lineTypeLimit:!0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,i.LeftArowRightBody),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,u),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,h),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,i.RightArowHead,{lineTypeLimit:!0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,P),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,S)),this.scalePoints=[];for(let t=0;t<this.m_scalePoints.length;t++)this.m_scalePoints[t].isScalePoint=!0,this.m_scalePoints[t].tag=t,this.scalePoints.push(this.m_scalePoints[t]);this.scalePoints=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(this.scalePoints),this.finish()}}modifyPoint(t,e){if(!0===e.isScalePoint){var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);i=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i),i=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(i).pts;var o,l=SuperMapAlgoPlot.PlottingUtil.operateControlPoints(i),s=new SuperMapAlgoPlot.Point((l[0].x+l[1].x)/2,(l[0].y+l[1].y)/2),n=new SuperMapAlgoPlot.Point((l[2].x+l[3].x)/2,(l[2].y+l[3].y)/2),a=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,s,n);if(a.isOnline){var r=SuperMapAlgoPlot.PlottingUtil.distance(a.projectPoint,s),p=SuperMapAlgoPlot.PlottingUtil.distance(s,n);(o=SuperMapAlgoPlot.PlottingUtil.equalFuzzy(r,0)?this.SV1_MinValue:r/p)>this.SV1_MaxValue&&(o=this.SV1_MaxValue)}else o=SuperMapAlgoPlot.PlottingUtil.distance(a.projectPoint,s)<SuperMapAlgoPlot.PlottingUtil.distance(a.projectPoint,n)?this.SV1_MinValue:this.SV1_MaxValue;this.scaleValues=[],this.scaleValues.push(o)}this.calculateParts()}arrowMeshs(t){var e=new SuperMapAlgoPlot.Path2D,i=[];i=this.m_bIsAnimation&&4===t.length?SuperMapAlgoPlot.PlottingUtil.clonePoints(t):SuperMapAlgoPlot.PlottingUtil.operateControlPoints(t);var o=this.scaleValues[0],l=SuperMapAlgoPlot.PlottingUtil.distance(i[0],i[3]),s=SuperMapAlgoPlot.PlottingUtil.distance(i[1],i[2]),n=i[1].clone(),a=.5*(i[0].x+i[3].x),r=.5*(i[0].y+i[3].y),p=new SuperMapAlgoPlot.Point(a,r),u=.5*(i[1].x+i[2].x),h=.5*(i[1].y+i[2].y),g=new SuperMapAlgoPlot.Point(u,h),c=SuperMapAlgoPlot.PlottingUtil.distance(p,g);c<this.MIN_LEN_LeftToRightCenter&&(c=this.MIN_LEN_LeftToRightCenter),p.x=a+l*(a-u)/(c*this.QIANJI_RATE1),p.y=r+l*(r-h)/(c*this.QIANJI_RATE1),g.x=u+s*(u-a)/(c*this.QIANJI_RATE1),g.y=h+s*(h-r)/(c*this.QIANJI_RATE1);var y=new SuperMapAlgoPlot.Point(0,0),P=new SuperMapAlgoPlot.Point(0,0);y.x=a+l*(a-u)/(c*this.QIANJI_RATE2),y.y=r+l*(r-h)/(c*this.QIANJI_RATE2),P.x=u+s*(u-a)/(c*this.QIANJI_RATE2),P.y=h+s*(h-r)/(c*this.QIANJI_RATE2);var S=new SuperMapAlgoPlot.Point((i[0].x+i[1].x)/2,(i[0].y+i[1].y)/2),d=new SuperMapAlgoPlot.Point((i[2].x+i[3].x)/2,(i[2].y+i[3].y)/2),m=i[3].x-(i[3].x-p.x)*this.SCALE_AT,f=i[3].y-(i[3].y-p.y)*this.SCALE_AT,L=i[2].x-(i[2].x-g.x)*this.SCALE_AT,M=i[2].y-(i[2].y-g.y)*this.SCALE_AT,b=new SuperMapAlgoPlot.Point(0,0),A=new SuperMapAlgoPlot.Point(0,0),T=new SuperMapAlgoPlot.Point(0,0),v=new SuperMapAlgoPlot.Point(0,0);A.x=m-(f-i[3].y)*this.SCALE_ATAJ,A.y=f+(m-i[3].x)*this.SCALE_ATAJ,b.x=m+(f-i[3].y)*this.SCALE_ATAJ,b.y=f-(m-i[3].x)*this.SCALE_ATAJ,v.x=L-(M-i[2].y)*this.SCALE_ATAJ,v.y=M+(L-i[2].x)*this.SCALE_ATAJ,T.x=L+(M-i[2].y)*this.SCALE_ATAJ,T.y=M-(L-i[2].x)*this.SCALE_ATAJ;var _=new SuperMapAlgoPlot.Point(0,0),x=new SuperMapAlgoPlot.Point(0,0),O=new SuperMapAlgoPlot.Point(0,0),w=new SuperMapAlgoPlot.Point(0,0);_.x=3*b.x-2*m-(i[3].x-m)*this.SCALE_ATAE,_.y=3*b.y-2*f-(i[3].y-f)*this.SCALE_ATAE,x.x=3*A.x-2*m-(i[3].x-m)*this.SCALE_ATAE,x.y=3*A.y-2*f-(i[3].y-f)*this.SCALE_ATAE,O.x=3*T.x-2*L-(i[2].x-L)*this.SCALE_ATAE,O.y=3*T.y-2*M-(i[2].y-M)*this.SCALE_ATAE,w.x=3*v.x-2*L-(i[2].x-L)*this.SCALE_ATAE,w.y=3*v.y-2*M-(i[2].y-M)*this.SCALE_ATAE,p.x=a+l*(a-u)/(c*this.QIANJI_RATE4),p.y=r+l*(r-h)/(c*this.QIANJI_RATE4),g.x=u+s*(u-a)/(c*this.QIANJI_RATE4),g.y=h+s*(h-r)/(c*this.QIANJI_RATE4);var I=new SuperMapAlgoPlot.Point(0,0);I.x=i[0].x+(p.x-i[0].x)*this.SCALE_AW,I.y=i[0].y+(p.y-i[0].y)*this.SCALE_AW;var C=new SuperMapAlgoPlot.Point(0,0);C.x=i[1].x+(g.x-i[1].x)*this.SCALE_AW,C.y=i[1].y+(g.y-i[1].y)*this.SCALE_AW;var E=new SuperMapAlgoPlot.Point(0,0);E.x=b.x+(p.x-b.x)*this.SCALE_ATAJctrlSameSide,E.y=b.y+(p.y-b.y)*this.SCALE_ATAJctrlSameSide;var D=new SuperMapAlgoPlot.Point(0,0);D.x=v.x+(g.x-v.x)*this.SCALE_ATAJctrlSameSide,D.y=v.y+(g.y-v.y)*this.SCALE_ATAJctrlSameSide;var U=new SuperMapAlgoPlot.Point(0,0);U.x=A.x+(y.x-A.x)*this.SCALE_ATAJctrlDefSide,U.y=A.y+(y.y-A.y)*this.SCALE_ATAJctrlDefSide;var N=new SuperMapAlgoPlot.Point(0,0);N.x=T.x+(P.x-T.x)*this.SCALE_ATAJctrlDefSide,N.y=T.y+(P.y-T.y)*this.SCALE_ATAJctrlDefSide;var R=new SuperMapAlgoPlot.Point(0,0);R.x=S.x+(d.x-S.x)*o,R.y=S.y+(d.y-S.y)*o,this.m_scalePoints.push(new SuperMapAlgoPlot.Point(R.x,R.y));var B=new SuperMapAlgoPlot.Point(0,0),F=new SuperMapAlgoPlot.Point(0,0);B.x=i[0].x+(i[3].x-i[0].x)*o,B.y=i[0].y+(i[3].y-i[0].y)*o,F.x=i[1].x+(i[2].x-i[1].x)*o,F.y=i[1].y+(i[2].y-i[1].y)*o,B.x=B.x+(R.x-B.x)*this.QIANJI_RATE3,B.y=B.y+(R.y-B.y)*this.QIANJI_RATE3,F.x=F.x+(R.x-F.x)*this.QIANJI_RATE3,F.y=F.y+(R.y-F.y)*this.QIANJI_RATE3;var k=[];k.push(i[0].clone()),k.push(I.clone()),k.push(E.clone()),k.push(b.clone()),e.MoveTo(k[0]),e.CurveTo(k[1],k[2],k[3]);var V,Y=[],z=[],G=[],W=[],j=[],X=[],H=[];for(e.ToSubPathPolygons(H),Y.push(H[0]),V=H[0].length,e.LineTo(_),e.LineTo(i[3]),e.LineTo(x),(k=[]).push(A),k.push(U),k.push(B),k.push(R),e.LineTo(k[0]),H=[],e.ToSubPathPolygons(H);V<H[0].length;V++)z.push(H[0][V]);for(V=H[0].length,e.CurveTo(k[1],k[2],k[3]),H=[],e.ToSubPathPolygons(H);V<H[0].length;V++)G.push(H[0][V]);for(V=H[0].length,(k=[]).push(F),k.push(N),k.push(T),e.CurveTo(k[0],k[1],k[2]),H=[],e.ToSubPathPolygons(H);V<H[0].length;V++)W.push(H[0][V]);for(V=H[0].length,e.LineTo(O),e.LineTo(i[2]),e.LineTo(w),(k=[]).push(v),k.push(D),k.push(C),k.push(n),e.LineTo(k[0]),H=[],e.ToSubPathPolygons(H);V<H[0].length;V++)j.push(H[0][V]);for(V=H[0].length,e.CurveTo(k[1],k[2],k[3]),H=[],e.ToSubPathPolygons(H);V<H[0].length;V++)X.push(H[0][V]);return H=[],e.ToSubPathPolygons(H),{shapePts:H[0],LeftArowLeftBody:Y,LeftArowHead:z,LeftArowRightBody:G,ArowMidBody:[],RightArowLeftBody:W,RightArowHead:j,RightArowRightBody:X}}};SuperMapAlgoPlot.AlgoSymbol1022=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.05),this.CLASS_NAME="SuperMap.Geometry.AlgoSymbol1022"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts;var e=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t),i=e*this.scaleValues[0],o=SuperMapAlgoPlot.PlottingUtil.paraLine(t,i,!0),l=SuperMapAlgoPlot.PlottingUtil.paraLine(t,i,!1),s=SuperMapAlgoPlot.PlottingUtil.findPointInLine(o[0],o[1],.6*e),n=SuperMapAlgoPlot.PlottingUtil.findPointInLine(o[0],o[1],.5*e),a=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(.1*e,o[0],n).pntLeft;this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,[a,s,o[1]],{surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0,lineTypeLimit:!0,surroundLineLimit:!0});var r=SuperMapAlgoPlot.PlottingUtil.findPointInLine(l[0],l[1],.4*e),p=SuperMapAlgoPlot.PlottingUtil.findPointInLine(l[0],l[1],.5*e),u=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(.1*e,l[0],p).pntRight;this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,[u,r,l[0]],{surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0,lineTypeLimit:!0,surroundLineLimit:!0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,o),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[l[1],l[0]]),this.leftPoint=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(o),this.addScalePoint(o[0],0),this.finish()}}modifyPoint(t,e){if(!0===e.isScalePoint){var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);i=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i),i=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(i).pts;var o=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i);if(0===t){var l=SuperMapAlgoPlot.PlottingUtil.distance(i[0],e)/o;this.scaleValues[0]=l}}this.calculateParts()}};SuperMapAlgoPlot.AlgoSymbol315=class extends SuperMapAlgoPlot.AlgoSymbol1004{constructor(t){super(t),0!==this.scaleValues.length&&(this.scaleValues=[],this.scaleValues.push(.2),this.scaleValues.push(.2),this.scaleValues.push(.4),this.scaleValues.push(.4),this.scaleValues.push(.1),this.scaleValues.push(.2),this.scaleValues.push(.1),this.scaleValues.push(.2),this.scaleValues.push(1),this.scaleValues.push(1)),this.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol315"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=2&&t.length<this.minEditPts&&this.calAssistantLine(),!(t.length<this.minEditPts)){var e=0;for(let i=0;i<t.length-1;i++)e+=SuperMapAlgoPlot.PlottingUtil.distance(t[i],t[i+1]);SuperMapAlgoPlot.AlgoSymbol1004.prototype.applyUse.apply(this,arguments),this.scaleValues.length<9&&(this.scaleValues=[],this.scaleValues.push(.2),this.scaleValues.push(.2),this.scaleValues.push(.4),this.scaleValues.push(.4),this.scaleValues.push(.1),this.scaleValues.push(.2),this.scaleValues.push(.1),this.scaleValues.push(.2),this.scaleValues.push(1),this.scaleValues.push(1));var i,o=e*this.scaleValues[4],l=e*this.scaleValues[5],s=SuperMapAlgoPlot.PlottingUtil.distance(t[1],t[0]),n=SuperMapAlgoPlot.PlottingUtil.linePnt(t[1],t[0],s+l);this.scaleValues[8],i=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(o,t[1],n);var a,r=e*this.scaleValues[6],p=e*this.scaleValues[7],u=SuperMapAlgoPlot.PlottingUtil.linePnt(t[0],t[1],s+p);this.scaleValues[9],a=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(r,t[0],u);var h=[];h.push(new SuperMapAlgoPlot.Point(i.pntLeft.x,i.pntLeft.y)),h.push(new SuperMapAlgoPlot.Point(t[0].x,t[0].y)),h.push(new SuperMapAlgoPlot.Point(t[1].x,t[1].y)),h.push(new SuperMapAlgoPlot.Point(a.pntRight.x,a.pntRight.y));var g=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(h);g=SuperMapAlgoPlot.PlottingUtil.clearSamePts(g),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,g),this.addScalePoint(i.pntLeft,3),this.addScalePoint(a.pntRight,4)}}modifyPoint(t,e){if(!0===e.isScalePoint){var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);i=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i);var o=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i),l=SuperMapAlgoPlot.PlottingUtil.projectPoint(e,i[0],i[1]);if(t<=2&&(SuperMapAlgoPlot.AlgoSymbol1004.prototype.modifyPoint.apply(this,arguments),super.modifyPoint(t,e)),3===t){let t=SuperMapAlgoPlot.PlottingUtil.distance(e,l)/o,s=SuperMapAlgoPlot.PlottingUtil.distance(l,i[0])/o;this.scaleValues[4]=t,this.scaleValues[5]=s,SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(i[0],i[1],e)?this.scaleValues[8]=1:this.scaleValues[8]=0}if(4===t){let t=SuperMapAlgoPlot.PlottingUtil.distance(e,l)/o,s=SuperMapAlgoPlot.PlottingUtil.distance(l,i[1])/o;this.scaleValues[6]=t,this.scaleValues[7]=s,SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(i[0],i[1],e)?this.scaleValues[9]=1:this.scaleValues[9]=0}}this.calculateParts()}};SuperMapAlgoPlot.AlgoSymbol15200=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(.05),this.scaleValues.push(0),this.scaleValues.push(.185))}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t);e=SuperMapAlgoPlot.PlottingUtil.clearSamePts(e),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,e);var i=0;for(let t=0,o=e.length-1;t<o;t++)i+=SuperMapAlgoPlot.PlottingUtil.distance(e[t],e[t+1]);var o=0;for(let e=0,i=t.length-1;e<i;e++)o+=SuperMapAlgoPlot.PlottingUtil.distance(t[e],t[e+1]);this.isEdit||(this.scaleValues[0]=.5*this.getSubSymbolScaleValue());var l=this.scaleValues[0]*o,s=this.scaleValues[1],n=this.scaleValues[2]*o,a=.3*n;for(let t=n;t<i;t+=n){var r=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(t,e);if(-1===r.index)return void this.finish();var p=t+a,u=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(p,e);if(-1===u.index)return void this.finish();var h=[],g=[];h.push(r.pts);var c=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(l,e[r.index],r.pts);0===s?h.push(new SuperMapAlgoPlot.Point(c.pntLeft.x,c.pntLeft.y)):h.push(new SuperMapAlgoPlot.Point(c.pntRight.x,c.pntRight.y)),g.push(u.pts);var y=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(l,e[u.index],u.pts);if(0===s?g.push(new SuperMapAlgoPlot.Point(y.pntLeft.x,y.pntLeft.y)):g.push(new SuperMapAlgoPlot.Point(y.pntRight.x,y.pntRight.y)),n===t){this.scalePoints=[];var P=new SuperMapAlgoPlot.Point(h[1].x,h[1].y);P.isScalePoint=!0,P.tag=0,this.scalePoints.push(P),(P=new SuperMapAlgoPlot.Point(h[0].x,h[0].y)).isScalePoint=!0,P.tag=1,this.scalePoints.push(P)}this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,h),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,g)}this.finish()}}computeScaleValues(t,e){if(!0===e.isScalePoint){var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((i=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i)).length<this.minEditPts)return;var o=0;for(let t=0,e=i.length-1;t<e;t++)o+=SuperMapAlgoPlot.PlottingUtil.distance(i[t],i[t+1]);var l=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(i),s=new SuperMapAlgoPlot.Point(e.x,e.y);if(0===t){var n=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(l,o*this.scaleValues[2]);if(-1===n.index)return;var a=SuperMapAlgoPlot.PlottingUtil.distance(n.pt,s)/o,r=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(l[0],l[1],e);this.scaleValues[1]=r?1:0,this.scaleValues[0]=a}else if(1===t){var p=0,u=-1,h=[];for(let t=0,i=l.length-1;t<i;t++){var g=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,l[t],l[t+1]);if(g.isOnline){var c=SuperMapAlgoPlot.PlottingUtil.distance(g.projectPoint,this.controlPoints[1]);0==p?(p=c,u=t,h=e):c<p&&(p=c,u=t,h=e)}}if(-1==u)return;var y=0;for(let t=0,e=u-1;t<e;t++)y+=SuperMapAlgoPlot.PlottingUtil.distance(l[t],l[t+1]);var P=(y+=SuperMapAlgoPlot.PlottingUtil.distance(h,l[u]))/o;P>.7&&(P=.7),this.scaleValues[2]=P}}}};SuperMapAlgoPlot.AlgoSymbol25701=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t)}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){if(2==t.length){var e=new SuperMapAlgoPlot.Point(t[1].x,t[1].y);SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[0],Math.PI/3,e),t.push(e)}var i=t[0].x,o=t[0].x;for(let e=0;e<t.length;e++)i>t[e].x&&(i=t[e].x),o<t[e].x&&(o=t[e].x);var l=(o-i)/50;this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,t);var s=SuperMapAlgoPlot.PlottingUtil.getPolygonCenterPt(t),n={surroundLineFlag:!1,lineWidthLimit:!0,strokeWidth:1,weight:1,lineTypeLimit:!0,surroundLineLimit:!0},a=10*l;t.push(t[0]);for(var r=!0,p=s.x,u=s.x;r;){r=!1;var h,g,c,y,P,S=[],d=new SuperMapAlgoPlot.Point(p,s.y),m=SuperMapAlgoPlot.PlottingUtil.circlePoint(d,10,10,45);for(let e=0;e<t.length-1;e++){var f=SuperMapAlgoPlot.PlottingUtil.intersectLines(d,m,t[e],t[e+1]);f.isIntersectLines&&(g=f.intersectPoint,(c=[]).push(t[e]),c.push(t[e+1]),(h=SuperMapAlgoPlot.PlottingUtil.pointIsOnPolyLines(g,c)).isOnPolyLine&&S.push(g))}if(1<S.length){this.sortPts2D(S);for(let e=0;e<S.length-1;e++)P=new SuperMapAlgoPlot.Point((S[e].x+S[e+1].x)/2,(S[e].y+S[e+1].y)/2),SuperMapAlgoPlot.PlottingUtil.ptIsInPolygon(t,P)&&((y=[]).push(S[e]),y.push(S[e+1]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,y,n,!0))}S.length>0&&(r=!0),S=[];var L=new SuperMapAlgoPlot.Point(u,s.y),M=SuperMapAlgoPlot.PlottingUtil.circlePoint(L,5,5,45);for(let e=0;e<t.length-1;e++)(h=SuperMapAlgoPlot.PlottingUtil.intersectLines(L,M,t[e],t[e+1])).isIntersectLines&&(g=h.intersectPoint,(c=[]).push(t[e]),c.push(t[e+1]),(h=SuperMapAlgoPlot.PlottingUtil.pointIsOnPolyLines(g,c)).isOnPolyLine&&S.push(g));if(1<S.length){this.sortPts2D(S);for(let e=0;e<S.length-1;e++)P=new SuperMapAlgoPlot.Point((S[e].x+S[e+1].x)/2,(S[e].y+S[e+1].y)/2),SuperMapAlgoPlot.PlottingUtil.ptIsInPolygon(t,P)&&((y=[]).push(S[e]),y.push(S[e+1]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,y,n,!0))}S.length>0&&(r=!0),p-=a,u+=a}this.finish()}}sortPts2D(t){var e=new SuperMapAlgoPlot.Point(0,0);for(let i=0;i<t.length;i++)for(let o=0;o<t.length-1-i;o++)SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[o].x,t[o+1].x)?t[o].y>t[o+1].y&&(e=t[o],t[o]=t[o+1],t[o+1]=e):t[o].x>t[o+1].x&&(e=t[o],t[o]=t[o+1],t[o+1]=e);return t}};SuperMapAlgoPlot.AlgoSymbol320=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(.1),this.scaleValues.push(.1))}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e=0;for(let i=0;i<t.length-1;i++)e+=SuperMapAlgoPlot.PlottingUtil.distance(t[i],t[i+1]);var i,o,l=this.scaleValues[0]*e,s=t[0],n=t[1],a=180*SuperMapAlgoPlot.PlottingUtil.radian(s,n)/Math.PI;i=SuperMapAlgoPlot.PlottingUtil.paraLine(t,l,!0),o=SuperMapAlgoPlot.PlottingUtil.paraLine(t,l,!1);var r=.15*e,p=SuperMapAlgoPlot.PlottingUtil.circlePoint(i[0],r,r,a+165),u=SuperMapAlgoPlot.PlottingUtil.circlePoint(o[0],r,r,a-165),h=SuperMapAlgoPlot.PlottingUtil.circlePoint(i[i.length-1],r,r,a+15),g=SuperMapAlgoPlot.PlottingUtil.circlePoint(o[o.length-1],r,r,a-15),c=[];c.push(p),c.push(i[0]),c.push(i[i.length-1]),c.push(h),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,c);var y=[];y.push(u),y.push(o[0]),y.push(o[o.length-1]),y.push(g),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,y);var P=new SuperMapAlgoPlot.Point(i[0].x,i[0].y);P.isScalePoint=!0,P.tag=0,this.scalePoints.push(P),this.finish()}}computeScaleValues(t,e){if(!0===e.isScalePoint){var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);i=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i);var o=0;for(let t=0;t<i.length-1;t++)o+=SuperMapAlgoPlot.PlottingUtil.distance(i[t],i[t+1]);if(0==t){var l=i[0],s=i[1],n=SuperMapAlgoPlot.PlottingUtil.projectPoint(e,l,s),a=SuperMapAlgoPlot.PlottingUtil.distance(e,n);this.scaleValues[0]=a/o}}}};SuperMapAlgoPlot.AlgoSymbol321=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(.02),this.scaleValues.push(.1),this.scaleValues.push(0))}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t),i=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t);i=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i);var o=this.getSubSymbolScaleValue();this.isEdit||(this.scaleValues[0]=.5*o);var l=this.scaleValues[0]*e,s=SuperMapAlgoPlot.PlottingUtil.paraLine(i,.5*l,!0),n=SuperMapAlgoPlot.PlottingUtil.paraLine(i,.5*l,!1);s=SuperMapAlgoPlot.PlottingUtil.clearSamePts(s),n=SuperMapAlgoPlot.PlottingUtil.clearSamePts(n),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,s),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,n);var a=e*this.scaleValues[1],r=.5*l,p=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i);for(let t=r,e=0;t<p;t+=a,e++){var u=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(s,t);if(-1!==u.index){var h=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(l,s[u.index+1],u.pt),g=[];g.push(h.pntRight),g.push(u.pt),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,g);var c=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(n,t);if(-1!==c.index){var y=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(l,n[c.index+1],c.pt);(g=[]).push(c.pt),g.push(y.pntLeft),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,g),0===e?this.addScalePoint(h.pntRight,0):1===e&&this.addScalePoint(u.pt,1)}}}this.finish()}}computeScaleValues(t,e){if(!0===e.isScalePoint){var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);i=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i);var o=0;for(let t=0;t<i.length-1;t++)o+=SuperMapAlgoPlot.PlottingUtil.distance(i[t],i[t+1]);var l,s=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(i);if(s=SuperMapAlgoPlot.PlottingUtil.clearSamePts(s),0==t){l=o*this.scaleValues[0]*.5;var n=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(s,l);if(-1===n.index)return;var a=SuperMapAlgoPlot.PlottingUtil.distance(e,n.pt);this.scaleValues[0]=a/o}else if(1===t){l=o*this.scaleValues[0]*.5;var r=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(s,l);if(-1===r.index)return;var p=SuperMapAlgoPlot.PlottingUtil.projectPtOnPolyLine(e,s);if(-1==p.index)return;var u=SuperMapAlgoPlot.PlottingUtil.distance(r.pt,s[r.index+1]);for(let t=r.index+1;t<p.index;t++)u+=SuperMapAlgoPlot.PlottingUtil.distance(s[t],s[t+1]);u+=SuperMapAlgoPlot.PlottingUtil.distance(s[p.index],p.pt),this.scaleValues[1]=u/o}}}};SuperMapAlgoPlot.AlgoSymbol322=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(.025),this.scaleValues.push(.085))}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){this.isEdit||(this.scaleValues[0]=.5*this.getSubSymbolScaleValue()),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,t),SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[0].x,t[t.length-1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[0].y,t[t.length-1].y)||t.push(t[0]);var e=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t),i=this.scaleValues[0]*e,o=-1*SuperMapAlgoPlot.PlottingUtil.innerOutlineDir(t),l=this.scaleValues[1]*e,s=.3*l;for(let y=l;y<e;y+=l){var n=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(t,y);if(-1===n.index)return void this.finish();var a=y+s,r=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(t,a);if(-1===r.index)return void this.finish();var p=[],u=[];p.push(n.pt);var h=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(i,t[n.index],n.pt);1===o?p.push(new SuperMapAlgoPlot.Point(h.pntLeft.x,h.pntLeft.y)):p.push(new SuperMapAlgoPlot.Point(h.pntRight.x,h.pntRight.y)),u.push(r.pt);var g=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(i,t[r.index],r.pt);if(1===o?u.push(new SuperMapAlgoPlot.Point(g.pntLeft.x,g.pntLeft.y)):u.push(new SuperMapAlgoPlot.Point(g.pntRight.x,g.pntRight.y)),l===y){this.scalePoints=[];var c=new SuperMapAlgoPlot.Point(p[1].x,p[1].y);c.isScalePoint=!0,c.tag=0,this.scalePoints.push(c),(c=new SuperMapAlgoPlot.Point(p[0].x,p[0].y)).isScalePoint=!0,c.tag=1,this.scalePoints.push(c)}this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,p),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,u)}this.finish()}}computeScaleValues(t,e){if(!0===e.isScalePoint){var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((i=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i)).length<this.minEditPts)return;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(i[0].x,i[i.length-1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(i[0].y,i[i.length-1].y)||i.push(i[0]);var o=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i),l=new SuperMapAlgoPlot.Point(e.x,e.y);if(0===t){var s=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(i,o*this.scaleValues[1]);if(-1===s.index)return;var n=SuperMapAlgoPlot.PlottingUtil.distance(s.pt,l)/o;this.scaleValues[0]=n}else if(1===t){var a=0,r=-1,p=null;for(let t=0,o=i.length-1;t<o;t++){var u=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,i[t],i[t+1]);if(u.isOnline)if(null==p)r=t,p=u.projectPoint,a=SuperMapAlgoPlot.PlottingUtil.distance(e,p);else{var h=SuperMapAlgoPlot.PlottingUtil.distance(e,p);h<a&&(r=t,p=u.projectPoint,a=h)}}if(-1==r)return;var g=0;for(let t=0,e=r-1;t<e;t++)g+=SuperMapAlgoPlot.PlottingUtil.distance(i[t],i[t+1]);var c=(g+=SuperMapAlgoPlot.PlottingUtil.distance(i[r],p))/o;c>.3&&(c=.3),this.scaleValues[1]=c}}}};SuperMapAlgoPlot.AlgoSymbol326=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.05)}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t);e=SuperMapAlgoPlot.PlottingUtil.clearSamePts(e),SuperMapAlgoPlot.PlottingUtil.polylineDistance(e),0===this.scaleValues.length&&(this.scaleValues[0]=.05),this.isEdit||(this.scaleValues[0]=2*this.getSubSymbolScaleValue());var i=this.getLinePts(e,this.scaleValues[0]),o=new SuperMapAlgoPlot.Point((i.startPt.x+i.endPt.x)/2,(i.startPt.y+i.endPt.y)/2),l=SuperMapAlgoPlot.PlottingUtil.radian(i.startPt,i.endPt)*SuperMapAlgoPlot.PlottingUtil.RTOD,s=SuperMapAlgoPlot.PlottingUtil.distance(i.startPt,i.endPt);this.addSubSymbols(o,s,l);var n=[];for(let t=0;t<=i.startIndex;t++)n.push(e[t]);n.push(i.startPt);for(var a=.1*s,r=SuperMapAlgoPlot.PlottingUtil.makeDottedLine(n,a),p=0;p<r.length;p++)this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,r[p]);if(i.endIndex<=e.length){var u=[];u.push(i.endPt);for(let t=i.endIndex+1;t<=e.length-1;t++)u.push(e[t]);var h=SuperMapAlgoPlot.PlottingUtil.makeDottedLine(u,a);for(p=0;p<h.length;p++)this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,h[p])}this.finish()}}addSubSymbols(t,e,i){var o=.1*e,l=new SuperMapAlgoPlot.Point(-o,o),s=new SuperMapAlgoPlot.Point(o,-o),n=[];n.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,l,i)),n.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,s,i)),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,n);var a=new SuperMapAlgoPlot.Point(-o,-o),r=new SuperMapAlgoPlot.Point(o,o),p=[];p.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,a,i)),p.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,r,i)),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,p);var u=new SuperMapAlgoPlot.Point(-4*o,o),h=new SuperMapAlgoPlot.Point(-2*o,-o),g=[];g.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,u,i)),g.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,h,i)),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,g);var c=new SuperMapAlgoPlot.Point(-4*o,-o),y=new SuperMapAlgoPlot.Point(-2*o,o),P=[];P.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,c,i)),P.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,y,i)),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,P);var S=new SuperMapAlgoPlot.Point(2*o,o),d=new SuperMapAlgoPlot.Point(4*o,-o),m=[];m.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,S,i)),m.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,d,i)),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,m);var f=new SuperMapAlgoPlot.Point(2*o,-o),L=new SuperMapAlgoPlot.Point(4*o,o),M=[];M.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,f,i)),M.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,L,i)),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,M)}computeScaleValues(t,e){}};SuperMapAlgoPlot.AlgoSymbol21501=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(.05),this.scaleValues.push(.02))}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t);e=SuperMapAlgoPlot.PlottingUtil.clearSamePts(e);var i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(e);if(0===this.scaleValues.length?(this.scaleValues[0]=.05,this.scaleValues[1]=.02):1===this.scaleValues.length&&(this.scaleValues[1]=.5*this.getSubSymbolScaleValue()),!this.isEdit){var o=this.getDefaultSubSymbolSize()/i;(o>.3||o<=0)&&(o=.3),this.scaleValues[0]=o,this.scaleValues[1]=.5*this.getSubSymbolScaleValue()}var l=this.getLinePts(e,this.scaleValues[0]),s=new SuperMapAlgoPlot.Point((l.startPt.x+l.endPt.x)/2,(l.startPt.y+l.endPt.y)/2),n=SuperMapAlgoPlot.PlottingUtil.radian(l.startPt,l.endPt)*SuperMapAlgoPlot.PlottingUtil.RTOD,a=SuperMapAlgoPlot.PlottingUtil.distance(l.startPt,l.endPt);this.addSubSymbols(s,a,n);var r=[],p=[];for(let t=0;t<=l.startIndex;t++)r.push(e[t]);if(r.push(l.startPt),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,r),l.endIndex<=e.length){p.push(l.endPt);for(let t=l.endIndex+1;t<=e.length-1;t++)p.push(e[t]);this.addArrow(p,this.scaleValues[1])}var u=i*this.scaleValues[0]*.5,h=SuperMapAlgoPlot.PlottingUtil.circlePoint(s,u,u,n+90);this.addScalePoint(h,0),this.finish()}}addSubSymbols(t,e,i){this.subSymbols.length>0&&this.computeSubSymbol(this.subSymbols[0],t,e,i-180)}computeScaleValues(t,e){if(0===t&&!0===e.isScalePoint){var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((i=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i)).length<this.minEditPts)return;var o=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(i);o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o);var l=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o),s=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.5*l,o),n=2*SuperMapAlgoPlot.PlottingUtil.distance(s.pts,e)/l;this.scaleValues[0]=n<=.5?n:.5}}};SuperMapAlgoPlot.AlgoSymbol327=class extends SuperMapAlgoPlot.AlgoSymbol21501{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(.05),this.scaleValues.push(.02))}addSubSymbols(t,e,i){var o=new SuperMapAlgoPlot.Point(-.5*e,.25*e),l=new SuperMapAlgoPlot.Point(-.5*e,-.25*e),s=[];s.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,o,i)),s.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,l,i)),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,s);var n=new SuperMapAlgoPlot.Point(-.5*e,.125*e),a=new SuperMapAlgoPlot.Point(.25*e,.125*e),r=new SuperMapAlgoPlot.Point(.5*e,0),p=new SuperMapAlgoPlot.Point(.25*e,-.125*e),u=new SuperMapAlgoPlot.Point(-.5*e,-.125*e),h=[];h.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,n,i)),h.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,a,i)),h.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,r,i)),h.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,p,i)),h.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,u,i)),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,h)}};SuperMapAlgoPlot.AlgoSymbol3010102=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues[0]=.05,this.scaleValues[1]=.05)}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){0===this.scaleValues.length?(this.scaleValues[0]=.05,this.scaleValues[1]=.05):1===this.scaleValues.length&&(this.scaleValues[1]=.5*this.getSubSymbolScaleValue()),this.isEdit||(this.scaleValues[0]=this.getSubSymbolScaleValue(),this.scaleValues[1]=.5*this.getSubSymbolScaleValue());var e=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t),i=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t);i=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i);var o=e*this.scaleValues[0],l=this.getLinePts(i,this.scaleValues[1],5/14),s=this.getLinePts(i,this.scaleValues[1],9/14),n=new SuperMapAlgoPlot.Point((l.startPt.x+l.endPt.x)/2,(l.startPt.y+l.endPt.y)/2),a=180*SuperMapAlgoPlot.PlottingUtil.radian(l.startPt,l.endPt)/Math.PI;this.createSubSymbol1(n,o,a);var r=new SuperMapAlgoPlot.Point((s.startPt.x+s.endPt.x)/2,(s.startPt.y+s.endPt.y)/2),p=180*SuperMapAlgoPlot.PlottingUtil.radian(s.startPt,s.endPt)/Math.PI;this.createSubSymbol2(r,o,p);var u=SuperMapAlgoPlot.PlottingUtil.circlePoint(r,.5*o,.5*o,p+90);this.addScalePoint(u);var h=[],g=[],c=[];for(let t=0;t<=l.startIndex;t++)h.push(i[t]);if(h.push(l.startPt),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,h),l.endIndex<=s.startIndex){g.push(l.endPt);for(let t=l.endIndex+1;t<=s.startIndex;t++)g.push(i[t]);g.push(s.startPt),2===i.length&&SuperMapAlgoPlot.PlottingUtil.distance(i[0],l.endPt)<=SuperMapAlgoPlot.PlottingUtil.distance(i[0],s.startPt)&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,g),i.length>2&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,g)}c.push(s.endPt);for(let t=s.endIndex+1;t<i.length;t++)c.push(i[t]);this.addArrow(c,this.scaleValues[1]),this.finish()}}createSubSymbol1(t,e,i){var o=this.getSubSymbolPts(e);this.createSubSymbol(t,e,i,o)}createSubSymbol2(t,e,i){var o=this.getSubSymbolPts(e);this.createSubSymbol(t,e,i,o)}createSubSymbol(t,e,i,o){var l=[];for(let e=0;e<o.length;e++){var s=SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,o[e],i);l.push(s)}this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,l,{lineTypeLimit:!0,surroundLineLimit:!0})}getSubSymbolPts(t){var e=t/4,i=[];return i.push(new SuperMapAlgoPlot.Point(-2*e,0)),i.push(new SuperMapAlgoPlot.Point(0,-e)),i.push(new SuperMapAlgoPlot.Point(2*e,0)),i.push(new SuperMapAlgoPlot.Point(0,e)),i}computeScaleValues(t,e){if(!0===e.isScalePoint){if(0!==t&&1!==t)return;var i=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((i=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i)).length<this.minEditPts)return;var o=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(i);o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o);var l=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o),s=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(9*l/14,o),n=2*SuperMapAlgoPlot.PlottingUtil.distance(s.pts,e)/l;n<=.3&&(this.scaleValues[0]=n)}}};SuperMapAlgoPlot.AlgoSymbol328=class extends SuperMapAlgoPlot.AlgoSymbol3010102{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues[0]=.05,this.scaleValues[1]=.05)}createSubSymbol1(t,e,i){var o=this.getSubSymbolPts(e);for(let l=0;l<o.length;l++)this.createSubSymbol(t,e,i,o[l])}createSubSymbol2(t,e,i){var o=this.getSubSymbolPts(e);for(let l=0;l<o.length;l++)this.createSubSymbol(t,e,i,o[l])}createSubSymbol(t,e,i,o){var l=[];for(let e=0;e<o.length;e++){var s=SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,o[e],i);l.push(s)}var n=SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL;2===o.length&&(n=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL),this.addCell(n,l)}getSubSymbolPts(t){var e=[],i=t/2,o=[];o.push(new SuperMapAlgoPlot.Point(-2*i,0)),o.push(new SuperMapAlgoPlot.Point(0,-i)),o.push(new SuperMapAlgoPlot.Point(2*i,0)),o.push(new SuperMapAlgoPlot.Point(0,i)),e.push(o);var l=[];return l.push(new SuperMapAlgoPlot.Point(-i,i)),l.push(new SuperMapAlgoPlot.Point(i,i)),e.push(l),e}};SuperMapAlgoPlot.AlgoSymbol330=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.05)}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t);this.isEdit||(this.scaleValues[0]=.25*this.getSubSymbolScaleValue());var i=[];i=3>=t.length?SuperMapAlgoPlot.Primitives.getSpatialData(SuperMapAlgoPlot.SymbolType.KIDNEY,t):SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t,!0),i=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,i);for(let t=0;t<4;t++){var o=Math.floor(t*i.length/4),l=new SuperMapAlgoPlot.Point(i[o].x,i[o].y),s=new SuperMapAlgoPlot.Point(i[o+1].x,i[o+1].y),n=new SuperMapAlgoPlot.Point((l.x+s.x)/2,(l.y+s.y)/2),a=SuperMapAlgoPlot.PlottingUtil.radian(s,n)*SuperMapAlgoPlot.PlottingUtil.RTOD,r=this.scaleValues[0]*e/2,p=SuperMapAlgoPlot.PlottingUtil.circlePoint(n,r,r,a),u=SuperMapAlgoPlot.PlottingUtil.circlePoint(n,4*r,4*r,a+270),h=SuperMapAlgoPlot.PlottingUtil.circlePoint(n,r,r,a+180);this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[p,u,h])}this.finish()}}};SuperMapAlgoPlot.AlgoSymbol329=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.05)}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){SuperMapAlgoPlot.PlottingUtil.polylineDistance(t),this.isEdit||(this.scaleValues[0]=.25*this.getSubSymbolScaleValue());var e=[];e=3>=t.length?SuperMapAlgoPlot.Primitives.getSpatialData(SuperMapAlgoPlot.SymbolType.KIDNEY,t):SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t,!0),e=SuperMapAlgoPlot.PlottingUtil.clearSamePts(e);var i=20*this.getSubSymbolScaleValue(),o=.1*this.getSubSymbolScaleValue(),l=SuperMapAlgoPlot.PlottingUtil.polylineDistance(e);i>.05*l?o=.01*(i=.05*l):i<.005*l&&(i=.005*l);for(var s=SuperMapAlgoPlot.PlottingUtil.makeDottedLine(e,i),n=0;n<s.length;n++)if(this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,s[n]),n>0){var a=s[n-1][s[n-1].length-1],r=s[n][0],p=SuperMapAlgoPlot.PlottingUtil.midPoint(a,r);this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[p,new SuperMapAlgoPlot.Point(p.x+o,p.y)],{lineTypeLimit:!0,surroundLineLimit:!0,fillLimit:!0,fillColorLimit:!1,fill:!0})}this.finish()}}};SuperMapAlgoPlot.BasicAlgoSymbolFactory=SuperMapAlgoPlot.BasicAlgoSymbolFactory||{};SuperMapAlgoPlot.BasicAlgoSymbolFactory.getAlgoSymbol=function(t,e,i){if(0===t)switch(e){case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOL:return new SuperMapAlgoPlot.GeoTooltipBox(i);case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOLM:return new SuperMapAlgoPlot.GeoTooltipBoxM(i);case SuperMapAlgoPlot.SymbolType.PATHTEXT:return new SuperMapAlgoPlot.PathText(i);case SuperMapAlgoPlot.SymbolType.ARROWLINE:return new SuperMapAlgoPlot.ArrowLine(i);case SuperMapAlgoPlot.SymbolType.CURVEEIGHT:return new SuperMapAlgoPlot.CurveEight(i);case SuperMapAlgoPlot.SymbolType.RUNWAY:return new SuperMapAlgoPlot.Runway(i);case SuperMapAlgoPlot.SymbolType.CONCENTRICCIRCLE:return new SuperMapAlgoPlot.ConcentricCircle(i);case SuperMapAlgoPlot.SymbolType.COMBINATIONALCIRCLE:return new SuperMapAlgoPlot.CombinationalCircle(i);case SuperMapAlgoPlot.SymbolType.FREECURVE:return new SuperMapAlgoPlot.FreeCurve(i);case SuperMapAlgoPlot.SymbolType.REGULARPOLYGON:return new SuperMapAlgoPlot.RegularPolygon(i);case SuperMapAlgoPlot.SymbolType.BRACESYMBOL:return new SuperMapAlgoPlot.Brace(i);case SuperMapAlgoPlot.SymbolType.TRAPEZOIDSYMBOL:return new SuperMapAlgoPlot.Trapezoid(i);case SuperMapAlgoPlot.SymbolType.SYMBOLTEXTBOX:return new SuperMapAlgoPlot.SymbolTextBox(i);case SuperMapAlgoPlot.SymbolType.NODECHAIN:return new SuperMapAlgoPlot.NodeChain(i);case SuperMapAlgoPlot.SymbolType.LINERELATION:return new SuperMapAlgoPlot.LineRelation(i);case SuperMapAlgoPlot.SymbolType.LINEMARKING:return new SuperMapAlgoPlot.LineMarking(i);case SuperMapAlgoPlot.SymbolType.POLYGONREGION:return new SuperMapAlgoPlot.PolygonRegion(i);case SuperMapAlgoPlot.SymbolType.WIRE:return new SuperMapAlgoPlot.Wire(i);case SuperMapAlgoPlot.SymbolType.LINEARARROW:return new SuperMapAlgoPlot.LinearArrow(i);case SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL:return new SuperMapAlgoPlot.Polybezier(i);case SuperMapAlgoPlot.SymbolType.NEWPIESYMBOL:return new SuperMapAlgoPlot.NewPie(i);case SuperMapAlgoPlot.SymbolType.NEWARCSYMBOL:return new SuperMapAlgoPlot.NewArc(i);case SuperMapAlgoPlot.SymbolType.NEWCHORDSYMBOL:return new SuperMapAlgoPlot.NewChord(i);default:return new SuperMapAlgoPlot.AlgoSymbol(i)}else if(22===t)switch(e){case 1001:return new SuperMapAlgoPlot.AlgoSymbol1001(i);case 1002:return new SuperMapAlgoPlot.AlgoSymbol1002(i);case 1003:return new SuperMapAlgoPlot.AlgoSymbol1003(i);case 1004:return new SuperMapAlgoPlot.AlgoSymbol1004(i);case 1005:return new SuperMapAlgoPlot.AlgoSymbol1005(i);case 1006:return new SuperMapAlgoPlot.AlgoSymbol1006(i);case 1007:return new SuperMapAlgoPlot.AlgoSymbol1007(i);case 1008:return new SuperMapAlgoPlot.AlgoSymbol1008(i);case 1009:return new SuperMapAlgoPlot.AlgoSymbol1009(i);case 1010:return new SuperMapAlgoPlot.AlgoSymbol1010(i);case 1011:return new SuperMapAlgoPlot.AlgoSymbol1011(i);case 1012:return new SuperMapAlgoPlot.AlgoSymbol1012(i);case 1013:return new SuperMapAlgoPlot.AlgoSymbol1013(i);case 1014:return new SuperMapAlgoPlot.AlgoSymbol1014(i);case 1015:return new SuperMapAlgoPlot.AlgoSymbol1015(i);case 1016:return new SuperMapAlgoPlot.AlgoSymbol1016(i);case 1017:return new SuperMapAlgoPlot.AlgoSymbol1017(i);case 1018:return new SuperMapAlgoPlot.AlgoSymbol1018(i);case 1019:return new SuperMapAlgoPlot.AlgoSymbol1019(i);case 1020:return new SuperMapAlgoPlot.AlgoSymbol1020(i);case 1021:return new SuperMapAlgoPlot.AlgoSymbol1021(i);case 1022:return new SuperMapAlgoPlot.AlgoSymbol1022(i);default:return null}else{if(421!==t)return null;switch(e){case 311:return new SuperMapAlgoPlot.AlgoSymbol1004(i);case 315:return new SuperMapAlgoPlot.AlgoSymbol315(i);case 317:return new SuperMapAlgoPlot.AlgoSymbol1006(i);case 318:return new SuperMapAlgoPlot.AlgoSymbol1002(i);case 319:return new SuperMapAlgoPlot.AlgoSymbol15200(i);case 320:return new SuperMapAlgoPlot.AlgoSymbol320(i);case 321:return new SuperMapAlgoPlot.AlgoSymbol321(i);case 322:return new SuperMapAlgoPlot.AlgoSymbol322(i);case 323:return new SuperMapAlgoPlot.AlgoSymbol25701(i);case 324:return new SuperMapAlgoPlot.AlgoSymbol3010106(i);case 325:return new SuperMapAlgoPlot.AlgoSymbol15200(i);case 326:return new SuperMapAlgoPlot.AlgoSymbol326(i);case 327:return new SuperMapAlgoPlot.AlgoSymbol327(i);case 328:return new SuperMapAlgoPlot.AlgoSymbol328(i);case 329:return new SuperMapAlgoPlot.AlgoSymbol329(i);case 330:return new SuperMapAlgoPlot.AlgoSymbol330(i);case 331:return new SuperMapAlgoPlot.AlgoSymbol29101(i);default:return null}}},SuperMapAlgoPlot.BasicAlgoSymbolFactory.getSymbolWayType=function(t,e){if(0===t)switch(e){case SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:case SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;case SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL:case SuperMapAlgoPlot.SymbolType.POLYBEZIERCLOSESYMBOL:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}else if(22===t)switch(e){case 1005:case 1008:case 1012:case 1014:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;case 1007:case 1009:case 1013:case 1015:case 1017:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}},SuperMapAlgoPlot.BasicAlgoSymbolFactory.isAccessServer=function(t,e){if(0===t||22===t)return!1;if(421!==t)return!0;switch(e){case 311:case 317:case 318:case 315:case 319:case 320:case 321:case 322:case 323:case 324:case 325:case 326:case 327:case 328:case 329:case 330:case 331:return!1;default:return!0}},SuperMapAlgoPlot.BasicAlgoSymbolFactory.getDefaultSubSymbols=function(){return[]},SuperMapAlgoPlot.BasicAlgoSymbolFactory.getMinEditPts=function(t,e){if(0===t)switch(e){case SuperMapAlgoPlot.SymbolType.TEXTSYMBOL:case SuperMapAlgoPlot.SymbolType.COMBINATIONALCIRCLE:return 1;case SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL:case SuperMapAlgoPlot.SymbolType.RECTANGLESYMBOL:case SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:case SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL:case SuperMapAlgoPlot.SymbolType.KIDNEY:case SuperMapAlgoPlot.SymbolType.ARROWLINE:case SuperMapAlgoPlot.SymbolType.BRACESYMBOL:case SuperMapAlgoPlot.SymbolType.CURVEEIGHT:case SuperMapAlgoPlot.SymbolType.FREECURVE:case SuperMapAlgoPlot.SymbolType.LINEMARKING:case SuperMapAlgoPlot.SymbolType.LINERELATION:case SuperMapAlgoPlot.SymbolType.NODECHAIN:case SuperMapAlgoPlot.SymbolType.PATHTEXT:case SuperMapAlgoPlot.SymbolType.REGULARPOLYGON:case SuperMapAlgoPlot.SymbolType.RUNWAY:case SuperMapAlgoPlot.SymbolType.SYMBOLTEXTBOX:case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOLM:case SuperMapAlgoPlot.SymbolType.CONCENTRICCIRCLE:case SuperMapAlgoPlot.SymbolType.WIRE:case SuperMapAlgoPlot.SymbolType.LINEARARROW:return 2;case SuperMapAlgoPlot.SymbolType.ARCSYMBOL:case SuperMapAlgoPlot.SymbolType.CHORDSYMBOL:case SuperMapAlgoPlot.SymbolType.PIESYMBOL:case SuperMapAlgoPlot.SymbolType.ELLIPSESYMBOL:case SuperMapAlgoPlot.SymbolType.PARALLELOGRAM:case SuperMapAlgoPlot.SymbolType.PARALLELLINE:case SuperMapAlgoPlot.SymbolType.POLYBEZIERCLOSESYMBOL:case SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL:case SuperMapAlgoPlot.SymbolType.POLYGONREGION:case SuperMapAlgoPlot.SymbolType.TRAPEZOIDSYMBOL:case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOL:case SuperMapAlgoPlot.SymbolType.NEWARCSYMBOL:case SuperMapAlgoPlot.SymbolType.NEWPIESYMBOL:case SuperMapAlgoPlot.SymbolType.NEWCHORDSYMBOL:return 3}else if(22===t)switch(e){case 1001:case 1003:case 1005:case 1007:case 1008:case 1009:case 1011:case 1012:case 1013:case 1014:case 1015:case 1016:case 1017:case 1019:case 1020:case 1022:return 2;case 1002:case 1004:case 1006:case 1010:case 1018:case 1021:return 3}else if(421===t)switch(e){case 319:case 320:case 321:case 324:case 325:case 326:case 327:case 328:case 329:case 330:case 331:return 2;case 311:case 315:case 317:case 318:case 322:case 323:return 3}},SuperMapAlgoPlot.BasicAlgoSymbolFactory.getMaxEditPts=function(t,e){if(0===t)switch(e){case SuperMapAlgoPlot.SymbolType.TEXTSYMBOL:return 1;case SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL:case SuperMapAlgoPlot.SymbolType.RECTANGLESYMBOL:case SuperMapAlgoPlot.SymbolType.BRACESYMBOL:case SuperMapAlgoPlot.SymbolType.LINEMARKING:case SuperMapAlgoPlot.SymbolType.LINERELATION:case SuperMapAlgoPlot.SymbolType.RUNWAY:case SuperMapAlgoPlot.SymbolType.SYMBOLTEXTBOX:case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOLM:case SuperMapAlgoPlot.SymbolType.LINEARARROW:return 2;case SuperMapAlgoPlot.SymbolType.ARCSYMBOL:case SuperMapAlgoPlot.SymbolType.CHORDSYMBOL:case SuperMapAlgoPlot.SymbolType.PIESYMBOL:case SuperMapAlgoPlot.SymbolType.ELLIPSESYMBOL:case SuperMapAlgoPlot.SymbolType.PARALLELOGRAM:case SuperMapAlgoPlot.SymbolType.KIDNEY:case SuperMapAlgoPlot.SymbolType.CURVEEIGHT:case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOL:case SuperMapAlgoPlot.SymbolType.TRAPEZOIDSYMBOL:case SuperMapAlgoPlot.SymbolType.NEWARCSYMBOL:case SuperMapAlgoPlot.SymbolType.NEWPIESYMBOL:case SuperMapAlgoPlot.SymbolType.NEWCHORDSYMBOL:return 3;case SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:case SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL:case SuperMapAlgoPlot.SymbolType.PARALLELLINE:case SuperMapAlgoPlot.SymbolType.POLYBEZIERCLOSESYMBOL:case SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL:case SuperMapAlgoPlot.SymbolType.ARROWLINE:case SuperMapAlgoPlot.SymbolType.COMBINATIONALCIRCLE:case SuperMapAlgoPlot.SymbolType.FREECURVE:case SuperMapAlgoPlot.SymbolType.NODECHAIN:case SuperMapAlgoPlot.SymbolType.PATHTEXT:case SuperMapAlgoPlot.SymbolType.POLYGONREGION:case SuperMapAlgoPlot.SymbolType.REGULARPOLYGON:case SuperMapAlgoPlot.SymbolType.WIRE:case SuperMapAlgoPlot.SymbolType.CONCENTRICCIRCLE:return 9999}else if(22===t)switch(e){case 1003:case 1019:case 1020:case 1022:return 2;case 1006:case 1021:return 4;case 1001:case 1002:case 1004:case 1005:case 1007:case 1008:case 1009:case 1010:case 1011:case 1012:case 1013:case 1014:case 1015:case 1016:case 1017:case 1018:return 99999}else if(421===t)switch(e){case 320:return 2;case 329:case 330:case 331:return 3;case 317:return 4;case 323:return 1e3;case 311:case 315:case 318:case 319:case 321:case 322:case 324:case 325:case 326:case 327:case 328:return 99999}},SuperMapAlgoPlot.BasicAlgoSymbolFactory.getDefaultStyle=function(t,e){var i={};if(421===t)switch(e){case 320:case 321:i.color=i.strokeColor="#000000";break;case 322:i.color=i.strokeColor="#bc744d"}return i},SuperMapAlgoPlot.BasicAlgoSymbolFactory.zoomInCalSymbol=function(){if(22!==libID)return!1;switch(code){case 1012:case 1013:case 1014:case 1015:return!0;default:return!1}},SuperMapAlgoPlot.BasicAlgoSymbolFactory.zoomCalSymbol=function(){return!1},SuperMapAlgoPlot.BasicAlgoSymbolFactory.getSymbolName=function(t,e){var i="";if(0===t)switch(e){case SuperMapAlgoPlot.SymbolType.TEXTSYMBOL:i="文本";break;case SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL:i="圆";break;case SuperMapAlgoPlot.SymbolType.RECTANGLESYMBOL:i="矩形";break;case SuperMapAlgoPlot.SymbolType.ARCSYMBOL:i="弧线";break;case SuperMapAlgoPlot.SymbolType.CHORDSYMBOL:i="弓形";break;case SuperMapAlgoPlot.SymbolType.PIESYMBOL:i="扇形";break;case SuperMapAlgoPlot.SymbolType.ELLIPSESYMBOL:i="椭圆";break;case SuperMapAlgoPlot.SymbolType.PARALLELOGRAM:i="平行四边形";break;case SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL:i="多边形";break;case SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:i="折线";break;case SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL:i="贝赛尔曲线";break;case SuperMapAlgoPlot.SymbolType.POLYBEZIERCLOSESYMBOL:i="闭合贝塞尔曲线";break;case SuperMapAlgoPlot.SymbolType.PARALLELLINE:i="平行线";break;case SuperMapAlgoPlot.SymbolType.KIDNEY:i="集结地";break;case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOL:i="注记指示框";break;case SuperMapAlgoPlot.SymbolType.ARROWLINE:i="箭头线";break;case SuperMapAlgoPlot.SymbolType.COMBINATIONALCIRCLE:i="组合圆";break;case SuperMapAlgoPlot.SymbolType.CONCENTRICCIRCLE:i="同心圆";break;case SuperMapAlgoPlot.SymbolType.CURVEEIGHT:i="八字形";break;case SuperMapAlgoPlot.SymbolType.FREECURVE:i="自由线";break;case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOLM:i="多角标注框";break;case SuperMapAlgoPlot.SymbolType.LINEMARKING:i="线型标注";break;case SuperMapAlgoPlot.SymbolType.LINERELATION:i="对象间连线";break;case SuperMapAlgoPlot.SymbolType.NODECHAIN:i="节点链";break;case SuperMapAlgoPlot.SymbolType.PATHTEXT:i="沿线注记";break;case SuperMapAlgoPlot.SymbolType.POLYGONREGION:i="多边形区域管理";break;case SuperMapAlgoPlot.SymbolType.RUNWAY:i="跑道线";break;case SuperMapAlgoPlot.SymbolType.SYMBOLTEXTBOX:i="标注框";break;case SuperMapAlgoPlot.SymbolType.REGULARPOLYGON:i="正多边形";break;case SuperMapAlgoPlot.SymbolType.BRACESYMBOL:i="大括号";break;case SuperMapAlgoPlot.SymbolType.TRAPEZOIDSYMBOL:i="梯形";break;case SuperMapAlgoPlot.SymbolType.WIRE:i="铁丝网";break;case SuperMapAlgoPlot.SymbolType.LINEARARROW:i="直线箭头";break;case SuperMapAlgoPlot.SymbolType.NEWPIESYMBOL:i="扇形";break;case SuperMapAlgoPlot.SymbolType.NEWARCSYMBOL:i="弧线";break;case SuperMapAlgoPlot.SymbolType.NEWCHORDSYMBOL:i="弓形"}return i};SuperMapAlgoPlot.AlgoSymbolFactory=SuperMapAlgoPlot.AlgoSymbolFactory||{};SuperMapAlgoPlot.AlgoSymbolFactory.getAlgoSymbol=function(t){var e=t.libID,i=t.code;return 0!==e&&22!==e&&421!==e||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?100===e&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.getAlgoSymbol(e,i,t):123===e&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.getAlgoSymbol(e,i,t):999===e&&void 0!==SuperMapAlgoPlot.YJAlgoSymbolFactory?SuperMapAlgoPlot.YJAlgoSymbolFactory.getAlgoSymbol(e,i,t):null:SuperMapAlgoPlot.BasicAlgoSymbolFactory.getAlgoSymbol(e,i,t)},SuperMapAlgoPlot.AlgoSymbolFactory.getSymbolWayType=function(t,e){if(0===t)switch(e){case SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:case SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;case SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL:case SuperMapAlgoPlot.SymbolType.POLYBEZIERCLOSESYMBOL:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}if(22===t)switch(e){case 1005:case 1008:case 1012:case 1014:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;case 1007:case 1009:case 1013:case 1015:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}if(100===t)switch(e){case 15200:case 15201:case 16203:case 17703:case 17704:case 21400:case 21401:case 21500:case 21501:case 21502:case 21503:case 21504:case 21600:case 21900:case 22e3:case 22103:case 23800:case 24700:case 25201:case 25400:case 25601:case 25801:case 25901:case 26500:case 26501:case 26502:case 26503:case 26600:case 28900:case 29e3:case 29003:case 29903:case 3e4:case 30001:case 30002:case 30100:case 30102:case 30200:case 30201:case 30800:case 31803:case 33400:case 34900:case 34901:case 34902:case 35e3:case 36400:case 44200:case 3010102:case 3010103:case 3010104:case 3010105:case 3010106:case 3010107:case 3010108:case 3010301:case 3010302:case 3010303:case 3010304:case 16500:case 17400:case 17401:case 17500:case 17501:case 23400:case 23500:case 23600:case 23700:case 27300:case 28200:case 28300:case 28400:case 37600:case 37601:case 37700:case 39e3:case 40100:case 40101:case 42400:case 2350001:case 3032e3:case 4010800:case 4010801:case 4011100:case 4011101:case 4022100:case 4022101:case 4022102:case 39101:case 44300:case 22200:case 27701:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;case 12500:case 12502:case 16100:case 20300:case 25501:case 25502:case 25503:case 32900:case 34700:case 35200:case 36401:case 41200:case 41201:case 41202:case 42700:case 44400:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}if(123===t)switch(e){case 21003:case 21207:case 2120701:case 2121503:case 21218:case 30008:case 3000801:case 3000802:case 3000803:case 3000804:case 3000805:case 3000806:case 3000807:case 3000808:case 3000809:case 30009:case 5021803:case 5022001:case 5022002:case 40301:case 4030101:case 4030102:case 4030103:case 4030104:case 40303:case 4030301:case 4030302:case 4030303:case 50101:case 5010101:case 50102:case 5010201:case 5010202:case 5010203:case 5010204:case 50103:case 5010301:case 5010302:case 5010303:case 5010304:case 50107:case 5010701:case 50210:case 50220:case 50221:case 50225:case 5030102:case 50303:case 5030301:case 50309:case 50320:case 5032001:case 5032002:case 5032003:case 50321:case 5032101:case 5032102:case 50322:case 5032201:case 50330:case 5033001:case 5034203:case 5035201:case 5035204:case 60205:case 90105:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;case 20915:case 2091502:case 2092101:case 2120702:case 21216:case 2121601:case 2121602:case 21605:case 30010:case 30011:case 3001101:case 3001102:case 3001103:case 3001104:case 3001105:case 30012:case 30020:case 3002001:case 3002002:case 3002005:case 30025:case 3002501:case 30026:case 40104:case 40302:case 4030201:case 4030202:case 4030203:case 4030204:case 50227:case 5035205:case 60301:case 6030101:case 6030102:case 6030103:case 6030104:case 6030105:case 6030106:case 6030107:case 70202:case 7020201:case 7020202:case 90107:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}},SuperMapAlgoPlot.AlgoSymbolFactory.isAccessServer=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?100===t&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.isAccessServer(t,e):123===t&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.isAccessServer(t,e):999!==t||void 0===SuperMapAlgoPlot.YJAlgoSymbolFactory||SuperMapAlgoPlot.YJAlgoSymbolFactory.isAccessServer(t,e):SuperMapAlgoPlot.BasicAlgoSymbolFactory.isAccessServer(t,e)},SuperMapAlgoPlot.AlgoSymbolFactory.getDefaultSubSymbols=function(t,e){return 100===t&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.getDefaultSubSymbols(t,e):123===t&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.getDefaultSubSymbols(t,e):999===t&&void 0!==SuperMapAlgoPlot.YJAlgoSymbolFactory?SuperMapAlgoPlot.YJAlgoSymbolFactory.getDefaultSubSymbols(t,e):[]},SuperMapAlgoPlot.AlgoSymbolFactory.getMinEditPts=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?100===t&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.getMinEditPts(t,e):123===t&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.getMinEditPts(t,e):999===t&&void 0!==SuperMapAlgoPlot.YJAlgoSymbolFactory?SuperMapAlgoPlot.YJAlgoSymbolFactory.getMinEditPts(t,e):0:SuperMapAlgoPlot.BasicAlgoSymbolFactory.getMinEditPts(t,e)},SuperMapAlgoPlot.AlgoSymbolFactory.getMaxEditPts=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?100===t&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.getMaxEditPts(t,e):123===t&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.getMaxEditPts(t,e):999===t&&void 0!==SuperMapAlgoPlot.YJAlgoSymbolFactory?SuperMapAlgoPlot.YJAlgoSymbolFactory.getMaxEditPts(t,e):0:SuperMapAlgoPlot.BasicAlgoSymbolFactory.getMaxEditPts(t,e)},SuperMapAlgoPlot.AlgoSymbolFactory.getDefaultStyle=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?100===t&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.getDefaultStyle(t,e):123===t&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.getDefaultStyle(t,e):999===t&&void 0!==SuperMapAlgoPlot.YJAlgoSymbolFactory?SuperMapAlgoPlot.YJAlgoSymbolFactory.getDefaultStyle(t,e):{}:SuperMapAlgoPlot.BasicAlgoSymbolFactory.getDefaultStyle(t,e)},SuperMapAlgoPlot.AlgoSymbolFactory.getSymbolName=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?"":SuperMapAlgoPlot.BasicAlgoSymbolFactory.getSymbolName(t,e)},SuperMapAlgoPlot.AlgoSymbolFactory.canPolylineConnect=function(t,e){if(100!==t)return!1;switch(e){case 16500:case 17400:case 17401:case 17500:case 17501:case 23400:case 23500:case 23600:case 23700:case 27300:case 28200:case 28300:case 28400:case 37600:case 37601:case 37700:case 39e3:case 40100:case 40101:case 42200:case 42400:case 2350001:case 2730101:case 3032e3:case 4010800:case 4010801:case 4011100:case 4011101:case 4022100:case 4022101:case 4022102:return!0;default:return!1}},SuperMapAlgoPlot.AlgoSymbolFactory.zoomInCalSymbol=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?100===t&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.zoomInCalSymbol(t,e):123===t&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.zoomInCalSymbol(t,e):999===t&&void 0!==SuperMapAlgoPlot.YJAlgoSymbolFactory?SuperMapAlgoPlot.YJAlgoSymbolFactory.zoomInCalSymbol(t,e):0:SuperMapAlgoPlot.BasicAlgoSymbolFactory.zoomInCalSymbol(t,e)},SuperMapAlgoPlot.AlgoSymbolFactory.zoomCalSymbol=function(t,e){if((0===t||22===t||421===t)&&void 0!==SuperMapAlgoPlot.BasicAlgoSymbolFactory)return SuperMapAlgoPlot.BasicAlgoSymbolFactory.zoomCalSymbol(t,e);if(100===t)switch(e){case 28e3:case 28100:case 28200:case 28201:case 32300:return!0;default:return!1}else{if(123!==t||void 0===SuperMapAlgoPlot.WJAlgoSymbolFactory)return!1;switch(e){case 50312:case 50313:case 50314:case 50348:return!0;default:return!1}}},SuperMapAlgoPlot.AlgoSymbolFactory.calSurroundLineDir=function(t,e){if(22===t)switch(e){case 1018:case 1020:case 1021:return!1}return SuperMapAlgoPlot.AlgoSymbolFactory.getAlgoWayType(t,e)===SuperMapAlgoPlot.AddPoint_WayType.POLYLINE_CLOSE||SuperMapAlgoPlot.AlgoSymbolFactory.getAlgoWayType(t,e)===SuperMapAlgoPlot.AddPoint_WayType.CURVE_CLOSE},SuperMapAlgoPlot.AlgoSymbolFactory.getAlgoWayType=function(t,e){if(100===t)switch(e){case 24:case 40304:case 1e3:case 1007:case 1009:case 1016:case 12502:case 20300:case 26400:case 41100:case 50308:case 2092101:case 60301:case 6030101:case 6030102:case 6030103:case 6030104:case 6030105:case 6030106:case 6030107:case 1013:case 1015:case 520100:case 520200:case 21216:case 2121601:case 2121602:case 30020:case 3002001:case 3002002:case 3002005:case 30025:case 3002501:case 30026:case 3002601:case 30027:case 3002701:case 3002702:case 3002703:case 3002704:case 3002705:case 40104:case 36401:case 34700:case 32900:case 6020404:case 30013:case 3001302:case 30014:case 1001:case 1017:case 16e3:case 16001:case 25202:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;case 32:case 3020901:case 25501:case 25502:case 25503:case 25601:case 25701:case 2570201:case 2570301:case 2570401:case 2570501:case 25801:case 25901:case 44400:case 41200:case 41201:case 41202:case 30010:case 30011:case 30012:case 3001101:case 3001102:case 3001103:case 3001104:case 3001105:case 5035205:case 16100:case 35304:case 35200:case 50225:case 5020801:case 42700:case 25500:case 25600:case 25700:case 25800:case 25900:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE_CLOSE;case 40301:case 4030301:case 4030302:case 4030303:case 5010301:case 5010303:case 5010304:case 1005:case 1008:case 15200:case 15201:case 21400:case 21401:case 21500:case 21501:case 21502:case 21503:case 21504:case 21900:case 21600:case 26500:case 26501:case 26502:case 26503:case 26600:case 3000801:case 3000802:case 3000803:case 3000804:case 3000805:case 3000806:case 3000807:case 3000808:case 3000809:case 5034203:case 50355:case 5035501:case 60205:case 1012:case 1014:case 3010102:case 3010103:case 3010104:case 3010105:case 3010106:case 3010107:case 3010108:case 3010301:case 3010302:case 3010303:case 3010304:case 50102:case 4021101:case 510100:case 520300:case 530100:case 530200:case 16203:case 22e3:case 22103:case 25201:case 24700:case 25400:case 44200:case 31803:case 30800:case 30201:case 30200:case 5022002:case 3002004:case 5030301:case 50328:case 5033001:case 5022001:case 4021102:case 29003:case 30009:case 5035201:case 520500:case 23800:case 36400:case 35e3:case 33400:case 30100:case 30102:case 30002:case 30001:case 3e4:case 29903:case 5021803:case 50321:case 5032003:case 4020303:case 4020400:case 4020401:case 4020402:case 34902:case 34901:case 34900:case 12501:case 15800:case 15801:case 15802:case 15803:case 15804:case 15805:case 15806:case 15900:case 2091503:case 28900:case 16201:case 39600:case 38600:case 36700:case 26601:case 16200:case 17700:case 90213:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;case 50342:case 5034201:case 5034202:case 610100:case 29103:case 28300:case 28200:case 17400:case 17401:case 17402:case 17500:case 17501:case 22200:case 23400:case 23500:case 2350001:case 23600:case 23700:case 27300:case 2730101:case 27701:case 28400:case 44300:case 42400:case 42200:case 40100:case 40101:case 39101:case 39e3:case 37700:case 37601:case 37600:case 5020802:case 50223:case 5022301:case 50226:case 21221:case 2122101:case 50108:case 3032e3:case 4011100:case 4011101:case 4022101:case 4022102:case 4022100:case 16500:case 80203:case 8020301:return SuperMapAlgoPlot.AddPoint_WayType.CURVE_CLOSE;case 17703:case 17704:case 39801:case 39802:case 39800:case 40900:case 4e4:return SuperMapAlgoPlot.AddPoint_WayType.CURVE_WITHCONTROLPT;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN};SuperMap.MD5=SuperMap.MD5||{};SuperMap.MD5.md5=function(t){function e(t,e){return t<<e|t>>>32-e}function i(t,e){var i,o,l,s,n;return l=2147483648&t,s=2147483648&e,n=(1073741823&t)+(1073741823&e),(i=1073741824&t)&(o=1073741824&e)?2147483648^n^l^s:i|o?1073741824&n?3221225472^n^l^s:1073741824^n^l^s:n^l^s}function o(t,o,l,s,n,a,r){return i(e(t=i(t,i(i(function(t,e,i){return t&e|~t&i}(o,l,s),n),r)),a),o)}function l(t,o,l,s,n,a,r){return i(e(t=i(t,i(i(function(t,e,i){return t&i|e&~i}(o,l,s),n),r)),a),o)}function s(t,o,l,s,n,a,r){return i(e(t=i(t,i(i(function(t,e,i){return t^e^i}(o,l,s),n),r)),a),o)}function n(t,o,l,s,n,a,r){return i(e(t=i(t,i(i(function(t,e,i){return e^(t|~i)}(o,l,s),n),r)),a),o)}function a(t){var e,i="",o="";for(e=0;e<=3;e++)i+=(o="0"+(t>>>8*e&255).toString(16)).substr(o.length-2,2);return i}var r,p,u,h,g,c,y,P,S,d=Array();for(d=function(t){for(var e,i=t.length,o=i+8,l=16*((o-o%64)/64+1),s=Array(l-1),n=0,a=0;a<i;)n=a%4*8,s[e=(a-a%4)/4]=s[e]|t.charCodeAt(a)<<n,a++;return n=a%4*8,s[e=(a-a%4)/4]=s[e]|128<<n,s[l-2]=i<<3,s[l-1]=i>>>29,s}(t=function(t){t=t.replace("/\r\n/g","\n");for(var e="",i=0;i<t.length;i++){var o=t.charCodeAt(i);o<128?e+=String.fromCharCode(o):o>127&&o<2048?(e+=String.fromCharCode(o>>6|192),e+=String.fromCharCode(63&o|128)):(e+=String.fromCharCode(o>>12|224),e+=String.fromCharCode(o>>6&63|128),e+=String.fromCharCode(63&o|128))}return e}(t)),c=1732584193,y=4023233417,P=2562383102,S=271733878,r=0;r<d.length;r+=16)p=c,u=y,h=P,g=S,y=n(y=n(y=n(y=n(y=s(y=s(y=s(y=s(y=l(y=l(y=l(y=l(y=o(y=o(y=o(y=o(y,P=o(P,S=o(S,c=o(c,y,P,S,d[r+0],7,3614090360),y,P,d[r+1],12,3905402710),c,y,d[r+2],17,606105819),S,c,d[r+3],22,3250441966),P=o(P,S=o(S,c=o(c,y,P,S,d[r+4],7,4118548399),y,P,d[r+5],12,1200080426),c,y,d[r+6],17,2821735955),S,c,d[r+7],22,4249261313),P=o(P,S=o(S,c=o(c,y,P,S,d[r+8],7,1770035416),y,P,d[r+9],12,2336552879),c,y,d[r+10],17,4294925233),S,c,d[r+11],22,2304563134),P=o(P,S=o(S,c=o(c,y,P,S,d[r+12],7,1804603682),y,P,d[r+13],12,4254626195),c,y,d[r+14],17,2792965006),S,c,d[r+15],22,1236535329),P=l(P,S=l(S,c=l(c,y,P,S,d[r+1],5,4129170786),y,P,d[r+6],9,3225465664),c,y,d[r+11],14,643717713),S,c,d[r+0],20,3921069994),P=l(P,S=l(S,c=l(c,y,P,S,d[r+5],5,3593408605),y,P,d[r+10],9,38016083),c,y,d[r+15],14,3634488961),S,c,d[r+4],20,3889429448),P=l(P,S=l(S,c=l(c,y,P,S,d[r+9],5,568446438),y,P,d[r+14],9,3275163606),c,y,d[r+3],14,4107603335),S,c,d[r+8],20,1163531501),P=l(P,S=l(S,c=l(c,y,P,S,d[r+13],5,2850285829),y,P,d[r+2],9,4243563512),c,y,d[r+7],14,1735328473),S,c,d[r+12],20,2368359562),P=s(P,S=s(S,c=s(c,y,P,S,d[r+5],4,4294588738),y,P,d[r+8],11,2272392833),c,y,d[r+11],16,1839030562),S,c,d[r+14],23,4259657740),P=s(P,S=s(S,c=s(c,y,P,S,d[r+1],4,2763975236),y,P,d[r+4],11,1272893353),c,y,d[r+7],16,4139469664),S,c,d[r+10],23,3200236656),P=s(P,S=s(S,c=s(c,y,P,S,d[r+13],4,681279174),y,P,d[r+0],11,3936430074),c,y,d[r+3],16,3572445317),S,c,d[r+6],23,76029189),P=s(P,S=s(S,c=s(c,y,P,S,d[r+9],4,3654602809),y,P,d[r+12],11,3873151461),c,y,d[r+15],16,530742520),S,c,d[r+2],23,3299628645),P=n(P,S=n(S,c=n(c,y,P,S,d[r+0],6,4096336452),y,P,d[r+7],10,1126891415),c,y,d[r+14],15,2878612391),S,c,d[r+5],21,4237533241),P=n(P,S=n(S,c=n(c,y,P,S,d[r+12],6,1700485571),y,P,d[r+3],10,2399980690),c,y,d[r+10],15,4293915773),S,c,d[r+1],21,2240044497),P=n(P,S=n(S,c=n(c,y,P,S,d[r+8],6,1873313359),y,P,d[r+15],10,4264355552),c,y,d[r+6],15,2734768916),S,c,d[r+13],21,1309151649),P=n(P,S=n(S,c=n(c,y,P,S,d[r+4],6,4149444226),y,P,d[r+11],10,3174756917),c,y,d[r+2],15,718787259),S,c,d[r+9],21,3951481745),c=i(c,p),y=i(y,u),P=i(P,h),S=i(S,g);return(a(c)+a(y)+a(P)+a(S)).toLowerCase()},L.supermap.plotting=L.supermap.plotting||{};var g=L.Path.extend({options:{text:"",labelAlign:"cm",labelRotation:0,fontColor:"#000000",fontSize:14,fontOpacity:1,fontFamily:"微软雅黑",fontWeight:"normal",fontStyle:"",fontSpace:0,fontPercent:100,fontStroke:!1,fontStrokeColor:"#ff0000",fontStrokeWidth:2,fontBackground:!1,fontBackgroundColor:"#ff0000",fontShadow:!1,fontShadowColor:"#ff0000",fontShadowOffsetX:0,fontShadowOffsetY:0,interactive:!0},_textNode:null,_backgroundTextNode:null,_shadowTextNode:null,_tspanNodeObj:null,initialize:function(t,e){L.setOptions(this,e),this._latlng=L.latLng(t[0]),this._text=this.options.text,this._tspanNodeObj={}},onAdd:function(){L.Path.prototype.onAdd.call(this)},onRemove:function(){this._removeNode(),L.Path.prototype.onRemove.call(this)},_removeNode:function(){this._textNode&&this._textNode.parentNode&&(L.DomUtil.remove(this._textNode),this.removeInteractiveTarget(this._textNode),delete this._textNode,this._textNode=null),this._backgroundTextNode&&this._backgroundTextNode.parentNode&&(this._renderer._rootGroup.removeChild(this._backgroundTextNode),delete this._backgroundTextNode,this._backgroundTextNode=null),this._shadowTextNode&&this._shadowTextNode.parentNode&&(this._renderer._rootGroup.removeChild(this._shadowTextNode),delete this._shadowTextNode,this._shadowTextNode=null),this._tspanNodeObj={},this._textNode&&(L.DomUtil.remove(this._textNode),this.removeInteractiveTarget(this._textNode),delete this._textNode,this._textNode=null),this._backgroundTextNode&&(delete this._backgroundTextNode,this._backgroundTextNode=null),this._shadowTextNode&&(delete this._shadowTextNode,this._shadowTextNode=null)},setLatLngs:function(t){return this._latlng=L.latLng(t[0]),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLngs:function(){return[this._latlng]},setText:function(t){return this.options.text=this._text=t,this.redraw()},getText:function(){return this._text},setStyle:function(t){var e=t&&t.text||this._text;return L.Path.prototype.setStyle.call(this,t),this.setText(e),this},getBounds:function(){return this._updateBounds(),this._bounds},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},getPxBounds:function(t){this._point=this._map.latLngToLayerPoint(this._latlng);var e=1;this.options.fontPercent&&100!==this.options.fontPercent&&(e=this.options.fontPercent/100);var i=0,o=0,l=this.options.text.split("\n"),s=l.length;if(this._renderer instanceof L.Canvas){var n=[this.options.fontStyle?this.options.fontStyle:"normal","normal",this.options.fontWeight?this.options.fontWeight:"normal",this.options.fontSize?this.options.fontSize+"px":"1em",this.options.fontFamily?this.options.fontFamily:"sans-serif"].join(" ");this._renderer._ctx.font=n,this.options.fontSize=parseFloat(this.options.fontSize);let t=L.Canvas.LABEL_FACTOR[this.options.labelAlign[1]];null==t&&(t=-.5);let a=this._renderer._ctx.measureText("Mg").height||this._renderer._ctx.measureText("xx").width;o=a*t*(s-1)+a*s;for(let t=0;t<s;t++)if(this.options.fontSpace&&0!=this.options.fontSpace||this.options.fontPercent&&100!=this.options.fontPercent){let o=(this._renderer._ctx.measureText(l[t]).width+this.options.fontSpace*(l[t].length-1))*e;i<o&&(i=o)}else{let e=this._renderer._ctx.measureText(l[t]).width;i<e&&(i=e)}}else if(this._renderer instanceof L.SVG){let t=L.SVG.LABEL_VFACTOR[this.options.labelAlign[1]];null==t&&(t=-.5);let e=this.options.fontSize;o=e*t*(s-1)+e*s;for(let t=0;t<s;t++){let e=SuperMap.Plot.PlottingUtil.getTextWidth(this.options,l[t]);i<e&&(i=e)}}else{this.options.fontSize=parseFloat(this.options.fontSize);let t=this.options.fontSize;o=t*(s-1)+t*s;for(let t=0;t<s;t++){let e=SuperMap.Plot.PlottingUtil.getTextWidth(this.options,l[t]);i<e&&(i=e)}}this.options.fontSize<6&&(i=0);var a=0,r=0,p=0,u=0,h=this.options.labelAlign||"cm";for(var g in"lt"===h?(a=this._point.x,r="微软雅黑"==this.options.fontFamily||"Microsoft YaHei"==this.options.fontFamily?this._point.y:this._point.y-this.options.fontSize/2,p=this._point.x+i,u=this._point.y+o):"ct"===h?(a=this._point.x-i/2,r="微软雅黑"==this.options.fontFamily||"Microsoft YaHei"==this.options.fontFamily?this._point.y:this._point.y-this.options.fontSize/2,p=this._point.x+i/2,u=this._point.y+o):"rt"===h?(a=this._point.x-i,r="微软雅黑"==this.options.fontFamily||"Microsoft YaHei"==this.options.fontFamily?this._point.y:this._point.y-this.options.fontSize/2,p=this._point.x,u=this._point.y+o):"lb"===h?(a=this._point.x,r=this._point.y-o,p=this._point.x+i,u="微软雅黑"==this.options.fontFamily||"Microsoft YaHei"==this.options.fontFamily?this._point.y:this._point.y+this.options.fontSize/2):"cb"===h?(a=this._point.x-i/2,r=this._point.y-o,p=this._point.x+i/2,u=this._point.y,u="微软雅黑"==this.options.fontFamily||"Microsoft YaHei"==this.options.fontFamily?this._point.y:this._point.y+this.options.fontSize/2):"rb"===h?(a=this._point.x-i,r=this._point.y-o,p=this._point.x,u="微软雅黑"==this.options.fontFamily||"Microsoft YaHei"==this.options.fontFamily?this._point.y:this._point.y+this.options.fontSize/2):"lm"===h?(a=this._point.x,r=this._point.y-o/2,p=this._point.x+i,u=this._point.y+o/2):"cm"===h?(a=this._point.x-i/2,r=this._point.y-o/2,p=this._point.x+i/2,u=this._point.y+o/2):"rm"===h&&(a=this._point.x-i,r=this._point.y-o/2,p=this._point.x,u=this._point.y+o/2),t&&this.options.fontShadow&&(0!==this.options.fontShadowOffsetX||0!==this.options.fontShadowOffsetY)&&(this.options.fontShadowOffsetX>0?p+=this.options.fontShadowOffsetX:a+=this.options.fontShadowOffsetX,this.options.fontShadowOffsetY>0?u+=this.options.fontShadowOffsetY:r+=this.options.fontShadowOffsetY),this._eventParents)if(this._eventParents[g].symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL&&0===this.options.fontPercent&&0===this.options.fontPercent){var c=p-a,y=(c+this.options.fontSpace*(this.options.text.length-1))*this.options.fontPercent/100-c;switch(h){case"lt":case"lm":case"lb":p+=y;break;case"rt":case"rm":case"rb":a-=y;break;case"ct":case"cm":case"cb":a-=y/2,p+=y/2}}var P=new L.Bounds;if(this.options.labelRotation&&0!==this.options.labelRotation){var S=[];S.push(L.point(a,r)),S.push(L.point(a,u)),S.push(L.point(p,r)),S.push(L.point(p,u));var d=this.options.labelRotation*(Math.PI/180);for(let t=0;t<S.length;t++)SuperMap.Plot.PlottingUtil.rotateAngle(this._point,d,S[t]),P.extend(S[t])}else P=L.bounds(L.point(a,r),L.point(p,u));return P},_updateBounds:function(){this._pxBounds=this.getPxBounds(!0);var t=this._map.layerPointToLatLng(this._pxBounds.min),e=this._map.layerPointToLatLng(this._pxBounds.max);this._bounds=L.latLngBounds(t,e)},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateText(this)},_empty:function(){return this._text&&!this._renderer._bounds.intersects(this._pxBounds)}});L.supermap.plotting.text=function(t,e){return new g(t,e)},L.supermap.plotting.Text=g;var c=L.Path.extend({options:{externalGraphic:"",graphicWidth:0,graphicHeight:0,graphicOpacity:1,graphicXOffset:void 0,graphicYOffset:void 0,rotation:0,graphicTitle:"",interactive:!0},_imageNode:null,initialize:function(t,e){L.setOptions(this,e),this._latlng=L.latLng(t[0])},onAdd:function(){L.Path.prototype.onAdd.call(this),this._updatePath()},onRemove:function(){this._imageNode&&this._imageNode.parentNode&&(this._renderer._rootGroup.removeChild(this._imageNode),delete this._imageNode,this._imageNode=null),this._imageNode&&(delete this._imageNode,this._imageNode=null),L.Path.prototype.onRemove.call(this)},setLatLngs:function(t){return this._latlng=L.latLng(t[0]),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLngs:function(){return[this._latlng]},getBounds:function(){return this._updateBounds(),this._bounds},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},getPxBounds:function(){this._point=this._map.latLngToLayerPoint(this._latlng),null==this.options.graphicXOffset&&(this.options.graphicXOffset=0),null==this.options.graphicYOffset&&(this.options.graphicYOffset=0);var t=-.5*this.options.graphicWidth+this.options.graphicXOffset,e=-.5*this.options.graphicHeight+this.options.graphicYOffset,i=this._point.x+t,o=this._point.y+e,l=i+this.options.graphicWidth,s=o+this.options.graphicHeight,n=new L.Bounds;if(this.options.rotation&&0!==this.options.rotation){var a=[];a.push(L.point(i,o)),a.push(L.point(i,s)),a.push(L.point(l,o)),a.push(L.point(l,s));for(var r=this.options.rotation*(Math.PI/180),p=0;p<a.length;p++)SuperMap.Plot.PlottingUtil.rotateAngle(this._point,r,a[p]),n.extend(a[p])}else n=L.bounds(L.point(i,o),L.point(l,s));return n},_updateBounds:function(){this._pxBounds=this.getPxBounds();var t=this._map.layerPointToLatLng(this._pxBounds.min),e=this._map.layerPointToLatLng(this._pxBounds.max);this._bounds=L.latLngBounds(t,e)},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateImage(this)},_empty:function(){return this.options.externalGraphic&&!this._renderer._bounds.intersects(this._pxBounds)}});L.supermap.plotting.pointImage=function(t,e){return new c(t,e)},L.supermap.plotting.PointImage=c;var y=L.Class.extend({feature:null,canvas:null,anchor:null,size:null,fromZoom:null,latLng:null,bounds:null,options:{extent:0},initialize:function(t,e){this.feature=t,e=e||{},L.Util.setOptions(this,e),this.canvasEle=document.createElement("canvas"),this.canvasEle.width=0,this.canvasEle.height=0,this._ctx=this.canvasEle.getContext("2d")},_latlngToLayerPoint:function(t,e){null==e&&(e=this.fromZoom);let i=this.feature._map.getZoomScale(e,this.feature._map.getZoom()),o=this.latLng;var l=[];for(let e=0;e<t.length;e++){let n=o.lat+i*(t[e].lat-o.lat),a=o.lng+i*(t[e].lng-o.lng);var s=this.feature._map.latLngToLayerPoint(L.latLng(n,a));s.x=s.x-this.leftTopPixel.x+this.feature.style.weight,s.y=s.y-this.leftTopPixel.y+this.feature.style.weight,l.push(s)}return l},_scaleBounds:function(t){if(this.fromZoom!==this.feature._map.getZoom()){let e=this.feature._map.getZoomScale(this.fromZoom,this.feature._map.getZoom()),i=this.latLng,o=i.lat+e*(t.getNorth()-i.lat),l=i.lat+e*(t.getSouth()-i.lat),s=i.lng+e*(t.getWest()-i.lng),n=i.lng+e*(t.getEast()-i.lng);return L.latLngBounds(L.latLng(o,s),L.latLng(l,n))}return L.latLngBounds(L.latLng(t.getNorth(),t.getWest()),L.latLng(t.getSouth(),t.getEast()))},_drawPolyline:function(t,e){var i=this._latlngToLayerPoint(t.getLatLngs(),t.fromZoom),o=t.options;e.beginPath(),e.globalAlpha=o.opacity,this._addDashArray(t),e.setLineDash&&e.setLineDash(t.options&&t.options._dashArray||[]),e.moveTo(i[0].x,i[0].y);for(var l=1,s=i.length;l<s;l++)e.lineTo(i[l].x,i[l].y);o.fill&&(e.globalCompositeOperation=!0===Boolean(this.feature.surroundLineType)?"destination-over":"source-over"),e.strokeStyle=SuperMap.Plot.PlottingUtil.colorRGBA(o.color,o.opacity),e.lineWidth=o.weight,e.stroke()},_drawRectangle:function(t,e){var i=this._latlngToLayerPoint(t.getLatLngs()[0],t.fromZoom),o=t.options;e.beginPath(),e.globalAlpha=!0===o.fill?o.fillOpacity:o.opacity,this._addDashArray(t),e.setLineDash&&e.setLineDash(t.options&&t.options._dashArray||[]),e.moveTo(i[0].x,i[0].y);for(var l=1,s=i.length;l<s;l++){var n=i[l].x,a=i[l].y;e.lineTo(n,a)}e.closePath(),o.fill&&(e.globalCompositeOperation=!0===Boolean(this.feature.surroundLineType)?"destination-over":"source-over",!0===o.fillLimit&&!0!==o.fillColorLimit?e.fillStyle=SuperMap.Plot.PlottingUtil.colorRGBA(o.color,o.opacity):e.fillStyle=SuperMap.Plot.PlottingUtil.colorRGBA(o.fillColor,o.fillOpacity),e.fill()),e.strokeStyle=SuperMap.Plot.PlottingUtil.colorRGBA(o.color,o.opacity),e.lineWidth=o.weight,e.stroke()},_drawPolygon:function(t,e){var i=this._latlngToLayerPoint(t.getLatLngs()[0],t.fromZoom),o=t.options;e.beginPath(),e.globalAlpha=!0===o.fill?o.fillOpacity:o.opacity,this._addDashArray(t),e.setLineDash&&e.setLineDash(t.options&&t.options._dashArray||[]),e.moveTo(i[0].x,i[0].y);for(var l=1,s=i.length;l<s;l++){var n=i[l].x,a=i[l].y;e.lineTo(n,a)}e.closePath(),o.fill&&(e.globalCompositeOperation=!0===Boolean(this.feature.surroundLineType)?"destination-over":"source-over",!0===o.fillLimit&&!0!==o.fillColorLimit?e.fillStyle=SuperMap.Plot.PlottingUtil.colorRGBA(o.color,o.opacity):e.fillStyle=SuperMap.Plot.PlottingUtil.colorRGBA(o.fillColor,o.fillOpacity),e.fill(o.fillRule||"evenodd")),e.strokeStyle=SuperMap.Plot.PlottingUtil.colorRGBA(o.color,o.opacity),e.lineWidth=o.weight,e.stroke()},_drawText:function(t,e){var i=this._latlngToLayerPoint(t.getLatLngs(),t.fromZoom)[0],o=t.options,l=(o=SuperMap.Util.extend({fontColor:"#000000",labelAlign:"cm"},o)).fontSize.toLocaleString()+"px",s=[o.fontStyle?o.fontStyle:"normal","normal",o.fontWeight?o.fontWeight:"normal",o.fontSize?l:"1em",o.fontFamily?o.fontFamily:"sans-serif"].join(" ");e.globalAlpha=o.fontOpacity,e.fillStyle=SuperMap.Plot.PlottingUtil.colorRGBA(o.fontColor,o.fontOpacity),e.font=s,e.fillText&&(e.textAlign=L.Canvas.LABEL_ALIGN[o.labelAlign[0]]||"center"),e.textBaseline=L.Canvas.LABEL_ALIGN[o.labelAlign[1]]||"middle";var n=L.Canvas.LABEL_FACTOR[o.labelAlign[1]];null==n&&(n=-.5);var a=e.measureText("Mg").height||e.measureText("xx").width,r=o.text.split("\n"),p=r.length;i.y+=a*n*(p-1);for(let t=0;t<p;t++)e.save(),e.translate(i.x,i.y),0!=o.labelRotation&&e.rotate(o.labelRotation*Math.PI/180),e.fillText(r[t],0,a*t),e.restore()},_drawImage:function(t,e){var i=this._latlngToLayerPoint(t.getLatLngs(),t.fromZoom)[0],o=t.options,l=null;if(!Object.prototype.hasOwnProperty.call(L.supermap.plotting.getControl().imageManager,t.options.externalGraphic)){l=new Image,SuperMap.Browser.name;t.options.graphicTitle&&(l.title=t.options.graphicTitle),l.src=t.options.externalGraphic,L.supermap.plotting.getControl().imageManager[t.options.externalGraphic]=l}return{point:i,style:o,path:t.options.externalGraphic}},_addDashArray:function(t){if(t.options.dashArray){var e,i=t.options.dashArray.split(","),o=[];for(e=0;e<i.length;e++)o.push(number(i[e]));t.options._dashArray=o}}});L.supermap.plotting.symbolStyle=function(t){return new y(t)};var P=y.extend({components:null,position:null,offsetX:null,offsetY:null,initialize:function(t,e,i,o,l,s,n){this.feature=t,this.components=e,this.latLng=i,this.position=o,this.offsetX=l,this.offsetY=s,n=n||{},L.Util.setOptions(this,n),this.canvasEle=document.createElement("canvas"),this.canvasEle.width=0,this.canvasEle.height=0,this._ctx=this.canvasEle.getContext("2d")},setComponents:function(t,e,i,o,l){delete this.bounds,this.bounds=null,this.components=t,this.latLng=e,this.position=i,this.offsetX=o,this.offsetY=l,this.render()},render:function(){this._computeImageSize(),this.canvasEle.width=this.size[0],this.canvasEle.height=this.size[1],this._ctx.clearRect(0,0,this.canvasEle.width,this.canvasEle.height),this.canvas=this._ctx.canvas,this._drawFeatures()},clear:function(){this._ctx.clearRect(0,0,this.canvasEle.width,this.canvasEle.height)},getCacheInfo:function(){var t=document.createElement("canvas"),e=t.getContext("2d");return t.width=this.canvas.width,t.height=this.canvas.height,e.clearRect(0,0,t.width,t.height),e.drawImage(this.canvas,0,0),{canvas:e.canvas,_ctx:e,position:this.position,offsetX:this.offsetX,offsetY:this.offsetY,anchor:L.point(this.anchor.x,this.anchor.y),size:[this.size[0],this.size[1]]}},_computeImageSize:function(){if(null==this.bounds){this.bounds=L.latLngBounds();for(let t=0;t<this.components.length;t++)this.bounds.extend(this.components[t].getBounds?this.components[t].getBounds():this.components[t].getLatLng())}var t=new L.Bounds;t.extend(this.feature._map.latLngToLayerPoint(this.bounds.getNorthEast())),t.extend(this.feature._map.latLngToLayerPoint(this.bounds.getNorthWest())),t.extend(this.feature._map.latLngToLayerPoint(this.bounds.getSouthEast())),t.extend(this.feature._map.latLngToLayerPoint(this.bounds.getSouthWest())),this.leftTopPixel=L.point(t.min.x,t.min.y);var e=t.getSize(),i=this.feature.style.weight;e.x+=2*i,e.y+=2*i,this.anchor=this._latlngToLayerPoint([this.latLng])[0],this.size=[e.x,e.y]},_latlngToLayerPoint:function(t){var e=[];for(let o=0;o<t.length;o++){var i=this.feature._map.latLngToLayerPoint(L.latLng(t[o].lat,t[o].lng));i.x=i.x-this.leftTopPixel.x+this.feature.style.weight,i.y=i.y-this.leftTopPixel.y+this.feature.style.weight,e.push(i)}return e},_drawFeatures:function(){for(var t in this._ctx.translate(0,0),this.components){var e=this.components[t];g&&e instanceof g?this._drawText(e,this._ctx):L.Rectangle&&e instanceof L.Rectangle?this._drawRectangle(e,this._ctx):L.Polygon&&e instanceof L.Polygon?this._drawPolygon(e,this._ctx):L.Polyline&&e instanceof L.Polyline&&this._drawPolyline(e,this._ctx)}}});L.supermap.plotting.componentStyle=function(t){return new P(t)};var S=L.Marker.extend({options:{nHandle:0,tag:0}});L.supermap.plotting.editMarker=function(t,e){return new S(t,e)};var d=L.Evented.extend({dragging:null,uuid:null,libID:null,code:null,textDisplay:!0,minEditPts:1,maxEditPts:1,symbolType:null,symbolName:null,bubbleHeight:320,bubbleWidth:320,description:"",mediaList:null,isSelected:!1,enableEdit:!0,note:"",extendProperty:null,custom:null,symbolData:null,dRotate:null,dScale:null,textContent:null,annotationPosition:4,subSymbols:null,fromZoom:null,style:null,isLocked:!1,anchorPoint:null,avoidRegions:null,ownerGroup:null,geoSymbolTexts:null,isEdit:!1,components:null,maxScale:null,minScale:null,options:{},_defaultStyle:{display:"display",color:"#ff0000",lineSymbolID:0,opacity:"1.00",weight:2,lineCap:"square",lineJoin:"square",surroundLineColor:"#ffff00",surroundLineColorOpacity:"1.00",surroundLineWidth:4,fillSymbolID:1,fillColor:"#ff0000",fillOpacity:"0.31",fillBackColor:"#ff0000",fillBackOpacity:"1.00",fillGradientMode:"NONE",fontColor:"#000000",fontFamily:"Microsoft YaHei",fontSize:"12",fontStroke:!1,fontStrokeColor:"#ff0000",fontStrokeWidth:"2px",fontBackground:!1,fontBackgroundColor:"#ff0000",fontShadow:!1,fontShadowColor:"#ff0000",fontShadowOffsetX:0,fontShadowOffsetY:0,fontSpace:0,fontPercent:100,sizeFixed:!0,labelAlign:"lt",labelRotation:-0,labelXOffset:0,labelYOffset:0,fillAngle:0,fillCenterOffsetX:0,fillCenterOffsetY:0},initialize:function(t,e,i,o){this.components=[],this.libID=t,this.code=e,this.extendProperty=new SuperMap.Plot.ExtendProperty,this.avoidRegions=[],this.subSymbols=[],this.geoSymbolTexts=[],this.dRotate=0,this.dScale=1,this.textContent="",this.associatedUuid="",this.bubbleHeight=320,this.bubbleWidth=320,this.description="",this.mediaList=[],o&&o.symbolData&&(this._removeRedundancySymbolData(o.symbolData),this.symbolData=SuperMap.Plot.PlottingUtil.cloneObject(o.symbolData),SuperMap.Plot.AnalysisSymbol.parseSymbolData(this,this.symbolData,!0),SuperMap.Util.applyDefaults(this.style,this._defaultStyle),delete o.symbolData),this._mergeDefaultStyle(),SuperMap.Util.extend(this,o),null===this.uuid&&(this.uuid=SuperMap.Plot.PlottingUtil.generateUuid()),null===this.style&&(this.style=SuperMap.Plot.PlottingUtil.cloneObject(this._defaultStyle));for(var l=0;l<this.avoidRegions.length;l++)this.avoidRegions[l].associatedUuid=this.uuid},onAdd:function(t){this.layer=t,this._renderer=t instanceof _t?t.getRenderer(this.symbolType):t._renderer,this._map=t._map,this.redraw(),this.isEdit=!0,A&&(this.dragging||(this.dragging=new A(this))),null===this.fromZoom&&(this.fromZoom=this._map.getZoom()),this.layer instanceof Ct&&(null!==this.layer.firstZoom&&void 0!==this.layer.firstZoom||1!==this.layer.getFeatures().length||(this.layer.firstZoom=this._map.getZoom()))},_clearComponents:function(){for(var t=0;t<this.components.length;t++)this.components[t].removeEventParent(this),this.components[t]instanceof d?this.components[t]._clearComponents():(null!=this.components[t]._renderer&&this.components[t].onRemove(),delete this.components[t]);this.components.length=0,this._map&&this.layer&&this._map.getRenderer(this.layer)instanceof L.SVG&&this._removeGradientNodeInSVG()},_removeGradientNodeInSVG:function(){if(this.uuid&&this.layer._renderer._container.defs){var t=document.getElementById("linearGradient_"+this.uuid);null!==t&&this.layer._renderer._container.defs.removeChild(t),null!==(t=document.getElementById("radialGradient_"+this.uuid))&&this.layer._renderer._container.defs.removeChild(t),null!==(t=document.getElementById("patternFill_"+this.uuid))&&this.layer._renderer._container.defs.removeChild(t)}},_addComponents:function(t){if(!0===this.movingTarget)t._map=this._map,this.components.push(t);else{if(t._map=this._map,t._renderer=this._renderer,t.addEventParent(this),t instanceof d)t.onAdd(this.layer);else{var e=SuperMap.Util.indexOf(this.layer.features,this);if(-1==e&&null!=this.route&&(e=SuperMap.Util.indexOf(this.layer.features,this.route)),-1==e&&null!=this.ownerGroup&&(e=SuperMap.Util.indexOf(this.layer.features,this.ownerGroup)),0===this.layer.features.length||e===this.layer.features.length-1)t.onAdd();else{for(var i=null,o=e+1;o<this.layer.features.length;o++)if(null!=(i=this.layer.features[o])&&i.components.length>0){if(i.components[0]instanceof d&&i.components[0].components.length>0){i=i.components[0];break}if(!(i.components[0]instanceof d))break;i=null}null!=i&&i.components.length>0?i.components[0]instanceof d&&i.components[0].components.length>0?t.onBefore(i.components[0].components[0]):t.onBefore(i.components[0]):t.onAdd()}}this.components.push(t)}},_project:function(){var t=this;t._pxBounds=new L.Bounds,t.components.map(function(e){return e instanceof d&&e._project(),e._pxBounds&&e._pxBounds.isValid()&&(t._pxBounds.extend(e._pxBounds.min),t._pxBounds.extend(e._pxBounds.max)),e})},getBounds:function(){var t=this;return t._bounds=new L.LatLngBounds,t.components.map(function(e){return t._bounds.extend(e.getBounds()),e}),t._bounds},clone:function(){this.symbolData=this.getSymbolData();var t=SuperMap.Plot.PlottingUtil.toJSON(this.symbolData),e=JSON.parse(t);e.uuid=SuperMap.Plot.PlottingUtil.generateUuid();var i=SuperMap.Plot.PlottingUtil.cloneObject(this.style);return L.supermap.plotting.PlottingObject.createSymbol(this.libID,this.code,null,{symbolData:e,serverUrl:this.serverUrl},i)},setStyle:function(t){if(SuperMap.Util.extend(this.style,t),this.redraw(),this.symbolType===SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL&&this.ownerGroup&&(this.ownerGroup.symbolType===SuperMap.Plot.SymbolType.NAVYDEPLOYMENT||this.ownerGroup.symbolType===SuperMap.Plot.SymbolType.AIRDEPLOYMENT))for(let t in this.ownerGroup.subObjects)this.ownerGroup.subObjects[t].redraw();this.symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL&&this.isSelected&&"none"!==this.style.display&&this.fire(SuperMap.Plot.Event.reseteditmarkersvalues),this.layer.fire("propertychanged",{feature:this,property:t})},setScale:function(){},setRotate:function(){},setTextPosition:function(){},convertGraphicObjects:function(){},setTextContent:function(t){this.textContent=t,this.redraw(),this.symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL&&this.isSelected&&(this.fire(SuperMap.Plot.Event.reseteditmarkersvalues),this.layer.fire("propertychanged",{feature:this,property:t}))},getLocked:function(){return this.isLocked},setLocked:function(t){if(this.isLocked!==t){if(this.isLocked=t,this.symbolType===SuperMap.Plot.SymbolType.GROUPOBJECT)for(var e=0;e<this.components.length;e++)this.components[e].isLocked=t;this.fire(SuperMap.Plot.Event.reseteditmarkers)}},getScale:function(){return this.dScale},getScaleValues:function(){return this.scaleValues},setScaleValues:function(t){t&&null!==t&&(L.Util.isArray(t)||(t=[t]),this.scaleValues=t,this._calculateParts(),this.fire(SuperMap.Plot.Event.reseteditmarkers))},getRotate:function(){return this.dRotate},getSubSymbols:function(){return 0===this.libID&&this.code===SuperMap.Plot.SymbolType.NODECHAIN&&0===this.subSymbols.length?this.subSymbols.push(new SuperMap.Plot.SubSymbol(-1,-1)):(100!==this.libID||25200!==this.code&&3020901!==this.code&&23400!==this.code&&30800!==this.code&&30001!==this.code&&26400!==this.code||0!==this.subSymbols.length)&&(123!==this.libID||5030101!==this.code&&5020801!==this.code&&50208!==this.code&&50331!==this.code||0!==this.subSymbols.length)||this.subSymbols.push(new SuperMap.Plot.SubSymbol(-1,-1)),this.subSymbols},getTextPosition:function(){return this.annotationPosition},getTextContent:function(){return this.textContent},getBubbleHeight:function(){return this.bubbleHeight},setBubbleHeight:function(t){this.bubbleHeight=t},getBubbleWidth:function(){return this.bubbleWidth},setBubbleWidth:function(t){this.bubbleWidth=t},getDescription:function(){return this.description},setDescription:function(t){this.description=t},getMediaList:function(){return this.mediaList},setMediaList:function(t){this.mediaList=t},clearMediaList:function(){this.mediaList=[]},getExtendProperty:function(){return this.extendProperty},addAvoidRegion:function(t){t.symbolType===SuperMap.Plot.SymbolType.AVOIDREGION&&(this.avoidRegions.push(t),t.associatedUuid=this.uuid,this.redraw())},removeAvoidRegions:function(t){void 0===t&&(t=this.avoidRegions.slice()),SuperMap.Util.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=t[e];if(i.symbolType===SuperMap.Plot.SymbolType.AVOIDREGION)for(var o=0;o<this.avoidRegions.length;o++)if(this.avoidRegions[o]===i){this.avoidRegions.splice(o,1);break}}this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},getSymbolData:function(){return SuperMap.Plot.AnalysisSymbol.setSymbolData(this,this.symbolData,!0),this.symbolData},redraw:function(){var t=L.supermap.plotting.getControl().getPlotMapManager().getLayerScale();null!=this.graphic&&null!=this.graphic.layer&&!0===this.graphic.layer.getVisibility()?this.graphic.redraw():null!=this.layer&&(this._clearComponents(),"function"!=typeof this.layer.getVisibility?(this._redrawComponents(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)):this.layer.getVisibility()&&(null==this.childLayer||"function"!=typeof this.childLayer.getVisibility||this.childLayer.getVisibility())&&("function"!=typeof this.layer.getMinVisibleScale&&"function"!=typeof this.layer.getMaxVisibleScale||"function"==typeof this.layer.getMinVisibleScale&&"function"!=typeof this.layer.getMaxVisibleScale&&(t>=this.layer.getMinVisibleScale()||0===this.layer.getMinVisibleScale())||"function"!=typeof this.layer.getMinVisibleScale&&"function"==typeof this.layer.getMaxVisibleScale&&(0===this.layer.getMaxVisibleScale()||t<=this.layer.getMaxVisibleScale())||"function"==typeof this.layer.getMinVisibleScale&&"function"==typeof this.layer.getMaxVisibleScale&&0===this.layer.getMaxVisibleScale()&&t>=this.layer.getMinVisibleScale()||"function"==typeof this.layer.getMinVisibleScale&&"function"==typeof this.layer.getMaxVisibleScale&&0===this.layer.getMinVisibleScale()&&t<=this.layer.getMaxVisibleScale()||"function"==typeof this.layer.getMinVisibleScale&&"function"==typeof this.layer.getMaxVisibleScale&&(0===this.layer.getMinVisibleScale()&&0===this.layer.getMaxVisibleScale()||t>=this.layer.getMinVisibleScale()&&t<=this.layer.getMaxVisibleScale()))&&(this._redrawComponents(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},_redrawComponents:function(){"none"===this.style.display||null!=this.layer&&"function"==typeof this.layer.getVisibility&&!1===this.layer.getVisibility()?this.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL&&this.symbolType!==SuperMap.Plot.SymbolType.AlgoSymbol&&0!==this.libID||this._updateSymbolTexts():(this._calculateParts(),this._calculateAvoidRegions())},_calculateAvoidRegions:function(){if(0!==this.avoidRegions.length){var t=this.components.slice();for(let t=0;t<this.components.length;t++)this.components[t].removeEventParent(this),this.components[t]instanceof d||(this.components[t].onRemove(),delete this.components[t]);this.components.length=0;for(var e=0;e<this.avoidRegions.length;e++)if(0!==this.avoidRegions[e].getLatLngs().length){var i=this.avoidRegions[e];t=this._layersWithoutAvoidRegion(i,t)}for(let e=0;e<t.length;e++)this._addComponents(t[e])}},_layersWithoutAvoidRegion:function(t,e){for(var i=[],o=0;o<e.length;o++){var l=e[o];if(l instanceof d)i=i.concat(this._layersWithoutAvoidRegion(t,l.components)),l._clearComponents();else{if(1===t._relationToLayer(l))continue;if(l instanceof g||0!==t._relationToLayer(l))i.push(l);else if(l instanceof L.Polygon){let e={};e=SuperMap.Util.copyAttributes(e,l.options);let o=L.Util.latLngsToSuperMapPoints(l.getLatLngs()[0][0]),n=L.Util.latLngsToSuperMapPoints(l.getLatLngs()[0][l.getLatLngs()[0].length-1]);SuperMap.Plot.PlottingUtil.isSamePt(o[0],n[0])||l.getLatLngs()[0].push(l.getLatLngs()[0][0]),o=L.Util.latLngsToSuperMapPoints(l.getLatLngs()[0][0]),n=L.Util.latLngsToSuperMapPoints(l.getLatLngs()[0][l.getLatLngs()[0].length-1]),SuperMap.Plot.PlottingUtil.isSamePt(o[0],n[0])||l.getLatLngs()[0].push(l.getLatLngs()[0][0]);for(var s=0;s<l.getLatLngs().length;s++){let o=t._getWithoutPts(l.getLatLngs()[s],!0);for(let t=0;t<o.length;t++){let l=L.polyline(L.Util.superMapPointsToLatLngs(o[t]),e);i.push(l)}}}else if(l instanceof L.Polyline){let e={};e=SuperMap.Util.copyAttributes(e,l.options);let o=t._getWithoutPts(l.getLatLngs(),!1);for(let t=0;t<o.length;t++){e.fill=!1;let l=L.polyline(L.Util.superMapPointsToLatLngs(o[t]),e);i.push(l)}}}}return i},_isDot:function(){return this.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL||this.symbolType===SuperMap.Plot.SymbolType.GROUPOBJECT||this.symbolType===SuperMap.Plot.SymbolType.FLAGGROUP||this.symbolType===SuperMap.Plot.SymbolType.ROUTENODE||this.symbolType===SuperMap.Plot.SymbolType.AIRDEPLOYMENT||this.symbolType===SuperMap.Plot.SymbolType.NAVYDEPLOYMENT||this.symbolType===SuperMap.Plot.SymbolType.PICTURE},_resizeOffset:function(t,e,i){var o=L.latLng(0,0);switch(e){case 1:o.lng=t.lng-i.getWest(),o.lat=t.lat-i.getNorth();break;case 3:o.lng=t.lng-i.getEast(),o.lat=t.lat-i.getNorth();break;case 6:o.lng=t.lng-i.getWest(),o.lat=t.lat-i.getSouth();break;case 8:o.lng=t.lng-i.getEast(),o.lat=t.lat-i.getSouth();break;case 2:o.lng=0,o.lat=t.lat-i.getNorth();break;case 4:o.lng=t.lng-i.getWest(),o.lat=0;break;case 5:o.lng=t.lng-i.getEast(),o.lat=0;break;case 7:o.lng=0,o.lat=t.lat-i.getSouth()}return o},_resizeBounds:function(t,e,i){var o=i.getWest(),l=i.getEast(),s=i.getNorth(),n=i.getSouth();switch(e){case 1:s=t.lat,o=t.lng;break;case 3:s=t.lat,l=t.lng;break;case 6:o=t.lng,n=t.lat;break;case 8:l=t.lng,n=t.lat;break;case 2:s=t.lat;break;case 4:o=t.lng;break;case 5:l=t.lng;break;case 7:n=t.lat}var a=new L.LatLngBounds;return a._southWest=L.latLng(n,o),a._northEast=L.latLng(s,l),a},_getHandleCount:function(){switch(this.symbolType){case SuperMap.Plot.SymbolType.ELLIPSESYMBOL:case SuperMap.Plot.SymbolType.CIRCLESYMBOL:case SuperMap.Plot.SymbolType.NEWARCSYMBOL:case SuperMap.Plot.SymbolType.NEWCHORDSYMBOL:case SuperMap.Plot.SymbolType.NEWPIESYMBOL:case SuperMap.Plot.SymbolType.ARCSYMBOL:case SuperMap.Plot.SymbolType.CHORDSYMBOL:case SuperMap.Plot.SymbolType.PIESYMBOL:case SuperMap.Plot.SymbolType.AVOIDREGION:case SuperMap.Plot.SymbolType.LINERELATION:case SuperMap.Plot.SymbolType.SYMBOLTEXT:case SuperMap.Plot.SymbolType.SYMBOLTEXT1:return this.getLatLngs().length+9;default:return 9}},_getHandlePointsByBounds:function(t){if(void 0!==t&&null!==t||(t=this.getBounds()),null!==t){var e=this._map.latLngToLayerPoint(L.latLng(t.getNorth(),t.getEast()));e.x+=5,e.y-=5;var i=this._map.latLngToLayerPoint(L.latLng(t.getNorth(),t.getWest()));i.x-=5,i.y-=5;var o=this._map.latLngToLayerPoint(L.latLng(t.getSouth(),t.getEast()));o.x+=5,o.y+=5;var l=this._map.latLngToLayerPoint(L.latLng(t.getSouth(),t.getWest()));l.x-=5,l.y+=5;for(var s=L.point((e.x+i.x)/2,e.y),n=L.point(e.x,(e.y+o.y)/2),a=L.point((o.x+l.x)/2,o.y),r=L.point(i.x,(i.y+l.y)/2),p=this._map.layerPointToLatLng(e),u=this._map.layerPointToLatLng(i),h=this._map.layerPointToLatLng(o),g=this._map.layerPointToLatLng(l),c=this._map.layerPointToLatLng(n),y=this._map.layerPointToLatLng(a),P=this._map.layerPointToLatLng(r),S=this._map.layerPointToLatLng(s),d=[u.clone(),S.clone(),p.clone(),P.clone(),c.clone(),g.clone(),y.clone(),h.clone()],m=1,f=0;f<d.length;f++)d[f].nHandle=m++;return d}},_getHandleAndRotatePoints:function(){var t={handlePoints:[],rotatePoints:[]},e=this.getBounds();if(!e.isValid())return t;if(this._getHandleCount()>9){if(this.symbolType===SuperMap.Plot.SymbolType.REGULARPOLYGON)t.handlePoints.push(this.getLatLngs()[0].clone()),t.handlePoints.push(this.getLatLngs()[this.getLatLngs().length-1].clone());else if(t.handlePoints=L.Util.cloneLatLngs(this.getLatLngs()),3801===this.code||4401===this.code||3701===this.code){var i=this.components[0]._latlngs;i.length>1?t.handlePoints[2]=i[1]:t.handlePoints[2]=i[0][1]}}else t.handlePoints=this._getHandlePointsByBounds(e);for(var o=0;o<t.handlePoints.length;o++)t.handlePoints[o].tag=o;if(!0===this.getLocked())return t;var l=15;if(L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&(l=20),this.symbolType!==SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL&&this.symbolType!==SuperMap.Plot.SymbolType.LINERELATION&&this.symbolType!==SuperMap.Plot.SymbolType.SYMBOLTEXT&&this.symbolType!==SuperMap.Plot.SymbolType.SYMBOLTEXT1&&this.symbolType!==SuperMap.Plot.SymbolType.SYMBOLTEXTBOX&&this.symbolType!==SuperMap.Plot.SymbolType.LINEMARKING&&this.symbolType!==SuperMap.Plot.SymbolType.ANNOFRAMESYMBOLM&&this.symbolType!==SuperMap.Plot.SymbolType.ROUTENODE&&this.symbolType!==SuperMap.Plot.SymbolType.LITERATESIGN&&this.symbolType!==SuperMap.Plot.SymbolType.SATELLITE&&this.symbolType!==SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS&&this.symbolType!==SuperMap.Plot.SymbolType.AVOIDREGION&&this.symbolType!==SuperMap.Plot.SymbolType.NAVYDEPLOYMENT&&this.symbolType!==SuperMap.Plot.SymbolType.RECTANGLESYMBOL&&this.symbolType!==SuperMap.Plot.SymbolType.AIRDEPLOYMENT){var s=this._map.latLngToLayerPoint(L.latLng(e.getNorth(),e.getEast())),n=L.point(s.x+l,s.y-l),a=this._map.layerPointToLatLng(n);a.isRotatePoint=!0,t.rotatePoints=[a]}return t},_parseSymbolData:function(){if(null!==this.symbolData){if(this.libID=parseInt(this.symbolData.libID),this.code=parseInt(this.symbolData.code),this.symbolType=this.symbolData.symbolType,this.symbolName=this.symbolData.symbolName,this.textContent=this.symbolData.textContent,void 0!==this.symbolData.dScale?this.dScale=this.symbolData.dScale:this.dScale=this.symbolData.scale2D.x,void 0!==this.symbolData.dRotate?this.dRotate=this.symbolData.dRotate:this.dRotate=this.symbolData.rotate2D.x,void 0!==this.symbolData.uuid&&(this.uuid=this.symbolData.uuid),void 0!==this.symbolData.associatedUuid&&(this.associatedUuid=this.symbolData.associatedUuid),void 0!==this.symbolData.annotationPosition&&(this.annotationPosition=this.symbolData.annotationPosition),void 0!==this.symbolData.isLocked&&(this.isLocked=this.symbolData.isLocked),void 0!==this.symbolData.note&&(this.note=this.symbolData.note),void 0!==this.symbolData.custom&&(this.custom=this.symbolData.custom),this.symbolData.extendProperty)for(let e=0;e<this.symbolData.extendProperty.length;e++){var t=this.symbolData.extendProperty[e];this.extendProperty.addProperty(t.key,t.value)}if(Object.prototype.hasOwnProperty.call(this.symbolData,"subSymbols")&&this.symbolData.subSymbols&&0!==this.symbolData.subSymbols.length){this.subSymbols=[];for(let t=0;t<this.symbolData.subSymbols.length;t++){var e=this.symbolData.subSymbols[t].libID;void 0===e&&(e=this.libID);var i=this.symbolData.subSymbols[t].code;if(void 0!==i){var o={};void 0!==this.symbolData.subSymbols[t]&&(o.symbolData=this.symbolData.subSymbols[t].symbolData),void 0!==this.symbolData.subSymbols[t].textContent&&(o.textContent=this.symbolData.subSymbols[t].textContent),void 0!==this.symbolData.subSymbols[t].totalNum&&(o.totalNum=this.symbolData.subSymbols[t].totalNum),this.subSymbols.push(new SuperMap.Plot.SubSymbol(e,i,o))}}}if(this.symbolData.avoidRegions&&0!==this.symbolData.avoidRegions.length)for(let t=0;t<this.symbolData.avoidRegions.length;t++){let e={libID:0,code:SuperMap.Plot.SymbolType.AVOIDREGION,map:this._map,symbolData:this.symbolData.avoidRegions[t][0]};var l=L.supermap.plotting.avoidRegion(0,SuperMap.Plot.SymbolType.AVOIDREGION,[],e);l.style=SuperMap.Plot.AnalysisSymbol.getStyle(this.symbolData.avoidRegions[t][1],!0),this.avoidRegions.push(l)}}},_setSymbolData:function(t){if(void 0===t&&(t=!0),null===this.symbolData&&(this.symbolData={}),Object.prototype.hasOwnProperty.call(this.symbolData,"type")||(this.symbolData.type="GRAPHICOBJECT"),Object.prototype.hasOwnProperty.call(this.symbolData,"rotate2D")?this.symbolData.rotate2D.x=this.dRotate:this.symbolData.rotate2D={x:this.dRotate,y:0,z:0},Object.prototype.hasOwnProperty.call(this.symbolData,"scale2D")?this.symbolData.scale2D.x=this.dScale:this.symbolData.scale2D={x:this.dScale,y:0,z:0},this.symbolData.libID=this.libID,this.symbolData.code=this.code,this.symbolData.isEdit=!0,this.symbolData.uuid=this.uuid,this.symbolData.symbolType=this.symbolType,this.symbolData.symbolName=this.symbolName,this.symbolData.associatedUuid=this.associatedUuid,this.symbolData.annotationPosition=this.annotationPosition,this.symbolData.textContent=this.textContent,this.symbolData.isLocked=this.isLocked,this.symbolData.note=this.note,this.symbolData.custom=this.custom,this.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL&&this.symbolType!==SuperMap.Plot.SymbolType.GROUPOBJECT){this.symbolData.subSymbols=[];for(let i=0;i<this.getSubSymbols().length;i++){var e=this.getSubSymbols()[i];t?this.symbolData.subSymbols.push({libID:e.libID,code:e.code,symbolData:e.symbolData,textContent:e.textContent,totalNum:e.totalNum}):this.symbolData.subSymbols.push({libID:e.libID,code:e.code,textContent:e.textContent,totalNum:e.totalNum})}}this.symbolData.extendProperty=[];var i=this.getExtendProperty().getPropertyCount();for(let t=0;t<i;t++){var o=this.getExtendProperty().getPropertyByIndex(t);this.symbolData.extendProperty.push({key:o.key,value:o.value})}this.symbolData.avoidRegions=[];for(let t=0;t<this.avoidRegions.length;t++){var l={};SuperMap.Plot.AnalysisSymbol.setStyle(this.avoidRegions[t].style,l,!0),this.symbolData.avoidRegions.push([this.avoidRegions[t].getSymbolData(),l])}},_getSymbolWayType:function(){return 22===this.libID&&1016===this.code?0===this.getArrowBodyType()?SuperMap.Plot.AddPoint_WayType.POLYLINE:SuperMap.Plot.AddPoint_WayType.CURVE:SuperMap.Plot.AlgoSymbolFactory.getSymbolWayType(this.libID,this.code)},_reView:function(){},_mergeDefaultStyle:function(){var t=L.supermap.plotting.getControl(this._map,this.serverUrl).getDefaultStyle();if(t&&!0===t.defaultFlag&&!1===this.isEdit){if(this.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL){if(-1!==t.dotSymbolSize){var e=this.symbolSizeInLib.w;if(this.symbolSizeInLib.h>this.symbolSizeInLib.w&&(e=this.symbolSizeInLib.h),0===e||0===t.dotSymbolSize)0!==this.symbolSize.w&&0!==this.symbolSize.h||(this.symbolSize.w=this.symbolSizeInLib.w,this.symbolSize.h=this.symbolSizeInLib.h);else{var i=t.dotSymbolSize/e;this.symbolSize.w=i*this.symbolSizeInLib.w,this.symbolSize.h=i*this.symbolSizeInLib.h}}-1!==t.dotTextSpace&&(this.space=t.dotTextSpace),-1!==t.flagTextSize&&(this.flagTextSize=t.flagTextSize)}this.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&(null!=t.maxScale&&(this.maxScale=t.maxScale),null!=t.minScale&&(this.minScale=t.minScale)),-1!==t.scaleByMap&&(this.scaleByMap=t.scaleByMap)}},_removeRedundancySymbolData:function(t){null!==t&&(Object.prototype.hasOwnProperty.call(t,"center")&&delete t.center,Object.prototype.hasOwnProperty.call(t,"id")&&delete t.id,Object.prototype.hasOwnProperty.call(t,"parts")&&delete t.parts,Object.prototype.hasOwnProperty.call(t,"points")&&delete t.points,Object.prototype.hasOwnProperty.call(t,"position")&&delete t.position,Object.prototype.hasOwnProperty.call(t,"prjCoordSys")&&delete t.prjCoordSys,Object.prototype.hasOwnProperty.call(t,"rotationX")&&delete t.rotationX,Object.prototype.hasOwnProperty.call(t,"rotationY")&&delete t.rotationY,Object.prototype.hasOwnProperty.call(t,"rotationZ")&&delete t.rotationZ,Object.prototype.hasOwnProperty.call(t,"scaleX")&&delete t.scaleX,Object.prototype.hasOwnProperty.call(t,"scaleY")&&delete t.scaleY,Object.prototype.hasOwnProperty.call(t,"scaleZ")&&delete t.scaleZ)},destroy:function(){this.layer.removeFeatures(this)},updateByGeoJson(t){t.isEdit=!0,SuperMap.Plot.AnalysisSymbol.parseSymbolData(this,t,!0),this.redraw(),this.isSelected&&"none"!==this.style.display&&(this.fire(SuperMap.Plot.Event.reseteditmarkersvalues),this._map.getPlotEditControl().fire(SuperMap.Plot.Event.updateFeature,{feature:this}))},toGeoJsonStr:function(){return this.getSymbolData(),SuperMap.Plot.PlottingUtil.toJSON(this.symbolData)}});L.supermap.plotting.PlottingObject=d,d.prototype._containsPoint=function(t){if(this.symbolType!==SuperMap.Plot.SymbolType.TEXTSYMBOL)return!1;for(var e in this.components)if(this.components[e]._containsPoint(t))return!0;return!1},L.supermap.plotting.PlottingObject.createSymbol=function(t,e,i,o,l,s){o||(o={}),o.custom=s;var n=null;if(o&&o.symbolData&&o.symbolData.textStyle2D&&void 0===o.symbolData.textStyle2D.sizeFixed&&(o.symbolData.textStyle2D.sizeFixed=!0),null==i||SuperMap.Util.isArray(i)||(i=[i]),0===t)switch(e){case SuperMap.Plot.SymbolType.ARCREGION:n=L.supermap.plotting.arcRegion(t,e,i,o);break;case SuperMap.Plot.SymbolType.MISSILEROUTE:n=L.supermap.plotting.missileRoute(t,e,i,o);break;case SuperMap.Plot.SymbolType.NAVYROUTE:n=L.supermap.plotting.navyRoute(t,e,i,o);break;case SuperMap.Plot.SymbolType.AIRROUTE:n=L.supermap.plotting.airRoute(t,e,i,o);break;case SuperMap.Plot.SymbolType.LITERATESIGN:n=L.supermap.plotting.literateSign(t,e,i,o);break;case SuperMap.Plot.SymbolType.ROUTENODE:n=L.supermap.plotting.routeNode(t,e,i,o);break;case SuperMap.Plot.SymbolType.PATHTEXT:n=L.supermap.plotting.pathText(t,e,i,o);break;case SuperMap.Plot.SymbolType.FREECURVE:n=L.supermap.plotting.freeCurve(t,e,i,o);break;case SuperMap.Plot.SymbolType.LINERELATION:n=L.supermap.plotting.lineRelation(t,e,i,o);break;case SuperMap.Plot.SymbolType.GROUPOBJECT:n=L.supermap.plotting.groupObject(t,e,i,o);break;case SuperMap.Plot.SymbolType.INTERFERENCEBEAM:n=L.supermap.plotting.interferenceBeam(t,e,i,o);break;case SuperMap.Plot.SymbolType.SATELLITE:n=L.supermap.plotting.satellite(t,e,i,o);break;case SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS:n=L.supermap.plotting.satelliteTimeWindows(t,e,i,o);break;case SuperMap.Plot.SymbolType.SYMBOLTEXT:n=L.supermap.plotting.symbolText(t,e,i,o);break;case SuperMap.Plot.SymbolType.SYMBOLTEXT1:n=L.supermap.plotting.symbolText1(t,e,i,o);break;case SuperMap.Plot.SymbolType.FLAGGROUP:n=L.supermap.plotting.flagGroup(t,e,i,o);break;case SuperMap.Plot.SymbolType.NAVYDEPLOYMENT:n=L.supermap.plotting.navyDeployment(t,e,i,o);break;case SuperMap.Plot.SymbolType.AIRDEPLOYMENT:n=L.supermap.plotting.airDeployment(t,e,i,o);break;case SuperMap.Plot.SymbolType.AVOIDREGION:return L.supermap.plotting.avoidRegion(t,e,i,o);case SuperMap.Plot.SymbolType.PICTURE:n=L.supermap.plotting.picture(t,e,i,o);break;default:n=L.supermap.plotting.algoSymbol(t,e,i,o)}else n=o.symbolData&&o.symbolData.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL?L.supermap.plotting.dotSymbol(t,e,i,o):L.supermap.plotting.algoSymbol(t,e,i,o);var a=L.supermap.plotting.getControl().getDefaultStyle();return SuperMap.Plot.AnalysisSymbol.mergeDefaultStyleToFeature(n,a,!0),l&&SuperMap.Util.extend(n.style,l),null!=i&&i.length>0&&(i.length>n.maxEditPts&&(i=i.slice(0,n.maxEditPts)),n.latLngs=L.Util.cloneLatLngs(i)),n};var m=d.extend({subObjects:[],initialize:function(t,e,i,o){this.subObjects=[],this.symbolName="组合对象",this.libID=0,this.code=SuperMap.Plot.SymbolType.GROUPOBJECT,this.symbolType=SuperMap.Plot.SymbolType.GROUPOBJECT,d.prototype.initialize.call(this,t,e,i,o)},_addComponents:function(t){d.prototype._addComponents.call(this,t),t.layer=this.layer,t.isEdit=!0,A&&(t.dragging||(t.dragging=new A(t))),null===t.fromZoom&&(t.fromZoom=this._map.getZoom()),this._map&&this._map.getPlotEditControl()&&t.enableEdit&&this._map.getPlotEditControl().enableEditFeatures(t)},_clearComponents:function(){this._map&&this._map.getPlotEditControl()&&this._map.getPlotEditControl().disableEditFeatures(this.components),d.prototype._clearComponents.call(this)},_reView:function(){for(var t in this.components)this.components[t]._reView();this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},move:function(t,e){for(var i in this.subObjects)this.subObjects[i].move(t,e);this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},redraw:function(){if("none"===this.style.display||null!=this.layer&&"function"==typeof this.layer.getVisibility&&!1===this.layer.getVisibility())this._clearComponents();else if(0!==this.subObjects.length&&0===this.components.length)for(var t=0,e=this.subObjects.length;t<e;t++)void 0!==this.subObjects[t].layer&&this.subObjects[t].layer.removeFeatures(this.subObjects[t]),this.subObjects[t].ownerGroup=this,this.subObjects[t].enableEdit=!0,this._addComponents(this.subObjects[t])},setRotate:function(t){null===this.anchorPoint&&(this.anchorPoint=this.getBounds().getCenter()),this._rotate(t,this.anchorPoint),this.dRotate=t,this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},setScale:function(t){null===this.anchorPoint&&(this.anchorPoint=this.getBounds().getCenter()),this._resize(t/this.dScale,this.anchorPoint),this.dScale=t,this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},_unGroupObject:function(){var t=null;if(0!==this.subObjects.length){t=this.subObjects.slice(),this._clearComponents();for(var e=0,i=t.length;e<i;e++)this.layer.addFeatures(t[e]),t[e].ownerGroup=null}return t},removeComponents:function(t){SuperMap.Util.isArray(t)||(t=[t]);for(var e=[],i=0;i<t.length;i++){this.subObjects.splice(SuperMap.Util.indexOf(this.subObjects,t[i]),1);var o=SuperMap.Util.indexOf(this.components,t[i]);-1!==o&&(this.components[o]._clearComponents(),this.components.splice(o,1)),e.push(t[i])}for(var l=0;l<e.length;l++)e[l].addTo(this._map),e[l].ownerGroup=null;return e},setStyle:function(t){for(var e in SuperMap.Util.extend(this.style,t),this.components)this.components[e].symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL&&(t.labelAlign=this.components[e].style.labelAlign),this.components[e].setStyle(t)},_parseSymbolData:function(){if(null!==this.symbolData&&(d.prototype._parseSymbolData.call(this),this.symbolData&&this.symbolData.subFeatures)){for(var t=[],e=0;e<this.symbolData.subFeatures.length;e++){var i=this.symbolData.subFeatures[e];i.uuid=SuperMap.Plot.PlottingUtil.generateUuid();var o=L.supermap.plotting.PlottingObject.createSymbol(i.libID,i.code,null,{symbolData:i});t.push(o)}this.subObjects=t}},_setSymbolData:function(){if(d.prototype._setSymbolData.call(this),this.symbolData){this.symbolData.subFeatures=[];for(var t=0;t<this.subObjects.length;t++)this.symbolData.subFeatures.push(this.subObjects[t].getSymbolData())}},_rotate:function(t,e){for(var i=0;i<this.components.length;i++)this.components[i]._rotate(t,e)},_resize:function(t,e){for(var i=0;i<this.components.length;i++)this.components[i]instanceof m?this.components[i]._resize(t,e):0!==this.components[i].avoidRegions.length?(this.components[i]._resize(t,this.anchorPoint),this.components[i].redraw()):this.components[i]._resize(t,this.anchorPoint)},destroy:function(){d.prototype.destroy.call(this),this.subObjects=[]}});L.supermap.plotting.groupObject=function(t,e,i,o){return new m(t,e,i,o)},L.supermap.plotting.GroupObject=m;var f={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},M={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"};function b(t,e){var i=t.x-e.x,o=t.y-e.y;return Math.sqrt(i*i+o*o)}var A=L.Handler.extend({statics:{DRAGGING_CLS:"leaflet-plottingObject-draggable"},initialize:function(t){this._plottingObject=t,this._startPoint=null,this._dragStartPoint=null,this._mapDraggingWasEnabled=!1,this.moveIcon=L.divIcon({className:"leaflet-supermap-plot-move-icon-path",iconSize:[30,30]}),this.moveMarker=null},addHooks:function(){if(L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()){let t=this._plottingObject.getBounds();this.moveMarker=L.marker(t.getCenter(),{icon:this.moveIcon}),this._addToMapAndBindMarker(this.moveMarker),this._plottingObject.on("reseteditmarkersvalues",this._onResetEditMarkersValues,this)}else this._plottingObject.on("mousedown",this._onDragStart,this),this._plottingObject.options.className=this._plottingObject.options.className?this._plottingObject.options.className+" "+A.DRAGGING_CLS:A.DRAGGING_CLS,this._plottingObject._plottingObject&&L.DomUtil.addClass(this._plottingObject._plottingObject,A.DRAGGING_CLS);this._mapDraggingWasEnabled=this._plottingObject._map.dragging.enabled(),this._plottingObject._map.dragging.disable()},removeHooks:function(){L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()?(this._unbindMarkerEvents(this.moveMarker),this._plottingObject._map.removeLayer(this.moveMarker),this._plottingObject.off("reseteditmarkersvalues",this._onResetEditMarkersValues,this)):(this._plottingObject.off("mousedown",this._onDragStart,this),this._plottingObject.options.className=this._plottingObject.options.className.replace(new RegExp("\\s+"+A.DRAGGING_CLS),""),this._plottingObject._plottingObject&&L.DomUtil.removeClass(this._plottingObject._plottingObject,A.DRAGGING_CLS)),this._mapDraggingWasEnabled&&this._plottingObject._map.dragging.enable()},moved:function(){return this._plottingObject._dragMoved},_onDragStart:function(t){var e=t.originalEvent._simulated?"touchstart":t.originalEvent.type;this._startPoint=t.latlng.clone(),this._dragStartPoint=t.latlng.clone(),L.DomEvent.stop(t.originalEvent),L.DomEvent.on(document,M[e],this._onDrag,this).on(document,f[e],this._onDragEnd,this),this._plottingObject._dragMoved=!1},_onDrag:function(t){var e=t.touches&&t.touches.length>=1?t.touches[0]:t,i=this._plottingObject._map.mouseEventToLatLng(e);if("touchmove"===t.type&&!this._plottingObject._dragMoved){var o=this._plottingObject._map.latLngToLayerPoint(this._dragStartPoint),l=this._plottingObject._map.mouseEventToContainerPoint(e);if(o.distanceTo(l)<=this._plottingObject._map.options.tapTolerance)return}var s=i.lat,n=i.lng,a=s-this._startPoint.lat,r=n-this._startPoint.lng;(a||r)&&(this._plottingObject._dragMoved||(this._plottingObject._dragMoved=!0,this._plottingObject.fire("dragstart",t)),this._startPoint.lat=s,this._startPoint.lng=n,this._plottingObject.fire("predrag",t),t.dLat=a,t.dLng=r,this._plottingObject.fire("drag",t))},_onDragEnd:function(t){var e=this._plottingObject._map.mouseEventToLatLng(t),i=this.moved();if(i&&L.DomEvent.stop(t),L.DomEvent.off(document,"mousemove touchmove",this._onDrag,this),L.DomEvent.off(document,"mouseup touchend",this._onDragEnd,this),i){this._plottingObject.fire("dragend",{distance:b(this._dragStartPoint,e)});var o=this._plottingObject._containsPoint;this._plottingObject._containsPoint=L.Util.falseFn,L.Util.requestAnimFrame(function(){this._plottingObject._containsPoint=o},this)}this._startPoint=null,this._dragStartPoint=null,this._plottingObject._dragMoved=!1,i&&(this._plottingObject.moveend=!0)},_dragStart:function(t){this._startPoint=t.target._latlng.clone(),this._dragStartPoint=t.target._latlng.clone(),this._plottingObject._dragMoved=!1},_drag:function(t){var e=t.target._latlng,i=e.lat,o=e.lng,l=i-this._startPoint.lat,s=o-this._startPoint.lng;(l||s)&&(this._plottingObject._dragMoved||(this._plottingObject._dragMoved=!0,this._plottingObject.fire("dragstart",t)),this._startPoint.lat=i,this._startPoint.lng=o,this._plottingObject.fire("predrag",t),t.dLat=l,t.dLng=s,this._plottingObject.fire("drag",t))},_dragEnd:function(t){var e=t.target._latlng,i=this.moved();if(i){this._plottingObject.fire("dragend",{distance:b(this._dragStartPoint,e)});var o=this._plottingObject._containsPoint;this._plottingObject._containsPoint=L.Util.falseFn,L.Util.requestAnimFrame(function(){this._plottingObject._containsPoint=o},this)}this._startPoint=null,this._dragStartPoint=null,this._plottingObject._dragMoved=!1,i&&(this._plottingObject.moveend=!0)},_addToMapAndBindMarker:function(t){t.addTo(this._plottingObject._map),t.on("dragstart",this._dragStart,this),t.on("drag",this._drag,this),t.on("dragend",this._dragEnd,this),t.dragging.enable()},_unbindMarkerEvents:function(t){null!=t&&(t.off("dragstart",this._dragStart,this),t.off("drag",this._drag,this),t.off("dragend",this._dragEnd,this),t.dragging.disable())},_onResetEditMarkersValues:function(){let t=this._plottingObject.getBounds();this.moveMarker._latlng=t.getCenter(),this.moveMarker.update()}}),T=d.extend({surroundLineType:null,scaleByMap:null,latLngs:[],initialize:function(t,e,i,o){this.geoSymbolTexts=[],this.subAssociatedUuids=[],this.latLngs=i||[],d.prototype.initialize.call(this,t,e,i,o),null===this.surroundLineType&&(this.surroundLineType=SuperMap.Plot.AlgoSurroundLineType.NONE)},destroy:function(){d.prototype.destroy.call(this),this.surroundLineType=null,this.scaleByMap=null,this.latLngs=[]},setLatLngs:function(t){return this.latLngs=t,this.redraw()},getLatLngs:function(){return this.latLngs},addLatLng:function(t){if(this.latLngs[this.latLngs.length-1].lat!==t.lat||this.latLngs[this.latLngs.length-1].lng!==t.lng)return this.latLngs.push(t),this.redraw()},setScaleByMap:function(t){this.scaleByMap=t,this.redraw()},getScaleByMap:function(){return this.scaleByMap},getSurroundLineType:function(){return this.surroundLineType},setSurroundLineType:function(){},_resizeLatLngs:function(t,e,i,o){if(this.symbolType!==SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS){var l=this._resizeBounds(t,e,i);if(!(SuperMap.Plot.PlottingUtil.equalFuzzy(l.getWest(),l.getEast())&&SuperMap.Plot.PlottingUtil.equalFuzzy(l.getNorth(),l.getSouth())||SuperMap.Plot.PlottingUtil.equalFuzzy(i.getWest(),i.getEast())&&SuperMap.Plot.PlottingUtil.equalFuzzy(i.getNorth(),i.getSouth()))){var s=SuperMap.Plot.PlottingUtil.equalFuzzy(i.getWest(),i.getEast())?0:(l.getEast()-l.getWest())/(i.getEast()-i.getWest()),n=SuperMap.Plot.PlottingUtil.equalFuzzy(i.getNorth(),i.getSouth())?0:(l.getNorth()-l.getSouth())/(i.getNorth()-i.getSouth()),a=L.latLng((i.getNorth()+i.getSouth())/2,(i.getWest()+i.getEast())/2),r=L.latLng((l.getNorth()+l.getSouth())/2,(l.getWest()+l.getEast())/2);if(this.symbolType===SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL||this.symbolType===SuperMap.Plot.SymbolType.ANNOFRAMESYMBOLM||this.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXTBOX||this.symbolType===SuperMap.Plot.SymbolType.LINEMARKING)this.latLngs[0].lng=r.lng+(o[0].lng-a.lng)*s,this.latLngs[0].lat=r.lat+(o[0].lat-a.lat)*n,this.latLngs[1].lng=r.lng+(o[1].lng-a.lng)*s,this.latLngs[1].lat=r.lat+(o[1].lat-a.lat)*n;else if(this.symbolType===SuperMap.Plot.SymbolType.CONCENTRICCIRCLE)if(2===e||4===e||5===e||7===e){1===s&&(s=0),1===n&&(n=0);let t=Math.sqrt(s*s+n*n),e=L.Util.latLngsToSuperMapPoints(o);for(let i=1;i<e.length;i++)e[i]=SuperMap.Plot.PlottingUtil.findPointInLine(e[0],e[i],SuperMap.Plot.PlottingUtil.distance(e[0],e[i])*t);this.latLngs=L.Util.superMapPointsToLatLngs(e)}else{let t=Math.sqrt(s*s+n*n)/Math.sqrt(2),e=L.Util.latLngsToSuperMapPoints(o);for(let i=1;i<e.length;i++)e[i]=SuperMap.Plot.PlottingUtil.findPointInLine(e[0],e[i],SuperMap.Plot.PlottingUtil.distance(e[0],e[i])*t);this.latLngs=L.Util.superMapPointsToLatLngs(e)}else for(let t=0;t<o.length;t++)this.latLngs[t].lng=r.lng+(o[t].lng-a.lng)*s,this.latLngs[t].lat=r.lat+(o[t].lat-a.lat)*n}}},_getLatLng:function(t,e,i){var o=0,l=0;switch(t){case 1:o=e.getWest()+i.lng,l=e.getNorth()+i.lat;break;case 3:o=e.getEast()+i.lng,l=e.getNorth()+i.lat;break;case 6:o=e.getWest()+i.lng,l=e.getSouth()+i.lat;break;case 8:o=e.getEast()+i.lng,l=e.getSouth()+i.lat;break;case 2:o=(e.getEast()+e.getWest())/2,l=e.getNorth()+i.lat;break;case 4:o=e.getWest()+i.lng,l=(e.getNorth()+e.getSouth())/2;break;case 5:o=e.getEast()+i.lng,l=(e.getNorth()+e.getSouth())/2;break;case 7:o=(e.getEast()+e.getWest())/2,l=e.getSouth()+i.lat}return L.latLng(l,o)},_setSymbolData:function(t){if(d.prototype._setSymbolData.call(this,t),this.symbolData){SuperMap.Plot.AnalysisSymbol.setStyle(this.style,this.symbolData,!0),this.symbolData.scaleByMap=this.scaleByMap,this.symbolData.surroundLineType=this.surroundLineType,this.symbolData.algoMaxEditPts=this.maxEditPts,this.symbolData.algoMinEditPts=this.minEditPts,Object.prototype.hasOwnProperty.call(this.symbolData,"localePoints")||(this.symbolData.localePoints=[]);for(var e=this.getLatLngs().length,i=0;i<e;i++)this.symbolData.localePoints.length>i?(this.symbolData.localePoints[i].x=this.getLatLngs()[i].lng,this.symbolData.localePoints[i].y=this.getLatLngs()[i].lat):this.symbolData.localePoints.push({x:this.getLatLngs()[i].lng,y:this.getLatLngs()[i].lat,z:0})}},_parseSymbolData:function(){if(d.prototype._parseSymbolData.call(this),null!==this.symbolData&&(this.style=SuperMap.Plot.AnalysisSymbol.getStyle(this.symbolData,!0),this.maxEditPts=this.symbolData.algoMaxEditPts,this.minEditPts=this.symbolData.algoMinEditPts,void 0!==this.symbolData.isEdit&&(this.isEdit=this.symbolData.isEdit),void 0!==this.symbolData.scaleByMap&&(this.scaleByMap=this.symbolData.scaleByMap),this.surroundLineType=this.symbolData.surroundLineType,this.symbolData.localePoints)){this.latLngs=[];for(var t=0;t<this.symbolData.localePoints.length;t++)this.latLngs.push(L.latLng(this.symbolData.localePoints[t].y,this.symbolData.localePoints[t].x))}},_modifyPoint:function(){},_transSymbolCellsToLayers:function(t){var e=[],i="";null!==this._map&&this._map instanceof L.Map&&(i=this._map.options.crs.code);for(let l=0;l<t.length;l++)if(0!==this.surroundLineType||!0!==t[l].surroundLineFlag){L.Util.isMercatorProjection(i)&&(t[l].positionPoints=L.Util.conventProjectPts(L.Util.superMapPointsToLatLngs(t[l].positionPoints)));var o={type:t[l].type,positionPoints:SuperMap.Plot.PlottingUtil.clonePoints(t[l].positionPoints),style:SuperMap.Util.cloneObject(t[l].style),angle:t[l].angle,isCalculate:t[l].isCalculate,textContent:t[l].textContent};1===this.symbolType?o.positionPoints=SuperMap.Plot.Primitives.getSpatialData(o.type,o.positionPoints,o.angle,!1):o.positionPoints=SuperMap.Plot.Primitives.getSpatialData(o.type,o.positionPoints,o.angle,o.isCalculate),e.push(o)}0!==e.length&&this._addSurroundLineCells(e);for(let t=0;t<e.length;t++)L.Util.isMercatorProjection(i)?e[t].positionPoints=L.Util.unConventProjectPts(e[t].positionPoints):e[t].positionPoints=L.Util.superMapPointsToLatLngs(e[t].positionPoints),this._createAndDrawLayer(e[t].type,e[t].positionPoints,e[t].style,e[t].textContent)},_isPolylineType:function(t){switch(t){case 24:case 44:case 48:case 290:case 400:case 590:return!0;default:return!1}},_createAndDrawLayer:function(t,e,i,o,l){var s=this._createLayer(t,e,o,l);2e3===t&&this._addComponents(s),null==i&&(i={}),this._isPolylineType(t)&&(i.fillLimit=!0,i.fill=!1);var n={};if(n=SuperMap.Util.copyAttributes(n,i),this._copyStyleForCell(n,this.style,s),34===t&&!1===i.sizeFixed){var a=this._map.latLngToLayerPoint(e[0]),r=this._map.latLngToLayerPoint(L.latLng(e[0].lat+n.fontSize,e[0].lng));n.fontSize=Math.abs(r.y-a.y)}else if(this.scaleByMap){var p=1;if("function"==typeof this.layer.getSymZoomScale&&(p=this.layer.getSymZoomScale()),null!=this.minScale&&p<this.minScale?p=this.minScale:null!=this.maxScale&&p>this.maxScale&&(p=this.maxScale),null!=n.fontSize&&(n.fontSize=n.fontSize*p),null!=n.fontSpace&&(n.fontSpace=n.fontSpace*p),null!=n.weight&&(n.weight=n.weight*p),null!=n.dashArray){let t=n.dashArray.split(",");for(let e=0;e<t.length;e++)t[e]=parseInt(t[e])*p;n.dashArray=t.join()}n.surroundLineWidth&&(n.surroundLineWidth=this.style.surroundLineWidth*p)}return L.setOptions(s,n),2e3===t?s.redraw():this._addComponents(s),s},_createLayer:function(t,e,i,o){var l=null;switch(t){case 24:case 44:case 48:case 290:case 400:case 590:l=L.polyline(e,{smoothFactor:0});break;case 29:case 31:case 32:case 28:case 410:case 370:case 380:case 390:case 320:case 321:case 350:case 360:l=L.polygon(e,{smoothFactor:0});break;case 26:l=L.rectangle(e);break;case 34:l=L.supermap.plotting.text(e,{text:i});break;case 2e3:l=L.circle(e[0],o)}return l},_addSurroundLineCells:function(t){if(this.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL){if(this.symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL)return null;if(this._map){var e=[],i=[],o={},l={},s={},n={},a=this.surroundLineType===SuperMap.Plot.AlgoSurroundLineType.OUT?1:-1,r=1;this.scaleByMap&&("function"==typeof this.layer.getSymZoomScale&&(r=this.layer.getSymZoomScale()),null!=this.minScale&&r<this.minScale&&(r=this.minScale),null!=this.maxScale&&r>this.maxScale&&(r=this.maxScale));for(var p=0,u=t.length;p<u;p++)if((!t[p].style.lineWidthLimit||0!==t[p].style.weight)&&((o=SuperMap.Util.cloneObject(t[p].style)).surroundLineFlag=!0,o.fill=!1,o.fillLimit=!0,o.fillColorLimit=!0,!0!==t[p].style.surroundLineLimit?t[p].style.surroundLineType=this.surroundLineType:void 0===t[p].style.surroundLineType&&(t[p].style.surroundLineType=SuperMap.Plot.AlgoSurroundLineType.NONE),t[p].style.surroundLineType!==SuperMap.Plot.AlgoSurroundLineType.NONE&&t[p].type!==SuperMap.Plot.SymbolType.TEXTSYMBOL&&0!==t[p].positionPoints.length)){if(t[p].style.surroundLineType===SuperMap.Plot.AlgoSurroundLineType.INNER||t[p].style.surroundLineType===SuperMap.Plot.AlgoSurroundLineType.OUT){var h=this.style.surroundLineWidth/2+this.style.weight/2;!0===t[p].style.surroundLineLimit&&!0===t[p].style.lineWidthLimit?h=t[p].style.surroundLineWidth/2+t[p].style.weight/2:!0===t[p].style.surroundLineLimit&&!0!==t[p].style.lineWidthLimit?h=t[p].style.surroundLineWidth/2+this.style.weight/2:!0!==t[p].style.surroundLineLimit&&!0===t[p].style.lineWidthLimit&&(h=this.style.surroundLineWidth/2+t[p].style.weight/2);var g=this._map.layerPointToLatLng(L.point(0,0)),c=this._map.layerPointToLatLng(L.point(h*r,0)),y=new SuperMap.Geometry.Point(g.lng,g.lat),P=new SuperMap.Geometry.Point(c.lng,c.lat),S=SuperMap.Plot.PlottingUtil.distance(y,P),d=1;(SuperMapAlgoPlot.AlgoSymbolFactory.calSurroundLineDir(this.libID,this.code)||32===t[p].type||29===t[p].type||31===t[p].type||26===t[p].type||44===t[p].type)&&(d=SuperMap.Plot.PlottingUtil.innerOutlineDir(t[p].positionPoints));var m=d*a*S;if(this._isPolylineType(t[p].type)||t[p].positionPoints.push(t[p].positionPoints[0]),0===(e=SuperMap.Plot.PlottingUtil.getSurroundLinePts(t[p].positionPoints,m)).length)continue;l={type:t[p].type,positionPoints:e,style:o},t.splice(++p,0,l),++u}if(t[p].style.surroundLineType===SuperMap.Plot.AlgoSurroundLineType.ALL){if(0===(e=SuperMap.Plot.PlottingUtil.clonePoints(t[p].positionPoints)).length)continue;if(l={type:t[p].type,positionPoints:e,style:o},t.splice(++p,0,l),++u,0===(i=SuperMap.Plot.PlottingUtil.clonePoints(t[p].positionPoints)).length)continue;delete(n=SuperMap.Util.copyAttributes(n,this.style)).fillSymbolID,n.surroundLineFlag=!1,n.fill=!1,n.fillLimit=!0,n.fillColorLimit=!0,s={type:t[p].type,positionPoints:i,style:n},t.splice(++p,0,s),++u}}}}},_updateSymbolTexts:function(){for(var t=0;t<this.geoSymbolTexts.length;t++){var e=this.geoSymbolTexts[t];if(null===e||void 0===e)return;null==e.layer||null!=e.layer.getVisibility&&!0!==e.layer.getVisibility()||(e.fromZoom=this.fromZoom,e.redraw())}},_updateCanvasFills:function(){for(var t=0,e=this.components.length;t<e;t++)!1!==this.components[t].options.fillLimit&&!1!==Boolean(this.components[t].options.fillLimit)||(!0!==this.components[t].options.fill||"LINEAR"!==this.style.fillGradientMode&&"RADIAL"!==this.style.fillGradientMode?this.components[t].options.fillSymbolID>=2&&new SuperMap.Plot.CalculateCanvasGradient(this,this.components[t].getBounds()).createFillMode(this.components[t].options):this._computeGradientInCanvas(this.components[t],this.components[t].options,this.style))},_rotate:function(t,e){for(var i in this.components)this.components[i]instanceof T?this.components[i]._rotate(t,e):(this.components[i]instanceof c&&(this.components[i].options.rotation+=-t),this.components[i]instanceof g&&(this.components[i].options.labelRotation?(this.components[i].options.labelRotation+=-t,this.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&0===this.components[i].options.labelRotation&&(this.components[i].options.labelRotation=360)):this.components[i].options.labelRotation=-t),L.Util.rotateLatLngs(this.components[i].getLatLngs(),e,t),this.components[i].setLatLngs(this.components[i].getLatLngs()));L.Util.rotateLatLngs(this.getLatLngs(),e,t)},_move:function(t,e){if(null!=this.graphic&&null!=this.graphic.layer&&!0===this.graphic.layer.getVisibility())L.Util.moveLatLngs(this.getLatLngs(),t,e),this.graphic.update();else if(null!=this.layer&&(null==this.layer.getVisibility||!0===this.layer.getVisibility())){for(var i=0,o=this.components.length;i<o;i++)L.Util.moveLatLngs(this.components[i].getLatLngs(),t,e),this.components[i].setLatLngs(this.components[i].getLatLngs());this._renderer instanceof L.Canvas&&this._updateCanvasFills(),L.Util.moveLatLngs(this.getLatLngs(),t,e),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)}},_resize:function(t,e){for(var i in isNaN(t)&&(t=1),this.symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL&&(this.style.fontSize*=t),this.components)this.components[i]instanceof T?this.components[i]._resize(t,e):(this.components[i]instanceof c&&(this.components[i].options.graphicWidth*=t,this.components[i].options.graphicHeight*=t),this.components[i]instanceof g&&(this.components[i].options.fontSize*=t),L.Util.resizeLatLngs(this.components[i].getLatLngs(),e,t),this.components[i].setLatLngs(this.components[i].getLatLngs()));L.Util.resizeLatLngs(this.getLatLngs(),e,t)},_computeGradientInCanvas:function(t,e){t.getBounds().isValid()&&(e.fillColor=new SuperMap.Plot.CalculateCanvasGradient(this,t.getBounds()).createGradient())},_computeGradientInSVG:function(t){t.fillColor="url(#"+new SuperMap.Plot.CalculateSVGGradient(this).createGradient()+")"},_dashArray:function(t,e){return 1===t?[2*e,2*e].join():2===t?[0,2*e].join():3===t?[2*e,2*e,0,2*e].join():4===t?[2*e,2*e,0,2*e,0,2*e].join():null},_lineSymbolID:function(t,e){return t===[2*e,2*e].join()?1:t===[0,2*e].join()?2:t===[2*e,2*e,0,2*e].join()?3:t===[2*e,2*e,0,2*e,0,2*e].join()?4:0},_copyStyleForFeature:function(t,e){if(!0===e.surroundLineLimit&&(t.surroundLineColor=e.surroundLineColor,t.surroundLineColorOpacity=e.surroundLineColorOpacity,t.surroundLineWidth=e.surroundLineWidth),e.lineWidthLimit&&(t.weight=e.weight),e.lineColorLimit&&(t.color=e.color,t.opacity=e.opacity),e.lineTypeLimit)if(null===e.dashArray||void 0===e.dashArray)t.lineSymbolID=0;else{let i=e.weight;t.lineSymbolID=this._lineSymbolID(e.dashArray,i)}e.fillLimit&&(void 0===e.fill||!1===e.fill?t.fillSymbolID=1:t.fillSymbolID=0,e.fillColorLimit?null===e.fillColor||void 0===e.fillColor?(t.fillColor=e.color,t.fillOpacity=e.opacity):(t.fillColor=e.fillColor,t.fillOpacity=e.opacity):(t.fillColor=e.color,t.fillOpacity=e.opacity),t.fillGradientMode=e.fillGradientMode),e.fontSizeLimit&&(t.fontSize=e.fontSize),e.fontColorLimit&&(t.fontColor=e.fontColor),void 0!==e.labelAlign&&(t.labelAlign=e.labelAlign),void 0!==e.labelRotation&&(t.labelRotation=e.labelRotation),(e.fontSizeLimit||e.fontColorLimit)&&(t.fontWeight=e.fontWeight,t.fontStyle=e.fontStyle,t.fontStroke=e.fontStroke,t.fontStrokeColor=e.fontStrokeColor,t.fontStrokeWidth=e.fontStrokeWidth,t.fontBackground=e.fontBackground,t.fontBackgroundColor=e.fontBackgroundColor,t.fontShadow=e.fontShadow,t.fontShadowColor=e.fontShadowColor,t.fontShadowOffsetX=e.fontShadowOffsetX,t.fontShadowOffsetY=e.fontShadowOffsetY,t.fontSpace=e.fontSpace,t.fontPercent=e.fontPercent,t.fontFamily=e.fontFamily,t.fontOpacity=e.fontOpacity),t.graphicWidth<0&&(t.graphicWidth=Math.abs(t.graphicWidth)),t.graphicHeight<0&&(t.graphicHeight=Math.abs(t.graphicHeight)),t.fontSize<0&&(t.fontSize=Math.abs(t.fontSize))},_copyStyleForCell:function(t,e,i){if(e.display&&"none"===e.display)t.display=e.display;else{if(!0===t.surroundLineFlag){let i=e.weight;!0===t.lineWidthLimit&&(i=t.weight),!0!==t.surroundLineLimit?(t.color=e.surroundLineColor,t.opacity=e.surroundLineColorOpacity,t.weight=e.surroundLineWidth):(t.color=t.surroundLineColor,t.opacity=t.surroundLineColorOpacity,t.weight=t.surroundLineWidth),this.surroundLineType===SuperMap.Plot.AlgoSurroundLineType.ALL&&(t.weight=2*t.weight+i),t.dashArray=null,t.lineCap||void 0===e.lineCap||(t.lineCap=e.lineCap),t.lineJoin||void 0===e.lineJoin||(t.lineJoin=e.lineJoin)}else{if(t.lineWidthLimit||(t.weight=e.weight),t.lineColorLimit||(t.color=e.color,t.opacity=e.opacity),!t.lineTypeLimit){if(void 0!==e.lineSymbolID){e.lineSymbolID=parseInt(e.lineSymbolID);let t=e.weight;e.dashArray=this._dashArray(e.lineSymbolID,t)}t.dashArray=e.dashArray,t.lineCap||void 0===e.lineCap||(t.lineCap=e.lineCap),t.lineJoin||void 0===e.lineJoin||(t.lineJoin=e.lineJoin)}if(t.lineSymbolID){let e=t.weight;t.dashArray=this._dashArray(parseInt(t.lineSymbolID),e),delete t.lineSymbolID}}if(t.fillLimit||i instanceof g)1===t.fillSymbolID?t.fill=!1:0===t.fillSymbolID&&(t.fill=!0),t.fillColorLimit||(t.fillColor=t.color,t.fillOpacity=t.opacity);else if("LINEAR"===e.fillGradientMode||"RADIAL"===e.fillGradientMode)t.fillOpacity=1,this._map.getRenderer(this.layer)instanceof L.Canvas?this._computeGradientInCanvas(i,t):this._map.getRenderer(this.layer)instanceof L.SVG&&(t.fillOpacity=1,this._computeGradientInSVG(t));else if(this._map.getRenderer(this.layer)instanceof L.SVG){new SuperMap.Plot.CalculateSVGGradient(this).createFillMode(t)}else{new SuperMap.Plot.CalculateCanvasGradient(this,i.getBounds()).createFillMode(t)}t.fontSizeLimit&&!1!==t.fontSizeLimit||(t.fontSize=e.fontSize),t.fontColorLimit&&!1!==t.fontColorLimit||(t.fontColor=e.fontColor),void 0===t.labelAlign&&void 0!==e.labelAlign&&(t.labelAlign=e.labelAlign),void 0===t.labelRotation&&void 0!==e.labelRotation&&(t.labelRotation=e.labelRotation),!0!==t.fontSizeLimit&&!0!==t.fontColorLimit&&(void 0!==e.fontWeight&&(t.fontWeight=e.fontWeight),void 0!==e.fontStyle&&(t.fontStyle=e.fontStyle),void 0!==e.fontStroke&&(t.fontStroke=e.fontStroke),void 0!==!e.fontStrokeColor&&(t.fontStrokeColor=e.fontStrokeColor),void 0!==e.fontStrokeWidth&&(t.fontStrokeWidth=e.fontStrokeWidth),void 0!==e.fontBackground&&(t.fontBackground=e.fontBackground),void 0!==e.fontBackgroundColor&&(t.fontBackgroundColor=e.fontBackgroundColor),void 0!==e.fontShadow&&(t.fontShadow=e.fontShadow),void 0!==e.fontShadowColor&&(t.fontShadowColor=e.fontShadowColor),void 0!==e.fontShadowOffsetX&&(t.fontShadowOffsetX=e.fontShadowOffsetX),void 0!==e.fontShadowOffsetY&&(t.fontShadowOffsetY=e.fontShadowOffsetY),void 0!==e.fontSpace&&(t.fontSpace=e.fontSpace),void 0!==e.fontPercent&&(t.fontPercent=e.fontPercent),void 0!==e.fontFamily&&(t.fontFamily=e.fontFamily),void 0!==e.fontOpacity&&(t.fontOpacity=e.fontOpacity)),"none"===e.display?t.display=e.display:t.display="display",t.graphicWidth<0&&(t.graphicWidth=Math.abs(t.graphicWidth)),t.graphicHeight<0&&(t.graphicHeight=Math.abs(t.graphicHeight)),t.fontSize<0&&(t.fontSize=Math.abs(t.fontSize))}}});L.supermap.plotting.GraphicObject=T;var v=T.extend({superMapAlgoSymbol:null,scalePoints:null,scaleValues:null,polylineConnectLocationPoint:!1,islocationCircle:!1,roundBox:!1,textBoxType:null,arrowHeadType:0,arrowBodyType:0,arrowTailType:0,initialize:function(t,e,i,o){if(this.scaleByMap=!0,this.scalePoints=[],this.scaleValues=[],this.symbolType=0===t?e:SuperMap.Plot.SymbolType.ALGOSYMBOL,T.prototype.initialize.call(this,t,e,i,o),0===this.libID&&this.symbolType===SuperMap.Plot.SymbolType.ARROWLINE)null!==this.arrowTypeStart&&void 0!==this.arrowTypeStart&&(this.scaleValues[1]=this.arrowTypeStart,delete this.arrowTypeStart),null!==this.arrowTypeEnd&&void 0!==this.arrowTypeEnd&&(this.scaleValues[2]=this.arrowTypeEnd,delete this.arrowTypeEnd);else if(0===this.libID&&this.symbolType===SuperMap.Plot.SymbolType.COMBINATIONALCIRCLE){if(null!=this.radius&&this.radius.length>0){for(let t in this.radius)this.scaleValues[t]=this.radius[t];delete this.radius}}else 0===this.libID&&this.symbolType===SuperMap.Plot.SymbolType.CONCENTRICCIRCLE?(null!==this.startAngle&&void 0!==this.startAngle&&(this.scaleValues[0]=this.startAngle,delete this.startAngle),null!==this.endAngle&&void 0!==this.endAngle&&(this.scaleValues[1]=this.endAngle,delete this.endAngle)):0===this.libID&&this.symbolType===SuperMap.Plot.SymbolType.POLYGONREGION&&(this.annotationPosition>this.getLatLngs()?this.scaleValues[1]=0:null==this.scaleValues[1]&&(this.scaleValues[1]=this.annotationPosition));SuperMap.Plot.AlgoSymbolFactory.isAccessServer(this.libID,this.code)||(this.minEditPts=SuperMap.Plot.AlgoSymbolFactory.getMinEditPts(this.libID,this.code),this.maxEditPts=SuperMap.Plot.AlgoSymbolFactory.getMaxEditPts(this.libID,this.code),0===this.subSymbols.length&&(this.subSymbols=SuperMap.Plot.AlgoSymbolFactory.getDefaultSubSymbols(this.libID,this.code)),null!==this.style&&!1===this.isEdit&&(this.style=SuperMap.Plot.PlottingUtil.copyAttributes(this.style,SuperMap.Plot.AlgoSymbolFactory.getDefaultStyle(this.libID,this.code))),this.controlPoints=L.Util.latLngsToSuperMapPoints(this.latLngs),this.superMapAlgoSymbol=SuperMap.Plot.AlgoSymbolFactory.getAlgoSymbol(this),this.scaleValues=this.superMapAlgoSymbol.scaleValues,0!==this.libID||this.symbolType!==SuperMap.Plot.SymbolType.SYMBOLTEXTBOX&&this.symbolType!==SuperMap.Plot.SymbolType.LINEMARKING||(this.textBoxType=this.superMapAlgoSymbol.textBoxType),100===this.libID&&26400===this.code&&(this.arrowHeadType=this.superMapAlgoSymbol.arrowHeadType),delete this.controlPoints),this._setBasicSymbolName(),!0===this._isSupportAddAnnotation()&&(this.style.sizeFixed=!1)},onAdd:function(t){this.superMapAlgoSymbol&&(this.superMapAlgoSymbol.map=t._map),T.prototype.onAdd.call(this,t)},getTextContent:function(){return this.textContent},getArrowHeadType:function(){return this.arrowHeadType},setArrowHeadType:function(t){1016!==this.code&&26400!==this.code||this.arrowHeadType===t||(this.arrowHeadType=t,this.redraw()),this.layer.fire("propertychanged",{feature:this,property:t})},getArrowTailType:function(){return this.arrowTailType},setArrowTailType:function(t){1016===this.code&&this.arrowTailType!==t&&(this.arrowTailType=t,this.redraw()),this.layer.fire("propertychanged",{feature:this,property:t})},getArrowBodyType:function(){return this.arrowBodyType},setArrowBodyType:function(t){1016===this.code&&this.arrowBodyType!==t&&(this.arrowBodyType=t,this.redraw()),this.layer.fire("propertychanged",{feature:this,property:t})},setRotate:function(t){this.dRotate+=t,0!==this.textContent.length&&(void 0===this.style.labelRotation?this.style.labelRotation=-t:this.style.labelRotation+=-t),null===this.anchorPoint&&this.symbolType!==SuperMap.Plot.SymbolType.TEXTSYMBOL&&this.symbolType!==SuperMap.Plot.SymbolType.CONCENTRICCIRCLE?this.anchorPoint=this.getBounds().getCenter():null===this.anchorPoint&&(this.anchorPoint=L.latLng(this.latLngs[0].lat,this.latLngs[0].lng)),this._rotate(t,this.anchorPoint);for(var e=0,i=this.avoidRegions.length;e<i;e++)L.Util.rotateLatLngs(this.avoidRegions[e].getLatLngs(),this.anchorPoint,t)},getScaleByMap:function(){return this.scaleByMap},setScaleByMap:function(t){this.scaleByMap=t,this.redraw(),this._map&&this._map.getPlotEditControl()&&this._map.getPlotEditControl().fire(SuperMap.Plot.Event.featuresmodified,{features:[this]})},setSurroundLineType:function(t){this.surroundLineType=t,this.redraw(),this._map&&this._map.getPlotEditControl()&&this._map.getPlotEditControl().fire(SuperMap.Plot.Event.featuresmodified,{features:[this]})},setSubSymbol:function(t,e,i){if(null!==i&&void 0!==i||(i=this.libID),e<this.subSymbols.length)this.subSymbols[e].libID=i,this.subSymbols[e].code=t;else{if(this.subSymbols.length!==e)return;this.subSymbols.push(new SuperMap.Plot.SubSymbol(i,t))}if(this.superMapAlgoSymbol){var o=new SuperMap.GetSymbolInfoParameters;o.libID=this.subSymbols[e].libID,o.code=this.subSymbols[e].code,L.supermap.symbolInfoService(this.serverUrl).getSymbolInfo(o,function(t){this.subSymbols[e].symbolData=t.result,this.redraw()},this)}else{var l=new SuperMap.GetSymbolInfoParameters;l.libID=this.libID,l.code=this.code,l.inputPoints=L.Util.latLngsToSuperMapPoints(this.getLatLngs()),l.subSymbols=this.subSymbols,L.supermap.symbolInfoService(this.serverUrl).getSymbolInfo(l,function(t){this.symbolData.innerCells=t.result.innerCells,this.redraw()},this)}},move:function(t,e){if(this.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXTBOX||this.symbolType===SuperMap.Plot.SymbolType.LINEMARKING||this.symbolType===SuperMap.Plot.SymbolType.ANNOFRAMESYMBOLM||this.symbolType===SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL)L.Util.moveLatLngs(this.getLatLngs()[0],t,e),L.Util.moveLatLngs(this.getLatLngs()[1],t,e),this.setLatLngs(this.getLatLngs());else{if(T.prototype._move.call(this,t,e),0!==this.scalePoints.length&&L.Util.moveLatLngs(this.scalePoints,t,e),null!==this.symbolData&&this.symbolData.innerCells)for(var i=0;i<this.symbolData.innerCells.length;i++)for(var o=0;o<this.symbolData.innerCells[i].positionPoints.length;o++)this.symbolData.innerCells[i].positionPoints[o].x+=e,this.symbolData.innerCells[i].positionPoints[o].y+=t;if(null!==this.symbolData&&this.symbolData.innerCells)for(let i=0;i<this.symbolData.scalePoints.length;i++)this.symbolData.scalePoints[i].x+=e,this.symbolData.scalePoints[i].y+=t}for(let i=0,o=this.avoidRegions.length;i<o;i++)L.Util.moveLatLngs(this.avoidRegions[i].getLatLngs(),t,e);this._updateSymbolTexts()},_parseSymbolData:function(){if(T.prototype._parseSymbolData.call(this),null!==this.symbolData){if(void 0!==this.symbolData.subSymbolScaleValue&&null!==this.symbolData.subSymbolScaleValue&&(this.subSymbolScaleValue=this.symbolData.subSymbolScaleValue),void 0!==this.symbolData.strokeWidth&&null!==this.symbolData.strokeWidth&&(this.strokeWidth=this.symbolData.strokeWidth),void 0!==this.symbolData.constantSize&&null!==this.symbolData.constantSize&&(this.constantSize=this.symbolData.constantSize),void 0!==this.symbolData.baseScale&&null!==this.symbolData.baseScale&&(this.baseScale=this.symbolData.baseScale),this.symbolData.scaleValues&&0!==this.symbolData.scaleValues.length){this.scaleValues=[];for(var t=0;t<this.symbolData.scaleValues.length;t++)this.scaleValues.push(this.symbolData.scaleValues[t])}Object.prototype.hasOwnProperty.call(this.symbolData,"arrowTailType")&&(this.arrowTailType=this.symbolData.arrowTailType),Object.prototype.hasOwnProperty.call(this.symbolData,"arrowBodyType")&&(this.arrowBodyType=this.symbolData.arrowBodyType),Object.prototype.hasOwnProperty.call(this.symbolData,"arrowHeadType")&&(this.arrowHeadType=this.symbolData.arrowHeadType)}},_setSymbolData:function(t){if(T.prototype._setSymbolData.call(this,t),null!==this.symbolData&&this.superMapAlgoSymbol){if(this.symbolData.subSymbolScaleValue=this.subSymbolScaleValue,this.symbolData.baseScale=this.baseScale,this.symbolData.strokeWidth=this.strokeWidth,this.symbolData.constantSize=this.constantSize,null!==this.annotationPosition&&void 0!==this.annotationPosition&&(this.symbolData.annotationPosition=this.annotationPosition),Object.prototype.hasOwnProperty.call(this.symbolData,"scaleValues")&&null!==this.symbolData.scaleValues)for(var e=0;e<this.scaleValues.length;e++)this.symbolData.scaleValues.length>e?this.symbolData.scaleValues[e]=this.scaleValues[e]:this.symbolData.scaleValues.push(this.scaleValues[e]);else this.symbolData.scaleValues=[],this.symbolData.scaleValues=this.scaleValues;1016===this.code&&(this.symbolData.arrowTailType=this.arrowTailType,this.symbolData.arrowBodyType=this.arrowBodyType,this.symbolData.arrowHeadType=this.arrowHeadType)}},_calculateParts:function(){"none"===this.style.display||null!=this.layer&&"function"==typeof this.layer.getVisibility&&!1===this.layer.getVisibility()||(this.textContent&&""!==this.textContent&&"???"!==this.textContent||this.symbolType!==SuperMap.Plot.SymbolType.TEXTSYMBOL||(this.textContent="请输入文本"),0!==this.textContent.length&&this.dRotate!==this.style.labelRotation&&(this.style.labelRotation=-this.dRotate),this.superMapAlgoSymbol&&0!==this.getLatLngs().length?(this.superMapCalculateParts(),this._setBasicSymbolText()):!this.superMapAlgoSymbol&&this.getLatLngs().length>=this.minEditPts&&(this._calAccessServerSymbol(),this._setBasicSymbolText()),"function"==typeof this.layer.getSymZoomScale&&(this.prevScale=this.layer.getSymZoomScale()))},_calAccessServerSymbol:function(){for(var t=SuperMap.Plot.AnalysisSymbol.analysisSymbolCells(this.symbolData,!0),e=0;e<t.length;e++)t[e].type===SuperMap.Plot.SymbolType.TEXTSYMBOL&&(t[e].style.fontSize*=2);this._transSymbolCellsToLayers(t),this._analysisAlgoBasicInfo(!1),0!==this.symbolData.subSymbols.length&&this.subSymbols.length!==this.symbolData.subSymbols.length&&this._analysisAlgoBasicInfo(!0)},_analysisAlgoBasicInfo:function(t){if(this.symbolData.scaleValues&&0!==this.symbolData.scaleValues.length){this.scaleValues=[];for(let t=0;t<this.symbolData.scaleValues.length;t++)this.scaleValues.push(this.symbolData.scaleValues[t])}if(t&&this.symbolData.subSymbols){this.subSymbols=[];for(let t=0;t<this.symbolData.subSymbols.length;t++)this.subSymbols.push(new SuperMap.Plot.SubSymbol(this.symbolData.libID,this.symbolData.subSymbols[t]))}if(this.symbolData.scalePoints&&0!==this.symbolData.scalePoints.length){this.scalePoints=[];for(let t=0;t<this.symbolData.scalePoints.length;t++)this.scalePoints.push(L.latLng(this.symbolData.scalePoints[t].y,this.symbolData.scalePoints[t].x))}},_modifyPoint:function(t,e){(e=new SuperMapAlgoPlot.Point(e.lng,e.lat)).isScalePoint=!0,this._clearComponents(),this.superMapModifyPoint(t,e),this._calculateAvoidRegions()},_reView:function(){if(this.fromZoom!==this._map.getZoom()){var t=this.getBounds();if(!0===this.isEdit&&t.isValid()&&!0===this.scaleByMap){let t=1;if("function"==typeof this.layer.getSymZoomScale&&!0===this.layer.enableSymScale)t=this.layer.getSymZoomScale();else{let e=this._map.getZoomScale(this._map.getZoom(),this.fromZoom);this.dScale*=e,t=this.dScale}if(34!==this.symbolType&&!0!==this._isSupportAddAnnotation()||!1!==this.style.sizeFixed){if(34!==this.symbolType&&!1===this._isSupportAddAnnotation()){for(var e in this.components)if(this.components[e]instanceof g&&null!=this.prevScale)this.components[e].options.fontSize=this.components[e].options.fontSize/this.prevScale*t;else if(this.components[e].options&&this.components[e].options.weight&&(this.components[e].options.weight=this.style.weight*t,null!=this.components[e].options.dashArray)){let i=this.components[e].options.dashArray.split(",");for(let e=0;e<i.length;e++)i[e]=parseInt(i[e])/this.prevScale*t;this.components[e].options.dashArray=i.join(),this.components[e].setStyle(this.components[e].options)}}else for(var i in this.components)if(this.components[i].options.weight=this.style.weight*t,null!=this.components[i].options.dashArray){let e=this.components[i].options.dashArray.split(",");for(let i=0;i<e.length;i++)e[i]=parseInt(e[i])/this.prevScale*t;this.components[i].options.dashArray=e.join(),this.components[i].setStyle(this.components[i].options)}}else for(var e in this.components)if(this.components[e]instanceof g)this.components[e].options.fontSize=this.style.fontSize*t;else if(this.components[e].options&&this.components[e].options.weight&&(this.components[e].options.weight=this.style.weight*t,null!=this.components[e].options.dashArray)){let i=this.components[e].options.dashArray.split(",");for(let e=0;e<i.length;e++)i[e]=parseInt(i[e])/this.prevScale*t;this.components[e].options.dashArray=i.join(),this.components[e].setStyle(this.components[e].options)}22!==this.libID||1012!==this.code&&1013!==this.code&&1014!==this.code&&1015!==this.code||this.dScale>=1&&this.redraw(),this.layer._map.getRenderer(this.layer)instanceof L.Canvas&&this._updateCanvasFills(),this._updateSymbolTexts(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues),this.prevScale=t}this.fromZoom=this._map.getZoom(),(1===this.surroundLineType||2===this.surroundLineType||SuperMap.Plot.AlgoSymbolFactory.zoomCalSymbol(this.libID,this.code))&&this.redraw(),this.symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL&&this.isSelected&&this._map.getPlotEditControl()&&this._map.getPlotEditControl().fire(SuperMap.Plot.Event.featuresmodified,{features:[this]})}},_rotate:function(t,e){if(this.symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL)for(var i in this.components)this.components[i].options.labelRotation=this.style.labelRotation,this.components[i].redraw();if(L.Util.rotateLatLngs(this.getLatLngs(),e,t),L.Util.rotateLatLngs(this.scalePoints,e,t),this.symbolType!==SuperMap.Plot.SymbolType.CONCENTRICCIRCLE||SuperMap.Plot.PlottingUtil.equalFuzzy(Math.abs(this.scaleValues[0]-this.scaleValues[1]),360)||(this.scaleValues[0]+=t,this.scaleValues[1]+=t),SuperMap.Plot.AlgoSymbolFactory.isAccessServer(this.libID,this.code)){var o=new SuperMap.GetSymbolInfoParameters;o.libID=this.libID,o.code=this.code,o.inputPoints=L.Util.latLngsToSuperMapPoints(this.getLatLngs()),o.scaleValues=this.scaleValues,o.subSymbols=this.subSymbols,L.supermap.symbolInfoService(this.serverUrl).getSymbolInfo(o,function(t){this.symbolData.innerCells=t.result.innerCells,this.symbolData.scalePoints=t.result.scalePoints,this.symbolData.scaleValues=t.result.scaleValues,this.redraw(),this._updateSymbolTexts()},this)}else this.superMapAlgoSymbol;this.redraw(),this._updateSymbolTexts()},_resize:function(t,e){T.prototype._resize.call(this,t,e);var i=new SuperMapAlgoPlot.Point(e.lng,e.lat);if(this.superMapAlgoSymbol){for(let e=0;e<this.superMapAlgoSymbol.controlPoints.length;e++)SuperMap.Plot.PlottingUtil.resize(i,t,this.superMapAlgoSymbol.controlPoints[e]);for(let e=0;e<this.superMapAlgoSymbol.scalePoints.length;e++)SuperMap.Plot.PlottingUtil.resize(i,t,this.superMapAlgoSymbol.scalePoints[e])}else{for(let e=0;e<this.symbolData.innerCells.length;e++)for(let l=0;l<this.symbolData.innerCells[e].positionPoints.length;l++){var o=new SuperMapAlgoPlot.Point(this.symbolData.innerCells[e].positionPoints[l].x,this.symbolData.innerCells[e].positionPoints[l].y);SuperMap.Plot.PlottingUtil.resize(i,t,o),this.symbolData.innerCells[e].positionPoints[l].x=o.x,this.symbolData.innerCells[e].positionPoints[l].y=o.y}for(let e=0;e<this.symbolData.scalePoints.length;e++){var l=new SuperMapAlgoPlot.Point(this.symbolData.scalePoints[e].x,this.symbolData.scalePoints[e].y);SuperMap.Plot.PlottingUtil.resize(i,t,l),this.symbolData.scalePoints[e].x=l.x,this.symbolData.scalePoints[e].y=l.y}}},_setBasicSymbolName:function(){if(null==this.symbolName)if(0===this.libID)this.symbolName=SuperMap.Plot.AlgoSymbolFactory.getSymbolName(this.libID,this.code);else{var t=L.supermap.plotting.getControl(this._map,this.serverUrl).getSymbolLibManager();this.symbolName=t.getSymbolName(this.libID,this.code)}},_isSupportAddAnnotation:function(){return 0===this.libID&&this.code===SuperMap.Plot.SymbolType.CIRCLESYMBOL||this.code===SuperMap.Plot.SymbolType.RECTANGLESYMBOL||this.code===SuperMap.Plot.SymbolType.ARCSYMBOL||this.code===SuperMap.Plot.SymbolType.CHORDSYMBOL||this.code===SuperMap.Plot.SymbolType.PIESYMBOL||this.code===SuperMap.Plot.SymbolType.ELLIPSESYMBOL||this.code===SuperMap.Plot.SymbolType.PARALLELOGRAM||this.code===SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL||this.code===SuperMap.Plot.SymbolType.POLYLINESYMBOL||this.code===SuperMap.Plot.SymbolType.POLYBEZIERSYMBOL||this.code===SuperMap.Plot.SymbolType.POLYBEZIERCLOSESYMBOL||this.code===SuperMap.Plot.SymbolType.PARALLELLINE||this.code===SuperMap.Plot.SymbolType.KIDNEY||this.code===SuperMap.Plot.SymbolType.REGULARPOLYGON||this.code===SuperMap.Plot.SymbolType.RUNWAY||this.code===SuperMap.Plot.SymbolType.CURVEEIGHT||this.code===SuperMap.Plot.SymbolType.BRACESYMBOL||this.code===SuperMap.Plot.SymbolType.ARROWLINE||this.code===SuperMap.Plot.SymbolType.CONCENTRICCIRCLE||this.code===SuperMap.Plot.SymbolType.COMBINATIONALCIRCLE||this.code===SuperMap.Plot.SymbolType.FREECURVE||this.code===SuperMap.Plot.SymbolType.NODECHAIN||this.code===SuperMap.Plot.SymbolType.TRAPEZOIDSYMBOL},_setBasicSymbolText:function(){if(!1!==this.textDisplay&&!0===this._isSupportAddAnnotation()){this.textContent=SuperMap.Plot.PlottingUtil.trim(this.textContent);var t=this.getBounds();if(this.textContent&&null!==this.textContent&&0!==this.textContent.length&&null!==t&&t.isValid()){var e=L.latLng((t.getSouth()+t.getNorth())/2,(t.getEast()+t.getWest())/2),i={surroundLineFlag:!1,labelAlign:"cm"};this._createAndDrawLayer(34,[e],i,this.textContent)}}},superMapCalculateParts:function(){this.toSuperMapAlgorithms(),this.superMapAlgoSymbol.calculateParts(),this.fromSuperMapAlgorithms()},superMapModifyPoint:function(t,e){this.toSuperMapAlgorithms(),this.superMapAlgoSymbol.modifyPoint(t,e),this.fromSuperMapAlgorithms()},toSuperMapAlgorithms:function(){this.superMapAlgoSymbol.isEdit=this.isEdit,this.superMapAlgoSymbol.controlPoints=L.Util.latLngsToSuperMapPoints(this.getLatLngs()),this.superMapAlgoSymbol.subSymbols=this.subSymbols,this.superMapAlgoSymbol.scaleValues=this.scaleValues,this.superMapAlgoSymbol.scalePoints=L.Util.latLngsToSuperMapPoints(this.scalePoints),this.superMapAlgoSymbol.polylineConnectLocationPoint=this.polylineConnectLocationPoint,this.superMapAlgoSymbol.textContent=this.textContent,this.superMapAlgoSymbol.style=this.style,"function"==typeof this.layer.getSymZoomScale&&(this.superMapAlgoSymbol.symScaleDefinition=this.layer.getSymZoomScale()),22===this.libID&&1016===this.code&&(this.superMapAlgoSymbol.arrowHeadType=this.arrowHeadType,this.superMapAlgoSymbol.arrowBodyType=this.arrowBodyType,this.superMapAlgoSymbol.arrowTailType=this.arrowTailType),100===this.libID&&26400===this.code&&(this.superMapAlgoSymbol.arrowHeadType=this.arrowHeadType),0===this.libID&&this.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXTBOX&&(this.superMapAlgoSymbol.textBoxType=this.textBoxType,this.superMapAlgoSymbol.roundBox=this.roundBox),0===this.libID&&this.symbolType===SuperMap.Plot.SymbolType.LINEMARKING&&(this.superMapAlgoSymbol.textBoxType=this.textBoxType,this.superMapAlgoSymbol.islocationCircle=this.islocationCircle)},fromSuperMapAlgorithms:function(){this._transSymbolCellsToLayers(this.superMapAlgoSymbol.components),this.scalePoints=L.Util.superMapPointsToLatLngs(this.superMapAlgoSymbol.scalePoints),this.scaleValues=this.superMapAlgoSymbol.scaleValues,this.subSymbols.length!==this.superMapAlgoSymbol.subSymbols.length&&(this.subSymbols=this.superMapAlgoSymbol.subSymbols),(this.latLngs.length!==this.superMapAlgoSymbol.controlPoints.length||100===this.libID&&13700===this.code)&&(this.latLngs=L.Util.superMapPointsToLatLngs(this.superMapAlgoSymbol.controlPoints))},convertGraphicObjects:function(){return 22!==this.libID||1023!==this.code&&1001!==this.code&&1003!==this.code&&1004!==this.code&&1017!==this.code?null:this.convertCells(this)},convertCells:function(t){var e=[],i={},o=SuperMap.Util.cloneObject(this.style);i.uuid=t.uuid,i.serverUrl=t.serverUrl,i.serviceParams=t.options.serviceParams,i.custom=t.custom;var l={},s=t.options;if(t instanceof L.Polygon)this._copyStyleForFeature(o,s),(l=L.supermap.plotting.PlottingObject.createSymbol(0,32,t._latlngs[0],i,o,t.custom)).surroundLineType=s.surroundLineType;else if(t instanceof L.Polyline)this._copyStyleForFeature(o,s),(l=L.supermap.plotting.PlottingObject.createSymbol(0,24,t._latlngs,i,o,t.custom)).surroundLineType=s.surroundLineType;else if(t instanceof L.supermap.plotting.Text)this._copyStyleForFeature(o,s),(l=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.TEXTSYMBOL,t._latlng,i,o,t.custom)).textContent=t._text,l.dRotate=-t.options.labelRotation;else if(t instanceof L.supermap.plotting.PlottingObject){for(var n=0;n<t.components.length;n++){var a=t.components[n];if(!0!==a.options.surroundLineFlag)for(var r=this.convertCells(a),p=0;p<r.length;p++)e.push(r[p])}return e}return e.push(l),e},setTextBoxType:function(t){this.textBoxType!==t&&(this.textBoxType=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getTextBoxType:function(){return this.textBoxType},setRoundBox:function(t){this.roundBox!==t&&(this.roundBox=t,this.textBoxType!==SuperMap.Plot.TextBoxType.NONEBOX&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},getRoundBox:function(){return this.roundBox},setLocationCircle:function(t){this.islocationCircle!==t&&(this.islocationCircle=t,this.textBoxType!==SuperMap.Plot.TextBoxType.NONEBOX&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},getLocationCircle:function(){return this.islocationCircle},canPolylineConnectLocationPoint:function(){return SuperMap.Plot.AlgoSymbolFactory.canPolylineConnect(this.libID,this.code)},getPolylineConnectLocationPoint:function(){return this.polylineConnectLocationPoint},setPolylineConnectLocationPoint:function(t){this.polylineConnectLocationPoint!==t&&SuperMap.Plot.AlgoSymbolFactory.canPolylineConnect(this.libID,this.code)&&(this.polylineConnectLocationPoint=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getStartArrowType:function(){return this.scaleValues[1]},setStartArrowType:function(t){this.scaleValues[1]!==t&&(this.scaleValues[1]=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getEndArrowType:function(){return this.scaleValues[2]},setEndArrowType:function(t){this.scaleValues[2]!==t&&(this.scaleValues[2]=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},setFontAlign:function(t){this.style.labelAlign!==t&&(this.style.labelAlign=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getTextPosition:function(){if(this.symbolType===SuperMap.Plot.SymbolType.POLYGONREGION)return this.scaleValues[1]},setTextPosition:function(t){this.symbolType===SuperMap.Plot.SymbolType.POLYGONREGION&&this.scaleValues[1]!==t&&(this.scaleValues[1]=t,0!==this.textContent.length&&this.redraw())}});L.supermap.plotting.algoSymbol=function(t,e,i,o){return new v(t,e,i,o)},L.supermap.plotting.AlgoSymbol=v;var _=v.extend({startAssociatedUuid:null,endAssociatedUuid:null,lineRelationType:SuperMap.Plot.LineRelationType.ARROW,setLineRelationType:function(t){this.lineRelationType!==t&&(this.lineRelationType=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getLineRelationType:function(){return this.lineRelationType},initialize:function(t,e,i,o){this.libID=0,this.code=SuperMap.Plot.SymbolType.LINERELATION,this.symbolType=SuperMap.Plot.SymbolType.LINERELATION,this.symbolName="连接线",v.prototype.initialize.call(this,t,e,i,o)},onAdd:function(t){v.prototype.onAdd.call(this,t),this.setJoinLineToDotSymbol(this.startAssociatedUuid),this.setJoinLineToDotSymbol(this.endAssociatedUuid)},setStartFeature:function(t){null!==this.startAssociatedUuid&&(this.removeJoinLineFromDotSymbol(this.startAssociatedUuid),this.startAssociatedUuid=null);var e=this._map.getFeatureByUuid(t);null!=e&&e instanceof lt&&(null!==this.endAssociatedUuid&&t===this.endAssociatedUuid||(this.startAssociatedUuid=t,this.setJoinLineToDotSymbol(this.startAssociatedUuid),null!==this.endAssociatedUuid&&this.setFeatures(this.startAssociatedUuid,this.endAssociatedUuid)))},setEndFeature:function(t){null!==this.endAssociatedUuid&&(this.removeJoinLineFromDotSymbol(this.endAssociatedUuid),this.endAssociatedUuid="");var e=this._map.getFeatureByUuid(t);null!==e&&e instanceof lt&&(null!==this.startAssociatedUuid&&t===this.startAssociatedUuid||(this.endAssociatedUuid=t,this.setJoinLineToDotSymbol(this.endAssociatedUuid),null!==this.startAssociatedUuid&&this.setFeatures(this.startAssociatedUuid,this.endAssociatedUuid)))},setFeatures:function(t,e){var i=this._map.getFeatureByUuid(t),o=this._map.getFeatureByUuid(e);null!==i&&null!==o&&i instanceof lt&&o instanceof lt&&(this.startAssociatedUuid=t,this.endAssociatedUuid=e,this.setJoinLineToDotSymbol(this.startAssociatedUuid),this.setJoinLineToDotSymbol(this.endAssociatedUuid),this.symbolName="连接线:"+i.symbolName+"_"+o.symbolName,this.redraw())},destroy:function(){this.startFeature=null,this.endFeature=null,v.prototype.destroy.call(this)},_calculateParts:function(){var t=!1,e=!1,i=null,o=this._map.getFeatureByUuid(this.startAssociatedUuid);if(null!==o&&o instanceof lt){var l=L.Util.latLngsToSuperMapPoints(o.latLngs);null!==l&&0<l.length&&(i=l[0]);for(var s=0;s<o.joinLines.length;s++)if(this===o.joinLines[s]){t=!0;break}t||o.joinLines.push(this)}var n=null,a=this._map.getFeatureByUuid(this.endAssociatedUuid);if(null!==a&&a instanceof lt){var r=L.Util.latLngsToSuperMapPoints(a.latLngs);null!==r&&0<r.length&&(n=r[0]);for(s=0;s<a.joinLines.length;s++)if(this===a.joinLines[s]){e=!0;break}e||a.joinLines.push(this)}if(e&&t&&(this.symbolName="连接线:"+o.symbolName+"_"+a.symbolName),this.superMapAlgoSymbol.controlPoints=L.Util.latLngsToSuperMapPoints(this.latLngs),this.superMapAlgoSymbol.lineRelationType=this.lineRelationType,null!==i&&(0===this.superMapAlgoSymbol.controlPoints.length?this.superMapAlgoSymbol.controlPoints.push(i):this.superMapAlgoSymbol.controlPoints[0]=i),null!==n){if(0===this.superMapAlgoSymbol.controlPoints.length)return;1===this.superMapAlgoSymbol.controlPoints.length?this.superMapAlgoSymbol.controlPoints.push(n):this.superMapAlgoSymbol.controlPoints[this.superMapAlgoSymbol.controlPoints.length-1]=n}this.superMapAlgoSymbol.calculateParts(),this.latLngs=L.Util.superMapPointsToLatLngs(this.superMapAlgoSymbol.controlPoints),this._transSymbolCellsToLayers(this.superMapAlgoSymbol.components)},move:function(t,e){if(null!==t&&null!==e){for(var i in this.getLatLngs())this.getLatLngs()[i].lat+=t,this.getLatLngs()[i].lng+=e;for(var o=0,l=this.avoidRegions.length;o<l;o++)this.avoidRegions[o].move(t,e);this.redraw()}},_modifyPoint:function(t,e){if(0===t){var i=this.getFeatureByPoint(e);null!==i?this.setStartFeature(i.uuid):this.setStartFeature(null)}else if(this.getLatLngs().length-1===t){var o=this.getFeatureByPoint(e);null!==o?this.setEndFeature(o.uuid):this.setEndFeature(null)}this.redraw()},getFeatureByPoint:function(t){var e=this._map.latLngToLayerPoint(t),i=this.layer.features;for(var o in i){if(i[o]instanceof lt)if(this._map.latLngToLayerPoint(i[o].getLatLngs()[0]).distanceTo(e)<15)return i[o]}return null},setJoinLineToDotSymbol:function(t){var e=this._map.getFeatureByUuid(t);if(null!=e&&e instanceof lt){for(var i=!1,o=0;o<e.joinLines.length;o++)if(this===e.joinLines[o]){i=!0;break}i||e.joinLines.push(this)}},removeJoinLineFromDotSymbol:function(t){if(t&&"[object String]"===Object.prototype.toString.call(t)){var e=this._map.getFeatureByUuid(t);if(null!==e&&e instanceof lt)for(var i=0,o=e.joinLines.length;i<o;i++)if(this===e.joinLines[i]){e.joinLines.splice(i,1);break}}},_parseSymbolData:function(){v.prototype._parseSymbolData.call(this),this.symbolData&&(Object.prototype.hasOwnProperty.call(this.symbolData,"startAssociatedUuid")&&(this.startAssociatedUuid=this.symbolData.startAssociatedUuid),Object.prototype.hasOwnProperty.call(this.symbolData,"endAssociatedUuid")&&(this.endAssociatedUuid=this.symbolData.endAssociatedUuid),Object.prototype.hasOwnProperty.call(this.symbolData,"lineRelationType")&&(this.lineRelationType=this.symbolData.lineRelationType))},_setSymbolData:function(){v.prototype._setSymbolData.call(this),this.symbolData&&(this.symbolData.endAssociatedUuid=this.endAssociatedUuid,this.symbolData.lineRelationType=this.lineRelationType,this.symbolData.startAssociatedUuid=this.startAssociatedUuid)}});L.supermap.plotting.lineRelation=function(t,e,i,o){return new _(t,e,i,o)},L.supermap.plotting.LineRelation=_;class x extends L.Evented{constructor(t){super(),this.goAnimations=[],this.curPlayGroup=0}preView(){if(0!==this.goAnimations.length)for(var t=this.getAllGroups(),e=0;e<t.length;e++){var i=t[e];for(let t=0;t<i.length;t++)i[t].play()}}play(t){if(0!==this.goAnimations.length){void 0!==t&&(this.curPlayGroup=this.getAnimationGroupByName(t).index),this.isPlay()&&this.curPlayGroup--;var e=this.getAllGroups();this.curPlayGroup>e.length-1&&(this.curPlayGroup=0);for(var i=e[this.curPlayGroup],o=0;o<i.length;o++){i[o].play()}this.curPlayGroup++}}stop(){if(0!==this.goAnimations.length){for(var t=0;t<this.goAnimations.length;t++)this.goAnimations[t].stop();this.curPlayGroup=0}}pause(){if(0!==this.goAnimations.length){for(var t=!1,i=0;i<this.goAnimations.length;i++)this.goAnimations[i].animationState===e.PLAYING?(t=!0,this.goAnimations[i].pause()):this.goAnimations[i].stop();t&&this.curPlayGroup>0&&this.curPlayGroup--}}reset(){if(0!==this.goAnimations.length){for(var t=0;t<this.goAnimations.length;t++)this.goAnimations[t].reset();this.curPlayGroup=0}}isPlay(){for(var t=!1,i=0;i<this.goAnimations.length;i++)this.goAnimations[i].animationState===e.PLAYING&&(t=!0);return t}isPause(){for(var t=!1,i=0;i<this.goAnimations.length;i++)this.goAnimations[i].animationState===e.PAUSE&&(t=!0);return t}getAnimationTimeLength(t,e){var i=!1,l=0,s=0;for(let u=t-1;u>=0;u--){var n=e[u],a=n.startTime+n.duration;if(a>s&&(s=a),n.animationPlayType===o.PLAYAFTERLASTONE){i=!0;for(let t=u-1;t>=0;t--){var r=e[t],p=r.startTime+r.duration;p>l&&(l=p)}}}return{isExist:i,length1:l,length2:s}}getAllGroups(){var t=[];for(let l=0;l<this.goAnimations.length;l++){var e=this.goAnimations[l];if(e.animationPlayType===o.PLAYFROMNOW||0===l){var i=[];i.push(e),t.push(i)}else t[t.length-1].push(e)}return t}getAnimationGroup(t){var e=null,i=0,o=this.getAllGroups();for(let s=0;s<o.length;s++){var l=o[s];for(let o=0;o<l.length;o++)if(l[o].name===t.name){e=l,i=o;break}}return{index:i,group:e}}getAnimationGroupByName(t){var e=null,i=0,o=this.getAllGroups();for(let s=0;s<o.length;s++){var l=o[s];for(let o=0;o<l.length;o++)if(l[o].name===t){e=l,i=s;break}}return{index:i,group:e}}changeAnimationTime(t){if(null===t)return!1;var e=this.getAnimationGroup(t).group,i=(this.getAnimationGroup(t).index,e.indexOf(t));if(t.animationPlayType===o.PLAYFROMNOW)t.startTime=t.delayTime;else if(t.animationPlayType===o.PLAYSAMELASTONE||t.animationPlayType===o.UNKNOWN){(l=this.getAnimationTimeLength(i,e)).isExist?t.startTime=l.length1+t.delayTime:t.startTime=t.delayTime}else if(t.animationPlayType===o.PLAYAFTERLASTONE){var l=this.getAnimationTimeLength(i,e);t.startTime=l.length2+t.delayTime}}moveAnimation(t,e){if(!(e<0||e>this.goAnimations.length)){var i=this.goAnimations.indexOf(t);if(i!==e){this.goAnimations=this.move(i,e);for(var o=0;o<this.goAnimations.length;o++){t=this.goAnimations[o];this.changeAnimationTime(t)}}}}move(t,e){var i=[].concat(this.goAnimations);return i.splice(e,0,i.splice(t,1)[0]),i}getAnimationDelayTime(t){if(null===t)return!1;var e=0,i=this.getAnimationGroup(t).group,l=(this.getAnimationGroup(t).index,i.indexOf(t));if(t.animationPlayType===o.PLAYFROMNOW||0===l)e=t.startTime;else if(t.animationPlayType===o.PLAYAFTERLASTONE){var s=this.getAnimationTimeLength(l,i);e=t.startTime-s.length2}else if(t.animationPlayType===o.PLAYSAMELASTONE||t.animationPlayType===o.UNKNOW){var n=-1;for(let t=l;t>=0;t--){if(i[t].animationPlayType===o.PLAYAFTERLASTONE){n=t;break}}if(-1===n)e=t.startTime;else{s=this.getAnimationTimeLength(n,i);e=t.startTime-s.length2}}return e}}SuperMapAlgoPlot.GOAnimationManagerBase=x;var O=L.Evented.extend({startTime:0,duration:5,repeat:!1,name:null,animationState:SuperMap.Plot.GOAnimationState.UNKNOWN,goFeature:null,animationGOFeature:null,innerStartTime:0,lastExecute:!1,pauseTime:0,ratio:0,symbolTexts:[],animationPlayType:SuperMap.Plot.AnimationPlayType.UNKNOWN,groupName:null,delayTime:0,playSpeed:1,playPastRatio:0,initialize:function(t){SuperMap.Util.extend(this,t)},destroy:function(){this.showAnimationFeature(!1),this.removeAnimationFeature(),this.goFeature=null,this.animationGOFeature=null,this.name=null,this.animationState=SuperMap.Plot.GOAnimationState.UNKNOWN;for(var t=0;t<this.symbolTexts.length;t++)this.symbolTexts[t]=null;this.symbolTexts=[]},setGOFeature:function(t){if(void 0===t||null===t||null===t.layer)return!1;var e=L.supermap.plotting.getControl().getGOAnimationManager();if(null===e.map)return!1;if(this.goFeature=t,this.animationGOFeature=this.cloneGOFeature(t),null===this.animationGOFeature)return!1;var i=e.getAnimationLayer(t.layer.name);if(i.setSymScaleDefinition(t.layer.getSymScaleDefinition()),i.addFeatures(this.animationGOFeature),this.getGOAnimationType()===SuperMap.Plot.GOAnimationType.ANIMATION_WAY&&0!==t.geoSymbolTexts.length)for(var o=0;o<t.geoSymbolTexts.length;o++){var l=t.geoSymbolTexts[o];if(null!==l){var s=l.getSymbolData();s.associatedUuid=this.animationGOFeature.uuid;var n={symbolData:s,map:l.map,serverUrl:l.serverUrl},a=L.supermap.plotting.PlottingObject.createSymbol(l.libID,l.code,null,n,null);this.symbolTexts.push(a),e.getAnimationLayer(t.layer.name).addFeatures(a)}}return this.showAnimationFeature(!1),!0},getGOFeature:function(){return this.goFeature},setStartTime:function(t){t<0&&(t=0),this.delayTime=t;for(var e=L.supermap.plotting.getControl().getGOAnimationManager(),i=e.getAnimationGroup(this).group,o=i.indexOf(this);o<i.length;o++){var l=i[o];e.changeAnimationTime(l)}e.fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})},getStartTime:function(){return L.supermap.plotting.getControl().getGOAnimationManager().getAnimationDelayTime()},getDuration:function(){return duration},setDuration:function(t){this.duration=t;for(var e=L.supermap.plotting.getControl().getGOAnimationManager(),i=e.getAnimationGroup(this).group,o=i.indexOf(this);o<i.length;o++){var l=i[o];e.changeAnimationTime(l)}e.fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})},getAnimationPlayType:function(){return this.animationPlayType},setAnimationPlayType:function(t){this.animationPlayType=t;for(var e=L.supermap.plotting.getControl().getGOAnimationManager(),i=e.getAnimationGroup(this).group,o=i.indexOf(this);o<i.length;o++){var l=i[o];e.changeAnimationTime(l)}e.fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})},play:function(){var t=new Date;if(this.playSpeedTime=t.getTime()/1e3,this.playTime=t.getTime()/1e3,this.animationState===SuperMap.Plot.GOAnimationState.PAUSE){const e=t.getTime()/1e3-this.pauseTime;this.innerStartTime+=e}else{this.innerStartTime=t.getTime()/1e3;var e=L.supermap.plotting.getControl().getGOAnimationManager();this.goFeature.isSelected&&e.map.getPlotEditControl()&&e.map.getPlotEditControl().unselectFeatures(this.goFeature),this.showAnimationFeature(!0),e.isPause()||(this.playPastRatio=0)}this.lastExecute=!1,this.animationState=SuperMap.Plot.GOAnimationState.PLAYING},stop:function(){this.animationState=SuperMap.Plot.GOAnimationState.STOP},pause:function(){this.animationState=SuperMap.Plot.GOAnimationState.PAUSE;var t=new Date;this.pauseTime=t.getTime()/1e3},reset:function(){this.animationState=SuperMap.Plot.GOAnimationState.RESET,this.showAnimationFeature(!1)},execute:function(){return!1},canExecute:function(){if(this.animationState!==SuperMap.Plot.GOAnimationState.PLAYING)return!1;var t=(new Date).getTime()/1e3;if(this.innerStartTime+this.startTime>t)return!1;var e=this.getRatioByTime();return!(e>1&&this.lastExecute||e<0)},getRatioByTime:function(){if(this.animationState!==SuperMap.Plot.GOAnimationState.PLAYING)return 0;var t=L.supermap.plotting.getControl().getGOAnimationManager();let e=this.computePlayRatio();return e>=1&&!this.lastExecute&&(this.repeat?(e=0,this.lastExecute=!1,this.animationState=SuperMap.Plot.GOAnimationState.PLAYING,t.fire(SuperMap.Plot.Event.animationbegin,{result:this.name}),this.innerStartTime=(new Date).getTime()/1e3,this.playTime=(new Date).getTime()/1e3):(e=1,this.lastExecute=!0,this.animationState=SuperMap.Plot.GOAnimationState.STOP,t.fire(SuperMap.Plot.Event.animationend,{result:this.name})),this.playSpeedTime=(new Date).getTime()/1e3,this.playPastRatio=0),e<0&&(e=0,this.playSpeedTime=(new Date).getTime()/1e3,this.playPastRatio=0),this.ratio=e,e},getPlaySpeed:function(){return this.playSpeed},setPlaySpeed:function(t){t!==this.playSpeed&&(this.setPlayRatioState(),this.playSpeed=t,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()}))},setFastForWardTime:function(t){if(t<0)return;let e=t/this.duration;e>1&&(e=1),this.playPastRatio+=e,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})},setRewindTime:function(t){if(t<0)return;let e=-t/this.duration;e>0&&(e=0),this.playPastRatio+=e,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})},setPlayRatioState:function(){this.playSpeedTime=(new Date).getTime()/1e3,this.playPastRatio=this.ratio},computePlayRatio:function(){let t=0;const e=(new Date).getTime()/1e3,i=this.duration/this.playSpeed;return t=this.playTime===this.playSpeedTime?(e-this.innerStartTime-this.startTime)/i:(e-this.playSpeedTime)/i,t+=this.playPastRatio,this.innerStartTime+this.startTime>=e||t<0?0:t},showAnimationFeature:function(t){if(null!==this.animationGOFeature&&null!==this.animationGOFeature.style&&(this.resetAnimationFeature(t),this.animationGOFeature.redraw()),null!==this.goFeature&&null!==this.goFeature.style){if(t){this.goFeature.style.display="none";for(let t=0;t<this.goFeature.geoSymbolTexts.length;t++)this.goFeature.geoSymbolTexts[t].style.display="none"}else{this.goFeature.style.display="display";for(let t=0;t<this.goFeature.geoSymbolTexts.length;t++)this.goFeature.geoSymbolTexts[t].style.display="display"}this.goFeature.redraw();for(let t=0;t<this.goFeature.geoSymbolTexts.length;t++)this.goFeature.geoSymbolTexts[t].redraw()}},resetAnimationFeature:function(t){if(this.animationGOFeature.symbolData=SuperMap.Plot.PlottingUtil.cloneObject(this.goFeature.getSymbolData()),this.animationGOFeature.symbolData.uuid=this.animationGOFeature.uuid,SuperMap.Plot.AnalysisSymbol.parseSymbolData(this.animationGOFeature,this.animationGOFeature.symbolData,!0),t){this.animationGOFeature.style.display="display";for(let t=0;t<this.symbolTexts.length;t++)this.symbolTexts[t].style.display="display",this.symbolTexts[t].redraw()}else{this.animationGOFeature.style.display="none";for(let t=0;t<this.symbolTexts.length;t++)this.symbolTexts[t].style.display="none",this.symbolTexts[t].redraw();this.getGOAnimationType()!==SuperMap.Plot.GOAnimationType.ANIMATION_BROKENLINE_EXP&&this.getGOAnimationType()!==SuperMap.Plot.GOAnimationType.ANIMATION_CURVE_EXP||null!==this.pathFeature&&(this.pathFeature.options.opacity=0,this.pathFeature.redraw())}},cloneGOFeature:function(t){var e=null,i=L.supermap.plotting.getControl().getGOAnimationManager().goAnimations;if(null!==i)for(var o=0;o<i.length;o++){var l=i[o];if(l.goFeature===t){e=l.animationGOFeature;break}}return null===e&&((e=t.clone()).enableEdit=!1),e},removeAnimationFeature:function(){if(null!==this.animationGOFeature){var t=L.supermap.plotting.getControl().getGOAnimationManager().goAnimations,e=!1;if(null!==t)for(let o=0;o<t.length;o++){var i=t[o];if(i!==this&&i.animationGOFeature===this.animationGOFeature){e=!0;break}}if(!e){this.animationGOFeature.layer.removeFeatures(this.animationGOFeature);for(let t=0;t<this.symbolTexts.length;)symbolTexts[t].layer.removeFeatures(symbolTexts[t])}}},getJSONData:function(){var t={};return t.goFeatureUuid=this.goFeature.uuid,t.name=this.name,t.startTime=this.startTime,t.duration=this.duration,t.repeat=this.repeat,t.playtype=this.animationPlayType,t.type=this.getGOAnimationType(),t},fromJSONData:function(t){this.startTime=t.startTime,this.duration=t.duration,this.repeat=t.repeat,this.animationPlayType=t.playtype}});L.supermap.plotting.GOAnimation=O;var w=O.extend({lineColorAnimation:!1,startLineColor:"#FF0000",endLineColor:"#0000FF",lineWidthAnimation:!1,startLineWidth:0,endLineWidth:5,surroundLineColorAnimation:!1,startSurroundLineColor:"#ffff00",endSurroundLineColor:"#00ffff",surroundLineWidthAnimation:!1,startSurroundLineWidth:0,endSurroundLineWidth:1,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_ATTRIBUTE},resetAnimationFeature:function(t){O.prototype.resetAnimationFeature.call(this,t),t&&(this.animationGOFeature.style.color=this.startLineColor,this.animationGOFeature.style.weight=this.startLineWidth,this.animationGOFeature.style.surroundLineColor=this.startSurroundLineColor,this.animationGOFeature.style.surroundLineWidth=this.startSurroundLineWidth)},execute:function(){if(!this.canExecute())return!1;var t=this.ratio,e=this._executeLineColorAnimation(t),i=this._executeLineWidthAnimation(t),o=this._executeSurroundLineColorAnimation(t),l=this._executeSurroundLineWidthAnimation(t);return e||i||o||l},_executeLineColorAnimation:function(t){if(!this.lineColorAnimation)return!1;var e=SuperMap.Plot.PlottingUtil.colorStringToRGB(this.startLineColor),i=SuperMap.Plot.PlottingUtil.colorStringToRGB(this.endLineColor),o=parseInt(e.red+(i.red-e.red)*t),l=parseInt(e.green+(i.green-e.green)*t),s=parseInt(e.blue+(i.blue-e.blue)*t);return this.animationGOFeature.setStyle({color:SuperMap.Plot.PlottingUtil.colorRGBToString({red:o,green:l,blue:s})}),!0},_executeLineWidthAnimation:function(t){return!!this.lineWidthAnimation&&(this.animationGOFeature.setStyle({weight:this.startLineWidth+(this.endLineWidth-this.startLineWidth)*t}),!0)},_executeSurroundLineColorAnimation:function(t){if(!this.surroundLineColorAnimation)return!1;var e=SuperMap.Plot.PlottingUtil.colorStringToRGB(this.startSurroundLineColor),i=SuperMap.Plot.PlottingUtil.colorStringToRGB(this.endSurroundLineColor),o=parseInt(e.red+(i.red-e.red)*t),l=parseInt(e.green+(i.green-e.green)*t),s=parseInt(e.blue+(i.blue-e.blue)*t);return this.animationGOFeature.setStyle({surroundLineColor:SuperMap.Plot.PlottingUtil.colorRGBToString({red:o,green:l,blue:s})}),!0},_executeSurroundLineWidthAnimation:function(t){return!!this.surroundLineWidthAnimation&&(this.animationGOFeature.setStyle({surroundLineWidth:this.startSurroundLineWidth+(this.endSurroundLineWidth-this.startSurroundLineWidth)*t}),!0)},getJSONData:function(){var t=O.prototype.getJSONData.call(this);return t.lineColorAnimation=this.lineColorAnimation,this.startLineColor&&(t.startLineColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(this.startLineColor)),this.endLineColor&&(t.endLineColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(this.endLineColor)),t.lineWidthAnimation=this.lineWidthAnimation,t.startLineWidth=this.startLineWidth,t.endLineWidth=this.endLineWidth,t.surroundLineColorAnimation=this.surroundLineColorAnimation,this.startSurroundLineColor&&(t.startSurroundLineColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(this.startSurroundLineColor)),this.endSurroundLineColor&&(t.endSurroundLineColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(this.endSurroundLineColor)),t.surroundLineWidthAnimation=this.surroundLineWidthAnimation,t.startSurroundLineWidth=this.startSurroundLineWidth,t.endSurroundLineWidth=this.endSurroundLineWidth,t},fromJSONData:function(t){O.prototype.fromJSONData.call(this,t),this.lineColorAnimation=t.lineColorAnimation,null!=t.startLineColor.red?this.startLineColor=SuperMapAlgoPlot.PlottingUtil.colorRGBToString(t.startLineColor):this.startLineColor=t.startLineColor,null!=t.endLineColor.red?this.endLineColor=SuperMapAlgoPlot.PlottingUtil.colorRGBToString(t.endLineColor):this.endLineColor=t.endLineColor,this.lineWidthAnimation=t.lineWidthAnimation,this.startLineWidth=t.startLineWidth,this.endLineWidth=t.endLineWidth,this.surroundLineColorAnimation=t.surroundLineColorAnimation,null!=t.startSurroundLineColor.red?this.startSurroundLineColor=SuperMapAlgoPlot.PlottingUtil.colorRGBToString(t.startSurroundLineColor):this.startSurroundLineColor=t.startSurroundLineColor,null!=t.endSurroundLineColor.red?this.endSurroundLineColor=SuperMapAlgoPlot.PlottingUtil.colorRGBToString(t.endSurroundLineColor):this.endSurroundLineColor=t.endSurroundLineColor,this.surroundLineWidthAnimation=t.surroundLineWidthAnimation,this.startSurroundLineWidth=t.startSurroundLineWidth,this.endSurroundLineWidth=t.endSurroundLineWidth}});L.supermap.plotting.GOAnimationAttribute=w;var I=O.extend({blinkInterval:500,blinkStyle:SuperMap.Plot.BlinkAnimationBlinkStyle.Blink_Frequency,blinkNumber:0,replaceStyle:SuperMap.Plot.BlinkAnimationReplaceStyle.Replace_NoColor,startColor:"#0000ff",endColor:"#ff0000",getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_BLINK},execute:function(){if(!this.canExecute())return"none"===this.goFeature.style.display&&"none"===this.animationGOFeature.style.display&&(this.animationGOFeature.style.display="display",!0);var t=(new Date).getTime()/1e3,e=this.blinkInterval/1e3;return this.blinkStyle===SuperMap.Plot.BlinkAnimationBlinkStyle.Blink_Number&&(e=this.blinkInterval=this.duration/this.blinkNumber),(t-this.innerStartTime)%e<=e/2?this.replaceStyle===SuperMap.Plot.BlinkAnimationReplaceStyle.Replace_Color?(this.animationGOFeature.style.color=this.startColor,this.animationGOFeature.style.display="display"):this.lastExecute?this.animationGOFeature.style.display="display":this.animationGOFeature.style.display="none":(this.animationGOFeature.style.display="display",this.replaceStyle===SuperMap.Plot.BlinkAnimationReplaceStyle.Replace_Color&&(this.animationGOFeature.style.color=this.endColor)),this.animationGOFeature.redraw(),!0},getJSONData:function(){var t=O.prototype.getJSONData.call(this);return t.blinkStyle=this.blinkStyle,t.blinkInterval=this.blinkInterval,t.blinkNumber=this.blinkNumber,t.replaceStyle=this.replaceStyle,this.startColor&&(t.startColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(this.startColor)),this.endColor&&(t.endColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(this.endColor)),t},fromJSONData:function(t){O.prototype.fromJSONData.call(this,t),this.blinkStyle=t.blinkStyle,this.blinkInterval=t.blinkInterval,this.blinkNumber=t.blinkNumber,this.replaceStyle=t.replaceStyle,null!=t.startColor.red?this.startColor=SuperMapAlgoPlot.PlottingUtil.colorRGBToString(t.startColor):this.startColor=t.startColor,null!=t.endColor.red?this.endColor=SuperMapAlgoPlot.PlottingUtil.colorRGBToString(t.endColor):this.endColor=t.endColor,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animatitonpropertyconfig,{jsonData:t})}});L.supermap.plotting.GOAnimationBlink=I;var C=O.extend({startScale:0,endScale:1,timeSpace:50,lastDrawTime:0,lineLength:0,controlPoints:[],initialize:function(t){O.prototype.initialize.call(this,t),this.controlPoints=[],this.lineLength=0},getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_GROW},setStartScale:function(t){this.startScale=t,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})},getStartScale:function(){return this.startScale},setEndScale:function(t){this.endScale=t,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})},getEndScale:function(){return this.endscale},_execute_1004:function(t){if(0===this.lineLength){this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs());var e=new SuperMap.Geometry.Point((this.controlPoints[0].x+this.controlPoints[1].x)/2,(this.controlPoints[0].y+this.controlPoints[1].y)/2);this.lineLength+=SuperMap.Plot.PlottingUtil.distance(e,this.controlPoints[2]);for(var i=3;i<this.controlPoints.length;i++)this.lineLength+=SuperMap.Plot.PlottingUtil.distance(this.controlPoints[i-1],this.controlPoints[i])}if(0===t)return this._executeAndRatioIsZero(),!0;var o=[],l=[];e=new SuperMap.Geometry.Point((this.controlPoints[0].x+this.controlPoints[1].x)/2,(this.controlPoints[0].y+this.controlPoints[1].y)/2),l.push(e);for(let t=2;t<this.controlPoints.length;t++)l.push(this.controlPoints[t].clone());o.push(this.controlPoints[0]),o.push(this.controlPoints[1]);var s=this._findPos(this.lineLength*t,l);for(let t=1;t<=s.pos;t++)o.push(l[t]);return o.push(s.pts),this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs(o)),!0},_execute_1006:function(t){if(0===this.controlPoints.length){var e=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs());this.controlPoints=SuperMap.Plot.PlottingUtil.operateControlPoints(e)}if(0===t)return this._executeAndRatioIsZero(),!0;var i=this.controlPoints;if(4!=i.length)return!1;var o=i[0],l=i[1],s=i[2],n=i[3],a=SuperMap.Plot.PlottingUtil.distance(o,n),r=SuperMap.Plot.PlottingUtil.distance(l,s),p=SuperMap.Plot.PlottingUtil.linePnt(o,n,a*t),u=SuperMap.Plot.PlottingUtil.linePnt(l,s,r*t),h=[];return h.push(o),h.push(l),h.push(u),h.push(p),null!==this.animationGOFeature.superMapAlgoSymbol&&Object.prototype.hasOwnProperty.call(this.animationGOFeature.superMapAlgoSymbol,"m_bIsAnimation")&&(this.animationGOFeature.superMapAlgoSymbol.m_bIsAnimation=!0),this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs(h)),this.animationGOFeature.superMapAlgoSymbol.m_bIsAnimation=!1,!0},_execute_1002:function(t){if(0===this.lineLength&&(this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs()),this.lineLength=SuperMap.Plot.PlottingUtil.polylineDistance(this.controlPoints)),0===t)return this._executeAndRatioIsZero(),!0;for(var e=[],i=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints),o=this._findPos(this.lineLength*t,i),l=0;l<=o.pos;l++)e.push(i[l]);e.push(o.pts);var s=[];return e.length<3&&(s.push(e[0].clone()),s.push(new SuperMap.Geometry.Point((e[0].x+e[1].x)/2,(e[0].y+e[1].y)/2)),s.push(e[1].clone()),e=s),SuperMap.Plot.AlgoSymbolFactory.isAccessServer(this.animationGOFeature.libID,this.animationGOFeature.code)&&this.goFeature.symbolData.algoMinEditPts>e.length?(this._executeAndRatioIsZero(),!0):(this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs(e)),!0)},_execute_Generalization:function(t){if(0===this.lineLength&&(this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs()),this.lineLength=SuperMap.Plot.PlottingUtil.polylineDistance(this.controlPoints)),0===t)return this._executeAndRatioIsZero(),!0;for(var e=[],i=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints),o=this._findPos(this.lineLength*t,i),l=0;l<=o.pos;l++)e.push(i[l]);return e.push(o.pts),SuperMap.Plot.AlgoSymbolFactory.isAccessServer(this.animationGOFeature.libID,this.animationGOFeature.code)&&this.goFeature.symbolData.algoMinEditPts>e.length?(this._executeAndRatioIsZero(),!0):(this.animationGOFeature.latLngs=L.Util.superMapPointsToLatLngs(e),this.animationGOFeature.redraw(),!0)},_execute_Rect:function(t){0===this.controlPoints.length&&(this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs()));var e=new SuperMap.Geometry.Point((this.controlPoints[0].x+this.controlPoints[1].x)/2,(this.controlPoints[0].y+this.controlPoints[1].y)/2),i=Math.abs(this.controlPoints[0].x-this.controlPoints[1].x)/2*t,o=Math.abs(this.controlPoints[0].y-this.controlPoints[1].y)/2*t,l=new SuperMap.Geometry.Point(e.x-i,e.y+o),s=new SuperMap.Geometry.Point(e.x+i,e.y-o);return this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs([l,s])),!0},_execute_Circle:function(t){0===this.controlPoints.length&&(this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs()));var e=this.controlPoints[0].clone(),i=t*Math.sqrt((this.controlPoints[0].x-this.controlPoints[1].x)*(this.controlPoints[0].x-this.controlPoints[1].x)+(this.controlPoints[0].y-this.controlPoints[1].y)*(this.controlPoints[0].y-this.controlPoints[1].y));return this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs([e,new SuperMap.Geometry.Point(e.x+i,e.y)])),!0},_execute_Kidney:function(t){if(0===this.controlPoints.length&&(this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs())),0===t)return this._executeAndRatioIsZero(),!0;var e=[],i=this.controlPoints.length,o=SuperMap.Plot.PlottingUtil.getPolygonCenterPt(this.controlPoints);if(null===o)return this._executeAndRatioIsZero(),!0;for(var l=0;l<i;l++){var s=SuperMap.Plot.PlottingUtil.distance(o,this.controlPoints[l]),n=s*t;if(n>s)return!1;var a=SuperMap.Plot.PlottingUtil.linePnt(o,this.controlPoints[l],n);e.push(a)}return this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs(e)),!0},_execute_RegularPloygon:function(t){if(0===this.controlPoints.length&&(this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs())),0===t)return this._executeAndRatioIsZero(),!0;var e=this.controlPoints.length,i=SuperMap.Plot.PlottingUtil.distance(this.controlPoints[0],this.controlPoints[this.controlPoints.length-1])*t,o=new SuperMap.Geometry.Point(this.controlPoints[0].x+i,this.controlPoints[0].y),l=2*Math.PI/(e+1),s=Math.PI/2+this.animationGOFeature.dRotate,n=o;SuperMap.Plot.PlottingUtil.rotateAngle(this.controlPoints[0],s,n);var a=[];a.push(this.controlPoints[0].clone()),a.push(n);for(var r=n.clone(),p=1;p<e-1;p++)SuperMap.Plot.PlottingUtil.rotateAngle(this.controlPoints[0],l,r),a.push(r.clone());return this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs(a)),!0},_execute_Ellipse:function(t){0===this.controlPoints.length&&(this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs()));var e=SuperMap.Plot.PlottingUtil.findPointOnLineByRatio(t,this.controlPoints[0],this.controlPoints[1]),i=SuperMap.Plot.PlottingUtil.findPointOnLineByRatio(t,this.controlPoints[0],this.controlPoints[2]);return this.animationGOFeature.latLngs[1]=L.latLng(e.y,e.x),this.animationGOFeature.latLngs[2]=L.latLng(i.y,i.x),this.animationGOFeature.redraw(),!0},_execute_ArbitraryPolygon:function(t){0===this.controlPoints.length&&(this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs()));var e=this.controlPoints.length,i=SuperMap.Plot.PlottingUtil.getPolygonCenterPt(this.controlPoints);if(null===i)return this._executeAndRatioIsZero(),!0;for(var o=[],l=0;l<e;l++){var s=SuperMap.Plot.PlottingUtil.distance(i,this.controlPoints[l])*t,n=SuperMap.Plot.PlottingUtil.linePnt(i,this.controlPoints[l],s);o.push(n)}return this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs(o)),!0},_execute_ParallelLine:function(t){if(0===this.lineLength){this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs());for(let t=2;t<this.controlPoints.length;t++)this.lineLength+=SuperMap.Plot.PlottingUtil.distance(this.controlPoints[t-1],this.controlPoints[t])}var e=[],i=[];for(let t=1;t<this.controlPoints.length;t++)i.push(this.controlPoints[t].clone());var o=this._findPos(this.lineLength*t,i);e.push(this.controlPoints[0].clone());for(let t=0;t<=o.pos;t++)e.push(i[t]);return e.push(o.pts),this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs(e)),!0},_execute_Polybezier:function(t){if(0===this.lineLength){this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs());var e=SuperMapAlgoPlot.PlottingUtil.computeBeizerPoints(this.goFeature.isEdit,this.controlPoints,this.goFeature.scaleValues).beizerPoints;this.lineLength+=SuperMap.Plot.PlottingUtil.polylineDistance(e)}var i=[];e=SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(this.controlPoints,[]);for(var o=this._findPos(this.lineLength*t,e),l=0;l<=o.pos;l++)i.push(e[l].clone());return i.push(o.pts),this.animationGOFeature.superMapAlgoSymbol.m_bIsAnimation=!0,this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs(i)),this.animationGOFeature.superMapAlgoSymbol.m_bIsAnimation=!1,!0},_execute_CurveEight:function(t){0===this.controlPoints.length&&(this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs()));for(var e=SuperMap.Plot.PlottingUtil.getPolygonCenterPt(this.controlPoints),i=[],o=0;o<this.controlPoints.length;o++){var l=SuperMap.Plot.PlottingUtil.distance(e,this.controlPoints[o])*t,s=SuperMap.Plot.PlottingUtil.linePnt(e,this.controlPoints[o],l);i.push(s)}return this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs(i)),!0},_execute_AnnotationFrame:function(t){if(0===this.lineLength&&(this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs()),this.lineLength=SuperMap.Plot.PlottingUtil.polylineDistance(this.controlPoints)),0===t)return this._executeAndRatioIsZero(),!0;var e=[],i=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if(this.goFeature.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXTBOX||this.goFeature.symbolType===SuperMap.Plot.SymbolType.LINEMARKING){var o=[];o.push(this.controlPoints[0]),o.push(new SuperMap.Geometry.Point(this.goFeature.scaleValues[1],this.goFeature.scaleValues[2]));var l=SuperMap.Plot.PlottingUtil.polylineDistance(o),s=this._findPos(l*t,o);this.animationGOFeature.scaleValues[1]=s.pts.x,this.animationGOFeature.scaleValues[2]=s.pts.y}else for(var n=this.goFeature.scaleValues.length/2,a=0;a<n;a++){var r=[];r.push(this.controlPoints[0]),r.push(new SuperMap.Geometry.Point(this.goFeature.scaleValues[2*a],this.goFeature.scaleValues[2*a+1]));var p=SuperMap.Plot.PlottingUtil.polylineDistance(r),u=this._findPos(p*t,r);this.animationGOFeature.scaleValues[2*a]=u.pts.x,this.animationGOFeature.scaleValues[2*a+1]=u.pts.y}for(var h=this._findPos(this.lineLength*t,i),g=0;g<=h.pos;g++)e.push(i[g]);return e.push(h.pts),this.animationGOFeature.latLngs=L.Util.superMapPointsToLatLngs(e),this.animationGOFeature.redraw(),!0},_executeAndRatioIsZero:function(){this.animationGOFeature.setLatLngs([]),this.animationGOFeature.grow=SuperMap.Plot.AlgoSymbolFactory.isAccessServer(this.animationGOFeature.libID,this.animationGOFeature.code)},resetAnimationFeature:function(t){O.prototype.resetAnimationFeature.call(this,t),this.lineLength=0,this.controlPoints=[],this.startScale<0&&(this.startScale=0),this.startScale>1&&(this.startScale=1),this.endScale<0&&(this.endScale=0),this.endScale>1&&(this.endScale=1)},execute:function(){if(!(this.goFeature instanceof v))return!1;if(!this.canExecute())return!1;this.endScale>1&&(this.endScale=1);var t=(new Date).getTime();if(this.lastDrawTime>0&&t-this.timeSpace<this.lastDrawTime)return!1;var e=this.startScale+this.ratio*(this.endScale-this.startScale);return this.lastDrawTime=t,this._executeAnimation(e)},_executeAnimation:function(t){var e=!1,i=this.animationGOFeature.code,o=this.animationGOFeature.libID;if(0===o)switch(i){case SuperMap.Plot.SymbolType.KIDNEY:case SuperMap.Plot.SymbolType.POLYBEZIERCLOSESYMBOL:case SuperMap.Plot.SymbolType.PARALLELOGRAM:case SuperMap.Plot.SymbolType.TRAPEZOIDSYMBOL:e=this._execute_Kidney(t);break;case SuperMap.Plot.SymbolType.CIRCLESYMBOL:e=this._execute_Circle(t);break;case SuperMap.Plot.SymbolType.RECTANGLESYMBOL:e=this._execute_Rect(t);break;case SuperMap.Plot.SymbolType.REGULARPOLYGON:e=this._execute_RegularPloygon(t);break;case SuperMap.Plot.SymbolType.ELLIPSESYMBOL:e=this._execute_Ellipse(t);break;case SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL:case SuperMap.Plot.SymbolType.POLYGONREGION:e=this._execute_ArbitraryPolygon(t);break;case SuperMap.Plot.SymbolType.PARALLELLINE:e=this._execute_ParallelLine(t);break;case SuperMap.Plot.SymbolType.POLYBEZIERSYMBOL:e=this._execute_Polybezier(t);break;case SuperMap.Plot.SymbolType.PIESYMBOL:case SuperMap.Plot.SymbolType.CHORDSYMBOL:case SuperMap.Plot.SymbolType.ARCSYMBOL:case SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL:return!1;case SuperMap.Plot.SymbolType.CURVEEIGHT:e=this._execute_CurveEight(t);break;case SuperMap.Plot.SymbolType.ANNOFRAMESYMBOLM:case SuperMap.Plot.SymbolType.SYMBOLTEXTBOX:case SuperMap.Plot.SymbolType.LINEMARKING:e=this._execute_AnnotationFrame(t);break;default:e=this._execute_Generalization(t)}else if(22===o)switch(i){case 1004:case 2004:case 1010:e=this._execute_1004(t);break;case 1006:case 2006:e=this._execute_1006(t);break;case 1002:case 2002:e=this._execute_1002(t);break;case 32:case 3211:e=this._execute_ArbitraryPolygon(t);break;case 390:case 3911:e=this._execute_Kidney(t);break;default:e=this._execute_Generalization(t)}else if(100===o)switch(i){case 25200:e=this._execute_1004(t);break;default:e=this._execute_Generalization(t)}else if(421===o)switch(i){case 311:e=this._execute_1004(t);break;case 317:e=this._execute_1006(t);break;default:e=this._execute_Generalization(t)}else if(123===o)switch(i){case 60310:case 6031001:e=this._execute_1004(t);break;default:e=this._execute_Generalization(t)}else e=this._execute_Generalization(t);return this.animationGOFeature.grow=SuperMap.Plot.AlgoSymbolFactory.isAccessServer(this.animationGOFeature.libID,this.animationGOFeature.code),e},_findPos:function(t,e){var i,o=0,l=0;for(i=1;i<e.length&&!(o+(l=SuperMap.Plot.PlottingUtil.distance(e[i-1],e[i]))>=t);i++)o+=l;var s,n=new Object;return s=i<e.length?SuperMap.Plot.PlottingUtil.findPoint(e[i-1],e[i],t-o,0):e[i-1].clone(),n.pos=i-1,n.pts=s,n},getJSONData:function(){var t=O.prototype.getJSONData.call(this);return t.startScale=this.startScale,t.endScale=this.endScale,t},fromJSONData:function(t){O.prototype.fromJSONData.call(this,t),this.startScale=t.startScale,this.endScale=t.endScale,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animatitonpropertyconfig,{jsonData:t})}});L.supermap.plotting.GOAnimationGrow=C;var E=O.extend({rotateDirection:SuperMap.Plot.RotateDirection.ClockWise,startAngle:0,endAngle:360,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_ROTATE},resetAnimationFeature:function(t){this.animationGOFeature._rotate(this.goFeature.dRotate-this.animationGOFeature.dRotate,this.animationGOFeature.getLatLngs()[0]),O.prototype.resetAnimationFeature.call(this,t)},execute:function(){if(this.goFeature.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL)return!1;if(!this.canExecute())return!1;var t=this.ratio,e=this._getCurrentAngle(this.startAngle,this.endAngle,t),i=this.animationGOFeature.dRotate;return this.animationGOFeature._rotate(e-i,this.animationGOFeature.getLatLngs()[0]),!0},_getCurrentAngle:function(t,e,i){var o=0,l=e-t,s=parseInt(Math.abs(l/360));if(t!==e)if(this.rotateDirection===SuperMap.Plot.RotateDirection.AntiClockWise)l<0&&(l+=360*(2*s+1)),o=t+l*i;else{var n=0;o=t+(360-(l=0===(n=l<0?l+360*(s+1):l-360*s)?360*s:360-n+360*s)*i)}return o},getJSONData:function(){var t=O.prototype.getJSONData.call(this);return t.rotateDirection=this.rotateDirection,t.startAngle=this.startAngle,t.endAngle=this.endAngle,t},fromJSONData:function(t){O.prototype.fromJSONData.call(this,t),this.rotateDirection=t.rotateDirection,this.startAngle=t.startAngle,this.endAngle=t.endAngle}});L.supermap.plotting.GOAnimationRotate=E;var D=O.extend({startScale:0,endScale:1,lastScale:null,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_SCALE},resetAnimationFeature:function(t){this.lastScale=null,this.animationGOFeature._resize(this.goFeature.initialScale.x/this.animationGOFeature.initialScale.x,this.animationGOFeature.getLatLngs()[0]),O.prototype.resetAnimationFeature.call(this,t)},execute:function(){if(this.goFeature.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL)return!1;if(!this.canExecute())return!1;this.lastScale=this.animationGOFeature.initialScale.x;var t=this.startScale;0===t&&(t=.1);var e=this.endScale;0===e&&(e=.1);var i=this.goFeature.initialScale.x*(t+this.ratio*(e-t));return this.animationGOFeature._resize(i/this.lastScale,this.animationGOFeature.getLatLngs()[0]),!0},getJSONData:function(){var t=O.prototype.getJSONData.call(this);return t.startScale=this.startScale,t.endScale=this.endScale,t},fromJSONData:function(t){O.prototype.fromJSONData.call(this,t),this.startScale=t.startScale,this.endScale=t.endScale,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animatitonpropertyconfig,{jsonData:t})}});L.supermap.plotting.GOAnimationScale=D;var U=O.extend({showEffect:!1,finalDisplay:!1,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_SHOW},execute:function(){if(!this.canExecute())return!1;var t=this.ratio;return this.showEffect?this._executeHaveEffect(t):this._executeNoEffect(t),!0},_executeNoEffect:function(t){this.finalDisplay?this.animationGOFeature.style.display=1-t<.01?"display":"none":this.animationGOFeature.style.display=1-t<.01?"none":"display",this.animationGOFeature.redraw()},_executeHaveEffect:function(t){this.finalDisplay||(t=1-t);var e=parseFloat(t)<0||parseFloat(t);e=parseFloat(t)>1?1:parseFloat(t),this.animationGOFeature.style.display="display",this.animationGOFeature.style.opacity=e,this.animationGOFeature.style.fontOpacity=e,this.animationGOFeature.style.surroundLineColorOpacity=this.goFeature.style.surroundLineColorOpacity*t,this.animationGOFeature.style.fill&&(this.animationGOFeature.style.fillOpacity=this.goFeature.style.fillOpacity*t,this.animationGOFeature.style.fillBackOpacity=this.goFeature.style.fillBackOpacity*t),this.animationGOFeature.redraw()},getJSONData:function(){var t=O.prototype.getJSONData.call(this);return t.showEffect=this.showEffect,t.finalDisplay=this.finalDisplay,t},fromJSONData:function(t){O.prototype.fromJSONData.call(this,t),this.showEffect=t.showEffect,this.finalDisplay=t.finalDisplay,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animatitonpropertyconfig,{jsonData:t})}});L.supermap.plotting.GOAnimationShow=U;var N=O.extend({showPath:!1,tangentDirection:!1,pathWidth:1,pathColor:"#FF0000",currentPt:null,pathType:SuperMap.Plot.WayPathType.POLYLINE,wayPoints:null,shapePoints:null,pathFeature:null,pathLength:0,path:null,destroy:function(){null!==this.pathFeature&&(L.supermap.plotting.getControl().getGOAnimationManager().map.removeLayer(this.pathFeature),this.pathFeature=null);O.prototype.destroy.call(this)},getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_WAY},setShowPath:function(t){this.showPath=t,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})},setPath:function(t){this.path=t},setTangentDirection:function(t){this.tangentDirection=t,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})},resetAnimationFeature:function(t){O.prototype.resetAnimationFeature.call(this,t);var e=this.goFeature.dRotate,i=this.animationGOFeature.dRotate;this.animationGOFeature._rotate(e-i,this.animationGOFeature.getLatLngs()[0]),t&&(null!==this.pathFeature&&null!==this.shapePoints||(this._makePath(),this.pathColor&&(this.pathFeature.options.color=this.pathColor),this.pathWidth&&(this.pathFeature.options.weight=this.pathWidth)),this.pathFeature.options.opacity=0,1!==this.animationGOFeature.symbolType&&(this.pathFeature.options.opacity=0),this.pathFeature.setStyle())},execute:function(){if(this.goFeature.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL)return null!==this.pathFeature&&(this.pathFeature.options.opacity=0),!1;if(!this.canExecute())return!1;this.showPath&&0===this.pathFeature.options.opacity&&(this.pathFeature.options.opacity=1,this.pathFeature.setStyle());var t=this.ratio,e=t*this.pathLength,i=new Object,o=this._findPos(e,this.shapePoints,i);this.currentPt=o.clone();var l=this.animationGOFeature.getLatLngs()[0],s=o.y-l.lat,n=o.x-l.lng;if(this.animationGOFeature.move(s,n),this.tangentDirection){null==this.prevAngle&&(this.prevAngle=0);var a=i.angle;1===t&&(a=0),this.animationGOFeature._rotate(a-this.prevAngle,this.animationGOFeature.getLatLngs()[0]),this.prevAngle=a}return!0},setWayPoints:function(t){(!t||!SuperMap.Util.isArray(t)||2>t.length)&&(t=[this.goFeature.getLatLngs()[0],this.goFeature.getLatLngs()[0]]),this.wayPoints=[],this.wayPoints=L.Util.cloneLatLngs(t);var e=L.supermap.plotting.getControl().getGOAnimationManager();null!==this.pathFeature&&(e.map.removeLayer(this.pathFeature),this.pathFeature=null),e.fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})},getWayPoints:function(){return this.wayPoints},getCurrentPt:function(){return this.currentPt},setPathColor:function(t){t&&(this.pathColor=t,this.pathFeature&&null!==this.pathFeature&&(this.pathFeature.options.color=this.pathColor,this.pathFeature.setStyle(this.pathFeature.options),L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})))},getPathColor:function(){return this.pathColor},setPathWidth:function(t){t&&(this.pathWidth=t,this.pathFeature&&null!==this.pathWidth&&(this.pathFeature.options.weight=this.pathWidth,this.pathFeature.setStyle(this.pathFeature.options),L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})))},getPathWidth:function(){return this.pathWidth},setPathType:function(t){if(void 0!==t&&null!==t&&this.pathType!==t){this.pathType=t;var e=L.supermap.plotting.getControl().getGOAnimationManager();null!==this.pathFeature&&(e.map.removeLayer(this.pathFeature),this.pathFeature.destroy(),this.pathFeature=null),e.fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})}},getPathType:function(){return this.pathType},_makePath:function(){((null===this.wayPoints||2>this.wayPoints.length)&&(this.wayPoints=[this.goFeature.getLatLngs()[0],this.goFeature.getLatLngs()[0]]),null===this.pathFeature)&&(this.pathType===SuperMap.Plot.WayPathType.POLYLINE?this.shapePoints=L.Util.latLngsToSuperMapPoints(this.wayPoints):this.shapePoints=SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(L.Util.latLngsToSuperMapPoints(this.wayPoints)),this.pathFeature=L.polyline(L.Util.superMapPointsToLatLngs(this.shapePoints),SuperMap.Plot.PlottingUtil.cloneObject(this.animationGOFeature.style)),L.supermap.plotting.getControl().getGOAnimationManager().map.addLayer(this.pathFeature));this.pathLength=0;for(var t=1;t<this.shapePoints.length;t++)this.pathLength+=SuperMap.Plot.PlottingUtil.distance(this.shapePoints[t-1],this.shapePoints[t]);return this.pathFeature},_findPos:function(t,e,i){var o,l=0,s=0;for(o=1;o<e.length&&!(l+(s=SuperMap.Plot.PlottingUtil.distance(e[o-1],e[o]))>=t);o++)l+=s;var n=SuperMap.Plot.PlottingUtil.findPoint(e[o-1],e[o],t-l,0);return this.tangentDirection&&(i.angle=SuperMap.Plot.PlottingUtil.radian(n,e[o])/Math.PI*180),n},getJSONData:function(){var t=O.prototype.getJSONData.call(this);t.showPath=this.showPath,t.tangentDirection=this.tangentDirection,t.pathType=this.pathType,t.pathWidth=this.pathWidth,this.pathColor&&(t.pathColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(this.pathColor)),t.wayPoints=[];for(var e=0;e<this.wayPoints.length;e++)t.wayPoints.push({x:this.wayPoints[e].lng,y:this.wayPoints[e].lat});return t},fromJSONData:function(t){O.prototype.fromJSONData.call(this,t),this.showPath=t.showPath,this.tangentDirection=t.tangentDirection,this.pathType=t.pathType,this.pathWidth=t.pathWidth,null!=t.pathColor.red?this.pathColor=SuperMapAlgoPlot.PlottingUtil.colorRGBToString(t.pathColor):this.pathColor=t.pathColor;for(var e=[],i=0;i<t.wayPoints.length;i++)e.push(L.latLng(t.wayPoints[i].y,t.wayPoints[i].x));this.setWayPoints(e),L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animatitonpropertyconfig,{jsonData:t})}});L.supermap.plotting.GOAnimationWay=N;var R=N.extend({geoGraphicObject:null,duration:5,animationPlayType:SuperMap.Plot.AnimationPlayType.PLAYFROMNOW,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_WAY_EXP},setPath:function(t){if(t instanceof AlgoSymbol){let t=[];for(let e=0;e<value.components.length;e++){const i=value.components[e];t=t.concat(i.shapePts)}this.setWayPoints(t)}}});L.supermap.plotting.AnimationWay=R;var B=N.extend({pathType:SuperMap.Plot.WayPathType.CURVE,duration:5,animationPlayType:SuperMap.Plot.AnimationPlayType.PLAYFROMNOW,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_CURVE_EXP}});L.supermap.plotting.AnimationCurve=B;var F=N.extend({pathType:SuperMap.Plot.WayPathType.POLYLINE,duration:5,animationPlayType:SuperMap.Plot.AnimationPlayType.PLAYFROMNOW,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_BROKENLINE_EXP}});L.supermap.plotting.AnimationBrokenline=F;var k=C.extend({startScale:0,endScale:1,duration:2,animationPlayType:SuperMap.Plot.AnimationPlayType.PLAYFROMNOW,initialize:function(t){C.prototype.initialize.call(this,t)},getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_GROW_EXP},resetAnimationFeature:function(t){C.prototype.resetAnimationFeature.call(this,t),this.startScale=0,this.endScale=1}});L.supermap.plotting.AnimationGrow=k;var V=C.extend({startScale:1,endScale:0,duration:1,animationPlayType:SuperMap.Plot.AnimationPlayType.PLAYFROMNOW,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_REDUCE_EXP},resetAnimationFeature:function(t){C.prototype.resetAnimationFeature.call(this,t),this.startScale=1,this.endScale=0}});L.supermap.plotting.AnimationReduce=V;var Y=U.extend({showEffect:!0,finalDisplay:!0,duration:3,animationPlayType:SuperMap.Plot.AnimationPlayType.PLAYFROMNOW,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_MOVEIN_EXP}});L.supermap.plotting.AnimationMoveIn=Y;var z=U.extend({showEffect:!0,finalDisplay:!1,duration:1,animationPlayType:SuperMap.Plot.AnimationPlayType.PLAYFROMNOW,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_MOVEOUT_EXP}});L.supermap.plotting.AnimationMoveOut=z;var G=D.extend({startScale:0,endScale:1,duration:2,animationPlayType:SuperMap.Plot.AnimationPlayType.PLAYFROMNOW,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_ZOOMIN_EXP}});L.supermap.plotting.AnimationZoomIn=G;var W=D.extend({startScale:1,endScale:0,duration:2,animationPlayType:SuperMap.Plot.AnimationPlayType.PLAYFROMNOW,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_ZOOMOUT_EXP}});L.supermap.plotting.AnimationZoomOut=W;var j=U.extend({showEffect:!1,finalDisplay:!0,duration:1,animationPlayType:SuperMap.Plot.AnimationPlayType.PLAYFROMNOW,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_SHOW_EXP}});L.supermap.plotting.AnimationShow=j;var X=U.extend({showEffect:!1,finalDisplay:!1,duration:1,animationPlayType:SuperMap.Plot.AnimationPlayType.PLAYFROMNOW,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_HIDE_EXP}});L.supermap.plotting.AnimationHide=X;var H=I.extend({bVisible:!1,duration:2,animationPlayType:SuperMap.Plot.AnimationPlayType.PLAYFROMNOW,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_BLINK_EXP},getVisible:function(){return this.bVisible},setVisible(t){this.bVisible=t},getJSONData:function(){var t=I.prototype.getJSONData.call(this);return t.bVisible=this.bVisible,t},fromJSONData:function(t){I.prototype.fromJSONData.call(this,t),this.bVisible=t.bVisible}});L.supermap.plotting.AnimationBlink=H;class Z extends x{constructor(t,e,i){super(i),this.serverUrl=null,this.map=null,this.goAnimationLayers=[],this.initialize(t,e,i),this.options={serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}}}initialize(t,e,i){null===this.goAnimations&&(this.goAnimations=[]),t&&null!==t&&null===this.map&&this.setMap(t),e&&null===this.serverUrl&&(this.serverUrl=e),i&&SuperMap.Util.extend(this.options,i)}destroy(){Z.prototype.goAnimations=null;for(let t=0;t<this.goAnimationLayers.length;t++)this.map.removeLayer(this.goAnimationLayers[t]),this.goAnimationLayers[t].destroy();this.goAnimationLayers=[],this.map=null,this.serverUrl=null}setMap(t){if(null===t)return!1;this.map=t}getAnimationLayer(t){for(let e=0;e<this.goAnimationLayers.length;e++)if(this.goAnimationLayers[e].name===t+"_animation")return this.goAnimationLayers[e];var e=L.supermap.plotting.animationLayer(t+"_animation",{displayInLayerSwitcher:!1});return this.map.addLayer(e),this.goAnimationLayers.push(e),e}createGOAnimation(t,e,i,o=!0,l=SuperMap.Plot.AnimationPlayType.UNKNOWN){var s,n=this.createGOAnimationByType(t,e);if(null===n)return null;if(i._eventParents)for(var a in i._eventParents)s=i._eventParents[a];return i instanceof L.supermap.plotting.Route||s instanceof L.supermap.plotting.Route?null:n.setGOFeature(i)?(this.goAnimations.push(n),l!==SuperMap.Plot.AnimationPlayType.UNKNOWN&&n.setAnimationPlayType(l),o&&this.fire(SuperMap.Plot.Event.animationcreated,{goAnimation:n}),n):null}findGOAnimationByName(t){if(null===this.goAnimations||null===t||""===t)return null;for(var e=null,i=0;i<this.goAnimations.length;i++)if(this.goAnimations[i].name===t){e=this.goAnimations[i];break}return e}findGOAnimationsByFeature(t){var e=[];if(null===this.goAnimations||"undefined"===t||null===t)return e;for(var i=0;i<this.goAnimations.length;i++)this.goAnimations[i].getGOFeature()===t&&e.push(this.goAnimations[i]);return e}findGOAnimationsByUuid(t){if(null===this.goAnimations||"undefined"===t||null===t)return[];var e=this.map.getFeatureByUuid(t);return this.findGOAnimationsByFeature(e)}removeGOAnimationByName(t){if(null===this.goAnimations||null===t||""===t)return!1;var e=this.findGOAnimationByName(t);return this.removeGOAnimation(e)}removeGOAnimation(t){if(null===this.goAnimations||null===t)return!1;for(var e=0;e<this.goAnimations.length;e++)if(this.goAnimations[e]===t){t.reset();var i=this.getAnimationGroup(t).group,o=this.getAnimationGroup(t).index;this.goAnimations.splice(e,1),t.destroy(),i.splice(o,1);for(var l=o;l<i.length;l++){var s=i[l];this.changeAnimationTime(s)}break}return this.fire(SuperMap.Plot.Event.animationdeleted,{result:t}),!0}removeAllGOAnimation(){if(null!==this.goAnimations){for(var t=0;t<this.goAnimations.length;t++)this.removeGOAnimation(this.goAnimations[t]);this.goAnimations=[]}}execute(){if(0===this.goAnimations.length)return!1;for(let t=0;t<this.goAnimations.length;t++)this.goAnimations[t].execute();if(this.hasGrowAnimation())for(let t=0;t<this.goAnimations.length;t++)this.redrawFeature(this.goAnimations[t].animationGOFeature);return 0!==this.goAnimations.length||void 0}hasGrowAnimation(){if(null===this.goAnimations)return!1;for(var t=0;t<this.goAnimations.length;t++)if(!0===this.goAnimations[t].animationGOFeature.grow&&this.goAnimations[t].canExecute())return!0}redrawFeature(t){if(!(t.grow&&t instanceof v))return!0;var e=new SuperMap.GetSymbolInfoParameters;e.libID=t.libID,e.code=t.code,e.surroundLineType=t.surroundLineType,e.inputPoints=L.Util.latLngsToSuperMapPoints(t.getLatLngs()),e.subSymbols=t.subSymbols,e.scaleValues=t.scaleValues,L.supermap.symbolInfoService(t.serverUrl,this.options.serviceParams).getSymbolInfo(e,function(e){t.symbolData.innerCells=e.result.innerCells,t.redraw()},this)}createGOAnimationByType(t,e){if(null===e||""===e||null===this.map)return null;if(null!==this.findGOAnimationByName(e))return null;var i=null;switch(t){case SuperMap.Plot.GOAnimationType.ANIMATION_WAY:i=new N;break;case SuperMap.Plot.GOAnimationType.ANIMATION_BLINK:i=new I;break;case SuperMap.Plot.GOAnimationType.ANIMATION_ATTRIBUTE:i=new w;break;case SuperMap.Plot.GOAnimationType.ANIMATION_SHOW:i=new U;break;case SuperMap.Plot.GOAnimationType.ANIMATION_ROTATE:i=new E;break;case SuperMap.Plot.GOAnimationType.ANIMATION_SCALE:i=new D;break;case SuperMap.Plot.GOAnimationType.ANIMATION_GROW:i=new C;break;case SuperMap.Plot.GOAnimationType.ANIMATION_GROW_EXP:i=new k;break;case SuperMap.Plot.GOAnimationType.ANIMATION_REDUCE_EXP:i=new V;break;case SuperMap.Plot.GOAnimationType.ANIMATION_SHOW_EXP:i=new j;break;case SuperMap.Plot.GOAnimationType.ANIMATION_HIDE_EXP:i=new X;break;case SuperMap.Plot.GOAnimationType.ANIMATION_MOVEIN_EXP:i=new Y;break;case SuperMap.Plot.GOAnimationType.ANIMATION_MOVEOUT_EXP:i=new z;break;case SuperMap.Plot.GOAnimationType.ANIMATION_ZOOMIN_EXP:i=new G;break;case SuperMap.Plot.GOAnimationType.ANIMATION_ZOOMOUT_EXP:i=new W;break;case SuperMap.Plot.GOAnimationType.ANIMATION_BLINK_EXP:i=new H;break;case SuperMap.Plot.GOAnimationType.ANIMATION_WAY_EXP:i=new R;break;case SuperMap.Plot.GOAnimationType.ANIMATION_BROKENLINE_EXP:i=new F;break;case SuperMap.Plot.GOAnimationType.ANIMATION_CURVE_EXP:i=new B;break;default:return null}return null!==i&&(i.name=e),i}getJSONData(){for(var t={animations:[]},e=0;e<this.goAnimations.length;e++)t.animations.push(this.goAnimations[e].getJSONData());return t}fromJSONData(t){if(Object.prototype.hasOwnProperty.call(t,"ANIMATIONSJSON"))for(let i=0;i<t.AnimationGroups.length;i++)for(let o=0;o<t.AnimationGroups[i].Animations.length;o++){let l=t.AnimationGroups[i].Animations[o],s=l.goLayerUuid||l.goFeatureUuid,n=this.map.getFeatureByUuid(s),a=l.name,r=l.type;if(n&&a&&-1!==r)null!==(e=this.createGOAnimation(r,a,n))&&e.fromJSONData(l)}else for(let i=0;i<t.animations.length;i++){let o=t.animations[i],l=o.goFeatureUuid||o.goLayerUuid,s=this.map.getFeatureByUuid(l),n=o.name,a=o.type;var e;if(s&&n&&-1!==a)null!==(e=this.createGOAnimation(a,n,s))&&e.fromJSONData(o)}}saveEvoFile(){}openEvoFileOnServer(){}}L.supermap.plotting.goAnimationManager=function(t,e,i){return new Z(t,e,i)};var J=L.Evented.extend({map:null,serverUrl:null,smlInfo:null,smlFileName:null,options:{serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},initialize:function(t,e,i){i&&SuperMap.Util.extend(this.options,i),t&&null!==t&&null===this.map&&(J.prototype.map=t),e&&null===this.serverUrl&&(J.prototype.serverUrl=e),null===this.smlInfo&&(J.prototype.smlInfo=new SuperMap.Plot.SMLInfoStruct),null===this.smlFileName&&(J.prototype.smlFileName="situationMap")},destroy:function(){J.prototype.map=null,J.prototype.smlInfo.destroy(),J.prototype.smlInfo=null,J.prototype.smlFileName=null,J.prototype.serverUrl=null},getSitDataLayers:function(){return this.map.getPlottingLayers()},getSmlData:function(){var t=this.map.getPlottingLayers(),e=new SuperMap.Plot.SitDataStruct;e.smlInfo=this.smlInfo;var i=new SuperMap.Plot.MapInfoStruct;i.zoom=this.map.getZoom(),i.centerX=this.map.getCenter().lng,i.centerY=this.map.getCenter().lat,e.mapInfo=i,e.layerDatas=[];for(var o=0;o<t.length;o++){var l=t[o].features,s=new SuperMap.Plot.LayerDataStruct;s.layerName=t[o].name,s.spatialAnalystUrl=t[o].spatialAnalystUrl,this.map instanceof L.Map?this.map.getRenderer(t[o])instanceof L.Canvas&&(s.useCanvas=!0):(s.useCanvas=t[o].useCanvas,s.useCanvas2=t[o].useCanvas2),s.isEditable=t[o].getEditable(),s.isLocked=t[o].getLocked(),s.visibility=t[o].getVisibility(),s.features=l,e.layerDatas.push(s)}return SuperMap.Plot.PlottingUtil.toJSON(e)},openSmlData:function(t){if(this.smlInfo.fromJSON(t.smlInfo),t.mapInfo){var e=new SuperMap.Plot.MapInfoStruct;e.fromJSON(t.mapInfo),null!==e.zoom&&null!==e.centerX&&null!==e.centerY&&this.map.setView(L.latLng(e.centerY,e.centerX),e.zoom,{reset:!0})}var i,o=t.layerDatas;this.map.clearPlottingLayers();for(var l=0,s=o.length;l<s;l++)(i=L.supermap.plotting.plottingLayer(o[l].layerName,this.serverUrl,{renderer:L.canvas(),serviceParams:this.options.serviceParams})).spatialAnalystUrl=o[l].spatialAnalystUrl,this.map.addLayer(i),this._load(o[l],i),void 0!==o[l].isEditable&&null!==o[l].isEditable&&i.setEditable(o[l].isEditable),void 0!==o[l].isLocked&&null!==o[l].isLocked&&i.setLocked(o[l].isLocked),void 0!==o[l].visibility&&null!==o[l].visibility&&i.setVisibility(o[l].visibility),void 0!==o[l].minVisibleScale&&null!==o[l].minVisibleScale&&i.setMinVisibleScale(o[l].minVisibleScale),void 0!==o[l].maxVisibleScale&&null!==o[l].maxVisibleScale&&i.setMaxVisibleScale(o[l].maxVisibleScale),void 0!==o[l].symScaleDefinition&&null!==o[l].symScaleDefinition&&i.setSymScaleDefinition(o[l].symScaleDefinition)},addSmlData:function(t,e){this.smlInfo.fromJSON(t.smlInfo);for(var i=t.layerDatas,o=null,l=0;l<i.length;l++)if(null!==i[l].layerName){var s=this.map.getLayersByName(i[l].layerName);0!==s.length?o=s[0]:e&&((o=L.supermap.plotting.plottingLayer(i[l].layerName,this.serverUrl,{serviceParams:this.options.serviceParams})).spatialAnalystUrl=i[l].spatialAnalystUrl,this.map.addLayer(o)),null!==o&&this._load(i[l],o)}},addSmlDataToLayer:function(t,e){this.smlInfo.fromJSON(t.smlInfo);var i=t.layerDatas,o=null,l=this.map.getLayersByName(e);0!==l.length?o=l[0]:(o=L.supermap.plotting.plottingLayer(e,this.serverUrl,{serviceParams:this.options.serviceParams}),this.map.addLayer(o));for(var s=0;s<i.length;s++)this._load(i[s],o)},openSmlFile:function(t,e){var i=this.serverUrl+"smlInfos/",o=document.getElementById(t).value.split("\\"),l=o[o.length-1];i+=l;var s=this;""!==l&&$.ajaxFileUpload({url:i,secureuri:!1,fileElementId:t,dataType:"json",timeout:36e5,success:function(){s.openSmlFileOnServer(l,e)},error:function(){e({success:!1,message:"打开本地态势图文件失败"})}})},addSmlFile:function(t,e,i){var o=this.serverUrl+"smlInfos/",l=document.getElementById(t).value.split("\\"),s=l[l.length-1];o+=s;var n=this;""!==s&&$.ajaxFileUpload({url:o,secureuri:!1,fileElementId:t,dataType:"json",timeout:36e5,success:function(){n.addSmlFileOnServer(s,e,i)},error:function(){i({success:!1,message:"叠加本地态势图文件失败"})}})},uploadSmlFile:function(t,e){var i=this.serverUrl+"smlInfos/",o=document.getElementById(t).value.split("\\"),l=o[o.length-1];i+=l,""!==l&&$.ajaxFileUpload({url:i,secureuri:!1,fileElementId:t,dataType:"json",timeout:36e5,success:function(){e({success:!0,message:"上传态势图文件成功"})},error:function(){e({success:!1,message:"上传态势图文件失败"})}})},addSmlFileToLayer:function(t,e,i){var o=this.serverUrl+"smlInfos/",l=document.getElementById(t).value.split("\\"),s=l[l.length-1];o+=s;var n=this;""!==s&&$.ajaxFileUpload({url:o,secureuri:!1,fileElementId:t,dataType:"json",timeout:36e5,success:function(){n.addSmlFileToLayerOnServer(s,e,i)},error:function(){i({success:!1,message:"打开本地文件失败"})}})},addSmlFileOnServer:function(t,e,i){var o=new SuperMap.EditSmlFileParameters;o.method="GET",o.smlFileName=t,L.supermap.smlFileService(this.serverUrl,this.options.serviceParams).editSMLFile(o,function(t){if(t.result.succeed){var o=t.result;this.smlInfo.fromJSON(o.smlInfo);for(var l=o.layerDatas,s=null,n=0;n<l.length;n++){var a=[];l[n].layerName&&(a=this.map.getLayersByName(l[n].layerName)),0!==a.length?s=a[0]:e&&((s=L.supermap.plotting.plottingLayer(l[n].layerName,this.serverUrl,{serviceParams:this.options.serviceParams})).spatialAnalystUrl=l[n].spatialAnalystUrl,this.map.addLayer(s)),null!==s&&this._load(l[n],s)}null!==s&&"function"==typeof i?i({success:!0,smlFileName:this.smlFileName,sitDataLayers:this.map.getPlottingLayers()}):"function"==typeof i&&i({success:!1,message:"态势图文件不存在与当前态势图同名的图层"})}else"function"==typeof i&&i({success:!1,message:"从服务器上获取态势图文件失败"})},this)},addSmlFileToLayerOnServer:function(t,e,i){var o=new SuperMap.EditSmlFileParameters;o.method="GET",o.smlFileName=t,L.supermap.smlFileService(this.serverUrl,this.options.serviceParams).editSMLFile(o,function(t){if(t.result.succeed){var o=t.result;this.smlInfo.fromJSON(o.smlInfo);var l=o.layerDatas,s=null,n=this.map.getLayersByName(e);0!==n.length?s=n[0]:(s=L.supermap.plotting.plottingLayer(e,this.serverUrl,{serviceParams:this.options.serviceParams}),this.map.addLayer(s));for(var a=0;a<l.length;a++)this._load(l[a],s);"function"==typeof i&&i({success:!0,smlFileName:this.smlFileName,sitDataLayers:this.map.getPlottingLayers()})}else"function"==typeof i&&i({success:!1,message:"从服务器上获取态势图失败"})},this)},downloadSmlFileURL:function(t){return`smlFileDownload/${t}.sml`},newSmlFile:function(){this.smlFileName="",this.smlInfo.destroy(),this.map.clearPlottingLayers()},saveSmlFile:function(t){var e=this.map.getPlottingLayers();this._save(this.smlFileName,e,!0,t)},saveAsSmlFile:function(t,e){var i=this.map.getPlottingLayers();this._save(t,i,!1,e)},getSMLInfo:function(t,e){var i=new SuperMap.EditSmlFileParameters;i.method="GET",i.smlFileName=t,L.supermap.smlFileService(this.serverUrl,this.options.serviceParams).editSMLFile(i,function(t){t.result.succeed&&"function"==typeof e?e({success:!0,smlInfo:t.result.smlInfo}):"function"==typeof e&&e({success:!1})},this)},getSMLInfos:function(t,e,i){var o=t*e,l=e,s=new SuperMap.GetSMLInfosParameters;s.start=o,s.count=l,L.supermap.smlFileService(this.serverUrl,this.options.serviceParams).getSMLInfos(s,function(t){t.result.succeed&&"function"==typeof i?i({success:!0,smlInfoList:t.result}):"function"==typeof i&&i({success:!1})},this)},_getCompletedInit:function(t,e){if(this.smlFileName=e,this.smlInfo.fromJSON(t.smlInfo),t.mapInfo){var i=new SuperMap.Plot.MapInfoStruct;i.fromJSON(t.mapInfo),null!==i.zoom&&null!==i.centerX&&null!==i.centerY&&this.map.setView(L.latLng(i.centerY,i.centerX),i.zoom,{reset:!0})}var o,l=t.layerDatas;this.map.clearPlottingLayers();for(var s=0,n=l.length;s<n;s++)(o=L.supermap.plotting.plottingLayer(l[s].layerName,this.serverUrl,{renderer:L.canvas(),serviceParams:this.options.serviceParams})).spatialAnalystUrl=l[s].spatialAnalystUrl,this.map.addLayer(o),this._load(l[s],o),void 0!==l[s].isEditable&&null!==l[s].isEditable&&o.setEditable(l[s].isEditable),void 0!==l[s].isLocked&&null!==l[s].isLocked&&o.setLocked(l[s].isLocked),void 0!==l[s].visibility&&null!==l[s].visibility&&o.setVisibility(l[s].visibility),void 0!==l[s].minVisibleScale&&null!==l[s].minVisibleScale&&o.setMinVisibleScale(l[s].minVisibleScale),void 0!==l[s].maxVisibleScale&&null!==l[s].maxVisibleScale&&o.setMaxVisibleScale(l[s].maxVisibleScale),void 0!==l[s].symScaleDefinition&&null!==l[s].symScaleDefinition&&o.setSymScaleDefinition(l[s].symScaleDefinition)},openSmlFileOnServer:function(t,e){var i=new SuperMap.EditSmlFileParameters;i.method="GET",i.smlFileName=t,L.supermap.smlFileService(this.serverUrl,this.options.serviceParams).editSMLFile(i,function(i){i.result.succeed?(this._getCompletedInit(i.result,t),"function"==typeof e&&e({success:!0,smlFileName:this.smlFileName,sitDataLayers:this.map.getPlottingLayers()})):"function"==typeof e&&e({success:!1,message:"打开已发布的态势图文件失败"})},this)},deleteSmlFileOnServer:function(t,e){var i=new SuperMap.EditSmlFileParameters;i.method="DELETE",i.smlFileName=t,L.supermap.smlFileService(this.serverUrl,this.options.serviceParams).editSMLFile(i,function(t){t.result.succeed&&"function"==typeof e?e({success:!0}):"function"==typeof e&&e({success:!1})},this)},_save:function(t,e,i,o){var l=new SuperMap.Plot.SitDataStruct;l.smlInfo=this.smlInfo;var s=new SuperMap.Plot.MapInfoStruct;s.zoom=this.map.getZoom(),s.centerX=this.map.getCenter().lng,s.centerY=this.map.getCenter().lat,l.mapInfo=s,l.layerDatas=[];for(var n=0;n<e.length;n++){var a=e[n].features,r=new SuperMap.Plot.LayerDataStruct;r.layerName=e[n].name,r.spatialAnalystUrl=e[n].spatialAnalystUrl,this.map instanceof L.Map?this.map.getRenderer(e[n])instanceof L.Canvas&&(r.useCanvas=!0):(r.useCanvas=e[n].useCanvas,r.useCanvas2=e[n].useCanvas2),r.minVisibleScale=e[n].getMinVisibleScale(),r.maxVisibleScale=e[n].getMaxVisibleScale(),r.symScaleDefinition=e[n].getSymScaleDefinition(),r.isEditable=e[n].getEditable(),r.isLocked=e[n].getLocked(),r.visibility=e[n].getVisibility(),r.features=a,l.layerDatas.push(r)}var p=new SuperMap.EditSmlFileParameters;p.method="POST",p.sitData=l,p.smlFileName=t,p.isCover=i,L.supermap.smlFileService(this.serverUrl,this.options.serviceParams).editSMLFile(p,function(t){t.result.succeed&&"function"==typeof o?o({success:!0}):"function"==typeof o&&o({success:!1})},this)},_load:function(t,e){e.spatialAnalystUrl=t.spatialAnalystUrl;for(var i=0,o=t.features.length;i<o;i++){var l=t.features[i];if(null!==l){var s;l.resolution?s=this.map.getZoom():l.fromZoom&&(s=l.fromZoom),!1===l.scaleByMap&&(s=this.map.getZoom()),Object.prototype.hasOwnProperty.call(l,"isEdit")||(l.isEdit=!0);let t=l.uuid;if(l.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&null==l.innerCells){let i={};i.symbolRank=l.symbolRank,i.surroundLineType=l.surroundLineType;var n=!1;0===i.surroundLineType&&0===i.symbolRank||(n=!0);var a=e._getSymbolDataFromCache(l.libID,l.code);if(n||null===a){let o=new SuperMap.GetSymbolInfoParameters({libID:l.libID,code:l.code,symbolRank:i.symbolRank,surroundLineType:i.surroundLineType,inputPoints:l.localePoints,subSymbols:l.subSymbols});L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(o,function(i){i.result.libID&&i.result.code&&(i.result.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL||n||e._cacheSymbolData(i.result),a=SuperMap.Util.cloneObject(i.result),SuperMap.Plot.AnalysisSymbol.mergeSymbolDataAndServerData(l,a),e.createSymbol(l.libID,l.code,void 0,t,{},{serverUrl:this.serverUrl,symbolData:l,fromZoom:s,map:this.map,serviceParams:this.options.serviceParams,isGeoJSONData:!0}))},this)}else SuperMap.Plot.AnalysisSymbol.mergeSymbolDataAndServerData(l,a),e.createSymbol(l.libID,l.code,void 0,t,{},{serverUrl:this.serverUrl,symbolData:l,fromZoom:s,map:this.map,isGeoJSONData:!0})}else e.createSymbol(l.libID,l.code,void 0,t,{},{serverUrl:this.serverUrl,symbolData:l,fromZoom:s,map:this.map})}}}});L.supermap.plotting.sitDataManager=function(t,e,i){return new J(t,e,i)};var q=L.Evented.extend({url:null,libID:null,symbolLibData:null,cachedSymbolList:null,needCacheList:null,symbolNames:null,options:{serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},initialize:function(t){this.cachedSymbolList={},this.needCacheList=[],t&&SuperMap.Util.extend(this.options,t),t&&t.url&&t.libID?(this.url=t.url,this.libID=t.libID):t&&t.symbolLibData&&(this.symbolLibData=t.symbolLibData,this.libID=this.symbolLibData.libID,this.initNeedCacheList())},destroy:function(){this.url=null,this.libID=null,this.symbolLibData=null},initializeAsync:function(){var t=new SuperMap.GetLibInfoParameter;t.libID=this.libID,L.supermap.symbolLibService(this.url,this.options.serviceParams).getLibInfo(t,function(t){t.result.succeed?(this.symbolLibData=t.result,this.libID=this.symbolLibData.libID,this.initNeedCacheList(),this.fire(SuperMap.Plot.Event.initializecompleted,{success:!0})):(this.libID=-1,this.fire(SuperMap.Plot.Event.initializecompleted,{success:!1}))},this)},getSymbolLibName:function(){return null===this.symbolLibData?null:this.symbolLibData.symbolLibName},getSymbolName:function(t){return null===this.symbolLibData?"":(null===this.symbolNames&&(this.symbolNames={},this.getSymbolNameFromList(this.symbolLibData.rootSymbolLibNode)),this.symbolNames[t])},getSymbolNameFromList:function(t){for(var e=0;e<t.childNodeCount;e++)"SYMBOL_GROUP"===t.childNodes[e].symbolNodeType?this.getSymbolNameFromList(t.childNodes[e]):"SYMBOL_NODE"===t.childNodes[e].symbolNodeType&&(this.symbolNames[t.childNodes[e].symbolCode]=t.childNodes[e].symbolName);return""},initNeedCacheList:function(){if(null===this.symbolLibData)return!1;this.initNeedCacheListForNode(this.symbolLibData.rootSymbolLibNode)},initNeedCacheListForNode:function(t){for(var e=0;e<t.childNodeCount;e++)"SYMBOL_GROUP"===t.childNodes[e].symbolNodeType?this.initNeedCacheListForNode(t.childNodes[e]):"SYMBOL_NODE"===t.childNodes[e].symbolNodeType&&"SYMBOL_DOT"===t.childNodes[e].symbolType&&this.needCacheList.push(t.childNodes[e].symbolCode)},cachedSymbols:function(){if(0!==this.needCacheList.length){var t=Math.floor(1e3*Math.random()),e=new SuperMap.GetSymbolInfoParameters;e.libID=this.libID,e.code=this.needCacheList[0],e.dynamicToken=t,L.supermap.symbolInfoService(this.url,this.options.serviceParams).getSymbolInfo(e,function e(i){if(i.result.succeed){if(i.result.dynamicToken&&i.result.dynamicToken===SuperMap.MD5.md5(t.toString()))delete i.result.dynamicToken,this.cacheSymbolData(i.result);else{var o=SuperMap.Util.indexOf(this.needCacheList,i.result.code);-1!==o&&this.needCacheList.splice(o,1)}if(0===this.needCacheList.length)this.fire(SuperMap.Plot.Event.cachecompleted,{success:!0});else{var l=new SuperMap.GetSymbolInfoParameters;l.libID=this.libID,l.code=this.needCacheList[0],l.dynamicToken=t,L.supermap.symbolInfoService(this.url,this.options.serviceParams).getSymbolInfo(l,e,this)}}},this),this.cachedSymbolOK=!0}else this.fire(SuperMap.Plot.Event.cachecompleted,{success:!0})},getSymbolLibID:function(){return this.libID},getSymbolData:function(t){var e=null;return Object.prototype.hasOwnProperty.call(this.cachedSymbolList,t)&&(e=SuperMap.Plot.PlottingUtil.cloneObject(this.cachedSymbolList[t])),e},cacheSymbolData:function(t){var e=SuperMap.Util.indexOf(this.needCacheList,t.code);-1!==e&&(this.cachedSymbolList[t.code]=SuperMap.Plot.PlottingUtil.cloneObject(t),this.needCacheList.splice(e,1))},getSymbolCount:function(){return null===this.symbolLibData?null:this.symbolLibData.symbolCount},querySymbolbyKey:function(t){return this.querySymbol(t,this.getRootSymbolInfo(),this.getRootSymbolIconUrl())},getClassFication:function(){return null===this.symbolLibData?null:this.symbolLibData.classFication},getCreateTime:function(){return null===this.symbolLibData?null:this.symbolLibData.createTime},getCreator:function(){return null===this.symbolLibData?null:this.symbolLibData.creator},getModifyTime:function(){return null===this.symbolLibData?null:this.symbolLibData.modifyTime},getRootSymbolIconUrl:function(){return null===this.symbolLibData?null:this.symbolLibData.rootSymbolIconUrl},getVersion:function(){return null===this.symbolLibData?null:this.symbolLibData.version},getRootSymbolInfo:function(){return null===this.symbolLibData?null:this.symbolLibData.rootSymbolLibNode},querySymbol:function(t,e,i){var o=[];if("SYMBOL_GROUP"===e.symbolNodeType)for(var l=0;l<e.childNodes.length;l++)for(var s=i+"/"+e.symbolName,n=this.querySymbol(t,e.childNodes[l],s),a=0;a<n.length;a++)o.push(n[a]);else t===e.symbolCode.toString()?(e.icon=i+"/"+e.symbolCode+".png",o.push(e)):-1!==e.symbolName.indexOf(t)&&(e.icon=i+"/"+e.symbolCode+".png",o.push(e));return o}});L.supermap.plotting.symbolLib=function(t){return new q(t)};var K=L.Evented.extend({url:null,libIDs:null,symbolLibs:null,symbolLibJsons:null,isInializeOK:!1,options:{serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},initialize:function(t,e){K.prototype.url=t,null===this.libIDs&&(K.prototype.libIDs=[]),null===this.symbolLibs&&(K.prototype.symbolLibs=[]),null===this.symbolLibJsons&&(K.prototype.symbolLibJsons=[]),e&&SuperMap.Util.extend(this.options,e)},destroy:function(){K.prototype.url=null,K.prototype.libIDs=null,K.prototype.symbolLibs=null,K.prototype.symbolLibJsons=null,K.prototype.isInializeOK=!1,K.prototype.isInitialize=!1},initializeAsync:function(){this.isInitializeOK()?this.fire(SuperMap.Plot.Event.initializecompleted,{success:!0,libIDs:this.libIDs}):this.isInitialize||(K.prototype.isInitialize=!0,L.supermap.symbolLibService(this.url,this.options.serviceParams).getLibIDs(function(t){if(void 0!==t.result&&t.result.succeed){if(null!==this.libIDs&&0!==this.libIDs.length)for(var e=0;e<this.libIDs.length;e++){for(var i=!1,o=0;o<t.result.length;o++)if(K.prototype.libIDs[e]===t.result[o]){i=!0;break}!1===i&&K.prototype.libIDs.slice(e,1)}else K.prototype.libIDs=t.result;this.initializeSymbolLib()}else K.prototype.libIDs=[]},this))},initializeSymbolLib:function(){for(var t=this.libIDs.slice(),e=0,i=this.libIDs.length;e<i;e++){var o=new SuperMap.GetLibInfoParameter;o.libID=this.libIDs[e],L.supermap.symbolLibService(this.url,this.options.serviceParams).getLibInfo(o,function(e){if(e.result.succeed){var i=SuperMap.Util.indexOf(t,e.result.libID);-1!==i&&(t.splice(i,1),K.prototype.symbolLibJsons.push(e.result),K.prototype.symbolLibs.push(new q({symbolLibData:e.result})),this.symbolLibs[this.symbolLibs.length-1].url=this.url),0===t.length&&(K.prototype.isInializeOK=!0,this.fire(SuperMap.Plot.Event.initializecompleted,{success:!0,libIDs:this.libIDs}))}},this)}},isInitializeOK:function(){return this.isInializeOK},getSymbolLibNumber:function(){return this.libIDs.length},getSymbolLibID:function(t){return t>=this.libIDs.length?-1:this.libIDs[t]},getSymbolLibJSONInfo:function(t){return t>=this.libIDs.length?null:this.symbolLibJsons[t]},getSymbolLibByIndex:function(t){return t>=this.libIDs.length?null:this.symbolLibs[t]},getSymbolLibByLibId:function(t){for(var e=0;e<this.symbolLibs.length;e++)if(t===this.symbolLibs[e].libID)return this.symbolLibs[e];return null},cacheSymbolData:function(t){var e=t.libID,i=this.getSymbolLibByLibId(e);if(null===i)for(var o in i=new q({libID:e}),this.symbolLibs.push(i),t)o!==e&&(i.cachedSymbolList[o]=SuperMap.Plot.PlottingUtil.cloneObject(t[o]))},cacheSymbolLib:function(t){var e=this.getSymbolLibByLibId(t);null!==e&&(e.on(SuperMap.Plot.Event.cachecompleted,function t(){this.fire(SuperMap.Plot.Event.cachecompleted,{success:!0}),e.off(SuperMap.Plot.Event.cachecompleted,t)},this),e.cachedSymbols())},getSymbolName:function(t,e){var i=this.getSymbolLibByLibId(t);return null===i?"":i.getSymbolName(e)},findSymbolByName:function(t){for(var e=[],i=0;i<this.libIDs.length;i++)for(var o=this.getSymbolLibByLibId(this.libIDs[i]).querySymbolbyKey(t),l=0;l<o.length;l++)e.push(o[l]);return e},findSymbolByCode:function(t){for(var e=[],i=0;i<this.libIDs.length;i++)for(var o=this.getSymbolLibByLibId(this.libIDs[i]).querySymbolbyKey(t.toString()),l=0;l<o.length;l++)e.push(o[l]);return e}});L.supermap.plotting.symbolLibManager=function(t,e){return new K(t,e)};var Q=L.Evented.extend({map:null,undoTransactions:null,redoTransactions:null,maxCount:32,initialize:function(t){this.map=t,this.undoTransactions=[],this.redoTransactions=[],null===this.maxCount&&(this.maxCount=32)},destroy(){this.map=null,this.undoTransactions=null,this.redoTransactions=null,this.maxCount=null},setMaxCount:function(t){this.maxCount=t},add:function(t){this.undoTransactions.length>this.maxCount-1&&this.undoTransactions.splice(0,this.undoTransactions.length-this.maxCount+1),this.undoTransactions.push(t)},undo:function(){var t=this.undoTransactions.length;if(t>0){var e=this.undoTransactions[t-1];this.doTransaction(e,!0),this.redoTransactions.push(e),this.undoTransactions.splice(t-1,1)}},redo:function(){var t=this.redoTransactions.length;if(t>0){var e=this.redoTransactions[t-1];this.doTransaction(e),this.undoTransactions.push(e),this.redoTransactions.splice(t-1,1)}},doTransaction:function(t,e){var i=t.transInfos;if(t.transType===SuperMap.Plot.TransactionType.CREATE)for(var o=0,l=i.length;o<l;o++){let t=this.map.getLayer(i[o].layerId);e?t.removeFeatures(i[o].feature):t.addFeatures(i[o].feature)}else if(t.transType===SuperMap.Plot.TransactionType.EDIT)for(var s=0;s<i.length;s++){let t=this.map.getLayer(i[s].layerId);var n=null;if(n=t?this.map.getFeatureByUuid(i[s].uuid):L.supermap.plotting.getControl(this.map).getFeatureByUuid(i[s].uuid),null!==t||null!==n){var a=i[s].redoParams;if(e&&(a=i[s].undoParams),"setFontAlign"===i[s].functionName)a.length>0&&n.setFontAlign(a[0]);else if("setLatLngs"===i[s].functionName)a.length>0&&n.setLatLngs(a[0]);else if("modifyPoint"===i[s].functionName)a.length>0&&n._modifyPoint(a[0],a[1]);else if("setTextContent"===i[s].functionName)a.length>0&&n.setTextContent(a[0]);else if("setRadiusText"===i[s].functionName)2===a.length&&n.setRadiusText(a[0],a[1]);else if("setType"===i[s].functionName&&n instanceof L.supermap.plotting.RouteNode)a.length>0&&n.setType(a[0]);else if("setStrokeColor"===i[s].functionName&&n.geometry instanceof SuperMap.Geometry.GroupObject)a.length>0&&n.setStyle(a[0]);else if("addAvoidRegion"===i[s].functionName)a.length>0&&(a[0]&&a[0].layer&&a[0].layer.removeFeatures(a[0]),e?n.removeAvoidRegions(a[0]):n.addAvoidRegion(a[0]));else if("removeAvoidRegions"===i[s].functionName){if(a.length>0){for(let t=0;t<a[0].length;t++)a[0][t]&&a[0][t].layer&&a[0][t].layer.removeFeatures(a[0][t]);if(e)for(let t=0;t<a[0].length;t++)n.addAvoidRegion(a[0][t]);else n.removeAvoidRegions(a[0])}}else if("createGroupObject"===i[s].functionName||"createFlags"===i[s].functionName){var r=null;e?t&&i[s].undoParams.length>0&&(r=t.unGroupObject(i[s].undoParams[0])):"createGroupObject"===i[s].functionName?r=t.createGroupObject(i[s].redoParams[0]):"createFlags"===i[s].functionName&&(r=t.createFlags(i[s].redoParams[0])),null!==r&&t._map.getPlotEditControl().selectFeatures(r)}else"updateSymbolText"===i[s].functionName?a.length>0&&n.updateSymbolText(a[0],a[1]):i[s].functionName&&null!==a&&n[i[s].functionName](a[0],a[1]);if(i[s].propertyName){var p=i[s].undoValue;e||(p=i[s].redoValue),Object.prototype.hasOwnProperty.call(n,i[s].propertyName)?n[i[s].propertyName]=p:null!==n&&(n.style[i[s].propertyName]=p)}n&&n.layer&&(n.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL||8!==n.textPosition||"fontColor"!==i[s].propertyName&&"fontFamily"!==i[s].propertyName||n._calculateParts(),n.redraw(),n.fire(SuperMap.Plot.Event.reseteditmarkersvalues))}}else if(t.transType===SuperMap.Plot.TransactionType.REMOVE)for(var u=0;u<i.length;u++)e?this.map.getLayer(i[u].layerId).addFeatures(i[u].feature):this.map.getLayer(i[u].layerId).removeFeatures(i[u].feature)}});L.supermap.plotting.transactionManager=function(t){return new Q(t)};var tt=L.Evented.extend({name:"undefined",map:null,serverUrl:null,symScaleDefinition:null,activePlottingLayer:null,activeChildPlotLayer:null,plottingLayers:[],_uuids:[],initialize:function(t,e,i){i&&SuperMap.Util.extend(this.options,i),null!=t&&(tt.prototype.map=t),null!=i.symScaleDefinition&&(tt.prototype.symScaleDefinition=i.symScaleDefinition),null!=e&&(tt.prototype.serverUrl=e),this.plottingLayers=[],this.activePlottingLayer=null,this.activeChildPlotLayer=null},destroy:function(){tt.prototype.map=null,tt.prototype.symScaleDefinition=null,tt.prototype.serverUrl=null,tt.prototype.name=null},getPlottingLayers:function(){return this.plottingLayers},getSymScaleDefinition:function(){if(null!=this.map)return null==tt.prototype.symScaleDefinition&&(tt.prototype.symScaleDefinition=this.getLayerScale()),tt.prototype.symScaleDefinition},setSymScaleDefinition:function(t){tt.prototype.symScaleDefinition=t},setActivePlottingLayer:function(t){if(null!==t){if(t instanceof Ct&&t.getVisibility()&&t.getEditable()&&(this.map._plotDrawControl&&null!==this.map._plotDrawControl&&this.map._plotDrawControl.setDrawingLayer(t),this.activePlottingLayer=t,null!=this.activeChildPlotLayer&&this.activeChildPlotLayer.getParent()!==this.activePlottingLayer))for(var e=0;e<this.activePlottingLayer.getChildPlotLayers().length;e++){var i=this.activePlottingLayer.getChildPlotLayers()[e];i.getVisibility()&&(this.activeChildPlotLayer=i)}this.fire("plottinglayeractive",{layer:t})}else this.activePlottingLayer=null},getActivePlottingLayer:function(){return this.activePlottingLayer},setActiveChildPlotLayer:function(t){null!==t?t.getVisibility()&&null!==t.getParent()&&t.getParent().getVisibility()&&t.getParent().getEditable()&&(this.activePlottingLayer!==this.activeChildPlotLayer.getParent()&&(t.getParent().setEditable(!0),this.map._plotDrawControl&&null!==this.map._plotDrawControl&&this.map._plotDrawControl.setDrawingLayer(t.getParent()),this.activePlottingLayer=t.getParent()),this.activeChildPlotLayer=t,this.fire("childplotlayeractive",{layer:t})):this.activeChildPlotLayer=null},getActiveChildPlotLayer:function(){return this.activeChildPlotLayer},saveTo:function(){var t={};return t.name=this.name,t.path="",t.plotLayers=[],t.symScaleDefinition=this.symScaleDefinition,this._savePlotLayers(t),t.animations=SuperMap.Plot.PlottingUtil.toJSON(L.supermap.plotting.getControl().getGOAnimationManager().getJSONData()),JSON.stringify(t)},loadFrom:function(t){this.removeAllPlottingLayers(),tt.prototype.symScaleDefinition=t.symScaleDefinition,tt.prototype.name=t.name,this._uuids.length=0;for(var e=0,i=t.plotLayers.length;e<i;e++)for(var o=0;o<t.plotLayers[e].childPlotLayers.length;o++)for(var l=0;l<t.plotLayers[e].childPlotLayers[o].plotSymbols.length;l++)null!=t.plotLayers[e].childPlotLayers[o].plotSymbols[l].graphicObject?this._uuids.push(t.plotLayers[e].childPlotLayers[o].plotSymbols[l].graphicObject.uuid):this._uuids.push(t.plotLayers[e].childPlotLayers[o].plotSymbols[l].graphicCompound.uuid);this._loadPlotLayers(t.plotLayers,function(){null!=t.animations&&L.supermap.plotting.getControl().getGOAnimationManager().fromJSONData(JSON.parse(t.animations))})},addPlottingLayer:function(t){let e=!0;for(;e;){e=!1;for(let i=0;i<this.plottingLayers.length;i++)if(this.plottingLayers[i].name===t.name){t.name+="#1",e=!0;break}}this.plottingLayers.push(t),this.fire("plottinglayeradded",{plottingLayer:t})},removePlottingLayer:function(t){var e=SuperMap.Util.indexOf(this.plottingLayers,t);-1!==e&&this.plottingLayers.splice(e,1),this.activePlottingLayer===t&&(this.activePlottingLayer=null,this.activeChildPlotLayer=null),this.fire("plottinglayerremoved",{plottingLayer:t})},removeAllPlottingLayers:function(){for(;this.plottingLayers.length>0;)this.map.removeLayer(this.plottingLayers[0]);this.plottingLayers.length=0},getLayerScale:function(t){var e=0;if(null===this.map)return 0;var i=this.map._layers;for(var o in i)if(i[o]instanceof L.TileLayer){e=i[o].getScale(t);break}return e},_savePlotLayers:function(t){for(var e=0;e<map.getPlottingLayers().length;e++){var i={},o=map.getPlottingLayers()[e];i.caption=o.caption,i.name=o.name,i.description="",i.editable=o.getEditable(),i.visible=o.getVisibility(),i.selectable=o.getSelected(),i.symScaleDefinition=o.getSymScaleDefinition(),i.minVisibleScale=o.getMinVisibleScale(),i.maxVisibleScale=o.getMaxVisibleScale(),i.childPlotLayers=[],this._saveChildPlotLayer(i,o),t.plotLayers.push(i)}},_saveChildPlotLayer:function(t,e){for(var i=0;i<e.getChildPlotLayers().length;i++){var o={},l=e.getChildPlotLayers()[i];o.name=l.name,o.caption=l.caption,o.visibility=l.visibility,o.plotSymbols=[],this._savePlotSymbols(o,l),t.childPlotLayers.push(o)}},_savePlotSymbols:function(t,e){for(var i=0;i<e.getFeatures().length;i++){var o=e.getFeatures()[i],l={};if(l.bubbleHeight=o.getBubbleHeight(),l.bubbleWidth=o.getBubbleWidth(),l.description=o.getDescription(),l.mediaList=o.getMediaList(),l.name=o.symbolName,l.renderOrder=2,l.visible="none"!==o.style.display,o instanceof m||o instanceof at)l.graphicCompound=JSON.parse(o.toGeoJsonStr());else if(l.graphicObject=JSON.parse(o.toGeoJsonStr()),null!=o.joinLines){for(var s=[],n=0;n<o.joinLines.length;n++)if(o.joinLines[n].startAssociatedUuid===o.uuid){var a={caption:"joinLines"};a.uuid=o.joinLines[n].uuid,a.visible="none"!==o.joinLines[n].style.display,a.lineRelation=JSON.parse(o.joinLines[n].toGeoJsonStr()),s.push(a)}l.lineRelations=s}t.plotSymbols.push(l)}},_loadPlotLayers:function(t,e){for(var i=0,o=t.length;i<o;i++){var l=t[i],s=L.supermap.plotting.plottingLayer(l.name,this.serverUrl);s.removeChildPlotLayer(s.getChildPlotLayers()[0]),s.caption=l.caption,void 0===l.visibility?s.setVisibility(l.visible):s.setVisibility(l.visibility),s.setSelected(l.selectable),s.setEditable(l.editable),s.setMaxVisibleScale(l.maxVisibleScale),s.setMinVisibleScale(l.minVisibleScale),s.setSymScaleDefinition(l.symScaleDefinition,!0),this.activePlottingLayer=s,this.map.addLayer(s),this._loadChildLayers(l.childPlotLayers,s,e)}},_loadChildLayers:function(t,e,i){for(var o=0;o<t.length;o++){var l=t[o],s=L.supermap.plotting.childPlotLayer(l.name);s.caption=l.caption,void 0===l.visibility?s.setVisibility(l.visible):s.setVisibility(l.visibility),e.addChildPlotLayer(s),this._loadSymbols(l.plotSymbols,s,e,i)}},_loadSymbols:function(t,e,i,o){for(var l=[],s=0;s<t.length;s++){var n=t[s];if(null!=n.graphicObject){n.graphicObject.bubbleHeight=n.bubbleHeight,n.graphicObject.bubbleWidth=n.bubbleWidth,n.graphicObject.description=n.description,n.graphicObject.mediaList=n.mediaList,null!=n.name&&(n.graphicObject.symbolName=n.name),null!=n.visible&&(n.graphicObject.visible=n.visible);var a=SuperMap.Plot.PlottingUtil.toJSON(n.graphicObject);if(i.geoJsonToFeature1(a,e,function(t){var e=L.supermap.plotting.getControl().getPlotMapManager();if(0!==e._uuids.length){for(var i=0;i<e._uuids.length;i++)if(e._uuids[i]===t.feature.uuid){e._uuids.splice(i,1);break}0===e._uuids.length&&"function"==typeof o&&o()}}),null!=n.lineRelations&&0!=n.lineRelations.length)for(var r=0;r<n.lineRelations.length;r++){var p=n.lineRelations[r];p.lineRelation.visible=p.visible,l.push(p.lineRelation)}}else{n.graphicCompound.bubbleHeight=n.bubbleHeight,n.graphicCompound.bubbleWidth=n.bubbleWidth,n.graphicCompound.description=n.description,n.graphicCompound.mediaList=n.mediaList,null!=n.name&&(n.graphicCompound.symbolName=n.name),null!=n.visible&&(n.graphicCompound.visible=n.visible);a=SuperMap.Plot.PlottingUtil.toJSON(n.graphicCompound);i.geoJsonToFeature1(a,e,function(t){var e=L.supermap.plotting.getControl().getPlotMapManager();if(0!==e._uuids.length){for(var i=0;i<e._uuids.length;i++)if(e._uuids[i]===t.feature.uuid){e._uuids.splice(i,1);break}0===e._uuids.length&&"function"==typeof o&&o()}})}}for(var u=0;u<l.length;u++)i.geoJsonToFeature1(SuperMap.Plot.PlottingUtil.toJSON(l[u]),e)}});L.supermap.plotting.plotMapManager=function(t,e,i){return new tt(t,e,i)};var et=null,it=L.Evented.extend({serverUrl:null,map:null,defaultStyle:null,sitDataManager:null,symbolLibManager:null,clientID:null,dpi:96,animationManager:null,transManager:null,imageManager:null,plotMapManager:null,touchMode:null,options:{serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},initialize:function(t,e,i){null!=t&&(it.prototype.map=t),null!=e&&(it.prototype.serverUrl=e),i&&i.serviceParams&&SuperMap.Util.extend(this.options,i),this.defaultStyle=new SuperMap.Plot.DefaultStyle,this.sitDataManager=new J(this.map,this.serverUrl,this.options),this.symbolLibManager=new K(this.serverUrl,this.options),this.animationManager=new Z(this.map,this.serverUrl,this.options),this.transManager=new Q(this.map),this.plotMapManager=new tt(this.map,this.serverUrl,this.options),this.imageManager={},this.touchMode=!1},destroy:function(){it.prototype.serverUrl=null,it.prototype.map=null,this.defaultStyle&&(this.defaultStyle.destroy(),this.defaultStyle=null),this.sitDataManager&&(this.sitDataManager.destroy(),this.sitDataManager=null),this.symbolLibManager&&(this.symbolLibManager.destroy(),this.symbolLibManager=null),this.clientID=null,null!==this.animationManager&&(this.animationManager.destroy(),this.animationManager=null),this.plotMapManager&&(this.plotMapManager.destroy(),this.plotMapManager=null),et=null},getDefaultStyle:function(){return this.defaultStyle},getSitDataManager:function(){return this.sitDataManager},getPlotMapManager:function(){return this.plotMapManager},getSymbolLibManager:function(){return this.symbolLibManager},getGOAnimationManager:function(){return this.animationManager},getClientID:function(){return this.clientID},setClientID:function(t){this.clientID=t},getTouchMode:function(){return this.touchMode},setTouchMode:function(t){this.touchMode=t},getDPI:function(){return this.dpi},setDPI:function(t){this.dpi=t},getTransManager:function(){return this.transManager},setMap:function(t){it.prototype.map=t,null===this.sitDataManager.map&&(J.prototype.map=t),null===this.animationManager.map&&this.animationManager.setMap(t),null===this.transManager.map&&(this.transManager.map=t),null===this.plotMapManager.map&&(tt.prototype.map=t)},setPlotUrl:function(t){it.prototype.serverUrl=t,null===this.sitDataManager.serverUrl&&(J.prototype.serverUrl=t),null===this.symbolLibManager.url&&(K.prototype.url=t),null===this.animationManager.serverUrl&&(Z.prototype.serverUrl=t),null===this.plotMapManager.serverUrl&&(tt.prototype.serverUrl=t)},setOptions:function(t){t=t||{},L.setOptions(this,t),L.setOptions(this.sitDataManager,t),L.setOptions(this.symbolLibManager,t),L.setOptions(this.animationManager,t),L.setOptions(this.plotMapManager,t)},getFeatureByUuid:function(t){if(null!==this.map){for(var e=this.map.getPlottingLayers(),i=0,o=e.length;i<o;i++){var l=e[i].getFeatureByUuid(t);if(null!==l)return l}return null}return null}});L.supermap.plotting.getControl=function(t,e,i){return null===et&&(et=new it(t,e,i)),t&&null!==t&&null===et.map&&et.setMap(t),e&&null!==e&&null===et.serverUrl&&et.setPlotUrl(e),null!=i&&et.setOptions(i),et};var ot=L.Class.extend({map:null,initialize:function(t){t&&null!==t&&(this.map=t)},destroy:function(){this.map=null,delete this.map},captureGObject:function(t){var e=[];if(t){for(var i=this.map.getPlottingLayers(),o=0;o<i.length;o++){var l=i[o];for(var s in l.features){var n=l.features[s];n instanceof d&&n.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&(t.lng===n.getLatLngs()[0].lng&&t.lat===n.getLatLngs()[0].lat&&e.push(n))}}return e}return 0},getGObjectsInPolygon:function(t){var e=[];if(t&&0!==t.length){if(L.Util.isArray(t)||(t=[t]),t.length<=2)return e;for(var i=this.map.getPlottingLayers(),o=0;o<i.length;o++){var l=i[o];for(var s in l.features){var n=l.features[s];if(n instanceof d){var a=n.getBounds().getCenter();if(null===a)return;this._ptIsInPolygon(t,a)&&e.push(n)}}}return e}},_ptIsInPolygon:function(t,e){if(!t||null===t||0===t.length)return!1;for(var i=0,o=t.length,l=0;l<o;l++){var s=t[l],n=t[(l+1)%o];if(s.lat!==n.lat){var a=s.lat<n.lat?s.lat:n.lat,r=s.lat>n.lat?s.lat:n.lat;if(!(e.lat<a||e.lat>r))(e.lat-s.lat)*(n.lng-s.lng)/(n.lat-s.lat)+s.lng>e.lng&&i++}}return i%2==1},getGObjectsInCircle:function(t,e){if(t&&e){for(var i=[],o=this.map.getPlottingLayers(),l=0;l<o.length;l++){var s=o[l];for(var n in s.features){var a=s.features[n];if(a instanceof d){var r=a.getBounds().getCenter();if(null===r)continue;Math.abs(e)>Math.sqrt(Math.pow(t.lng-r.lng,2)+Math.pow(t.lat-r.lat,2))&&i.push(a)}}}return i}},getGObjectsInRect:function(t,e){if(t&&e){for(var i=[],o=this.map.getPlottingLayers(),l=0;l<o.length;l++){var s=o[l];for(var n in s.features){var a=s.features[n];if(a instanceof d){var r=a.getBounds().getCenter();if(null===r)continue;t.lng<e.lng&&t.lat>e.lat?r.lng>t.lng&&r.lng<e.lng&&r.lat<t.lat&&r.lat>e.lat&&i.push(a):r.lng<t.lng&&r.lng>e.lng&&r.lat<t.lat&&r.lat>e.lat&&i.push(a)}}}return i}}});L.supermap.plotting.query=function(t){return new ot(t)};var lt=T.extend({symbolSizeInLib:null,dRotate:0,initialScale:null,symbolSize:null,positionOffset:!1,positionOffsetType:null,positionOffsetX:null,positionOffsetY:null,symbolRank:null,negativeImage:null,horizontalMirror:null,verticalMirror:null,middleMarkBounds:null,flagTextSize:60,space:7,deployments:null,joinLines:null,trajectory:null,detectionRange:null,limitWidthHeight:!0,symbolTexts:null,symbolTextComponents:null,bloodVolumes:null,bloodVolumeComponents:null,pictureFrames:null,pictureFrameComponents:null,antoRotation:null,initialize:function(t,e,i,o){if(this.autoRotation=!1,this.symbolType=SuperMap.Plot.SymbolType.DOTSYMBOL,this.minEditPts=1,this.maxEditPts=1,this.joinLines=[],this.deployments=[],this.symbolTexts=[],this.bloodVolumes=[],this.pictureFrames=[],this.symbolTextComponents=[],this.bloodVolumeComponents=[],this.pictureFrameComponents=[],this.minScale=1,this.maxScale=5,this.symbolSizeInLib=new SuperMap.Size(0,0),this.symbolSizeInLib=new SuperMap.Size(0,0),this.symbolSize=new SuperMap.Size(0,0),null===this.initialScale&&(this.initialScale={}),T.prototype.initialize.call(this,t,e,i,o),null===this.positionOffsetType&&(this.positionOffsetType=SuperMap.Plot.PositionOffsetType.LINE),null===this.positionOffsetX&&(this.positionOffsetX=0),null===this.positionOffsetY&&(this.positionOffsetY=0),void 0===this.actualScale&&(this.actualScale=this.dScale),null!=this.maxScale&&this.dScale>this.maxScale?this.dScale=this.maxScale:null!=this.minScale&&this.dScale<this.minScale&&(this.dScale=this.minScale),(this.symbolSize==={}||0===this.symbolSize.w&&0===this.symbolSize.h)&&(this.symbolSize.w=this.symbolSizeInLib.w,this.symbolSize.h=this.symbolSizeInLib.h),!this.initialScale.x){var l=this.symbolSizeInLib.w,s=this.symbolSize.w;this.symbolSizeInLib.w<this.symbolSizeInLib.h&&(l=this.symbolSizeInLib.h,s=this.symbolSize.h),this.initialScale.x=s/l,isNaN(this.initialScale.x)||this.initialScale.x===1/0||(!0===this.limitWidthHeight?(this.symbolSize.w=this.initialScale.x*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale.x*this.symbolSizeInLib.h):(this.symbolSize.w=this.initialScale.x*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale.y*this.symbolSizeInLib.h),void 0===this.fontSize&&(void 0===this.style.fontSize&&(this.style.fontSize=12),this.fontSize=this.style.fontSize/this.initialScale.x))}},destroy:function(){if(this.symbolRank=null,this.negativeImage=null,this.horizontalMirror=null,this.verticalMirror=null,this.annotationIndex=-1,this.textPosition=null,this.symbolSizeInLib=null,this.symbolSize=null,this.middleMarkBounds=null,this.positionOffsetX=null,this.positionOffsetY=null,this.trajectory=null,this.detectionRange=null,null!==this.joinLines&&void 0!==this.joinLines)for(var t=0;t<this.joinLines.length;t++)null!==this.joinLines[t]&&(this.joinLines[t].startAssociatedUuid===this.uuid&&(this.joinLines[t].removeJoinLineFromDotSymbol(),this.joinLines[t].startAssociatedUuid=null),this.joinLines[t].endAssociatedUuid===this.uuid&&(this.joinLines[t].removeJoinLineFromDotSymbol(),this.joinLines[t].endAssociatedUuid=null));this.joinLines=null,this.deployments=null,T.prototype.destroy.call(this)},_reView:function(){if(this.fromZoom!==this._map.getZoom()){if(this.scaleByMap&&!1!==this.scaleByMap){let s=1;if("function"==typeof this.layer.getSymZoomScale&&(s=this.layer.getSymZoomScale()),null!=this.maxScale&&s>this.maxScale&&(s=this.maxScale),null!=this.minScale&&s<this.minScale&&(s=this.minScale),0!==this.textContent.length&&8===this.annotationPosition){var t;!0===this.limitWidthHeight?t=this.middleMarkBounds.scale(s*this.initialScale.x,this.anchorPoint):this._widthHeightLimitScale();var e=96*t.getWidth()/25.4/10,i=96*t.getHeight()/25.4/10;this.components[this._annotationId].options.graphicWidth=e,this.components[this._annotationId].options.graphicHeight=i}for(var o in this.components)if(o===this._annotationId&&this.components[o]instanceof g)this.components[o].options.fontSize=this.style.fontSize*s;else if(o!==this._annotationId&&this.components[o]instanceof g)this.components[o].options.fontSize=this.components[o].options.fontSize/this.prevScale*s;else if(o!==this._annotationId&&!0!==this.components[o].isLeadLine&&(this.components[o].options.weight=this.style.weight*s,null!=this.components[o].options.dashArray)){let t=this.components[o].options.dashArray.split(",");for(let e=0;e<t.length;e++)t[e]=parseInt(t[e])/this.prevScale*s;this.components[o].options.dashArray=t.join(),this.components[o].setStyle(this.components[o].options)}for(let t=0;t<this.geoSymbolTexts.length;t++){var l=this.geoSymbolTexts[t];null!==l&&l._calculateParts()}if("function"==typeof this.layer.getSymZoomScale&&(s!==this.layer.getSymZoomScale()||this.prevScale!==this.layer.getSymZoomScale(this.fromZoom))){let t=this.prevScale*this._map.getZoomScale(this._map.getZoom(),this.fromZoom);this._resizeCells(s*(1/t),this.getLatLngs()[0])}this._renderer instanceof L.Canvas&&"function"==typeof this.layer.getSymZoomScale&&s!==this.layer.getSymZoomScale()&&!0===this.positionOffset&&(this._clearComponents(),this._calculateParts()),this.prevScale=s,this._calculateLabel(),this._calculateBloodVolume(),this._calculatePictureFrame()}else{for(var s=0;s<this.geoSymbolTexts.length;s++)this.geoSymbolTexts[s].fromZoom=this._map.getZoom();let t=this._map.getZoomScale(this.fromZoom,this._map.getZoom());var n=this.getLatLngs()[0];this._resizeCells(t,n)}this.fromZoom=this._map.getZoom(),this.layer._map.getRenderer(this.layer)instanceof L.Canvas&&this._updateCanvasFills(),this._updateSymbolTexts();var a="";null!==this._map&&this._map instanceof L.Map&&(a=this._map.options.crs.code,L.Util.isMercatorProjection(a)&&this.redraw()),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues),this.isSelected&&this._map.getPlotEditControl()&&this._map.getPlotEditControl().fire(SuperMap.Plot.Event.featuresmodified,{features:[this]})}},setLatLngs:function(t){this.latLngs=t,this.redraw();for(let t=0;t<this.deployments.length;t++){var e=this.deployments[t];null!==e&&null!=e.layer&&(e.symbolType!==SuperMap.Plot.SymbolType.NAVYDEPLOYMENT&&e.symbolType!==SuperMap.Plot.SymbolType.AIRDEPLOYMENT||(e.style.display=this.style.display,e.redraw()))}this._updateJoinLines(),this._updateSymbolTexts()},getSpace:function(){return this.space},setSpace:function(t){this.space!==t&&(this.space=t,0!==this.textContent.length&&(null!=this.graphic&&null!=this.graphic.layer&&!0===this.graphic.layer.getVisibility()?this.graphic.redraw():null==this.layer||null!=this.layer.getVisibility&&!0!==this.layer.getVisibility()||this._handleAnnotation()))},setRotate:function(t){if(!isNaN(t)){var e=t-this.dRotate;this.dRotate=t;for(var i=0,o=this.avoidRegions.length;i<o;i++)L.Util.rotateLatLngs(this.avoidRegions[i].getLatLngs(),this.getLatLngs()[0],e);this.redraw(),this._updateSymbolTexts()}},getScale:function(){return!0===this.limitWidthHeight?this.initialScale.x:this.initialScale={x:this.symbolSize.w/this.symbolSizeInLib.w,y:this.symbolSize.h/this.symbolSizeInLib.h}},setScale:function(t,e){isNaN(t)||(!0===this.limitWidthHeight?(this.initialScale.x=t,this.symbolSize.w=this.initialScale.x*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale.x*this.symbolSizeInLib.h):(this.symbolSize.w=t*this.symbolSizeInLib.w,this.symbolSize.h=e*this.symbolSizeInLib.h),this.style.fontSize=this.fontSize*this.initialScale.x,this.prevFontSize=this.style.fontSize,this.redraw(),this._updateSymbolTexts())},setPositionOffset:function(t){this.positionOffset!==t&&(this.positionOffset=t,!1===this.positionOffset&&(this.positionOffsetX=0,this.positionOffsetY=0),this.redraw())},getPositionOffset:function(){return this.positionOffset},setPositionOffsetType:function(t){this.positionOffsetType!==t&&(this.positionOffsetType=t,this.positionOffset&&this.redraw())},getPositionOffsetType:function(){return this.positionOffsetType},setTextContent:function(t){this.textContent=t,null!=this.graphic&&null!=this.graphic.layer&&!0===this.graphic.layer.getVisibility()?this.graphic.redraw():null==this.layer||null!=this.layer.getVisibility&&!0!==this.layer.getVisibility()||this._handleAnnotation(),this.layer.fire("propertychanged",{feature:this,property:t})},middleMarkExist:function(){return this.symbolData.middleMarkExist},setTextPosition:function(t){8===t&&!1===this.symbolData.middleMarkExist||this.annotationPosition!==t&&(this.annotationPosition=t,null!=this.graphic&&null!=this.graphic.layer&&!0===this.graphic.layer.getVisibility()?this.graphic.redraw():null==this.layer||null!=this.layer.getVisibility&&!0!==this.layer.getVisibility()||this._handleAnnotation(),this.layer.fire("propertychanged",{feature:this,property:this.annotationPosition}))},getSymbolSize:function(){return this.symbolSize},setSymbolSize:function(t,e,i){if(0===this.symbolSizeInLib.w||0===this.symbolSizeInLib.h)this.initialScale.x=1;else{null===this.symbolSize&&(this.symbolSize=new SuperMap.Size(0,0)),null==this.layer&&(this.layer=tt.prototype.getActivePlottingLayer());var o=t/this.symbolSizeInLib.w,l=e/this.symbolSizeInLib.h;!0===this.limitWidthHeight?(this.initialScale.x!==o?this.initialScale.x=o:this.initialScale.x!==l&&(this.initialScale.x=l),this.symbolSize.w=this.initialScale.x*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale.x*this.symbolSizeInLib.h):(this.initialScale.x=o,this.initialScale.y=l,this.symbolSize.w=this.initialScale.x*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale.y*this.symbolSizeInLib.h)}null==i&&(i=!0),i&&this._map&&this.redraw()},setSurroundLineType:function(t){if(this.surroundLineType!==t){var e=new SuperMap.GetSymbolInfoParameters;e.libID=this.libID,e.code=this.code,e.symbolRank=this.symbolRank,e.surroundLineType=t,L.supermap.symbolInfoService(this.serverUrl).getSymbolInfo(e,function(t){this.symbolData.innerCells=t.result.innerCells,this.surroundLineType=t.result.surroundLineType,this.redraw(),this._map&&this._map.getPlotEditControl()&&this._map.getPlotEditControl().fire(SuperMap.Plot.Event.featuresmodified,{features:[this]})},this)}},getSymbolRanks:function(){return this.symbolData.symbolRanks},getSymbolRank:function(){return this.symbolRank},setSymbolRank:function(t){if(this.symbolRank!==t){var e=new SuperMap.GetSymbolInfoParameters;e.libID=this.libID,e.code=this.code,e.symbolRank=t,e.surroundLineType=this.surroundLineType,L.supermap.symbolInfoService(this.serverUrl).getSymbolInfo(e,function(t){this.symbolData.innerCells=t.result.innerCells,this.symbolRank=t.result.symbolRank,this.redraw(),this._map&&this._map.getPlotEditControl()&&this._map.getPlotEditControl().fire(SuperMap.Plot.Event.featuresmodified,{features:[this]})},this)}},getNegativeImage:function(){return this.negativeImage},setNegativeImage:function(t){this.negativeImage!==t&&(this.negativeImage=t,this.redraw(),this.layer.fire("propertychanged",{feature:this,property:this.negativeImage}))},getHorizontalMirror:function(){return this.horizontalMirror},setHorizontalMirror:function(t){this.horizontalMirror!==t&&(this.horizontalMirror=t,this.redraw())},getVerticalMirror:function(){return this.verticalMirror},setVerticalMirror:function(t){this.verticalMirror!==t&&(this.verticalMirror=t,this.redraw())},setWidthHeightLimit:function(t){this.limitWidthHeight!==t&&(t.constructor===Boolean&&(this.limitWidthHeight=t),!1===this.limitWidthHeight?(this.initialScale.x=this.symbolSize.w/this.symbolSizeInLib.w,this.initialScale.y=this.symbolSize.h/this.symbolSizeInLib.h):!0===this.limitWidthHeight&&(this.initialScale.x=this.initialScale.x<this.initialScale.y?this.initialScale.y:this.initialScale.x,this.redraw()))},getWidthHeightLimit:function(){return this.limitWidthHeight},getBloodVolumes:function(){return this.bloodVolumes},getSymbolTexts:function(){return this.symbolTexts},getPictureFrames:function(){return this.pictureFrames},move:function(t,e){if(Object.prototype.hasOwnProperty.call(this,"_eventParents")&&null!==this._eventParents)for(var i in this._eventParents){var o=this._eventParents[i];if(o.symbolType===SuperMap.Plot.SymbolType.FLAGGROUP&&!1===o.isSelected)return void this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)}if(this.positionOffset){var l=this._map.latLngToLayerPoint(L.latLng(this.getLatLngs()[0].lat+t,this.getLatLngs()[0].lng+e)),s=this._map.latLngToLayerPoint(this.getLatLngs()[0]);this.positionOffsetX+=(l.x-s.x)/this.dScale,this.positionOffsetY+=(l.y-s.y)/this.dScale,this.redraw()}else T.prototype._move.call(this,t,e);if(this._updateJoinLines(),null!==this.deployments&&0<this.deployments.length)for(let t=0;t<this.deployments.length;t++){var n=this.deployments[t];if(null!==n&&(n.symbolType===SuperMap.Plot.SymbolType.NAVYDEPLOYMENT||n.symbolType===SuperMap.Plot.SymbolType.AIRDEPLOYMENT)){for(var a in n.components)n.components[a].symbolType===SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL&&(n.components[a].latLngs[2]=this.latLngs[0],n.components[a].redraw());for(let t in n.subObjects)n.subObjects[t].redraw()}}for(let i=0,o=this.avoidRegions.length;i<o;i++)L.Util.moveLatLngs(this.avoidRegions[i].getLatLngs(),t,e);var r="";null!==this._map&&this._map instanceof L.Map&&(r=this._map.options.crs.code,L.Util.isMercatorProjection(r)&&this.redraw()),this._updateSymbolTexts(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},getBounds:function(){var t=new L.LatLngBounds;for(var e in this.components){var i=this.components[e];i.isLeadLine||i.isAnnotation||i.isSymbolText||i.isBloodVolume||i.isPictureFrame||t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t},getBoundsWithText:function(){var t=new L.LatLngBounds;for(var e in this.components){var i=this.components[e];i.isLeadLine||t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t},_calculateParts:function(){if(!(this.getLatLngs().length<this.minEditPts))if("none"===this.style.display||null!=this.layer&&"function"==typeof this.layer.getVisibility&&!1===this.layer.getVisibility())this._updateSymbolTexts();else{var t=1;"function"==typeof this.layer.getSymZoomScale&&(t=this.layer.getSymZoomScale()),null!=this.minScale&&t<this.minScale&&(t=this.minScale),null!=this.maxScale&&t>this.maxScale&&(t=this.maxScale);var e=SuperMap.Plot.AnalysisSymbol.analysisSymbolCells(this.symbolData,!0),i=this._map.latLngToLayerPoint(this.getLatLngs()[0]);if(!0===this.positionOffset&&(i.x+=this.positionOffsetX,i.y+=this.positionOffsetY),!0===this.limitWidthHeight)var o=this.initialScale.x*t;for(var l=0,s=e.length;l<s;l++){var n=e[l];if(0!==this.surroundLineType||!0!==n.surroundLineFlag){if(this.negativeImage||this.horizontalMirror){let t=new SuperMap.Plot.Point(this.anchorPoint.x,100),e=this.anchorPoint;this._computeNegativeImage(n,t,e)}if(this.verticalMirror){let t=this.anchorPoint,e=new SuperMap.Plot.Point(100,this.anchorPoint.y);this._computeNegativeImage(n,t,e)}n.type===SuperMap.Plot.SymbolType.TEXTSYMBOL&&(n.style.fontSize=this.initialScale.x*(n.style.fontSize/10),n.style.labelRotation+=-this.dRotate),null!=n.polybezierClose&&(n.type===SuperMap.Plot.SymbolType.POLYBEZIERSYMBOL||n.type===SuperMap.Plot.SymbolType.POLYBEZIERCLOSESYMBOL?(n.type,SuperMap.Plot.SymbolType.POLYBEZIERSYMBOL,n.positionPoints=SuperMap.Plot.PlottingUtil.generateBeizerPointsWithCtrlPt(n.positionPoints),n.isClosed&&n.positionPoints[0]!==n.positionPoints[n.positionPoints.length-1]&&n.positionPoints.push(n.positionPoints[0])):n.type===SuperMap.Plot.SymbolType.KIDNEY&&(n.positionPoints=SuperMap.Plot.Primitives.getSpatialData(n.type,n.positionPoints)));for(var a=0,r=n.positionPoints.length;a<r;a++){n.positionPoints[a].x-=this.symbolData.anchorPoint.x,n.positionPoints[a].y-=this.symbolData.anchorPoint.y,!0===this.limitWidthHeight?(n.positionPoints[a].x=n.positionPoints[a].x*o,n.positionPoints[a].y=n.positionPoints[a].y*o):(n.positionPoints[a].x=n.positionPoints[a].x*this.symbolSize.w/this.symbolSizeInLib.w,n.positionPoints[a].y=n.positionPoints[a].y*this.symbolSize.h/this.symbolSizeInLib.h);var p=this.dRotate*(Math.PI/180);SuperMap.Plot.PlottingUtil.rotateAngle({x:0,y:0},p,n.positionPoints[a]),n.positionPoints[a]=this._transitionPoint(n.positionPoints[a],i)}n.positionPoints=L.Util.latLngsToSuperMapPoints(n.positionPoints)}}this._transSymbolCellsToLayers(e),this.scaleByMap||this._resizeCells(1/t,this.getLatLngs()[0]),this._calculateBloodVolume(),this._calculatePictureFrame(),this._generateLeadLine(),this._annotationId=-1,this.isNotRedrawText||void 0!==this.isNotRedrawText||this._handleAnnotation(),this._calculateLabel(),this._updateSymbolTexts(),this._bounds=this.getBounds(),this.prevScale=t}},_calculateBloodVolume:function(t,e){for(let t=0;t<this.components.length;)!0===this.components[t].isBloodVolume?(null!=this.components[t]._renderer&&(this.components[t].removeEventParent(this),this.components[t].onRemove()),delete this.components[t],this.components.splice(t,1)):t++;if(this.bloodVolumeComponents.length=0,!(this.getLatLngs().length<this.minEditPts)&&null!=this.bloodVolumes&&0!==this.bloodVolumes.length){null==t&&(t=this.getBounds()),null==e&&(e=this.getLatLngs()[0]);var i=this._map.latLngToLayerPoint(e),o=1;"function"==typeof this.layer.getSymZoomScale&&(o=this.layer.getSymZoomScale()),null!=this.minScale&&o<this.minScale&&(o=this.minScale),null!=this.maxScale&&o>this.maxScale&&(o=this.maxScale);for(var l=0;l<this.bloodVolumes.length;l++){var s=[],n=null;if(null!=this.bloodVolumes[l].width)n=Math.abs(this._map.layerPointToLatLng(L.point(i.x+this.bloodVolumes[l].width,i.y)).lng-e.lng);else{var a=Math.abs(this._map.layerPointToLatLng(L.point(i.x+40,i.y)).lng-e.lng);(n=Math.abs(t.getEast()-t.getWest()))<a&&(n=a)}var r,p,u=null;if(null!=this.bloodVolumes[l].height)u=Math.abs(this._map.layerPointToLatLng(L.point(i.x,i.y+this.bloodVolumes[l].height)).lat-e.lat);else{u=Math.abs(this._map.layerPointToLatLng(L.point(i.x,i.y+8)).lat-e.lat)}if(n*=o,u*=o,this.bloodVolumes[l].position===SuperMap.Plot.Position.TOP){let e=L.latLng(t.getNorth(),t.getCenter().lng),i=this._map.latLngToLayerPoint(e);i.x+=this.bloodVolumes[l].offsetX*o,i.y+=this.bloodVolumes[l].offsetY*o,e=this._map.layerPointToLatLng(i),r=L.latLng(e.lat+u,e.lng-.5*n),p=L.latLng(e.lat,e.lng+.5*n)}else if(this.bloodVolumes[l].position===SuperMap.Plot.Position.BOTTOM){let e=L.latLng(t.getSouth(),t.getCenter().lng),i=this._map.latLngToLayerPoint(e);i.x+=this.bloodVolumes[l].offsetX*o,i.y+=this.bloodVolumes[l].offsetY*o,e=this._map.layerPointToLatLng(i),r=L.latLng(e.lat,e.lng-.5*n),p=L.latLng(e.lat-u,e.lng+.5*n)}else if(this.bloodVolumes[l].position===SuperMap.Plot.Position.LEFT){let e=L.latLng(t.getCenter().lat,t.getWest()),i=this._map.latLngToLayerPoint(e);i.x+=this.bloodVolumes[l].offsetX*o,i.y+=this.bloodVolumes[l].offsetY*o,e=this._map.layerPointToLatLng(i),r=L.latLng(e.lat+.5*n,e.lng-u),p=L.latLng(e.lat-.5*n,e.lng)}else if(this.bloodVolumes[l].position===SuperMap.Plot.Position.RIGHT){let e=L.latLng(t.getCenter().lat,t.getEast()),i=this._map.latLngToLayerPoint(e);i.x+=this.bloodVolumes[l].offsetX*o,i.y+=this.bloodVolumes[l].offsetY*o,e=this._map.layerPointToLatLng(i),r=L.latLng(e.lat+.5*n,e.lng),p=L.latLng(e.lat-.5*n,e.lng+u)}let g=this.bloodVolumes[l].style.color;null==g&&(g="#808080");let c=this.bloodVolumes[l].style.weight;null==c&&(c=4);let y=this.bloodVolumes[l].style.opacity;null==y&&(y=1);let P=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[r,p],{fillLimit:!0,fillSymbolID:1,lineWidthLimit:!0,weight:c,lineColorLimit:!0,color:g,opacity:y});P.isBloodVolume=!0,P.fromZoom=this._map.getZoom(),s.push(P);let S=this.bloodVolumes[l].style.remainingVolumeColor;null==S&&(S="#00ff00");let d=this.bloodVolumes[l].style.remainingVolumeOpacity;null==d&&(d=.8);let m=this.bloodVolumes[l].style.consumeVolumeColor;null==m&&(m="#000000");let f=this.bloodVolumes[l].style.consumeVolumeOpacity;null==f&&(f=.8);var h=this.components[this.components.length-1].getBounds();if(this.bloodVolumes[l].position===SuperMap.Plot.Position.TOP||this.bloodVolumes[l].position===SuperMap.Plot.Position.BOTTOM){if(!SuperMap.Plot.PlottingUtil.equalFuzzy(0,this.bloodVolumes[l].volume)){let t=h.getNorthWest(),e=L.latLng(h.getSouthEast().lat,t.lng+this.bloodVolumes[l].volume*n),i=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[t,e],{fillLimit:!0,fillSymbolID:0,fillColorLimit:!0,fillColor:S,fillOpacity:d,lineColorLimit:!0,opacity:0});i.isBloodVolume=!0,i.fromZoom=this._map.getZoom(),s.push(i)}if(!SuperMap.Plot.PlottingUtil.equalFuzzy(1,this.bloodVolumes[l].volume)){let t=h.getSouthEast(),e=L.latLng(h.getNorthWest().lat,h.getNorthWest().lng+this.bloodVolumes[l].volume*n),i=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[t,e],{fillLimit:!0,fillSymbolID:0,fillColorLimit:!0,fillColor:m,fillOpacity:f,lineColorLimit:!0,opacity:0});i.isBloodVolume=!0,i.fromZoom=this._map.getZoom(),s.push(i)}}else if(this.bloodVolumes[l].position===SuperMap.Plot.Position.LEFT||this.bloodVolumes[l].position===SuperMap.Plot.Position.RIGHT){if(!SuperMap.Plot.PlottingUtil.equalFuzzy(0,this.bloodVolumes[l].volume)){let t=h.getSouthWest(),e=L.latLng(t.lat+this.bloodVolumes[l].volume*n,h.getNorthEast().lng),i=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[t,e],{fillLimit:!0,fillSymbolID:0,fillColorLimit:!0,fillColor:S,fillOpacity:d,lineColorLimit:!0,opacity:0});i.isBloodVolume=!0,i.fromZoom=this._map.getZoom(),s.push(i)}if(!SuperMap.Plot.PlottingUtil.equalFuzzy(1,this.bloodVolumes[l].volume)){let t=h.getNorthEast(),e=L.latLng(h.getSouthWest().lat+this.bloodVolumes[l].volume*n,h.getSouthWest().lng),i=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[t,e],{fillLimit:!0,fillSymbolID:0,fillColorLimit:!0,fillColor:m,fillOpacity:f,lineColorLimit:!0,opacity:0});i.isBloodVolume=!0,i.fromZoom=this._map.getZoom(),s.push(i)}}this.bloodVolumeComponents.push(s)}}},_calculatePictureFrame:function(t){for(let t=0;t<this.components.length;)!0===this.components[t].isPictureFrame?(null!=this.components[t]._renderer&&(this.components[t].removeEventParent(this),this.components[t].onRemove()),delete this.components[t],this.components.splice(t,1)):t++;if(this.pictureFrameComponents.length=0,!(this.getLatLngs().length<this.minEditPts)&&null!=this.pictureFrames&&0!==this.pictureFrames.length){null==t&&(t=this.getBounds());for(var e=0;e<this.pictureFrames.length;e++){var i=[];let l,s=0,n=0;if(this.pictureFrames[e].position===SuperMap.Plot.Position.TOP){let i=L.latLng(t.getNorth(),t.getCenter().lng),o=this._map.latLngToLayerPoint(i);o.x+=this.pictureFrames[e].offsetX,o.y+=this.pictureFrames[e].offsetY,l=this._map.layerPointToLatLng(o),s=-.5*this.pictureFrames[e].width,n=-this.pictureFrames[e].height}else if(this.pictureFrames[e].position===SuperMap.Plot.Position.BOTTOM){let i=L.latLng(t.getSouth(),t.getCenter().lng),o=this._map.latLngToLayerPoint(i);o.x+=this.pictureFrames[e].offsetX,o.y+=this.pictureFrames[e].offsetY,l=this._map.layerPointToLatLng(o),s=-.5*this.pictureFrames[e].width}else if(this.pictureFrames[e].position===SuperMap.Plot.Position.LEFT){let i=L.latLng(t.getCenter().lat,t.getWest()),o=this._map.latLngToLayerPoint(i);o.x+=this.pictureFrames[e].offsetX,o.y+=this.pictureFrames[e].offsetY,l=this._map.layerPointToLatLng(o),s=-this.pictureFrames[e].width,n=-.5*this.pictureFrames[e].height}else if(this.pictureFrames[e].position===SuperMap.Plot.Position.RIGHT){let i=L.latLng(t.getCenter().lat,t.getEast()),o=this._map.latLngToLayerPoint(i);o.x+=this.pictureFrames[e].offsetX,o.y+=this.pictureFrames[e].offsetY,l=this._map.layerPointToLatLng(o),n=-.5*this.pictureFrames[e].height}var o={externalGraphic:this.pictureFrames[e].path,graphicWidth:this.pictureFrames[e].width,graphicHeight:this.pictureFrames[e].height,graphicXOffset:s,graphicYOffset:n};let a=L.supermap.plotting.pointImage([l],o);a.isPictureFrame=!0,a.fromZoom=this._map.getZoom(),this._addComponents(a),i.push(a),this.pictureFrameComponents.push(i)}}},_generateLeadLine:function(){if(this.positionOffset)if(this.positionOffsetType===SuperMap.Plot.PositionOffsetType.LINE){let t=this._map.latLngToLayerPoint(this.getLatLngs()[0]),e=L.point(t.x+this.positionOffsetX*this.dScale,t.y+this.positionOffsetY*this.dScale),i=this._map.layerPointToLatLng(e),o=[this.getLatLngs()[0].clone(),i];this._createAndDrawLayer(24,o,{surroundLineFlag:!1,lineTypeLimit:!0}).isLeadLine=!0}else{let s=this._map.latLngToLayerPoint(this.getLatLngs()[0]),n=L.point(s.x+this.positionOffsetX*this.dScale,s.y+this.positionOffsetY*this.dScale),a=this._map.layerPointToLatLng(n);var t,e,i=new SuperMap.Geometry.Point(this.getLatLngs()[0].lng,this.getLatLngs()[0].lat),o=new SuperMap.Geometry.Point(a.lng,a.lat),l=180*SuperMap.Plot.PlottingUtil.radian(i,o)/Math.PI;if(l>45&&l<135||l>225&&l<315){let i=L.point(n.x-this.style.weight/2,n.y),o=L.point(n.x+this.style.weight/2,n.y);t=this._map.layerPointToLatLng(i),e=this._map.layerPointToLatLng(o)}else{let i=L.point(n.x,n.y-this.style.weight/2),o=L.point(n.x,n.y+this.style.weight/2);t=this._map.layerPointToLatLng(i),e=this._map.layerPointToLatLng(o)}let r=[this.getLatLngs()[0],t,e];this._createAndDrawLayer(32,r,{surroundLineFlag:!1,lineWidthLimit:!0,weight:0,fillLimit:!0,fill:!0}).isLeadLine=!0}},_handleAnnotation:function(t){if(null!=this._annotationId&&-1!==this._annotationId&&(null!=this.components[this._annotationId]._renderer&&(this.components[this._annotationId].removeEventParent(this),this.components[this._annotationId].onRemove()),delete this.components[this._annotationId],this.components.splice(this._annotationId,1),this._annotationId=-1),!1!==this.textDisplay&&(this.textContent=SuperMap.Plot.PlottingUtil.trim(this.textContent),null==t&&(t=this.getBounds()),t.isValid()&&this.textContent&&null!==this.textContent&&0!==this.textContent.length&&null!==t&&t.isValid())){var e={};SuperMap.Plot.PlottingUtil.cloneObject(this.style);var i=1;this.scaleByMap&&"function"==typeof this.layer.getSymZoomScale&&(i=this.layer.getSymZoomScale(),null!=this.minScale&&i<this.minScale?i=this.minScale:null!=this.maxScale&&i>this.maxScale&&(i=this.maxScale));var o=this.space*i,l=null;if(0===this.annotationPosition){e.labelAlign="rb";let i=L.latLng(t.getNorth(),t.getWest()),s=this._map.latLngToLayerPoint(i);s.x-=o,l=this._map.layerPointToLatLng(s)}else if(1===this.annotationPosition){e.labelAlign="rt";let i=L.latLng(t.getSouth(),t.getWest()),s=this._map.latLngToLayerPoint(i);s.x-=o,l=this._map.layerPointToLatLng(s)}else if(2===this.annotationPosition){e.labelAlign="lb";let i=L.latLng(t.getNorth(),t.getEast()),s=this._map.latLngToLayerPoint(i);s.x+=o,l=this._map.layerPointToLatLng(s)}else if(3===this.annotationPosition){e.labelAlign="lt";let i=L.latLng(t.getSouth(),t.getEast()),s=this._map.latLngToLayerPoint(i);s.x+=o,l=this._map.layerPointToLatLng(s)}else if(4===this.annotationPosition){e.labelAlign="cb";let i=L.latLng(t.getNorth(),(t.getWest()+t.getEast())/2),s=this._map.latLngToLayerPoint(i);s.y-=o,l=this._map.layerPointToLatLng(s)}else if(5===this.annotationPosition){e.labelAlign="ct";let i=L.latLng(t.getSouth(),(t.getWest()+t.getEast())/2),s=this._map.latLngToLayerPoint(i);s.y+=o,l=this._map.layerPointToLatLng(s)}else if(6===this.annotationPosition){e.labelAlign="rm";let i=L.latLng((t.getSouth()+t.getNorth())/2,t.getWest()),s=this._map.latLngToLayerPoint(i);s.x-=o,l=this._map.layerPointToLatLng(s)}else if(7===this.annotationPosition){e.labelAlign="lm";let i=L.latLng((t.getSouth()+t.getNorth())/2,t.getEast()),s=this._map.latLngToLayerPoint(i);s.x+=o,l=this._map.layerPointToLatLng(s)}else if(8===this.annotationPosition&&this.symbolData.middleMarkExist){var s;s=!0===this.limitWidthHeight?this.middleMarkBounds.scale(this.initialScale.x*i,this.anchorPoint):this._widthHeightLimitScale();var n=new SuperMap.Geometry.Point((s.left+s.right)/2,(s.top+s.bottom)/2);if(this.negativeImage||this.horizontalMirror){var a=SuperMap.Plot.PlottingUtil.projectPoint(n,new SuperMap.Geometry.Point(this.anchorPoint.x,100),new SuperMap.Geometry.Point(this.anchorPoint.x,this.anchorPoint.y));SuperMap.Plot.PlottingUtil.rotateAngle(a,Math.PI,n)}if(this.verticalMirror){a=SuperMap.Plot.PlottingUtil.projectPoint(n,new SuperMap.Geometry.Point(this.anchorPoint.x,this.anchorPoint.y),new SuperMap.Geometry.Point(100,this.anchorPoint.y));SuperMap.Plot.PlottingUtil.rotateAngle(a,Math.PI,n)}n.x-=this.anchorPoint.x,n.y-=this.anchorPoint.y;var r=this.dRotate*(Math.PI/180);SuperMap.Plot.PlottingUtil.rotateAngle(new SuperMap.Geometry.Point(0,0),r,n);var p=this._map.latLngToLayerPoint(this.getLatLngs()[0]);!0===this.positionOffset&&(p.x+=this.positionOffsetX,p.y+=this.positionOffsetY);var u=96*s.getWidth()/25.4/10,h=96*s.getHeight()/25.4/10;e.graphicWidth=u,e.graphicHeight=h,l=this._transitionPoint(n,p)}if(8===this.annotationPosition&&this.symbolData.middleMarkExist){e.rotation=-this.dRotate,e.labelAlign="cm",e.graphicOpacity=1,e.fontColor=this.style.fontColor,e.fontFamily=this.style.fontFamily,e.fontWeight=this.style.fontWeight,e.fontStyle=this.style.fontStyle,e.externalGraphic=this._getTextGraphic(this.textContent,e);var g={externalGraphic:e.externalGraphic,graphicWidth:e.graphicWidth,graphicHeight:e.graphicHeight,rotation:-this.dRotate};let t=L.supermap.plotting.pointImage([l],g);this._annotationId=this.components.length,t.fromZoom=this._map.getZoom(),this._addComponents(t)}else if(8!==this.annotationPosition){e.fontSize=this.style.fontSize*i,e.fontSizeLimit=!1,e.labelRotation=0,this._annotationId=this.components.length;let t=this._createAndDrawLayer(34,[l],e,this.textContent);t.isAnnotation=!0,t.fromZoom=this._map.getZoom()}}},_calculateLabel:function(t,e){for(let t=0;t<this.components.length;)!0===this.components[t].isSymbolText?(null!=this.components[t]._renderer&&(this.components[t].removeEventParent(this),this.components[t].onRemove()),delete this.components[t],this.components.splice(t,1)):t++;if(this.symbolTextComponents.length=0,null!=this.symbolTexts&&0!==this.symbolTexts.length){var i={surroundLineFlag:!1,lineColorLimit:!0,fillColorLimit:!0,lineWidthLimit:!0,lineTypeLimit:!0,fontColorLimit:!0,fontSizeLimit:!0,fillLimit:!0};if(null==t&&(t=this.getBounds()),t&&t.isValid()){null==e&&(e=this.latLngs[0]);var o=1;"function"==typeof this.layer.getSymZoomScale&&(o=this.layer.getSymZoomScale()),null!=this.minScale&&o<this.minScale&&(o=this.minScale),null!=this.maxScale&&o>this.maxScale&&(o=this.maxScale);for(var l=0;l<this.symbolTexts.length;l++){var s=[];if(null==this.symbolTexts[l].textContent||0===this.symbolTexts[l].textContent.length)continue;if(null!=this.symbolTexts[l].style&&"none"===this.symbolTexts[l].style.display)continue;var n=this.symbolTexts[l];this._mergeStyleToSymbolText(n),n.textPosition=null==n.textPosition?0:n.textPosition;var a=n.textContent.split("\n"),r=a.length,p=0,u=0;if(n.border){var h=SuperMap.Plot.PlottingUtil.cloneObject(n.style);h.fontSize*=o,p=SuperMap.Plot.PlottingUtil.getTextWidth(h,a[0])+n.paddingX*o*2;for(var g=1;g<r;g++){var c=SuperMap.Plot.PlottingUtil.getTextWidth(h,a[g])+n.paddingX*o*2;c>p&&(p=c)}u=parseInt(n.style.fontSize*o*r)+n.paddingY*o*2}let m,f,M=L.point(0,0),b=L.point(0,0);switch(n.textPosition){case SuperMap.Plot.AnnoPosition.LEFTTOP:n.style.labelAlign="rb",m=L.latLng(t.getNorth(),t.getWest()),(f=this._map.latLngToLayerPoint(m)).x+=n.offsetX*o,f.y+=n.offsetY*o,!0===n.border&&(M.x=f.x,M.y=f.y,b.x=f.x-p,b.y=f.y-u);break;case SuperMap.Plot.AnnoPosition.LEFTBOTTOM:n.style.labelAlign="rt",m=L.latLng(t.getSouth(),t.getWest()),(f=this._map.latLngToLayerPoint(m)).x+=n.offsetX*o,f.y+=n.offsetY*o,!0===n.border&&(M.x=f.x,M.y=f.y,b.x=f.x-p,b.y=f.y+u);break;case SuperMap.Plot.AnnoPosition.RIGHTTOP:n.style.labelAlign="lb",m=L.latLng(t.getNorth(),t.getEast()),(f=this._map.latLngToLayerPoint(m)).x+=n.offsetX*o,f.y+=n.offsetY*o,!0===n.border&&(M.x=f.x,M.y=f.y,b.x=f.x+p,b.y=f.y-u);break;case SuperMap.Plot.AnnoPosition.RIGHTBOTTOM:n.style.labelAlign="lt",m=L.latLng(t.getSouth(),t.getEast()),(f=this._map.latLngToLayerPoint(m)).x+=n.offsetX*o,f.y+=n.offsetY*o,!0===n.border&&(M.x=f.x,M.y=f.y,b.x=f.x+p,b.y=f.y+u);break;case SuperMap.Plot.AnnoPosition.TOP:n.style.labelAlign="cb",m=L.latLng(t.getNorth(),(t.getWest()+t.getEast())/2),(f=this._map.latLngToLayerPoint(m)).x+=n.offsetX*o,f.y+=n.offsetY*o,!0===n.border&&(M.x=f.x-p/2,M.y=f.y,b.x=f.x+p/2,b.y=f.y-u);break;case SuperMap.Plot.AnnoPosition.BOTTOM:n.style.labelAlign="ct",m=L.latLng(t.getSouth(),(t.getWest()+t.getEast())/2),(f=this._map.latLngToLayerPoint(m)).x+=n.offsetX*o,f.y+=n.offsetY*o,!0===n.border&&(M.x=f.x-p/2,M.y=f.y,b.x=f.x+p/2,b.y=f.y+u);break;case SuperMap.Plot.AnnoPosition.LEFT:n.style.labelAlign="rm",m=L.latLng((t.getSouth()+t.getNorth())/2,t.getWest()),(f=this._map.latLngToLayerPoint(m)).x+=n.offsetX*o,f.y+=n.offsetY*o,!0===n.border&&(M.x=f.x,M.y=f.y+u/2,b.x=f.x-p,b.y=f.y-u/2);break;case SuperMap.Plot.AnnoPosition.RIGHT:n.style.labelAlign="lm",m=L.latLng((t.getSouth()+t.getNorth())/2,t.getEast()),(f=this._map.latLngToLayerPoint(m)).x+=n.offsetX*o,f.y+=n.offsetY*o,!0===n.border&&(M.x=f.x,M.y=f.y+u/2,b.x=f.x+p,b.y=f.y-u/2);break;case SuperMap.Plot.AnnoPosition.ANCHOR:n.style.labelAlign="lm",m=L.latLng(e.lat,e.lng),(f=this._map.latLngToLayerPoint(m)).x+=n.offsetX*o,f.y+=n.offsetY*o,n.offsetX>0?(n.style.labelAlign="lm",!0===n.border&&(M.x=f.x,M.y=f.y+u/2,b.x=f.x+p,b.y=f.y-u/2)):(n.style.labelAlign="rm",!0===n.border&&(M.x=f.x,M.y=f.y+u/2,b.x=f.x-p,b.y=f.y-u/2))}var y=this._map.layerPointToLatLng(f);if(!0===n.showRelationLine&&(0!==n.offsetX||0!==n.offsetY)){let t=n.lineStyle;null==n.lineStyle&&(t=SuperMap.Util.copyAttributes(t,this.style)),t.lineColorLimit=!0,t.lineTypeLimit=!0,t.lineWidthLimit=!0;let e=this._createAndDrawLayer(SuperMap.Plot.SymbolType.POLYLINESYMBOL,[y,m],t);e.isSymbolText=!0,e.fromZoom=this._map.getZoom(),s.push(e)}var P=SuperMap.Util.copyAttributes(i,n.style);if(n.border){var S=this._map.layerPointToLatLng(M),d=this._map.layerPointToLatLng(b);let t=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[S,d],SuperMap.Util.cloneObject(P));t.isSymbolText=!0,t.fromZoom=this._map.getZoom(),s.push(t);let e=M.x<b.x?M.x:b.x,i=M.y<b.y?M.y:b.y,o=this._map.layerPointToLatLng(L.point(e+n.paddingX,i+u/2)),l=SuperMap.Util.cloneObject(P);l.labelAlign="lm";let a=this._createAndDrawLayer(SuperMap.Plot.SymbolType.TEXTSYMBOL,[o],l,n.textContent);a.isSymbolText=!0,a.fromZoom=this._map.getZoom(),s.push(a)}else{let t=this._createAndDrawLayer(SuperMap.Plot.SymbolType.TEXTSYMBOL,[y],SuperMap.Util.cloneObject(P),n.textContent);t.isSymbolText=!0,t.fromZoom=this._map.getZoom(),s.push(t)}this.symbolTextComponents.push(s)}}}},_getTextGraphic:function(t,e){var i=SuperMap.Plot.PlottingUtil.cloneObject(e);i.fontPercent=100,i.fontSpace=0,void 0!==this.flagTextSize?i.fontSize=this.flagTextSize:i.fontSize=60,i.labelAlign="cm";var o=document.createElement("canvas"),l=SuperMap.Plot.PlottingUtil.getTextWidth(i,t);o.width=l+20,o.height=parseFloat(i.fontSize)+10,document.body.appendChild(o);var s=o.getContext("2d");s.fillStyle=i.fontColor,s.globalAlpha=i.fontOpacity||1;var n=[i.fontStyle?i.fontStyle:"normal","normal",i.fontWeight?i.fontWeight:"normal",i.fontSize?new String(i.fontSize)+"px":"1em",i.fontFamily?i.fontFamily:"sans-serif"].join(" ");if(s.fillText)s.font=n,s.textAlign="center",s.textBaseline="middle",s.fillText(t,o.width/2,o.height/2);else if(s.mozDrawText){s.mozTextStyle=n;var a=-.5;L.PlotCanvas.LABEL_FACTOR[e.labelAlign[0]],null==a&&(a=-.5);var r=-.5;L.PlotCanvas.LABEL_FACTOR[e.labelAlign[1]],null==r&&(r=-.5);var p=[0,0],u=s.mozMeasureText("xx");p[1]+=u*(1+r*numRows);var h=p[0]+a*s.mozMeasureText(t),g=p[1]+u;s.translate(h,g),s.mozDrawText(t),s.translate(-h,-g)}var c=o.toDataURL("image/png","image/octet-stream");return document.body.removeChild(o),c},_transitionPoint:function(t,e){var i=e.x+t.x*(96/254),o=e.y-t.y*(96/254);return this._map.layerPointToLatLng(L.point(i,o))},_widthHeightLimitScale:function(){var t=this.initialScale.x,e=this.initialScale.y,i=this.anchorPoint.x,o=this.anchorPoint.y,l=(this.middleMarkBounds.left-i)*t+i,s=(this.middleMarkBounds.bottom-o)*e+o,n=(this.middleMarkBounds.right-i)*t+i,a=(this.middleMarkBounds.top-o)*e+o;return new SuperMap.Bounds(l,s,n,a)},_updateJoinLines:function(){if(null!==this.joinLines&&0<this.joinLines.length)for(let e=0;e<this.joinLines.length;e++){var t=this.joinLines[e];null!==t&&null!=t.layer&&(t instanceof _&&t.redraw())}},_mergeStyleToSymbolText:function(t){if(null!==this.components)for(var e in null!==t.style&&void 0!==t.style||(t.style={}),this.style)Object.prototype.hasOwnProperty.call(t.style,e)||(t.style[e]=this.style[e])},_resizeCells:function(t,e){for(var i in this.components)L.Util.resizeLatLngs(this.components[i].getLatLngs(),e,t),this.components[i].setLatLngs(this.components[i].getLatLngs());this._renderer instanceof L.Canvas&&this._updateCanvasFills()},_rotate:function(t,e){T.prototype._rotate.call(this,t,e),this.dRotate+=t},_resize:function(t,e){T.prototype._resize.call(this,t,e),!0===this.limitWidthHeight?(this.initialScale.x*=t,this.symbolSize.w=this.initialScale.x*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale.x*this.symbolSizeInLib.h):(this.symbolSize.w=this.initialScale.x*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale.y*this.symbolSizeInLib.h),this.style.fontSize=this.fontSize*this.initialScale.x,this.prevFontSize=this.style.fontSize},_computeNegativeImage:function(t,e,i){for(let s=0;s<t.positionPoints.length;s++){var o=t.positionPoints[s];if(!SuperMap.Plot.PlottingUtil.isOnLine(o,e,i)){var l=SuperMap.Plot.PlottingUtil.pointProjectToSegment(o,e,i).projectPoint;o=SuperMap.Plot.PlottingUtil.rotateAngle(l,Math.PI,o)}t.positionPoints[s].x=o.x,t.positionPoints[s].y=o.y}},_setSymbolData:function(t){if(T.prototype._setSymbolData.call(this,t),this.symbolData){Object.prototype.hasOwnProperty.call(this.symbolData,"type")||(this.symbolData.type="GRAPHICOBJECT"),this.symbolData.symbolRank=this.symbolRank,this.symbolData.negativeImage=this.negativeImage,this.symbolData.horizontalMirror=this.horizontalMirror,this.symbolData.verticalMirror=this.verticalMirror,this.symbolData.space=this.space,this.symbolData.flagTextSize=this.flagTextSize,this.symbolData.maxScale=this.maxScale,this.symbolData.minScale=this.minScale,this.symbolData.textDisplay=this.textDisplay,this.symbolData.initialScale=this.initialScale,this.symbolData.actualScale=this.actualScale,void 0!==this.fontSize&&(this.symbolData.fontSize=this.fontSize),void 0!==this.strokeWidth&&(this.symbolData.strokeWidth=this.strokeWidth);var e=25.4*this.symbolSize.w*10/96,i=25.4*this.symbolSize.h*10/96;this.symbolData.symbolSize={x:e,y:i};var o=25.4*this.symbolSizeInLib.w*10/96,l=25.4*this.symbolSizeInLib.h*10/96;this.symbolData.symbolSizeInLib={x:o,y:l},this.symbolData.positionOffset=this.positionOffset,this.symbolData.positionOffsetType=this.positionOffsetType,this.symbolData.positionOffsetX=this.positionOffsetX,this.symbolData.positionOffsetY=this.positionOffsetY}},_parseBasicData:function(){if(this.symbolName=this.symbolData.symbolName,void 0!==this.symbolData.symbolSizeInLib?(this.symbolSizeInLib.w=Math.round(96*this.symbolData.symbolSizeInLib.x/25.4/10),this.symbolSizeInLib.h=Math.round(96*this.symbolData.symbolSizeInLib.y/25.4/10)):void 0!==this.symbolData.symbolSize&&(this.symbolSizeInLib.w=Math.round(96*this.symbolData.symbolSize.x/25.4/10),this.symbolSizeInLib.h=Math.round(96*this.symbolData.symbolSize.y/25.4/10)),null===this.initialScale||isNaN(this.initialScale)||this.initialScale===1/0){var t=L.supermap.plotting.getControl(this.map,this.serverUrl).getDefaultStyle();if(t&&!0===t.defaultFlag&&this.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&-1!==t.dotSymbolSize){var e=this.symbolSizeInLib.w;if(this.symbolSizeInLib.h>this.symbolSizeInLib.w&&(e=this.symbolSizeInLib.h),0===e||0===t.dotSymbolSize)this.symbolSize.w=this.symbolSizeInLib.w,this.symbolSize.h=this.symbolSizeInLib.h;else if(0!==this.symbolSize.w||0===this.symbolData.symbolSize.x||0!==this.symbolSize.h||0===this.symbolData.symbolSize.y||this.minEditPts)if(0!==this.symbolSize.w||0!==this.symbolSize.h);else{var i=t.dotSymbolSize/e;this.symbolSize.w=i*this.symbolSizeInLib.w,this.symbolSize.h=i*this.symbolSizeInLib.h}else{this.symbolSize.w=96*this.symbolData.symbolSize.x/25.4/10,this.symbolSize.h=96*this.symbolData.symbolSize.y/25.4/10;var o=this.symbolSize.w/this.dScale/this.symbolSizeInLib.w,l=this.symbolSize.h/this.dScale/this.symbolSizeInLib.h;this.initialScale!==o?this.initialScale=o:this.initialScale!==l&&(this.initialScale=l),this.symbolSize.w=this.initialScale*this.dScale*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale*this.dScale*this.symbolSizeInLib.h}}var s=this.symbolSizeInLib.w,n=this.symbolSize.w;this.symbolSizeInLib.w<this.symbolSizeInLib.h&&(s=this.symbolSizeInLib.h,n=this.symbolSize.h),this.initialScale=n/s,this.symbolSize.w=this.initialScale*this.dScale*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale*this.dScale*this.symbolSizeInLib.h,(void 0===this.fontSize||isNaN(this.fontSize))&&(void 0===this.style.fontSize&&(this.style.fontSize=12),this.fontSize=this.style.fontSize/this.initialScale)}this.anchorPoint=new SuperMap.Geometry.Point(this.symbolData.anchorPoint.x,this.symbolData.anchorPoint.y),this.middleMarkBounds=new SuperMap.Bounds(this.symbolData.middleMarkBounds.leftBottom.x,this.symbolData.middleMarkBounds.leftBottom.y,this.symbolData.middleMarkBounds.rightTop.x,this.symbolData.middleMarkBounds.rightTop.y),this.symbolRank=this.symbolData.symbolRank,this.negativeImage=this.symbolData.negativeImage,this.horizontalMirror=this.symbolData.horizontalMirror,this.verticalMirror=this.symbolData.verticalMirror},_parseSymbolData:function(){if(T.prototype._parseSymbolData.call(this),null!==this.symbolData){if(void 0!==this.symbolData.symbolSizeInLib?(this.symbolSizeInLib.w=Math.round(96*this.symbolData.symbolSizeInLib.x/25.4/10),this.symbolSizeInLib.h=Math.round(96*this.symbolData.symbolSizeInLib.y/25.4/10)):this.symbolData.innerCells&&(this.symbolSizeInLib.w=Math.round(96*this.symbolData.symbolSize.x/25.4/10),this.symbolSizeInLib.h=Math.round(96*this.symbolData.symbolSize.y/25.4/10)),this.symbolRank=this.symbolData.symbolRank,this.negativeImage=this.symbolData.negativeImage,this.horizontalMirror=this.symbolData.horizontalMirror,this.verticalMirror=this.symbolData.verticalMirror,void 0!==this.symbolData.anchorPoint&&(this.anchorPoint=new SuperMap.Geometry.Point(this.symbolData.anchorPoint.x,this.symbolData.anchorPoint.y)),void 0!==this.symbolData.middleMarkBounds&&null!==this.symbolData.middleMarkBounds&&(this.middleMarkBounds=new SuperMap.Bounds(this.symbolData.middleMarkBounds.leftBottom.x,this.symbolData.middleMarkBounds.leftBottom.y,this.symbolData.middleMarkBounds.rightTop.x,this.symbolData.middleMarkBounds.rightTop.y)),void 0!==this.symbolData.actualScale&&null!==this.symbolData.actualScale&&(this.actualScale=this.symbolData.actualScale),void 0!==this.symbolData.fontSize&&null!==this.symbolData.fontSize&&(this.fontSize=this.symbolData.fontSize),void 0!==this.symbolData.strokeWidth&&void 0!==this.symbolData.strokeWidth&&(this.strokeWidth=this.symbolData.strokeWidth),void 0!==this.symbolData.space&&null!==this.symbolData.space&&(this.space=this.symbolData.space),void 0!==this.symbolData.flagTextSize&&null!==this.symbolData.flagTextSize&&(this.flagTextSize=this.symbolData.flagTextSize),void 0!==this.symbolData.maxScale&&null!==this.symbolData.maxScale&&(this.maxScale=this.symbolData.maxScale),void 0!==this.symbolData.minScale&&null!==this.symbolData.minScale&&(this.minScale=this.symbolData.minScale),void 0!==this.symbolData.textDisplay&&null!==this.symbolData.textDisplay&&(this.textDisplay=this.symbolData.textDisplay),void 0!==this.symbolData.initialScale&&null!==this.symbolData.initialScale){this.initialScale=this.symbolData.initialScale;var t=this.initialScale*this.symbolSizeInLib.w*this.dScale,e=this.initialScale*this.symbolSizeInLib.h*this.dScale;this.symbolSize=new SuperMap.Size(t,e),this.symbolSize.w=t,this.symbolSize.h=e}else if(!1!==this.isEdit){var i=96*this.symbolData.symbolSize.x/25.4/10,o=96*this.symbolData.symbolSize.y/25.4/10;this.setSymbolSize(i,o)}void 0!==this.symbolData.positionOffset&&null!==this.symbolData.positionOffset&&(this.positionOffset=this.symbolData.positionOffset),void 0!==this.symbolData.positionOffsetType&&null!==this.symbolData.positionOffsetType&&(this.positionOffsetType=this.symbolData.positionOffsetType),void 0!==this.symbolData.positionOffsetX&&null!==this.symbolData.positionOffsetX&&(this.positionOffsetX=this.symbolData.positionOffsetX),void 0!==this.symbolData.positionOffsetY&&null!==this.symbolData.positionOffsetY&&(this.positionOffsetY=this.symbolData.positionOffsetY)}}});L.supermap.plotting.dotSymbol=function(t,e,i,o){return new lt(t,e,i,o)},L.supermap.plotting.DotSymbol=lt;var st=T.extend({path:null,symbolTexts:null,symbolTextComponents:null,bloodVolumes:null,bloodVolumeComponents:null,trajectory:null,antoRotation:null,getPath:function(){return this.path},setPath:function(t,e,i){this.path!==t&&(this.path=t,this.style.graphicWidth=e,this.style.graphicHeight=i,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getBloodVolumes:function(){return this.bloodVolumes},getSymbolTexts:function(){return this.symbolTexts},setScale:function(t){isNaN(t)||(this.style.graphicHeight*=t/this.dScale,this.style.graphicWidth*=t/this.dScale,this.dScale=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},setRotate:function(t){isNaN(t)||(this.dRotate=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},initialize:function(t,e,i,o){this.code=SuperMap.Plot.SymbolType.PICTURE,this.libID=0,this.symbolType=SuperMap.Plot.SymbolType.PICTURE,this.symbolName="图片",this.minEditPts=1,this.maxEditPts=1,this.symbolTexts=[],this.bloodVolumes=[],this.symbolTextComponents=[],this.bloodVolumeComponents=[],this.autoRotation=!1,T.prototype.initialize.call(this,t,e,i,o),null===this.path&&(this.path="../img/marker.png")},_calculateParts:function(){if(this.getLatLngs().length<this.minEditPts)return;if("none"===this.style.display||null!=this.layer&&"function"==typeof this.layer.getVisibility&&!1===this.layer.getVisibility())return;var t={surroundLineFlag:!1};this.style.externalGraphic=t.externalGraphic=this.style.externalGraphic?this.style.externalGraphic:this.path,this.style.graphicOpacity=t.graphicOpacity=this.style.graphicOpacity?this.style.graphicOpacity:1,this.style.graphicWidth=t.graphicWidth=this.style.graphicWidth?this.style.graphicWidth:32,this.style.graphicHeight=t.graphicHeight=this.style.graphicHeight?this.style.graphicHeight:32,t.rotation=-this.dRotate,this.style.graphicXOffset=t.graphicXOffset=this.style.graphicXOffset?this.style.graphicXOffset:0,this.style.graphicYOffset=t.graphicYOffset=this.style.graphicYOffset?this.style.graphicYOffset:0;var e={externalGraphic:t.externalGraphic,graphicWidth:t.graphicWidth,graphicHeight:t.graphicHeight,rotation:-this.dRotate,graphicXOffset:t.graphicXOffset,graphicYOffset:t.graphicYOffset,graphicOpacity:t.graphicOpacity};let i=L.supermap.plotting.pointImage(L.Util.cloneLatLngs(this.getLatLngs()),e);this._addComponents(i),this._bounds=this.getBounds(),this._calculateLabel(),this._calculateBloodVolume()},getBounds:function(){if(this.getLatLngs().length>0){var t=this._map.latLngToLayerPoint(this.getLatLngs()[0]),e=.5*this.style.graphicWidth-this.style.graphicXOffset,i=.5*this.style.graphicHeight-this.style.graphicYOffset,o=L.point(t.x-e,t.y-i),l=L.point(o.x+this.style.graphicWidth,o.y+this.style.graphicHeight),s=this._map.layerPointToLatLng(o),n=this._map.layerPointToLatLng(l),a=new L.latLngBounds;if(0!==this.dRotate){var r=[];r.push(new SuperMap.Geometry.Point(s.lng,s.lat)),r.push(new SuperMap.Geometry.Point(n.lng,s.lat)),r.push(new SuperMap.Geometry.Point(n.lng,n.lat)),r.push(new SuperMap.Geometry.Point(s.lng,n.lat));for(var p=null,u=null,h=null,g=null,c=this.dRotate*(Math.PI/180),y=0;y<r.length;y++)SuperMap.Plot.PlottingUtil.rotateAngle(new SuperMap.Geometry.Point(this.getLatLngs()[0].lng,this.getLatLngs()[0].lat),c,r[y]),null==p?p=r[y].x:p>r[y].x&&(p=r[y].x),null==u?u=r[y].x:u<r[y].x&&(u=r[y].x),null==h?h=r[y].y:h>r[y].y&&(h=r[y].y),null==g?g=r[y].y:g<r[y].y&&(g=r[y].y);a=L.latLngBounds(L.latLng(h,u),L.latLng(g,p))}else a=L.latLngBounds(s,n)}return a},_calculateLabel:function(t,e){for(let t=0;t<this.components.length;)!0===this.components[t].isSymbolText?(null!=this.components[t]._renderer&&(this.components[t].removeEventParent(this),this.components[t].onRemove()),delete this.components[t],this.components.splice(t,1)):t++;if(this.symbolTextComponents.length=0,null!=this.symbolTexts&&0!==this.symbolTexts.length){var i={surroundLineFlag:!1,lineColorLimit:!0,fillColorLimit:!0,lineWidthLimit:!0,lineTypeLimit:!0,fontColorLimit:!0,fontSizeLimit:!0,fillLimit:!0};if(null==t&&(t=this.getBounds()),t&&t.isValid()){null==e&&(e=this.latLngs[0]);for(var o=0;o<this.symbolTexts.length;o++){var l=[];if(null==this.symbolTexts[o].textContent||0===this.symbolTexts[o].textContent.length)continue;if(null!=this.symbolTexts[o].style&&"none"===this.symbolTexts[o].style.display)continue;var s=this.symbolTexts[o];this._mergeStyleToSymbolText(s),s.textPosition=null==s.textPosition?0:s.textPosition;var n=s.textContent.split("\n"),a=n.length,r=0,p=0;if(s.border){r=SuperMap.Plot.PlottingUtil.getTextWidth(s.style,n[0])+2*s.paddingX;for(var u=1;u<a;u++){var h=SuperMap.Plot.PlottingUtil.getTextWidth(s.style,n[u])+2*s.paddingX;h>r&&(r=h)}p=parseInt(s.style.fontSize*a)+2*s.paddingY}let S,d,m=L.point(0,0),f=L.point(0,0);switch(s.textPosition){case SuperMap.Plot.AnnoPosition.LEFTTOP:s.style.labelAlign="rb",S=L.latLng(t.getNorth(),t.getWest()),(d=this._map.latLngToLayerPoint(S)).x+=s.offsetX,d.y+=s.offsetY,!0===s.border&&(m.x=d.x,m.y=d.y,f.x=d.x-r,f.y=d.y-p);break;case SuperMap.Plot.AnnoPosition.LEFTBOTTOM:s.style.labelAlign="rt",S=L.latLng(t.getSouth(),t.getWest()),(d=this._map.latLngToLayerPoint(S)).x+=s.offsetX,d.y+=s.offsetY,!0===s.border&&(m.x=d.x,m.y=d.y,f.x=d.x-r,f.y=d.y+p);break;case SuperMap.Plot.AnnoPosition.RIGHTTOP:s.style.labelAlign="lb",S=L.latLng(t.getNorth(),t.getEast()),(d=this._map.latLngToLayerPoint(S)).x+=s.offsetX,d.y+=s.offsetY,!0===s.border&&(m.x=d.x,m.y=d.y,f.x=d.x+r,f.y=d.y-p);break;case SuperMap.Plot.AnnoPosition.RIGHTBOTTOM:s.style.labelAlign="lt",S=L.latLng(t.getSouth(),t.getEast()),(d=this._map.latLngToLayerPoint(S)).x+=s.offsetX,d.y+=s.offsetY,!0===s.border&&(m.x=d.x,m.y=d.y,f.x=d.x+r,f.y=d.y+p);break;case SuperMap.Plot.AnnoPosition.TOP:s.style.labelAlign="cb",S=L.latLng(t.getNorth(),(t.getWest()+t.getEast())/2),(d=this._map.latLngToLayerPoint(S)).x+=s.offsetX,d.y+=s.offsetY,!0===s.border&&(m.x=d.x-r/2,m.y=d.y,f.x=d.x+r/2,f.y=d.y-p);break;case SuperMap.Plot.AnnoPosition.BOTTOM:s.style.labelAlign="ct",S=L.latLng(t.getSouth(),(t.getWest()+t.getEast())/2),(d=this._map.latLngToLayerPoint(S)).x+=s.offsetX,d.y+=s.offsetY,!0===s.border&&(m.x=d.x-r/2,m.y=d.y,f.x=d.x+r/2,f.y=d.y+p);break;case SuperMap.Plot.AnnoPosition.LEFT:s.style.labelAlign="rm",S=L.latLng((t.getSouth()+t.getNorth())/2,t.getWest()),(d=this._map.latLngToLayerPoint(S)).x+=s.offsetX,d.y+=s.offsetY,!0===s.border&&(m.x=d.x,m.y=d.y+p/2,f.x=d.x-r,f.y=d.y-p/2);break;case SuperMap.Plot.AnnoPosition.RIGHT:s.style.labelAlign="lm",S=L.latLng((t.getSouth()+t.getNorth())/2,t.getEast()),(d=this._map.latLngToLayerPoint(S)).x+=s.offsetX,d.y+=s.offsetY,!0===s.border&&(m.x=d.x,m.y=d.y+p/2,f.x=d.x+r,f.y=d.y-p/2);break;case SuperMap.Plot.AnnoPosition.ANCHOR:s.style.labelAlign="lm",S=L.latLng(e.lat,e.lng),(d=this._map.latLngToLayerPoint(S)).x+=s.offsetX,d.y+=s.offsetY,s.offsetX>0?(s.style.labelAlign="lm",!0===s.border&&(m.x=d.x,m.y=d.y+p/2,f.x=d.x+r,f.y=d.y-p/2)):(s.style.labelAlign="rm",!0===s.border&&(m.x=d.x,m.y=d.y+p/2,f.x=d.x-r,f.y=d.y-p/2))}var g=this._map.layerPointToLatLng(d);if(!0===s.showRelationLine&&(0!==s.offsetX||0!==s.offsetY)){let t=s.lineStyle;null==s.lineStyle&&(t=SuperMap.Util.copyAttributes(t,this.style)),t.lineColorLimit=!0,t.lineTypeLimit=!0,t.lineWidthLimit=!0;let e=this._createAndDrawLayer(SuperMap.Plot.SymbolType.POLYLINESYMBOL,[g,S],t);e.isSymbolText=!0,e.fromZoom=this._map.getZoom(),l.push(e)}var c=SuperMap.Util.copyAttributes(i,s.style);if(s.border){var y=this._map.layerPointToLatLng(m),P=this._map.layerPointToLatLng(f);let t=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[y,P],SuperMap.Util.cloneObject(c));t.isSymbolText=!0,t.fromZoom=this._map.getZoom(),l.push(t);let e=m.x<f.x?m.x:f.x,i=m.y<f.y?m.y:f.y,o=this._map.layerPointToLatLng(L.point(e+s.paddingX,i+p/2)),n=SuperMap.Util.cloneObject(c);n.labelAlign="lm";let a=this._createAndDrawLayer(SuperMap.Plot.SymbolType.TEXTSYMBOL,[o],n,s.textContent);a.isSymbolText=!0,a.fromZoom=this._map.getZoom(),l.push(a)}else{let t=this._createAndDrawLayer(SuperMap.Plot.SymbolType.TEXTSYMBOL,[g],SuperMap.Util.cloneObject(c),s.textContent);t.isSymbolText=!0,t.fromZoom=this._map.getZoom(),l.push(t)}this.symbolTextComponents.push(l)}}}},_calculateBloodVolume:function(t,e){for(let t=0;t<this.components.length;)!0===this.components[t].isBloodVolume?(null!=this.components[t]._renderer&&(this.components[t].removeEventParent(this),this.components[t].onRemove()),delete this.components[t],this.components.splice(t,1)):t++;if(this.bloodVolumeComponents.length=0,!(this.getLatLngs().length<this.minEditPts)&&null!=this.bloodVolumes&&0!==this.bloodVolumes.length){null==t&&(t=this.getBounds()),null==e&&(e=this.getLatLngs()[0]);for(var i=this._map.latLngToLayerPoint(e),o=0;o<this.bloodVolumes.length;o++){var l=[],s=null;if(null!=this.bloodVolumes[o].width)s=Math.abs(this._map.layerPointToLatLng(L.point(i.x+this.bloodVolumes[o].width,i.y)).lng-e.lng);else{var n=Math.abs(this._map.layerPointToLatLng(L.point(i.x+40,i.y)).lng-e.lng);(s=Math.abs(t.getEast()-t.getWest()))<n&&(s=n)}var a,r,p=null;if(null!=this.bloodVolumes[o].height)p=Math.abs(this._map.layerPointToLatLng(L.point(i.x,i.y+this.bloodVolumes[o].height)).lat-e.lat);else{p=Math.abs(this._map.layerPointToLatLng(L.point(i.x,i.y+8)).lat-e.lat)}if(this.bloodVolumes[o].position===SuperMap.Plot.Position.TOP){let e=L.latLng(t.getNorth(),t.getCenter().lng),i=this._map.latLngToLayerPoint(e);i.x+=this.bloodVolumes[o].offsetX,i.y+=this.bloodVolumes[o].offsetY,e=this._map.layerPointToLatLng(i),a=L.latLng(e.lat+p,e.lng-.5*s),r=L.latLng(e.lat,e.lng+.5*s)}else if(this.bloodVolumes[o].position===SuperMap.Plot.Position.BOTTOM){let e=L.latLng(t.getSouth(),t.getCenter().lng),i=this._map.latLngToLayerPoint(e);i.x+=this.bloodVolumes[o].offsetX,i.y+=this.bloodVolumes[o].offsetY,e=this._map.layerPointToLatLng(i),a=L.latLng(e.lat,e.lng-.5*s),r=L.latLng(e.lat-p,e.lng+.5*s)}else if(this.bloodVolumes[o].position===SuperMap.Plot.Position.LEFT){let e=L.latLng(t.getCenter().lat,t.getWest()),i=this._map.latLngToLayerPoint(e);i.x+=this.bloodVolumes[o].offsetX,i.y+=this.bloodVolumes[o].offsetY,e=this._map.layerPointToLatLng(i),a=L.latLng(e.lat+.5*s,e.lng-p),r=L.latLng(e.lat-.5*s,e.lng)}else if(this.bloodVolumes[o].position===SuperMap.Plot.Position.RIGHT){let e=L.latLng(t.getCenter().lat,t.getEast()),i=this._map.latLngToLayerPoint(e);i.x+=this.bloodVolumes[o].offsetX,i.y+=this.bloodVolumes[o].offsetY,e=this._map.layerPointToLatLng(i),a=L.latLng(e.lat+.5*s,e.lng),r=L.latLng(e.lat-.5*s,e.lng+p)}let h=this.bloodVolumes[o].style.color;null==h&&(h="#808080");let g=this.bloodVolumes[o].style.weight;null==g&&(g=4);let c=this.bloodVolumes[o].style.opacity;null==c&&(c=1);let y=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[a,r],{fillLimit:!0,fillSymbolID:1,lineWidthLimit:!0,weight:g,lineColorLimit:!0,color:h,opacity:c});y.isBloodVolume=!0,y.fromZoom=this._map.getZoom(),l.push(y);let P=this.bloodVolumes[o].style.remainingVolumeColor;null==P&&(P="#00ff00");let S=this.bloodVolumes[o].style.remainingVolumeOpacity;null==S&&(S=.8);let d=this.bloodVolumes[o].style.consumeVolumeColor;null==d&&(d="#000000");let m=this.bloodVolumes[o].style.consumeVolumeOpacity;null==m&&(m=.8);var u=this.components[this.components.length-1].getBounds();if(this.bloodVolumes[o].position===SuperMap.Plot.Position.TOP||this.bloodVolumes[o].position===SuperMap.Plot.Position.BOTTOM){if(!SuperMap.Plot.PlottingUtil.equalFuzzy(0,this.bloodVolumes[o].volume)){let t=u.getNorthWest(),e=L.latLng(u.getSouthEast().lat,t.lng+this.bloodVolumes[o].volume*s),i=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[t,e],{fillLimit:!0,fillSymbolID:0,fillColorLimit:!0,fillColor:P,fillOpacity:S,lineColorLimit:!0,opacity:0});i.isBloodVolume=!0,i.fromZoom=this._map.getZoom(),l.push(i)}if(!SuperMap.Plot.PlottingUtil.equalFuzzy(1,this.bloodVolumes[o].volume)){let t=u.getSouthEast(),e=L.latLng(u.getNorthWest().lat,u.getNorthWest().lng+this.bloodVolumes[o].volume*s),i=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[t,e],{fillLimit:!0,fillSymbolID:0,fillColorLimit:!0,fillColor:d,fillOpacity:m,lineColorLimit:!0,opacity:0});i.isBloodVolume=!0,i.fromZoom=this._map.getZoom(),l.push(i)}}else if(this.bloodVolumes[o].position===SuperMap.Plot.Position.LEFT){if(!SuperMap.Plot.PlottingUtil.equalFuzzy(0,this.bloodVolumes[o].volume)){let t=u.getSouthWest(),e=L.latLng(t.lat+this.bloodVolumes[o].volume*s,u.getNorthEast().lng),i=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[t,e],{fillLimit:!0,fillSymbolID:0,fillColorLimit:!0,fillColor:P,fillOpacity:S,lineColorLimit:!0,opacity:0});i.isBloodVolume=!0,i.fromZoom=this._map.getZoom(),l.push(i)}if(!SuperMap.Plot.PlottingUtil.equalFuzzy(1,this.bloodVolumes[o].volume)){let t=u.getNorthEast(),e=L.latLng(u.getSouthWest().lat+this.bloodVolumes[o].volume*s,u.getSouthWest().lng),i=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[t,e],{fillLimit:!0,fillSymbolID:0,fillColorLimit:!0,fillColor:d,fillOpacity:m,lineColorLimit:!0,opacity:0});i.isBloodVolume=!0,i.fromZoom=this._map.getZoom(),l.push(i)}}else if(this.bloodVolumes[o].position===SuperMap.Plot.Position.RIGHT){if(!SuperMap.Plot.PlottingUtil.equalFuzzy(0,this.bloodVolumes[o].volume)){let t=u.getNorthEast(),e=L.latLng(t.lat-this.bloodVolumes[o].volume*s,u.getSouthWest().lng),i=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[t,e],{fillLimit:!0,fillSymbolID:0,fillColorLimit:!0,fillColor:P,fillOpacity:S,lineColorLimit:!0,opacity:0});i.isBloodVolume=!0,i.fromZoom=this._map.getZoom(),l.push(i)}if(!SuperMap.Plot.PlottingUtil.equalFuzzy(1,this.bloodVolumes[o].volume)){let t=u.getSouthWest(),e=L.latLng(u.getNorthEast().lat-this.bloodVolumes[o].volume*s,u.getNorthEast().lng),i=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[t,e],{fillLimit:!0,fillSymbolID:0,fillColorLimit:!0,fillColor:d,fillOpacity:m,lineColorLimit:!0,opacity:0});i.isBloodVolume=!0,i.fromZoom=this._map.getZoom(),l.push(i)}}this.bloodVolumeComponents.push(l)}}},move:function(t,e){T.prototype._move.call(this,t,e)},_mergeStyleToSymbolText:function(t){if(null!==this.components)for(var e in null!==t.style&&void 0!==t.style||(t.style={}),this.style)Object.prototype.hasOwnProperty.call(t.style,e)||(t.style[e]=this.style[e])},_reView:function(){this.fromZoom!==this._map.getZoom()&&(this._calculateLabel(),this._calculateBloodVolume(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)),this.fromZoom=this._map.getZoom()}});L.supermap.plotting.picture=function(t,e,i,o){return new st(t,e,i,o)},L.supermap.plotting.Picture=st;var nt=v.extend({centerPoint:null,radius:null,startAngle:null,endAngle:null,textPosition:null,radiusText:null,radiusPosAngle:null,radiusLineType:null,subSymbolDefaultPixelSize:15,getCirclePts:function(){return this.getArcPts(this.startAngle,this.endAngle)},setLatLngs:function(t){return this.latLngs=t,2===this.latLngs.length&&(this.centerPoint=this.latLngs[0],this.radius=SuperMap.Plot.PlottingUtil.distVincenty(this.latLngs[0],this.latLngs[1])),3===this.latLngs.length&&(this.startAngle=180*SuperMap.Plot.PlottingUtil.radian(new SuperMap.Geometry.Point(this.latLngs[0].lng,this.latLngs[0].lat),new SuperMap.Geometry.Point(this.latLngs[1].lng,this.latLngs[1].lat))/Math.PI,this.endAngle=180*SuperMap.Plot.PlottingUtil.radian(new SuperMap.Geometry.Point(this.latLngs[0].lng,this.latLngs[0].lat),new SuperMap.Geometry.Point(this.latLngs[2].lng,this.latLngs[2].lat))/Math.PI),this.redraw()},setRadius:function(t){this.radius!==t&&(this.radius=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getRadius:function(){return this.radius},setStartAngle:function(t){this.startAngle!==t&&(this.startAngle=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getStartAngle:function(){return this.startAngle},setEndAngle:function(t){this.endAngle!==t&&(this.endAngle=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getEndAngle:function(){return this.endAngle},setTextPosition:function(t){this.textPosition!==t&&(this.textPosition=t,0!==this.textContent.length&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},setRadiusText:function(t,e){e>1&&(e=1),e<0&&(e=0),this.radiusText[e]!==t&&(this.radiusText[e]=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getRadiusText:function(t){return t>1&&(t=1),t<0&&(t=0),this.radiusText[t]},setRadiusTextPos:function(t){this.radiusPosAngle!==t&&(this.radiusPosAngle=t,0!==this.radiusText.length&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},getRadiusTextPos:function(){return this.radiusPosAngle},setRadiusLineType:function(t){this.radiusLineType!==t&&(this.radiusLineType=t,0!==this.radiusText.length&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},getRadiusLineType:function(){return this.radiusLineType},initialize:function(t,e,i,o){this.scalePoints=[],this.scaleValues=[],T.prototype.initialize.call(this,t,e,i,o),this.libID=0,this.code=SuperMap.Plot.SymbolType.ARCREGION,this.symbolType=SuperMap.Plot.SymbolType.ARCREGION,this.symbolName="扇形区域",this.minEditPts=2,this.maxEditPts=3,null===this.circlePts&&(this.circlePts=[]),null===this.textPosition&&(this.textPosition=(this.startAngle+this.endAngle)/2),null===this.radiusText&&(this.radiusText=[]),null===this.radiusPosAngle&&(this.radiusPosAngle=(this.startAngle+this.endAngle)/2),null===this.radiusLineType&&(this.radiusLineType=SuperMap.Plot.RadiusLineType.NONE),void 0!==o.constantSize&&null!==o.constantSize||!1!==this.isEdit||(this.constantSize=!0),this.subSymbolDefaultPixelSize=15,0===this.scaleValues.length&&this.scaleValues.push(.1)},destroy:function(){this.centerPoint=null,this.radius=null,this.startAngle=null,this.endAngle=null,this.textPosition=null,this.radiusText=null,this.radiusPosAngle=null,this.radiusLineType=null,v.prototype.destroy.call(this)},_calculateParts:function(){if(this.scalePoints=[],this.isEdit?1===this.latLngs.length&&this.centerPoint!==this.latLngs[0]&&(this.centerPoint=this.latLngs[0]):(2===this.latLngs.length&&(this.centerPoint=this.latLngs[0],this.radius=SuperMap.Plot.PlottingUtil.distVincenty(this.latLngs[0],this.latLngs[1])),3===this.latLngs.length&&(this.startAngle=180*SuperMap.Plot.PlottingUtil.radian(new SuperMap.Geometry.Point(this.latLngs[0].lng,this.latLngs[0].lat),new SuperMap.Geometry.Point(this.latLngs[1].lng,this.latLngs[1].lat))/Math.PI,this.endAngle=180*SuperMap.Plot.PlottingUtil.radian(new SuperMap.Geometry.Point(this.latLngs[0].lng,this.latLngs[0].lat),new SuperMap.Geometry.Point(this.latLngs[2].lng,this.latLngs[2].lat))/Math.PI)),this.centerPoint&&null!==this.centerPoint&&this.radius&&null!==this.radius){this.startAngle%=360,this.endAngle%=360,this.startAngle>this.endAngle&&(this.endAngle+=360);var t=SuperMap.Plot.PlottingUtil.equalFuzzy(this.startAngle,this.endAngle);t&&(this.startAngle=0,this.endAngle=360);var e=this.getArcPts(this.startAngle,this.endAngle);if(!t){var i=e[0][0].clone();i.isScalePoint=!0,i.tag=0;var o=e[e.length-1][e[e.length-1].length-1].clone();o.isScalePoint=!0,o.tag=1,this.scalePoints.push(i),this.scalePoints.push(o),e[0].splice(0,0,this.centerPoint.clone()),e[e.length-1].push(this.centerPoint.clone()),this.latLngs.length>2&&this.latLngs.splice(1,this.latLngs.length-1)}for(let t=0;t<e.length;t++)this.scaleByMap=!1,this._createAndDrawLayer(SuperMap.Plot.SymbolType.POLYLINESYMBOL,e[t],{surroundLineFlag:!1});0===this.latLngs.length&&this.latLngs.push(this.centerPoint.clone()),1===this.latLngs.length&&t&&this.latLngs.push(e[Math.ceil(e.length/2)].clone()),this._textGeometry(),this._radiusGeometry()}},_textGeometry:function(){if(0!==this.textContent.length){var t=90,e=!1;this.textPosition%=360,this.endAngle>this.startAngle&&(this.textPosition<this.endAngle&&this.textPosition>this.startAngle?(this.endAngle-this.textPosition<t&&(t=this.endAngle-this.textPosition),this.textPosition-this.startAngle<t&&(t=this.textPosition-this.startAngle)):this.textPosition+360<this.endAngle&&this.textPosition+360>this.startAngle?(this.textPosition+=360,this.endAngle-this.textPosition<t&&(t=this.endAngle-this.textPosition),this.textPosition-this.startAngle<t&&(t=this.textPosition-this.startAngle)):e=!0),this.startAngle>this.endAngle&&(this.textPosition>this.startAngle||this.textPosition<this.endAngle?e=!0:(this.startAngle-this.textPosition<t&&(t=this.startAngle-this.textPosition),this.textPosition-this.endAngle<t&&(t=this.textPosition-this.endAngle))),2*t<4&&(e=!0);var i=null;if(!0===e){var o=this.getBounds().getCenter();this.scaleByMap=!1,this._createAndDrawLayer(34,[o],{surroundLineFlag:!1,labelAlign:"cm"},this.textContent),i=o.clone()}else{var l=this.textPosition+t,s=this.textPosition-t,n=this.getArcPts(s,l),a=SuperMap.Plot.RelLineText.ONLEFTLINE;SuperMap.Plot.PlottingUtil.isPloyClockwise(n[0])&&(a=SuperMap.Plot.RelLineText.ONRIGHTLINE);for(var r=SuperMap.Plot.PlottingUtil.clonePoints(n[0]),p=[],u=r.length-1;u>=0;u--)p.push(r[u]);this.scaleByMap=!1,this._addComponents(L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.PATHTEXT,p,{textContent:this.textContent,showPathLine:!1,isCurve:!1,relLineText:a,scaleByMap:!1},this.style)),i=n[0][Math.ceil(n[0].length/2)].clone()}i.isScalePoint=!0,i.tag=2,this.scalePoints.push(i)}},_radiusGeometry:function(){if(0!==this.radiusText.length){this.radiusPosAngle%=360;var t=SuperMap.Plot.PlottingUtil.destinationVincenty(this.centerPoint,360-this.radiusPosAngle+90,1e3*this.radius),e=new SuperMap.Geometry.Point(t.lng,t.lat),i=new SuperMap.Geometry.Point(this.centerPoint.lng,this.centerPoint.lat),o=SuperMap.Plot.PlottingUtil.distance(i,e),l=[];if(l.push(this.centerPoint),l.push(L.latLng(e.y,e.x)),SuperMap.Plot.RadiusLineType.NONE!==this.radiusLineType&&this._createAndDrawLayer(SuperMap.Plot.SymbolType.POLYLINESYMBOL,l,{surroundLineFlag:!1}),this.radiusLineType===SuperMap.Plot.RadiusLineType.ARROW){var s;if(null===this.map)s=0;else{var n=this._map.layerPointToLatLng(L.point(0,0)),a=this._map.layerPointToLatLng(L.point(this.subSymbolDefaultPixelSize,0));s=SuperMap.Plot.PlottingUtil.distance(new SuperMap.Geometry.Point(n.lng,n.lat),new SuperMap.Geometry.Point(a.lng,a.lat))}var r=SuperMap.Plot.PlottingUtil.findPoint(e,i,s,12.5),p=SuperMap.Plot.PlottingUtil.findPoint(e,i,s,-12.5),u=[];u.push(L.latLng(e.y,e.x)),u.push(L.latLng(r.y,r.x)),u.push(L.latLng(p.y,p.x)),this.scaleByMap=!1,this._createAndDrawLayer(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,u,{surroundLineFlag:!1,fill:!0,fillLimit:!0,lineTypeLimit:!0})}if(SuperMap.Util.isArray(this.radiusText)||(this.radiusText=[this.radiusText]),this.radiusText.length>=1){var h=SuperMap.Plot.PlottingUtil.findPoint(i,e,.2*o,0),g=SuperMap.Plot.PlottingUtil.findPoint(i,e,.8*o,0),c=SuperMap.Plot.PlottingUtil.findPoint(h,e,.02*o,90),y=SuperMap.Plot.PlottingUtil.findPoint(g,e,.02*o,90),P=L.latLng(c.y,c.x),S=L.latLng(y.y,y.x);let t=SuperMap.Plot.RelLineText.ONLEFTLINE;var d=[];c.x<y.x?(d.push(P),d.push(S)):(d.push(S),d.push(P),t=SuperMap.Plot.RelLineText.ONRIGHTLINE),this._addComponents(L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.PATHTEXT,d,{textContent:this.radiusText[0],showPathLine:!1,relLineText:t,scaleByMap:!1},this.style))}if(2===this.radiusText.length){let t=SuperMap.Plot.RelLineText.ONRIGHTLINE;var m=SuperMap.Plot.PlottingUtil.findPoint(h,e,.02*o,270),f=SuperMap.Plot.PlottingUtil.findPoint(g,e,.02*o,270),M=L.latLng(m.y,m.x),b=L.latLng(f.y,f.x),A=[];m.x<f.x?(A.push(M),A.push(b)):(A.push(b),A.push(M),t=SuperMap.Plot.RelLineText.ONLEFTLINE),this._addComponents(L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.PATHTEXT,A,{textContent:this.radiusText[1],showPathLine:!1,relLineText:t,scaleByMap:!1},this.style))}var T=L.latLng(e.y,e.x);T.isScalePoint=!0,T.tag=this.scalePoints.length,this.scalePoints.push(T)}},_parseSymbolData:function(){v.prototype._parseSymbolData.call(this),this.symbolData&&(this.centerPoint=L.latLng(this.symbolData.centerPoint.y,this.symbolData.centerPoint.x),this.endAngle=this.symbolData.endAngle,this.radius=this.symbolData.radius,this.radiusPosAngle=this.symbolData.radiusPosAngle,this.startAngle=this.symbolData.startAngle,this.textPosition=this.symbolData.textPosition,this.radiusLineType=this.symbolData.radiusLineType,this.radiusText=this.symbolData.radiusText)},_setSymbolData:function(){this.latLngs=[],v.prototype._setSymbolData.call(this),this.symbolData&&(this.symbolData.centerPoint||(this.symbolData.centerPoint={}),this.symbolData.centerPoint.x=this.centerPoint.lng,this.symbolData.centerPoint.y=this.centerPoint.lat,this.symbolData.endAngle=this.endAngle,this.symbolData.radius=this.radius,this.symbolData.radiusPosAngle=this.radiusPosAngle,this.symbolData.startAngle=this.startAngle,this.symbolData.textPosition=this.textPosition,this.symbolData.radiusLineType=this.radiusLineType,this.symbolData.radiusText=this.radiusText)},_reView:function(){void 0!==this.prevStrokeWidth&&this.prevStrokeWidth!==this.feature.style.strokeWidth&&(this.strokeWidth=this.style.strokeWidth),this.fromZoom!==this._map.getZoom()&&(!0===this.isEdit&&this.redraw(),this.fromZoom=this._map.getZoom())},_modifyPoint:function(t,e){if(!0===e.isScalePoint){if(0===t)this.radius=SuperMap.Plot.PlottingUtil.distVincenty(this.centerPoint,e),this.startAngle=180*SuperMap.Plot.PlottingUtil.radian(new SuperMap.Geometry.Point(this.latLngs[0].lng,this.latLngs[0].lat),new SuperMap.Geometry.Point(e.lng,e.lat))/Math.PI;else if(1===t)this.radius=SuperMap.Plot.PlottingUtil.distVincenty(this.centerPoint,e),this.endAngle=180*SuperMap.Plot.PlottingUtil.radian(new SuperMap.Geometry.Point(this.latLngs[0].lng,this.latLngs[0].lat),new SuperMap.Geometry.Point(e.lng,e.lat))/Math.PI;else if(2===t&&0!==this.textContent.length){var i=180*SuperMap.Plot.PlottingUtil.radian(new SuperMap.Geometry.Point(this.latLngs[0].lng,this.latLngs[0].lat),new SuperMap.Geometry.Point(e.lng,e.lat))/Math.PI;(i>this.startAngle&&i<this.endAngle||i+360>this.startAngle&&i+360<this.endAngle)&&(this.textPosition=i)}else if(3===t||2===t&&0===this.textContent.length){var o=180*SuperMap.Plot.PlottingUtil.radian(new SuperMap.Geometry.Point(this.latLngs[0].lng,this.latLngs[0].lat),new SuperMap.Geometry.Point(e.lng,e.lat))/Math.PI;this.startAngle%360==this.endAngle%360?this.radiusPosAngle=o:(o>this.startAngle&&o<this.endAngle||o+360>this.startAngle&&o+360<this.endAngle)&&(this.radiusPosAngle=o)}}else this.latLngs.length>0&&(this.centerPoint=this.latLngs[0].clone()),2===this.latLngs.length&&(this.radius=SuperMap.Plot.PlottingUtil.distVincenty(this.latLngs[0],this.latLngs[1]));this.redraw()},_resizeLatLngs:function(t,e,i,o){var l=!1;1===this.latLngs.length&&(l=!0,this.latLngs.push(this.scalePoints[0])),v.prototype._resizeLatLngs.call(this,t,e,i,o),this.centerPoint.lng=this.latLngs[0].lng,this.centerPoint.lat=this.latLngs[0].lat,this.radius=SuperMap.Plot.PlottingUtil.distVincenty(this.latLngs[0],this.latLngs[1]),l&&this.latLngs.splice(1,1)},setRotate:function(t){if(this.dRotate=t,this._rotate(t,this.centerPoint),this.radiusPosAngle+=t,this.startAngle+=t,this.endAngle+=t,this.textPosition+=t,this.latLngs=[],0!==this.avoidRegions.length)for(var e=0,i=this.avoidRegions.length;e<i;e++)L.Util.rotateLatLngs(this.avoidRegions[e].getLatLngs(),this.centerPoint,t);this.redraw()},move:function(t,e){for(var i=0,o=this.avoidRegions.length;i<o;i++)L.Util.moveLatLngs(this.avoidRegions[i].getLatLngs(),t,e);L.Util.moveLatLngs([this.centerPoint],t,e),this.latLngs=[],this.redraw()},getArcPts:function(t,e){for(var i=[],o=[],l=t;l<=e;l+=5){let t=SuperMap.Plot.PlottingUtil.destinationVincenty(this.centerPoint,360-l+90,1e3*this.radius);o.length>2&&Math.abs(t.lng-o[o.length-1].lng)>180&&(i.push(o.slice()),o.length=0),o.push(t)}if(l-e>0&&l-e<5){let t=SuperMap.Plot.PlottingUtil.destinationVincenty(this.centerPoint,360-e+90,1e3*this.radius);o.push(t)}return i.push(o.slice()),i}});L.supermap.plotting.arcRegion=function(t,e,i,o){return new nt(t,e,i,o)};var at=m.extend({ratio:null,scalePoints:null,scaleValues:null,initialize:function(t,e,i,o){m.prototype.initialize.call(this,t,e,i,o),this.libID=0,this.code=SuperMap.Plot.SymbolType.FLAGGROUP,this.symbolType=SuperMap.Plot.SymbolType.FLAGGROUP,this.symbolName="多旗",o.subObjects&&(this.subObjects=o.subObjects),null===this.ratio&&(this.ratio=.8),this.scaleByMap=!0,this.minScale=1,this.maxScale=5},destroy:function(){m.prototype.destroy.call(this),this.ratio=[]},setRotate:function(t){isNaN(t)||(this.dRotate+=t,this.redraw())},redraw:function(){if("none"===this.style.display||null!=this.layer&&"function"==typeof this.layer.getVisibility&&!1===this.layer.getVisibility())this._clearComponents();else{if(L.Util.isArray(this.ratio)||(this.ratio=[this.ratio]),0===this.components.length&&0!==this.subObjects.length)for(let t=0,e=this.subObjects.length;t<e;t++)this.layer&&this.layer.removeFeatures(this.subObjects[t]),this.subObjects[t].enableEdit=!0,this.subObjects[t].ownerGroup=this,this._addComponents(this.subObjects[t]);if(0!==this.components.length){this.scalePoints=[],this.components[0].setRotate(this.dRotate);var t=L.latLng(this.components[0].getLatLngs()[0].lat,this.components[0].getLatLngs()[0].lng),e=this._map.latLngToLayerPoint(t);!0===this.components[0].positionOffset&&(e.x+=this.components[0].positionOffsetX,e.y+=this.components[0].positionOffsetY),t=this._map.layerPointToLatLng(e),this.anchorPoint=t.clone();var i=new L.latLng(t);i.tag=0,this.scalePoints.push(i);for(let t=1,e=this.components.length;t<e;t++){for(;this.ratio.length<t;)this.ratio.push(this.ratio[this.ratio.length-1]);var o=this.ratio[t-1],l=this.components[t-1],s=this._calculateFlagTop(l),n=L.Util.cloneLatLngs(l.getLatLngs())[0],a=this._map.latLngToLayerPoint(n);!0===l.positionOffset&&(a.x+=l.positionOffsetX,a.y+=l.positionOffsetY),n=this._map.layerPointToLatLng(a),s=this._pointRotate(this.dRotate,n,s);var r=this._findPointOnLineByRatio(o,n,s);this.components[t].dRotate=this.dRotate,this.components[t].setLatLngs([r]);var p=new L.latLng(r);p.tag=t,this.scalePoints.push(p)}}}},_pointRotate:function(t,e,i){t*=Math.PI/180;var o=Math.sqrt(Math.pow(e.lng-i.lng,2)+Math.pow(e.lat-i.lat,2)),l=t+Math.atan2(i.lat-e.lat,i.lng-e.lng);return i.lng=e.lng+o*Math.cos(l),i.lat=e.lat+o*Math.sin(l),i},_findPointOnLineByRatio:function(t,e,i){var o=new L.latLng(0,0);return o.lng=e.lng+(i.lng-e.lng)*t,o.lat=e.lat+(i.lat-e.lat)*t,o},_calculateFlagTop:function(t){var e=t.dRotate;t.dRotate=0,0===t.dRotate&&(t.isNotRedrawText=!0,t.redraw(),delete t.isNotRedrawText);var i=t.getBounds();return t.dRotate=e,t.redraw(),t.initialScale.x>=0?t.negativeImage?new L.latLng(i.getNorth(),i.getEast()):new L.latLng(i.getNorth(),i.getWest()):t.negativeImage?new L.latLng(i.getSouth(),i.getWest()):new L.latLng(i.getSouth(),i.getEast())},_projectPoint:function(t,e,i){if(e===i)return e;var o=new L.latLng(0,0),l=i.lng-e.lng,s=e.lat-i.lat,n=l*l,a=s*s,r=l*s,p=l*l+s*s;return o.lng=(r*(e.lat-t.lat)+e.lng*a+t.lng*n)/p,o.lat=(r*(e.lng-t.lng)+e.lat*n+t.lat*a)/p,o},_modifyPoint:function(t,e){if(0===t)this.subObjects[0].setLatLngs([e]);else{var i=this.subObjects[t-1].latLngs[0],o=this._calculateFlagTop(this.subObjects[t-1]);o=this._pointRotate(this.dRotate,this.subObjects[0].latLngs[0],o);var l=Math.sqrt(Math.pow(i.lng-o.lng,2)+Math.pow(i.lat-o.lat,2)),s=this._projectPoint(e,i,o),n=Math.sqrt(Math.pow(i.lng-s.lng,2)+Math.pow(i.lat-s.lat,2));this.ratio[t-1]=n/l}this.redraw()},_reView:function(){for(var t in this.components)this.components[t].scaleByMap=this.scaleByMap,this.components[t].minScale=this.minScale,this.components[t].maxScale=this.maxScale,this.components[t]._reView();this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},_parseSymbolData:function(){m.prototype._parseSymbolData.call(this),this.symbolData&&(this.ratio=this.symbolData.ratio)},_setSymbolData:function(){m.prototype._setSymbolData.call(this),this.symbolData&&(this.symbolData.ratio=this.ratio)}});L.supermap.plotting.flagGroup=function(t,e,i,o){return new at(t,e,i,o)},L.supermap.plotting.FlagGroup=at;var rt=m.extend({colNum:null,space:null,initialize:function(t,e,i,o){m.prototype.initialize.call(this,t,e,i,o),this.libID=0,this.code=SuperMap.Plot.SymbolType.NAVYDEPLOYMENT,this.symbolType=SuperMap.Plot.SymbolType.NAVYDEPLOYMENT,this.symbolName="海军兵力部署",null===this.colNum&&(this.colNum=1),null===this.space&&(this.space=10),this.scaleByMap=!0},destroy:function(){this.space=null,this.colNum=null,m.prototype.destroy.call(this)},redraw:function(){"none"===this.style.display||null!=this.layer&&"function"==typeof this.layer.getVisibility&&!1===this.layer.getVisibility()?this._clearComponents():this._redrawComponents()},_calculateParts:function(){var t=this._map.getFeatureByUuid(this.associatedUuid);if(null!==t&&t.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&0!==t.latLngs.length){var e=!1;for(let i=0;i<t.deployments.length;i++)if(this===t.deployments[i]){e=!0;break}e||t.deployments.push(this),null==this.minScale&&(this.minScale=t.minScale),null==this.maxScale&&(this.maxScale=t.maxScale);var i=1;if("function"==typeof this.layer.getSymZoomScale&&(i=this.layer.getSymZoomScale()),null!=this.minScale&&i<this.minScale?i=this.minScale:null!=this.maxScale&&i>this.maxScale&&(i=this.maxScale),0!==this.subObjects.length&&0===this.components.length)for(let t=0,e=this.subObjects.length;t<e;t++)this.subObjects[t].ownerGroup=this,this.subObjects[t].enableEdit=!0,this._addComponents(this.subObjects[t]);this.subObjects=[];var o=L.Util.cloneLatLngs(t.latLngs[0]),l=this._map.latLngToLayerPoint(L.latLng(o[0].lat,o[0].lng)),s=this._transitionPoint(new SuperMap.Geometry.Point(this.space*i,0),l),n=Math.abs(s.lng-o[0].lng),a=new SuperMap.Geometry.Point(0,0),r=this._transitionPoint(a,l),p=new SuperMap.Geometry.Point(100*i,100*i),u=this._transitionPoint(p,l),h=new L.LatLngBounds(L.latLng(r.lat,r.lng),L.latLng(u.lat,u.lng)),g=Math.ceil(this._getSubSymbolCount(this.subSymbols.length-1)/this.colNum),c=Math.abs(h.getNorth()-h.getSouth())*g+n*(g+1),y=L.latLng(o[0].lat+c/2,o[0].lng-5*n);this._clearComponents();for(let t=0;t<this.subSymbols.length;t++)for(var P=0;P<this.subSymbols[t].totalNum;P++){var S=this._getSubSymbolCount(t-1)+P+1,d=Math.ceil(S/g),m=S-g*(d-1);if(1!==d&&1===m){var f=this.bounds;y.lng=f.getWest()}this.subSymbols[t].symbolData.textContent=this.subSymbols[t].textContent;for(var M=y.lng,b=y.lat-m*(Math.abs(h.getNorth()-h.getSouth())+n),A=0,T=0,v=0,_=0,x=0;x<this.subSymbols[t].symbolData.innerCells.length;x++)for(var O=0;O<this.subSymbols[t].symbolData.innerCells[x].positionPoints.length;O++)A<=this.subSymbols[t].symbolData.innerCells[x].positionPoints[O].x*i&&(A=this.subSymbols[t].symbolData.innerCells[x].positionPoints[O].x*i),T>=this.subSymbols[t].symbolData.innerCells[x].positionPoints[O].x*i&&(T=this.subSymbols[t].symbolData.innerCells[x].positionPoints[O].x*i),v<=this.subSymbols[t].symbolData.innerCells[x].positionPoints[O].y*i&&(v=this.subSymbols[t].symbolData.innerCells[x].positionPoints[O].y*i),_>=this.subSymbols[t].symbolData.innerCells[x].positionPoints[O].y*i&&(_=this.subSymbols[t].symbolData.innerCells[x].positionPoints[O].y*i);var w=L.latLng(b,M),I=this._map.latLngToLayerPoint(L.latLng(b,M)),C=new SuperMap.Geometry.Point(A,(v+_)/2),E=new SuperMap.Geometry.Point(C.x,C.y),D=new SuperMap.Geometry.Point(this.subSymbols[t].symbolData.anchorPoint.x,this.subSymbols[t].symbolData.anchorPoint.y),U=this._transitionPoint(E,I),N=this._transitionPoint(D,I);w.lat+=N.lat-U.lat,w.lng+=N.lng-U.lng;var R=this.subSymbols[t].symbolData.libID,B=this.subSymbols[t].symbolData.code;this.subSymbols[t].symbolData.annotationPosition=6;var F=SuperMap.Util.cloneObject(this.subSymbols[t].symbolData),k=L.supermap.plotting.PlottingObject.createSymbol(R,B,w,{serverUrl:this.serverUrl,symbolData:F,scaleByMap:this.scaleByMap,minScale:this.minScale,maxScale:this.maxScale,space:0});k.enableEdit=!0,k.ownerGroup=this,this._addComponents(k),this.bounds=new L.LatLngBounds,this.bounds.extend(k.getBoundsWithText()),this.subObjects.push(k)}if(this.bounds=new L.LatLngBounds,this.bounds=this._calculateBounds(),null!==this.textContent&&0!==this.textContent.length){var V=L.latLng(o[0].lat+c/2+n,o[0].lng-5*n),Y=L.supermap.plotting.PlottingObject.createSymbol(0,34,[V],{textContent:this.textContent,serverUrl:this.serverUrl,scaleByMap:this.scaleByMap,minScale:this.minScale,maxScale:this.maxScale});Y.style.labelAlign="rb",Y.style.scaleByMap=!0,Y.enableEdit=!0,Y.ownerGroup=this,this._addComponents(Y),this.bounds.extend(Y.getBounds()),this.subObjects.push(Y)}var z=new L.LatLngBounds(L.latLng(this.bounds.getSouth()-n,this.bounds.getWest()-n),L.latLng(this.bounds.getNorth()+n,this.bounds.getEast()+n)),G=[];G.push(L.latLng(z.getNorth(),z.getWest())),G.push(L.latLng(z.getSouth(),z.getEast()));var W=L.latLng(o[0].lat,o[0].lng);W.isFixedPos=!0,G.push(W);var j=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL,G,{serverUrl:this.serverUrl,scaleByMap:this.scaleByMap,minScale:this.minScale,maxScale:this.maxScale});for(var X in j.enableEdit=!0,j.ownerGroup=this,this.subObjects.splice(0,0,j),this._addComponents(j),this.subObjects)this.subObjects[X].ownerGroup=this,this.subObjects[X].enableEdit=!0,this._addComponents(this.subObjects[X])}},_reView:function(){this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},move:function(t,e){for(var i in this.subObjects)this.subObjects[i].move(t,e);this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},_resize:function(t,e){for(var i in this.subObjects)this.subObjects[i]._resize(t,e)},_transitionPoint:function(t,e){var i=e.x+t.x*(96/254),o=e.y-t.y*(96/254);return this._map.layerPointToLatLng(L.point(i,o))},_getSubSymbolCount:function(t){var e=0;if(t<0)return e;t>this.subSymbols.length-1&&(t=this.subSymbols.length-1);for(var i=0;i<=t;i++)e+=this.subSymbols[t].totalNum;return e},_calculateBounds:function(){for(var t in this.bounds=new L.LatLngBounds,this.components)0!==t&&this.components[t].symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&this.bounds.extend(this.components[t].getBoundsWithText());return this.bounds},setTextContent:function(t){if(this.textContent!==t){this.textContent=t;for(var e=0;e<this.subObjects.length;e++)this.subObjects[e].symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL&&(this.subObjects[e].textContent=this.textContent,this.subObjects[e].redraw())}}});L.supermap.plotting.navyDeployment=function(t,e,i,o){return new rt(t,e,i,o)},L.supermap.plotting.NavyDeployment=rt;var pt=rt.extend({isShowTooltip:!0,getShowTooltip:function(){return this.isShowTooltip},setShowTooltip:function(t){if(this.isShowTooltip!==t)if(this.isShowTooltip=t,this.isShowTooltip&&0!==this.components.length){var e=this._map.getFeatureByUuid(this.associatedUuid),i=L.Util.cloneLatLngs(e.latLngs[0]),o=this._map.latLngToLayerPoint(L.latLng(i[0].lat,i[0].lng)),l=this._transitionPoint(new SuperMap.Geometry.Point(this.space,0),o),s=Math.abs(l.lng-i[0].lng),n=new L.LatLngBounds(L.latLng(this.bounds.getSouth()-s,this.bounds.getWest()-s),L.latLng(this.bounds.getNorth()+s,this.bounds.getEast()+s)),a=[];a.push(L.latLng(n.getNorth(),n.getWest())),a.push(L.latLng(n.getSouth(),n.getEast()));var r=L.latLng(i[0].lat,i[0].lng);r.isFixedPos=!0,a.push(r);var p=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL,a,{serverUrl:this.serverUrl});this._addComponents(p)}else for(var u in this.components)if(320===this.components[u].symbolType){this.subObjects.splice(SuperMap.Util.indexOf(this.subObjects,this.components[u]),1);var h=SuperMap.Util.indexOf(this.components,this.components[u]);if(-1!==h){this.components[h]._clearComponents(),this.components.splice(h,1);break}}},initialize:function(t,e,i,o){rt.prototype.initialize.call(this,t,e,i,o),this.libID=0,this.code=SuperMap.Plot.SymbolType.AIRDEPLOYMENT,this.symbolType=SuperMap.Plot.SymbolType.AIRDEPLOYMENT,this.symbolName="空军兵力部署",null===this.isShowTooltip&&(this.isShowTooltip=!0),this.scaleByMap=!0},destroy:function(){this.isShowTooltip=null,rt.prototype.destroy.call(this)},_calculateParts:function(){var t=this._map.getFeatureByUuid(this.associatedUuid);if(null!==t&&t.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&0!==t.latLngs.length){var e=!1;for(let i=0;i<t.deployments.length;i++)if(this===t.deployments[i]){e=!0;break}e||t.deployments.push(this),null==this.minScale&&(this.minScale=t.minScale),null==this.maxScale&&(this.maxScale=t.maxScale);var i=1;if("function"==typeof this.layer.getSymZoomScale&&(i=this.layer.getSymZoomScale()),null!=this.minScale&&i<this.minScale?i=this.minScale:null!=this.maxScale&&i>this.maxScale&&(i=this.maxScale),0!==this.subObjects.length&&0===this.components.length)for(let t=0,e=this.subObjects.length;t<e;t++)this.subObjects[t].enableEdit=!0,this.subObjects[t].ownerGroup=this,this._addComponents(this.subObjects[t]);this.subObjects=[];var o=L.Util.cloneLatLngs(t.latLngs[0]),l=this._map.latLngToLayerPoint(L.latLng(o[0].lat,o[0].lng)),s=this._transitionPoint(new SuperMap.Geometry.Point(this.space*i,0),l),n=Math.abs(s.lng-o[0].lng),a=new SuperMap.Geometry.Point(0,0),r=this._transitionPoint(a,l),p=new SuperMap.Geometry.Point(100*i,100*i),u=this._transitionPoint(p,l),h=new L.LatLngBounds(L.latLng(r.lat,r.lng),L.latLng(u.lat,u.lng)),g=Math.ceil(this._getSubSymbolCount(this.subSymbols.length-1)/this.colNum),c=Math.abs(h.getWest()-h.getEast())*this.colNum+n*(this.colNum-1),y=L.latLng(o[0].lat-n,o[0].lng-.5*c+.5*Math.abs(h.getEast()-h.getWest()));!0===this.isShowTooltip&&(y.lat-=4*n),this._setSubSymbolText();var P=[];for(let t=0;t<this.subSymbols.length;t++)for(var S=0;S<this.subSymbols[t].totalNum;S++)P.push(this.subSymbols[t]);this._clearComponents();var d=0;for(let t=0;t<g;t++){for(S=0;S<this.colNum&&!(d>=P.length);S++){var m=P[d];if(void 0!==m.symbolData&&null!==m.symbolData){for(var f=m.symbolData.libID,M=m.symbolData.code,b=y.lng+S*(n+Math.abs(h.getEast()-h.getWest())),A=y.lat-(2*n+Math.abs(h.getNorth()-h.getSouth())/2),T=0,v=0,_=0,x=0,O=0;O<m.symbolData.innerCells.length;O++)for(var w=0;w<m.symbolData.innerCells[O].positionPoints.length;w++)T<=m.symbolData.innerCells[O].positionPoints[w].x*i&&(T=m.symbolData.innerCells[O].positionPoints[w].x*i),v>=m.symbolData.innerCells[O].positionPoints[w].x*i&&(v=m.symbolData.innerCells[O].positionPoints[w].x*i),_<=m.symbolData.innerCells[O].positionPoints[w].y*i&&(_=m.symbolData.innerCells[O].positionPoints[w].y*i),x>=m.symbolData.innerCells[O].positionPoints[w].y*i&&(x=m.symbolData.innerCells[O].positionPoints[w].y*i);var I=L.latLng(A,b),C=this._map.latLngToLayerPoint(L.latLng(A,b)),E=new SuperMap.Geometry.Point((T+v)/2,_),D=new SuperMap.Geometry.Point(E.x,E.y),U=new SuperMap.Geometry.Point(P[d].symbolData.anchorPoint.x,P[d].symbolData.anchorPoint.y),N=this._transitionPoint(D,C),R=this._transitionPoint(U,C);I.lat+=R.lat-N.lat,I.lng+=R.lng-N.lng,m.symbolData.annotationPosition=5;var B=SuperMap.Util.cloneObject(m.symbolData),F=L.supermap.plotting.PlottingObject.createSymbol(f,M,I,{symbolData:B,scaleByMap:this.scaleByMap,minScale:this.minScale,maxScale:this.maxScale,space:0});F.enableEdit=!0,F.ownerGroup=this,this._addComponents(F),this.subObjects.push(F),d++}}this.bounds=this._calculateBounds(),y.lat=this.bounds.getSouth()}if(this.isShowTooltip){this.bounds=new L.LatLngBounds,this.bounds=this._calculateBounds();var k=new L.LatLngBounds(L.latLng(this.bounds.getSouth()-n,this.bounds.getWest()-n),L.latLng(this.bounds.getNorth()+5*n,this.bounds.getEast()+n)),V=[];V.push(L.latLng(k.getNorth(),k.getWest())),V.push(L.latLng(k.getSouth(),k.getEast()));var Y=L.latLng(o[0].lat,o[0].lng);Y.isFixedPos=!0,V.push(Y);var z=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL,V,{serverUrl:this.serverUrl,scaleByMap:this.scaleByMap,minScale:this.minScale,maxScale:this.maxScale});for(var G in z.enableEdit=!0,z.ownerGroup=this,this.subObjects.splice(0,0,z),this._addComponents(z),this._clearComponents(),this.subObjects)this.subObjects[G].enableEdit=!0,this.subObjects[G].ownerGroup=this,this._addComponents(this.subObjects[G])}}},_setSubSymbolText:function(){for(var t=0;t<this.subSymbols.length;t++)null!==this.subSymbols[t].symbolData&&(this.subSymbols[t].symbolData.textContent=this.subSymbols[t].textContent)},_parseSymbolData:function(){rt.prototype._parseSymbolData.call(this),this.symbolData&&(this.isShowTooltip=this.symbolData.isShowTooltip)},_setSymbolData:function(){rt.prototype._setSymbolData.call(this),this.symbolData&&(this.symbolData.isShowTooltip=this.isShowTooltip)}});L.supermap.plotting.airDeployment=function(t,e,i,o){return new pt(t,e,i,o)},L.supermap.plotting.AirDeployment=pt;var ut=L.Evented.extend({options:{},uuid:null,associatedUuid:null,libID:null,code:null,maxEditPts:0,minEditPts:0,symbolType:null,latLngs:[],style:{fill:!1,color:"#0000ff",lineSymbolID:2,opacity:1,weight:1},components:[],initialize:function(t,e,i,o){this.components=[],this.minEditPts=3,this.maxEditPts=9999,this.libID=0,this.code=SuperMap.Plot.SymbolType.AVOIDREGION,this.symbolType=SuperMap.Plot.SymbolType.AVOIDREGION,this.symbolName="避让区域",o.style&&(this.style=SuperMap.Plot.PlottingUtil.cloneObject(o.style)),o&&o.symbolData&&this._parseSymbolData(o.symbolData),L.Util.isArray(i)||(i=[i]),i.length>0&&(this.latLngs=L.Util.isArray(i)?i:[i]),SuperMap.Util.extend(this,o),void 0!==this.uuid&&null!==this.uuid||(this.uuid=SuperMap.Plot.PlottingUtil.generateUuid())},destroy:function(){this.libID=null,this.code=null,this.symbolType=null,this.symbolName=null,this.uuid=null,this.associatedUuid=null,this.minEditPts=null,this.maxEditPts=null,this.latLngs=null,this.components=null},onAdd:function(t){this.layer=t,this._renderer=t._renderer,this._map=t._map,this.redraw(),A&&(this.dragging||(this.dragging=new A(this)))},_clearComponents:function(){for(var t=0;t<this.components.length;t++)this.components[t].removeEventParent(this),this.components[t].onRemove(),delete this.components[t];this.components.length=0},_addComponents:function(t){t._map=this._map,t._renderer=this._renderer,t.addEventParent(this),t.onAdd(),this.components.push(t)},_project:function(){var t=this;t._pxBounds=L.bounds(L.point(0,0),L.point(0,0)),t.components.map(function(e){return t._pxBounds.extend(e._pxBounds.min),t._pxBounds.extend(e._pxBounds.max),e})},getBounds:function(){var t=this;return t._bounds=new L.LatLngBounds,t.components.map(function(e){return t._bounds.extend(e.getBounds()),e}),t._bounds},setLatLngs:function(t){return this.latLngs=t,this.redraw()},getLatLngs:function(){return this.latLngs},addLatLng:function(t){if(this.latLngs[this.latLngs.length-1].lat!==t.lat||this.latLngs[this.latLngs.length-1].lng!==t.lng)return this.latLngs.push(t),this.redraw()},redraw:function(){if(this._clearComponents(),this.getLatLngs().length>=this.minEditPts){let t=new L.Polygon(this.getLatLngs(),{smoothFactor:.05});this._addComponents(t),t.setStyle(this.style)}else if(this.getLatLngs().length>=2&&this.getLatLngs().length<this.minEditPts){let t=new L.Polyline(this.getLatLngs(),{smoothFactor:.05});this._addComponents(t),t.setStyle(this.style)}},_modifyPoint:function(){this.redraw(),this._map.getFeatureByUuid(this.associatedUuid).redraw()},move:function(t,e){(L.Util.moveLatLngs(this.getLatLngs(),t,e),this.redraw(),null!==this._map&&void 0!==this._map)&&this._map.getFeatureByUuid(this.associatedUuid).redraw()},rotate:function(t,e){(L.Util.rotateLatLngs(this.getLatLngs(),e,t),null!==this._map&&void 0!==this._map)&&this._map.getFeatureByUuid(this.associatedUuid).redraw()},_reView:function(){},_parseSymbolData:function(t){if(null!==t&&(this.libID=t.libID,this.code=t.code,this.symbolType=t.symbolType,this.maxEditPts=t.algoMaxEditPts,this.minEditPts=t.algoMinEditPts,void 0!==t.uuid&&(this.uuid=t.uuid),void 0!==t.associatedUuid&&(this.associatedUuid=t.associatedUuid),this.latLngs=[],t.controlPoints))for(var e=0;e<t.controlPoints.length;e++)this.latLngs.push(L.latLng(t.controlPoints[e].y,t.controlPoints[e].x))},getSymbolData:function(){var t={};t.uuid=this.uuid,t.associatedUuid=this.associatedUuid,t.libID=this.libID,t.code=this.code,t.symbolType=this.symbolType,t.algoMaxEditPts=this.maxEditPts,t.algoMinEditPts=this.minEditPts,t.controlPoints=[];for(var e=0;e<this.latLngs.length;e++)t.controlPoints.push({x:this.getLatLngs()[e].lng,y:this.getLatLngs()[e].lat,z:0});return t},clone:function(){var t=SuperMap.Plot.PlottingUtil.cloneObject(this.getSymbolData());return t.uuid=SuperMap.Plot.PlottingUtil.generateUuid(),L.supermap.plotting.avoidRegion(0,SuperMap.Plot.SymbolType.AVOIDREGION,L.Util.cloneLatLngs(this.getLatLngs()),{symbolData:t,style:SuperMap.Plot.PlottingUtil.cloneObject(this.style)})},_containsPoint:function(t){var e=L.Util.latLngsToSuperMapPoints(this.getLatLngs());e.push(e[0].clone());var i=SuperMap.Number.limitSigDigs,o=i(t.x,14),l=i(t.y,14);function s(t,e,i,o,l){return(o-e)/(l-i)*(t-l)+o}for(var n,a,r,p,u,h,g,c=e.length-1,y=0,P=0;P<c;++P)if(r=i((n=e[P]).x,14),p=i(n.y,14),u=i((a=e[P+1]).x,14),p!==(h=i(a.y,14))){if((g=i(s(l,r,p,u,h),14))===o&&(p<h&&l>=p&&l<=h||p>h&&l<=p&&l>=h)){y=-1;break}g<=o||r!==u&&(g<Math.min(r,u)||g>Math.max(r,u))||(p<h&&l>=p&&l<h||p>h&&l<p&&l>=h)&&++y}else if(l===p&&(r<=u&&o>=r&&o<=u||r>=u&&o<=r&&o>=u)){y=-1;break}return-1===y?1:!!(1&y)},_relationToLayer:function(t){var e=2,i=[];if(t instanceof L.Polygon)(i=L.Util.latLngsToSuperMapPoints(t.getLatLngs()[0])).push(i[0].clone());else if(t instanceof L.Polyline)i=L.Util.latLngsToSuperMapPoints(t.getLatLngs());else if(t instanceof g){var o=t.getBounds();i.push(new SuperMap.Geometry.Point(o.left,o.top)),i.push(new SuperMap.Geometry.Point(o.left,o.bottom)),i.push(new SuperMap.Geometry.Point(o.right,o.bottom)),i.push(new SuperMap.Geometry.Point(o.top,o.right))}if(0===i.length)e=2;else{var l=this._containsPoint(i[0]);l&&(e=1);for(let t=1;t<i.length;t++)if(l!==this._containsPoint(i[t])){e=0;break}if(2===e){var s=L.Util.latLngsToSuperMapPoints(this.getLatLngs());s.push(s[0].clone());for(let t=0;t<i.length-1;t++){for(var n=0;n<s.length-1;n++)if(SuperMap.Plot.PlottingUtil.isCross(i[t],i[t+1],s[n],s[n+1])){e=0;break}if(0===e)break}}}return e},_getWithoutPts:function(t,e){var i=L.Util.latLngsToSuperMapPoints(t);!0===e&&i[0].x!==i[i.length-1].x&&i[0].y!==i[i.length-1].y&&i.push(i[0]);for(var o=[],l=[],s=0;s<i.length;s++)if(this._containsPoint(i[s])||l.push(i[s].clone()),s<=i.length-2)for(var n=this._intersectSegs(i[s],i[s+1]),a=0;a<n.length;a++)l.push(n[a].clone()),l.length>1&&(o.push(l),l=[]);0!==l.length&&o.push(l);var r=o.length;if(!0===e&&r>1&&SuperMap.Plot.PlottingUtil.equalFuzzy(o[0][0].x,o[r-1][o[r-1].length-1].x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(o[0][0].y,o[r-1][o[r-1].length-1].y)){for(var p=0;p<o[0].length;p++)o[r-1].push(o[0][p]);o.splice(0,1)}return o},_intersectSegs:function(t,e){var i=L.Util.latLngsToSuperMapPoints(this.getLatLngs());i.push(i[0].clone()),i[0].x!==i[i.length-1].x&&i[0].y!==i[i.length-1].y&&i.push(i[0]);for(var o=[],l=0;l<i.length-1;l++){var s=new SuperMap.Geometry.Point;SuperMap.Plot.PlottingUtil.intersectLineSegs(t,e,i[l],i[l+1],s)&&o.push(s)}for(var n=[];o.length>0;)if(1===o.length)n.push(o[0]),o.splice(0,1);else{for(var a=0,r=SuperMap.Plot.PlottingUtil.distance(t,o[0]),p=1;p<o.length;p++)SuperMap.Plot.PlottingUtil.distance(t,o[p])<r&&(r=SuperMap.Plot.PlottingUtil.distance(t,o[p]),a=p);n.push(o[a]),o.splice(a,1)}return n}});L.supermap.plotting.avoidRegion=function(t,e,i,o){return new ut(t,e,i,o)},L.supermap.plotting.AvoidRegion=ut;var ht=T.extend({route:null,towardNode:null,startRouteNode:null,textAnchor:null,space:null,inner:null,setPosition:function(t){this.textPosition=t,this._calculateOffset()},initialize:function(t,e,i,o){this.symbolName="标牌文字",this.symbolType=SuperMap.Plot.SymbolType.LITERATESIGN,T.prototype.initialize.call(this,t,e,i,o)},destroy:function(){this.space=null,this.inner=null,this.textAnchor=null,T.prototype.destroy.call(this)},_calculateParts:function(){if(null!==this.startRouteNode&&null!==this.towardNode&&null!==this.towardNode.textContent&&0!==this.towardNode.textContent.length){var t=this.route._getNodeByUuid(this.towardNode.routeNodeId),e=new SuperMap.Geometry.Point(this.startRouteNode.x,this.startRouteNode.y),i=new SuperMap.Geometry.Point(t.x,t.y),o=L.latLng((e.y+i.y)/2,(e.x+i.x)/2),l=SuperMap.Plot.PlottingUtil.getTextCount(this.towardNode.textContent[0]);for(let t=1;t<this.towardNode.textContent.length;t++){var s=SuperMap.Plot.PlottingUtil.getTextCount(this.towardNode.textContent[t]);l<s&&(l=s)}if(null===this.towardNode.offsetX||null===this.towardNode.offsetY){var n=this.space+(this.dScale*this.style.fontSize+1)*l/2,a=this._innerOutlineDir(),r=this._map.layerPointToLatLng(L.point(0,0)),p=this._map.layerPointToLatLng(L.point(n,0)),u=new SuperMap.Geometry.Point(r.lng,r.lat),h=new SuperMap.Geometry.Point(p.lng,p.lat),g=a*SuperMap.Plot.PlottingUtil.distance(u,h);!0===this.inner&&(g=-g);var c=SuperMap.Plot.PlottingUtil.parallel([e,i],g);this.latLngs=[];var y=L.latLng((c[0].y+c[1].y)/2,(c[0].x+c[1].x)/2);this.latLngs.push(y);var P=this._map.latLngToLayerPoint(o),S=this._map.latLngToLayerPoint(y);this.towardNode.offsetX=S.x-P.x,this.towardNode.offsetY=S.y-P.y}else{var d=this._map.latLngToLayerPoint(o),m=L.point(d.x+this.towardNode.offsetX,d.y+this.towardNode.offsetY),f=this._map.layerPointToLatLng(m);0===this.latLngs.length?this.latLngs.push(f):this.latLngs[0]=f}var M=180*SuperMap.Plot.PlottingUtil.radian(e,i)/Math.PI,b=this._getTextContentsCells(l),A="";null!==this._map&&this._map instanceof L.Map&&(A=this._map.options.crs.code);for(let t=0;t<b.length;t++){var T=b[t];L.Util.isMercatorProjection(A)&&(T.positionPoints=L.Util.conventProjectPts(L.Util.superMapPointsToLatLngs(T.positionPoints))),T.positionPoints=SuperMap.Plot.Primitives.getSpatialData(T.type,T.positionPoints,T.angle);for(var v=[],_=0;_<T.positionPoints.length;_++)v.push(SuperMap.Plot.PlottingUtil.coordinateTrans(new SuperMap.Geometry.Point(this.latLngs[0].lng,this.latLngs[0].lat),T.positionPoints[_],M));var x=null;if(L.Util.isMercatorProjection(A)){for(var O=[],w=0,I=(x=L.Util.unConventProjectPts(v)).length;w<I;w++)O.push(SuperMap.Plot.PlottingUtil.coordinateTrans(new SuperMap.Geometry.Point(this.latLngs[0].lng,this.latLngs[0].lat),L.Util.latLngsToSuperMapPoints(x[w])[0],0));x=L.Util.superMapPointsToLatLngs(O)}else x=L.Util.superMapPointsToLatLngs(v);T.type===SuperMap.Plot.SymbolType.TEXTSYMBOL?0!==T.textContent.length&&(T.style.labelRotation=90-M,this._createAndDrawLayer(SuperMap.Plot.SymbolType.TEXTSYMBOL,x,T.style,T.textContent)):this._createAndDrawLayer(T.type,x,T.style,T.textContent)}}},_innerOutlineDir:function(){for(var t=[],e=0;e<this.route.routeNodes.length;e++)t.push(new SuperMap.Geometry.Point(this.route.routeNodes[e].x,this.route.routeNodes[e].y));return SuperMap.Plot.PlottingUtil.innerOutlineDir(t)},move:function(t,e){for(var i in this.components)L.Util.moveLatLngs(this.components[i].getLatLngs(),t,e),this.components[i].setLatLngs(this.components[i].getLatLngs());L.Util.moveLatLngs(this.getLatLngs(),t,e),this._calculateOffset()},_reView:function(){this.scaleByMap&&!1!==this.scaleByMap?(this.dScale*=this._map.getZoomScale(this._map.getZoom(),this.fromZoom),this.dScale>5?this.dScale=5:this.dScale<1&&(this.dScale=1),this.redraw()):this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues),this.fromZoom=this._map.getZoom()},_calculateOffset:function(){var t=this.route._getNodeByUuid(this.towardNode.routeNodeId),e=L.latLng((this.startRouteNode.y+t.y)/2,(this.startRouteNode.x+t.x)/2),i=this._map.latLngToLayerPoint(e),o=this._map.latLngToLayerPoint(this.latLngs[0]);this.towardNode.offsetX=o.x-i.x,this.towardNode.offsetY=o.y-i.y},_getTextContentsCells:function(t){var e=this.towardNode.textContent,i=this.dScale*this.style.fontSize+1,o=this._map.layerPointToLatLng(L.point(0,0)),l=this._map.layerPointToLatLng(L.point(i,0)),s=SuperMap.Plot.PlottingUtil.distance({x:o.lng,y:o.lat},{x:l.lng,y:l.lat}),n=s,a=s*t,r=e.length+2,p=[],u=r*n*.5,h=new Object;h.type=SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,h.positionPoints=[],h.positionPoints.push(new SuperMap.Geometry.Point(u,0)),h.positionPoints.push(new SuperMap.Geometry.Point(-2*n+u,.5*a)),h.positionPoints.push(new SuperMap.Geometry.Point(-r*n+u,.5*a)),h.positionPoints.push(new SuperMap.Geometry.Point(-r*n+u,-.5*a)),h.positionPoints.push(new SuperMap.Geometry.Point(-2*n+u,-.5*a)),h.style={surroundLineFlag:!1,fontSize:12},p.push(h);for(var g=1;g<=e.length;g++){var c=new Object;c.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,c.positionPoints=[],c.positionPoints.push(new SuperMap.Geometry.Point(-(g+1)*n+u,.5*a)),c.positionPoints.push(new SuperMap.Geometry.Point(-(g+1)*n+u,-.5*a)),c.style={surroundLineFlag:!1,fontSize:12},p.push(c);var y=new Object;y.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,y.positionPoints=[],y.positionPoints.push(new SuperMap.Geometry.Point(-(.5+g+1)*n+u,0)),y.textContent=e[g-1],y.style={surroundLineFlag:!1,fontSize:12,fontFamily:"Microsoft YaHei"},y.style.labelAlign="cm",p.push(y)}var P=new SuperMap.Geometry.Point(-1.4*n+u,0),S=new Object;S.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,S.positionPoints=[],S.positionPoints.push(P),S.textContent=this.towardNode.index.toString(),S.style={surroundLineFlag:!1,fontSize:12,fontSizeLimit:!0,fontFamily:"Microsoft YaHei"},S.style.labelAlign="cm",p.push(S);var d=new Object;return d.type=SuperMap.Plot.SymbolType.CIRCLESYMBOL,d.positionPoints=[],d.positionPoints.push(P),d.positionPoints.push(new SuperMap.Geometry.Point(P.x,.4*n)),d.style={surroundLineFlag:!1,fontSize:12},p.push(d),p}});L.supermap.plotting.literateSign=function(t,e,i,o){return new ht(t,e,i,o)},L.supermap.plotting.LiterateSign=ht;var gt=v.extend({relLineText:0,showPathLine:!0,showPathLineArrow:!1,isCurve:!1,isAvoid:!1,textToLineDistance:0,fontSpace:0,getRelLineText:function(){return this.relLineText},setRelLineText:function(t){this.relLineText!==t&&(this.relLineText=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},setFontSpace:function(t){this.fontSpace!==t&&(this.fontSpace=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getShowPathLine:function(){return this.showPathLine},setShowPathLine:function(t){this.showPathLine!==t&&(this.showPathLine=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getShowPathLineArrow:function(){return this.showPathLineArrow},setShowPathLineArrow:function(t){this.showPathLineArrow!==t&&(this.showPathLineArrow=t,this.showPathLine&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},getIsCurveLine:function(){return this.isCurve},setCurveLine:function(t){this.isCurve!==t&&(this.isCurve=t,this.showPathLine&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},getIsAvoidLine:function(){return this.isAvoid},setAvoidLine:function(t){this.isAvoid!==t&&(this.isAvoid=t,this.relLineText===SuperMap.Plot.RelLineText.ONLINE&&this.showPathLine&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},getSpace:function(){return this.textToLineDistance},setSpace:function(t){this.textToLineDistance!==t&&(this.textToLineDistance=t,this.relLineText!==SuperMap.Plot.RelLineText.ONLINE&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},initialize:function(t,e,i,o){this.code=SuperMap.Plot.SymbolType.PATHTEXT,this.libID=0,this.symbolType=SuperMap.Plot.SymbolType.PATHTEXT,this.symbolName="沿线注记",this.minEditPts=2,this.maxEditPts=9999,o.scaleByMap=!1,v.prototype.initialize.call(this,t,e,i,o)},_reView:function(){this.fromZoom!==this._map.getZoom()&&(this.redraw(),this.fromZoom=this._map.getZoom())},toSuperMapAlgorithms:function(){v.prototype.toSuperMapAlgorithms.call(this),this.superMapAlgoSymbol.relLineText=this.relLineText,this.superMapAlgoSymbol.showPathLine=this.showPathLine,this.superMapAlgoSymbol.showPathLineArrow=this.showPathLineArrow,this.superMapAlgoSymbol.isCurve=this.isCurve,this.superMapAlgoSymbol.isAvoid=this.isAvoid,this.superMapAlgoSymbol.textToLineDistance=this.textToLineDistance}});L.supermap.plotting.pathText=function(t,e,i,o){return new gt(t,e,i,o)},L.supermap.plotting.PathText=gt;var ct=T.extend({route:null,routeNode:null,_isFirstNode:function(){for(var t=0;t<this.route.routeNodes.length;t++)for(var e=0;e<this.route.routeNodes[t].towardNodes.length;e++)if(this.route.routeNodes[t].towardNodes[e].routeNodeId===this.routeNode.id)return!1;return!0},_isLastNode:function(){return 0===this.routeNode.towardNodes.length},setType:function(t){this.routeNode.type=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},setName:function(t){this.routeNode.name=t,this.redraw()},setPosition:function(t,e){this.routeNode.y=this.latLngs[0].lat=t,this.routeNode.x=this.latLngs[0].lng=e;for(let t=0;t<this.route.routeNodes.length;t++)this.route.routeNodes[t].routeNodeId===this.routeNode.id&&(this.route.routeNodes[t].x=this.routeNode.x,this.route.routeNodes[t].y=this.routeNode.y);if(0!==this.route.arrRoutePts.length){if(this.route.arrRoutePts=[],this.route.redraw(),this.route.highlightFlag){var i=SuperMap.Util.cloneObject(this.route.highlightStyle);this.route.highlightStyle&&SuperMap.Util.copyAttributes(i,this.route.highlightStyle),this.route.highlight(i)}}else{for(var o=this.route._getFeatureStartWith(this.routeNode),l=0;l<o.length;l++)o[l]instanceof ht||(o[l].latLngs[0]=L.latLng(t,e)),o[l].redraw();var s=this.route._getFeatureEndWith(this.routeNode);for(let i=0;i<s.length;i++)s[i]instanceof ht||(s[i].latLngs[1]=L.latLng(t,e)),s[i].redraw();this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)}},setRotate:function(t){this.routeNode.type===SuperMap.Plot.RouteNodeType.STANDBY&&this.routeNode.rotate!==t&&(this.routeNode.rotate=t,this.redraw())},getRotate:function(){return this.routeNode.rotate},initialize:function(t,e,i,o){T.prototype.initialize.call(this,t,e,i,o),this.symbolName=SuperMap.Plot.RouteNodePrimitives.getRouteNodeNameByType(this.routeNode.type),this.symbolType=SuperMap.Plot.SymbolType.ROUTENODE,this.anchorPoint=L.latLng(0,0)},destroy:function(){this.route=null,this.routeNode=null,T.prototype.destroy.call(this)},_calculateParts:function(){if(0===this.getLatLngs().length?this.latLngs=[L.latLng(this.routeNode.y,this.routeNode.x)]:(this.latLngs[0].lat=this.routeNode.y,this.latLngs[0].lng=this.routeNode.x),this.latLngs.length>=this.minEditPts){if(this.routeNode.type===SuperMap.Plot.RouteNodeType.STANDBY){var t=SuperMap.Plot.RouteNodePrimitives.getRouteNodeCells(this.routeNode.type,!1,this.routeNode.rotate);this._transformSymbolCellsToGeometrys(t);var e=SuperMap.Plot.RouteNodePrimitives.getRouteNodeCells(this.routeNode.type,!0);this._transformSymbolCellsToGeometrys(e)}else{var i=SuperMap.Plot.RouteNodePrimitives.getRouteNodeCells(this.routeNode.type);this._transformSymbolCellsToGeometrys(i)}if(this.routeNode.style=this.style,null!==this.routeNode.name&&""!==this.routeNode.name){var o=this.getBounds(),l=L.latLng(o.getNorth(),o.getEast()),s=this.routeNode.style;s.labelAlign="lb",this._createAndDrawLayer(SuperMap.Plot.SymbolType.TEXTSYMBOL,[l],s,this.routeNode.name).isNameLayer=!0}}},_transformSymbolCellsToGeometrys:function(t){for(var e=this._map.latLngToLayerPoint(this.latLngs[0]),i=0;i<t.length;i++){var o=t[i];o.type===SuperMap.Plot.SymbolType.TEXTSYMBOL&&(o.style.fontSize=this.dScale*o.style.fontSize,o.style.labelRotation+=-this.dRotate);for(var l=0;l<o.positionPoints.length;l++){o.positionPoints[l].x=o.positionPoints[l].x*this.dScale,o.positionPoints[l].y=o.positionPoints[l].y*this.dScale;var s=this.dRotate*(Math.PI/180);SuperMap.Plot.PlottingUtil.rotateAngle({x:this.anchorPoint.lng,y:this.anchorPoint.lat},s,o.positionPoints[l]),o.positionPoints[l]=this._transitionPoint(o.positionPoints[l],e)}o.positionPoints=L.Util.latLngsToSuperMapPoints(o.positionPoints)}this._transSymbolCellsToLayers(t)},_transitionPoint:function(t,e){var i=e.x+t.x*(96/254),o=e.y-t.y*(96/254);return this._map.layerPointToLatLng(L.point(i,o))},move:function(t,e){this.routeNode.x+=e,this.routeNode.y+=t,this.setPosition(this.routeNode.y,this.routeNode.x)},getBounds:function(){var t=new L.LatLngBounds;for(var e in this.components){var i=this.components[e];i.isNameLayer||t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t},_reView:function(){this.fromZoom!==this._map.getZoom()&&(this.scaleByMap&&!1!==this.scaleByMap?(this.dScale*=this._map.getZoomScale(this._map.getZoom(),this.fromZoom),this.dScale>5?this.dScale=5:this.dScale<1&&(this.dScale=1),this.redraw()):this.redraw(),this.fromZoom=this._map.getZoom(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))}});L.supermap.plotting.routeNode=function(t,e,i,o){return new ct(t,e,i,o)},L.supermap.plotting.RouteNode=ct;var yt=d.extend({routeNodes:[],nextRouteNodeType:SuperMap.Plot.RouteNodeType.TURNING,arrRoutePts:[],initialize:function(t,e,i,o){this.scaleByMap=!1,this.minEditPts=1,this.maxEditPts=9999,this.routeNodes=[],this.arrRoutePts=[],this.prevRouteNode=[],this.prevLiterateSign=[],d.prototype.initialize.call(this,t,e,i,o)},destroy:function(){this.routeNodes=null,this.arrRoutePts=null,d.prototype.destroy.apply(this,arguments)},highlight:function(t){for(var e in this.highlightFlag=!0,this.highlightStyle=t,this.components)if(this.components[e]instanceof v){var i=SuperMap.Util.copyAttributes(this.components[e].style,t);this.components[e].setStyle(i)}},unhighlight:function(){for(var t in this.components)if(this.components[t]instanceof v){var e=SuperMap.Util.copyAttributes(this.components[t].style,this.style);this.components[t].setStyle(e)}this.highlightFlag=!1,this.highlightStyle=null},blinkRoute:function(t,e,i,o){void 0===i&&(i=2),void 0===t&&(t={color:"#ff0000"}),void 0===e&&(e={color:"#0000ff"}),void 0===o&&(o=300);for(var l=[],s=0;s<i;s++)l.push(t),l.push(e);!0===this.highlightFlag&&this.highlightStyle&&null!==this.highlightStyle?l.push(this.highlightStyle):l.push(this.lineStyle);for(var n=this,a=l.length,r=0;r<a;r++)setTimeout(function(){for(var t in n.components)if(n.components[t]instanceof v){var e=SuperMap.Util.copyAttributes(n.components[t].style,l[0]);n.components[t].setStyle(e)}l.splice(0,1)},o*r)},applyTextStyle:function(t){var e;for(var i in this.components)(this.components[i]instanceof ht||this.components[i]instanceof gt)&&(this.components[i].setStyle(SuperMap.Util.copyAttributes(this.components[i].style,t)),e=this.components[i].style);for(var o=0;o<this.routeNodes.length;o++)for(var l=0;l<this.routeNodes[o].towardNodes.length;l++)this.routeNodes[o].towardNodes[l].style=SuperMap.Util.copyAttributes(this.routeNodes[o].towardNodes[l].style,e)},applyLineStyle:function(t){for(var e in this.components)this.components[e]instanceof ht||this.components[e]instanceof gt||this.components[e]instanceof ct||this.components[e].setStyle(SuperMap.Util.copyAttributes(this.components[e].style,t));this.style=SuperMap.Util.copyAttributes(this.style,t)},applyNodeStyle:function(t){for(var e in this.components)this.components[e]instanceof ct&&this.components[e].setStyle(SuperMap.Util.copyAttributes(this.components[e].style,t));for(var i=0;i<this.routeNodes.length;i++)this.routeNodes[i].style=SuperMap.Util.copyAttributes(this.routeNodes[i].style,t)},deleteRouteNode:function(t){if(null!==this._getNodeByUuid(t.id)){var e=this._getNodeFeature(t);e.isSelected&&null!==this._map.getPlotEditControl()&&this._map.getPlotEditControl().unselectFeatures(e),this.arrRoutePts=[];for(let e=0;e<this.routeNodes.length;e++)for(let i=0;i<this.routeNodes[e].towardNodes.length;i++)if(this.routeNodes[e].towardNodes[i].routeNodeId!==t.id);else{this.routeNodes[e].towardNodes.splice(i,1);for(let i=0;i<t.towardNodes.length;i++)t.towardNodes[i].routeNodeId!==this.routeNodes[e].id&&this.routeNodes[e].towardNodes.push(t.towardNodes[i])}for(let e=0;e<this.routeNodes.length;e++)this.routeNodes[e].id===t.id&&this.routeNodes.splice(e,1);this.redraw()}},updateRouteNode:function(t){if(0!==this.arrRoutePts.length){this.arrRoutePts=[];var e=this._getNodeByUuid(t.id);if(null!==e?e=t:this.routeNodes.push(t),this.redraw(),this.highlightFlag){var i=SuperMap.Util.cloneObject(this.highlightStyle);this.highlightStyle&&SuperMap.Util.copyAttributes(i,this.highlightStyle),this.highlight(i)}}else{var o=this._getNodeFeature(t);if(null!==o){o.routeNode=t,o.redraw();for(var l=this._getFeatureStartWith(t),s=0;s<l.length;s++)l[s].latLngs[0]=L.latLng(t.y,t.x),l[s].redraw();for(var n=this._getFeatureEndWith(t),a=0;a<n.length;a++)n[a].latLngs[1]=L.latLng(t.y,t.x),n[a].redraw();return}}},insertRouteNode:function(t,e,i,o,l,s,n,a){if(void 0===o&&(o=!0),this.arrRoutePts=[],o&&i)for(var r=0;r<e.towardNodes.length;r++)e.towardNodes[r].routeNodeId===i.id&&e.towardNodes.splice(r,1);if(null===this._getNodeByUuid(t.id)&&this.routeNodes.push(t),e){var p=!1;for(let i=0;i<e.towardNodes.length;i++)e.towardNodes[i].routeNodeId===t.id&&(p=!0);if(!1===p){let i=new SuperMap.Plot.TowardNode;i.routeNodeId=t.id,void 0!==l&&(i.textContent=l),void 0!==s&&(i.relLineText=s),e.towardNodes.push(i)}}if(i){var u=!1;for(let e=0;e<t.towardNodes.length;e++)t.towardNodes[e].routeNodeId===i.id&&(u=!0);if(!1===u){let e=new SuperMap.Plot.TowardNode;e.routeNodeId=i.id,void 0!==n&&(e.textContent=n),void 0!==a&&(e.relLineText=a),t.towardNodes.push(e)}}this.redraw()},addRouteNode:function(t,e,i,o){if(null===this._getNodeByUuid(t.id)&&(this.arrRoutePts=[],this.routeNodes.push(t)),e){for(var l=!1,s=0;s<e.towardNodes.length;s++)e.towardNodes[s].routeNodeId===t.id&&(l=!0);if(!1===l){var n=new SuperMap.Plot.TowardNode;n.routeNodeId=t.id,void 0!==i&&(n.textContent=i),void 0!==o&&(n.relLineText=o),e.towardNodes.push(n)}}this.redraw()},_addRouteNodeByNode:function(t,e,i){if(null===this._getNodeByUuid(t.id))return null;var o=new SuperMap.Plot.RouteNode;if(o.x=t.x,o.y=t.y,o.name="",o.type=this.nextRouteNodeType,!0===e){let e=new SuperMap.Plot.TowardNode;e.routeNodeId=t.id,o.towardNodes.push(e)}else if(!0===i){let e=new SuperMap.Plot.TowardNode;e.routeNodeId=o.id,t.towardNodes.push(e)}return this.routeNodes.push(o),this.redraw(),this._getNodeFeature(o)},_addRouteNodeByPosWithoutLast:function(t,e){for(var i=0;i<this.routeNodes.length;i++){var o=this.routeNodes[i];if(null!==o&&(o.towardNodes&&null!==o.towardNodes))for(var l=0;l<o.towardNodes.length;l++){var s=this._getNodeByUuid(o.towardNodes[l].routeNodeId);if(null!==s){var n=SuperMap.Plot.PlottingUtil.computePointToLineMinDis({x:t.lng,y:t.lat},[{x:o.x,y:o.y},{x:s.x,y:s.y}]);if(-1!==n.index&&n.minDis<e){var a=new SuperMap.Plot.RouteNode;a.x=t.lng,a.y=t.lat,a.type=this.nextRouteNodeType,a.name="",a.towardNodes.push(o.towardNodes[l]),o.towardNodes.splice(l,1);var r=new SuperMap.Plot.TowardNode;return r.routeNodeId=a.id,o.towardNodes.push(r),this.arrRoutePts=[],this.routeNodes.push(a),this.redraw(),this._getNodeFeature(a)}}}}return null},_addRouteNodeByPos:function(t,e){for(var i=[],o=0;o<this.routeNodes.length;o++){var l=this.routeNodes[o];if(null!==l&&(l.towardNodes&&null!==l.towardNodes)){0===l.towardNodes.length&&i.push(l);for(var s=0;s<l.towardNodes.length;s++){var n=this._getNodeByUuid(l.towardNodes[s].routeNodeId);if(null!==n){var a=SuperMap.Plot.PlottingUtil.computePointToLineMinDis({x:t.lng,y:t.lat},[{x:l.x,y:l.y},{x:n.x,y:n.y}]);if(-1!==a.index&&a.minDis<e){let e=new SuperMap.Plot.RouteNode;e.x=t.lng,e.y=t.lat,e.type=this.nextRouteNodeType,e.name=(this.routeNodes.length+1).toString(),e.towardNodes.push(l.towardNodes[s]),l.towardNodes.splice(s,1);let i=new SuperMap.Plot.TowardNode;return i.routeNodeId=e.id,l.towardNodes.push(i),this.arrRoutePts=[],this.routeNodes.push(e),void this.redraw()}}}}}let r=new SuperMap.Plot.RouteNode;if(r.x=t.lng,r.y=t.lat,0!==this.routeNodes.length?r.type=this.nextRouteNodeType:r.type=SuperMap.Plot.RouteNodeType.AIMING,r.name=(this.routeNodes.length+1).toString(),0!==i.length){let t=new SuperMap.Plot.TowardNode;t.routeNodeId=r.id,i[0].towardNodes.push(t)}this.routeNodes.push(r),this.redraw()},setNextRouteNodeType:function(t){this.nextRouteNodeType=t},_getNodeFeature:function(t){for(var e in this.components)if(this.components[e]instanceof ct&&this.components[e].routeNode.id===t.id)return this.components[e];return null},_getFeatureStartWith:function(t){var e=[];for(var i in this.components)this.components[i]._startRouteNode&&this.components[i]._startRouteNode===t.id&&e.push(this.components[i]);return e},_getFeatureEndWith:function(t){var e=[];for(var i in this.components)this.components[i]._endRouteNode&&this.components[i]._endRouteNode===t.id&&e.push(this.components[i]);return e},_selectNodeLayer:function(t){for(var e in L.Util.isArray(t)||(t=[t]),this.components)if((this.components[e]instanceof ct||this.components[e]instanceof ht)&&this.components[e].getBounds().contains(t))return this.components[e];return null},redraw:function(){if(this._initRoute(),this.arrRoutePts&&0!==this.arrRoutePts.length)for(let e=0;e<this.arrRoutePts.length;e++){var t=this.arrRoutePts[e];if(t.length<2)continue;let i=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.POLYLINESYMBOL,t,{enableEdit:!1,scaleByMap:!1},this.style);i.route=this,this._addComponents(i)}for(let t=0;t<this.routeNodes.length;t++){var e=this.routeNodes[t];if(null!==e&&(e.towardNodes&&null!==e.towardNodes)){for(var i=0;i<e.towardNodes.length;i++){var o=this._getNodeByUuid(e.towardNodes[i].routeNodeId);if(null!==o){var l=[];if(l.push(L.latLng(e.y,e.x)),l.push(L.latLng(o.y,o.x)),0===this.arrRoutePts.length){let t=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.POLYLINESYMBOL,l,{enableEdit:!1,scaleByMap:!1},this.style);this._addComponents(t),t._startRouteNode=e.id,t._endRouteNode=o.id}var s=e.towardNodes[i].textContent;if(null!==s){var n=e.towardNodes[i].relLineText;void 0!==n&&null!==n||(n=SuperMap.Plot.RelLineText.ONLEFTLINE);var a=SuperMap.Util.copyAttributes(SuperMap.Plot.PlottingUtil.cloneObject(this.style),e.towardNodes[i].style),r=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.PATHTEXT,l,{relLineText:n,showPathLine:!1,textContent:s,enableEdit:!1,scaleByMap:!1},a);this._addComponents(r),r._startRouteNode=e.id,r._endRouteNode=o.id}}}this._createRouteNode(e)}}this._finishRoute()},_initRoute:function(){this.prevRouteNode.length=0,this.prevLiterateSign.length=0;for(let t=0;t<this.components.length;t++)this.components[t]instanceof ct?this.prevRouteNode.push(this.components[t]):this.components[t]instanceof ht?this.prevLiterateSign.push(this.components[t]):this.components[t]._clearComponents();this.components.length=0},_finishRoute:function(){for(let t=0;t<this.prevRouteNode.length;t++)this.prevRouteNode[t]._clearComponents();for(let t=0;t<this.prevLiterateSign.length;t++)this.prevLiterateSign[t]._clearComponents();this.prevRouteNode=[],this.prevLiterateSign=[]},_createRouteNode:function(t){if(SuperMap.Util.applyDefaults(t.style,this._defaultStyle),null!==t){for(var e=0;e<this.prevRouteNode.length;){if(this.prevRouteNode[e].routeNode.id===t.id)return this.prevRouteNode[e].routeNode=t,this.prevRouteNode[e].redraw(),this.components.push(this.prevRouteNode[e]),void this.prevRouteNode.splice(e,1);e++}var i=SuperMap.Util.copyAttributes(SuperMap.Plot.PlottingUtil.cloneObject(this.style),t.style),o=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.ROUTENODE,[L.latLng(t.y,t.x)],{routeNode:t,route:this},i);this._addComponents(o)}},_addComponents:function(t){m.prototype._addComponents.call(this,t)},_clearComponents:function(){m.prototype._clearComponents.call(this)},clone:function(){var t=SuperMap.Plot.PlottingUtil.cloneObject(this.getSymbolData());return t.uuid=SuperMap.Plot.PlottingUtil.generateUuid(),L.supermap.plotting.PlottingObject.createSymbol(this.libID,this.code,null,{symbolData:t,serverUrl:this.serverUrl})},_parseSymbolData:function(){if(d.prototype._parseSymbolData.call(this),this.symbolData){this.routeNodes=this.symbolData.routeNodes,this.routeNodes=[];for(let i=0;i<this.symbolData.routeNodes.length;i++){var t=new SuperMap.Plot.RouteNode;null===this.symbolData.routeNodes[i].id&&void 0===this.symbolData.routeNodes[i].id||(t.id=this.symbolData.routeNodes[i].id),t.type=this.symbolData.routeNodes[i].type,t.name=this.symbolData.routeNodes[i].name,t.rotate=this.symbolData.routeNodes[i].rotate,Object.prototype.hasOwnProperty.call(this.symbolData.routeNodes[i],"positionPoint")?(t.x=this.symbolData.routeNodes[i].positionPoint.x,t.y=this.symbolData.routeNodes[i].positionPoint.y):(t.x=this.symbolData.routeNodes[i].x,t.y=this.symbolData.routeNodes[i].y),t.towardNodes=[];for(let o=0;o<this.symbolData.routeNodes[i].towardNodes.length;o++){var e=new SuperMap.Plot.TowardNode;e.routeNodeId=this.symbolData.routeNodes[i].towardNodes[o].routeNodeId,e.relLineText=this.symbolData.routeNodes[i].towardNodes[o].relLineText,e.textContent=this.symbolData.routeNodes[i].towardNodes[o].textContent,e.offsetX=this.symbolData.routeNodes[i].towardNodes[o].offsetX,e.offsetY=this.symbolData.routeNodes[i].towardNodes[o].offsetY,e.style=this.symbolData.routeNodes[i].towardNodes[o].style,t.towardNodes.push(e)}t.style=this.symbolData.routeNodes[i].style,this.routeNodes.push(t)}this.arrRoutePts=[];for(let t=0;t<this.symbolData.arrRoutePts.length;t++){var i=[];for(let e=0;e<this.symbolData.arrRoutePts[t].length;e++)Object.prototype.hasOwnProperty.call(this.symbolData.arrRoutePts[t][e],"x")&&Object.prototype.hasOwnProperty.call(this.symbolData.arrRoutePts[t][e],"y")?i.push(L.latLng(this.symbolData.arrRoutePts[t][e].y,this.symbolData.arrRoutePts[t][e].x)):i.push(L.latLng(this.symbolData.arrRoutePts[t][e].lat,this.symbolData.arrRoutePts[t][e].lng));this.arrRoutePts.push(i)}this.lineStyle=this.symbolData.lineStyle}},_setSymbolData:function(){d.prototype._setSymbolData.call(this),this.symbolData&&(this.symbolData.routeNodes=this.routeNodes,this.symbolData.arrRoutePts=this.arrRoutePts,this.symbolData.lineStyle=this.lineStyle)},_getNodeByUuid:function(t){for(var e=0;e<this.routeNodes.length;e++)if(this.routeNodes[e].id===t)return this.routeNodes[e];return null},_reView:function(){if(this.fromZoom!==this._map.getZoom())for(var t in this.components)this.components[t].symbolType!==SuperMap.Plot.SymbolType.POLYLINESYMBOL&&this.components[t]._reView();this.fromZoom=this._map.getZoom(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)}});L.supermap.plotting.Route=yt;var Pt=yt.extend({space:null,inner:null,initialize:function(t,e,i,o){yt.prototype.initialize.call(this,t,e,i,o),this.libID=0,this.code=SuperMap.Plot.SymbolType.AIRROUTE,this.symbolType=SuperMap.Plot.SymbolType.AIRROUTE,this.symbolName="空军航线",null===this.space&&(this.space=20),null===this.inner&&(this.inner=!1)},destroy:function(){this.space=null,this.inner=null,yt.prototype.destroy.call(this)},redraw:function(){if(this._initRoute(),void 0!==this.arrRoutePts&&null!==this.arrRoutePts)for(let t=0;t<this.arrRoutePts.length;t++){let e=this.arrRoutePts[t];if(!SuperMap.Util.isArray(e)||e.length<2)continue;let i=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.POLYLINESYMBOL,e,{serverUrl:this.serverUrl,enableEdit:!1,scaleByMap:!1});this._addComponents(i)}for(let o=0;o<this.routeNodes.length;o++){var t=this.routeNodes[o];if(null!==t&&(t.towardNodes&&null!==t.towardNodes)){for(var e=0;e<t.towardNodes.length;e++)if(t.towardNodes[e]instanceof SuperMap.Plot.TowardNode){var i=this._getNodeByUuid(t.towardNodes[e].routeNodeId);if(null!==i){if(0===this.arrRoutePts.length){let e=[];e.push(L.latLng(t.y,t.x)),e.push(L.latLng(i.y,i.x));let o=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.POLYLINESYMBOL,e,{enableEdit:!1,scaleByMap:!1});this._addComponents(o),o._startRouteNode=t.id,o._endRouteNode=i.id}this._createLiterateSign(t,t.towardNodes[e])}}this._createRouteNode(t)}}this._finishRoute()},_createLiterateSign:function(t,e){for(var i=0;i<this.prevLiterateSign.length;){if(this.prevLiterateSign[i]._startRouteNode===t.id&&this.prevLiterateSign[i]._endRouteNode===e.routeNodeId)return this.prevLiterateSign[i].startRouteNode=t,this.prevLiterateSign[i].towardNode=e,this.prevLiterateSign[i].redraw(),this.components.push(this.prevLiterateSign[i]),void this.prevLiterateSign.splice(i,1);i++}if(null!==e.textContent&&0!==e.textContent.length){var o=SuperMap.Util.copyAttributes(SuperMap.Plot.PlottingUtil.cloneObject(this.style),e.style),l=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.LITERATESIGN,null,{startRouteNode:t,towardNode:e,route:this,inner:this.inner,space:this.space,scaleByMap:!1},o);this._addComponents(l),l._startRouteNode=t.id,l._endRouteNode=e.routeNodeId}}});L.supermap.plotting.airRoute=function(t,e,i,o){return new Pt(t,e,i,o)},L.supermap.plotting.AirRoute=Pt;var St=yt.extend({initialize:function(t,e,i,o){this.libID=0,this.code=SuperMap.Plot.SymbolType.MISSILEROUTE,this.symbolType=SuperMap.Plot.SymbolType.MISSILEROUTE,this.symbolName="导弹航线",yt.prototype.initialize.call(this,t,e,i,o)}});L.supermap.plotting.missileRoute=function(t,e,i,o){return new St(t,e,i,o)},L.supermap.plotting.MissileRoute=St;var dt=yt.extend({initialize:function(t,e,i,o){this.libID=0,this.code=SuperMap.Plot.SymbolType.NAVYROUTE,this.symbolType=SuperMap.Plot.SymbolType.NAVYROUTE,this.symbolName="海军航线",yt.prototype.initialize.call(this,t,e,i,o)}});L.supermap.plotting.navyRoute=function(t,e,i,o){return new dt(t,e,i,o)},L.supermap.plotting.NavyRoute=dt;var mt=v.extend({initialize:function(t,e,i,o){this.code=SuperMap.Plot.SymbolType.FREECURVE,this.libID=0,this.symbolType=SuperMap.Plot.SymbolType.FREECURVE,this.symbolName="自由曲线",this.minEditPts=2,this.maxEditPts=9999,v.prototype.initialize.call(this,t,e,i,o)},destroy:function(){v.prototype.destroy.apply(this,arguments)},_calculateParts:function(){null!==this.getLatLngs()&&this.getLatLngs().length>=this.minEditPts&&this._createAndDrawLayer(24,this.latLngs,this.style,"")},move:function(t,e){L.Util.moveLatLngs(this.getLatLngs(),t,e);for(var i=0,o=this.avoidRegions.length;i<o;i++)this.avoidRegions[i].move(t,e);this.redraw()},setRotate:function(t){for(var e in this.dRotate=t,null===this.anchorPoint&&(this.anchorPoint=this.getBounds().getCenter()),this.components)L.Util.rotateLatLngs(this.components[e].getLatLngs(),this.anchorPoint,t),this.components[e].setLatLngs(this.components[e].getLatLngs());for(var i=0,o=this.avoidRegions.length;i<o;i++)this.avoidRegions[i].rotate(this.dRotate,this.anchorPoint)}});L.supermap.plotting.freeCurve=function(t,e,i,o){return new mt(t,e,i,o)},L.supermap.plotting.FreeCurve=mt;var ft=T.extend({initialize:function(t,e,i,o){T.prototype.initialize.call(this,t,e,i,o),this.libID=0,this.code=SuperMap.Plot.SymbolType.INTERFERENCEBEAM,this.symbolType=SuperMap.Plot.SymbolType.INTERFERENCEBEAM,this.symbolName="干扰波束",this.minEditPts=3,this.maxEditPts=9999},destroy:function(){T.prototype.destroy.apply(this,arguments)},_calculateParts:function(){null!==this.getLatLngs()&&this.getLatLngs().length>=this.minEditPts&&(this.scaleByMap=!0,this._createAndDrawLayer(32,this.latLngs,this.style,""))},move:function(t,e){L.Util.moveLatLngs(this.getLatLngs(),t,e);for(var i=0,o=this.avoidRegions.length;i<o;i++)this.avoidRegions[i].move(t,e);this.redraw()},setRotate:function(t){for(var e in this.dRotate=t,null===this.anchorPoint&&(this.anchorPoint=this.getBounds().getCenter()),this.components)L.Util.rotateLatLngs(this.components[e].getLatLngs(),this.anchorPoint,t),this.components[e].setLatLngs(this.components[e].getLatLngs());for(var i=0,o=this.avoidRegions.length;i<o;i++)this.avoidRegions[i].rotate(this.dRotate,this.anchorPoint)},_reView:function(){}});L.supermap.plotting.interferenceBeam=function(t,e,i,o){return new ft(t,e,i,o)},L.supermap.plotting.InterferenceBeam=ft;var Lt=T.extend({orbitPoints:[],visible:null,timeWindows:null,setVisible:function(t){this.visible!==t&&(this.visible=t,this.redraw(),null!==this._map.getPlotEditControl()&&this.isSelected&&this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getBounds:function(){var t=this;return t._bounds=new L.LatLngBounds,t.components.map(function(e){return e.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL?t._bounds.extend(e.getBoundsWithText()):t._bounds.extend(e.getBounds()),e}),t._bounds},getVisible:function(){return this.visible},initialize:function(t,e,i,o){this.libID=0,this.code=SuperMap.Plot.SymbolType.SATELLITE,this.symbolType=SuperMap.Plot.SymbolType.SATELLITE,this.symbolName="卫星",null===this.visible&&(this.visible=!0),null===this.timeWindows&&(this.timeWindows=[]),0===this.orbitPoints.length&&(this.orbitPoints=[]),this.scaleValues||(this.scaleValues=[]),T.prototype.initialize.call(this,t,e,i,o),this.scaleByMap=!0},_calculateParts:function(){if(null!==this.orbitPoints&&this.visible){if(null===this.latLngs||0===this.latLngs.length)this.latLngs=L.Util.superMapPointsToLatLngs(this.orbitPoints);else for(var t=0,e=this.latLngs.length;t<e;t++)this.orbitPoints[t].x=this.latLngs[t].lng,this.orbitPoints[t].y=this.latLngs[t].lat;this.scaleByMap=!0,this._createAndDrawLayer(24,L.Util.cloneLatLngs(this.latLngs),this.style,"")}0===this.scaleValues.length&&this.scaleValues.push(.5);var i=L.Util.latLngsToSuperMapPoints(this.latLngs),o=SuperMap.Plot.PlottingUtil.polylineDistance(i),l=SuperMap.Plot.PlottingUtil.findPointInPolyLine(i,o*this.scaleValues[0]).pt.clone(),s=Math.floor(this.orbitPoints.length/2),n=new SuperMap.Geometry.Point(this.orbitPoints[s].x,this.orbitPoints[s].y),a=SuperMap.Plot.PlottingUtil.radian(n,new SuperMap.Geometry.Point(this.orbitPoints[s-1].x,this.orbitPoints[s-1].y));this.subSymbols[0].symbolData.dRotate=180*a/Math.PI,this.subSymbols[0].symbolData.textContent=this.textContent,this.subSymbols[0].symbolData.annotationPosition=7;var r={symbolData:SuperMap.Util.cloneObject(this.subSymbols[0].symbolData),serverUrl:this.serverUrl,enableEdit:!1,style:this.style,scaleByMap:!0},p=SuperMap.Plot.PlottingUtil.cloneObject(this.style),u=L.supermap.plotting.PlottingObject.createSymbol(this.subSymbols[0].libID,this.subSymbols[0].code,[new L.latLng(l.y,l.x)],r,p);u.minScale=this.minScale,u.maxScale=this.maxScale,this._addComponents(u),u.isEdit=!0,this.scalePoints=[];var h=new L.latLng(l.y,l.x);h.isScalePoint=!0,h.tag=0,this.scalePoints.push(h)},move:function(t,e){L.Util.moveLatLngs(this.getLatLngs(),t,e);for(let i=0,o=this.orbitPoints.length;i<o;i++)this.orbitPoints[i].x+=e,this.orbitPoints[i].y+=t;for(let t=0,e=this.timeWindows.length;t<e;t++){var i=this.timeWindows[t];null!==i&&i.redraw()}if(0!==this.avoidRegions.length)for(var o=0,l=this.avoidRegions.length;o<l;o++)L.Util.moveLatLngs(this.avoidRegions[o].getLatLngs(),t,e);if(!1===this.visible)for(let i=0;i<this.components.length;i++)this.components[i].symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&this.components[i].move(t,e);else this.redraw()},_resizeLatLngs:function(t,e,i,o){T.prototype._resizeLatLngs.call(this,t,e,i,o);for(let t=0,e=this.orbitPoints.length;t<e;t++)this.orbitPoints[t].x=this.latLngs[t].lng,this.orbitPoints[t].y=this.latLngs[t].lat;for(let t=0,e=this.timeWindows.length;t<e;t++){var l=this.timeWindows[t];null!==l&&l.redraw()}},setRotate:function(t){this.dRotate=t,null===this.anchorPoint&&(this.anchorPoint=this.getBounds().getCenter());for(var e=0,i=this.avoidRegions.length;e<i;e++)this.avoidRegions[e].rotate(t,this.anchorPoint);T.prototype._rotate.call(this,t,this.anchorPoint);for(let t=0,e=this.orbitPoints.length;t<e;t++)this.orbitPoints[t].x=this.latLngs[t].lng,this.orbitPoints[t].y=this.latLngs[t].lat;for(let t=0;t<this.timeWindows.length;t++){var o=this.timeWindows[t];null!==o&&o.redraw()}this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},_reView:function(){for(var t=0,e=this.components.length;t<e;t++)this.components[t].symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&(this.components[t]._reView(),this.components[t]._handleAnnotation(),this.subSymbols[0].symbolData=SuperMap.Util.cloneObject(this.components[t].getSymbolData()))},_modifyPoint:function(t,e){if(e.isScalePoint){if(0!==t)return;var i=L.Util.latLngsToSuperMapPoints(this.getLatLngs()),o=L.Util.latLngsToSuperMapPoints(e),l=SuperMap.Plot.PlottingUtil.clonePoints(i);if((l=SuperMap.Plot.PlottingUtil.clearSamePts(l)).length<this.minEditPts)return;var s=SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(l);s=SuperMap.Plot.PlottingUtil.clearSamePts(s);var n,a=SuperMap.Plot.PlottingUtil.polylineDistance(s),r=SuperMap.Plot.PlottingUtil.distance(s[0],o[0]);for(let t=0;t<s.length;t++)r>SuperMap.Plot.PlottingUtil.distance(s[t],o[0])&&(r=SuperMap.Plot.PlottingUtil.distance(s[t],o[0]),n=t);var p=0;0===n&&(n=1);for(let t=0;t<n;t++)p+=SuperMap.Plot.PlottingUtil.distance(s[t],s[t+1]);this.scaleValues[0]=p/a}this.redraw()}});L.supermap.plotting.satellite=function(t,e,i,o){return new Lt(t,e,i,o)},L.supermap.plotting.Satellite=Lt;var Mt=T.extend({timeWindows:[],initialize:function(t,e,i,o){this.libID=0,this.code=SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS,this.symbolType=SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS,this.symbolName="卫星时间窗",T.prototype.initialize.call(this,t,e,i,o),this.scaleValues||(this.scaleValues=[]),this.scaleByMap=!0},_calculateParts:function(){if(this.associatedUuid){var t=this._map.getFeatureByUuid(this.associatedUuid);if(null===t||null===t.orbitPoints)return}var e=!1;for(let i=0;i<t.timeWindows.length;i++)if(this===t.timeWindows[i]){e=!0;break}if(e||t.timeWindows.push(this),this.type)for(let t=0;t<this.timeWindows.length;t++)this.timeWindows[t].type=this.type;if(this.scalePoints=[],null!==this.timeWindows){var i=t.orbitPoints;for(let e=0;e<this.timeWindows.length;e++){var o,l;if("number"===this.timeWindows[e].type){for(let t=0,s=i.length;t<s;t++)if(this.timeWindows[e].startOrbitPoint===i[t].number&&(o=t),this.timeWindows[e].endOrbitPoint===i[t].number){l=t;break}}else if("Time"===this.timeWindows[e].type)for(let t=0;t<i.length;t++)if(this.timeWindows[e].startOrbitPoint===i[t].time&&(o=t),this.timeWindows[e].endOrbitPoint===i[t].time){l=t;break}var s=[];for(let t=o;t<=l;t++)s.push(new L.latLng(i[t].y,i[t].x));s.length>1&&(this.scaleByMap=!0,this._createAndDrawLayer(24,s,{surroundLineFlag:!1,lineWidthLimit:!0,weight:4*t.style.weight+this.style.weight}),s[0].isScalePoint=!0,s[0].tag=2*e,this.scalePoints.push(s[0]),s[s.length-1].isScalePoint=!0,s[s.length-1].tag=2*e+1,this.scalePoints.push(s[s.length-1]))}}},calculateBounds:function(){this.bounds=null;var t=new L.Bounds,e=this.components;if(e)for(var i=0;i<e.length;i++)t.extend(e[i].getBounds());null!==t.left&&null!==t.bottom&&null!==t.right&&null!==t.top&&this.setBounds(t)},move:function(){},_modifyPoint:function(t,e){if(e.isScalePoint){var i=this._map.getFeatureByUuid(this.associatedUuid);if(!i)return;var o=i.getLatLngs(),l=i.orbitPoints,s=L.Util.latLngsToSuperMapPoints(e),n=L.Util.latLngsToSuperMapPoints(o);if(t%2==0){var a;t/=2,a=this.timeWindows[t].endOrbitPoint-this.timeWindows[t].startOrbitPoint;var r=SuperMap.Plot.PlottingUtil.distance(s[0],n[0]),p=0;for(let t=0;t<o.length-a;t++)r>=SuperMap.Plot.PlottingUtil.distance(s[0],n[t])&&(r=SuperMap.Plot.PlottingUtil.distance(s[0],n[t]),p=t);for(let e=0;e<this.timeWindows.length;e++)"number"===this.timeWindows[e].type?(this.timeWindows[t].startOrbitPoint=p+l[0].number,this.timeWindows[t].endOrbitPoint=p+a+l[0].number):"Time"===this.timeWindows[e].type&&(this.timeWindows[t].startOrbitPoint=p+l[0].time,this.timeWindows[t].endOrbitPoint=p+a+l[0].time)}else{t=(t-1)/2;var u=SuperMap.Plot.PlottingUtil.distance(s[0],n[n.length-1]);for(let t=0;t<o.length;t++)u>=SuperMap.Plot.PlottingUtil.distance(s[0],n[t])&&(u=SuperMap.Plot.PlottingUtil.distance(s[0],n[t]),p=t);for(let e=0;e<this.timeWindows.length;e++)"number"===this.timeWindows[e].type?(this.timeWindows[t].endOrbitPoint=p+l[0].number,this.timeWindows[t].endOrbitPoint<=this.timeWindows[t].startOrbitPoint&&(this.timeWindows[t].endOrbitPoint=this.timeWindows[t].startOrbitPoint+1)):"Time"===this.timeWindows[e].type&&(this.timeWindows[t].endOrbitPoint=p+l[0].time,this.timeWindows[t].endOrbitPoint<=this.timeWindows[t].startOrbitPoint&&(this.timeWindows[t].endOrbitPoint=this.timeWindows[t].startOrbitPoint+1))}}this.redraw()}});L.supermap.plotting.satelliteTimeWindows=function(t,e,i,o){return new Mt(t,e,i,o)},L.supermap.plotting.SatelliteTimeWindows=Mt;var bt=T.extend({symbolTexts:[],addFrame:!1,getFrame:function(){return this.addFrame},setFrame:function(t){this.addFrame!==t&&(this.addFrame=t,this.redraw())},updateSymbolText:function(t,e){this.symbolTexts.length>e&&(this.symbolTexts[e]=t,this.redraw())},removeSymbolTextsFromDotSymbol:function(t){if(t&&"string"==typeof t){var e=this._map.getFeatureByUuid(t);if(e)for(var i=0,o=e.geoSymbolTexts.length;i<o;i++)if(this===e.geoSymbolTexts[i]){e.geoSymbolTexts.splice(i,1);break}}},initialize:function(t,e,i,o){this.libID=0,this.code=SuperMap.Plot.SymbolType.SYMBOLTEXT,this.symbolType=SuperMap.Plot.SymbolType.SYMBOLTEXT,this.symbolName="对象标注",T.prototype.initialize.call(this,t,e,i,o),this.scaleByMap=!0,this.style.sizeFixed=!1},_calculateParts:function(){if(!("none"===this.style.display||null!=this.layer&&"function"==typeof this.layer.getVisibility&&!1===this.layer.getVisibility()||this.symbolTexts.length<=0)){var t=this._map.getFeatureByUuid(this.associatedUuid);if(null!=t&&"none"!==t.style.display){this.latLngs=[];var e=[],i=this.symbolTexts,o=!1,l=t.geoSymbolTexts;for(let t=0,e=l.length;t<e;t++)if(this===l[t]){o=!0;break}o||l.push(this),null==this.minScale&&(this.minScale=t.minScale),null==this.maxScale&&(this.maxScale=t.maxScale);var s=1;"function"==typeof this.layer.getSymZoomScale&&(s=this.layer.getSymZoomScale()),null!=this.minScale&&s<this.minScale?s=this.minScale:null!=this.maxScale&&s>this.maxScale&&(s=this.maxScale);var n={surroundLineFlag:!1,lineColorLimit:!0,fillColorLimit:!0,lineWidthLimit:!0,lineTypeLimit:!0,fontColorLimit:!0,fontSizeLimit:!0,fillLimit:!0},a=t.getBounds();if((null==a||!a.isValid())&&null!=t.graphic&&null!=t.graphic.layer&&null!=t.graphic.getImage()){t.graphic._project();var r=t.graphic._pxBounds;null!=r&&r.isValid()&&(a.extend(this._map.layerPointToLatLng(r.min)),a.extend(this._map.layerPointToLatLng(r.max)))}if(a&&a.isValid()){for(let o=0,l=i.length;o<l;o++){this._mergeStyleToSymbolText(i[o]);var p=i[o].textContent;if(null!==p&&0!==p.length){var u=this.addFrame||i[o].border;i[o].textPosition=void 0===i[o].textPosition?0:i[o].textPosition;var h,g,c,y=0,P=0;if(u)(n=SuperMap.Plot.PlottingUtil.cloneObject(i[o].style)).fontSize*=s,y=SuperMap.Plot.PlottingUtil.getTextWidth(n,i[o].textContent)+i[o].paddingX*s*2,P=parseInt(n.fontSize)+i[o].paddingY*s*2;var S=L.point(0,0),d=L.point(0,0);switch(i[o].textPosition){case SuperMap.Plot.AnnoPosition.LEFTTOP:i[o].style.labelAlign="rb",h=L.latLng(a.getNorth(),a.getWest()),(g=this._map.latLngToLayerPoint(h)).x+=i[o].offsetX*s,g.y+=i[o].offsetY*s,!0===u&&(S.x=g.x,S.y=g.y,d.x=g.x-y,d.y=g.y-P);break;case SuperMap.Plot.AnnoPosition.LEFTBOTTOM:i[o].style.labelAlign="rt",h=L.latLng(a.getSouth(),a.getWest()),(g=this._map.latLngToLayerPoint(h)).x+=i[o].offsetX*s,g.y+=i[o].offsetY*s,!0===u&&(S.x=g.x,S.y=g.y,d.x=g.x-y,d.y=g.y+P);break;case SuperMap.Plot.AnnoPosition.RIGHTTOP:i[o].style.labelAlign="lb",h=L.latLng(a.getNorth(),a.getEast()),(g=this._map.latLngToLayerPoint(h)).x+=i[o].offsetX*s,g.y+=i[o].offsetY*s,!0===u&&(S.x=g.x,S.y=g.y,d.x=g.x+y,d.y=g.y-P);break;case SuperMap.Plot.AnnoPosition.RIGHTBOTTOM:i[o].style.labelAlign="lt",h=L.latLng(a.getSouth(),a.getEast()),(g=this._map.latLngToLayerPoint(h)).x+=i[o].offsetX*s,g.y+=i[o].offsetY*s,!0===u&&(S.x=g.x,S.y=g.y,d.x=g.x+y,d.y=g.y+P);break;case SuperMap.Plot.AnnoPosition.TOP:i[o].style.labelAlign="cb",h=L.latLng(a.getNorth(),(a.getWest()+a.getEast())/2),(g=this._map.latLngToLayerPoint(h)).x+=i[o].offsetX*s,g.y+=i[o].offsetY*s,!0===u&&(S.x=g.x-y/2,S.y=g.y,d.x=g.x+y/2,d.y=g.y-P);break;case SuperMap.Plot.AnnoPosition.BOTTOM:i[o].style.labelAlign="ct",h=L.latLng(a.getSouth(),(a.getWest()+a.getEast())/2),(g=this._map.latLngToLayerPoint(h)).x+=i[o].offsetX*s,g.y+=i[o].offsetY*s,!0===u&&(S.x=g.x-y/2,S.y=g.y,d.x=g.x+y/2,d.y=g.y+P);break;case SuperMap.Plot.AnnoPosition.LEFT:i[o].style.labelAlign="rm",h=L.latLng((a.getSouth()+a.getNorth())/2,a.getWest()),(g=this._map.latLngToLayerPoint(h)).x+=i[o].offsetX*s,g.y+=i[o].offsetY*s,!0===u&&(S.x=g.x,S.y=g.y+P/2,d.x=g.x-y,d.y=g.y-P/2);break;case SuperMap.Plot.AnnoPosition.RIGHT:i[o].style.labelAlign="lm",h=L.latLng((a.getSouth()+a.getNorth())/2,a.getEast()),(g=this._map.latLngToLayerPoint(h)).x+=i[o].offsetX*s,g.y+=i[o].offsetY*s,!0===u&&(S.x=g.x,S.y=g.y+P/2,d.x=g.x+y,d.y=g.y-P/2);break;case SuperMap.Plot.AnnoPosition.ANCHOR:i[o].style.labelAlign="lm",h=t.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL?t.latLngs[0]:a.getCenter(),(g=this._map.latLngToLayerPoint(h)).x+=i[o].offsetX*s,g.y+=i[o].offsetY*s,i[o].offsetX>0?(i[o].style.labelAlign="lm",!0===u&&(S.x=g.x,S.y=g.y+P/2,d.x=g.x+y,d.y=g.y-P/2)):(i[o].style.labelAlign="rm",!0===u&&(S.x=g.x,S.y=g.y+P/2,d.x=g.x-y,d.y=g.y-P/2))}var m=this._map.layerPointToLatLng(g);if(0!==i[o].offsetX||0!==i[o].offsetY){var f={};f.positionPoints=[m,h],f.style={},f.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,e.push(f)}var M=SuperMap.Util.copyAttributes(n,this.symbolTexts[o].style);if(u){var b=this._map.layerPointToLatLng(S),A=this._map.layerPointToLatLng(d),T={};T.positionPoints=[b,A],T.style=SuperMap.Util.cloneObject(M),T.type=SuperMap.Plot.SymbolType.RECTANGLESYMBOL,e.push(T),c=L.latLng((A.lat-b.lat)/2+b.lat,(b.lng-A.lng)/2+A.lng)}else c=m;var v={};v.positionPoints=c,v.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,v.style=SuperMap.Util.cloneObject(M),v.textContent=i[o].textContent,u&&(v.style.labelAlign="cm"),e.push(v),this.latLngs.push(m)}}for(var _,x=0;x<e.length;x++)_=L.Util.isArray(e[x].positionPoints)?e[x].positionPoints:[e[x].positionPoints],this._createAndDrawLayer(e[x].type,_,e[x].style,e[x].textContent)}}}},_calculatePositionPoints:function(){this.latLngs=[];var t=this.symbolTexts;if(t.length>0){var e=this._map.getFeatureByUuid(this.associatedUuid);if(null===e||void 0===e)return;var i=e.getBounds();if((null==i||!i.isValid())&&null!=e.graphic&&null!=e.graphic.layer&&null!=e.graphic.getImage()){e.graphic._project();var o=e.graphic._pxBounds;null!=o&&o.isValid()&&(i.extend(this._map.layerPointToLatLng(o.min)),i.extend(this._map.layerPointToLatLng(o.max)))}if(!i||!i.isValid())return;for(let o=0,a=t.length;o<a;o++){var l=t[o].textContent;if(null!==l&&0!==l.length){var s;switch(t[o].textPosition=void 0===t[o].textPosition?0:t[o].textPosition,t[o].textPosition){case SuperMap.Plot.AnnoPosition.LEFTTOP:s=L.latLng(i.getNorth(),i.getWest());break;case SuperMap.Plot.AnnoPosition.LEFTBOTTOM:s=L.latLng(i.getSouth(),i.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHTTOP:s=L.latLng(i.getNorth(),i.getEast());break;case SuperMap.Plot.AnnoPosition.RIGHTBOTTOM:s=L.latLng(i.getSouth(),i.getEast());break;case SuperMap.Plot.AnnoPosition.TOP:s=L.latLng(i.getNorth(),(i.getWest()+i.getEast())/2);break;case SuperMap.Plot.AnnoPosition.BOTTOM:s=L.latLng(i.getSouth(),(i.getWest()+i.getEast())/2);break;case SuperMap.Plot.AnnoPosition.LEFT:s=L.latLng((i.getSouth()+i.getNorth())/2,i.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHT:s=L.latLng((i.getSouth()+i.getNorth())/2,i.getEast());break;case SuperMap.Plot.AnnoPosition.ANCHOR:t[o].style.labelAlign="lm",s=e.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL?e.latLngs[0]:i.getCenter()}var n=this._map.latLngToLayerPoint(s);n.x+=t[o].offsetX,n.y+=t[o].offsetY,this.latLngs.push(this._map.layerPointToLatLng(n))}}}},destroy:function(){this.frame=!1,this.symbolTexts=null,T.prototype.destroy.call(this)},_mergeStyleToSymbolText:function(t){if(null!==this.components)for(var e in null!==t.style&&void 0!==t.style||(t.style={}),this.style)Object.prototype.hasOwnProperty.call(t.style,e)||(t.style[e]=this.style[e])},_modifyPoint:function(t,e){this._calculateOffset(t,e),this.redraw()},_calculateOffset:function(t,e){if(t<this.symbolTexts.length){var i=this.symbolTexts[t].textPosition,o=this._map.latLngToLayerPoint(e),l=this._map.getFeatureByUuid(this.associatedUuid);if(null===l||void 0===l)return;var s=l.getBounds();if((null==s||!s.isValid())&&null!=l.graphic&&null!=l.graphic.layer&&null!=l.graphic.getImage()){l.graphic._project();var n=l.graphic._pxBounds;null!=n&&n.isValid()&&(s.extend(this._map.layerPointToLatLng(n.min)),s.extend(this._map.layerPointToLatLng(n.max)))}if(!s||!s.isValid())return;var a,r,p=1;"function"==typeof this.layer.getSymZoomScale&&(p=this.layer.getSymZoomScale()),null!=this.minScale&&p<this.minScale?p=this.minScale:null!=this.maxScale&&p>this.maxScale&&(p=this.maxScale),0===i?(a=L.latLng(s.getNorth(),s.getWest()),r=this._map.latLngToLayerPoint(a),this.symbolTexts[t].offsetX=(o.x-r.x)/p,this.symbolTexts[t].offsetY=(o.y-r.y)/p):1===i?(a=L.latLng(s.getSouth(),s.getWest()),r=this._map.latLngToLayerPoint(a),this.symbolTexts[t].offsetX=(o.x-r.x)/p,this.symbolTexts[t].offsetY=(o.y-r.y)/p):2===i?(a=L.latLng(s.getNorth(),s.getEast()),r=this._map.latLngToLayerPoint(a),this.symbolTexts[t].offsetX=(o.x-r.x)/p,this.symbolTexts[t].offsetY=(o.y-r.y)/p):3===i?(a=L.latLng(s.getSouth(),s.getEast()),r=this._map.latLngToLayerPoint(a),this.symbolTexts[t].offsetX=(o.x-r.x)/p,this.symbolTexts[t].offsetY=(o.y-r.y)/p):4===i?(a=L.latLng(s.getNorth(),(s.getWest()+s.getEast())/2),r=this._map.latLngToLayerPoint(a),this.symbolTexts[t].offsetX=(o.x-r.x)/p,this.symbolTexts[t].offsetY=(o.y-r.y)/p):5===i?(a=L.latLng(s.getSouth(),(s.getWest()+s.getEast())/2),r=this._map.latLngToLayerPoint(a),this.symbolTexts[t].offsetX=(o.x-r.x)/p,this.symbolTexts[t].offsetY=(o.y-r.y)/p):6===i?(a=L.latLng((s.getNorth()+s.getSouth())/2,s.getWest()),r=this._map.latLngToLayerPoint(a),this.symbolTexts[t].offsetX=(o.x-r.x)/p,this.symbolTexts[t].offsetY=(o.y-r.y)/p):7===i?(a=L.latLng((s.getNorth()+s.getSouth())/2,s.getEast()),r=this._map.latLngToLayerPoint(a),this.symbolTexts[t].offsetX=(o.x-r.x)/p,this.symbolTexts[t].offsetY=(o.y-r.y)/p):i===SuperMap.Plot.AnnoPosition.ANCHOR&&(a=l.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL?l.latLngs[0]:s.getCenter(),r=this._map.latLngToLayerPoint(a),this.symbolTexts[t].offsetX=(o.x-r.x)/p,this.symbolTexts[t].offsetY=(o.y-r.y)/p)}},_reView:function(){this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},move:function(){},_parseSymbolData:function(){if(T.prototype._parseSymbolData.call(this),this.symbolData){this.addFrame=this.symbolData.addFrame,this.symbolTexts=[];for(var t=0,e=this.symbolData.symbolTexts.length;t<e;t++){var i=new SuperMap.Plot.GeoSymbolText;i.textContent=this.symbolData.symbolTexts[t].textContent,i.textPosition=this.symbolData.symbolTexts[t].textPosition,i.style=this.symbolData.symbolTexts[t].style,i.offsetX=this.symbolData.symbolTexts[t].offsetX,i.offsetY=this.symbolData.symbolTexts[t].offsetY,this.symbolTexts.push(i)}}},_setSymbolData:function(){T.prototype._setSymbolData.call(this),this.symbolData&&(this.symbolData.symbolTexts=this.symbolTexts,this.symbolData.addFrame=this.addFrame)},setStyle:function(t){if(t.fontSize&&this.style.fontSize!==t.fontSize||this.style.display!==t.display&&t.display){SuperMap.Util.extend(this.style,t);for(var e=0,i=this.symbolTexts.length;e<i;e++)SuperMap.Util.copyAttributes(this.symbolTexts[e].style,t);this.redraw()}else{SuperMap.Util.extend(this.style,t);for(var o=0;o<this.symbolTexts.length;o++)SuperMap.Util.copyAttributes(this.symbolTexts[o].style,t);for(var l in this.components)delete t.labelAlign,SuperMap.Util.copyAttributes(this.components[l].options,t),this._copyStyleForCell(this.components[l].options,this.style,this.components[l]),this.components[l].setStyle(this.components[l].options)}}});L.supermap.plotting.symbolText=function(t,e,i,o){return new bt(t,e,i,o)},L.supermap.plotting.SymbolText=bt;var At=T.extend({space:null,offsetX:null,offsetY:null,initialize:function(t,e,i,o){this.minEditPts=1,this.maxEditPts=1,this.libID=0,this.code=SuperMap.Plot.SymbolType.SYMBOLTEXT1,this.symbolType=SuperMap.Plot.SymbolType.SYMBOLTEXT1,this.symbolName="对象标注(带指示线)",null===this.space&&(this.space=10),null===this.offsetX&&(this.offsetX=60),null===this.offsetY&&(this.offsetY=30),T.prototype.initialize.call(this,t,e,i,o),this.scaleByMap=!0,this.style.sizeFixed=!1},destroy:function(){this.space=null,this.offsetX=null,this.offsetY=null,T.prototype.destroy.call(this)},removeSymbolTextsFromDotSymbol:function(t){if(t&&"string"==typeof t){var e=this._map.getFeatureByUuid(t);if(e)for(var i=0,o=e.geoSymbolTexts.length;i<o;i++)if(this===e.geoSymbolTexts[i]){e.geoSymbolTexts.splice(i,1);break}}},_calculateParts:function(){if("none"!==this.style.display&&(null==this.layer||"function"!=typeof this.layer.getVisibility||!1!==this.layer.getVisibility())){var t=this._map.getFeatureByUuid(this.associatedUuid);if(null!=t&&"none"!==t.style.display){this.latLngs=[];var e=[],i=!1;for(let e=0;e<t.geoSymbolTexts.length;e++)if(this===t.geoSymbolTexts[e]){i=!0;break}i||t.geoSymbolTexts.push(this),null==this.minScale&&(this.minScale=t.minScale),null==this.maxScale&&(this.maxScale=t.maxScale);var o=1;"function"==typeof this.layer.getSymZoomScale&&(o=this.layer.getSymZoomScale()),null!=this.minScale&&o<this.minScale?o=this.minScale:null!=this.maxScale&&o>this.maxScale&&(o=this.maxScale);var l=t.latLngs[0],s=this._map.latLngToLayerPoint(l),n=new SuperMap.Pixel(s.x+this.offsetX*o,s.y+this.offsetY*o),a=this._map.layerPointToLatLng(n);0===this.latLngs.length?this.latLngs.push(a):(this.latLngs[0].lng=a.lng,this.latLngs[0].lat=a.lat);var r=L.Util.cloneLatLngs(this.latLngs[0]);r.push(l);var p={style:{surroundLineFlag:!1}};p.style=SuperMap.Util.copyAttributes(p.style,this.style),p.positionPoints=r,p.type=24,e.push(p),SuperMap.Util.isArray(this.textContent)||(this.textContent=[this.textContent]);var u=this.textContent.length,h=this.style.fontSize*u*o+u+1,g=this._map.latLngToLayerPoint(L.latLng(this.latLngs[0].lat,this.latLngs[0].lng)),c=L.point(g.x,g.y-h/2),y=L.point(g.x,g.y+h/2),P=[this._map.layerPointToLatLng(c),this._map.layerPointToLatLng(y)],S={};S.positionPoints=P,S.style={surroundLineFlag:!1},S.style=SuperMap.Util.copyAttributes(S.style,this.style),S.type=24,e.push(S);var d,m=new SuperMap.Geometry.Point(this.latLngs[0].lng,this.latLngs[0].lat);if(0!==this.textContent.length){var f=t.getBounds(),M=new SuperMap.Geometry.Point((f.getWest()+f.getEast())/2,f.getNorth()),b=new SuperMap.Geometry.Point((f.getWest()+f.getEast())/2,f.getSouth()),A=SuperMap.Plot.PlottingUtil.pointIsRightToLine(M,b,m),T="";for(let t=0;t<this.textContent.length;t++)T+=this.textContent[t],t!==this.textContent.length-1&&(T+="\r\n");var v=null;v=!0===A?L.point(g.x-this.space,g.y):L.point(g.x+this.space,g.y);var _={},x=this._map.layerPointToLatLng(v);_.positionPoints=x,_.type=34,_.textContent=T,_.style={},_.style=SuperMap.Util.copyAttributes(_.style,this.style),Object.prototype.hasOwnProperty.call(_.style,"sizeFixed")&&delete _.style.sizeFixed,_.style.labelAlign=!0===A?"rm":"lm",e.push(_)}for(let t=0;t<e.length;t++)d=L.Util.isArray(e[t].positionPoints)?e[t].positionPoints:[e[t].positionPoints],this._createAndDrawLayer(e[t].type,d,e[t].style,e[t].textContent)}}},_calculateSize:function(t){this.scaleByMap=t.scaleByMap,!1===this.scaleByMap||!0===this.style.sizeFixed?this.fromZoom=this._map.getZoom():this.fromZoom<=this._map.getZoom()&&(this.dScale=scale),void 0!==this.prevOffsetX&&this.prevOffsetX!==this.offsetX&&(this.scaleBeforeOffsetX=this.offsetX/scale,this.prevOffsetX=this.offsetX),!0===this.scaleByMap&&(void 0===this.scaleBeforeOffsetX&&(this.scaleBeforeOffsetX=this.offsetX),this.offsetX=this.scaleBeforeOffsetX*scale,this.prevOffsetX=this.offsetX),void 0!==this.prevOffsetY&&this.prevOffsetY!==this.offsetY&&(this.scaleBeforeOffsetY=this.offsetY/scale,this.prevOffsetY=this.offsetY),!0===this.scaleByMap&&(void 0===this.scaleBeforeOffsetY&&(this.scaleBeforeOffsetY=this.offsetY),this.offsetY=this.scaleBeforeOffsetY*scale,this.prevOffsetY=this.offsetY),void 0!==this.prevStrokeWidth&&this.prevStrokeWidth!==this.style.weight&&(this.strokeWidth=this.style.weight,this.prevStrokeWidth=this.style.weight),!0===this.scaleByMap&&(void 0===this.weight&&(this.weight=this.style.weight),this.fromZoom<=this._map.getZoom()?this.style.weight=t.style.weight:this.style.weight=this.weight,this.prevStrokeWidth=this.style.weight),void 0!==this.prevFontSize&&this.prevFontSize!==this.style.fontSize&&(this.fontSize=this.style.fontSize/scale,this.prevFontSize=this.style.fontSize),!0===this.scaleByMap&&(void 0===this.fontSize&&(this.fontSize=this.style.fontSize),this.style.fontSize=this.fontSize,this.prevFontSize=this.style.fontSize)},_reView:function(){this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},_modifyPoint:function(){var t=this._map.getFeatureByUuid(this.associatedUuid);if(null!==t){var e=this._map.latLngToLayerPoint(L.latLng(t.latLngs[0].lat,t.latLngs[0].lng)),i=this._map.latLngToLayerPoint(L.latLng(this.latLngs[0].lat,this.latLngs[0].lng)),o=1;"function"==typeof this.layer.getSymZoomScale&&(o=this.layer.getSymZoomScale()),null!=this.minScale&&o<this.minScale?o=this.minScale:null!=this.maxScale&&o>this.maxScale&&(o=this.maxScale),this.offsetX=(i.x-e.x)/o,this.offsetY=(i.y-e.y)/o,this.redraw()}},_parseSymbolData:function(){T.prototype._parseSymbolData.call(this),this.symbolData&&(void 0!==this.symbolData.space&&(this.space=this.symbolData.space),void 0!==this.symbolData.offsetX&&(this.offsetX=this.symbolData.offsetX),void 0!==this.symbolData.offsetY&&(this.offsetY=this.symbolData.offsetY),void 0!==this.symbolData.scaleBeforeOffsetX&&(this.scaleBeforeOffsetX=this.symbolData.scaleBeforeOffsetX),void 0!==this.symbolData.scaleBeforeOffsetY&&(this.scaleBeforeOffsetY=this.symbolData.scaleBeforeOffsetY))},_setSymbolData:function(){T.prototype._setSymbolData.call(this),this.symbolData&&(this.symbolData.space=this.space,this.symbolData.offsetX=this.offsetX,this.symbolData.offsetY=this.offsetY,void 0!==this.scaleBeforeOffsetX&&(this.symbolData.scaleBeforeOffsetX=this.scaleBeforeOffsetX),void 0!==this.scaleBeforeOffsetY&&(this.symbolData.scaleBeforeOffsetY=this.scaleBeforeOffsetY))}});L.supermap.plotting.symbolText1=function(t,e,i,o){return new At(t,e,i,o)},L.supermap.plotting.SymbolText1=At;var Tt=L.Path.extend({name:"图元层",serverUrl:null,features:null,visibility:!0,symScaleDefinition:null,enableSymScale:null,options:{serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},getVisibility:function(){return this.visibility},setVisibility:function(t){if(this.visibility!==t){this.visibility=t;for(let t=0;t<this.features.length;t++)if(this.features[t].redraw(),this._map&&this._map.getPlotEditControl()){if(Object.prototype.hasOwnProperty.call(this._map.getPlotEditControl()._editMarkers,this.features[t].uuid)){let e=this._map.getPlotEditControl()._editMarkers[this.features[t].uuid];for(let t in e)this.visibility?e[t].setOpacity(1):e[t].setOpacity(0)}null!=this.features[t].dragging&&null!=this.features[t].dragging.moveMarker&&(this.visibility?this.features[t].dragging.moveMarker.setOpacity(1):this.features[t].dragging.moveMarker.setOpacity(0))}}},enableSymScaleDefinition:function(t){this.enableSymScale=t},getSymScaleDefinition:function(){return null==this.symScaleDefinition&&!0===this.enableSymScale&&(this.symScaleDefinition=L.supermap.plotting.getControl().getPlotMapManager().getSymScaleDefinition()),this.symScaleDefinition},setSymScaleDefinition:function(t,e){let i=this.symScaleDefinition;this.symScaleDefinition=t;for(var o=0;o<this.features.length;o++)this.features[o].redraw();if(0!==this.symScaleDefinition&&0!==i&&!e){var l=this.symScaleDefinition/i;for(o=0;o<this.features.length;o++)if(this.features[o]instanceof lt){l<this.features[o].minScale?l=this.features[o].minScale:l>this.features[o].maxScale&&(l=this.features[o].maxScale);var s=this.features[o].getSymbolSize().w*l,n=this.features[o].getSymbolSize().h*l;this.features[o].setSymbolSize(s,n)}}},initialize:function(t,e,i){i=i||{},L.setOptions(this,i),this.name=t,this.serverUrl=e,this.features=[],this.enableSymScale=!0},destroy:function(){this.name="",this.serverUrl=null,this.features=null},beforeAdd:function(t){L.Path.prototype.beforeAdd.call(this,t)},onAdd:function(t){L.Path.prototype.onAdd.call(this,t),this._map=t;var e=this;null==tt.prototype.map&&(tt.prototype.map=t),e instanceof Ct&&(L.supermap.plotting.getControl().getPlotMapManager().addPlottingLayer(e),e.getSymScaleDefinition()),this._map.on("zoomend",function(){var t=tt.prototype.getLayerScale();if("function"==typeof e.getMinVisibleScale&&e.getMinVisibleScale()>0&&t<e.getMinVisibleScale()||"function"==typeof e.getMaxVisibleScale&&e.getMaxVisibleScale()>0&&t>e.getMaxVisibleScale())for(let t=0;t<e.features.length;t++)null!=e.features[t].components&&e.features[t].components.length>0&&(e.features[t].redraw(),e.features[t].fromZoom=e._map.getZoom());else for(let t=0;t<e.features.length;t++)null!=e.features[t].components&&0===e.features[t].components.length?(e.features[t].redraw(),e.features[t].fromZoom=e._map.getZoom()):e.features[t]._reView()})},onRemove:function(){L.Path.prototype.onRemove.call(this),this.removeAllFeatures(),L.supermap.plotting.getControl().getPlotMapManager().removePlottingLayer(this)},addFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]);for(let e=0;e<t.length;)t[e]instanceof d||t[e]instanceof ut?(this.features.push(t[e]),t[e].onAdd(this),e++):t.splice(e,1)},removeFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]);for(let o=0,l=t.length;o<l;o++){var e=t[o];if(-1!=SuperMap.Util.indexOf(this.features,e)&&(e instanceof d||t[o]instanceof ut)){(e instanceof m||e instanceof yt)&&this._map&&this._map.getPlotEditControl()&&(this._map.getPlotEditControl().unselectFeatures(e.components),this._map.getPlotEditControl().disableEditFeatures(e.components)),this._map&&this._map.getPlotEditControl()&&(this._map.getPlotEditControl().unselectFeatures(e),this._map.getPlotEditControl().disableEditFeatures(e)),e.symbolType===SuperMap.Plot.SymbolType.ROUTENODE&&e.route&&e.route.deleteRouteNode(e.routeNode),e.symbolType!==SuperMap.Plot.SymbolType.SYMBOLTEXT&&e.symbolType!==SuperMap.Plot.SymbolType.SYMBOLTEXT1||e.removeSymbolTextsFromDotSymbol(e.associatedUuid),e.symbolType===SuperMap.Plot.SymbolType.LINERELATION&&(e.startAssociatedUuid&&e.removeJoinLineFromDotSymbol(e.startAssociatedUuid),e.endAssociatedUuid&&e.removeJoinLineFromDotSymbol(e.endAssociatedUuid)),e.ownerGroup?(e.ownerGroup.removeComponents(),this.removeFeatures(e)):(e._clearComponents(),e.geoSymbolTexts&&e.geoSymbolTexts.length>0&&this.removeFeatures(e.geoSymbolTexts));var i=SuperMap.Util.indexOf(this.features,e);-1!==i&&this.features.splice(i,1),e.layer=null}}this._update()},getFeatures:function(){return this.features.slice()},removeAllFeatures:function(){this.removeFeatures(this.features.slice()),this.features=[]},getSymZoomScale:function(t){return null==this.getSymScaleDefinition()||!0!==this.enableSymScale?1:L.supermap.plotting.getControl().getPlotMapManager().getLayerScale(t)/this.getSymScaleDefinition()},_getSymbolDataFromCache:function(t,e){var i=L.supermap.plotting.getControl(this._map,this.serverUrl,{serviceParams:this.options.serviceParams}).getSymbolLibManager().getSymbolLibByLibId(t);return null!==i?i.getSymbolData(e):null},_cacheSymbolData:function(t){var e=L.supermap.plotting.getControl(this._map,this.serverUrl,{serviceParams:this.options.serviceParams}).getSymbolLibManager().getSymbolLibByLibId(t.libID);null!==e&&e.cacheSymbolData(t)},_setCursorStyle:function(t){void 0===t&&(t="");var e=!1;if(this._map.getPlottingLayers().length>1){var i=this._map.getPlottingLayers();for(var o in i)if(i[o]._renderer instanceof L.Canvas)i[o]._renderer._container.style.cursor=t;else if(i[o]._renderer instanceof L.SVG)for(let e=0;e<i[o]._renderer._rootGroup.childNodes.length;e++)i[o]._renderer._rootGroup.childNodes[e].style.cursor=t;e=!0}if(!e)if(this._renderer instanceof L.Canvas)this._renderer._container.style.cursor=t;else if(this._renderer instanceof L.SVG&&!L.Browser.ie){for(let e=0;e<this._renderer._rootGroup.childNodes.length;e++)this._renderer._rootGroup.childNodes[e].style.cursor=t;this._map._panes.overlayPane.style.cursor=t,this._map._panes.overlayPane.style.width=this._renderer._svgSize.x+"px",this._map._panes.overlayPane.style.height=this._renderer._svgSize.y+"px"}},_update:function(){this._map&&this._updatePath()},_containsPoint:function(){return!1},_updatePath:function(){this._renderer._drawPlottingLayers(this._getLayersInBounds())},_project:function(){var t=this;t._pxBounds=L.bounds(L.point(0,0),L.point(0,0)),t._getLayersInBounds().map(function(e){return e._project(),t._pxBounds.extend(e._pxBounds.min),t._pxBounds.extend(e._pxBounds.max),e})},_getLayersInBounds:function(){var t=[],e=this._map.getBounds();return this.features.map(function(i){var o=i.getBounds();return o.isValid()&&e.contains(o)&&t.push(i),i}),t},bringToBack:function(){return L.Path.prototype.beforeAdd.call(this),this._map&&(L.DomUtil.toBack(this._getContainer()),this._setAutoZIndex(Math.max)),this},bringToFront:function(){return L.Path.prototype.bringToFront.call(this),this._map&&(L.DomUtil.toFront(this._getContainer()),this._setAutoZIndex(Math.min)),this},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,o=-t(-1/0,1/0),l=0,s=i.length;l<s;l++)e=i[l].style.zIndex,i[l]!==this._container&&e&&(o=t(o,+e));isFinite(o)&&(this.options.zIndex=o+t(-1,1),this._updateZIndex())},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_getContainer:function(){return this._renderer._container}}),vt=Tt.extend({layer:null,initialize:function(t,e,i){Tt.prototype.initialize.call(this,t,e,i),this.symScaleDefinition=1,i&&i.layer&&(this.layer=i.layer)},addFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]),0!==t.length&&(Tt.prototype.addFeatures.call(this,t),this._map.getPlotEditControl()&&this.isSelected&&this._map.getPlotEditControl().enableEditFeatures(t))},removeFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]);for(let o=0,l=t.length;o<l;o++){var e=t[o];if(-1!=SuperMap.Util.indexOf(this.features,e)){this._map&&this._map.getPlotEditControl()&&(this._map.getPlotEditControl().unselectFeatures(e),this._map.getPlotEditControl().disableEditFeatures(e)),e._clearComponents();var i=SuperMap.Util.indexOf(this.features,e);-1!==i&&this.features.splice(i,1),e.layer=null}}this._update()}}),_t=L.Path.extend({serverUrl:null,features:null,isLocked:!1,isEditable:!0,isSelected:!0,visibility:!0,minVisibleScale:0,maxVisibleScale:0,markerMinVisibleScale:0,markerMaxVisibleScale:0,tolerancePixel:5,cacheImages:null,_editLayer:null,_vectorRenderer:null,_detectionRangeCombinations:{},options:{zIndex:300,vectorZIndex:200},getSelected:function(){return this.isSelected},setSelected:function(t){this.isSelected!==t&&(this.isSelected=t,!1===this.isSelected&&this.selectedFeatures.length>0&&(this._map&&this._map.getPlotEditControl()&&!0===this.isEditable&&!1===this.isLocked&&(this._editLayer.removeFeatures(this.selectedFeatures),this.addFeatures(this.selectedFeatures)),this.fire(SuperMap.Plot.Event.movingtargetsunselected,{features:this.selectedFeatures}),this.selectedFeatures.length=0))},getEditable:function(){return this.isEditable},setEditable:function(t){this.isEditable!==t&&(this.isEditable=t,!1===this.isEditable&&!1===this.isLocked&&this.selectedFeatures.length>0&&this._map&&this._map.getPlotEditControl()&&(this._editLayer.removeFeatures(this.selectedFeatures),this.addFeatures(this.selectedFeatures)))},getLocked:function(){return this.isLocked},setLocked:function(t){this.isLocked!==t&&(this.isLocked=t,!0===this.isEditable&&!0===this.isLocked&&this.selectedFeatures.length>0&&this._map&&this._map.getPlotEditControl()&&(this._editLayer.removeFeatures(this.selectedFeatures),this.addFeatures(this.selectedFeatures)))},getVisibility:function(){return this.visibility},setVisibility:function(t){this.visibility!==t&&(this.visibility=t,this.visibility?(this._renderer._container.style.visibility="visible",this._vectorRenderer._container.style.visibility="visible"):(this._renderer._container.style.visibility="hidden",this._vectorRenderer._container.style.visibility="hidden"),this._editLayer.setVisibility(this.visibility))},getMinVisibleScale:function(){return null==this.minVisibleScale&&(this.minVisibleScale=0),this.minVisibleScale},setMinVisibleScale:function(t){this.minVisibleScale=t,this.maxVisibleScale>1e-7&&this.maxVisibleScale<t&&(this.minVisibleScale=this.maxVisibleScale)},getMaxVisibleScale:function(){return null==this.maxVisibleScale&&(this.maxVisibleScale=1),this.maxVisibleScale},setMaxVisibleScale:function(t){this.maxVisibleScale=t,this.maxVisibleScale>1e-7&&this.maxVisibleScale<t&&(this.maxVisibleScale=this.minVisibleScale)},clearVisibleScale:function(){this.minVisibleScale=0,this.maxVisibleScale=0},composeDetectionRange:function(t,e,i){if(SuperMap.Util.isArray(t)||(t=[t]),0!==this.features.length){for(var o=t.slice(),l=0;l<o.length;)-1!=L.Util.indexOf(this.features,o[l])?(o[l].composeDetectionRange=e,l++):o.splice(0,1);var s={display:"display",color:"#ff0000",opacity:1,weight:1,fill:!0,fillColor:"#ff0000",fillOpacity:.5};s=SuperMap.Plot.PlottingUtil.copyAttributes(s,i),this._detectionRangeCombinations[e]={features:o,style:s}}},decomposeDetectionRange:function(t){if(Object.prototype.hasOwnProperty.call(this._detectionRangeCombinations,t)){for(var e=0;e<this._detectionRangeCombinations[t].features.length;e++)this._detectionRangeCombinations[t].features[e].composeDetectionRange=null;if(null!=this._detectionRangeCombinations[t].detectionRanges&&this._detectionRangeCombinations[t].detectionRanges.length>0){for(e=0;e<this._detectionRangeCombinations[t].detectionRanges.length;e++)this._removeDetectionRange(this._detectionRangeCombinations[t].detectionRanges[e]),delete this._detectionRangeCombinations[t].detectionRanges[e],this._detectionRangeCombinations[t].detectionRanges[e]=null;this._detectionRangeCombinations[t].detectionRanges.length=0}}delete this._detectionRangeCombinations[t]},getMarkerMinVisibleScale:function(){return null==this.markerMinVisibleScale&&(this.markerMinVisibleScale=0),this.markerMinVisibleScale},setMarkerMinVisibleScale:function(t){this.markerMinVisibleScale=t,this.markerMaxVisibleScale>1e-7&&this.markerMaxVisibleScale<t&&(this.markerMinVisibleScale=this.markerMaxVisibleScale)},getMarkerMaxVisibleScale:function(){return null==this.markerMaxVisibleScale&&(this.markerMaxVisibleScale=0),this.markerMaxVisibleScale},setMarkerMaxVisibleScale:function(t){this.markerMaxVisibleScale=t,this.markerMinVisibleScale>1e-7&&this.markerMinVisibleScale>t&&(this.markerMaxVisibleScale=this.markerMinVisibleScale)},clearMarkerVisibleScale:function(){this.markerMinVisibleScale=0,this.markerMaxVisibleScale=0},setGraphicZIndex:function(t){this.options.zIndex=t,this._renderer._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._renderer._container.style.zIndex=this.options.zIndex)},setVectorZIndex:function(t){this.options.vectorZIndex=t,this._vectorRenderer._container&&void 0!==this.options.vectorZIndex&&null!==this.options.vectorZIndex&&(this._vectorRenderer._container.style.zIndex=this.options.vectorZIndex)},initialize:function(t,e,i){this._editLayer=new vt(t+"_temportary",e,{layer:this}),i=i||{},L.Util.setOptions(this,i),this.cacheImages={},this.selectedFeatures=[],this.name=t,this.serverUrl=e,this.features=[],this._graphics=[],this._vectors=[]},getSymZoomScale:function(t){return 1},getEvents:function(){var t={click:this._handleClick,mousemove:this._onMapMouseMove,contextmenu:this._handleContextmenu};return this._map._zoomAnimated&&(t.zoomanim=this._zoomAnim),t},_zoomAnim:function(t){},_onMapMouseMove:function(t){var e=this._getGraphicsInBounds();if(0!==e.length)for(let i=0,o=e.length;i<o;i++){if(e[i]._containsPoint(this._map.latLngToLayerPoint(t.latlng))){this._renderer._container.style.cursor=e[i].feature.isSelected?"move":"pointer";break}this._renderer._container.style.cursor=""}var i=this._getLayersInBounds();if(0!==i.length)for(let e=0,s=i.length;e<s;e++){var o=!1;for(var l in i[e].components)if(i[e].components[l]._containsPoint(this._map.latLngToLayerPoint(t.latlng))){o=!0;break}if(o){this._vectorRenderer._container.style.cursor=i[e].isSelected?"move":"pointer";break}this._vectorRenderer._container.style.cursor=""}},supportTypes:function(t,e){return t===SuperMap.Plot.SymbolType.DOTSYMBOL||t===SuperMap.Plot.SymbolType.PICTURE||t===SuperMap.Plot.SymbolType.SYMBOLTEXT||t===SuperMap.Plot.SymbolType.SYMBOLTEXT1||t===SuperMap.Plot.SymbolType.LINERELATION||t===SuperMap.Plot.SymbolType.ALGOSYMBOL||null!=e&&0===e},isGraphic:function(t){return t===SuperMap.Plot.SymbolType.DOTSYMBOL||t===SuperMap.Plot.SymbolType.PICTURE||t===SuperMap.Plot.SymbolType.SYMBOLTEXT||t===SuperMap.Plot.SymbolType.SYMBOLTEXT1||t===SuperMap.Plot.SymbolType.TEXTSYMBOL},isVector:function(t,e){return t===SuperMap.Plot.SymbolType.LINERELATION||t===SuperMap.Plot.SymbolType.ALGOSYMBOL||null!=e&&0===e&&t!=SuperMap.Plot.SymbolType.TEXTSYMBOL},getFeatureByUuid:function(t){for(var e=0;e<this.features.length;e++)if(this.features[e].uuid===t)return this.features[e];return null},getFeatures:function(){return this.features.slice()},addFeatures:function(t){L.Util.isArray(t)||(t=[t]);for(let o=0,l=t.length;o<l;o++){var e=t[o];if(this.supportTypes(e.symbolType,e.libID))if(null!=this._map.getFeatureByUuid(e.uuid)&&(e.uuid=SuperMap.Plot.PlottingUtil.generateUuid()),this.features.push(e),this.isGraphic(e.symbolType)){var i=new xt(e);i.onAdd(this),this._graphics.push(i)}else e.onAdd(this),this._vectors.push(e)}this._update()},removeFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]);var e=[];for(let i=0,o=t.length;i<o;i++){let o=t[i];-1!=SuperMap.Util.indexOf(this.features,o)&&e.push(o)}this.fire(SuperMap.Plot.Event.beforefeaturesremoved,{features:e});for(let t=0,i=e.length;t<i;t++){let i=e[t],o=SuperMap.Util.indexOf(this.selectedFeatures,i);if(-1!==o&&(this._editLayer.removeFeatures(i),this.selectedFeatures.splice(o,1)),this._map&&this._map.getPlotEditControl()&&(this._map.getPlotEditControl().unselectFeatures(i),this._map.getPlotEditControl().disableEditFeatures(i)),i.symbolType!==SuperMap.Plot.SymbolType.SYMBOLTEXT&&i.symbolType!==SuperMap.Plot.SymbolType.SYMBOLTEXT1||i.removeSymbolTextsFromDotSymbol(i.associatedUuid),i.symbolType===SuperMap.Plot.SymbolType.LINERELATION&&(i.startAssociatedUuid&&i.removeJoinLineFromDotSymbol(i.startAssociatedUuid),i.endAssociatedUuid&&i.removeJoinLineFromDotSymbol(i.endAssociatedUuid)),null!=i.graphic&&i.graphic.layer===this){let t=i.graphic.getUuid();this.cacheImages[t]&&0==--this.cacheImages[t].imgCount&&delete this.cacheImages[t],-1!==(o=SuperMap.Util.indexOf(this._graphics,i.graphic))&&this._graphics.splice(o,1),i.graphic.onRemove()}else i._clearComponents();-1!==(o=SuperMap.Util.indexOf(this.features,i))&&this.features.splice(o,1),-1!==(o=SuperMap.Util.indexOf(this._vectors,i))&&this._vectors.splice(o,1)}this._update(),this.fire(SuperMap.Plot.Event.featuresremoved,{features:e,layername:this.name})},removeAllFeatures:function(){this.fire(SuperMap.Plot.Event.beforefeaturesremoved,{features:this.features}),this.removeFeatures(this.features.slice()),this.fire(SuperMap.Plot.Event.featuresremoved,{features:this.features,layername:this.name})},geoJsonToFeature:function(t,e){var i=this;i._editLayer.geoJsonToFeature(t,function(t){i._editLayer.removeFeatures(t.feature),i.addFeatures(t.feature),"function"==typeof e&&e({feature:t.feature})})},createSymbol:function(t,e,i,o,l,s,n,a){var r;if(s||(s={}),s.uuid=o,s.serverUrl=this.serverUrl,s.serviceParams=this.options.serviceParams,void 0!==s.symbolData&&null!==s.symbolData||!SuperMap.Plot.AlgoSymbolFactory.isAccessServer(t,e))if((r=L.supermap.plotting.PlottingObject.createSymbol(t,e,i,s,l,a)).subSymbols&&0!==r.subSymbols.length&&!SuperMap.Plot.AlgoSymbolFactory.isAccessServer(t,e)){for(var p=[],u=0,h=r.subSymbols.length;u<h;u++)null===r.subSymbols[u].symbolData&&(r.subSymbols[u].symbolData=this._getSymbolDataFromCache(r.subSymbols[u].libID,r.subSymbols[u].code),null===r.subSymbols[u].symbolData&&-1===SuperMap.Util.indexOf(p,r.subSymbols[u])&&p.push(r.subSymbols[u]));for(var g=p.slice(),c=0;c<p.length;c++){let t=new SuperMap.GetSymbolInfoParameters({libID:p[c].libID,code:p[c].code});L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(t,function(t){this._cacheSymbolData(t.result);for(var e=0,i=r.subSymbols.length;e<i;e++)if(null===r.subSymbols[e].symbolData&&r.subSymbols[e].libID===t.result.libID&&r.subSymbols[e].code===t.result.code){var o=SuperMap.Util.indexOf(g,r.subSymbols[e]);-1!==o&&g.splice(o,1),r.subSymbols[e].symbolData=SuperMap.Plot.PlottingUtil.cloneObject(t.result),0===g.length&&(r.isEdit=!1,this.addFeatures(r),"function"==typeof n&&n({feature:r}))}},this)}if(0===p.length)return this.addFeatures(r),"function"==typeof n&&n({feature:r}),r}else{if(!SuperMap.Plot.AlgoSymbolFactory.isAccessServer(t,e)||r.symbolData.innerCells)return this.addFeatures(r),"function"==typeof n&&n({feature:r}),r;{let t=Math.floor(1e3*Math.random()),e=new SuperMap.GetSymbolInfoParameters({libID:r.libID,code:r.code,surroundLineType:r.surroundLineType,scaleValues:r.scaleValues,subSymbols:r.subSymbols});e.inputPoints=L.Util.latLngsToSuperMapPoints(r.getLatLngs()),e.dynamicToken=t,L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(e,function(e){e.result.dynamicToken&&e.result.dynamicToken===SuperMap.MD5.md5(t.toString())&&(r.symbolData.innerCells=e.result.innerCells,this.addFeatures(r))},this)}}else{var y=null,P=!1;if(Object.prototype.hasOwnProperty.call(s,"symbolRank")||Object.prototype.hasOwnProperty.call(s,"surroundLineType")?P=!0:y=this._getSymbolDataFromCache(t,e),!y||P){let o=new SuperMap.GetSymbolInfoParameters({libID:t,code:e});i&&(o.inputPoints=L.Util.latLngsToSuperMapPoints(i)),Object.prototype.hasOwnProperty.call(s,"negativeImage")&&(o.negativeImage=s.negativeImage),Object.prototype.hasOwnProperty.call(s,"symbolRank")&&(o.symbolRank=s.symbolRank),Object.prototype.hasOwnProperty.call(s,"surroundLineType")&&(o.surroundLineType=s.surroundLineType);var S=Math.floor(1e3*Math.random());o.dynamicToken=S,L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(o,function(o){o.result.dynamicToken&&o.result.dynamicToken===SuperMap.MD5.md5(S.toString())&&(P||o.result.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL||(delete o.result.dynamicToken,this._cacheSymbolData(o.result)),s.symbolData=SuperMap.Plot.PlottingUtil.cloneObject(o.result),r=L.supermap.plotting.PlottingObject.createSymbol(t,e,i,s,l,a),this.addFeatures(r),"function"==typeof n&&n({feature:r}))},this)}else s.symbolData=y,r=L.supermap.plotting.PlottingObject.createSymbol(t,e,i,s,l,a),this.addFeatures(r),"function"==typeof n&&n({feature:r})}},createSymbolText:function(t,e,i,o,l,s){l||(l={}),l.associatedUuid=t,l.symbolTexts=e,l.custom=s,l.uuid=i;var n=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SYMBOLTEXT,[],l,o,s);return this.addFeatures(n),n},createSymbolText1:function(t,e,i,o,l,s){l||(l={}),l.associatedUuid=t,l.textContent=e,l.custom=s,l.uuid=i;var n=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SYMBOLTEXT1,[],l,o,s);return this.addFeatures(n),n},createLineRelation:function(t,e,i,o,l,s,n){s||(s={}),s.startAssociatedUuid=t,s.endAssociatedUuid=e,s.lineRelationType=i,s.uuid=o,s.custom=n;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.LINERELATION,null,s,l,n);return this.addFeatures(a),a},updateFeatures:function(t){L.Util.isArray(t)||(t=[t]);var e=[],i=this;t.map(function(t){return i.isGraphic(t.symbolType)?(t.graphic.update(),e.push(t.graphic),t.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&(e=e.concat(t.graphic.getAssociatedGraphics())),t):t}),this._redraw(e)},update:function(){this._clearLayersOutBounds(),this._redrawLayersInBounds(),this._renderer._ctx.clearRect(this._renderer._bounds.min.x,this._renderer._bounds.min.y,this._renderer._ctx.canvas.width,this._renderer._ctx.canvas.height);var t=this._getGraphicsInBounds();this._renderer._drawPlottingGraphics(t),this._updateDetectionRange(t)},redraw:function(){this._clearLayersOutBounds(),this._redrawLayersInBounds(),this._renderer._ctx.clearRect(this._renderer._bounds.min.x,this._renderer._bounds.min.y,this._renderer._ctx.canvas.width,this._renderer._ctx.canvas.height),this._renderer._drawPlottingGraphics(this._getGraphicsInBounds())},beforeAdd:function(t){L.Path.prototype.beforeAdd.call(this,t),this._vectorRenderer=L.svg(),t.hasLayer(this._vectorRenderer)||t.addLayer(this._vectorRenderer),this._vectorRenderer._container.style.zIndex=this.options.vectorZIndex,this._renderer=L.canvas(),t.hasLayer(this._renderer)||t.addLayer(this._renderer),this._renderer._container.style.zIndex=this.options.zIndex},onAdd:function(){L.Path.prototype.onAdd.call(this),this._map.addLayer(this._editLayer);var t=this;this._map.on("zoomend",function(){if(t.getLocked()||!t.getEditable())for(var e=0;e<t.selectedFeatures.length;e++)t.selectedFeatures[e].fire(SuperMap.Plot.Event.reseteditmarkersvalues);t._getRedrawWhenZoom()&&(t._renderer._ctx.clearRect(t._renderer._bounds.min.x,t._renderer._bounds.min.y,t._renderer._ctx.canvas.width,t._renderer._ctx.canvas.height),t._renderer._drawPlottingGraphics(t._getGraphicsInBounds()))})},onRemove:function(){L.Path.prototype.onRemove.call(this),map.hasLayer(this._vectorRenderer)&&map.removeLayer(this._vectorRenderer),map.hasLayer(this._renderer)&&map.removeLayer(this._renderer),this._map.removeLayer(this._editLayer)},getRenderer:function(t){return t!==SuperMap.Plot.SymbolType.DOTSYMBOL&&t!==SuperMap.Plot.SymbolType.SYMBOLTEXT&&t!==SuperMap.Plot.SymbolType.SYMBOLTEXT1&&t!==SuperMap.Plot.SymbolType.PICTURE&&t!==SuperMap.Plot.SymbolType.TEXTSYMBOL?this._vectorRenderer:this._renderer},getFeaturesInBounds:function(){var t=[],e=this,i=this._map.getBounds();return this._graphics.map(function(e){return"none"!==e.feature.style.display&&i.contains(e.getLatLng())?t.push(e.feature):"none"!==e.feature.style.display&&null!=e.feature.trajectory&&e.feature.trajectory.getDisplayLatLngs(i).length>0&&t.push(e.feature),e}),this._vectors.map(function(o){return o.getBounds().isValid()&&e._intersects(i,o.getLatLngs())&&t.push(o),o}),t},_redraw:function(t){var e=[];null!=t&&SuperMap.Util.isArray(t)?e=e.concat(t):null!=t&&t instanceof xt&&e.push(t);var i=this;i._renderer._redrawBounds&&(i._renderer._redrawBounds.min._floor(),i._renderer._redrawBounds.max._ceil(),i._renderer._clear(),i._graphics.map(function(t){return null!=t._pxBounds&&t._pxBounds.intersects(i._renderer._redrawBounds)&&-1===SuperMap.Util.indexOf(e,t)&&e.push(t),t}),i._renderer._drawPlottingGraphics(e))},_update:function(){this._map&&this.getVisibility()&&this._updatePath()},_containsPoint:function(){return!1},_updatePath:function(){this._clearLayersOutBounds(),this._redrawLayersInBounds(),this._renderer._ctx.clearRect(this._renderer._bounds.min.x,this._renderer._bounds.min.y,this._renderer._ctx.canvas.width,this._renderer._ctx.canvas.height),this._renderer._drawPlottingGraphics(this._getGraphicsInBounds())},_project:function(){var t=this;t._pxBounds=L.bounds(L.point(0,0),L.point(0,0)),t._getGraphicsInBounds().map(function(e){return e._project(),null!=e._pxBounds&&(t._pxBounds.extend(e._pxBounds.min),t._pxBounds.extend(e._pxBounds.max)),e}),t._getLayersInBounds().map(function(e){return e._project(),t._pxBounds.extend(e._pxBounds.min),t._pxBounds.extend(e._pxBounds.max),e})},_updateDetectionRange:function(t){var e=this;Object.keys(e._detectionRangeCombinations).forEach(function(i){for(var o=e._detectionRangeCombinations[i],l=[],s=0;s<o.features.length;s++)-1!=L.Util.indexOf(t,o.features[s].graphic)&&(l.push(L.Util.latLngsToSuperMapPoints(o.features[s].graphic._detectionRangePoints)),null!=o.features[s].graphic._detectionRange&&(e._removeDetectionRange(o.features[s].graphic._detectionRange),delete o.features[s].graphic._detectionRange,o.features[s].graphic._detectionRange=null));var n=SuperMap.Plot.PlottingUtil.getEnvelopePoints(l);if(null!=o.detectionRanges&&o.detectionRanges.length>0){for(s=0;s<o.detectionRanges.length;s++)e._removeDetectionRange(o.detectionRanges[s]),delete o.detectionRanges[s],o.detectionRanges[s]=null;o.detectionRanges.length=0}else o.detectionRanges=[];for(s=0;s<n.length;s++){var a=L.polygon(L.Util.superMapPointsToLatLngs(n[s]),{color:o.style.color,weight:o.style.weight,opacity:o.style.opacity,fill:o.style.fill,fillColor:o.style.fillColor,fillOpacity:o.style.fillOpacity,smoothFactor:0});e._addDetectionRange(a),o.detectionRanges.push(a)}})},_getGraphicsInBounds:function(){var t=[],e=this._map.getBounds();return this._graphics.map(function(i){return"none"!==i.feature.style.display&&e.contains(i.getLatLng())&&(null!=i.getImage()&&i.getUuid()===i.getImage().generateUuidFromFeature()||i.update(),t.push(i)),i}),t},_getRedrawWhenZoom:function(){var t=!1,e=this._map.getBounds();return this._graphics.map(function(i){return"none"!==i.feature.style.display&&e.contains(i.getLatLng())&&i.feature.symbolTexts.length>0&&(i.feature.layer.getMarkerMinVisibleScale()>0||i.feature.layer.getMarkerMaxVisibleScale()>0)&&(t=!0),i}),t},_getLayersInBounds:function(){var t=this,e=[],i=t._map.getBounds();return this._vectors.map(function(o){return o.getBounds().isValid()&&t._intersects(i,o.getLatLngs())&&e.push(o),o}),e},_clearLayersOutBounds:function(){var t=this,e=t._map.getBounds();this._vectors.map(function(i){return i.getBounds().isValid()&&!t._intersects(e,i.getLatLngs())&&i._clearComponents(),i})},_redrawLayersInBounds:function(){var t=this,e=t._map.getBounds();this._vectors.map(function(i){return!i.getBounds().isValid()&&t._intersects(e,i.getLatLngs())&&i.redraw(),i})},_intersects:function(t,e){for(let i=0;i<e.length;i++)if(t.contains(e[i]))return!0;return!1},_addTrajectory:function(t){t._map=this._map,t._renderer=this._vectorRenderer,t.addEventParent(this),t.onAdd()},_removeTrajectory:function(t){t.removeEventParent(this),t.onRemove()},_addDetectionRange:function(t){t._map=this._map,t._renderer=this._vectorRenderer,t.addEventParent(this),t.onAdd()},_removeDetectionRange:function(t){t.removeEventParent(this),t.onRemove()},_handleClick:function(t){var e=this;if(!1!==e.isSelected&&!1!==e.visibility){var i=e.selectedFeatures.slice();e.selectedFeatures.length>0&&(!0===e.isEditable&&!1===e.isLocked&&e._map&&e._map.getPlotEditControl()&&(e._editLayer.removeFeatures(e.selectedFeatures),e.addFeatures(e.selectedFeatures)),e._map.getPlotEditControl().disableEditFeatures(e.selectedFeatures),e.selectedFeatures.length=0);var o=e.getFeaturesInBounds();for(let n=0,a=o.length;n<a;n++){let a=!1;if(null!=o[n].graphic&&o[n].graphic._containsPoint(e._map.latLngToLayerPoint(t.latlng))&&(a=!0),null==o[n].graphic&&o[n].components.length>0)for(var l in o[n].components)if(o[n].components[l]._containsPoint(e._map.latLngToLayerPoint(t.latlng))){a=!0;break}if(a){if(!0===t.originalEvent.altKey&&!0!==t.originalEvent.ctrlKey&&-1!==SuperMap.Util.indexOf(i,o[n]))continue;e._map.getPlotEditControl().unselectFeatures();var s=[];if(!0===L.supermap.plotting.getControl().getTouchMode()&&e._map&&e._map.getPlotEditControl()&&!0===e._map.getPlotEditControl()._isMultiSelect&&(s=s.concat(i.slice())),s.push(o[n]),!0===e.isEditable&&!1===e.isLocked&&e._map&&e._map.getPlotEditControl()&&(e.removeFeatures(s),e._editLayer.addFeatures(s)),e._map.getPlotEditControl().enableEditFeatures(s),e._map.getPlotEditControl().selectFeatures(s),e.selectedFeatures=e.selectedFeatures.concat(s),e._map&&e._map.getPlotEditControl()&&(e._map.getPlotEditControl()._onTriggerMapClick=!1),!0!==t.originalEvent.ctrlKey)break}}i.length>0&&(this.fire(SuperMap.Plot.Event.movingtargetsunselected,{features:i}),i.length=0),this.selectedFeatures.length>0&&this.fire(SuperMap.Plot.Event.movingtargetsselected,{features:e.selectedFeatures}),L.DomEvent.stopPropagation(t)}},_handleContextmenu:function(t){if(!1!==this.isSelected&&!1!==this.visibility){var e=this.getFeaturesInBounds();for(let o=0,l=e.length;o<l;o++){let l=!1;if(null!=e[o].graphic&&e[o].graphic._containsPoint(this._map.latLngToLayerPoint(t.latlng))&&(l=!0),null==e[o].graphic&&e[o].components.length>0)for(var i in e[o].components)if(e[o].components[i]._containsPoint(this._map.latLngToLayerPoint(t.latlng))){l=!0;break}if(l){this.fire(SuperMap.Plot.Event.movingtargetcontextmenu,{features:[e[o]]});break}}L.DomEvent.stopPropagation(t)}},_getSymbolDataFromCache:function(t,e){var i=L.supermap.plotting.getControl(this._map,this.serverUrl,{serviceParams:this.options.serviceParams}).getSymbolLibManager().getSymbolLibByLibId(t);return null!==i?i.getSymbolData(e):null},_cacheSymbolData:function(t){var e=L.supermap.plotting.getControl(this._map,this.serverUrl,{serviceParams:this.options.serviceParams}).getSymbolLibManager().getSymbolLibByLibId(t.libID);null!==e&&e.cacheSymbolData(t)},_generateFromFeature:function(t){var e="";if(t.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL){if(e=t.libID.toString()+"_"+t.code.toString()+"_"+Math.round(t.symbolSize.w).toString()+"_"+Math.round(t.symbolSize.h).toString()+"_"+t.textContent+"_"+t.annotationPosition.toString()+"_"+t.dRotate.toString()+this._styleToString(t.style)+"_"+t.textDisplay.toString()+"_"+t.surroundLineType.toString(),null!=t.symbolTexts&&t.symbolTexts.length>0)for(let i=0;i<t.symbolTexts.length;i++)e+=this._symbolTextToString(t.symbolTexts[i]);if(null!=t.bloodVolumes&&t.bloodVolumes.length>0)for(let i=0;i<t.bloodVolumes.length;i++)e+=this._bloodVolumeToString(t.bloodVolumes[i]);if(null!=t.pictureFrames&&t.pictureFrames.length>0)for(let i=0;i<t.pictureFrames.length;i++)e+=this._pictureFrameToString(t.pictureFrames[i])}else t.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT?(e=t.libID.toString()+"_"+t.code.toString()+"_"+t.associatedUuid+"_"+t.addFrame.toString(),1===t.symbolTexts.length&&(e+=this._symbolTextToString(t.symbolTexts[0]))):t.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1&&(e=t.libID.toString()+"_"+t.code.toString()+"_"+t.associatedUuid+"_"+t.textContent+"_"+t.space.toString()+"_"+t.offsetX.toString()+"_"+t.offsetY.toString()+this._styleToString(t.style));return e},_symbolTextToString:function(t){var e="";return null!=t.textContent&&(e+="_"+t.textContent),null!=t.textPosition&&(e+="_"+t.textPosition.toString()),null!=t.offsetX&&(e+="_"+t.offsetX.toString()),null!=t.offsetY&&(e+="_"+t.offsetY.toString()),null!=t.border&&(e+="_"+t.border.toString()),null!=t.showRelationLine&&(e+="_"+t.showRelationLine.toString()),null!=t.paddingX&&(e+="_"+t.paddingX.toString()),null!=t.paddingY&&(e+="_"+t.paddingY.toString()),null!=t.style&&(e+=this._styleToString(t.style)),null!=t.lineStyle&&(null!=t.lineStyle.color&&(e+="_"+t.lineStyle.color),null!=t.lineStyle.lineSymbolID&&(e+="_"+t.lineStyle.lineSymbolID),null!=t.lineStyle.opacity&&(e+="_"+t.lineStyle.opacity),null!=t.lineStyle.weight&&(e+="_"+t.lineStyle.weight)),e},_bloodVolumeToString:function(t){var e="";return null!=t.volume&&(e+="_"+t.volume),null!=t.position&&(e+="_"+t.position.toString()),null!=t.offsetX&&(e+="_"+t.offsetX.toString()),null!=t.offsetY&&(e+="_"+t.offsetY.toString()),null!=t.width&&(e+="_"+t.width.toString()),null!=t.height&&(e+="_"+t.height.toString()),null!=t.style&&(null!=t.style.color&&(e+="_"+t.style.color),null!=t.style.opacity&&(e+="_"+t.style.opacity.toString()),null!=t.style.weight&&(e+="_"+t.style.weight.toString()),null!=t.style.remainingVolumeColor&&(e+="_"+t.style.remainingVolumeColor),null!=t.style.remainingVolumeOpacity&&(e+="_"+t.style.remainingVolumeOpacity.toString()),null!=t.style.consumeVolumeColor&&(e+="_"+t.style.consumeVolumeColor),null!=t.style.consumeVolumeOpacity&&(e+="_"+t.style.consumeVolumeOpacity.toString())),e},_pictureFrameToString:function(t){var e="";return null!=t.path&&(e+="_"+t.path),null!=t.position&&(e+="_"+t.position.toString()),null!=t.offsetX&&(e+="_"+t.offsetX.toString()),null!=t.offsetY&&(e+="_"+t.offsetY.toString()),null!=t.width&&(e+="_"+t.width.toString()),null!=t.height&&(e+="_"+t.height.toString()),e},_styleToString:function(t){var e="";return null!=t.fontFamily&&(e+="_"+t.fontFamily),null!=t.fontSize&&(e+="_"+t.fontSize),null!=t.fontColor&&(e+="_"+t.fontColor),null!=t.fontStroke&&(e+="_"+t.fontStroke),null!=t.fontStrokeColor&&(e+="_"+t.fontStrokeColor),null!=t.fontStrokeWidth&&(e+="_"+t.fontStrokeWidth),null!=t.fontBackground&&(e+="_"+t.fontBackground),null!=t.fontBackgroundColor&&(e+="_"+t.fontBackgroundColor),null!=t.fontShadow&&(e+="_"+t.fontShadow),null!=t.fontShadowColor&&(e+="_"+t.fontShadowColor),null!=t.fontShadowOffsetX&&(e+="_"+t.fontShadowOffsetX),null!=t.fontShadowOffsetY&&(e+="_"+t.fontShadowOffsetY),null!=t.color&&(e+="_"+t.color),null!=t.weight&&(e+="_"+t.weight),null!=t.opacity&&(e+="_"+t.opacity),null!=t.lineSymbolID&&(e+="_"+t.lineSymbolID),null!=t.dashArray&&(e+="_"+t.dashArray),null!=t.fill&&(e+="_"+t.fill),null!=t.fillSymbolID&&(e+="_"+t.fillSymbolID),null!=t.fillColor&&(e+="_"+t.fillColor),null!=t.fillOpacity&&(e+="_"+t.fillOpacity),null!=t.fillBackColor&&(e+="_"+t.fillBackColor),null!=t.fillBackOpacity&&(e+="_"+t.fillBackOpacity),null!=t.fillGradientMode&&(e+="_"+t.fillGradientMode),e}});L.supermap.plotting.movingTargetLayer=function(t,e,i){return new _t(t,e,i)};var xt=L.Class.extend({_image:null,_lastPos:null,_lastImage:null,_latlng:null,_uuid:null,_trajectoryLine:null,_trajectoryPoints:null,_trajectoryPointGraphic:{},_detectionRange:null,_detectionRangePoints:null,_rotation:null,options:{graphicWidth:0,graphicHeight:0},initialize:function(t,e){e=e||{},this.feature=t,t.graphic=this,this._latlng=e._latlng,this._image=e._image,this._uuid=e._uuid,this._rotation=0,this._trajectoryPoints=[]},onAdd:function(t){this.feature.movingTarget=!0,this.feature._map=t._map,this.feature.layer=t,this.layer=t,this._renderer=t._renderer,this._map=t._map,this.update()},onRemove:function(){null!=this._trajectoryLine&&this.layer instanceof _t&&this.layer._removeTrajectory(this._trajectoryLine);for(let t=0;t<this._trajectoryPoints.length;t++)this.layer._removeTrajectory(this._trajectoryPoints[t]);null!=this._detectionRange&&this.layer instanceof _t&&this.layer._removeDetectionRange(this._detectionRange),this.feature._clearComponents(),this.layer=null,this._renderer=null,this._map=null,delete this.feature.graphic,delete this.feature.movingTarget},redraw:function(){null!=this.layer&&null!=this._renderer&&this.layer.getVisibility()&&this.layer.updateFeatures(this.feature)},update:function(){if(null!=this.layer&&null!=this._renderer&&this.layer.isGraphic(this.feature.symbolType)){if(this.feature.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT||this.feature.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1){var t=this._map.getFeatureByUuid(this.feature.associatedUuid);if(null==t||"none"===t.style.display)return}if(this._project(),this.layer._renderer._extendRedrawBounds(this),"function"==typeof this.layer.getVisibility&&!0===this.layer.getVisibility()&&"none"!==this.feature.style.display&&this._map.getBounds().contains(this.feature.getLatLngs()[0])){var e=this._uuid,i="";null!=this._image&&(i=this._image.generateUuidFromFeature()),e!==i&&(this.layer.cacheImages[e]&&0==--this.layer.cacheImages[e].imgCount&&delete this.layer.cacheImages[e],this.layer.cacheImages[i]?this._cloneImage(i):(null==this._image&&(this._image=new Et(this.feature)),this._image.render(),this.layer.cacheImages[i]={img:this._image.getCacheInfo(),imgCount:1}),this._uuid=i)}if(this.setLatLng(this.feature.getLatLngs()[0]),this.feature.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL){if(this.feature.layer instanceof _t){var o=this._map.getScale();this.feature.layer.getVisibility()&&("function"!=typeof this.feature.layer.getMarkerMinVisibleScale&&"function"!=typeof this.feature.layer.getMarkerMaxVisibleScale||"function"==typeof this.feature.layer.getMarkerMinVisibleScale&&"function"!=typeof this.feature.layer.getMarkerMaxVisibleScale&&(o>=this.feature.layer.getMarkerMinVisibleScale()||0===this.feature.layer.getMarkerMinVisibleScale())||"function"!=typeof this.feature.layer.getMarkerMinVisibleScale&&"function"==typeof this.feature.layer.getMarkerMaxVisibleScale&&(0===this.feature.layer.getMarkerMaxVisibleScale()||o<=this.feature.layer.getMarkerMaxVisibleScale())||"function"==typeof this.feature.layer.getMarkerMinVisibleScale&&"function"==typeof this.feature.layer.getMarkerMaxVisibleScale&&0===this.feature.layer.getMarkerMaxVisibleScale()&&o>=this.feature.layer.getMarkerMinVisibleScale()||"function"==typeof this.feature.layer.getMarkerMinVisibleScale&&"function"==typeof this.feature.layer.getMarkerMaxVisibleScale&&0===this.feature.layer.getMarkerMinVisibleScale()&&o<=this.feature.layer.getMarkerMaxVisibleScale()||"function"==typeof this.feature.layer.getMarkerMinVisibleScale&&"function"==typeof this.feature.layer.getMarkerMaxVisibleScale&&(0===this.feature.layer.getMarkerMinVisibleScale()&&0===this.feature.layer.getMarkerMaxVisibleScale()||o>=this.feature.layer.getMarkerMinVisibleScale()&&o<=this.feature.layer.getMarkerMaxVisibleScale()))&&this._updateSymbolTexts()}else this._updateSymbolTexts();this._updateJoinLines(),null==this._lastPos?this._lastPos=L.latLng(this._latlng.lat,this._latlng.lng):(this._lastPos.lat=this._latlng.lat,this._lastPos.lng=this._latlng.lng),null==this._lastImage&&null!=this._image?this._lastImage=[this._image.size[0],this._image.size[1]]:null!=this._image&&(this._lastImage[0]=this._image.size[0],this._lastImage[1]=this._image.size[1])}}},getAssociatedGraphics:function(){for(var t=[],e=0;e<this.feature.geoSymbolTexts.length;e++){var i=this.feature.geoSymbolTexts[e];null!==i&&(null!=i.graphic&&null!=i.graphic.layer&&t.push(i.graphic))}return t},_updateSymbolTexts:function(){if(null!=this.feature.geoSymbolTexts&&0!==this.feature.geoSymbolTexts.length&&(null==this._lastPos||this._lastPos.lat!==this._latlng.lat||this._lastPos.lng!==this._latlng.lng||null==this._lastImage||this._lastImage[0]!=this._image.size[0]||this._lastImage[1]!=this._image.size[1]))for(var t=0;t<this.feature.geoSymbolTexts.length;t++){var e=this.feature.geoSymbolTexts[t];null!==e&&(null!=e.graphic&&null!=e.graphic.layer&&"none"!==e.style.display&&(e.graphic._project(),this._renderer._extendRedrawBounds(e.graphic),e._calculatePositionPoints(),e.graphic.update()))}},_updateJoinLines:function(){if(null!=this.feature.joinLines&&0<this.feature.joinLines.length&&(null==this._lastPos||this._lastPos.lat!==this._latlng.lat||this._lastPos.lng!==this._latlng.lng))for(let e=0;e<this.feature.joinLines.length;e++){var t=this.feature.joinLines[e];null!==t&&null!=t.layer&&("none"!==t.style.display&&t instanceof _&&t.redraw())}},setLatLng:function(t){if(this._latlng=t,this.layer instanceof _t&&(this.feature.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL||this.feature.symbolType===SuperMap.Plot.SymbolType.PICTURE)&&null!=this.feature.trajectory){if(this.feature.trajectory.addLatLng(t),"none"===this.feature.style.display){null!=this._trajectoryLine&&(this.layer._removeTrajectory(this._trajectoryLine),this._trajectoryLine=null);for(let t=0;t<this._trajectoryPoints.length;t++)this.layer._removeTrajectory(this._trajectoryPoints[t]),delete this._trajectoryPoints[t],this._trajectoryPoints[t]=null;return this._trajectoryPoints.length=0,void(null!=this._detectionRange&&(this.layer._removeTrajectory(this._detectionRange),this._detectionRange=null))}if(!0===this.feature.autoRotation&&this.feature.trajectory.latlngs.length>=2){let t=new SuperMap.Geometry.Point(this.feature.trajectory.latlngs[this.feature.trajectory.latlngs.length-2].lng,this.feature.trajectory.latlngs[this.feature.trajectory.latlngs.length-2].lat),e=new SuperMap.Geometry.Point(this.feature.trajectory.latlngs[this.feature.trajectory.latlngs.length-1].lng,this.feature.trajectory.latlngs[this.feature.trajectory.latlngs.length-1].lat),i=SuperMap.Plot.PlottingUtil.radian(t,e)*SuperMap.Plot.PlottingUtil.RTOD;this._rotation=i-90}let n=this.feature.trajectory.getDisplayLatLngs(this._map.getBounds());if(!0===this.feature.trajectory.showTrackingLine?n.length<=1&&null!=this._trajectoryLine?(this.layer._removeTrajectory(this._trajectoryLine),delete this._trajectoryLine,this._trajectoryLine=null):n.length>1&&null===this._trajectoryLine?(this._trajectoryLine=L.polyline(n,{color:this.feature.trajectory.style.color,weight:this.feature.trajectory.style.weight,opacity:this.feature.trajectory.style.opacity}),this.layer._addTrajectory(this._trajectoryLine)):n.length>1&&null!==this._trajectoryLine&&(this._trajectoryLine.options.color===this.feature.trajectory.style.color&&this._trajectoryLine.options.weight===this.feature.trajectory.style.weight&&this._trajectoryLine.options.opacity===this.feature.trajectory.style.opacity||this._trajectoryLine.setStyle({color:this.feature.trajectory.style.color,weight:this.feature.trajectory.style.weight,opacity:this.feature.trajectory.style.opacity}),this._trajectoryLine.setLatLngs(n)):null!=this._trajectoryLine&&(this.layer._removeTrajectory(this._trajectoryLine),this._trajectoryLine=null),!0===this.feature.trajectory.showTrackingPoint){if(0===n.length&&this._trajectoryPoints.length>0){for(let t=0;t<this._trajectoryPoints.length;t++)this.layer._removeTrajectory(this._trajectoryPoints[t]),delete this._trajectoryPoints[t],this._trajectoryPoints[t]=null;this._trajectoryPoints.length=0}else if(n.length>0){var e=this.feature.trajectory.generateUuidKey();let t=[];if(Object.prototype.hasOwnProperty.call(this._trajectoryPointGraphic,e))for(let e=0;e<this._trajectoryPoints.length;){let i=SuperMap.Util.indexOf(n,this._trajectoryPoints[e].getLatLngs()[0]);-1!==i?(t.push(i),e++):(this.layer._removeTrajectory(this._trajectoryPoints[e]),delete this._trajectoryPoints[e],this._trajectoryPoints[e]=null,this._trajectoryPoints.splice(e,1))}else{for(let t=0;t<this._trajectoryPoints.length;t++)this.layer._removeTrajectory(this._trajectoryPoints[t]),delete this._trajectoryPoints[t],this._trajectoryPoints[t]=null;this._trajectoryPoints.length=0}for(let o=0;o<n.length;o++){if(-1!==SuperMap.Util.indexOf(t,o))continue;var i={externalGraphic:this._generateTrackingPointImage(this.feature.trajectory.trackingPointStyle,this.feature.trajectory.trackingPointRadius,this.feature.trajectory.style,e),graphicWidth:2*this.feature.trajectory.trackingPointRadius,graphicHeight:2*this.feature.trajectory.trackingPointRadius};let l=L.supermap.plotting.pointImage([n[o]],i);this.layer._addTrajectory(l),this._trajectoryPoints.push(l)}}}else{for(let t=0;t<this._trajectoryPoints.length;t++)this.layer._removeTrajectory(this._trajectoryPoints[t]),delete this._trajectoryPoints[t],this._trajectoryPoints[t]=null;this._trajectoryPoints.length=0}if(null!=this.feature.detectionRange)if(null==this.feature.detectionRange.style||null==this.feature.detectionRange.style.display||"none"!==this.feature.detectionRange.style.display){if(null!=this.feature.detectionRange.radius&&this.feature.detectionRange.radius>0||null!=this.feature.detectionRange.pixelRadius&&this.feature.detectionRange.pixelRadius>0||null!=this.feature.detectionRange.points&&this.feature.detectionRange.points.length>0){if(this._detectionRangePoints=[],null!=this.feature.detectionRange.radius&&this.feature.detectionRange.radius>0)for(var o=0;o<=360;o+=5){let t=SuperMap.Plot.PlottingUtil.destinationVincenty(L.latLng(this._latlng.lat,this._latlng.lng),360-o+90,1e3*this.feature.detectionRange.radius);this._detectionRangePoints.push(t)}else if(null!=this.feature.detectionRange.pixelRadius&&this.feature.detectionRange.pixelRadius>0){var l=new SuperMap.Geometry.Point(this._latlng.lng,this._latlng.lat),s=[];let t=5;for(let e=0;e<72;e++){let i=(e*t+1)*Math.PI/180,o=new SuperMap.Geometry.Point(Math.cos(i)*this.feature.detectionRange.pixelRadius+l.x,Math.sin(i)*this.feature.detectionRange.pixelRadius+l.y);s.push(o)}this._detectionRangePoints=detectionLatlngs.concat(L.Util.superMapPointsToLatLngs(s))}else null!=this.feature.detectionRange.points&&this.feature.detectionRange.points.length>0&&(this._detectionRangePoints=detectionLatlngs.concat(L.Util.superMapPointsToLatLngs(this.feature.detectionRange.points)));null==this.feature.composeDetectionRange?null==this._detectionRange?(this._detectionRange=L.polygon(this._detectionRangePoints,{color:this.feature.detectionRange.style.color,weight:this.feature.detectionRange.style.weight,opacity:this.feature.detectionRange.style.opacity,fill:this.feature.detectionRange.style.fill,fillColor:this.feature.detectionRange.style.fillColor,fillOpacity:this.feature.detectionRange.style.fillOpacity,smoothFactor:0}),this.layer._addDetectionRange(this._detectionRange)):(this._detectionRange.options.color===this.feature.detectionRange.style.color&&this._detectionRange.options.weight===this.feature.detectionRange.style.weight&&this._detectionRange.options.opacity===this.feature.detectionRange.style.opacity&&this._detectionRange.options.fill===this.feature.detectionRange.style.fill&&this._detectionRange.options.fillColor===this.feature.detectionRange.style.fillColor&&this._detectionRange.options.fillOpacity===this.feature.detectionRange.style.fillOpacity||this._detectionRange.setStyle({color:this.feature.detectionRange.style.color,weight:this.feature.detectionRange.style.weight,opacity:this.feature.detectionRange.style.opacity,fill:this.feature.detectionRange.style.fill,fillColor:this.feature.detectionRange.style.fillColor,fillOpacity:this.feature.detectionRange.style.fillOpacity}),this._detectionRange.setLatLngs(this._detectionRangePoints)):null!=this._detectionRange&&(this.layer._removeDetectionRange(this._detectionRange),delete this._detectionRange,this._detectionRange=null)}}else null!=this._detectionRange&&(this.layer._removeDetectionRange(this._detectionRange),delete this._detectionRange,this._detectionRange=null)}},setImage:function(t){this._image=t},setUuid:function(t){this._uuid=t},getLatLng:function(){return this._latlng},getImage:function(){return this._image},getUuid:function(){return this._uuid},_cloneImage:function(t){if(this.layer.cacheImages[t]){this.layer.cacheImages[t].imgCount++,null==this._image&&(this._image=new Et(this.feature)),this._image._ctx.clearRect(0,0,this._image._ctx.width,this._image._ctx.height),this._image.anchor=L.point(this.layer.cacheImages[t].img.anchor.x,this.layer.cacheImages[t].img.anchor.y),this._image.size=[this.layer.cacheImages[t].img.size[0],this.layer.cacheImages[t].img.size[1]],this._image.redrawSize=[this.layer.cacheImages[t].img.redrawSize[0],this.layer.cacheImages[t].img.redrawSize[1]],this._image.redrawAnchor=L.point(this.layer.cacheImages[t].img.redrawAnchor.x,this.layer.cacheImages[t].img.redrawAnchor.y),this._image.bounds=L.latLngBounds(this.layer.cacheImages[t].img.bounds.getSouthEast(),this.layer.cacheImages[t].img.bounds.getNorthWest()),this._image.latLng=L.latLng(this.layer.cacheImages[t].img.latLng.lat,this.layer.cacheImages[t].img.latLng.lng),this._image.fromZoom=this.layer.cacheImages[t].img.fromZoom,null!=this._image.componentLatLngs&&this._image.componentLatLngs.length>0&&(this._image.componentLatLngs.length=0),this._image.componentLatLngs=[];for(var e=0;e<this.layer.cacheImages[t].img.componentLatLngs.length;e++)this._image.componentLatLngs.push(L.Util.cloneLatLngs(this.layer.cacheImages[t].img.componentLatLngs[e]));this._image.canvasEle.width=this._image.size[0],this._image.canvasEle.height=this._image.size[1],this._image._ctx.drawImage(this.layer.cacheImages[t].img.canvas,0,0),this._image.canvas=this._image._ctx.canvas,null!=this.layer.cacheImages[t].img.annotation?(null==this._image.annotation&&(this._image.annotation=new P(this._image.feature)),this._image.annotation.clear(),this._image.annotation.anchor=L.point(this.layer.cacheImages[t].img.annotation.anchor.x,this.layer.cacheImages[t].img.annotation.anchor.y),this._image.annotation.size=[this.layer.cacheImages[t].img.annotation.size[0],this.layer.cacheImages[t].img.annotation.size[1]],this._image.annotation.position=this.layer.cacheImages[t].img.annotation.position,this._image.annotation.offsetX=this.layer.cacheImages[t].img.annotation.offsetX,this._image.annotation.offsetY=this.layer.cacheImages[t].img.annotation.offsetY,this._image.annotation.canvasEle.width=this._image.annotation.size[0],this._image.annotation.canvasEle.height=this._image.annotation.size[1],this._image.annotation._ctx.drawImage(this.layer.cacheImages[t].img.annotation.canvas,0,0),this._image.annotation.canvas=this._image.annotation._ctx.canvas):null!=this._image.annotation&&(delete this._image.annotation,this._image.annotation=null),null!=this._image.images&&this._image.images.length>0&&(this._image.images.length=0),this._image.images=[];for(let e=0;e<this.layer.cacheImages[t].img.images.length;e++){let i={};i=SuperMap.Util.copyAttributes(i,this.layer.cacheImages[t].img.images[e]),this._image.images.push(i)}null!=this._image.pictureFrames&&this._image.pictureFrames.length>0&&(this._image.pictureFrames.length=0),this._image.pictureFrames=[];for(let e=0;e<this.layer.cacheImages[t].img.pictureFrames.length;e++){let i={};i=SuperMap.Util.copyAttributes(i,this.layer.cacheImages[t].img.pictureFrames[e]),this._image.pictureFrames.push(i)}for(let e=0;e<this.layer.cacheImages[t].img.symbolTexts.length;e++)this._image.symbolTexts.length<=e&&this._image.symbolTexts.push(new P(this._image.feature)),this._image.symbolTexts[e].clear(),this._image.symbolTexts[e].anchor=L.point(this.layer.cacheImages[t].img.symbolTexts[e].anchor.x,this.layer.cacheImages[t].img.symbolTexts[e].anchor.y),this._image.symbolTexts[e].size=[this.layer.cacheImages[t].img.symbolTexts[e].size[0],this.layer.cacheImages[t].img.symbolTexts[e].size[1]],this._image.symbolTexts[e].position=this.layer.cacheImages[t].img.symbolTexts[e].position,this._image.symbolTexts[e].offsetX=this.layer.cacheImages[t].img.symbolTexts[e].offsetX,this._image.symbolTexts[e].offsetY=this.layer.cacheImages[t].img.symbolTexts[e].offsetY,this._image.symbolTexts[e].canvasEle.width=this._image.symbolTexts[e].size[0],this._image.symbolTexts[e].canvasEle.height=this._image.symbolTexts[e].size[1],this._image.symbolTexts[e]._ctx.drawImage(this.layer.cacheImages[t].img.symbolTexts[e].canvas,0,0),this._image.symbolTexts[e].canvas=this._image.symbolTexts[e]._ctx.canvas;for(let e=this.layer.cacheImages[t].img.symbolTexts.length;e<this._image.symbolTexts.length;)delete this._image.symbolTexts[e],this._image.symbolTexts.splice(e,1);for(let e=0;e<this.layer.cacheImages[t].img.bloodVolumes.length;e++)this._image.bloodVolumes.length<=e&&this._image.bloodVolumes.push(new P(this._image.feature)),this._image.bloodVolumes[e].clear(),this._image.bloodVolumes[e].anchor=L.point(this.layer.cacheImages[t].img.bloodVolumes[e].anchor.x,this.layer.cacheImages[t].img.bloodVolumes[e].anchor.y),this._image.bloodVolumes[e].size=[this.layer.cacheImages[t].img.bloodVolumes[e].size[0],this.layer.cacheImages[t].img.bloodVolumes[e].size[1]],this._image.bloodVolumes[e].position=this.layer.cacheImages[t].img.bloodVolumes[e].position,this._image.bloodVolumes[e].offsetX=this.layer.cacheImages[t].img.bloodVolumes[e].offsetX,this._image.bloodVolumes[e].offsetY=this.layer.cacheImages[t].img.bloodVolumes[e].offsetY,this._image.bloodVolumes[e].canvasEle.width=this._image.bloodVolumes[e].size[0],this._image.bloodVolumes[e].canvasEle.height=this._image.bloodVolumes[e].size[1],this._image.bloodVolumes[e]._ctx.drawImage(this.layer.cacheImages[t].img.bloodVolumes[e].canvas,0,0),this._image.bloodVolumes[e].canvas=this._image.bloodVolumes[e]._ctx.canvas;for(let e=this.layer.cacheImages[t].img.bloodVolumes.length;e<this._image.bloodVolumes.length;)delete this._image.bloodVolumes[e],this._image.bloodVolumes.splice(e,1)}},_getHandleAndCenterPoints:function(){var t={handlePoints:[],centerPoints:[]},e=this.getBounds();if(!e.isValid())return t;var i=L.point((e.min.x+e.max.x)/2,(e.min.y+e.max.y)/2),o=e.max.x-e.min.x,l=e.max.y-e.min.y,s=o;l>o&&(s=l),s+=10;var n=L.point(i.x-s/2,i.y+s/2),a=L.point(i.x-s/2,i.y-s/2),r=L.point(i.x+s/2,i.y-s/2),p=L.point(i.x+s/2,i.y+s/2),u=this._map.layerPointToLatLng(n),h=this._map.layerPointToLatLng(a),g=this._map.layerPointToLatLng(r),c=this._map.layerPointToLatLng(p);t.handlePoints=[u.clone(),h.clone(),g.clone(),c.clone()];for(var y=1,P=0;P<t.handlePoints.length;P++)t.handlePoints[P].nHandle=y++;for(P=0;P<t.handlePoints.length;P++)t.handlePoints[P].tag=P;var S=this._map.layerPointToLatLng(L.point((e.min.x+e.max.x)/2,(e.min.y+e.max.y)/2));return S.isCenterPoint=!0,t.centerPoints=[S],t},getBounds:function(){if(null!=this._latlng&&null!=this._image){var t=this._map.latLngToLayerPoint(this._latlng);let a=!0===this.feature.autoRotation?-(this._rotation+this.getImage().feature.dRotate):-this.getImage().feature.dRotate;var e=L.point(t.x-this._image.anchor.x,t.y-this._image.anchor.y),i=L.point(t.x+(this._image.size[0]-this._image.anchor.x),t.y+(this._image.size[1]-this._image.anchor.y)),o=this._map.layerPointToLatLng(e),l=this._map.layerPointToLatLng(i),s=new SuperMap.Geometry.Point(o.lng,o.lat),n=new SuperMap.Geometry.Point(l.lng,l.lat);SuperMap.Plot.PlottingUtil.rotateAngle(new SuperMap.Geometry.Point(this._latlng.lng,this._latlng.lat),(360-a)/180*Math.PI,s),SuperMap.Plot.PlottingUtil.rotateAngle(new SuperMap.Geometry.Point(this._latlng.lng,this._latlng.lat),(360-a)/180*Math.PI,n);let r=L.bounds(this._map.latLngToLayerPoint(L.latLng(s.y,s.x)),this._map.latLngToLayerPoint(L.latLng(n.y,n.x)));return r.min._floor(),r.max._ceil(),r}return null},_containsPoint:function(t){if(null!=this._latlng&&null!=this._image){var e=this._map.latLngToLayerPoint(this._latlng);let r=!0===this.feature.autoRotation?-(this._rotation+this.getImage().feature.dRotate):-this.getImage().feature.dRotate;var i=L.point(e.x-this._image.anchor.x,e.y-this._image.anchor.y),o=L.point(e.x+(this._image.size[0]-this._image.anchor.x),e.y+(this._image.size[1]-this._image.anchor.y)),l=this._map.layerPointToLatLng(i),s=this._map.layerPointToLatLng(o),n=new SuperMap.Geometry.Point(l.lng,l.lat),a=new SuperMap.Geometry.Point(s.lng,s.lat);SuperMap.Plot.PlottingUtil.rotateAngle(new SuperMap.Geometry.Point(this._latlng.lng,this._latlng.lat),(360-r)/180*Math.PI,n),SuperMap.Plot.PlottingUtil.rotateAngle(new SuperMap.Geometry.Point(this._latlng.lng,this._latlng.lat),(360-r)/180*Math.PI,a);let p=L.bounds(this._map.latLngToLayerPoint(L.latLng(n.y,n.x)),this._map.latLngToLayerPoint(L.latLng(a.y,a.x)));if(p.min._floor(),p.max._ceil(),null!=p&&p.contains(t))return!0}return!1},_project:function(){if(null!=this._latlng&&null!=this._image){var t=this._map.latLngToLayerPoint(this._latlng),e=L.point(t.x-this._image.redrawAnchor.x,t.y-this._image.redrawAnchor.y),i=L.point(t.x+(this._image.redrawSize[0]-this._image.redrawAnchor.x),t.y+(this._image.redrawSize[1]-this._image.redrawAnchor.y));this._pxBounds=L.bounds(e,i),this._pxBounds.min._floor(),this._pxBounds.max._ceil()}},_generateTrackingPointImage:function(t,e,i,o){var l=null;if(Object.prototype.hasOwnProperty.call(this._trajectoryPointGraphic,o))return this._trajectoryPointGraphic[o];delete this._trajectoryPointGraphic;var s=document.createElement("canvas");s.width=2*e+2*i.weight,s.height=2*e+2*i.weight,document.body.appendChild(s);var n=s.getContext("2d");return 0===t?(n.fillStyle=i.color,n.beginPath(),n.arc(e+i.weight,e+i.weight,e,0,2*Math.PI),n.fill()):1===t?(n.globalAlpha=i.opacity,n.strokeStyle=i.color,n.lineWidth=i.weight,n.beginPath(),n.arc(e+i.weight,e+i.weight,e,0,2*Math.PI),n.stroke()):2===t?(n.fillStyle=i.color,n.beginPath(),n.moveTo(i.weight,2*e+i.weight),n.lineTo(2*e+i.weight,2*e+i.weight),n.lineTo(e+i.weight,i.weight),n.lineTo(i.weight,2*e+i.weight),n.fill()):3===t?(n.globalAlpha=i.opacity,n.strokeStyle=i.color,n.lineWidth=i.weight,n.beginPath(),n.moveTo(i.weight,2*e+i.weight),n.lineTo(2*e+i.weight,2*e+i.weight),n.lineTo(e+i.weight,i.weight),n.lineTo(i.weight,2*e+i.weight),n.stroke()):4===t&&(n.globalAlpha=i.opacity,n.strokeStyle=i.color,n.lineWidth=i.weight,n.beginPath(),n.moveTo(i.weight,e+i.weight),n.lineTo(2*e+i.weight,e+i.weight),n.moveTo(e+i.weight,i.weight),n.lineTo(e+i.weight,2*e+i.weight),n.stroke()),l=s.toDataURL("image/png","image/octet-stream"),document.body.removeChild(s),this._trajectoryPointGraphic[o]=l,l}}),Ot=L.Path.extend({serverUrl:null,features:null,isLocked:!1,isEditable:!0,isSelected:!0,visibility:!0,cacheImages:null,graphics:null,_editLayer:null,options:{renderer:L.canvas()},getSelected:function(){return this.isSelected},setSelected:function(t){this.isSelected!==t&&(this.isSelected=t,this._map&&this._map.getPlotEditControl()&&(this.isSelected?this._map.getPlotEditControl().enableEditFeatures(this.features):(this._map.getPlotEditControl().unselectFeatures(this.features),this._map.getPlotEditControl().disableEditFeatures(this.features))))},getEditable:function(){return this.isEditable},setEditable:function(t){if(this.isEditable!==t&&(this.isEditable=t,this._map&&this._map.getPlotEditControl())){var e=this._map.getPlotEditControl().getSelectedFeatures();this._map.getPlotEditControl().unselectFeatures(this.features),this._map.getPlotEditControl().selectFeatures(e)}},getLocked:function(){return this.isLocked},setLocked:function(t){if(this.isLocked!==t&&(this.isLocked=t,this._map&&this._map.getPlotEditControl())){var e=this._map.getPlotEditControl().getSelectedFeatures();this._map.getPlotEditControl().unselectFeatures(this.features),this._map.getPlotEditControl().selectFeatures(e)}},getVisibility:function(){return this.visibility},setVisibility:function(t){this.visibility!==t&&(this.visibility=t,this.visibility?this._renderer._container.style.display="block":this._renderer._container.style.display="none")},initialize:function(t,e,i){this._editLayer=new vt(t+"_temportary",e,{layer:this}),i=i||{},L.Util.setOptions(this,i),this.cacheImages={},this.graphics=[],this.selectedFeatures=[],this.name=t,this.serverUrl=e,this.features=[]},getSymZoomScale:function(t){return 1},getEvents:function(){var t={click:this._handleClick,mousemove:this._onMapMouseMove};return this._map._zoomAnimated&&(t.zoomanim=this._zoomAnim),t},_getSymbolDataFromCache:function(t,e){var i=L.supermap.plotting.getControl(this._map,this.serverUrl,{serviceParams:this.options.serviceParams}).getSymbolLibManager().getSymbolLibByLibId(t);return null!==i?i.getSymbolData(e):null},_cacheSymbolData:function(t){var e=L.supermap.plotting.getControl(this._map,this.serverUrl,{serviceParams:this.options.serviceParams}).getSymbolLibManager().getSymbolLibByLibId(t.libID);null!==e&&e.cacheSymbolData(t)},_zoomAnim:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._getCenterOffset(t.center)._multiplyBy(-e).subtract(this._map._getMapPanePos());L.DomUtil.setTransform?L.DomUtil.setTransform(this._canvas,i,e):L.DomUtil.setPosition(this._canvas,i)},_onMapMouseMove:function(t){var e=this._getGraphicsInBounds();if(0!==e.length)for(var i=0,o=e.length;i<o;i++){if(e[i]._containsPoint(this._map.latLngToLayerPoint(t.latlng))){this._editLayer._renderer._container.style.cursor=e[i].feature.isSelected?"move":"pointer";break}this._editLayer._renderer._container.style.cursor=""}},isGraphic:function(t){return t===SuperMap.Plot.SymbolType.DOTSYMBOL},isSupportType:function(t){return t===SuperMap.Plot.SymbolType.DOTSYMBOL},getFeatureByUuid:function(t){for(var e=0;e<this.features.length;e++)if(this.features[e].uuid===t)return this.features[e];return null},getFeatures:function(){return this.features.slice()},addFeatures:function(t){L.Util.isArray(t)||(t=[t]);for(let o=0,l=t.length;o<l;o++){var e=t[o];if(this.isSupportType(e.symbolType)){if(null!=this._map.getFeatureByUuid(e.uuid)&&(e.uuid=SuperMap.Plot.PlottingUtil.generateUuid()),e.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL){var i=new xt(e);i.onAdd(this),this.graphics.push(i)}this.features.push(e)}}this._update()},removeFeatures:function(t){var e=[];SuperMap.Util.isArray(t)||(t=[t]);for(let o=0,l=t.length;o<l;o++){var i=t[o];-1!=SuperMap.Util.indexOf(this.features,i)&&e.push(i.graphic)}this.fire(SuperMap.Plot.Event.beforefeaturesremoved,{features:t}),this.removeGraphics(e),this.fire(SuperMap.Plot.Event.featuresremoved,{features:t,layername:this.name})},removeAllFeatures:function(){this.fire(SuperMap.Plot.Event.beforefeaturesremoved,{features:this.features}),this.removeAllGraphics(),this.fire(SuperMap.Plot.Event.featuresremoved,{features:this.features,layername:this.name})},updateGraphics:function(t){L.Util.isArray(t)||(t=[t]);t.map(function(t){return t.update(),t}),this._update()},removeGraphics:function(t){L.Util.isArray(t)||(t=[t]);var e=this;t.map(function(t){let i=SuperMap.Util.indexOf(e.selectedFeatures,t.feature);-1!==i&&(e._editLayer.removeFeatures(t.feature),e.selectedFeatures.splice(i,1)),e._map&&e._map.getPlotEditControl()&&(e._map.getPlotEditControl().unselectFeatures(t.feature),e._map.getPlotEditControl().disableEditFeatures(t.feature));let o=t.getUuid();return e.cacheImages[o]&&0==--e.cacheImages[o].imgCount&&delete e.cacheImages[o],-1!==(i=SuperMap.Util.indexOf(e.graphics,t))&&e.graphics.splice(i,1),t.onRemove(),-1!==(i=SuperMap.Util.indexOf(e.features,t.feature))&&e.features.splice(i,1),t}),this._update()},removeAllGraphics:function(){this.removeGraphics(this.graphics.slice()),this.selectedFeatures=[],this.graphics=[],this.features=[],this.cacheImages={}},redraw:function(){this._update()},_generateFromFeature:function(t){var e="";return t.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL?e=t.libID.toString()+"_"+t.code.toString()+"_"+Math.round(t.symbolSize.w).toString()+"_"+Math.round(t.symbolSize.h).toString()+"_"+t.textContent+"_"+t.annotationPosition.toString()+"_"+t.dRotate.toString()+this._styleToString(t.style)+"_"+t.textDisplay.toString()+"_"+t.surroundLineType.toString():t.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT?(e=t.libID.toString()+"_"+t.code.toString()+"_"+t.associatedUuid+"_"+t.addFrame.toString(),1===t.symbolTexts.length&&(null!=t.symbolTexts[0].textContent&&(e+="_"+t.symbolTexts[0].textContent),null!=t.symbolTexts[0].textPosition&&(e+="_"+t.symbolTexts[0].textPosition.toString()),null!=t.symbolTexts[0].offsetX&&(e+="_"+t.symbolTexts[0].offsetX.toString()),null!=t.symbolTexts[0].offsetY&&(e+="_"+t.symbolTexts[0].offsetY.toString()),null!=t.symbolTexts[0].style&&(e+=this._styleToString(t.symbolTexts[0].style)))):t.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1&&(e=t.libID.toString()+"_"+t.code.toString()+"_"+t.associatedUuid+"_"+t.textContent+"_"+t.space.toString()+"_"+t.offsetX.toString()+"_"+t.offsetY.toString()+this._styleToString(t.style)),e},_styleToString:function(t){var e="";return null!=t.fontFamily&&(e+="_"+t.fontFamily),null!=t.fontSize&&(e+="_"+t.fontSize),null!=t.fontColor&&(e+="_"+t.fontColor),null!=t.fontStroke&&(e+="_"+t.fontStroke),null!=t.fontStrokeColor&&(e+="_"+t.fontStrokeColor),null!=t.fontStrokeWidth&&(e+="_"+t.fontStrokeWidth),null!=t.fontBackground&&(e+="_"+t.fontBackground),null!=t.fontBackgroundColor&&(e+="_"+t.fontBackgroundColor),null!=t.fontShadow&&(e+="_"+t.fontShadow),null!=t.fontShadowColor&&(e+="_"+t.fontShadowColor),null!=t.fontShadowOffsetX&&(e+="_"+t.fontShadowOffsetX),null!=t.fontShadowOffsetY&&(e+="_"+t.fontShadowOffsetY),null!=t.color&&(e+="_"+t.color),null!=t.weight&&(e+="_"+t.weight),null!=t.opacity&&(e+="_"+t.opacity),null!=t.lineSymbolID&&(e+="_"+t.lineSymbolID),null!=t.dashArray&&(e+="_"+t.dashArray),null!=t.fill&&(e+="_"+t.fill),null!=t.fillSymbolID&&(e+="_"+t.fillSymbolID),null!=t.fillColor&&(e+="_"+t.fillColor),null!=t.fillOpacity&&(e+="_"+t.fillOpacity),null!=t.fillBackColor&&(e+="_"+t.fillBackColor),null!=t.fillBackOpacity&&(e+="_"+t.fillBackOpacity),null!=t.fillGradientMode&&(e+="_"+t.fillGradientMode),e},onAdd:function(){this._canvas=document.createElement("canvas");var t=this._map.getPixelBounds().getSize().x,e=this._map.getPixelBounds().getSize().y;this._canvas.width=t,this._canvas.height=e,this._ctx=this._canvas.getContext("2d"),L.Path.prototype.onAdd.call(this),this._map.addLayer(this._editLayer)},onRemove:function(){L.Path.prototype.onRemove.call(this),this._map.removeLayer(this._editLayer)},_update:function(){this._map&&this.getVisibility()&&this._updatePath()},_containsPoint:function(){return!1},_updatePath:function(){this._renderer._ctx.clearRect(this._renderer._bounds.min.x,this._renderer._bounds.min.y,this._renderer._ctx.canvas.width,this._renderer._ctx.canvas.height),this._renderer._drawPlottingGraphics(this._getGraphicsInBounds())},_project:function(){var t=this;t._pxBounds=L.bounds(L.point(0,0),L.point(0,0)),t._getGraphicsInBounds().map(function(e){return e._project(),t._pxBounds.extend(e._pxBounds.min),t._pxBounds.extend(e._pxBounds.max),e})},_getGraphicsInBounds:function(){var t=[],e=this._map.getBounds();return this.graphics.map(function(i){return"none"!==i.feature.style.display&&e.contains(i.getLatLng())&&(null!=i.getImage()&&i.getUuid()===i.getImage().generateUuidFromFeature()||i.update(),t.push(i)),i}),t},_handleClick:function(t){var e=this;if(null!=e._map.getPlotEditControl()){if(0!==this.selectedFeatures.length)for(let t=0,i=this.selectedFeatures.length;t<i;t++)e._editLayer.removeFeatures(this.selectedFeatures),this.addFeatures(this.selectedFeatures);this.selectedFeatures=[];var i=e._getGraphicsInBounds();for(let o=0,l=i.length;o<l;o++)if(i[o]._containsPoint(this._map.latLngToLayerPoint(t.latlng))){this.removeFeatures(i[o].feature),e._editLayer.addFeatures(i[o].feature),e._map.getPlotEditControl()&&(e._map.getPlotEditControl().unselectFeatures(),i[o].feature.enableEdit||e._map.getPlotEditControl().enableEditFeatures(i[o].feature),e._map.getPlotEditControl().selectFeatures(i[o].feature)),this.selectedFeatures.push(i[o].feature),e._map.getPlotEditControl()&&(e._map.getPlotEditControl()._onTriggerMapClick=!1);break}L.DomEvent.stopPropagation(t)}}});L.supermap.plotting.graphicLayer=function(t,e,i){return new Ot(t,e,i)};i(630);L.Map.include({getFeatureByUuid:function(t){var e=[];for(var i in this._layers){var o;if(this._layers[i]instanceof Ct)null!==(o=this._layers[i].getFeatureByUuid(t))&&e.push(o);if(this._layers[i]instanceof Ot)null!==(o=this._layers[i].getFeatureByUuid(t))&&e.push(o);if(this._layers[i]instanceof _t)null!==(o=this._layers[i].getFeatureByUuid(t))&&e.push(o)}return 0===e.length?null:e[0]},getScale:function(t){var e=0,i=this._layers;for(var o in i)if(i[o]instanceof L.TileLayer){e=i[o].getScale(t);break}return e},getPlottingLayers:function(){var t=[],e=this._layers;for(var i in e)e[i]instanceof Ct&&t.push(e[i]);return t},clearPlottingLayers:function(){var t=this._layers;for(var e in t)t[e]instanceof Ct&&(t[e].removeAllFeatures(),this.removeLayer(t[e]))},getLayer:function(t){var e=this._layers;for(var i in e)if(e[i]._leaflet_id===t)return e[i]},getLayersByName:function(t){return this.getLayersBy("name",t)},getLayersBy:function(t,e){return this.getBy("_layers",t,e)},getBy:function(t,e,i){var o="function"==typeof i.test,l=[];for(var s in this[t])l.push(this[t][s]);return SuperMap.Array.filter(l,function(t){return t[e]===i||o&&i.test(t[e])})},latLngToLayerPoint:function(t){return this.project(L.latLng(t))._subtract(this.getPixelOrigin())},getTiledMapLayer:function(){var t=[],e=this._layers;for(var i in e)"tilePane"==e[i].options.pane&&t.push(e[i]);return t}});i(714);L.Canvas.include({_drawPlottingGraphics:function(t){var e=this;let i=[];t.map(function(t){if("function"==typeof t.layer.getVisibility&&!1===t.layer.getVisibility())return t;if("none"===t.feature.style.display)return t;if(t.feature.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT||t.feature.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1){let i=e._map.getFeatureByUuid(t.feature.associatedUuid);if(null==i||"none"===i.style.display)return t}return t.getImage().complete()?e._drawPlottingGraphic(t):i.push(t),t}),i.length>0&&setTimeout(function(){for(let t=0;t<i.length;t++)e._drawPlottingGraphic(i[t])},100),this._redrawBounds=null},_drawPlottingLayers:function(t){t.map(function(e){return e instanceof L.Polyline&&e._update(),e instanceof L.Polygon&&e._update(),t})},_drawPlottingGraphic:function(t){var e=this;if("none"===t.feature.style.display)return t;if(t.feature.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT||t.feature.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1){let i=e._map.getFeatureByUuid(t.feature.associatedUuid);if(null==i||"none"===i.style.display)return t}let i=e._map.latLngToLayerPoint(t.getLatLng()),o=t.getImage().img||t.getImage().canvas,l=i.x,s=i.y,n=-1*t.getImage().anchor.x,a=-1*t.getImage().anchor.y;e._ctx.save(),e._ctx.translate(l,s);let r=!0===t.feature.autoRotation?-(t._rotation+t.getImage().feature.dRotate):-t.getImage().feature.dRotate;e._ctx.rotate(r/180*Math.PI),e._ctx.translate(n,a);var p=L.Canvas.drawImageScaleFactor||(L.Canvas.drawImageScaleFactor=/android 2.1/.test(navigator.userAgent.toLowerCase())?320/window.screen.width:1);t.graphicHeight&&t.graphicWidth?e._ctx.drawImage(o,0,0,t.graphicHeight*p,t.graphicWidth*p):e._ctx.drawImage(o,0,0,t.getImage().size[0]*p,t.getImage().size[1]*p);for(let i=0;i<t.getImage().images.length;i++){let o=t.getImage().images[i].style,l=o.graphicWidth||o.graphicHeight,s=o.graphicHeight||o.graphicWidth;l=l||2*o.pointRadius,s=s||2*o.pointRadius;let n=void 0!==o.graphicXOffset?o.graphicXOffset:-.5*l,a=void 0!==o.graphicYOffset?o.graphicYOffset:-.5*s,r=t.getImage().images[i].point;e._ctx.translate(n,a);let u=L.supermap.plotting.getControl().imageManager[t.getImage().images[i].path];e._ctx.drawImage(u,r.x,r.y,l*p,s*p),e._ctx.translate(-n,-a)}e._ctx.translate(-n,-a),e._ctx.rotate(-r/180*Math.PI);var u=t.getImage().getBounds(t.getImage().feature.getLatLngs()[0],-r);if(null!=t.getImage().annotation){let o=null;switch(t.getImage().annotation.position){case SuperMap.Plot.AnnoPosition.LEFTTOP:o=L.latLng(u.getNorth(),u.getWest());break;case SuperMap.Plot.AnnoPosition.LEFTBOTTOM:o=L.latLng(u.getSouth(),u.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHTTOP:o=L.latLng(u.getNorth(),u.getEast());break;case SuperMap.Plot.AnnoPosition.RIGHTBOTTOM:o=L.latLng(u.getSouth(),u.getEast());break;case SuperMap.Plot.AnnoPosition.TOP:o=L.latLng(u.getNorth(),(u.getWest()+u.getEast())/2);break;case SuperMap.Plot.AnnoPosition.BOTTOM:o=L.latLng(u.getSouth(),(u.getWest()+u.getEast())/2);break;case SuperMap.Plot.AnnoPosition.LEFT:o=L.latLng((u.getSouth()+u.getNorth())/2,u.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHT:o=L.latLng((u.getSouth()+u.getNorth())/2,u.getEast())}let l=e._map.latLngToLayerPoint(o),s=l.x+t.getImage().annotation.offsetX-i.x,n=l.y+t.getImage().annotation.offsetY-i.y;e._ctx.translate(s,n),e._ctx.translate(-t.getImage().annotation.anchor.x,-t.getImage().annotation.anchor.y),e._ctx.drawImage(t.getImage().annotation.canvas,0,0,t.getImage().annotation.size[0]*p,t.getImage().annotation.size[1]*p),e._ctx.translate(t.getImage().annotation.anchor.x,t.getImage().annotation.anchor.y),e._ctx.translate(-s,-n)}for(let o=0;o<t.getImage().pictureFrames.length;o++){let l=null;switch(t.getImage().pictureFrames[o].position){case SuperMap.Plot.AnnoPosition.TOP:l=L.latLng(u.getNorth(),(u.getWest()+u.getEast())/2);break;case SuperMap.Plot.AnnoPosition.BOTTOM:l=L.latLng(u.getSouth(),(u.getWest()+u.getEast())/2);break;case SuperMap.Plot.AnnoPosition.LEFT:l=L.latLng((u.getSouth()+u.getNorth())/2,u.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHT:l=L.latLng((u.getSouth()+u.getNorth())/2,u.getEast())}let s=e._map.latLngToLayerPoint(l),n=s.x+t.getImage().pictureFrames[o].offsetX-i.x,a=s.y+t.getImage().pictureFrames[o].offsetY-i.y;e._ctx.translate(n,a);let r=t.getImage().pictureFrames[o].style,h=r.graphicWidth||r.graphicHeight,g=r.graphicHeight||r.graphicWidth;h=h||2*r.pointRadius,g=g||2*r.pointRadius;let c=void 0!==r.graphicXOffset?r.graphicXOffset:-.5*h,y=void 0!==r.graphicYOffset?r.graphicYOffset:-.5*g;e._ctx.translate(c,y);let P=L.supermap.plotting.getControl().imageManager[t.getImage().pictureFrames[o].path];e._ctx.drawImage(P,0,0,h*p,g*p),e._ctx.translate(-c,-y),e._ctx.translate(-n,-a)}if(t.feature.layer instanceof _t){var h=e._map.getScale();if(t.feature.layer.getVisibility()&&("function"!=typeof t.feature.layer.getMarkerMinVisibleScale&&"function"!=typeof t.feature.layer.getMarkerMaxVisibleScale||"function"==typeof t.feature.layer.getMarkerMinVisibleScale&&"function"!=typeof t.feature.layer.getMarkerMaxVisibleScale&&(h>=t.feature.layer.getMarkerMinVisibleScale()||0===t.feature.layer.getMarkerMinVisibleScale())||"function"!=typeof t.feature.layer.getMarkerMinVisibleScale&&"function"==typeof t.feature.layer.getMarkerMaxVisibleScale&&(0===t.feature.layer.getMarkerMaxVisibleScale()||h<=t.feature.layer.getMarkerMaxVisibleScale())||"function"==typeof t.feature.layer.getMarkerMinVisibleScale&&"function"==typeof t.feature.layer.getMarkerMaxVisibleScale&&0===t.feature.layer.getMarkerMaxVisibleScale()&&h>=t.feature.layer.getMarkerMinVisibleScale()||"function"==typeof t.feature.layer.getMarkerMinVisibleScale&&"function"==typeof t.feature.layer.getMarkerMaxVisibleScale&&0===t.feature.layer.getMarkerMinVisibleScale()&&h<=t.feature.layer.getMarkerMaxVisibleScale()||"function"==typeof t.feature.layer.getMarkerMinVisibleScale&&"function"==typeof t.feature.layer.getMarkerMaxVisibleScale&&(0===t.feature.layer.getMarkerMinVisibleScale()&&0===t.feature.layer.getMarkerMaxVisibleScale()||h>=t.feature.layer.getMarkerMinVisibleScale()&&h<=t.feature.layer.getMarkerMaxVisibleScale())))for(let o=0;o<t.getImage().symbolTexts.length;o++){let l=null;switch(t.getImage().symbolTexts[o].position){case SuperMap.Plot.AnnoPosition.LEFTTOP:l=L.latLng(u.getNorth(),u.getWest());break;case SuperMap.Plot.AnnoPosition.LEFTBOTTOM:l=L.latLng(u.getSouth(),u.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHTTOP:l=L.latLng(u.getNorth(),u.getEast());break;case SuperMap.Plot.AnnoPosition.RIGHTBOTTOM:l=L.latLng(u.getSouth(),u.getEast());break;case SuperMap.Plot.AnnoPosition.TOP:l=L.latLng(u.getNorth(),(u.getWest()+u.getEast())/2);break;case SuperMap.Plot.AnnoPosition.BOTTOM:l=L.latLng(u.getSouth(),(u.getWest()+u.getEast())/2);break;case SuperMap.Plot.AnnoPosition.LEFT:l=L.latLng((u.getSouth()+u.getNorth())/2,u.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHT:l=L.latLng((u.getSouth()+u.getNorth())/2,u.getEast());break;case SuperMap.Plot.AnnoPosition.ANCHOR:l=L.latLng(t.getLatLng().lat,t.getLatLng().lng)}let s=e._map.latLngToLayerPoint(l),n=s.x+t.getImage().symbolTexts[o].offsetX-i.x,a=s.y+t.getImage().symbolTexts[o].offsetY-i.y;e._ctx.translate(n,a),e._ctx.translate(-t.getImage().symbolTexts[o].anchor.x,-t.getImage().symbolTexts[o].anchor.y),e._ctx.drawImage(t.getImage().symbolTexts[o].canvas,0,0,t.getImage().symbolTexts[o].size[0]*p,t.getImage().symbolTexts[o].size[1]*p),e._ctx.translate(t.getImage().symbolTexts[o].anchor.x,t.getImage().symbolTexts[o].anchor.y),e._ctx.translate(-n,-a)}}else for(let o=0;o<t.getImage().symbolTexts.length;o++){let l=null;switch(t.getImage().symbolTexts[o].position){case SuperMap.Plot.AnnoPosition.LEFTTOP:l=L.latLng(u.getNorth(),u.getWest());break;case SuperMap.Plot.AnnoPosition.LEFTBOTTOM:l=L.latLng(u.getSouth(),u.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHTTOP:l=L.latLng(u.getNorth(),u.getEast());break;case SuperMap.Plot.AnnoPosition.RIGHTBOTTOM:l=L.latLng(u.getSouth(),u.getEast());break;case SuperMap.Plot.AnnoPosition.TOP:l=L.latLng(u.getNorth(),(u.getWest()+u.getEast())/2);break;case SuperMap.Plot.AnnoPosition.BOTTOM:l=L.latLng(u.getSouth(),(u.getWest()+u.getEast())/2);break;case SuperMap.Plot.AnnoPosition.LEFT:l=L.latLng((u.getSouth()+u.getNorth())/2,u.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHT:l=L.latLng((u.getSouth()+u.getNorth())/2,u.getEast());break;case SuperMap.Plot.AnnoPosition.ANCHOR:l=L.latLng(t.getLatLng().lat,t.getLatLng().lng)}let s=e._map.latLngToLayerPoint(l),n=s.x+t.getImage().symbolTexts[o].offsetX-i.x,a=s.y+t.getImage().symbolTexts[o].offsetY-i.y;e._ctx.translate(n,a),e._ctx.translate(-t.getImage().symbolTexts[o].anchor.x,-t.getImage().symbolTexts[o].anchor.y),e._ctx.drawImage(t.getImage().symbolTexts[o].canvas,0,0,t.getImage().symbolTexts[o].size[0]*p,t.getImage().symbolTexts[o].size[1]*p),e._ctx.translate(t.getImage().symbolTexts[o].anchor.x,t.getImage().symbolTexts[o].anchor.y),e._ctx.translate(-n,-a)}for(let o=0;o<t.getImage().bloodVolumes.length;o++){let l=null;switch(t.getImage().bloodVolumes[o].position){case SuperMap.Plot.AnnoPosition.TOP:l=L.latLng(u.getNorth(),(u.getWest()+u.getEast())/2);break;case SuperMap.Plot.AnnoPosition.BOTTOM:l=L.latLng(u.getSouth(),(u.getWest()+u.getEast())/2);break;case SuperMap.Plot.AnnoPosition.LEFT:l=L.latLng((u.getSouth()+u.getNorth())/2,u.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHT:l=L.latLng((u.getSouth()+u.getNorth())/2,u.getEast())}let s=e._map.latLngToLayerPoint(l),n=s.x+t.getImage().bloodVolumes[o].offsetX-i.x,a=s.y+t.getImage().bloodVolumes[o].offsetY-i.y;e._ctx.translate(n,a),e._ctx.translate(-t.getImage().bloodVolumes[o].anchor.x,-t.getImage().bloodVolumes[o].anchor.y),e._ctx.drawImage(t.getImage().bloodVolumes[o].canvas,0,0,t.getImage().bloodVolumes[o].size[0]*p,t.getImage().bloodVolumes[o].size[1]*p),e._ctx.translate(t.getImage().bloodVolumes[o].anchor.x,t.getImage().bloodVolumes[o].anchor.y),e._ctx.translate(-n,-a)}e._ctx.restore()},_updateTextPt:function(t,e){var i=e.options,o=1;100!==i.fontPercent&&(o=i.fontPercent/100),this._ctx.fillStyle=i.fontColor,!0===i.fontStroke&&(this._ctx.strokeStyle=i.fontStrokeColor,this._ctx.setLineDash([]),this._ctx.lineWidth=i.fontStrokeWidth),this._ctx.globalAlpha=i.fontOpacity||1;var l=[i.fontStyle?i.fontStyle:"normal","normal",i.fontWeight?i.fontWeight:"normal",i.fontSize?i.fontSize+"px":"1em",i.fontFamily?i.fontFamily:"sans-serif"].join(" "),s=i.text.split("\n"),n=s.length;if(this._ctx.fillText){this._ctx.font=l,this._ctx.textAlign=L.Canvas.LABEL_ALIGN[i.labelAlign[0]]||"center",this._ctx.textBaseline=L.Canvas.LABEL_ALIGN[i.labelAlign[1]]||"middle";var a=L.Canvas.LABEL_FACTOR[i.labelAlign[1]];null==a&&(a=-.5);var r=this._ctx.measureText("Mg").height||this._ctx.measureText("xx").width;t.y+=r*a*(n-1);for(var p=0;p<n;p++)if(0!=i.fontSpace){var u=0,h=s[p].split(""),g=this._ctx.measureText(s[p]).width+i.fontSpace*(h.length-1),c=i.labelAlign[0]||"c";"c"===c?u-=g/2-this._ctx.measureText(s[p][0]).width/2:"r"===c&&(u-=g-i.fontSize);var y=0,P=s[p].split(""),S="";this._ctx.save(),this._ctx.translate(t.x,t.y),0!=i.labelRotation&&this._ctx.rotate(i.labelRotation*Math.PI/180),this._ctx.scale(o,1);for(var d=0;d<P.length;d++)!0===i.fontStroke&&this._ctx.strokeText(P[d],u+y,r*p),this._ctx.fillText(P[d],u+y,r*p),S+=P[d],y=this._ctx.measureText(S).width+parseFloat(i.fontSpace)*(d+1);this._ctx.restore()}else this._ctx.save(),this._ctx.translate(t.x,t.y),0!=i.labelRotation&&this._ctx.rotate(i.labelRotation*Math.PI/180),this._ctx.scale(o,1),!0===i.fontStroke&&this._ctx.strokeText(s[p],0,r*p),this._ctx.fillText(s[p],0,r*p),this._ctx.restore()}},_updateText:function(t){if(void 0!=t.options.text&&!(t.options.fontSize<6)){void 0===t.options.fontPercent&&(t.options.fontPercent=100),t.options.fontPercent<0&&(t.options.fontPercent=0),t.options.fontPercent>400&&(t.options.fontPercent=400),void 0===t.options.fontSpace&&(t.options.fontSpace=0),t.options.fontSpace>30||t.options.fontSpace<0&&(t.options.fontSpace=0);var e=t._latlng,i=this._map.latLngToLayerPoint(e);if(void 0!=i){if(t.options.labelXOffset||t.options.labelYOffset){var o=isNaN(t.options.labelXOffset)?0:t.options.labelXOffset,l=isNaN(t.options.labelYOffset)?0:t.options.labelYOffset;i.x+=o,i.y-=l}if(!0===t.options.fontBackground){this._ctx.font=[t.options.fontStyle?t.options.fontStyle:"normal","normal",t.options.fontWeight?t.options.fontWeight:"normal",t.options.fontSize?t.options.fontSize+"px":"1em",t.options.fontFamily?t.options.fontFamily:"sans-serif"].join(" ");var s=t.options.labelRotation;t.options.labelRotation=0;var n=t.getPxBounds();t.options.labelRotation=s;var a=n.min.x,r=n.min.y,p=n.max.x-n.min.x,u=n.max.y-n.min.y;this._ctx.fillStyle=t.options.fontBackgroundColor,this._ctx.globalAlpha=1,this._ctx.save(),this._ctx.translate(a,r),0!=t.options.labelRotation&&this._ctx.rotate(t.options.labelRotation*Math.PI/180),this._ctx.fillRect(0,0,p,u),this._ctx.restore()}if(!0===t.options.fontShadow){var h=L.point(i.x,i.y);if(t.options.fontShadowOffsetX&&(h.x+=t.options.fontShadowOffsetX),t.options.fontShadowOffsetY&&(h.y+=t.options.fontShadowOffsetY),0!==t.options.labelRotation){var g=i.x,c=i.y,y=t.options.labelRotation*Math.PI/180,P=Math.sqrt(Math.pow(h.x-g,2)+Math.pow(h.y-c,2)),S=y+Math.atan2(h.y-c,h.x-g);h.x=g+P*Math.cos(S),h.y=c+P*Math.sin(S)}var d=t.options.fontStroke;t.options.fontStroke=!1;var m=t.options.fontColor;t.options.fontColor=t.options.fontShadowColor,this._updateTextPt(h,t),t.options.fontColor=m,t.options.fontStroke=d}if(Object.prototype.hasOwnProperty.call(t,"_eventParents"))for(var f in t._eventParents)Object.prototype.hasOwnProperty.call(t._eventParents[f],"ownerGroup")&&null!==t._eventParents[f].ownerGroup&&(t._eventParents[f].ownerGroup.symbolType!==SuperMap.Plot.SymbolType.NAVYDEPLOYMENT&&t._eventParents[f].ownerGroup.symbolType!==SuperMap.Plot.SymbolType.AIRDEPLOYMENT||t._updateBounds());this._updateTextPt(i,t)}}},_updateImage:function(t){var e=this,i=function(){var t=this.style,i=t.graphicWidth||t.graphicHeight,o=t.graphicHeight||t.graphicWidth;i=i||2*t.pointRadius,o=o||2*t.pointRadius;var l=-.5*i+t.graphicXOffset,s=-.5*o+t.graphicYOffset,n=t.graphicOpacity||t.fillOpacity,a=this.point,r=a.x,p=a.y;if(!isNaN(r)&&!isNaN(p)){var u;e._ctx.save(),t.rotation&&(u=t.rotation/180*Math.PI),e._ctx.translate(r,p),u&&e._ctx.rotate(u),e._ctx.translate(l,s),e._ctx.globalAlpha=n;var h=L.Canvas.drawImageScaleFactor||(L.Canvas.drawImageScaleFactor=/android 2.1/.test(navigator.userAgent.toLowerCase())?320/window.screen.width:1);e._ctx.drawImage(this.img,0,0,i*h,o*h),e._ctx.restore()}},o=new Image;"firefox"==SuperMap.Browser.name?(o.onload=function(){i.call({point:t._point,style:t.options,img:o}),o.onload=null},t.options.graphicTitle&&(o.title=t.options.graphicTitle),o.src=t.options.externalGraphic):(t.options.graphicTitle&&(o.title=t.options.graphicTitle),o.src=t.options.externalGraphic,o.onload=function(){i.call({point:t._point,style:t.options,img:o}),o.onload=null}),window.ActiveXObject||"ActiveXObject"in window?o.onload():o.complete&&o.onload()},_updateArc:function(t){if(this._drawing&&!t._empty()){var e=t._point,i=this._ctx,o=t._radius,l=(t._radiusY||o)/o,s=(360-t.options.endAngle)*(Math.PI/180),n=(360-t.options.startAngle)*(Math.PI/180);this._drawnLayers[t._leaflet_id]=t,1!==l&&(i.save(),i.scale(1,l)),i.beginPath(),i.arc(e.x,e.y/l,o,s,n,!1),1!==l&&i.restore(),this._fillStroke(i,t)}},_afterTo:function(t,e){var i=t._order;if(i){var o=i.next,l=i.prev;if(l)l.next=o;else if(o)return;o?o.prev=l:l&&(this._drawLast=l);var s=e._order,n=s.next;s.next=i,i.prev=s,n?(n.prev=i,i.next=n):(i.next=null,this._drawLast=i),this._requestRedraw(t)}},_beforePath:function(t,e){this._updateDashArray(t),this._layers[L.Util.stamp(t)]=t;var i=e._order,o=i.prev,l=t._order={layer:t,prev:o,next:i};null==l.prev?this._drawFirst=l:o.next=l,i.prev=l},_onClick:function(t){var e,i=this._map.mouseEventToLayerPoint(t),o=[],l=[],s=0;for(let t in this._map._layers)if(this._map._layers[t]._drawFirst)for(var n=this._map._layers[t]._drawFirst;n;n=n.next)if(n.layer.options.interactive&&n.layer._containsPoint(i)&&!this._map._draggableMoved(n.layer)&&(e=n.layer,Object.prototype.hasOwnProperty.call(e,"_eventParents")&&null!==e._eventParents))for(var a in e._eventParents)l.push(e),o.push(e._eventParents[a]);if(e&&l.length>1&&o.length>0){var r=!1,p=[],u=[];for(let t=0,e=o.length;t<e;t++)o[t].isSelected&&o[t].moveend&&(r=!0),o[t].enableEdit&&(p.push(o[t]),u.push(l[t]));if(t.altKey){for(let t=0;t<o.length;t++){if(1===o[t].symbolType){s=t;break}o[t].getBounds().contains(o[s].getBounds())||(s=t)}return void this._fireEvent([u[s]],t)}for(let e=0,i=p.length;e<i;e++){if(p[e].isSelected&&p[e].moveend){this._fireEvent([u[e]],t);break}if(p[e].isSelected&&p.length>1){this._fireEvent([u[e]],t);break}if(!r){this._fireEvent([u[u.length-1]],t);break}}}this._fireEvent(!!e&&[e],t)}}),L.Polyline.prototype._containsPoint=function(t,e){var i,o,l,s,n,a,r=this._clickTolerance()+10;if(this._pxBounds&&!this._pxBounds.contains(t))return!1;for(i=0,s=this._parts.length;i<s;i++)for(o=0,l=(n=(a=this._parts[i]).length)-1;o<n;l=o++)if((e||0!==o)&&L.LineUtil.pointToSegmentDistance(t,a[l],a[o])<=r)return!0;return!1},L.Polygon.prototype._containsPoint=function(t){var e,i,o,l,s,n,a,r,p=!1;if(this._pxBounds&&!this._pxBounds.contains(t))return!1;for(l=0,a=this._parts.length;l<a;l++)for(s=0,n=(r=(e=this._parts[l]).length)-1;s<r;n=s++)i=e[s],o=e[n],i.y>t.y!=o.y>t.y&&t.x<(o.x-i.x)*(t.y-i.y)/(o.y-i.y)+i.x&&(p=!p);return p||L.Polyline.prototype._containsPoint.call(this,t,!0)},L.supermap.plotting.Text.prototype._containsPoint=function(t){return this._pxBounds.contains(t)},L.supermap.plotting.PointImage.prototype._containsPoint=function(t){return this._pxBounds.contains(t)},L.Canvas.LABEL_ALIGN={l:"left",r:"right",t:"hanging",b:"alphabetic"},L.Canvas.LABEL_FACTOR={l:0,r:-1,t:0,b:-1},L.Canvas.drawImageScaleFactor=null;var wt=L.Control.extend({_mouseTolerance:10,_editMarkers:null,_editMode:SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE,feature:null,_temportary:null,options:{avoidRegionStyle:{fill:!1,color:"#0000ff",dashArray:"2, 2",opacity:1,weight:1},draggable:!0,avoidIcon:L.divIcon({className:"leaflet-supermap-plot-avoid-icon-path",iconSize:[8,8]}),icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"})},initialize:function(t,e){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&(this.options.avoidIcon=L.divIcon({className:"leaflet-supermap-plot-avoid-icon-path",iconSize:[15,15]}),this.options.icon=new L.DivIcon({iconSize:new L.Point(15,15),className:"leaflet-div-icon leaflet-editing-icon"})),L.Control.prototype.initialize.call(this,e),L.setOptions(this,e),this._temportary=new Tt("avoidRegionControl-temportary",t.serverUrl,{serviceParams:t.serviceParams}),this._editMarkers={},this.feature=t},onAdd:function(t){if(this.feature&&!this.feature.getLocked())return this.controlDiv=L.DomUtil.create("div","supermap-iclient-avoidregion"),this._map=t,this._markers=[],this._latlngs=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._map.addLayer(this._temportary),this._map.on("mousemove",this._onMouseMove,this).on("click",this._onMapClick,this),this._showAvoidRegions(),this.controlDiv},onRemove:function(){this._hideAvoidRegions(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,delete this._latlngs,this.plotting&&(this._temportary.removeFeatures(this.plotting),delete this.plotting,this.plotting=null),this._map.removeLayer(this._temportary),delete this._temportary,this._map.off("mousemove",this._onMouseMove,this).off("click",this._onMapClick,this)},_showAvoidRegions:function(){for(var t=0;t<this.feature.avoidRegions.length;t++){var e=this.feature.avoidRegions[t];this._temportary.addFeatures(e),this._selectFeature(e)}},_hideAvoidRegions:function(){for(var t=0;t<this.feature.avoidRegions.length;t++){var e=this.feature.avoidRegions[t];this._unselectFeature(e),this._temportary.removeFeatures(e)}},_selectFeature:function(t){t.symbolType===SuperMap.Plot.SymbolType.AVOIDREGION&&(this._collectEditMarkers(t),t.on("mousemove",this._onMouseMove,this).on("mouseout",this._onMouseOut,this).on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this),t.dragging.enable())},_unselectFeature:function(t){t.symbolType===SuperMap.Plot.SymbolType.AVOIDREGION&&(this._removeMarkers(t),t.off("mousemove",this._onMouseMove,this).off("mouseout",this._onMouseOut,this).off("dragstart",this._onDragStart,this).off("drag",this._onDrag,this).off("dragend",this._onDragEnd,this),t.dragging.disable())},_onMouseOut:function(t){t.target.layer._renderer._container.style.cursor=""},_onMapClick:function(t){if(this.moveend)this.moveend=!1;else{var e=this._map.mouseEventToLayerPoint(t.originalEvent),i=this._map.layerPointToLatLng(e);this.plotting?this._addVertex(i):(this.plotting=L.supermap.plotting.avoidRegion(0,SuperMap.Plot.SymbolType.AVOIDREGION,[],{style:this.options.avoidRegionStyle}),this._temportary.addFeatures(this.plotting),this._addVertex(i)),L.DomEvent.preventDefault(t.originalEvent)}},_collectEditMarkers:function(t){var e=[];if(t.symbolType===SuperMap.Plot.SymbolType.AVOIDREGION)for(var i in t.getLatLngs()){var o=new L.LatLng(t.getLatLngs()[i].lat,t.getLatLngs()[i].lng),l=L.supermap.plotting.editMarker(o,{icon:this.options.avoidIcon,nHandle:-1,tag:i});this._addToMapAndBindMarker(l),e.push(l),l.owner=t}this._editMarkers[t.uuid]=e},_removeMarkers:function(t){var e=this._editMarkers[t.uuid];for(var i in e)this._unbindMarkerEvents(e[i]),this._map.removeLayer(e[i]);delete this._editMarkers[t.uuid]},_unbindMarkerEvents:function(t){t.off("mousemove",this._moveMove,this),t.off("mouseout",this._moveOut,this),t.off("click",this._removePoint,this),t.off("drag",this.redraw,this),t.dragging.disable()},_addToMapAndBindMarker:function(t){t.addTo(this._map),t.on("mousemove",this._moveMove,this),t.on("mouseout",this._moveOut,this),t.on("click",this._removePoint,this),t.on("drag",this._dragPoint,this),t.dragging.enable()},_removePoint:function(t){if(this._editMode===SuperMap.Plot.EditMode.ADDCONTROLPOINT&&t.target.owner.isSelected){var e=this._editMarkers[t.target.owner.uuid],i=e.indexOf(t.target);this._map.removeLayer(e[i]),e.splice(i,1),t.target.owner.latLngs.splice(i,1),t.target.owner.redraw()}},_dragPoint:function(t){var e=t.target.owner;if(e.symbolType===SuperMap.Plot.SymbolType.AVOIDREGION){var i=this._editMarkers[e.uuid],o=SuperMap.Util.indexOf(i,t.target);e.getLatLngs()[o]=t.latlng,e._modifyPoint(),this.moveend=!0}},_moveMove:function(t){t.target._icon.style.cursor="pointer"},_moveOut:function(t){t.target._icon.style.cursor=""},_addVertex:function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});this._markerGroup.addLayer(e),this._markers.push(e),this._latlngs.push(t),this.plotting.setLatLngs(this._latlngs);var i=this._markers.length;i>1&&this._markers[i-1].on("click",this._finishShape,this),i>2&&this._markers[i-2].off("click",this._finishShape,this)},_finishShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this),L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&this._latlngs.length+1<this.plotting.maxEditPts&&this._latlngs.length!==this.plotting.getLatLngs().length&&this.plotting.setLatLngs(this._latlngs);var t=this.plotting.clone();this._markerGroup.clearLayers(),this._markers=[],this._latlngs=[],this._temportary.removeFeatures(this.plotting),delete this.plotting,this.plotting=null,this._temportary.addFeatures(t),this.feature.addAvoidRegion(t),this._selectFeature(t);var e=new SuperMap.Plot.Transaction;e.transType=SuperMap.Plot.TransactionType.EDIT;var i=new SuperMap.Plot.TransactionInfo;i.layerId=this.feature.layer._leaflet_id,i.uuid=this.feature.uuid,i.functionName="addAvoidRegion",i.undoParams=[t],i.redoParams=[t],e.transInfos.push(i),L.supermap.plotting.getControl().getTransManager().add(e),t.on("contextmenu",function(){})},_onDragStart:function(t){var e=t.target,i=this._editMarkers[e.uuid];for(var o in i)i[o].setOpacity(0)},_onDrag:function(t){t.target.move(t.dLat,t.dLng)},_onDragEnd:function(t){var e=t.target;this._collectEditMarkers(e),this.moveend=!0},_onMouseMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent),i=this._map.layerPointToLatLng(e);if(this.plotting){var o=L.Util.cloneLatLngs(this._latlngs);0===o.length?o.push(i):o[o.length-1].lat===i.lat&&o[o.length-1].lng===i.lng||o.push(i),this.plotting.setLatLngs(o)}L.DomEvent.preventDefault(t.originalEvent)}}),It=(i(705),L.Path.extend({name:"子图层",caption:"子图层",visibility:!0,features:null,parent:null,initialize:function(t,e){e=e||{},L.Util.setOptions(this,e),null!=t&&(this.name=t),null!=e&&e.caption&&(this.caption=e.caption),this.features=[]},getParent:function(){return this.parent},setParent:function(t){this.parent=t},getVisibility:function(){return this.visibility},setVisibility:function(t){if(this.visibility!==t){this.visibility=t;for(let t=0;t<this.features.length;t++)if(this.features[t].redraw(),this._map&&this._map.getPlotEditControl()){if(Object.prototype.hasOwnProperty.call(this._map.getPlotEditControl()._editMarkers,this.features[t].uuid)){let e=this._map.getPlotEditControl()._editMarkers[this.features[t].uuid];for(let t in e)this.visibility?e[t].setOpacity(1):e[t].setOpacity(0)}null!=this.features[t].dragging&&null!=this.features[t].dragging.moveMarker&&(this.visibility?this.features[t].dragging.moveMarker.setOpacity(1):this.features[t].dragging.moveMarker.setOpacity(0))}}},addFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]);var e=t.slice();for(let i=0;i<t.length;i++)!(t[i]instanceof d)||t[i]instanceof ut||t[i]instanceof _?e.splice(i,1):(t[i].childLayer=this,this.features.push(t[i]));L.supermap.plotting.getControl().getPlotMapManager().fire("featuresadded",{features:e,parent:this,layername:this.name})},removeFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]);var e=t.slice();for(let l=0,s=t.length;l<s;l++){var i=t[l];if(-1!=SuperMap.Util.indexOf(this.features,i)){var o=SuperMap.Util.indexOf(this.features,i);-1!==o&&this.features.splice(o,1),i.childLayer=null}else e.splice(l,1)}e.length>0&&L.supermap.plotting.getControl().getPlotMapManager().fire("featuresremoved",{features:e,parent:this,layername:this.name})},removeAllFeatures:function(){this.removeFeatures(this.features.slice()),this.features=[]},getFeatures:function(){return this.features.slice()}}));L.supermap.plotting.childPlotLayer=function(t,e){return new It(t,e)};var Ct=Tt.extend({caption:"图元层",tolerancePixel:5,isLocked:!1,isEditable:!0,isSelected:!0,childPlotLayers:null,minVisibleScale:0,maxVisibleScale:0,addChildPlotLayer:function(t){let e=!0;for(;e;){e=!1;for(let i=0;i<this.childPlotLayers.length;i++)if(this.childPlotLayers[i].name===t.name){t.name+="#1",e=!0;break}}this.childPlotLayers.push(t),t.setParent(this),L.supermap.plotting.getControl().getPlotMapManager().fire("childplotlayeradded",{childPlotLayer:t,parent:this})},getChildPlotLayers:function(){return this.childPlotLayers},removeChildPlotLayer:function(t){this.removeFeatures(t.features.slice());var e=SuperMap.Util.indexOf(this.childPlotLayers,t);-1!==e&&this.childPlotLayers.splice(e,1),L.supermap.plotting.getControl().getPlotMapManager().fire("childplotlayerremoved",{childPlotLayer:t,parent:this})},getMinVisibleScale:function(){return null==this.minVisibleScale&&(this.minVisibleScale=0),this.minVisibleScale},setMinVisibleScale:function(t){this.minVisibleScale=t,this.maxVisibleScale>1e-7&&this.maxVisibleScale<t&&(this.minVisibleScale=this.maxVisibleScale)},getMaxVisibleScale:function(){return null==this.maxVisibleScale&&(this.maxVisibleScale=1),this.maxVisibleScale},setMaxVisibleScale:function(t){this.maxVisibleScale=t,this.maxVisibleScale>1e-7&&this.maxVisibleScale<t&&(this.maxVisibleScale=this.minVisibleScale)},clearVisibleScale:function(){this.minVisibleScale=0,this.maxVisibleScale=0},getSelected:function(){return this.isSelected},setSelected:function(t){this.isSelected!==t&&(this.isSelected=t,this._map&&this._map.getPlotEditControl()&&(this.isSelected?this._map.getPlotEditControl().enableEditFeatures(this.features):(this._map.getPlotEditControl().unselectFeatures(this.features),this._map.getPlotEditControl().disableEditFeatures(this.features))))},getEditable:function(){return this.isEditable},setEditable:function(t){if(this.isEditable!==t&&(this.isEditable=t,this._map&&this._map.getPlotEditControl())){var e=this._map.getPlotEditControl().getSelectedFeatures();this._map.getPlotEditControl().unselectFeatures(this.features),this._map.getPlotEditControl().selectFeatures(e)}},getLocked:function(){return this.isLocked},setLocked:function(t){if(this.isLocked!==t&&(this.isLocked=t,this._map&&this._map.getPlotEditControl())){var e=this._map.getPlotEditControl().getSelectedFeatures();this._map.getPlotEditControl().unselectFeatures(this.features),this._map.getPlotEditControl().selectFeatures(e)}},getVisibility:function(){return this.visibility},setVisibility:function(t){Tt.prototype.setVisibility.call(this,t)},initialize:function(t,e,i){this.childPlotLayers=[],this.features=[],this.visibility=!0,Tt.prototype.initialize.call(this,t,e,i),null!=i&&i.caption&&(this.caption=i.caption);var o=L.supermap.plotting.childPlotLayer("子图层",i);this.addChildPlotLayer(o),this.setVisibility(this.visibility),this.setSymScaleDefinition(L.supermap.plotting.getControl().getPlotMapManager().getSymScaleDefinition(),!0)},moveTo:function(t,e){var i=SuperMap.Util.indexOf(this.features,t);if(i!==e){var o=null,l=e;l>=0&&l<this.features.length&&(o=this.features[l]);for(var s=0;s<t.components.length;s++)0===e?this._renderer._bringToBack(t.components[s]):e===this.features.length-1?this._renderer._bringToFront(t.components[s]):null!=o&&this._renderer._afterTo(t.components[s],o.components[0]);this.features.splice(i,1),this.features.splice(e,0,t)}},getFeatureByUuid:function(t){for(var e=0;e<this.features.length;e++){if(this.features[e].uuid===t)return this.features[e];if(this.features[e]instanceof L.supermap.plotting.GroupObject||this.features[e]instanceof L.supermap.plotting.Route)for(var i=0;i<this.features[e].components.length;i++)if(this.features[e].components[i].uuid===t)return this.features[e].components[i]}return null},addFeatures:function(t,e){if(SuperMap.Util.isArray(t)||(t=[t]),0!==t.length){null==e&&(e=L.supermap.plotting.getControl().getPlotMapManager().getActiveChildPlotLayer());var i=SuperMap.Util.indexOf(this.getChildPlotLayers(),e);-1!==i?this.getChildPlotLayers()[i].addFeatures(t):this.getChildPlotLayers().length>0&&this.getChildPlotLayers()[0].addFeatures(t),this.fire(SuperMap.Plot.Event.beforefeaturesadded,{features:t}),Tt.prototype.addFeatures.call(this,t),this.fire(SuperMap.Plot.Event.featuresadded,{features:t,layername:this.name}),this._map.getPlotEditControl()&&this.isSelected&&this._map.getPlotEditControl().enableEditFeatures(t)}},removeFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]);for(let e=0;e<this.getChildPlotLayers().length;e++)this.getChildPlotLayers()[e].removeFeatures(t);this.fire(SuperMap.Plot.Event.beforefeaturesremoved,{features:t,layername:this.name}),Tt.prototype.removeFeatures.call(this,t),this.fire(SuperMap.Plot.Event.featuresremoved,{features:t,layername:this.name})},removeAllFeatures:function(){for(let t=0;t<this.getChildPlotLayers().length;t++)this.getChildPlotLayers()[t].removeFeatures(this.features);this.fire(SuperMap.Plot.Event.beforefeaturesremoved,{features:this.features}),Tt.prototype.removeAllFeatures.call(this),this.fire(SuperMap.Plot.Event.featuresremoved,{features:this.features,layername:this.name})},createSymbol:function(t,e,i,o,l,s,n,a){var r;if(s||(s={}),s.uuid=o,s.serverUrl=this.serverUrl,s.serviceParams=this.options.serviceParams,void 0!==s.symbolData&&null!==s.symbolData||!SuperMap.Plot.AlgoSymbolFactory.isAccessServer(t,e))if((r=L.supermap.plotting.PlottingObject.createSymbol(t,e,i,s,l,a)).subSymbols&&0!==r.subSymbols.length&&!SuperMap.Plot.AlgoSymbolFactory.isAccessServer(t,e)){for(var p=[],u=0,h=r.subSymbols.length;u<h;u++)null===r.subSymbols[u].symbolData&&(r.subSymbols[u].symbolData=this._getSymbolDataFromCache(r.subSymbols[u].libID,r.subSymbols[u].code),null===r.subSymbols[u].symbolData&&-1===SuperMap.Util.indexOf(p,r.subSymbols[u])&&p.push(r.subSymbols[u]));for(var g=p.slice(),c=0;c<p.length;c++){let t=new SuperMap.GetSymbolInfoParameters({libID:p[c].libID,code:p[c].code});L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(t,function(t){this._cacheSymbolData(t.result);for(var e=0,i=r.subSymbols.length;e<i;e++)if(null===r.subSymbols[e].symbolData&&r.subSymbols[e].libID===t.result.libID&&r.subSymbols[e].code===t.result.code){var o=SuperMap.Util.indexOf(g,r.subSymbols[e]);-1!==o&&g.splice(o,1),r.subSymbols[e].symbolData=SuperMap.Plot.PlottingUtil.cloneObject(t.result),0===g.length&&(r.isEdit=!1,this.addFeatures(r),"function"==typeof n&&n({feature:r}))}},this)}if(0===p.length)return this.addFeatures(r),"function"==typeof n&&n({feature:r}),r}else{if(!SuperMap.Plot.AlgoSymbolFactory.isAccessServer(t,e)||r.symbolData.innerCells)return this.addFeatures(r),"function"==typeof n&&n({feature:r}),r;{let t=Math.floor(1e3*Math.random()),e=new SuperMap.GetSymbolInfoParameters({libID:r.libID,code:r.code,surroundLineType:r.surroundLineType,scaleValues:r.scaleValues,subSymbols:r.subSymbols});e.inputPoints=L.Util.latLngsToSuperMapPoints(r.getLatLngs()),e.dynamicToken=t,L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(e,function(e){e.result.dynamicToken&&e.result.dynamicToken===SuperMap.MD5.md5(t.toString())&&(r.symbolData.innerCells=e.result.innerCells,this.addFeatures(r))},this)}}else{var y=null,P=!1;if(Object.prototype.hasOwnProperty.call(s,"symbolRank")||Object.prototype.hasOwnProperty.call(s,"surroundLineType")?P=!0:y=this._getSymbolDataFromCache(t,e),!y||P){let o=new SuperMap.GetSymbolInfoParameters({libID:t,code:e});i&&(o.inputPoints=L.Util.latLngsToSuperMapPoints(i)),Object.prototype.hasOwnProperty.call(s,"negativeImage")&&(o.negativeImage=s.negativeImage),Object.prototype.hasOwnProperty.call(s,"symbolRank")&&(o.symbolRank=s.symbolRank),Object.prototype.hasOwnProperty.call(s,"surroundLineType")&&(o.surroundLineType=s.surroundLineType);var S=Math.floor(1e3*Math.random());o.dynamicToken=S,L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(o,function(o){o.result.dynamicToken&&o.result.dynamicToken===SuperMap.MD5.md5(S.toString())&&(P||o.result.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL||(delete o.result.dynamicToken,this._cacheSymbolData(o.result)),s.symbolData=SuperMap.Plot.PlottingUtil.cloneObject(o.result),r=L.supermap.plotting.PlottingObject.createSymbol(t,e,i,s,l,a),this.addFeatures(r),"function"==typeof n&&n({feature:r}))},this)}else s.symbolData=y,r=L.supermap.plotting.PlottingObject.createSymbol(t,e,i,s,l,a),this.addFeatures(r),"function"==typeof n&&n({feature:r})}},createGroupObject:function(t,e){var i=[];for(var o in t)t[o]&&t[o]instanceof T&&i.push(t[o]);if(i.length>1){var l=new m(0,SuperMap.Plot.SymbolType.GROUPOBJECT,[],{subObjects:i,uuid:e});return this.addFeatures(l),l}return null},unGroupObject:function(t){var e=[];return t.symbolType===SuperMap.Plot.SymbolType.GROUPOBJECT||t.symbolType===SuperMap.Plot.SymbolType.FLAGGROUP?(e=t._unGroupObject(),t.destroy()):e.push(t),e},createLineRelation:function(t,e,i,o,l,s,n){s||(s={}),s.startAssociatedUuid=t,s.endAssociatedUuid=e,s.lineRelationType=i,s.uuid=o,s.custom=n;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.LINERELATION,null,s,l,n);return this.addFeatures(a),a},createInterferenceBeam:function(t,e,i,o,l,s){l||(l={}),l.associatedUuid=t,l.uuid=i,l.custom=s;var n=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.INTERFERENCEBEAM,e,l,o,s);return this.addFeatures(n),n},createSatellite:function(t,e,i,o,l,s,n,a,r){var p=this._getSymbolDataFromCache(t,e);if(null===p){var u=new SuperMap.GetSymbolInfoParameters({libID:t,code:e});L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(u,function(p){this._cacheSymbolData(p.result),n||(n={}),n.serverUrl=this.serverUrl,n.serviceParams=this.options.serviceParams,n.orbitPoints=i,n.textContent=o,n.uuid=l,n.custom=r,n.subSymbols=[{libID:t,code:e,symbolData:SuperMap.Plot.PlottingUtil.cloneObject(p.result),textContent:o}];var u=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SATELLITE,[],n,s,r);this.addFeatures(u),"function"==typeof a&&a({feature:u})},this)}else{n||(n={}),n.serverUrl=this.serverUrl,n.serviceParams=this.options.serviceParams,n.orbitPoints=i,n.textContent=o,n.uuid=l,n.custom=r,n.subSymbols=[{libID:t,code:e,symbolData:p,textContent:o}];var h=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SATELLITE,[],n,s,r);this.addFeatures(h),"function"==typeof a&&a({feature:h})}},createSatelliteTimeWindows:function(t,e,i,o,l,s){l||(l={}),l.associatedUuid=t,l.timeWindows=e,l.custom=s,l.uuid=i;var n=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS,[],l,o,s);return this.addFeatures(n),n},createSatelliteTimeWindows1:function(t,e,i,o,l,s){l||(l={}),l.associatedUuid=t;for(var n=0;n<e.length;n++)e[n].type="number";l.timeWindows=e,l.custom=s,l.uuid=i;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS,[],l,o,s);return this.addFeatures(a),a},createSatelliteTimeWindows2:function(t,e,i,o,l,s){l||(l={}),l.associatedUuid=t;for(var n=0;n<e.length;n++)e[n].type="Time";l.timeWindows=e,l.custom=s,l.uuid=i;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS,[],l,o,s);return this.addFeatures(a),a},createSymbolText:function(t,e,i,o,l,s){l||(l={}),l.associatedUuid=t,l.symbolTexts=e,l.custom=s,l.uuid=i;var n=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SYMBOLTEXT,[],l,o,s);return this.addFeatures(n),n},createSymbolText1:function(t,e,i,o,l,s){l||(l={}),l.associatedUuid=t,l.textContent=e,l.custom=s,l.uuid=i;var n=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SYMBOLTEXT1,[],l,o,s);return this.addFeatures(n),n},createNavyDeployment:function(t,e,i,o,l,s,n){if(l||(l={}),l.associatedUuid=t,l.custom=n,l.serverUrl=this.serverUrl,l.serviceParams=this.options.serviceParams,e&&0!==e.length){for(var a=[],r=0,p=e.length;r<p;r++)null===e[r].symbolData&&(e[r].symbolData=this._getSymbolDataFromCache(e[r].libID,e[r].code),null===e[r].symbolData&&-1===SuperMap.Util.indexOf(a,e[r])&&a.push(e[r]));if(0!==a.length)for(var u=a.slice(),h=0;h<a.length;h++){var g=new SuperMap.GetSymbolInfoParameters({libID:a[h].libID,code:a[h].code});L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(g,function(t){this._cacheSymbolData(t.result);for(var i=0,a=e.length;i<a;i++)if(null===e[i].symbolData&&e[i].libID===t.result.libID&&e[i].code===t.result.code){var r=SuperMap.Util.indexOf(u,e[i]);-1!==r&&u.splice(r,1),e[i].symbolData=SuperMap.Plot.PlottingUtil.cloneObject(t.result)}if(0===u.length){l.subSymbols=e;var p=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.NAVYDEPLOYMENT,[],l,o,n);this.addFeatures(p),"function"==typeof s&&s({feature:p})}},this)}else{l.subSymbols=e;var c=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.NAVYDEPLOYMENT,[],l,o,n);this.addFeatures(c),"function"==typeof s&&s({feature:c})}}},createAirDeployment:function(t,e,i,o,l,s,n){if(l||(l={}),l.associatedUuid=t,l.custom=n,l.serverUrl=this.serverUrl,l.serviceParams=this.options.serviceParams,e&&0!==e.length){for(var a=[],r=0,p=e.length;r<p;r++)null===e[r].symbolData&&(e[r].symbolData=this._getSymbolDataFromCache(e[r].libID,e[r].code),null===e[r].symbolData&&-1===SuperMap.Util.indexOf(a,e[r])&&a.push(e[r]));if(0!==a.length)for(var u=a.slice(),h=0;h<a.length;h++){var g=new SuperMap.GetSymbolInfoParameters({libID:a[h].libID,code:a[h].code});L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(g,function(t){this._cacheSymbolData(t.result);for(var i=0,a=e.length;i<a;i++)if(null===e[i].symbolData&&e[i].libID===t.result.libID&&e[i].code===t.result.code){var r=SuperMap.Util.indexOf(u,e[i]);-1!==r&&u.splice(r,1),e[i].symbolData=SuperMap.Plot.PlottingUtil.cloneObject(t.result)}if(0===u.length){l.subSymbols=e;var p=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.AIRDEPLOYMENT,[],l,o,n);this.addFeatures(p),"function"==typeof s&&s({feature:p})}},this)}else{l.subSymbols=e;var c=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.AIRDEPLOYMENT,[],l,o,n);this.addFeatures(c),"function"==typeof s&&s({feature:c})}}},createNavyRoute:function(t,e,i,o,l,s){l||(l={}),l.routeNodes=e,l.uuid=i,l.custom=s,l.arrRoutePts=t;var n=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.NAVYROUTE,[],l,o,s);return this.addFeatures(n),n},createMissileRoute:function(t,e,i,o,l,s){l||(l={}),l.routeNodes=e,l.uuid=i,l.custom=s,l.arrRoutePts=t;var n=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.MISSILEROUTE,[],l,o,s);return this.addFeatures(n),n},createAirRoute:function(t,e,i,o,l,s){l||(l={}),l.routeNodes=e,l.uuid=i,l.custom=s,l.arrRoutePts=t;var n=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.AIRROUTE,[],l,o,s);return this.addFeatures(n),n},createFlags:function(t,e,i){for(var o=[],l=0;l<t.length;l++)100===t[l].libID&&t[l].code>=2800&&t[l].code<=2900&&o.push(t[l]);var s=null;return o.length>1&&(s=new at(0,SuperMap.Plot.SymbolType.FLAGGROUP,[],{subObjects:o,ratio:e,uuid:i}),this.addFeatures(s)),s},createArcRegion:function(t,e,i,o,l,s,n,a,r,p,u){r||(r={}),r.centerPoint=t,r.radius=e,r.startAngle=i,r.endAngle=o,r.textContent=l,r.textPosition=s,r.uuid=n,r.custom=u;var h=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.ARCREGION,[],r,a,u);return this.addFeatures(h),h},geoJsonToFeature:function(t,e){this.geoJsonToFeature1(t,null,e)},geoJsonToFeature1:function(t,e,i){var o=JSON.parse(t),l=parseInt(o.libID),s=parseInt(o.code);if(o.isEdit=!0,!this._map.getFeatureByUuid(o.id))if(SuperMap.Plot.AlgoSymbolFactory.isAccessServer(l,s)){let t={};t.symbolRank=parseInt(o.symbolRank),t.surroundLineType=parseInt(o.surroundLineType);var n=!1;0===t.surroundLineType&&0===t.symbolRank||(n=!0);var a=this._getSymbolDataFromCache(l,s);if(n||null===a){let p=new SuperMap.GetSymbolInfoParameters({libID:l,code:s,symbolRank:t.symbolRank,surroundLineType:t.surroundLineType,inputPoints:o.localePoints,subSymbols:o.subSymbols});var r=this._map;L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(p,function(t){if(!t.result.libID||!t.result.code)return;t.result.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL||n||this._cacheSymbolData(t.result),a=SuperMap.Util.cloneObject(t.result),SuperMap.Plot.AnalysisSymbol.mergeSymbolDataAndServerData(o,a);let p={symbolData:o,serverUrl:this.serverUrl,serviceParams:this.options.serviceParams,isGeoJSONData:!0},u=L.supermap.plotting.PlottingObject.createSymbol(l,s,null,p);if(this.addFeatures(u,e),null!=o.lineRelations)for(let t=0;t<o.lineRelations.length;t++){var h=r.getFeatureByUuid(o.lineRelations[t]);null!=h&&(h.startAssociatedUuid===o.uuid?h.setStartFeature(o.uuid):h.endAssociatedUuid===o.uuid&&h.setEndFeature(o.uuid))}"function"==typeof i&&i({feature:u})},this)}else{SuperMap.Plot.AnalysisSymbol.mergeSymbolDataAndServerData(o,a);let t={symbolData:o,serverUrl:this.serverUrl,isGeoJSONData:!0},n=L.supermap.plotting.PlottingObject.createSymbol(l,s,null,t);this.addFeatures(n,e),"function"==typeof i&&i({feature:n})}}else if(o.subSymbols&&0!==o.subSymbols.length){for(var p=[],u=0,h=o.subSymbols.length;u<h;u++)if(!o.subSymbols[u].symbolData){var g=L.supermap.plotting.getControl(this._map,this.serverUrl,{serviceParams:this.options.serviceParams}).getSymbolLibManager().getSymbolLibByLibId(o.subSymbols[u].libID);if(g)g.querySymbolbyKey(s.toString()).length>0&&(o.subSymbols[u].symbolData=this._getSymbolDataFromCache(o.subSymbols[u].libID,o.subSymbols[u].code),null===o.subSymbols[u].symbolData&&-1===SuperMap.Util.indexOf(p,o.subSymbols[u])&&p.push(o.subSymbols[u]))}for(var c=p.slice(),y=0;y<p.length;y++){let t=new SuperMap.GetSymbolInfoParameters({libID:p[y].libID,code:p[y].code});L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(t,function(t){this._cacheSymbolData(t.result);for(var n=0,a=o.subSymbols.length;n<a;n++)if(null===o.subSymbols[n].symbolData&&o.subSymbols[n].libID===t.result.libID&&o.subSymbols[n].code===t.result.code){var r=SuperMap.Util.indexOf(c,o.subSymbols[n]);-1!==r&&c.splice(r,1),o.subSymbols[n].symbolData=SuperMap.Plot.PlottingUtil.cloneObject(t.result)}if(0===c.length){let t={symbolData:o,serverUrl:this.serverUrl,serviceParams:this.options.serviceParams,symbolType:o.symbolType,isGeoJSONData:!0},n=L.supermap.plotting.PlottingObject.createSymbol(l,s,null,t);this.addFeatures(n,e),"function"==typeof i&&i({feature:n})}},this)}if(0===p.length){let t={symbolData:o,serverUrl:this.serverUrl,serviceParams:this.options.serviceParams,symbolType:o.symbolType,isGeoJSONData:!0},n=L.supermap.plotting.PlottingObject.createSymbol(l,s,null,t);this.addFeatures(n,e),"function"==typeof i&&i({feature:n})}}else if(o.geometries&&0!==o.geometries.length){var P=[];for(u=0;u<o.geometries.length;u++){let t=parseInt(o.geometries[u].libID),e=parseInt(o.geometries[u].code);if(SuperMap.Plot.AlgoSymbolFactory.isAccessServer(t,e)&&!Object.prototype.hasOwnProperty.call(o.geometries[u],"innerCells")){let i=!0;for(var S=0;S<P.length;S++)if(P[S].libID===t&&P[S].code===e){i=!1;break}i&&P.push(o.geometries[u])}else o.geometries[u].subSymbols&&o.geometries[u].subSymbols.length}var d=P.slice();for(y=0;y<P.length;y++){if(null!=(a=this._getSymbolDataFromCache(P[y].libID,P[y].code))){var m=0;for(h=o.geometries.length;m<h;m++)if(o.geometries[m].libID===a.libID&&o.geometries[m].code===a.code){var f=SuperMap.Util.indexOf(d,o.geometries[m]);-1!==f&&d.splice(f,1),SuperMap.Plot.AnalysisSymbol.mergeSymbolDataAndServerData(o.geometries[m],a)}}else{let t=new SuperMap.GetSymbolInfoParameters({libID:P[y].libID,code:P[y].code});L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(t,function(t){this._cacheSymbolData(t.result);for(var n=0,a=o.geometries.length;n<a;n++)if(o.geometries[n].libID===t.result.libID&&o.geometries[n].code===t.result.code){var r=SuperMap.Util.indexOf(d,o.geometries[n]);-1!==r&&d.splice(r,1);let e=SuperMap.Util.cloneObject(t.result);SuperMap.Plot.AnalysisSymbol.mergeSymbolDataAndServerData(o.geometries[n],e)}if(0===d.length){let t={symbolData:o,serverUrl:this.serverUrl,serviceParams:this.options.serviceParams,symbolType:o.symbolType,isGeoJSONData:!0},n=L.supermap.plotting.PlottingObject.createSymbol(l,s,null,t);this.addFeatures(n,e),"function"==typeof i&&i({feature:n})}},this)}}if(0===d.length){let t={symbolData:o,serverUrl:this.serverUrl,serviceParams:this.options.serviceParams,symbolType:o.symbolType,isGeoJSONData:!0},n=L.supermap.plotting.PlottingObject.createSymbol(l,s,null,t);this.addFeatures(n,e),"function"==typeof i&&i({feature:n})}}else{let t={symbolData:o,serverUrl:this.serverUrl,serviceParams:this.options.serviceParams,symbolType:o.symbolType,isGeoJSONData:!0},n=L.supermap.plotting.PlottingObject.createSymbol(l,s,null,t);this.addFeatures(n,e),"function"==typeof i&&i({feature:n})}},_getFeatureFromEvent:function(t){var e=null;if(!this._map)return e;if(this.isSelected)for(var i=this._map.layerPointToLatLng(L.point(0,0)),o=this._map.layerPointToLatLng(L.point(this._clickTolerance(),0)),l=new SuperMap.Geometry.Point(i.lng,i.lat),s=new SuperMap.Geometry.Point(o.lng,o.lat),n=SuperMap.Plot.PlottingUtil.distance(l,s),a=this.features.length-1;a>=0&&null===(e=this._selectFeature(this.features[a],t.latlng,n));a--);return e},_isAvoidRegion:function(...t){if(0!==t.length){let o=null,l=!1;if(0===t[0].avoidRegions.length)return t[0];if(o=new wt(t[0]),this._map.addControl(o),l=!0){for(var e=0,i=t[0].avoidRegions.length;e<i;e++)this.removeFeatures(t[0].avoidRegions[e]);return this._map.removeControl(o),l=!1,t[0]}}},_selectFeature:function(t,e,i){if(null==t)return null;if(void 0!==t.style&&null!==t.style&&"none"===t.style.display)return null;if(!(t instanceof d))return null;if(t instanceof m){for(var o=0;o<t.components.length;o++)if(this._selectFeature(t.components[o],e,i))return t.isSelected?t.components[o]:t}else if(t instanceof yt){for(let o=0;o<t.components.length;o++)if(this._selectFeature(t.components[o],e,i))return t.components[o]===SuperMap.Plot.SymbolType.ROUTENODE||t.components[o]===SuperMap.Plot.SymbolType.LITERATESIGN?t.components[o]:t}else if(t.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT){for(let o=0;o<t.components.length;o++)if(this._selectFeature(e,i,t.components[o]))return t}else if(t.symbolType===SuperMap.Plot.SymbolType.ROUTENODE||t.symbolType===SuperMap.Plot.SymbolType.LITERATESIGN){var l=t.getBounds();if(l&&l.isValid()&&e.lng>=l.getWest()&&e.lng<=l.getEast()&&e.lat>=l.getSouth()&&e.lat<=l.getNorth())return t}else{var s=this._map.latLngToLayerPoint(e);for(let e=0,i=t.components.length;e<i;e++)if(t.components[e]._containsPoint&&t.components[e]._containsPoint(s))return t}return null}});L.supermap.plotting.plottingLayer=function(t,e,i){return new Ct(t,e,i)};L.Util.bounds=function(t){L.Util.isArray(t)||(t=[t]);for(var e=L.latLngBounds(),i=0;i<t.length;i++)L.Util.isArray(t[i])?e.extend(L.Util.bounds(t[i])):e.extend(t[i]);return e},L.Util.latLngsToSuperMapPoints=function(t){var e=[];L.Util.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++)e.push(new SuperMap.Geometry.Point(t[i].lng,t[i].lat));return e},L.Util.superMapPointsToLatLngs=function(t){var e=[];L.Util.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++)void 0!==t[i]&&e.push(L.latLng(t[i].y,t[i].x));return e},L.Util.cloneLatLngs=function(t){var e=[];L.Util.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++)L.Util.isArray(t[i])?e.push(L.Util.cloneLatLngs(t[i])):e.push(t[i].clone());return e},L.Util.moveLatLngs=function(t,e,i){L.Util.isArray(t)||(t=[t]);for(var o=0;o<t.length;o++)L.Util.isArray(t[o])?L.Util.moveLatLngs(t[o],e,i):(t[o].lat+=e,t[o].lng+=i)},L.Util.rotateLatLngs=function(t,e,i){L.Util.isArray(t)||(t=[t]);for(var o=i*(Math.PI/180),l=Math.cos(o),s=Math.sin(o),n=0;n<t.length;n++)if(L.Util.isArray(t[n]))L.Util.rotateLatLngs(t[n],e,i);else{var a=t[n].lat-e.lat,r=t[n].lng-e.lng;t[n].lat=r*s+a*l+e.lat,t[n].lng=r*l-a*s+e.lng}},L.Util.rotateBounds=function(t,e,i){if(t instanceof L.LatLngBounds){var o=L.latLngBounds(),l=i*(Math.PI/180),s=Math.cos(l),n=Math.sin(l),a=[];a.push(L.latLng(t.getNorth(),t.getWest())),a.push(L.latLng(t.getNorth(),t.getEast())),a.push(L.latLng(t.getSouth(),t.getWest())),a.push(L.latLng(t.getSouth(),t.getEast()));for(let t=0;t<a.length;t++){let i=a[t].lat-e.lat,l=a[t].lng-e.lng;a[t].lat=l*n+i*s+e.lat,a[t].lng=l*s-i*n+e.lng,o.extend(a[t])}return o}},L.Util.resizeLatLngs=function(t,e,i){L.Util.isArray(t)||(t=[t]);for(var o=0;o<t.length;o++)L.Util.isArray(t[o])?L.Util.resizeLatLngs(t[o],e,i):(t[o].lat=e.lat+i*(t[o].lat-e.lat),t[o].lng=e.lng+i*(t[o].lng-e.lng))},L.Util.conventProjectPts=function(t){var e=[];L.Util.isArray(t)||(t=[t]);for(var i=0,o=t.length;i<o;i++)e.push(L.CRS.EPSG3857.project(t[i]));return e},L.Util.unConventProjectPts=function(t){var e=[];L.Util.isArray(t)||(t=[e]);for(var i=0,o=t.length;i<o;i++)e.push(L.CRS.EPSG3857.unproject(t[i]));return e},L.Util.isMercatorProjection=function(t){if(void 0!==t&&"string"==typeof t)switch(t.toUpperCase()){case"EPSG:3857":return!0;case"EPSG:4326":default:return!1}},L.Util.isPlottingLayer=function(t){return t instanceof Ct};var Et=y.extend({redrawAnchor:null,redrawSize:null,lastStyleKey:null,lastMainKey:null,lastSymbolTextKey:null,lastBloodVolumeKey:null,lastAnnotationKey:null,lastPictureFrameKey:null,images:null,annotation:null,pictureFrames:null,symbolTexts:null,bloodVolumes:null,componentLatLngs:null,initialize:function(t,e){this.feature=t,e=e||{},L.Util.setOptions(this,e),this.canvasEle=document.createElement("canvas"),this.canvasEle.width=0,this.canvasEle.height=0,this._ctx=this.canvasEle.getContext("2d"),this.images=[],this.symbolTexts=[],this.bloodVolumes=[],this.pictureFrames=[],this.componentLatLngs=[]},render:function(){this._redrawFeature()},complete:function(){if(!(null!=this.pictureFrames&&0!==this.pictureFrames.length||null!=this.images&&0!==this.images.length))return!0;for(let t=0;t<this.pictureFrames.length;t++)if(null!=L.supermap.plotting.getControl().imageManager[this.pictureFrames[t].path]&&!0!==L.supermap.plotting.getControl().imageManager[this.pictureFrames[t].path].complete)return!1;for(let t=0;t<this.images.length;t++)if(null!=L.supermap.plotting.getControl().imageManager[this.images[t].path]&&!0!==L.supermap.plotting.getControl().imageManager[this.images[t].path].complete)return!1;return!0},getBounds:function(t,e){if(this.feature.symbolType===SuperMap.Plot.SymbolType.PICTURE)return this.feature.getBounds();{var i=new L.LatLngBounds;let l=t.lat-this.latLng.lat,s=t.lng-this.latLng.lng,n=this.feature._map.getZoomScale(this.fromZoom,this.feature._map.getZoom());for(var o=0;o<this.componentLatLngs.length;o++){let a=L.Util.cloneLatLngs(this.componentLatLngs[o]);L.Util.moveLatLngs(a,l,s),L.Util.resizeLatLngs(a,t,n),L.Util.rotateLatLngs(a,t,e),i.extend(L.Util.bounds(a))}return i}},getComponentLatLngs:function(){this.componentLatLngs.length=0;for(var t=0;t<this.feature.components.length;t++){var e=this.feature.components[t];e.isLeadLine||e.isAnnotation||e.isSymbolText||e.isBloodVolume||e.isPictureFrame||this.componentLatLngs.push(e.getLatLngs())}},_redrawFeature:function(){if(0===this.feature.components.length){this.latLng=L.latLng(this.feature.getLatLngs()[0].lat,this.feature.getLatLngs()[0].lng),this.fromZoom=this.feature._map.getZoom();let t=this.feature.dRotate;this.feature.dRotate=0,this.feature._calculateParts(),this.feature.dRotate=t,this.lastStyleKey=this._generateFromFeatureStyle(this.feature.style),this.lastMainKey=this._generateFromFeature(),this.lastAnnotationKey=this._generateFromAnnotation(),this.lastSymbolTextKey=this._generateFromSymbolText(),this.lastPictureFrameKey=this._generateFromPictureFrame(),this.lastBloodVolumeKey=this._generateFromBloodVolume(),this.bounds=L.latLngBounds(L.latLng(this.feature.getBounds().getNorth(),this.feature.getBounds().getWest()),L.latLng(this.feature.getBounds().getSouth(),this.feature.getBounds().getEast())),this.getComponentLatLngs(),this._drawFeatures(),this._drawAnnotation(),this._drawSymbolText(),this._drawBloodVolume(),this._drawPictureFrame()}else{let t=this._generateFromFeature();if(this.lastMainKey!==t){for(let t in this.feature.components)delete this.feature.components[t];this.feature.components.length=0;let e=this.feature.dRotate;this.feature.dRotate=0,this.feature._calculateParts(),this.feature.dRotate=e,this.lastMainKey=t,this.lastAnnotationKey=this._generateFromAnnotation(),this.lastSymbolTextKey=this._generateFromSymbolText(),this.lastPictureFrameKey=this._generateFromPictureFrame(),this.lastBloodVolumeKey=this._generateFromBloodVolume(),this.lastStyleKey=this._generateFromFeatureStyle(this.feature.style),this.fromZoom=this.feature._map.getZoom(),this.latLng=L.latLng(this.feature.getLatLngs()[0].lat,this.feature.getLatLngs()[0].lng),this.bounds=L.latLngBounds(L.latLng(this.feature.getBounds().getNorth(),this.feature.getBounds().getWest()),L.latLng(this.feature.getBounds().getSouth(),this.feature.getBounds().getEast())),this.getComponentLatLngs(),this._drawFeatures(),this._drawAnnotation(),this._drawSymbolText(),this._drawBloodVolume(),this._drawPictureFrame()}else{let t=this._generateFromAnnotation();this.lastAnnotationKey!==t&&(this.feature._handleAnnotation(this._scaleBounds(this.bounds)),this._drawAnnotation(),this.lastAnnotationKey=t);let e=this._generateFromSymbolText();this.lastSymbolTextKey!==e&&(this.feature._calculateLabel(this._scaleBounds(this.bounds),this.latLng),this._drawSymbolText(),this.lastSymbolTextKey=e);let i=this._generateFromBloodVolume();this.lastBloodVolumeKey!==i&&(this.feature._calculateBloodVolume(this._scaleBounds(this.bounds),this.latLng),this._drawBloodVolume(),this.lastBloodVolumeKey=i);let o=this._generateFromPictureFrame();this.lastPictureFrameKey!==o&&(this.feature._calculatePictureFrame(this._scaleBounds(this.bounds)),this._drawPictureFrame(),this.lastPictureFrameKey=o)}let e=this._generateFromFeatureStyle(this.feature.style);if(this.lastStyleKey!==e&&"function"==typeof this.feature._copyStyleForCell){for(let t in this.feature.components){let e=this.feature.components[t];if(e.isSymbolText||e.isBloodVolume||e.isPictureFrame)continue;let i=e.options;this.feature._copyStyleForCell(i,this.feature.style,e),L.setOptions(e,i)}8===this.feature.annotationPosition&&0!==this.feature.textContent.length&&this.feature._handleAnnotation(this._scaleBounds(this.bounds)),this._drawFeatures(),this._drawAnnotation()}this.lastStyleKey=e}this._computeRedrawSize()},getCacheInfo:function(){var t=document.createElement("canvas"),e=t.getContext("2d");t.width=this.canvas.width,t.height=this.canvas.height,e.clearRect(0,0,t.width,t.height),e.drawImage(this.canvas,0,0);let i={canvas:e.canvas,anchor:L.point(this.anchor.x,this.anchor.y),size:[this.size[0],this.size[1]],redrawSize:[this.redrawSize[0],this.redrawSize[1]],redrawAnchor:L.point(this.redrawAnchor.x,this.redrawAnchor.y),bounds:L.latLngBounds(this.bounds.getSouthEast(),this.bounds.getNorthWest()),fromZoom:this.fromZoom,latLng:L.latLng(this.latLng.lat,this.latLng.lng),componentLatLngs:[]};for(var o=0;o<this.componentLatLngs.length;o++)i.componentLatLngs.push(L.Util.cloneLatLngs(this.componentLatLngs[o]));null!=this.annotation&&(i.annotation=this.annotation.getCacheInfo()),i.images=[];for(let t=0;t<this.images.length;t++){let e={};e=SuperMap.Util.copyAttributes(e,this.images[t]),i.images.push(e)}i.pictureFrames=[];for(let t=0;t<this.pictureFrames.length;t++){let e={};e=SuperMap.Util.copyAttributes(e,this.pictureFrames[t]),i.pictureFrames.push(e)}i.symbolTexts=[];for(let t=0;t<this.symbolTexts.length;t++)i.symbolTexts.push(this.symbolTexts[t].getCacheInfo());i.bloodVolumes=[];for(let t=0;t<this.bloodVolumes.length;t++)i.bloodVolumes.push(this.bloodVolumes[t].getCacheInfo());return i},generateUuidFromFeature:function(){var t="";return this.feature.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL?(t+=this._generateFromFeature(),t+="_"+this._generateFromAnnotation(),t+="_"+this._generateFromSymbolText(),t+="_"+this._generateFromBloodVolume(),t+="_"+this._generateFromPictureFrame(),t+="_"+this._generateFromFeatureStyle(this.feature.style)):this.feature.symbolType===SuperMap.Plot.SymbolType.PICTURE?(t=this.feature.libID.toString()+"_"+this.feature.code.toString()+"_"+this.feature.path+this.feature.style.graphicWidth+this.feature.style.graphicHeight+this.feature.style.graphicXOffset+this.feature.style.graphicYOffset,t+="_"+this._generateFromSymbolText(),t+="_"+this._generateFromBloodVolume()):this.feature.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT?(t=this.feature.libID.toString()+"_"+this.feature.code.toString()+"_"+this.feature.associatedUuid+"_"+this.feature.addFrame.toString(),t+="_"+this._generateFromSymbolText()):this.feature.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1&&(t=this.feature.libID.toString()+"_"+this.feature.code.toString()+"_"+this.feature.associatedUuid+"_"+this.feature.textContent+"_"+this.feature.space.toString()+"_"+this.feature.offsetX.toString()+"_"+this.feature.offsetY.toString(),t+="_"+this._generateFromFeatureStyle(this.feature.style)),t},_computeImageSize:function(){var t=this._scaleBounds(this.bounds),e=new L.Bounds;e.extend(this.feature._map.latLngToLayerPoint(t.getNorthEast())),e.extend(this.feature._map.latLngToLayerPoint(t.getNorthWest())),e.extend(this.feature._map.latLngToLayerPoint(t.getSouthEast())),e.extend(this.feature._map.latLngToLayerPoint(t.getSouthWest()));let i=new L.Bounds(e.min,e.max);this.leftTopPixel=L.point(e.min.x,e.min.y);let o=i.getSize();o.x+=2*this.feature.style.weight,o.y+=2*this.feature.style.weight,this.anchor=this._latlngToLayerPoint([this.latLng])[0],this.size=[o.x,o.y]},_computeRedrawSize:function(){var t=this._scaleBounds(this.bounds),e=this.getBounds(this.latLng,this.feature.dRotate);let i=e.getWest()-t.getWest(),o=e.getEast()-t.getEast(),l=e.getNorth()-t.getNorth(),s=e.getSouth()-t.getSouth();if(this.feature.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL||this.feature.symbolType===SuperMap.Plot.SymbolType.PICTURE)for(let e in this.feature.components){let i=this.feature.components[e];(i.isAnnotation||i.isSymbolText||i.isBloodVolume||i.isPictureFrame)&&t.extend(i.getBounds?i.getBounds():i.getLatLng())}var n=new L.Bounds;n.extend(this.feature._map.latLngToLayerPoint(L.latLng(t.getNorth()+l,t.getEast()+o))),n.extend(this.feature._map.latLngToLayerPoint(L.latLng(t.getNorth()+l,t.getWest()+i))),n.extend(this.feature._map.latLngToLayerPoint(L.latLng(t.getSouth()+s,t.getEast()+o))),n.extend(this.feature._map.latLngToLayerPoint(L.latLng(t.getSouth()+s,t.getWest()+i))),this.leftTopPixel=L.point(n.min.x,n.min.y);var a=n.getSize(),r=this.feature.style.weight;a.x+=2*r,a.y+=2*r,this.redrawAnchor=this._latlngToLayerPoint([this.latLng])[0],this.redrawSize=[a.x,a.y]},_latlngToLayerPoint:function(t,e){null==e&&(e=this.fromZoom);let i=this.feature._map.getZoomScale(e,this.feature._map.getZoom()),o=this.latLng;var l=[];for(let e=0;e<t.length;e++){let n=o.lat+i*(t[e].lat-o.lat),a=o.lng+i*(t[e].lng-o.lng);var s=this.feature._map.latLngToLayerPoint(L.latLng(n,a));s.x=s.x-this.leftTopPixel.x+this.feature.style.weight,s.y=s.y-this.leftTopPixel.y+this.feature.style.weight,l.push(s)}return l},_scaleBounds:function(t){if(this.fromZoom!==this.feature._map.getZoom()){let e=this.feature._map.getZoomScale(this.fromZoom,this.feature._map.getZoom()),i=this.latLng,o=i.lat+e*(t.getNorth()-i.lat),l=i.lat+e*(t.getSouth()-i.lat),s=i.lng+e*(t.getWest()-i.lng),n=i.lng+e*(t.getEast()-i.lng);return L.latLngBounds(L.latLng(o,s),L.latLng(l,n))}return L.latLngBounds(L.latLng(t.getNorth(),t.getWest()),L.latLng(t.getSouth(),t.getEast()))},_scaleCompount:function(t){if(this.fromZoom!==this.feature._map.getZoom()){let e=this.feature._map.getZoomScale(this.fromZoom,this.feature._map.getZoom()),i=this.latLng,o=i.lat+e*(t.getNorth()-i.lat),l=i.lat+e*(t.getSouth()-i.lat),s=i.lng+e*(t.getWest()-i.lng),n=i.lng+e*(t.getEast()-i.lng);return L.latLngBounds(L.latLng(o,s),L.latLng(l,n))}return L.latLngBounds(L.latLng(t.getNorth(),t.getWest()),L.latLng(t.getSouth(),t.getEast()))},_drawFeatures:function(){for(var t in this.images.length=0,this._computeImageSize(),this.canvasEle.width=this.size[0],this.canvasEle.height=this.size[1],this._ctx.clearRect(0,0,this.canvasEle.width,this.canvasEle.height),this.canvas=this._ctx.canvas,this._ctx.translate(0,0),this.feature.components){var e=this.feature.components[t];!0!==e.isSymbolText&&!0!==e.isBloodVolume&&!0!==e.isPictureFrame&&!0!==e.isAnnotation&&(c&&e instanceof c?this.images.push(this._drawImage(e,this._ctx)):g&&e instanceof g?this._drawText(e,this._ctx):L.Rectangle&&e instanceof L.Rectangle?this._drawRectangle(e,this._ctx):L.Polygon&&e instanceof L.Polygon?this._drawPolygon(e,this._ctx):L.Polyline&&e instanceof L.Polyline&&this._drawPolyline(e,this._ctx))}},_drawAnnotation:function(){var t=!1,e=this._scaleBounds(this.bounds);this.latLng;for(let o=0;o<this.feature.components.length;o++)if(!0===this.feature.components[o].isAnnotation&&8!==this.feature.annotationPosition){t=!0;var i=null;switch(this.feature.annotationPosition){case SuperMap.Plot.AnnoPosition.LEFTTOP:i=L.latLng(e.getNorth(),e.getWest());break;case SuperMap.Plot.AnnoPosition.LEFTBOTTOM:i=L.latLng(e.getSouth(),e.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHTTOP:i=L.latLng(e.getNorth(),e.getEast());break;case SuperMap.Plot.AnnoPosition.RIGHTBOTTOM:i=L.latLng(e.getSouth(),e.getEast());break;case SuperMap.Plot.AnnoPosition.TOP:i=L.latLng(e.getNorth(),(e.getWest()+e.getEast())/2);break;case SuperMap.Plot.AnnoPosition.BOTTOM:i=L.latLng(e.getSouth(),(e.getWest()+e.getEast())/2);break;case SuperMap.Plot.AnnoPosition.LEFT:i=L.latLng((e.getSouth()+e.getNorth())/2,e.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHT:i=L.latLng((e.getSouth()+e.getNorth())/2,e.getEast())}null==this.annotation?(this.annotation=new P(this.feature,[this.feature.components[o]],i,this.feature.annotationPosition,0,0,this.options),this.annotation.render()):(this.annotation.clear(),this.annotation.setComponents([this.feature.components[o]],i,this.feature.annotationPosition,0,0));break}!1===t&&null!=this.annotation&&(delete this.annotation,this.annotation=null)},_drawSymbolText:function(){var t=this._scaleBounds(this.bounds),e=this.latLng;for(let l=0;l<this.feature.symbolTextComponents.length;l++){var i=null;switch(this.feature.symbolTexts[l].textPosition){case SuperMap.Plot.AnnoPosition.LEFTTOP:i=L.latLng(t.getNorth(),t.getWest());break;case SuperMap.Plot.AnnoPosition.LEFTBOTTOM:i=L.latLng(t.getSouth(),t.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHTTOP:i=L.latLng(t.getNorth(),t.getEast());break;case SuperMap.Plot.AnnoPosition.RIGHTBOTTOM:i=L.latLng(t.getSouth(),t.getEast());break;case SuperMap.Plot.AnnoPosition.TOP:i=L.latLng(t.getNorth(),(t.getWest()+t.getEast())/2);break;case SuperMap.Plot.AnnoPosition.BOTTOM:i=L.latLng(t.getSouth(),(t.getWest()+t.getEast())/2);break;case SuperMap.Plot.AnnoPosition.LEFT:i=L.latLng((t.getSouth()+t.getNorth())/2,t.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHT:i=L.latLng((t.getSouth()+t.getNorth())/2,t.getEast());break;case SuperMap.Plot.AnnoPosition.ANCHOR:i=L.latLng(e.lat,e.lng)}if(this.symbolTexts.length<=l){var o=new P(this.feature,this.feature.symbolTextComponents[l],i,this.feature.symbolTexts[l].textPosition,0,0,this.options);o.render(),this.symbolTexts.push(o)}else this.symbolTexts[l].clear(),this.symbolTexts[l].setComponents(this.feature.symbolTextComponents[l],i,this.feature.symbolTexts[l].textPosition,0,0)}for(let t=this.feature.symbolTextComponents.length;t<this.symbolTexts.length;)delete this.symbolTexts[t],this.symbolTexts.splice(t,1)},_drawBloodVolume:function(){for(let o=0;o<this.feature.bloodVolumeComponents.length;o++){var t=this._scaleBounds(this.bounds),e=null;switch(this.feature.bloodVolumes[o].position){case SuperMap.Plot.AnnoPosition.TOP:e=L.latLng(t.getNorth(),(t.getWest()+t.getEast())/2);break;case SuperMap.Plot.AnnoPosition.BOTTOM:e=L.latLng(t.getSouth(),(t.getWest()+t.getEast())/2);break;case SuperMap.Plot.AnnoPosition.LEFT:e=L.latLng((t.getSouth()+t.getNorth())/2,t.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHT:e=L.latLng((t.getSouth()+t.getNorth())/2,t.getEast())}if(this.bloodVolumes.length<=o){var i=new P(this.feature,this.feature.bloodVolumeComponents[o],e,this.feature.bloodVolumes[o].position,0,0,this.fromZoom,this.options);i.render(),this.bloodVolumes.push(i)}else this.bloodVolumes[o].clear(),this.bloodVolumes[o].setComponents(this.feature.bloodVolumeComponents[o],e,this.feature.bloodVolumes[o].position,0,0,this.fromZoom)}for(let t=this.feature.bloodVolumeComponents.length;t<this.bloodVolumes.length;)delete this.bloodVolumes[t],this.bloodVolumes.splice(t,1)},_drawPictureFrame:function(){if(this.pictureFrames.length=0,null!=this.feature.pictureFrameComponents)for(let i=0;i<this.feature.pictureFrameComponents.length;i++){var t=this.feature.pictureFrames[i].offsetX,e=this.feature.pictureFrames[i].offsetY;let o=this.feature.pictureFrameComponents[i][0];if(c&&o instanceof c){let l=this._drawImage(o,this._ctx);this.pictureFrames.push({path:l.path,style:l.style,position:this.feature.pictureFrames[i].position,offsetX:t,offsetY:e})}}},_generateFromFeature:function(){var t="";return this.feature.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL?t=this.feature.libID.toString()+"_"+this.feature.code.toString()+"_"+Math.round(this.feature.symbolSize.w).toString()+"_"+Math.round(this.feature.symbolSize.h).toString()+"_"+ +this.feature.dRotate.toString()+"_"+this.feature.symbolRank.toString()+this.feature.surroundLineType.toString()+this.feature.textContent+this.feature.annotationPosition:this.feature.symbolType===SuperMap.Plot.SymbolType.PICTURE&&(t=this.feature.libID.toString()+"_"+this.feature.code.toString()+"_"+this.feature.path+this.feature.style.graphicWidth+this.feature.style.graphicHeight+this.feature.style.graphicXOffset+this.feature.style.graphicYOffset,t+="_"+this._generateFromSymbolText(),t+="_"+this._generateFromBloodVolume()),t},_generateFromAnnotation:function(){return this.feature.textContent+"_"+this.feature.annotationPosition.toString()},_generateFromSymbolText:function(){var t="";if(null==this.feature.symbolTexts)return t;for(var e=0;e<this.feature.symbolTexts.length;e++){var i=this.feature.symbolTexts[e];null!=i.textContent&&(t+="_"+i.textContent),null!=i.textPosition&&(t+="_"+i.textPosition.toString()),null!=i.offsetX&&(t+="_"+i.offsetX.toString()),null!=i.offsetY&&(t+="_"+i.offsetY.toString()),null!=i.border&&(t+="_"+i.border.toString()),null!=i.showRelationLine&&(t+="_"+i.showRelationLine.toString()),null!=i.paddingX&&(t+="_"+i.paddingX.toString()),null!=i.paddingY&&(t+="_"+i.paddingY.toString()),null!=i.style&&(t+=this._generateFromFeatureStyle(i.style)),null!=i.lineStyle&&(null!=i.lineStyle.color&&(t+="_"+i.lineStyle.color),null!=i.lineStyle.lineSymbolID&&(t+="_"+i.lineStyle.lineSymbolID),null!=i.lineStyle.opacity&&(t+="_"+i.lineStyle.opacity),null!=i.lineStyle.weight&&(t+="_"+i.lineStyle.weight))}return t},_generateFromBloodVolume:function(){var t="";if(null==this.feature.bloodVolumes)return t;for(var e=0;e<this.feature.bloodVolumes.length;e++){var i=this.feature.bloodVolumes[e];null!=i.volume&&(t+="_"+i.volume),null!=i.position&&(t+="_"+i.position.toString()),null!=i.offsetX&&(t+="_"+i.offsetX.toString()),null!=i.offsetY&&(t+="_"+i.offsetY.toString()),null!=i.width&&(t+="_"+i.width.toString()),null!=i.height&&(t+="_"+i.height.toString()),null!=i.style&&(null!=i.style.color&&(t+="_"+i.style.color),null!=i.style.opacity&&(t+="_"+i.style.opacity.toString()),null!=i.style.weight&&(t+="_"+i.style.weight.toString()),null!=i.style.remainingVolumeColor&&(t+="_"+i.style.remainingVolumeColor),null!=i.style.remainingVolumeOpacity&&(t+="_"+i.style.remainingVolumeOpacity.toString()),null!=i.style.consumeVolumeColor&&(t+="_"+i.style.consumeVolumeColor),null!=i.style.consumeVolumeOpacity&&(t+="_"+i.style.consumeVolumeOpacity.toString()))}return t},_generateFromPictureFrame:function(){var t="";if(null==this.feature.pictureFrames)return t;for(var e=0;e<this.feature.pictureFrames.length;e++){var i=this.feature.pictureFrames[0];null!=i.path&&(t+="_"+i.path),null!=i.position&&(t+="_"+i.position.toString()),null!=i.offsetX&&(t+="_"+i.offsetX.toString()),null!=i.offsetY&&(t+="_"+i.offsetY.toString()),null!=i.width&&(t+="_"+i.width.toString()),null!=i.height&&(t+="_"+i.height.toString())}return t},_generateFromFeatureStyle:function(t){var e="";return null!=t.fontFamily&&(e+=t.fontFamily),null!=t.fontSize&&(e+="_"+t.fontSize),null!=t.fontColor&&(e+="_"+t.fontColor),null!=t.fontStroke&&(e+="_"+t.fontStroke),null!=t.fontStrokeColor&&(e+="_"+t.fontStrokeColor),null!=t.fontStrokeWidth&&(e+="_"+t.fontStrokeWidth),null!=t.fontBackground&&(e+="_"+t.fontBackground),null!=t.fontBackgroundColor&&(e+="_"+t.fontBackgroundColor),null!=t.fontShadow&&(e+="_"+t.fontShadow),null!=t.fontShadowColor&&(e+="_"+t.fontShadowColor),null!=t.fontShadowOffsetX&&(e+="_"+t.fontShadowOffsetX),null!=t.fontShadowOffsetY&&(e+="_"+t.fontShadowOffsetY),null!=t.color&&(e+="_"+t.color),null!=t.weight&&(e+="_"+t.weight),null!=t.opacity&&(e+="_"+t.opacity),null!=t.lineSymbolID&&(e+="_"+t.lineSymbolID),null!=t.dashArray&&(e+="_"+t.dashArray),null!=t.fill&&(e+="_"+t.fill),null!=t.fillSymbolID&&(e+="_"+t.fillSymbolID),null!=t.fillColor&&(e+="_"+t.fillColor),null!=t.fillOpacity&&(e+="_"+t.fillOpacity),null!=t.fillBackColor&&(e+="_"+t.fillBackColor),null!=t.fillBackOpacity&&(e+="_"+t.fillBackOpacity),null!=t.fillGradientMode&&(e+="_"+t.fillGradientMode),null!=t.surroundLineColor&&(e+="_"+t.surroundLineColor),null!=t.surroundLineColorOpacity&&(e+="_"+t.surroundLineColorOpacity),null!=t.surroundLineWidth&&(e+="_"+t.surroundLineWidth),e}});L.supermap.plotting.dotSymbolStyle=function(t){return new Et(t)};var Dt=Tt.extend({addFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]),Tt.prototype.addFeatures.call(this,t)}});L.supermap.plotting.animationLayer=function(t,e){return new Dt(t,e)};var Ut=L.Evented.extend({options:{position:"topright"},initialize:function(t){L.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),o=t._controlCorners[i];return L.DomUtil.addClass(e,"leaflet-control"),-1!==i.indexOf("bottom")?o.insertBefore(e,o.firstChild):o.appendChild(e),this},remove:function(){return this._map?(L.DomUtil.remove(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}});L.Map.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=L.DomUtil.create("div",e+"control-container",this._container);function o(o,l){var s=e+o+" "+e+l;t[o+l]=L.DomUtil.create("div",s,i)}o("top","left"),o("top","right"),o("bottom","left"),o("bottom","right")},_clearControlPos:function(){L.DomUtil.remove(this._controlContainer)}});var Nt=Ut.extend({_mouseTolerance:10,_polyline:null,_currentpolyline:null,_editMarkers:null,wayAnimation:null,wayPath:[],_able:null,options:{wayAnimationStyle:{fill:!1,color:"#ff0000",dashArray:"2, 2",opacity:1,weight:1},draggable:!0,avoidIcon:L.divIcon({className:"leaflet-supermap-plot-avoid-icon-path",iconSize:[8,8]}),icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"})},initialize:function(t){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&(this.options.avoidIcon=L.divIcon({className:"leaflet-supermap-plot-avoid-icon-path",iconSize:[15,15]}),this.options.icon=new L.DivIcon({iconSize:new L.Point(15,15),className:"leaflet-div-icon leaflet-editing-icon"})),L.Control.prototype.initialize.call(this,t),L.setOptions(this,t),this._editMarkers={},this._polyline=null,this._lineType=null},onAdd:function(t){return this.controlDiv=L.DomUtil.create("div","supermap-iclient-wayanmation"),this._map=t,this._markers=[],this._latlngs=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._map.on("mousemove",this._onMouseMove,this).on("click",this._onMapClick,this),this.controlDiv},onRemove:function(){this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,delete this._latlngs,this._polyline&&(delete this._polyline,this._polyline=null),this._map.off("mousemove",this._onMouseMove,this).off("click",this._onMapClick,this)},setWayAnimation(t){this.wayAnimation=t,this._lineType=this.wayAnimation.getGOAnimationType();try{if(this._lineType!=SuperMap.Plot.GOAnimationType.ANIMATION_BROKENLINE_EXP&&this._lineType!=SuperMap.Plot.GOAnimationType.ANIMATION_CURVE_EXP)throw new Error("The type of animation is error!");null!=this.wayAnimation.path&&(this._currentpolyline=this.wayAnimation.path)}catch(t){console.log(t.message)}},setSelected(){if(null==this._currentpolyline)return!1;let t=this._currentpolyline._leaflet_id,e=this._map.getLayer(t);this._collectEditMarkers(e)},unSelected(){if(null==this._currentpolyline)return!1;let t=this._currentpolyline._leaflet_id,e=this._map.getLayer(t);this._removeMarkers(e)},setVisiable(t){let e=null;if(e=t?1:0,null!=this._currentpolyline){let t=this._map.getLayer(this._currentpolyline._leaflet_id).options.weight,i=this._map.getLayer(this._currentpolyline._leaflet_id).options.color;this._map.getLayer(this._currentpolyline._leaflet_id).setStyle({color:i,weight:t,opacity:e})}},getVisibale(){if(null!=this._currentpolyline){let t=this._currentpolyline.options.opacity;if(1==t)return!0;if(0==t)return!1}},enable:function(){this._able=!0},disable:function(){this._able=!1},_onMouseOut:function(t){t.target.layer._renderer._container.style.cursor=""},_onMapClick:function(t){if(this._able){if(this.moveend)return void(this.moveend=!1);var e=this._map.mouseEventToLayerPoint(t.originalEvent),i=this._map.layerPointToLatLng(e);this._polyline?this._addVertex(i):(this._polyline=L.polyline([],{color:"red",weight:1}),this._polyline.options.color="red",this._polyline.redraw(),this._polyline.type="polyline",this._polyline.addLatLng(i),this._polyline.addTo(this._map),this._addVertex(i)),L.DomEvent.preventDefault(t.originalEvent)}},_collectEditMarkers:function(t){var e=[];for(var i in t._featureControlPoints){var o=new L.LatLng(t._featureControlPoints[i].lat,t._featureControlPoints[i].lng),l=L.supermap.plotting.editMarker(o,{icon:this.options.avoidIcon,nHandle:-1,tag:i});this._addToMapAndBindMarker(l),e.push(l),l.owner=t}this._editMarkers[t._leaflet_id]=e},_removeMarkers:function(t){var e=this._editMarkers[t._leaflet_id];for(var i in e)this._unbindMarkerEvents(e[i]),this._map.removeLayer(e[i]);delete this._editMarkers[t._leaflet_id]},_unbindMarkerEvents:function(t){t.off("mousemove",this._moveMove,this),t.off("mouseout",this._moveOut,this),t.off("drag",this.redraw,this),t.dragging.disable()},_addToMapAndBindMarker:function(t){t.addTo(this._map),t.on("mousemove",this._moveMove,this),t.on("mouseout",this._moveOut,this),t.on("drag",this._dragPoint,this),t.dragging.enable()},_removePoint:function(t){if(t.target.owner.isSelected){var e=this._editMarkers[t.target.owner._leaflet_id],i=e.indexOf(t.target);this._map.removeLayer(e[i]),e.splice(i,1),t.target.owner.latLngs.splice(i,1),t.target.owner.redraw()}},_dragPoint:function(t){var e=t.target.owner,i=this._editMarkers[e._leaflet_id],o=SuperMap.Util.indexOf(i,t.target);e._featureControlPoints[o]=t.latlng,this._changeAnimationPath(e),this.fire(SuperMap.Plot.Event.wayfeaturemodifyfinished,{result:e._featureControlPoints,animation:this.wayAnimation}),this.moveend=!0},_changeAnimationPath(t){let e=t._featureControlPoints,i=t._leaflet_id;if(this._lineType==SuperMap.Plot.GOAnimationType.ANIMATION_BROKENLINE_EXP)this._map.getLayer(i).setLatLngs(e),this._map.getLayer(i)._featureControlPoints=e,this.wayAnimation.setPath(this._map.getLayer(i)),this.wayAnimation.setWayPoints(e);else{let t=this._latLng2AlgoPlot(e);t=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t),t=this._algoPlot2LatLng(t),this._map.getLayer(i).setLatLngs(t),this._map.getLayer(i)._featureControlPoints=e,this.wayAnimation.setPath(this._map.getLayer(i)),this.wayAnimation.setWayPoints(e)}},_moveMove:function(t){t.target._icon.style.cursor="pointer"},_moveOut:function(t){t.target._icon.style.cursor=""},_addVertex:function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});if(this._markerGroup.addLayer(e),this._markers.push(e),this._latlngs.push(t),this._lineType==SuperMap.Plot.GOAnimationType.ANIMATION_BROKENLINE_EXP)this._polyline.setLatLngs(this._latlngs);else{let t=this._latLng2AlgoPlot(this._latlngs);t=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t),t=this._algoPlot2LatLng(t),this._polyline.setLatLngs(t)}var i=this._markers.length;i>1&&this._markers[i-1].on("click",this._finishShape,this),i>2&&this._markers[i-2].off("click",this._finishShape,this)},_finishShape:function(){if(this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this),L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode())if(this._lineType==SuperMap.Plot.GOAnimationType.ANIMATION_BROKENLINE_EXP)this._polyline.setLatLngs(this._latlngs);else{let t=this._latLng2AlgoPlot(this._latlngs);t=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t),t=this._algoPlot2LatLng(t),this._polyline.setLatLngs(t)}this._markerGroup.clearLayers(),this._markers=[],this._polyline._featureControlPoints=this._latlngs,this.disable(),this.wayAnimation.setPath(this._polyline),this._currentpolyline=this._polyline,this.wayAnimation.setWayPoints(this._polyline._featureControlPoints),this._polyline.setStyle({opacity:0}),this.fire(SuperMap.Plot.Event.wayfeaturedrawfinished,{feature:this._polyline,animation:this.wayAnimation}),this._latlngs=[],delete this._polyline,this._lineType=null,this._polyline=null},_onMouseMove:function(t){if(this._able){var e=this._map.mouseEventToLayerPoint(t.originalEvent),i=this._map.layerPointToLatLng(e);if(this._polyline){var o=L.Util.cloneLatLngs(this._latlngs);if(0===o.length?o.push(i):o[o.length-1].lat===i.lat&&o[o.length-1].lng===i.lng||o.push(i),this._lineType==SuperMap.Plot.GOAnimationType.ANIMATION_BROKENLINE_EXP)this._polyline.setLatLngs(o);else{let t=null,e=null;t=this._latLng2AlgoPlot(o);let i=this._calBeizer(t);e=this._algoPlot2LatLng(i),this._polyline.setLatLngs(e)}}L.DomEvent.preventDefault(t.originalEvent)}},_calBeizer:t=>SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t),_latLng2AlgoPlot(t){let e=[];for(let i=0;i<t.length;i++){let o=new SuperMapAlgoPlot.Point(t[i].lng,t[i].lat);e.push(o)}return e},_algoPlot2LatLng(t){let e=[];for(let i=0;i<t.length;i++){let o=L.latLng(t[i].y,t[i].x);e.push(o)}return e}});L.supermap.plotting.wayAnimationControl=function(t){return new Nt(t)};var Rt=Ut.extend({drawType:null,_editMarkers:null,_polyline:null,_polygon:null,_drawObject:null,_positionMarkers:null,_active:null,_measureService:null,options:{measureShapeStyle:{fill:!1,color:"#ffff00",dashArray:"2, 2",opacity:1,weight:1},draggable:!0,avoidIcon:L.divIcon({className:"leaflet-supermap-plot-avoid-icon-path",iconSize:[8,8]}),icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"})},initialize:function(t,e=null,i){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&(this.options.avoidIcon=L.divIcon({className:"leaflet-supermap-plot-avoid-icon-path",iconSize:[15,15]}),this.options.icon=new L.DivIcon({iconSize:new L.Point(15,15),className:"leaflet-div-icon leaflet-editing-icon"})),L.Control.prototype.initialize.call(this,i),L.setOptions(this,i),this.drawType=t,this._editMarkers={},this._polyline=null,this._polygon=null,this._drawObject=[],this._positionMarkers=[],this._measureService=e},onAdd:function(t){return this.controlDiv=L.DomUtil.create("div","supermap-iclient"),this._map=t,this._markers=[],this._latlngs=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._map.on("mousemove",this._onMouseMove,this).on("click",this._onMapClick,this),this.controlDiv},onRemove:function(){this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,delete this._latlngs,this._polyline&&(delete this._polyline,this._polyline=null),this._polygon&&(delete this._polygon,this.polygon=null),this._map.off("mousemove",this._onMouseMove,this).off("click",this._onMapClick,this)},setMeasureType:function(t){this.drawType=t},enable:function(){this._active=!0,this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._mouseMarker.on("dblclick",this._finishShape,this).addTo(this._map)},disable:function(){this._active=!1,this._mouseMarker&&(this._mouseMarker.off("click",this._onClick,this),this._mouseMarker.off("dblclick",this._finishShape,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker)},clear:function(){this._active=!1,this._latlngs=[],this._polyline=null,this._polygon=null;for(var t=0;t<this._drawObject.length;t++)this._map.removeLayer(this._drawObject[t]);this._drawObject=[];for(var e=0;e<this._positionMarkers.length;e++)this._map.removeLayer(this._positionMarkers[e]);this._markers=[],this.disable()},_measureDistance(t){if(null!=t&&1!==t.length){for(var e=[],i=0;i<t.length;i++)e.push(t[i]);this._measureService||(this._measureService="http://localhost:8090/iserver/services/map-china400/rest/maps/China_4326");var o=new L.supermap.MeasureService(this._measureService),l=new L.supermap.MeasureParameters;l.geometry=this._polyline,l.unit=L.supermap.Unit.METER,o.measureDistance(l,function(t){var i=t.result;if(null!=i){var o="距离:"+i.distance+"米";this._markers[e.length-1].bindPopup(o).openPopup(this._markers[0].getLatLng())}}.bind(this))}},_measureArea(t){if(!(t.length<3)){for(var e=[],i=0;i<t.length;i++)e.push(t[i]);this._measureService||(this._measureService="http://localhost:8090/iserver/services/map-china400/rest/maps/China_4326");var o=new L.supermap.MeasureService(this._measureService),l=new L.supermap.MeasureParameters;l.geometry=this._polygon,o.measureArea(l,function(t){if(void 0!==t.result){var e="面积:"+t.result.area+"平方米";this._polygon&&this._polygon.bindPopup(e).openPopup(this._polygon.getCenter())}}.bind(this))}},_measureAzimuth(t){if(null!=t&&1!==t.length){for(var e=[],i=0;i<t.length;i++)e.push(t[i]);for(var o=[],l=0;l<e.length-1;l++){var s=this.calculateazimuth(e[l],e[l+1]);o.push(s)}for(var n=0;n<e.length-1;n++)if(o[n]<0){var a=o[n]+360;this._markers[t.length-1].bindPopup("方位角为:"+a+"°").openPopup(this._markers[t.length-1].getLatLng())}else this._markers[t.length-1].bindPopup("方位角为:"+o[n]+"°").openPopup(this._markers[t.length-1].getLatLng())}},calculateazimuth(t,e){var i=t.lat*(Math.PI/180),o=t.lng*(Math.PI/180),l=e.lat*(Math.PI/180),s=e.lng*(Math.PI/180);return Math.atan2(Math.sin(s-o)*Math.cos(l),Math.cos(i)*Math.sin(l)-Math.sin(i)*Math.cos(l)*Math.cos(s-o))*(180/Math.PI)},_onMouseOut:function(t){t.target.layer._renderer._container.style.cursor=""},_onMapClick:function(t){if(this._active){if(this.moveend)return void(this.moveend=!1);var e=this._map.mouseEventToLayerPoint(t.originalEvent),i=this._map.layerPointToLatLng(e);this._polyline||this._polygon?(this._addVertex(i),0===this.drawType?this._measureDistance(this._latlngs):1===this.drawType?this._measureArea(this._latlngs):2===this.drawType&&this._measureAzimuth(this._latlngs)):(this._markers=[],1!=this.drawType?(this._polyline=L.polyline([],{color:"#ffff00"}),this._polyline.addLatLng(i),this._polyline.addTo(this._map),this._addVertex(i),0===this.drawType?this._measureDistance(this._latlngs):2===this.drawType&&this._measureAzimuth(this._latlngs)):1===this.drawType&&(this._polygon=L.polygon([],{color:"#ffff00"}),this._polygon.addLatLng(i),this._polygon.addTo(this._map),this._addVertex(i),this._measureArea(this._latlngs))),L.DomEvent.preventDefault(t.originalEvent)}},_onClick:function(t){if(this._active){if(this.moveend)return void(this.moveend=!1);var e=this._map.mouseEventToLayerPoint(t.originalEvent),i=this._map.layerPointToLatLng(e);this._polyline||this._polygon?(this._addVertex(i),0===this.drawType?this._measureDistance(this._latlngs):1===this.drawType?this._measureArea(this._latlngs):2===this.drawType&&this._measureAzimuth(this._latlngs)):1!=this.drawType?(this._polyline=L.polyline([],{color:"#ffff00"}),this._polyline.addLatLng(i),this._polyline.addTo(this._map),this._addVertex(i),0===this.drawType?this._measureDistance(this._latlngs):2===this.drawType&&this._measureAzimuth(this._latlngs)):1===this.drawType&&(this._polygon=L.polygon([],{color:"#ffff00"}),this._polygon.addLatLng(i),this._polygon.addTo(this._map),this._addVertex(i),this._measureArea(this._latlngs)),L.DomEvent.preventDefault(t.originalEvent)}},_addVertex:function(t){var e=new L.Marker(t);this._map.addLayer(e),this._markerGroup.addLayer(e),this._markers.push(e),this._positionMarkers.push(e),this._latlngs.push(t),1!=this.drawType?this._polyline.setLatLngs(this._latlngs):this._polygon.setLatLngs(this._latlngs);var i=this._markers.length;i>1&&this._markers[i-1].on("click",this._finishShape,this),i>2&&this._markers[i-2].off("click",this._finishShape,this)},_finishShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this),1!=this.drawType?(this._polyline.setLatLngs(this._latlngs),0===this.drawType?this._measureDistance(this._latlngs):2===this.drawType&&this._measureAzimuth(this._latlngs),this._drawObject.push(this._polyline)):1===this.drawType&&(this._polygon.setLatLngs(this._latlngs),this._measureArea(this._latlngs),this._drawObject.push(this._polygon)),this._polyline?(this._polyline._featureControlPoints=this._latlngs,delete this._polyline,this._polyline=null):this._polygon&&(this._polygon._featureControlPoints=this._latlngs,delete this._polygon,this._polygon=null),this._latlngs=[]},_onMouseMove:function(t){if(this._active){var e=this._map.mouseEventToLayerPoint(t.originalEvent),i=this._map.layerPointToLatLng(e);if(this._polyline||this._polygon){var o=L.Util.cloneLatLngs(this._latlngs);0===o.length?o.push(i):o[o.length-1].lat===i.lat&&o[o.length-1].lng===i.lng||o.push(i),1!=this.drawType?(this._polyline.setLatLngs(o),0===this.drawType?this._measureDistance(this._latlngs):2===this.drawType&&this._measureAzimuth(this._latlngs)):(this._polygon.setLatLngs(o),this._measureArea(this._latlngs)),this._mouseMarker.setLatLng(i)}L.DomEvent.preventDefault(t.originalEvent)}}});L.supermap.plotting.measureControl=function(t,e){return new Rt(t,e)};var Bt=L.Handler.extend({symbolData:null,plotting:null,_isDrawing:!1,libID:0,code:24,serverUrl:"",path:null,isFreeCure:!1,_drawingLayer:null,_tempDrawingLayer:null,_control:null,options:{tolerancePixel:6,allowIntersection:!0,repeatMode:!0,icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3},initialize:function(t,e,i){L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&(this.options.icon=this.options.touchIcon),this._map=t,this._drawingLayer=e,this._tempDrawingLayer=new Tt("drawControl-temportary"),this._container=t._container,this._overlayPane=t._panes.overlayPane,L.setOptions(this,i)},addHooks:function(){this._map&&(this._isDrawing=!1,this._markers=[],this._latlngs=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._map.addLayer(this._tempDrawingLayer),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("zoomend",this._onZoomEnd,this),this._map.getPlotEditControl()&&this._map.getPlotEditControl()._avoidEditing&&this._map.getPlotEditControl().avoidEdit(!1),null!=this._map.doubleClickZoom&&this._map.doubleClickZoom.enabled()&&(this.doubleClickZoomEnabled=!0,this._map.doubleClickZoom.disable()))},removeHooks:function(){this._isDrawing=!1,this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,delete this._latlngs,delete this.isFreeCure,this.plotting&&(this._tempDrawingLayer.removeFeatures(this.plotting),delete this.plotting,this.plotting=null),this._map.removeLayer(this._tempDrawingLayer),this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseup",this._onMouseUp,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this),null!=this._map.doubleClickZoom&&!0===this.doubleClickZoomEnabled&&this._map.doubleClickZoom.enable()},deleteLastVertex:function(){if(!(this._markers.length<=1)){this._latlngs.pop();var t=this._markers.pop(),e=this.plotting.getLatLngs(),i=e.splice(-1,1)[0];this.plotting.setLatLngs(e),this._markerGroup.removeLayer(t),this.plotting.getLatLngs().length<2&&this._tempDrawingLayer.removeFeatures(this.plotting),this._vertexChanged(i,!1)}},addVertex:function(t){if(this._markers.push(this._createMarker(t)),this._latlngs.push(t),this.plotting&&0===this.libID&&1023===this.code&&!0===this.isFreeCure)this.plotting.setLatLngs(this._freeCurveResample(this._latlngs));else if(this.plotting&&SuperMap.Plot.AlgoSymbolFactory.isAccessServer(this.plotting.libID,this.plotting.code)&&this._latlngs.length>=this.plotting.minEditPts){var e=new SuperMap.GetSymbolInfoParameters({libID:this.libID,code:this.code});e.inputPoints=L.Util.latLngsToSuperMapPoints(this._latlngs),L.supermap.symbolInfoService(this._drawingLayer.serverUrl,this._drawingLayer.options.serviceParams).getSymbolInfo(e,function(t){this.plotting.symbolData=t.result,this.plotting.setLatLngs(this._latlngs)},this)}else if(this.plotting&&this.plotting instanceof yt){var i=this._map.layerPointToLatLng(L.point(0,0)),o=this._map.layerPointToLatLng(L.point(this.options.tolerancePixel,0)),l=SuperMap.Plot.PlottingUtil.distance({x:i.lng,y:i.lat},{x:o.lng,y:o.lat});this.plotting._addRouteNodeByPos(t,l)}else this.plotting&&this.plotting.setLatLngs(this._latlngs);this._vertexChanged(t,!0)},_finishShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this),L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&this._latlngs.length+1<this.plotting.maxEditPts&&"function"==typeof this.plotting.getLatLngs&&this._latlngs.length!==this.plotting.getLatLngs().length&&this.plotting.setLatLngs(this._latlngs),0===this.libID&&this.code===SuperMap.Plot.SymbolType.FREECURVE&&!0===this.isFreeCure&&(this.isFreeCure=!1),-1===this.plotting.libID&&(this.plotting.libID=this.libID,this.plotting.code=this.code);var t=this.plotting.clone();if(this._markerGroup.clearLayers(),this._markers=[],this._latlngs=[],this._tempDrawingLayer.removeFeatures(this.plotting),delete this.plotting,this._drawingLayer.addFeatures(t),this._drawingLayer._renderer instanceof L.SVG&&(t.isFirstAdd=!0),this._control.fire(SuperMap.Plot.Event.featureadded,{feature:t}),this._isDrawing=!1,this.options.repeatMode||this.disable(),null!=t.layer){var e=new SuperMap.Plot.Transaction;e.transType=SuperMap.Plot.TransactionType.CREATE;var i=new SuperMap.Plot.TransactionInfo;i.layerId=t.layer._leaflet_id,i.feature=t,e.transInfos.push(i),L.supermap.plotting.getControl(this._map,this.serverUrl,{serviceParams:this._drawingLayer.options.serviceParams}).getTransManager().add(e)}},_onZoomEnd:function(){this._markers},_onMouseMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent),i=this._map.layerPointToLatLng(e);if(this._currentLatLng=i,!this.plotting||!0!==this._isDrawing||this.plotting instanceof yt)!1===this._isDrawing&&(this._isDrawing=!0,this._createFeature());else{var o=L.Util.cloneLatLngs(this._latlngs);if(0===o.length?o.push(i):o[o.length-1].lat===i.lat&&o[o.length-1].lng===i.lng||o.push(i),0===this.libID&&this.code===SuperMap.Plot.SymbolType.FREECURVE&&!0===this.isFreeCure){this._latlngs.push(i);var l=this._freeCurveResample(this._latlngs);this.plotting.setLatLngs(l),i.lat=l[l.length-1].lat,i.lng=l[l.length-1].lng}else if(this.plotting.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL&&SuperMap.Plot.AlgoSymbolFactory.isAccessServer(this.plotting.libID,this.plotting.code)&&o.length>=this.plotting.minEditPts){let t=new SuperMap.GetSymbolInfoParameters({libID:this.libID,code:this.code});t.inputPoints=L.Util.latLngsToSuperMapPoints(o),L.supermap.symbolInfoService(this._drawingLayer.serverUrl,this._drawingLayer.options.serviceParams).getSymbolInfo(t,function(t){this.plotting.symbolData=t.result,this.plotting.setLatLngs(o)},this)}else this.plotting.setLatLngs(o)}this._mouseMarker.setLatLng(i),L.DomEvent.preventDefault(t.originalEvent)},_createFeature:function(t){if(this._tempDrawingLayer.setSymScaleDefinition(this._drawingLayer.getSymScaleDefinition()),0===this.libID&&this.code===SuperMap.Plot.SymbolType.PICTURE)this.plotting=L.supermap.plotting.PlottingObject.createSymbol(this.libID,this.code,[],{serverUrl:this._drawingLayer.serverUrl,spatialAnalystUrl:this._drawingLayer.spatialAnalystUrl,serviceParams:this._drawingLayer.serviceParams,map:this._map,path:this.path}),this._control.fire(SuperMap.Plot.Event.beforefeatureadded,{feature:this.plotting}),this._tempDrawingLayer.addFeatures(this.plotting),this.plotting.isEdit=!1,"function"==typeof t&&t();else if(SuperMap.Plot.AlgoSymbolFactory.isAccessServer(this.libID,this.code))if(this.symbolData=this._drawingLayer._getSymbolDataFromCache(this.libID,this.code),null===this.symbolData){var e=Math.floor(1e3*Math.random());let i=new SuperMap.GetSymbolInfoParameters({libID:this.libID,code:this.code});i.dynamicToken=e,L.supermap.symbolInfoService(this._drawingLayer.serverUrl,this._drawingLayer.options.serviceParams).getSymbolInfo(i,function(i){i.result.dynamicToken&&i.result.dynamicToken===SuperMap.MD5.md5(e.toString())?this.libID!==i.result.libID||this.code!==i.result.code?this.symbolData=null:(this._drawingLayer._cacheSymbolData(i.result),this.symbolData=i.result,this.plotting=L.supermap.plotting.PlottingObject.createSymbol(this.libID,this.code,[],{symbolData:this.symbolData,serverUrl:this._drawingLayer.serverUrl,serviceParams:this._drawingLayer.serviceParams,map:this._map}),this._control.fire(SuperMap.Plot.Event.beforefeatureadded,{feature:this.plotting}),this._tempDrawingLayer.addFeatures(this.plotting),this.plotting.isEdit=!1,"function"==typeof t&&t()):this.symbolData=null},this)}else this.plotting=L.supermap.plotting.PlottingObject.createSymbol(this.libID,this.code,[],{symbolData:this.symbolData,serverUrl:this._drawingLayer.serverUrl,serviceParams:this._drawingLayer.serviceParams,map:this._map}),this._control.fire(SuperMap.Plot.Event.beforefeatureadded,{feature:this.plotting}),this._tempDrawingLayer.addFeatures(this.plotting),this.plotting.isEdit=!1,"function"==typeof t&&t();else if(this.plotting=L.supermap.plotting.PlottingObject.createSymbol(this.libID,this.code,[],{serverUrl:this._drawingLayer.serverUrl,spatialAnalystUrl:this._drawingLayer.spatialAnalystUrl,serviceParams:this._drawingLayer.serviceParams,map:this._map}),this.plotting.subSymbols&&0!==this.plotting.subSymbols.length){for(var i=[],o=0,l=this.plotting.subSymbols.length;o<l;o++)null===this.plotting.subSymbols[o].symbolData&&(this.plotting.subSymbols[o].symbolData=this._drawingLayer._getSymbolDataFromCache(this.plotting.subSymbols[o].libID,this.plotting.subSymbols[o].code),null===this.plotting.subSymbols[o].symbolData&&-1===SuperMap.Util.indexOf(i,this.plotting.subSymbols[o])&&i.push(this.plotting.subSymbols[o]));for(var s=i.slice(),n=0;n<i.length;n++){var a=new SuperMap.GetSymbolInfoParameters({libID:i[n].libID,code:i[n].code});L.supermap.symbolInfoService(this.serverUrl,this._drawingLayer.options.serviceParams).getSymbolInfo(a,function(e){this._drawingLayer._cacheSymbolData(e.result);for(var i=0,o=this.plotting.subSymbols.length;i<o;i++)if(null===this.plotting.subSymbols[i].symbolData&&this.plotting.subSymbols[i].libID===e.result.libID&&this.plotting.subSymbols[i].code===e.result.code){var l=SuperMap.Util.indexOf(s,this.plotting.subSymbols[i]);-1!==l&&s.splice(l,1),this.plotting.subSymbols[i].symbolData=SuperMap.Plot.PlottingUtil.cloneObject(e.result)}0===s.length&&(this._control.fire(SuperMap.Plot.Event.beforefeatureadded,{feature:this.plotting}),this._tempDrawingLayer.addFeatures(this.plotting),this.plotting.isEdit=!1,"function"==typeof t&&t())},this)}0===i.length&&(this._control.fire(SuperMap.Plot.Event.beforefeatureadded,{feature:this.plotting}),this._tempDrawingLayer.addFeatures(this.plotting),this.plotting.isEdit=!1,"function"==typeof t&&t())}else this._control.fire(SuperMap.Plot.Event.beforefeatureadded,{feature:this.plotting}),this._tempDrawingLayer.addFeatures(this.plotting),this.plotting.isEdit=!1,"function"==typeof t&&t()},_vertexChanged:function(){var t=this._markers.length;t>1&&this._markers[t-1].on("click",this._finishShape,this),t>2&&this._markers[t-2].off("click",this._finishShape,this)},_onMouseDown:function(t){if((!t||2!==t.originalEvent.button)&&!this._clickHandled&&!this._touchHandled&&!this._disableMarkers&&this._drawingLayer&&this._drawingLayer.isEditable&&this._drawingLayer._map){this._onMouseMove(t),this._clickHandled=!0,this._disableNewMarkers();var e=t.originalEvent,i=e.clientX,o=e.clientY;this._startPoint.call(this,i,o)}},_startPoint:function(t,e){0===this.libID&&this.code===SuperMap.Plot.SymbolType.FREECURVE&&(this.isFreeCure=!0),this._mouseDownOrigin=L.point(t,e)},_onMouseUp:function(t){!L.Browser.ie||null!==this._mouseDownOrigin&&void 0!==this._mouseDownOrigin||this._onMouseDown.call(this,t);var e=t.originalEvent,i=e.clientX,o=e.clientY;this._endPoint.call(this,i,o,t),this._clickHandled=null,L.DomEvent.stopPropagation(t)},_endPoint:function(t,e,i){if(this._mouseDownOrigin){var o=L.point(t,e).distanceTo(this._mouseDownOrigin),l=this._calculateFinishDistance(i.latlng);if(L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&null==this.plotting){let t=this;this._createFeature(function(){t._latlngs.push(i.latlng),t.plotting.setLatLngs(t._latlngs),(t.plotting instanceof T||t.plotting instanceof L.supermap.plotting.Route)&&(t._latlngs.length+1>=t.plotting.maxEditPts||l<20&&L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode())?t._finishShape():Math.abs(o)<9*(window.devicePixelRatio||1)&&t.addVertex(i.latlng),t._enableNewMarkers()})}else(this.plotting instanceof T||this.plotting instanceof L.supermap.plotting.Route)&&(this._latlngs.length+1>=this.plotting.maxEditPts||l<20&&L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode())?this._finishShape():Math.abs(o)<9*(window.devicePixelRatio||1)&&this.addVertex(i.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(t){var e,i,o=t.originalEvent;!o.touches||!o.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(e=o.touches[0].clientX,i=o.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,e,i),this._endPoint.call(this,e,i,t),this._touchHandled=null),this._clickHandled=null},_calculateFinishDistance:function(t){var e;if(this._markers.length>0){var i=this._markers[this._markers.length-1],o=this._map.latLngToContainerPoint(i.getLatLng()),l=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),s=this._map.latLngToContainerPoint(l.getLatLng());e=o.distanceTo(s)}else e=1/0;return e},_createMarker:function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(e),e},_disableNewMarkers:function(){this._disableMarkers=!0},_enableNewMarkers:function(){setTimeout(function(){this._disableMarkers=!1}.bind(this),50)},_freeCurveResample:function(t){var e=t.slice(),i=[];if(e.length<3)i=e.slice();else{if(!this.plotting.isEdit){var o=this._map.layerPointToLatLng(L.point(0,0)),l=this._map.layerPointToLatLng(L.point(100,100)),s=Math.abs(o.lng-l.lng),n=this._reSample(L.Util.latLngsToSuperMapPoints(e),s/50);(n=L.Util.superMapPointsToLatLngs(n)).length<3&&(n=e),e=(e=[]).concat(n)}var a=SuperMap.Plot.PlottingUtil.computeBeizerPoints(this.plotting.isEdit,L.Util.latLngsToSuperMapPoints(e),[]);i=SuperMap.Plot.PlottingUtil.clonePoints(L.Util.superMapPointsToLatLngs(a.beizerPoints))}return i},_reSample:function(t,e){var i=[];if(null==t||e<0)return i;var o=t.length;if(o>2){var l=new SuperMapAlgoPlot.Point(0,0),s=0,n=0,a=0,r=2*Math.PI;l=t[0],i.push(l);var p=!1,u=!1,h=!1;for(let P=1;P<o;P++)if(n=Math.sqrt((t[P].y-l.y)*(t[P].y-l.y)+(t[P].x-l.x)*(t[P].x-l.x)),SuperMapAlgoPlot.PlottingUtil.equalFuzzy(0,n))p&&(l=t[P-1],P--,i.push(l),a=0,r=2*Math.PI,p=!1,u=!1,h=!1);else{var g=(t[P].x-l.x)/n,c=(t[P].y-l.y)/n;if(s=c>0||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(0,c)?Math.acos(g):2*Math.PI-Math.acos(g),r>2*Math.PI&&s+2*Math.PI<r?(s+=2*Math.PI,a<0&&(a+=2*Math.PI)):a<0&&s-2*Math.PI>a&&(s-=2*Math.PI,r>2*Math.PI&&(r-=2*Math.PI)),s>a&&s<r||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(0,s-a)||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(0,s-r)){var y=Math.atan(e/n);u?a<s-y&&(a=s-y):(u=!0,a=s-y),h?r>s+y&&(r=s+y):(h=!0,r=s+y),p=!0}else l=t[P-1],P--,i.push(l),a=0,r=2*Math.PI,p=!1,u=!1,h=!1}return i.push(t[o-1]),i}return i}}),Ft=Ut.extend({drawingLayer:null,initialize:function(t,e){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");this.drawingLayer=t,null!=this.drawingLayer&&this.drawingLayer instanceof Ct&&(L.supermap.plotting.getControl().plotMapManager.activePlottingLayer=this.drawingLayer,L.supermap.plotting.getControl().plotMapManager.activeChildPlotLayer=this.drawingLayer.getChildPlotLayers()[0]),L.Control.prototype.initialize.call(this,e)},onAdd:function(t){var e=L.DomUtil.create("div","supermap-iclient");return this._map=t,this.handler=new Bt(this._map,this.drawingLayer),this.handler._control=this,this._map._plotDrawControl=this,e},onRemove:function(){this._map._plotDrawControl=null,this._map=null,this.handler=null},setDrawingLayer:function(t,e){this.drawingLayer=t,this.handler._drawingLayer=t,this.handler._tempDrawingLayer.serverUrl=t.serverUrl,this.handler._tempDrawingLayer.symScaleDefinition=t.symScaleDefinition,this.handler._tempDrawingLayer.enableSymScale=t.enableSymScale,this.handler._drawingLayer.serviceParams=t.serviceParams,this.drawingLayer instanceof Ct&&(L.supermap.plotting.getControl().plotMapManager.activePlottingLayer=this.drawingLayer,null!=e&&-1!=SuperMap.Util.indexOf(this.drawingLayer.getChildPlotLayers(),e)?L.supermap.plotting.getControl().plotMapManager.activeChildPlotLayer=e:L.supermap.plotting.getControl().plotMapManager.activeChildPlotLayer=this.drawingLayer.getChildPlotLayers()[0])}});L.Map.include({getPlotDrawControl:function(){return this._plotDrawControl?this._plotDrawControl:null}});L.supermap.plotting.drawControl=function(t,e){return new Ft(t,e)};var kt=Ut.extend({_dragStartScale:null,_dragStartRotate:null,_dragStartBounds:null,_dragStartLatLngs:null,_dragStartScaleValues:null,_dragStartPositionOffset:null,_dragStartScalePoints:null,_editMarkers:null,_disEditBox:null,_editFeatures:null,_mouseTolerance:10,touchTolerance:20,_editMode:SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE,_avoidEditing:!1,_isMultiSelect:!1,selectedFeatures:[],options:{highlightFlag:!0,highlightStyle:{color:"#ffffff",opacity:1,weight:1},unEditIconClassName:"icon iconfont icon-xuanzhong1",draggable:!0,editIcon:L.divIcon({className:"leaflet-supermap-plot-control-icon-path",iconSize:[10,10]}),scaleIcon:L.divIcon({className:"leaflet-supermap-plot-scale-icon-path",iconSize:[10,10]}),rotateIcon:L.divIcon({className:"leaflet-supermap-plot-rotate-icon-path",iconSize:[15,15]}),lockedIcon:L.divIcon({className:"leaflet-supermap-plot-locked-icon-path",iconSize:[10,10]}),avoidIcon:L.divIcon({className:"leaflet-supermap-plot-avoid-icon-path",iconSize:[8,8]}),leftTopIcon:L.divIcon({className:"leaflet-supermap-plot-left-top-icon-path",iconSize:[15,15]}),rightTopIcon:L.divIcon({className:"leaflet-supermap-plot-right-top-icon-path",iconSize:[15,15]}),leftBottomIcon:L.divIcon({className:"leaflet-supermap-plot-left-bottom-icon-path",iconSize:[15,15]}),rightBottomIcon:L.divIcon({className:"leaflet-supermap-plot-right-bottom-icon-path",iconSize:[15,15]}),centerCrossIcon:L.divIcon({className:"leaflet-supermap-plot-center-icon-path",iconSize:[24,24]})},initialize:function(t,e){if(L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&(this.options.editIcon=L.divIcon({className:"leaflet-supermap-plot-control-icon-path",iconSize:[20,20]}),this.options.scaleIcon=L.divIcon({className:"leaflet-supermap-plot-scale-icon-path",iconSize:[20,20]}),this.options.rotateIcon=L.divIcon({className:"leaflet-supermap-plot-rotate-icon-path",iconSize:[25,25]}),this.options.lockedIcon=L.divIcon({className:"leaflet-supermap-plot-locked-icon-path",iconSize:[20,20]}),this.options.avoidIcon=L.divIcon({className:"leaflet-supermap-plot-avoid-icon-path",iconSize:[15,15]})),L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");L.Control.prototype.initialize.call(this,e),L.setOptions(this,e),this._editMarkers={},this._disEditBox={},this._dragStartScale={},this._dragStartRotate={},this._dragStartBounds={},this._dragStartLatLngs={},this._dragStartPositionOffset={},this._dragStartScaleValues={},this._dragStartScalePoints={},this._editFeatures={}},onAdd:function(t){this.controlDiv=L.DomUtil.create("div","supermap-iclient"),this._map=t,this._map.on("click",this._onMapClick,this),this._map._plotEditControl=this;for(var e=0;e<this._map.getPlottingLayers().length;e++)if(this._map.getPlottingLayers()[e].isSelected){this.enableEditFeatures(this._map.getPlottingLayers()[e].features);for(var i=0;i<this._map.getPlottingLayers()[e].features.length;i++)(this._map.getPlottingLayers()[e].features[i]instanceof m||this._map.getPlottingLayers()[e].features[i]instanceof yt)&&this.enableEditFeatures(this._map.getPlottingLayers()[e].features[i].components)}return this.controlDiv},onRemove:function(){for(var t in this._map.off("click",this._onMapClick,this),this.unselectFeatures(),this._map._plotEditControl=null,this._map=null,this._editFeatures)this._disableFeatureEdit(this._editFeatures[t])},enableEditFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++)t[e]instanceof d&&(t[e].enableEdit=!0,this._editFeatures[t[e].uuid]=t[e],this._enableFeatureEdit(t[e]))},disableEditFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++)t[e]instanceof d&&(t[e].enableEdit=!1,delete this._editFeatures[t[e].uuid],this._disableFeatureEdit(t[e]))},avoidEdit:function(t){if(void 0===t&&(t=!this._avoidEditing),this._avoidEditing!==t)if(t&&1===this.selectedFeatures.length&&!this.selectedFeatures[0].getLocked()){this._avoidRegionControl=new wt(this.selectedFeatures[0]),this._map.addControl(this._avoidRegionControl);for(let t in this._editFeatures)this._disableFeatureEdit(this._editFeatures[t]);this._collectEditMarkers(this._avoidRegionControl.feature),this._avoidEditing=t}else if(!t){if(this._avoidRegionControl){for(let t in this._editFeatures)this._enableFeatureEdit(this._editFeatures[t]);if(!SuperMap.Util.isArray(this._avoidRegionControl.feature))var e=[this._avoidRegionControl.feature];this.selectFeatures(e),this._map.removeControl(this._avoidRegionControl),this._avoidRegionControl=null}this._avoidEditing=t}return this._avoidEditing},setEditMode:function(t){if(this._editMode!==t){this._editMode=t;for(var e=0;e<this.selectedFeatures.length;e++)this._collectEditMarkers(this.selectedFeatures[e])}},canCopy:function(){return this.getSelectedFeatures().length>0},canCut:function(){return this.getSelectedFeatures().length>0},canPaste:function(){return!!(this.pasteGeoAry&&this.pasteGeoAry.length>0)},copy:function(){this.pasteGeoAry=[],this.pasteGeoSel=[];for(var t=0,e=this._map.getPlottingLayers().length;t<e;t++){var i=this._map.getPlottingLayers()[t];if(!0!==i.isLocked&&!1!==i.isEditable)for(var o=0,l=i.getFeatures().length;o<l;o++){var s=i.getFeatures()[o];if(s.isSelected&&!1===s.isLocked&&(s.layer=i,s instanceof d))if(s.symbolType===SuperMap.Plot.SymbolType.ROUTENODE)this.pasteGeoAry.push(s.route);else if(this.pasteGeoAry.push(s),this.pasteGeoSel.push(s.isSelected),(s.symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS||s.symbolType===SuperMap.Plot.SymbolType.SATELLITE)&&Object.prototype.hasOwnProperty.call(s,"timeWindows")&&0!==s.timeWindows.length)for(var n=0,a=s.timeWindows.length;n<a;n++)Object.prototype.hasOwnProperty.call(s.timeWindows[n],"symbolType")&&s.timeWindows[n].symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS&&this.pasteGeoAry.push(s.timeWindows[n])}}},copyFeatures:function(t){this.pasteGeoAry=[],this.pasteGeoSel=[],SuperMap.Util.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=t[e];i instanceof d&&(this.pasteGeoAry.push(i),this.pasteGeoSel.push(i.isSelected),i.isSelected&&this.selectedFeatures.push(i))}},cut:function(){this.pasteGeoAry=[],this.pasteGeoSel=[];var t=[],e=new SuperMap.Plot.Transaction;e.transType=SuperMap.Plot.TransactionType.REMOVE;for(var i=this.getSelectedFeatures().slice(),o=0;o<i.length;o++){var l=i[o];if(!0!==l.layer.isLocked&&!1!==l.layer.isEditable&&!1===l.isLocked){if(l instanceof d)if(l.symbolType===SuperMap.Plot.SymbolType.ROUTENODE)this.pasteGeoAry.push(l.route),this.pasteGeoSel.push(l.route.isSelected),l.layer.removeFeatures(l.route);else{if(this.pasteGeoAry.push(l),this.pasteGeoSel.push(l.isSelected),Object.prototype.hasOwnProperty.call(l,"geoSymbolTexts")&&0!==l.geoSymbolTexts.length)for(let e=0,i=l.geoSymbolTexts.length;e<i;e++)Object.prototype.hasOwnProperty.call(l.geoSymbolTexts[e],"isSelected")&&!0===l.geoSymbolTexts[e].isSelected&&t.push(l.geoSymbolTexts[e].clone());if((l.symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS||l.symbolType===SuperMap.Plot.SymbolType.SATELLITE)&&Object.prototype.hasOwnProperty.call(l,"timeWindows")&&0!==l.timeWindows.length)for(let t=0,e=l.timeWindows.length;t<e;t++)Object.prototype.hasOwnProperty.call(l.timeWindows[t],"symbolType")&&l.timeWindows[t].symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS&&(this.pasteGeoAry.push(l.timeWindows[t]),l.layer.removeFeatures(l.timeWindows[t]));var s=new SuperMap.Plot.TransactionInfo;s.layerId=l.layer._leaflet_id,s.feature=l,e.transInfos.push(s),l.layer.removeFeatures(l)}0!==e.transInfos.length&&L.supermap.plotting.getControl().getTransManager().add(e)}}if(0!==t.length)for(let e=0,i=t.length;e<i;e++){var n=t[e];if(n.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT||n.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1)for(let i=0,o=this.pasteGeoAry.length;i<o;i++)n.associatedUuid===this.pasteGeoAry[i].uuid&&this.pasteGeoAry[i].geoSymbolTexts.push(t[e])}},cutFeatures:function(t){this.pasteGeoAry=[],this.pasteGeoSel=[],t=SuperMap.Util.isArray(t)?t.slice():[t];for(var e=0;e<t.length;e++){var i=t[e],o=i.layer;i instanceof d&&(this.pasteGeoAry.push(i),this.pasteGeoSel.push(i.isSelected),i instanceof ct?(i.isSelected&&this.unselectFeatures(i),o.removeFeatures(i.route)):o.removeFeatures(i),i.layer=o)}},paste:function(){return this._pasteToPosition.apply(this,arguments)},align:function(t){if(0!==this.getSelectedFeatures().length){var e=new SuperMap.Plot.Transaction;L.supermap.plotting.getControl().getTransManager().add(e);var i=function(t,e,i,o,l,s){var n=new SuperMap.Plot.TransactionInfo;n.layerId=t,n.uuid=e,n.functionName=i,n.undoParams=o,n.redoParams=l,s.transInfos.push(n)},o=1,l=this.getSelectedFeatures().length,s=null,n=null,a=null,r=this.getSelectedFeatures()[0].getBounds();if(t===SuperMap.Plot.AlignType.LEFT)for(;o<l;o++)s=this.getSelectedFeatures()[o].getBounds(),n=r.getWest()-s.getWest(),this.getSelectedFeatures()[o].move(0,n),this._collectEditMarkers(this.getSelectedFeatures()[o]),i(this.getSelectedFeatures()[o].layer._leaflet_id,this.getSelectedFeatures()[o].uuid,"move",[0,-n],[0,n],e);if(t===SuperMap.Plot.AlignType.RIGHT)for(;o<l;o++)s=this.getSelectedFeatures()[o].getBounds(),n=r.getEast()-s.getEast(),this.getSelectedFeatures()[o].move(0,n),this._collectEditMarkers(this.getSelectedFeatures()[o]),i(this.getSelectedFeatures()[o].layer._leaflet_id,this.getSelectedFeatures()[o].uuid,"move",[0,-n],[0,n],e);if(t===SuperMap.Plot.AlignType.UP)for(;o<l;o++)s=this.getSelectedFeatures()[o].getBounds(),a=r.getNorth()-s.getNorth(),this.getSelectedFeatures()[o].move(a,0),this._collectEditMarkers(this.getSelectedFeatures()[o]),i(this.getSelectedFeatures()[o].layer._leaflet_id,this.getSelectedFeatures()[o].uuid,"move",[-a,0],[a,0],e);if(t===SuperMap.Plot.AlignType.DOWN)for(;o<l;o++)s=this.getSelectedFeatures()[o].getBounds(),a=r.getSouth()-s.getSouth(),this.getSelectedFeatures()[o].move(a,0),this._collectEditMarkers(this.getSelectedFeatures()[o]),i(this.getSelectedFeatures()[o].layer._leaflet_id,this.getSelectedFeatures()[o].uuid,"move",[-a,0],[a,0],e);if(t===SuperMap.Plot.AlignType.VERTICALCENTER)for(;o<l;o++)s=this.getSelectedFeatures()[o].getBounds(),a=r.getCenter().lat-s.getCenter().lat,this.getSelectedFeatures()[o].move(a,0),this._collectEditMarkers(this.getSelectedFeatures()[o]),i(this.getSelectedFeatures()[o].layer._leaflet_id,this.getSelectedFeatures()[o].uuid,"move",[-a,0],[a,0],e);if(t===SuperMap.Plot.AlignType.HORIZONTALCENTER)for(;o<l;o++)s=this.getSelectedFeatures()[o].getBounds(),n=r.getCenter().lng-s.getCenter().lng,this.getSelectedFeatures()[o].move(0,n),this._collectEditMarkers(this.getSelectedFeatures()[o]),i(this.getSelectedFeatures()[o].layer._leaflet_id,this.getSelectedFeatures()[o].uuid,"move",[0,-n],[0,n],e)}},deleteSelectedFeatures:function(){if(0===Object.keys(this.getSelectedFeatures()).length)return null;if(Object.keys(this.getSelectedFeatures()).length){var t=this.getSelectedFeatures(),e=t.slice(),i=new SuperMap.Plot.Transaction;i.transType=SuperMap.Plot.TransactionType.REMOVE,L.supermap.plotting.getControl().getTransManager().add(i);for(let t=0,o=e.length;t<o;t++){let o=new SuperMap.Plot.TransactionInfo;o.layerId=e[t].layer._leaflet_id,o.feature=e[t],i.transInfos.push(o)}for(let e=0,i=t.length;e<i;e++)t[e].layer.removeFeatures(t[e])}},getSelectedFeatures:function(){return this.selectedFeatures.slice()},multiSelect:function(){L.DomEvent.on(this._map._container,"mousedown",this._onMapMouseDown,this),this._map.dragging.enabled()&&(this._map.dragging.disable(),this._mapDraggingWasEnabled=!0),this._isMultiSelect=!this._isMultiSelect},lockedFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++)t[e].layer instanceof _t&&null!=t[e].graphic?(this.enableEditFeatures(t[e]),t[e].locked=!0,this._collectEditMarkers(t[e])):t.splice(e,1)},unlockedFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++)t[e].layer instanceof _t&&null!=t[e].graphic?(this.disableEditFeatures(t[e]),this._removeMarkers(t[e])):t.splice(e,1)},selectFeatures:function(t,e=!0){SuperMap.Util.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++)t[i].layer instanceof _t&&null!=t[i].graphic&&(!0===t[i].layer.isEditable&&!1===t[i].layer.isLocked?(t[i].layer.removeFeatures(t[i]),t[i].layer._editLayer.addFeatures(t[i])):this.enableEditFeatures(t[i]));if(!1!==this.fire(SuperMap.Plot.Event.beforefeaturesselected,{features:t})){var o=[];for(var l in t)null!==t[l]._map&&t[l].enableEdit&&!1===t[l].isSelected&&(t[l].isSelected=!0,this.selectedFeatures.push(t[l]),this._collectEditMarkers(t[l]),this.options.draggable&&!t[l].layer.isLocked&&t[l].layer.isEditable&&t[l].dragging.enable(),null!==t[l].ownerGroup&&(t[l].ownerGroup.isSelected=!0),t[l]instanceof ct&&(t[l].route.isSelected=!0,this.options.highlightFlag&&t[l].route.highlight(this.options.highlightStyle)),o.push(t[l]));e&&this.fire(SuperMap.Plot.Event.featuresselected,{features:o})}},unselectFeatures:function(t){void 0===t&&(t=this.selectedFeatures.slice()),SuperMap.Util.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++)t[e].layer instanceof _t&&null!=t[e].graphic&&-1!=L.Util.indexOf(this.selectedFeatures,t[e])&&(!0===t[e].layer.isEditable&&!1===t[e].layer.isLocked?(t[e].layer._editLayer.removeFeatures(t[e]),t[e].layer.addFeatures(t[e])):this.disableEditFeatures(t[e]));if(!1!==this.fire(SuperMap.Plot.Event.beforefeaturesunselected,{features:t})){for(var i=t.slice(),o=0;o<i.length;){var l=L.Util.indexOf(this.selectedFeatures,i[o]);-1!==l?(this._removeMarkers(i[o]),i[o].isSelected=!1,null!=i[o].dragging&&i[o].dragging.disable(),null!==i[o].ownerGroup&&(i[o].ownerGroup.isSelected=!1),i[o]instanceof ct&&(i[o].route.isSelected=!1,i[o].route.unhighlight()),this.selectedFeatures.splice(l,1),o++):i.splice(o,1)}this.fire(SuperMap.Plot.Event.featuresunselected,{features:i}),this.transaction&&0!==this.transaction.transInfos.length&&(L.supermap.plotting.getControl().getTransManager().add(this.transaction),this.transaction=null,this.isAddTransInfo=!1)}},_onMapMouseDown:function(t){this.multiple=!1,L.DomUtil.disableTextSelection(),L.DomUtil.disableImageDrag(),this._startPoint=this._map.mouseEventToContainerPoint(t),L.DomEvent.on(document,{contextmenu:L.DomEvent.stop,mousemove:this._onMapMouseMove,mouseup:this._onMapMouseUp},this)},_onMapMouseMove:function(t){this.multiple||(this.multiple=!0,this._box=L.DomUtil.create("div","leaflet-zoom-box",this._map._container),L.DomUtil.addClass(this._map._container,"leaflet-crosshair")),this._endPoint=this._map.mouseEventToContainerPoint(t);var e=new L.Bounds(this._endPoint,this._startPoint),i=e.getSize();L.DomUtil.setPosition(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_onMapMouseUp:function(){if(L.DomEvent.off(this._map._container,"mousedown",this._onMapMouseDown,this),this.multiple&&(L.DomUtil.remove(this._box),L.DomUtil.removeClass(this._map._container,"leaflet-crosshair")),L.DomUtil.enableTextSelection(),L.DomUtil.enableImageDrag(),L.DomEvent.off(document,{contextmenu:L.DomEvent.stop,mousemove:this._onMapMouseMove,mouseup:this._onMapMouseUp},this),this.multiple){var t=new L.LatLngBounds(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._endPoint)),e=[];for(var i in this._editFeatures)e.push(this._editFeatures[i]);for(var o=[],l=0,s=e.length;l<s;l++)e[l].isSelected||(e[l]instanceof ct||e[l].symbolType===SuperMap.Plot.SymbolType.LITERATESIGN?t.contains(e[l].route.getBounds().getCenter())&&-1===SuperMap.Util.indexOf(o,e[l].route)&&o.push(e[l].route):null!==e[l].ownerGroup?t.contains(e[l].ownerGroup.getBounds().getCenter())&&-1===SuperMap.Util.indexOf(o,e[l].ownerGroup)&&o.push(e[l].ownerGroup):e[l].getBounds().isValid()&&t.contains(e[l].getBounds().getCenter())&&o.push(e[l]));0!==o.length&&this.selectFeatures(o),this._mapDraggingWasEnabled&&this._map.dragging.enable(),this.multiple=!1}},_enableFeatureEdit:function(t){t instanceof d&&t.on("click",this._onClick,this).on("mousemove",this._onMouseMove,this).on("mouseout",this._onMouseOut,this).on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this).on("reseteditmarkersvalues",this._onResetEditMarkersValues,this).on("reseteditmarkers",this._onResetEditMarkers,this)},_disableFeatureEdit:function(t){t instanceof d&&t.off("click",this._onClick,this).off("mousemove",this._onMouseMove,this).off("mouseout",this._onMouseOut,this).off("dragstart",this._onDragStart,this).off("drag",this._onDrag,this).off("dragend",this._onDragEnd,this).off("reseteditmarkersvalues",this._onResetEditMarkersValues,this).off("reseteditmarkers",this._onResetEditMarkers,this)},_onSelectedLayers:function(t){this.selectFeatures(t.target)},_onUnSelectLayers:function(t){this.unselectFeatures(t.target)},_onMouseMove:function(t){var e=t.target,i="";if(e.isSelected)if(this._editMode===SuperMap.Plot.EditMode.ADDCONTROLPOINT&&(SuperMap.Plot.AddPoint_WayType.UNKNOWN!==e._getSymbolWayType()||e instanceof ct&&(e._isFirstNode()||e._isLastNode())||e.symbolType===SuperMap.Plot.SymbolType.ANNOFRAMESYMBOLM))i="crosshair";else if(this._editMode===SuperMap.Plot.EditMode.ADDCONTROLPOINT&&e instanceof yt){var o=this._getAddPointTolerance(),l=e._selectNodeLayer(t.latlng,o);null===l||l instanceof ct&&(l._isFirstNode()||l._isLastNode())?i="crosshair":null!==l&&(i="pointer")}else i="move";else i="pointer";e.layer._setCursorStyle(i)},_onMouseOut:function(t){t.target.layer._setCursorStyle()},_onDragStart:function(){for(var t=0;t<this.selectedFeatures.length;t++){if(!this.selectedFeatures[t].getLocked()){var e=this._editMarkers[this.selectedFeatures[t].uuid];for(var i in e)e[i].setOpacity(0)}this.selectedFeatures[t]instanceof m?this._dragStartLatLngs[this.selectedFeatures[t].uuid]=this._editMarkers[this.selectedFeatures[t].uuid]:this._dragStartLatLngs[this.selectedFeatures[t].uuid]=L.Util.cloneLatLngs(this.selectedFeatures[t].getLatLngs()),this.selectedFeatures[t].symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&(this._dragStartPositionOffset[this.selectedFeatures[t].uuid]={x:this.selectedFeatures[t].positionOffsetX,y:this.selectedFeatures[t].positionOffsetY}),this.transaction||(this.transaction=new SuperMap.Plot.Transaction,this.transaction.transType=SuperMap.Plot.TransactionType.EDIT,this.isAddTransInfo=!0)}},_onDrag:function(t){for(var e=0,i=this.selectedFeatures.length;e<i;e++)if((this._editMode!==SuperMap.Plot.EditMode.ADDCONTROLPOINT||SuperMap.Plot.AddPoint_WayType.UNKNOWN===this.selectedFeatures[e]._getSymbolWayType())&&!this.selectedFeatures[e].getLocked()){var o=this.selectedFeatures[e].symbolType;if(o===SuperMap.Plot.SymbolType.SYMBOLTEXT1||o===SuperMap.Plot.SymbolType.AIRROUTE||o===SuperMap.Plot.SymbolType.NAVYROUTE||o===SuperMap.Plot.SymbolType.MISSILEROUTE)break;if(this.selectedFeatures[e].move(t.dLat,t.dLng),this.isAddTransInfo){var l=new SuperMap.Plot.TransactionInfo;l.layerId=this.selectedFeatures[e].layer._leaflet_id,l.uuid=this.selectedFeatures[e].uuid,l.functionName="move",this.transaction.transInfos.push(l)}}this.isAddTransInfo=!1},_onDragEnd:function(){for(var t=0;t<this.selectedFeatures.length;t++)this.selectedFeatures[t].getLocked()||(this._collectEditMarkers(this.selectedFeatures[t]),this.selectedFeatures[t].graphic&&this.selectedFeatures[t].graphic.updateImage());this._saveHistoryInfomation(),this.transaction&&0!==this.transaction.transInfos.length&&(L.supermap.plotting.getControl().getTransManager().add(this.transaction),this.transaction=new SuperMap.Plot.Transaction,this.isAddTransInfo=!0),this.fire(SuperMap.Plot.Event.featuresmodified,{features:this.selectedFeatures})},_saveHistoryInfomation:function(){if(this.transaction)for(var t=0;t<this.transaction.transInfos.length;t++){var e=this.transaction.transInfos[t].uuid,i=this._map.getFeatureByUuid(e);if(null===i)for(var o=0;o<this.selectedFeatures.length;o++)if(this.selectedFeatures[o].uuid===e){i=this.selectedFeatures[o];break}if(null!==i){if("setRotate"===this.transaction.transInfos[t].functionName)i._isDot()?(this.transaction.transInfos[t].undoParams=[this._dragStartRotate[e]],this.transaction.transInfos[t].redoParams=[i.getRotate()]):(this.transaction.transInfos[t].undoParams=[360-(i.getRotate()-this._dragStartRotate[e])],this.transaction.transInfos[t].redoParams=[i.getRotate()-this._dragStartRotate[e]]);else if("setScale"===this.transaction.transInfos[t].functionName){var l=this._dragStartScale[e];!1===i.limitWidthHeight?(this.transaction.transInfos[t].undoParams=[l.x,l.y],this.transaction.transInfos[t].redoParams=[i.getScale().x,i.getScale().y]):(this.transaction.transInfos[t].undoParams=[l],this.transaction.transInfos[t].redoParams=[i.getScale()])}else if("setLatLngs"===this.transaction.transInfos[t].functionName)i.symbolType===SuperMap.Plot.SymbolType.LINERELATION?this.transaction.transInfos[t].undoParams=[this._dragStartLatLngs[e]]:this.transaction.transInfos[t].undoParams=[L.Util.cloneLatLngs(this._dragStartLatLngs[e])],this.transaction.transInfos[t].redoParams=[L.Util.cloneLatLngs(i.getLatLngs())],i.symbolType===SuperMap.Plot.SymbolType.ARCREGION&&1===this.transaction.transInfos[t].redoParams[0].length&&this.transaction.transInfos[t].redoParams[0].push(i.scalePoints[0]);else if("setScaleValues"===this.transaction.transInfos[t].functionName){var s=[],n=[];for(let t=0;t<this._dragStartScaleValues[e].length;t++)s.push(this._dragStartScaleValues[e][t]);for(let t=0;t<i.scaleValues.length;t++)n.push(i.scaleValues[t]);this.transaction.transInfos[t].undoParams=[s],this.transaction.transInfos[t].redoParams=[n]}else if("modifyPoint"===this.transaction.transInfos[t].functionName){var a=this.transaction.transInfos[t].undoParams[0];this.transaction.transInfos[t].undoParams.push(this._dragStartScalePoints[e][a]),this.transaction.transInfos[t].undoParams[1].isScalePoint=!0;var r=this.transaction.transInfos[t].redoParams[0];this.transaction.transInfos[t].redoParams.push(i.scalePoints[r]),this.transaction.transInfos[t].redoParams[1].isScalePoint=!0}else if("move"===this.transaction.transInfos[t].functionName){if(i.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&!0===i.positionOffset){var p=0,u=0,h=this._map.latLngToLayerPoint(i.getLatLngs()[0]),g={x:h.x+this._dragStartPositionOffset[e].x,y:h.y+this._dragStartPositionOffset[e].y},c=this._map.layerPointToLatLng(g);h.x+=i.positionOffsetX,h.y+=i.positionOffsetY;var y=this._map.layerPointToLatLng(h);p=c.lng-y.lng,u=c.lat-y.lat}else i instanceof m?(p=this._dragStartLatLngs[e][0].getLatLng().lng-this._editMarkers[i.uuid][0].getLatLng().lng,u=this._dragStartLatLngs[e][0].getLatLng().lat-this._editMarkers[i.uuid][0].getLatLng().lat):0!==i.getLatLngs().length&&(p=this._dragStartLatLngs[e][0].lng-i.getLatLngs()[0].lng,u=this._dragStartLatLngs[e][0].lat-i.getLatLngs()[0].lat);i instanceof m?(this.transaction.transInfos[t].undoParams=[u,p],this.transaction.transInfos[t].redoParams=[-u,-p]):0!==i.getLatLngs().length&&(this.transaction.transInfos[t].undoParams=[u,p],this.transaction.transInfos[t].redoParams=[-u,-p])}}else this.transaction.transInfos.splice(t,1),t--}},_onResetEditMarkers:function(t){-1!==L.Util.indexOf(this.selectedFeatures,t.target)&&this._collectEditMarkers(t.target)},_onResetEditMarkersValues:function(t){this._resetEditMarkersValue(t.target)},_onMapClick:function(t){if(!1!==this._onTriggerMapClick){if(this._startPoint&&this._endPoint)return this._startPoint=null,void(this._endPoint=null);this.unselectFeatures(),L.DomEvent.stopPropagation(t)}else this._onTriggerMapClick=!0},_onClick:function(t){this._onTriggerMapClick=!1;var e,i,o=t.target;if(o.isSelected&&o.symbolType===SuperMap.Plot.SymbolType.SATELLITE&&o.timeWindows.length>0){var l=o.layer._getFeatureFromEvent(t);l.symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS&&(o=l)}if(this.transaction||(this.transaction=new SuperMap.Plot.Transaction,this.transaction.transType=SuperMap.Plot.TransactionType.EDIT,this.isAddTransInfo=!0),o instanceof d)if(o instanceof m&&o.moveend)o.moveend=!1;else if(null!==o.ownerGroup&&o.ownerGroup.moveend)o.ownerGroup.moveend=!1;else if(this._editMode!==SuperMap.Plot.EditMode.ADDCONTROLPOINT)o instanceof m&&!o.isSelected?(!1===t.originalEvent.ctrlKey&&this.unselectFeatures(),this.selectFeatures(o)):o instanceof yt||o.isSelected||null!==o.ownerGroup&&!0!==o.ownerGroup.isSelected||(!1===t.originalEvent.ctrlKey&&this.unselectFeatures(),this.selectFeatures(o));else if(o instanceof yt||o.isSelected){if(!1===o.isLocked&&o.isSelected)if(o instanceof yt){var s=this._getAddPointTolerance();if(null===(a=o._selectNodeLayer(t.latlng,s))){let e=this._getAddPointTolerance(),i=o._addRouteNodeByPosWithoutLast(t.latlng,e);null!==i&&(this.unselectFeatures(),this.selectFeatures(i))}}else if(o instanceof ct&&o.route.isSelected){let t=o._isFirstNode(),e=o._isLastNode();if(!0===t||!0===e){let i=o.route._addRouteNodeByNode(o.routeNode,t,e);if(null!==i){this.unselectFeatures(),this.selectFeatures(i);var n=new SuperMap.Plot.TransactionInfo;n.layerId=i.layer._leaflet_id,n.uuid=i.uuid,n.functionName="setLatLngs",n.undoParams=[L.Util.cloneLatLngs(i.getLatLngs())],n.redoParams=[L.Util.cloneLatLngs(i.getLatLngs())],this.transaction.transInfos.push(n),this.transaction&&(L.supermap.plotting.getControl().getTransManager().add(this.transaction),this.transaction=new SuperMap.Plot.Transaction,this.isAddTransInfo=!0)}}else this.unselectFeatures(),this.selectFeatures(o)}else this._addPoint(o,t.latlng)}else if(!1===t.originalEvent.ctrlKey&&this.unselectFeatures(),this.selectFeatures(o),o instanceof ct&&((e=o._isFirstNode())||(i=o._isLastNode()))){var a=o.route._addRouteNodeByNode(o.routeNode,e,i);null!==a&&(this.unselectFeatures(),this.selectFeatures(a))}},_addPoint:function(t,e){if(null!==t&&void 0!==t){var i=t.scaleValues.slice(),o=L.Util.cloneLatLngs(t.getLatLngs()),l=L.Util.latLngsToSuperMapPoints(t.getLatLngs());if(t.symbolType===SuperMap.Plot.SymbolType.ANNOFRAMESYMBOLM){var s=L.supermap.plotting.editMarker(e,{icon:this.options.scaleIcon,nHandle:-2,tag:t.scalePoints.length});s.owner=t,this._addToMapAndBindMarker(s),this._editMarkers[t.uuid].push(s),t.scalePoints.push(e),t._modifyPoint(t.scalePoints.length-1,e);let o=new SuperMap.Plot.TransactionInfo;o.layerId=t.layer._leaflet_id,o.uuid=t.uuid,o.functionName="setScaleValues",o.undoParams=[i],o.redoParams=[t.scaleValues],this.transaction.transInfos.push(o),this.transaction&&(L.supermap.plotting.getControl().getTransManager().add(this.transaction),this.transaction=new SuperMap.Plot.Transaction,this.isAddTransInfo=!0)}else{if(t.getLatLngs().length>=t.maxEditPts)return;var n=t._getSymbolWayType();if(void 0!==SuperMap.Plot.AlgoSymbolFactory&&SuperMap.Plot.AlgoSymbolFactory.canPolylineConnect(t.libID,t.code)&&!0===t.polylineConnectLocationPoint&&(n=SuperMap.Plot.AddPoint_WayType.POLYLINE),SuperMap.Plot.AddPoint_WayType.UNKNOWN===n)return;var a=new SuperMap.Geometry.Point(e.lng,e.lat),r=-1;SuperMap.Plot.AddPoint_WayType.CURVE===n&&(r=this._addPointByCurve(t,a));var p=new SuperMap.Plot.Transaction;if(L.supermap.plotting.getControl().getTransManager().add(p),SuperMap.Plot.AddPoint_WayType.POLYLINE===n&&(r=this._addPointByPolyLine(t,a)),l=L.Util.latLngsToSuperMapPoints(t.getLatLngs()),r>0&&r<l.length){var u=L.supermap.plotting.editMarker(new L.LatLng(a.y,a.x),{icon:this.options.editIcon,nHandle:-1});u.owner=t,this._addToMapAndBindMarker(u),this._editMarkers[t.uuid].splice(r,0,u),0===t.libID&&590===t.code||100===t.libID&&(17703===t.code||17704===t.code)?(this._addPointByPolybezier(t,r,a),this._resetEditMarkersValue(t)):(l.splice(r,0,a),t.latLngs=L.Util.superMapPointsToLatLngs(l));let e=new SuperMap.Plot.TransactionInfo;if(e.layerId=t.layer._leaflet_id,e.uuid=t.uuid,e.functionName="setLatLngs",e.undoParams=[o],e.redoParams=[L.Util.cloneLatLngs(t.getLatLngs())],p.transInfos.push(e),0===t.libID&&590===t.code||100===t.libID&&(17703===t.code||17704===t.code)){let e=new SuperMap.Plot.TransactionInfo;e.layerId=t.layer._leaflet_id,e.uuid=t.uuid,e.functionName="setScaleValues",e.undoParams=[i],e.redoParams=[t.scaleValues],p.transInfos.push(e)}}}}},_addPointByCurve:function(t,e){var i=L.Util.latLngsToSuperMapPoints(t.getLatLngs()),o=SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(i);if(2>o.length)return-1;var l=[],s=0;for(let t=1,e=i.length;t<e;t++){var n=[];for(let e=s,a=o.length;e<a;e++){if(SuperMap.Plot.PlottingUtil.equalFuzzy(i[t].x,o[e].x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(i[t].y,o[e].y)){if(n.length<1)continue;n.push(o[e]),l.push(n),n=[],s=e;break}n.push(o[e])}}var a=-1,r=-1;for(let t=0;t<l.length;t++){var p=this._computePointToLineMinDis(e,l[t]).minDis;p<0||(r<0?(r=p,a=t+1):r>p&&(r=p,a=t+1))}var u=i.slice();u.push(u[0]);var h=SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(u),g=[];for(let t=1,e=u.length;t<e;t++){var c=[];for(let e=s,i=h.length;e<i;e++){if(SuperMap.Plot.PlottingUtil.equalFuzzy(u[t].x,h[e].x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(u[t].y,h[e].y)){if(n.length<1)continue;c.push(h[e]),g.push(c),c=[],s=e;break}c.push(h[e])}}var y=-1,P=-1;for(let t=0;t<g.length;t++){var S=this._computePointToLineMinDis(e,g[t]).minDis;S<0||(P<0?(P=S,y=t+1):P>S&&(P=S,y=t+1))}return y>a&&(a=-1),a},_addPointByPolyLine:function(t,e){var i=-1,o=L.Util.latLngsToSuperMapPoints(t.getLatLngs());return(i=this._computePointToLineMinDis(e,o).index)>=0&&i++,i},_addPointByPolybezier:function(t,e,i){let o=L.Util.latLngsToSuperMapPoints(t.getLatLngs()),l=[];if(t.scaleValues.length==4*(o.length-1)){let d=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o);l.push(new SuperMap.Geometry.Point(o[0].x,o[0].y)),l.push(new SuperMap.Geometry.Point(o[0].x,o[0].y));let m=t.scaleValues[0],f=t.scaleValues[1],L=o[0].x+d*m,M=o[0].y+d*f;l.push(new SuperMap.Geometry.Point(L,M));for(let e=1;e<o.length-1;e++){l.push(new SuperMap.Geometry.Point(o[e].x,o[e].y));let i=t.scaleValues[4*e-2],s=t.scaleValues[4*e-1],n=o[e].x+d*i,a=o[e].y+d*s;l.push(new SuperMap.Geometry.Point(n,a)),i=t.scaleValues[4*e],s=t.scaleValues[4*e+1],n=o[e].x+d*i,a=o[e].y+d*s,l.push(new SuperMap.Geometry.Point(n,a))}let b=o.length-1;l.push(new SuperMap.Geometry.Point(o[b].x,o[b].y)),m=t.scaleValues[4*b-2],m=t.scaleValues[4*b-1],L=o[b].x+d*m,M=o[b].y+d*m,l.push(new SuperMap.Geometry.Point(L,M)),l.push(new SuperMap.Geometry.Point(o[b].x,o[b].y)),o.splice(e,0,i);var s=o.length;if(0==e){var n=new SuperMap.Geometry.Point(0,0),a=new SuperMap.Geometry.Point(0,0),r=new SuperMap.Geometry.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(8,3,o[0],o[1],o[2],a,r),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.6,o[0],o[1],a,n),l.splice(1,1,a),l.splice(0,0,new SuperMap.Geometry.Point(o[0].x,o[0].y)),l.splice(1,0,new SuperMap.Geometry.Point(o[0].x,o[0].y)),l.splice(2,0,n)}else if(e==s-1){var p=new SuperMap.Geometry.Point(0,0);n=new SuperMap.Geometry.Point(0,0),a=new SuperMap.Geometry.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(8,3,o[s-3],o[s-2],o[s-1],p,n),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.6,o[s-1],o[s-2],n,a),l.splice(l.length-1,1,n),l.push(new SuperMap.Geometry.Point(o[o.length-1].x,o[o.length-1].y)),l.push(a),l.push(new SuperMap.Geometry.Point(o[o.length-1].x,o[o.length-1].y))}else{var u=new SuperMap.Geometry.Point(0,0),h=new SuperMap.Geometry.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(8,3,o[e-1],o[e],o[e+1],u,h),l.splice(3*e,0,new SuperMap.Geometry.Point(o[e].x,o[e].y)),l.splice(3*e+1,0,u),l.splice(3*e+2,0,h)}t.scaleValues.length=0;var g=(l[2].x-l[0].x)/d,c=(l[2].y-l[0].y)/d;t.scaleValues.push(g),t.scaleValues.push(c);for(var y=1;y<o.length-1;y++){g=(l[3*y+1].x-l[3*y].x)/d,c=(l[3*y+1].y-l[3*y].y)/d;t.scaleValues.push(g),t.scaleValues.push(c);var P=(l[3*y+2].x-l[3*y].x)/d,S=(l[3*y+2].y-l[3*y].y)/d;t.scaleValues.push(P),t.scaleValues.push(S)}g=(l[3*(o.length-1)+1].x-l[3*(o.length-1)].x)/d,c=(l[3*(o.length-1)+1].y-l[3*(o.length-1)].y)/d,t.scaleValues.push(g),t.scaleValues.push(c)}else{o.splice(e,0,i);var d=SuperMap.Plot.PlottingUtil.computeBeizerPoints(!1,o,t.scaleValues);t.scaleValues=d.scaleValues}t.setLatLngs(L.Util.superMapPointsToLatLngs(o))},_computePointToLineMinDis:function(t,e){var i=this._getAddPointTolerance(),o=SuperMap.Plot.PlottingUtil.computePointToLineMinDis(t,e);return o.minDis>i&&(o.index=-1),o},_getAddPointTolerance:function(){var t=this._mouseTolerance;L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&(t=this.touchTolerance);var e=this._map.layerPointToLatLng(L.point(0,0)),i=this._map.layerPointToLatLng(L.point(t,0));return SuperMap.Plot.PlottingUtil.distance(new SuperMap.Geometry.Point(e.lng,e.lat),new SuperMap.Geometry.Point(i.lng,i.lat))},_collectEditMarkers:function(t){void 0!==this._editMarkers[t.uuid]&&this._removeMarkers(t);var e,i=[];if(t.layer instanceof _t){let e=t.graphic._getHandleAndCenterPoints();for(let o=0,l=e.handlePoints.length;o<l;o++){let l,s=new L.LatLng(e.handlePoints[o].lat,e.handlePoints[o].lng);0===e.handlePoints[o].tag?l=L.supermap.plotting.editMarker(s,{icon:this.options.leftBottomIcon,nHandle:-3,tag:o}):1===e.handlePoints[o].tag?l=L.supermap.plotting.editMarker(s,{icon:this.options.leftTopIcon,nHandle:-3,tag:o}):2===e.handlePoints[o].tag?l=L.supermap.plotting.editMarker(s,{icon:this.options.rightTopIcon,nHandle:-3,tag:o}):3===e.handlePoints[o].tag&&(l=L.supermap.plotting.editMarker(s,{icon:this.options.rightBottomIcon,nHandle:-3,tag:o})),this._addToMapAndBindMarker(l),l.owner=t,i.push(l)}if(!0===t.locked)for(let o=0,l=e.centerPoints.length;o<l;o++){let l=new L.LatLng(e.centerPoints[o].lat,e.centerPoints[o].lng),s=L.supermap.plotting.editMarker(l,{icon:this.options.centerCrossIcon,nHandle:-3});this._addToMapAndBindMarker(s),i.push(s),s.owner=t}}else if(t.layer instanceof Ct&&(t.layer.getLocked()||!t.layer.getEditable())){var o=t.getBounds();if(null!==o&&o.isValid()){var l=L.latLng(o.getNorth(),o.getEast()),s=L.latLng(o.getNorth(),o.getWest()),n=L.latLng(o.getSouth(),o.getEast()),a=L.latLng(o.getSouth(),o.getWest()),r=new L.Polygon([l,s,a,n],{smoothFactor:.5});L.setOptions(r,{weight:1,opacity:.5,color:"#0000ff",fillOpacity:.3,fillColor:"#0000ff"}),this._map.addLayer(r),e=r}}else if(t.getLocked()){var p=t._getHandlePointsByBounds();for(var u in p){let e=new L.LatLng(p[u].lat,p[u].lng),o=L.supermap.plotting.editMarker(e,{icon:this.options.lockedIcon,nHandle:-3});this._addToMapAndBindMarker(o),o.owner=t,i.push(o)}}else if(t instanceof m||t instanceof ct)if(t instanceof at&&this._editMode!==SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE)for(var h=0;h<t.scalePoints.length;h++){let e=new L.LatLng(t.scalePoints[h].lat,t.scalePoints[h].lng);var g=t.scalePoints[h].tag?t.scalePoints[h].tag:h;let o=L.supermap.plotting.editMarker(e,{icon:this.options.scaleIcon,nHandle:t.enableEdit?-2:-3,tag:g});this._addToMapAndBindMarker(o),i.push(o),o.owner=t}else{let e=t._getHandleAndRotatePoints();for(let o in e.handlePoints){var c=e.handlePoints[o].nHandle;(this._editMode!==SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE||t instanceof ct)&&(c=-3);let l=new L.LatLng(e.handlePoints[o].lat,e.handlePoints[o].lng),s=L.supermap.plotting.editMarker(l,{icon:this.options.editIcon,nHandle:c,tag:o});this._addToMapAndBindMarker(s),s.owner=t,i.push(s)}if(this._editMode===SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE)for(let o in e.rotatePoints){let l=new L.LatLng(e.rotatePoints[o].lat,e.rotatePoints[o].lng),s=L.supermap.plotting.editMarker(l,{icon:this.options.rotateIcon,nHandle:0});this._addToMapAndBindMarker(s),i.push(s),s.owner=t}}else if(this._editMode===SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE){let e=t._getHandleAndRotatePoints();for(let o=0,l=e.handlePoints.length;o<l;o++){let l=e.handlePoints[o].nHandle;t.enableEdit&&t.symbolType!==SuperMap.Plot.SymbolType.TEXTSYMBOL?t._getHandleCount()>9&&(l=-1):l=-3;let s=new L.LatLng(e.handlePoints[o].lat,e.handlePoints[o].lng),n=L.supermap.plotting.editMarker(s,{icon:this.options.editIcon,nHandle:l,tag:o});this._addToMapAndBindMarker(n),n.owner=t,i.push(n)}for(let o=0,l=e.rotatePoints.length;o<l;o++){let l=new L.LatLng(e.rotatePoints[o].lat,e.rotatePoints[o].lng),s=L.supermap.plotting.editMarker(l,{icon:this.options.rotateIcon,nHandle:t.enableEdit?0:-3});this._addToMapAndBindMarker(s),i.push(s),s.owner=t}}else if(t.symbolType===SuperMap.Plot.SymbolType.REGULARPOLYGON){let e=[t.latLngs[0],t.components[0].getLatLngs()[0][0]];for(let o in e){let l=L.supermap.plotting.editMarker(e[o],{icon:this.options.editIcon,nHandle:t.enableEdit?-1:-3,tag:o});this._addToMapAndBindMarker(l),i.push(l),l.owner=t}for(let e in t.scalePoints){let o=new L.LatLng(t.scalePoints[e].lat,t.scalePoints[e].lng),l=t.scalePoints[e].tag?t.scalePoints[e].tag:e,s=L.supermap.plotting.editMarker(o,{icon:this.options.scaleIcon,nHandle:t.enableEdit?-2:-3,tag:l});this._addToMapAndBindMarker(s),i.push(s),s.owner=t}}else if(t.symbolType===SuperMap.Plot.SymbolType.PARALLELLINE){var y=L.Util.superMapPointsToLatLngs(t.superMapAlgoSymbol.controlPoints[0]);t.getLatLngs()[0]=L.latLng(y[0].lat,y[0].lng);for(let e in t.latLngs){let o=new L.LatLng(t.latLngs[e].lat,t.latLngs[e].lng),l=L.supermap.plotting.editMarker(o,{icon:this.options.editIcon,nHandle:t.enableEdit?-1:-3,tag:e});this._addToMapAndBindMarker(l),i.push(l),l.owner=t}}else if(t.symbolType===SuperMap.Plot.SymbolType.NEWPIESYMBOL||t.symbolType===SuperMap.Plot.SymbolType.NEWCHORDSYMBOL||t.symbolType===SuperMap.Plot.SymbolType.NEWARCSYMBOL){for(let e=0;e<t.latLngs.length;e++){let o={};if(2===e){var P=t.components[0]._latlngs;o=P.length>1?new L.LatLng(P[1].lat,P[1].lng):new L.LatLng(P[0][1].lat,P[0][1].lng)}else o=new L.LatLng(t.latLngs[e].lat,t.latLngs[e].lng);let l=L.supermap.plotting.editMarker(o,{icon:this.options.editIcon,nHandle:t.enableEdit?-1:-3,tag:e});this._addToMapAndBindMarker(l),i.push(l),l.owner=t}for(let e in t.scalePoints){let o=new L.LatLng(t.scalePoints[e].lat,t.scalePoints[e].lng),l=t.scalePoints[e].tag?t.scalePoints[e].tag:e,s=L.supermap.plotting.editMarker(o,{icon:this.options.scaleIcon,nHandle:t.enableEdit?-2:-3,tag:l});this._addToMapAndBindMarker(s),i.push(s),s.owner=t}}else if(t.symbolType!==SuperMap.Plot.SymbolType.SATELLITE){for(let e in t.latLngs){let o=new L.LatLng(t.latLngs[e].lat,t.latLngs[e].lng),l=L.supermap.plotting.editMarker(o,{icon:this.options.editIcon,nHandle:t.enableEdit?-1:-3,tag:e});this._addToMapAndBindMarker(l),i.push(l),l.owner=t}for(let e in t.scalePoints){let o=new L.LatLng(t.scalePoints[e].lat,t.scalePoints[e].lng),l=t.scalePoints[e].tag?t.scalePoints[e].tag:e,s=L.supermap.plotting.editMarker(o,{icon:this.options.scaleIcon,nHandle:t.enableEdit?-2:-3,tag:l});this._addToMapAndBindMarker(s),i.push(s),s.owner=t}}else if(t.symbolType===SuperMap.Plot.SymbolType.SATELLITE||t.timeWindows.length>1)for(let e in t.scalePoints){let o=new L.LatLng(t.scalePoints[e].lat,t.scalePoints[e].lng),l=t.scalePoints[e].tag?t.scalePoints[e].tag:e,s=L.supermap.plotting.editMarker(o,{icon:this.options.scaleIcon,nHandle:t.enableEdit?-2:-3,tag:l});this._addToMapAndBindMarker(s),i.push(s),s.owner=t}this._editMarkers[t.uuid]=i,this._disEditBox[t.uuid]=e},_resetEditMarkersValue:function(t){if(Object.prototype.hasOwnProperty.call(this._editMarkers,t.uuid)){var e=this._editMarkers[t.uuid],i=this._disEditBox[t.uuid];if(t.layer instanceof _t&&null!=t.graphic){let i=t.graphic._getHandleAndCenterPoints();for(let t in i.handlePoints)e[t]._latlng=i.handlePoints[t],e[t].update();!0===t.locked&&(e[4]._latlng=i.centerPoints[0],e[4].update())}else if(null==i||!t.layer.getLocked()&&t.layer.getEditable())if(t instanceof m||t instanceof ct)if(t instanceof at&&this._editMode!==SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE)for(var o in t.scalePoints)e[o]._latlng=t.scalePoints[o],e[o].update();else{let i=t._getHandleAndRotatePoints();for(let t in i.handlePoints)e[t]._latlng=i.handlePoints[t],e[t].update();if(this._editMode===SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE){let t=i.handlePoints.length;for(let o in i.rotatePoints)e[t+parseInt(o)]._latlng=i.rotatePoints[o],e[t+parseInt(o)].update()}}else if(this._editMode===SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE){let i=t._getHandleAndRotatePoints();for(let t in i.handlePoints)e[t]._latlng=i.handlePoints[t],e[t].update();let o=i.handlePoints.length;for(let t in i.rotatePoints)e[o+parseInt(t)]._latlng=i.rotatePoints[t],e[o+parseInt(t)].update()}else if(void 0!==t.scalePoints&&null!==t.scalePoints||(t.scalePoints=[]),t.symbolType===SuperMap.Plot.SymbolType.REGULARPOLYGON){let i=[t.getLatLngs()[0],t.components[0].getLatLngs()[0][0]];for(let t in i)e[t]._latlng=i[t],e[t].update()}else if(t.symbolType===SuperMap.Plot.SymbolType.PARALLELLINE){var l=L.Util.superMapPointsToLatLngs(t.superMapAlgoSymbol.controlPoints[0]);t.getLatLngs()[0]=L.latLng(l[0].lat,l[0].lng);for(let i in t.getLatLngs())e[i]._latlng=t.getLatLngs()[i],e[i].update()}else if(t.symbolType===SuperMap.Plot.SymbolType.SATELLITE||t.timeWindows&&t.timeWindows.length>1)for(let i in t.scalePoints){let o=parseInt(i);e[o]._latlng=t.scalePoints[i],e[o].update()}else if(t.getLatLngs().length+t.scalePoints.length===e.length){for(let i in t.getLatLngs())e[i]._latlng=t.getLatLngs()[i],e[i].update();let i=t.getLatLngs().length;for(let o in t.scalePoints){var s=i+parseInt(o);e[s]._latlng=t.scalePoints[o],e[s].update()}}else this._collectEditMarkers(t);else{var n=t.getBounds();if(null!==n&&n.isValid()){var a=L.latLng(n.getNorth(),n.getEast()),r=L.latLng(n.getNorth(),n.getWest()),p=L.latLng(n.getSouth(),n.getEast()),u=L.latLng(n.getSouth(),n.getWest());i.setLatLngs([a,r,u,p])}}}},_removeMarkers:function(t){var e=this._editMarkers[t.uuid];for(let t in e)this._unbindMarkerEvents(e[t]),this._map.removeLayer(e[t]);delete this._editMarkers[t.uuid];var i=this._disEditBox[t.uuid];i&&this._map.removeLayer(i),delete this._disEditBox[t.uuid]},_unbindMarkerEvents:function(t){null!=t&&(t.off("mousemove",this._moveMove,this),t.off("mouseout",this._moveOut,this),-3!==t.options.nHandle&&(t.off("click",this._removePoint,this),t.off("dragstart",this._dragStart,this),t.off("drag",this._dragPoint,this),t.off("dragend",this._dragEnd,this),t.dragging.disable()))},_addToMapAndBindMarker:function(t){t.addTo(this._map),t.on("mousemove",this._moveMove,this),t.on("mouseout",this._moveOut,this),-3!==t.options.nHandle&&(t.on("click",this._removePoint,this),t.on("dragstart",this._dragStart,this),t.on("drag",this._dragPoint,this),t.on("dragend",this._dragEnd,this),t.dragging.enable()),-3===t.options.nHandle&&(t.on("dragstart",this._dragStart,this),t.on("dragend",this._dragEnd,this),t.dragging.enable())},_moveMove:function(t){switch(t.target.options.nHandle){case 1:case 8:t.target._icon.style.cursor="se-resize";break;case 3:case 6:t.target._icon.style.cursor="ne-resize";break;case 4:case 5:t.target._icon.style.cursor="e-resize";break;case 2:case 7:t.target._icon.style.cursor="n-resize";break;case-1:case-2:t.target._icon.style.cursor="pointer";break;case 0:t.target._icon.style.cursor="default"}},_moveOut:function(t){t.target._icon.style.cursor=""},_removePoint:function(t){if(this._editMode===SuperMap.Plot.EditMode.ADDCONTROLPOINT&&t.target.owner.isSelected){let i=L.Util.cloneLatLngs(t.target.owner.getLatLngs()),o=this._editMarkers[t.target.owner.uuid],l=o.indexOf(t.target);this._map.removeLayer(o[l]),o.splice(l,1),t.target.owner.latLngs.splice(l,1),t.target.owner.redraw();let s=new SuperMap.Plot.Transaction;L.supermap.plotting.getControl().getTransManager().add(s);var e=new SuperMap.Plot.TransactionInfo;e.layerId=t.target.owner.layer._leaflet_id,e.uuid=t.target.owner.layer.uuid,e.functionName="setLatLngs",e.undoParams=[i],e.redoParams=[L.Util.cloneLatLngs(t.target.owner.getLatLngs())],s.transInfos.push(e)}else if(this._editMode===SuperMap.Plot.EditMode.REMOVECONTROLPOINT&&t.target.owner.isSelected){let e=this._editMarkers[t.target.owner.uuid],i=e.indexOf(t.target),o=L.Util.cloneLatLngs(t.target.owner.getLatLngs());if(t.target.owner.getLatLngs().length<=t.target.owner.minEditPts)return this._editMode=SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE,void this._collectEditMarkers(t.target.owner);this._map.removeLayer(e[i]),e.splice(i,1),t.target.owner.latLngs.splice(i,1),t.target.owner.redraw();let l=new SuperMap.Plot.Transaction;L.supermap.plotting.getControl().getTransManager().add(l);let s=new SuperMap.Plot.TransactionInfo;s.layerId=t.target.owner.layer._leaflet_id,s.uuid=t.target.owner.uuid,s.functionName="setLatLngs",s.undoParams=[o],s.redoParams=[L.Util.cloneLatLngs(t.target.owner.getLatLngs())],l.transInfos.push(s)}},_dragStart:function(t){for(var e in this.transaction||(this.transaction=new SuperMap.Plot.Transaction,this.transaction.transType=SuperMap.Plot.TransactionType.EDIT,this.isAddTransInfo=!0),this.selectedFeatures){var i=this.selectedFeatures[e];if(i._isDot()&&(this._dragStartScale[i.uuid]=i.getScale()),i.scaleValues&&i.scaleValues.length&&0!==i.scaleValues.length){this._dragStartScaleValues[i.uuid]=[];for(var o=0;o<i.scaleValues.length;o++)this._dragStartScaleValues[i.uuid].push(i.scaleValues[o])}else this._dragStartScaleValues[i.uuid]=[];if(i.scalePoints&&i.scalePoints.length&&0!==i.scalePoints.length&&(this._dragStartScalePoints[i.uuid]=L.Util.cloneLatLngs(i.scalePoints)),this._dragStartRotate[i.uuid]=i.getRotate(),this.selectedFeatures[e]instanceof m?this._dragStartLatLngs[i.uuid]=this._editMarkers[this.selectedFeatures[e].uuid]:this._dragStartLatLngs[i.uuid]=L.Util.cloneLatLngs(i.getLatLngs()),i.symbolType===SuperMap.Plot.SymbolType.ARCREGION&&1===this._dragStartLatLngs[i.uuid].length&&this._dragStartLatLngs[i.uuid].push(i.scalePoints[0].clone()),i.symbolType===SuperMap.Plot.SymbolType.LINERELATION&&(null!==i.startAssociatedUuid?this._dragStartLatLngs[i.uuid].push(i.startAssociatedUuid):null!==i.endAssociatedUuid&&this._dragStartLatLngs[i.uuid].push(i.endAssociatedUuid)),this._dragStartBounds[i.uuid]=i.getBounds(),i.symbolType===SuperMap.Plot.SymbolType.FLAGGROUP)i.anchorPoint=L.latLng(i.getBounds().getSouth(),i.getBounds().getWest());else if(i.symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL)i.anchorPoint=L.latLng(i.getLatLngs()[0].lat,i.getLatLngs()[0].lng);else if(i.symbolType===SuperMap.Plot.SymbolType.CONCENTRICCIRCLE)i.anchorPoint=L.latLng(i.getLatLngs()[0].lat,i.getLatLngs()[0].lng);else if(i.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL){var l=i.getBounds();l.isValid()&&(i.anchorPoint=l.getCenter())}var s=this._editMarkers[i.uuid];for(let t in s)-3===s[t].options.nHandle&&s[t].setOpacity(0),s[t].setOpacity(0)}this.transaction||(this.transaction=new SuperMap.Plot.Transaction,this.transaction.transType=SuperMap.Plot.TransactionType.EDIT,this.isAddTransInfo=!0),this.oldLatLng=t.target._latlng,this._lastPixel=this._map.latLngToLayerPoint(t.target._latlng)},_dragEnd:function(){for(var t=0;t<this.selectedFeatures.length;t++)this._collectEditMarkers(this.selectedFeatures[t]),this.selectedFeatures[t].graphic&&this.selectedFeatures[t].graphic.updateImage();this.fire(SuperMap.Plot.Event.featuresmodified,{features:this.selectedFeatures}),this._saveHistoryInfomation(),this.transaction&&0!==this.transaction.transInfos.length&&(L.supermap.plotting.getControl().getTransManager().add(this.transaction),this.transaction=new SuperMap.Plot.Transaction,this.isAddTransInfo=!0)},_dragPoint:function(t){if(!1!==this.fire(SuperMap.Plot.Event.beforefeaturesmodified,{features:this.selectedFeatures})){var e=t.target.owner;-3===t.target.options.nHandle||this._avoidRegionControl?this._avoidRegionControl&&this._collectEditMarkers(e):this._editMode===SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE&&0===t.target.options.nHandle?this._dragRotate(t):this._editMode===SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE&&t.target.options.nHandle>0?this._dragResize(t,t.target.options.nHandle):this._dragLatLngs(t),this.fire(SuperMap.Plot.Event.featuresmodified,{features:this.selectedFeatures})}},_dragRotate:function(t){var e=this;var i=t.target.owner,o=null;o=i.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL||i.symbolType===SuperMap.Plot.SymbolType.CONCENTRICCIRCLE||i.symbolType===SuperMap.Plot.SymbolType.PICTURE?i.getLatLngs()[0]:i.anchorPoint;var l=this._map.latLngToLayerPoint(o);i.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&!0===i.positionOffset&&(l.x+=i.positionOffsetX*i.dScale,l.y+=i.positionOffsetY*i.dScale);var s=this._map.latLngToLayerPoint(t.latlng),n=this._map.latLngToLayerPoint(t.oldLatLng),a=s.x-l.x-(n.x-l.x),r=s.y-l.y-(n.y-l.y);if(0!==a&&0!==r){var p=180*(Math.atan2(n.y-l.y,n.x-l.x)-Math.atan2(s.y-l.y,s.x-l.x))/Math.PI,u=p;if(void 0!==this._lastPixel)u=180*(Math.atan2(this._lastPixel.y-l.y,this._lastPixel.x-l.x)-Math.atan2(s.y-l.y,s.x-l.x))/Math.PI;!function(t,i){for(var o=0;o<e.selectedFeatures.length;o++){var l=0;if(l=e.selectedFeatures[o].symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL||e.selectedFeatures[o].symbolType===SuperMap.Plot.SymbolType.PICTURE?t+e._dragStartRotate[e.selectedFeatures[o].uuid]:i,(l%=360)<0&&(l+=360),e.selectedFeatures[o].setRotate(l),e.isAddTransInfo){var s=new SuperMap.Plot.TransactionInfo;s.layerId=e.selectedFeatures[o].layer._leaflet_id,s.uuid=e.selectedFeatures[o].uuid,s.functionName="setRotate",e.transaction.transInfos.push(s)}}e.isAddTransInfo=!1}(p,u)}this._lastPixel=s},_dragResize:function(t,e){var i=this;function o(t,o,s){for(var n=[],a=0;a<i.selectedFeatures.length;a++)if(!0!==i.selectedFeatures[a].getLocked())if(i.selectedFeatures[a]._isDot()){var r=i._dragStartScale[i.selectedFeatures[a].uuid];if(i.selectedFeatures[a].symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&!1===i.selectedFeatures[a].limitWidthHeight)r.x=0===r.x?.05:r.x,r.y=0===r.y?.05:r.y,i.selectedFeatures[a].setScale(t*r.x,o*r.y);else{var p=t*(r=!0===Boolean(r)?r:1);p>0&&i.selectedFeatures[a].setScale(p)}if(i.isAddTransInfo){let t=new SuperMap.Plot.TransactionInfo;t.layerId=i.selectedFeatures[a].layer._leaflet_id,t.uuid=i.selectedFeatures[a].uuid,t.functionName="setScale",i.transaction.transInfos.push(t)}}else{if(9===i.selectedFeatures[a]._getHandleCount()&&e&&e>0){var u=i._dragStartBounds[i.selectedFeatures[a].uuid],h=i._dragStartLatLngs[i.selectedFeatures[a].uuid],g=i.selectedFeatures[a]._getLatLng(e,u,s);i.selectedFeatures[a]._resizeLatLngs(g,e,u,h)}if(SuperMap.Plot.AlgoSymbolFactory.isAccessServer(i.selectedFeatures[a].libID,i.selectedFeatures[a].code)){var c=new SuperMap.GetSymbolInfoParameters;c.libID=i.selectedFeatures[a].libID,c.code=i.selectedFeatures[a].code,c.inputPoints=L.Util.latLngsToSuperMapPoints(i.selectedFeatures[a].getLatLngs()),c.scaleValues=i.selectedFeatures[a].scaleValues,c.subSymbols=i.selectedFeatures[a].subSymbols,n.push(i.selectedFeatures[a]),L.supermap.symbolInfoService(l.serverUrl,l.serviceParams).getSymbolInfo(c,function(t){for(var e=0;e<n.length;e++)n[e].libID===t.result.libID&&n[e].code===t.result.code&&(n[e].symbolData.innerCells=t.result.innerCells,n[e].symbolData.scalePoints=t.result.scalePoints,n[e].symbolData.scaleValues=t.result.scaleValues,n[e].redraw(),n[e]._updateSymbolTexts(),n.splice(0,1))},this)}else if(i.selectedFeatures[a].redraw(),i.selectedFeatures[a]._updateSymbolTexts(),i.selectedFeatures[a].symbolType===SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL&&i.selectedFeatures[a].ownerGroup&&(i.selectedFeatures[a].ownerGroup.symbolType===SuperMap.Plot.SymbolType.NAVYDEPLOYMENT||i.selectedFeatures[a].ownerGroup.symbolType===SuperMap.Plot.SymbolType.AIRDEPLOYMENT))for(let t in i.selectedFeatures[a].ownerGroup.subObjects)i.selectedFeatures[a].ownerGroup.subObjects[t].redraw();if(i.isAddTransInfo){let t=new SuperMap.Plot.TransactionInfo;t.layerId=i.selectedFeatures[a].layer._leaflet_id,t.uuid=i.selectedFeatures[a].uuid,t.functionName="setLatLngs",i.transaction.transInfos.push(t)}}}var l=t.target.owner,s=this._dragStartBounds[l.uuid],n=s.getEast()-s.getWest(),a=s.getNorth()-s.getSouth(),r=l._resizeOffset(t.latlng,e,s);!0===t.originalEvent.altKey&&(0===r.lng&&0!==r.lat?r.lng=r.lat*n/a:0===r.lat&&0!==r.lng?r.lat=r.lng*a/n:Math.abs(r.lng)<Math.abs(r.lat)?r.lng<0&&r.lat>0||r.lng>0&&r.lat<0?r.lng=r.lat*n/a*-1:r.lng=r.lat*n/a:r.lat<0&&r.lng>0||r.lat>0&&r.lng<0?r.lat=r.lng*a/n*-1:r.lat=r.lng*a/n);var p=1,u=l._resizeBounds(t.latlng,e,s),h=!0===Boolean(n)?(u.getEast()-u.getWest())/n:.5,g=!0===Boolean(a)?(u.getNorth()-u.getSouth())/a:.5;p=2===e||7===e?g:4===e||5===e?h:h<g?h:g,l.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&!1===l.limitWidthHeight?o(h,g,r):o(p,null,r),this.oldLatLng=t.latlng},_dragLatLngs:function(t){var e=t.target.owner,i=this._editMarkers[e.uuid],o=SuperMap.Util.indexOf(i,t.target),l=!1;if(-2===t.target.options.nHandle&&(l=!0),this.transaction||(this.transaction=new SuperMap.Plot.Transaction,this.transaction.transType=SuperMap.Plot.TransactionType.EDIT,this.isAddTransInfo=!0),SuperMap.Plot.AlgoSymbolFactory.isAccessServer(e.libID,e.code)){var s=(new Date).getTime(),n=this._map.latLngToLayerPoint(t.latlng);if(l&&void 0!==this._lastDragPixel&&null!==this._lastDragPixel&&!((Math.abs(n.x-this._lastDragPixel.x)>3||Math.abs(n.y-this._lastDragPixel.y)>3)&&s-this.lastDownTime>100))return;var a=new SuperMap.GetSymbolInfoParameters;a.libID=e.libID,a.code=e.code,l?(a.inputPoints=L.Util.latLngsToSuperMapPoints(e.getLatLngs()),a.scalePoints=L.Util.latLngsToSuperMapPoints(e.scalePoints),a.scaleValues=e.scaleValues,a.newScalePoint=new SuperMap.Geometry.Point(t.latlng.lng,t.latlng.lat),a.newScalePointIndex=parseInt(t.target.options.tag)):(e.getLatLngs()[o]=t.target.getLatLng(),a.inputPoints=L.Util.latLngsToSuperMapPoints(e.getLatLngs()),a.scaleValues=e.scaleValues),a.subSymbols=e.subSymbols,L.supermap.symbolInfoService(e.serverUrl,e.serviceParams).getSymbolInfo(a,function(t){e.symbolData.innerCells=t.result.innerCells,e.symbolData.scalePoints=t.result.scalePoints,e.symbolData.scaleValues=t.result.scaleValues,e.redraw(),e._updateSymbolTexts(),this._resetEditMarkersValue(e)},this),this._lastDragPixel=n,this.lastDownTime=(new Date).getTime()}else if(-1===t.target.options.nHandle){if(e.symbolType===SuperMap.Plot.SymbolType.REGULARPOLYGON)1===o?e.getLatLngs()[e.getLatLngs().length-1]=t.latlng:e.getLatLngs()[0]=t.latlng;else if(e.symbolType===SuperMap.Plot.SymbolType.ELLIPSESYMBOL)e.getLatLngs()[o]=t.latlng;else if(e.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL){if(!0===e.positionOffset?e.setLatLngs(t.latlng):e.setLatLngs(e.latLngs[0]),this.isAddTransInfo){let t=new SuperMap.Plot.TransactionInfo;t.layerId=e.layer._leaflet_id,t.uuid=e.uuid,t.functionName="setLatLngs",this.transaction.transInfos.push(t)}}else e.getLatLngs()[o]=t.latlng;if(e.symbolType===SuperMap.Plot.SymbolType.LINERELATION||e.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT||e.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1||e.symbolType===SuperMap.Plot.SymbolType.ELLIPSESYMBOL)e._modifyPoint(parseInt(t.target.options.tag),t.latlng);else if(e.redraw(),e.symbolType===SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL&&e.ownerGroup&&(e.ownerGroup.symbolType===SuperMap.Plot.SymbolType.NAVYDEPLOYMENT||e.ownerGroup.symbolType===SuperMap.Plot.SymbolType.AIRDEPLOYMENT))for(let t in e.ownerGroup.subObjects)e.ownerGroup.subObjects[t].redraw();e._updateSymbolTexts(),this._resetEditMarkersValue(e)}else if(-2===t.target.options.nHandle){var r=t.target.getLatLng();if(r.isScalePoint=!0,e._modifyPoint(parseInt(t.target.options.tag),r),e.symbolType===SuperMap.Plot.SymbolType.FLAGGROUP)for(var p=0,u=e.components.length;p<u;p++)e.components[p]._updateSymbolTexts();else e._updateSymbolTexts();this._resetEditMarkersValue(e)}if(this.isAddTransInfo){let i=new SuperMap.Plot.TransactionInfo;if(i.layerId=e.layer._leaflet_id,i.uuid=e.uuid,i.functionName="setLatLngs",-2===t.target.options.nHandle&&(i.functionName="setScaleValues",e.symbolType!==SuperMap.Plot.SymbolType.ARCREGION&&e.symbolType!==SuperMap.Plot.SymbolType.FLAGGROUP||(i.functionName="modifyPoint",i.undoParams=[parseInt(t.target.options.tag)],i.redoParams=[parseInt(t.target.options.tag)])),this.transaction.transInfos.push(i),-2!==t.target.options.nHandle&&0===e.libID&&590===e.code||100===e.libID&&(17703===e.code||17704===e.code)){let t=new SuperMap.Plot.TransactionInfo;t.layerId=e.layer._leaflet_id,t.uuid=e.uuid,t.functionName="setScaleValues"}}this.isAddTransInfo=!1},_pasteToPosition:function(){if(this.pasteGeoAry&&0!==this.pasteGeoAry.length){var t=new SuperMap.Plot.Transaction;t.transType=SuperMap.Plot.TransactionType.CREATE,L.supermap.plotting.getControl().getTransManager().add(t);var e=function(t,e,i,o){var l=new SuperMap.Plot.TransactionInfo;l.layerId=t,l.uuid=e,l.feature=i,o.transInfos.push(l)},i=null,o=null,l=this.pasteGeoAry.slice();if(0!==arguments.length){var s=new L.LatLngBounds;for(let t=0,e=l.length;t<e;t++){var n=l[t];if(n instanceof m)for(let t=0;t<n.subObjects.length;t++){var a=n.subObjects[t];s.extend(a._bounds)}else n instanceof d&&s.extend(n._bounds)}i=s.getCenter()}0!==this.getSelectedFeatures().length&&this.unselectFeatures();var r=this._map.getPlottingLayers();for(let s in l)if(l[s]instanceof d&&(o=l[s].clone()),0!==arguments.length&&null!==i){for(let t=0,e=r.length;t<e;t++)if(r[t].getEditable()&&!r[t].getLocked()){r[t].addFeatures(o);break}if(o instanceof yt||o.move(arguments[0].lat-i.lat,arguments[0].lng-i.lng),this.selectFeatures(o),e(o.layer._leaflet_id,o.uuid,o,t),l[s]&&l[s].geoSymbolTexts)for(let i=0;i<l[s].geoSymbolTexts.length;i++){let n=l[s].geoSymbolTexts[i].getSymbolData();n.associatedUuid=o.uuid;for(let i in l)if(l[i].symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT||l[i].symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1){let o=l[s].layer.createSymbol(n.libID,n.code,null,{symbolData:n});this.selectFeatures(o),l.splice(i,1),e(o.layer._leaflet_id,o.uuid,o,t);break}}if(l[s]&&l[s].deployments)for(let i=0;i<l[s].deployments.length;i++){let n=l[s].deployments[i].getSymbolData();n.associatedUuid=o.uuid;for(let i in l)if(l[i].symbolType===SuperMap.Plot.SymbolType.NAVYDEPLOYMENT||l[i].symbolType===SuperMap.Plot.SymbolType.AIRDEPLOYMENT){let o=l[s].layer.createSymbol(n.libID,n.code,null,{symbolData:n});this.selectFeatures(o),l.splice(i,1),e(o.layer._leaflet_id,o.uuid,o,t);break}}if(l[s]&&l[s].timeWindows)for(let i=0;i<l[s].timeWindows.length;i++){let n=l[s].timeWindows[i].getSymbolData();n.associatedUuid=o.uuid;for(let i in l)if(l[i].symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS){let o=l[s].layer.createSymbol(n.libID,n.code,null,{symbolData:n});this.selectFeatures(o),l.splice(i,1),e(o.layer._leaflet_id,o.uuid,o,t);break}}}else for(let i=0,n=r.length;i<n;i++)if(r[i].getEditable()&&!r[i].getLocked()){if(r[i].addFeatures(o),1012!==o.code&&this.selectFeatures(o),e(o.layer._leaflet_id,o.uuid,o,t),l[s]&&l[s].geoSymbolTexts)for(let i=0;i<l[s].geoSymbolTexts.length;i++){let n=l[s].geoSymbolTexts[i].getSymbolData();n.associatedUuid=o.uuid;for(let i in l)if(l[i].symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT||l[i].symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1){var p=l[s].layer.createSymbol(n.libID,n.code,null,{symbolData:n});this.selectFeatures(p),l.splice(i,1),e(p.layer._leaflet_id,p.uuid,p,t);break}}if(l[s]&&l[s].deployments)for(let i=0;i<l[s].deployments.length;i++){let n=l[s].deployments[i].getSymbolData();n.associatedUuid=o.uuid;for(let i in l)if(l[i].symbolType===SuperMap.Plot.SymbolType.NAVYDEPLOYMENT||l[i].symbolType===SuperMap.Plot.SymbolType.AIRDEPLOYMENT){let o=l[s].layer.createSymbol(n.libID,n.code,null,{symbolData:n});this.selectFeatures(o),l.splice(i,1),e(o.layer._leaflet_id,o.uuid,o,t);break}}if(l[s]&&l[s].timeWindows)for(let i=0;i<l[s].timeWindows.length;i++){if(!Object.prototype.hasOwnProperty.call(l[s].timeWindows[i],"symbolType"))return;let n=l[s].timeWindows[i].getSymbolData();n.associatedUuid=o.uuid;for(let i in l)if(l[i].symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS){let o=l[s].layer.createSymbol(n.libID,n.code,null,{symbolData:n});this.selectFeatures(o),l.splice(i,1),e(o.layer._leaflet_id,o.uuid,o,t);break}}break}}},pasteToPositionAndLayer:function(t,e){var i=!0;e&&e instanceof Ct&&(i=!1);var o=!1;null!==t&&void 0!==t||(o=!0);var l=null,s=this.pasteGeoAry.slice();if(!o){for(var n=new L.LatLngBounds,a=0;a<s.length;a++){var r=s[a];r instanceof yt&&n.extend(r._bounds),n.extend(r._bounds)}l=n.getCenter()}for(let t=0;t<this.selectedFeatures.length;t++){let e=this.selectedFeatures[t];this.unselectFeatures(e)}this.selectedFeatures=[];for(let n=0;n<s.length;n++){let a=s[n];if(!0!==a.layer.isLocked&&!1!==a.layer.isEditable){var p=null;if(p=a instanceof yt?a.route.clone():a.clone(),i?a.layer.addFeatures(p):e.addFeatures(p),o||null===l||p instanceof yt||p.move(t.lat-l.lat,t.lng-l.lng),void 0!==this.pasteGeoSel&&this.pasteGeoSel.length>n&&!0===this.pasteGeoSel[n])if(a instanceof yt){var u=p._getNodeFeature(p._getNodeByUuid(a.routeNode.id));this.selectedFeatures(u)}else this.selectFeatures(p);if(s[n]&&s[n].geoSymbolTexts)for(let t=0;t<s[n].geoSymbolTexts.length;t++){let e=s[n].geoSymbolTexts[t].getSymbolData();e.associatedUuid=p.uuid;for(let t in s)if(s[t].symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT||s[t].symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1){let i=s[n].layer.createSymbol(e.libID,e.code,null,{symbolData:e});this.selectFeatures(i),s.splice(t,1);break}}if(s[n]&&s[n].deployments)for(let t=0;t<s[n].deployments.length;t++){let e=s[n].deployments[t].getSymbolData();e.associatedUuid=p.uuid;for(let t in s)if(s[t].symbolType===SuperMap.Plot.SymbolType.NAVYDEPLOYMENT||s[t].symbolType===SuperMap.Plot.SymbolType.AIRDEPLOYMENT){let i=s[n].layer.createSymbol(e.libID,e.code,null,{symbolData:e});this.selectFeatures(i),s.splice(t,1);break}}if(s[n]&&s[n].timeWindows)for(let t=0;t<s[n].timeWindows.length;t++){let e=s[n].timeWindows[t].getSymbolData();e.associatedUuid=p.uuid;for(let t in s)if(s[t].symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS){let i=s[n].layer.createSymbol(e.libID,e.code,null,{symbolData:e});this.selectFeatures(i),s.splice(t,1);break}}}}},equalLarge:function(t){for(var e=[],i=0;i<this.getSelectedFeatures().length;i++)this.getSelectedFeatures()[i].symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&e.push(this.getSelectedFeatures()[i]);if(!(e.length<2)){var o=new SuperMap.Plot.Transaction;L.supermap.plotting.getControl().getTransManager().add(o);var l=function(t,e,i,o,l){var s=new SuperMap.Plot.TransactionInfo;s.layerId=t,s.uuid=e,s.functionName="setSymbolSize",s.undoParams=i,s.redoParams=o,l.transInfos.push(s)};if(t===SuperMap.Plot.EqualLargeType.WIDTH){var s=e[e.length-1].symbolSize.w;for(let t=0;t<e.length-1;t++){var n=e[t].symbolSize.w;e[t].setSymbolSize(s,e[t].symbolSize.h),l(e[t].layer._leaflet_id,e[t].uuid,[n,e[t].symbolSize.h],[s,e[t].symbolSize.h],o)}}else if(t===SuperMap.Plot.EqualLargeType.HEIGHT){var a=e[e.length-1].symbolSize.h;for(let t=0;t<e.length-1;t++){var r=e[t].symbolSize.h;e[t].setSymbolSize(e[t].symbolSize.w,a),l(e[t].layer._leaflet_id,e[t].uuid,[e[t].symbolSize.w,r],[e[t].symbolSize.w,a],o)}}else if(t===SuperMap.Plot.EqualLargeType.SAME){var p=e[e.length-1].symbolSize.w,u=e[e.length-1].symbolSize.h;for(let t=0;t<e.length-1;t++){var h=e[t].symbolSize.w,g=e[t].symbolSize.h;e[t].setSymbolSize(p,u),l(e[t].layer._leaflet_id,e[t].uuid,[h,g],[p,u],o)}}}},uniformDistribution:function(t){if(!(this.getSelectedFeatures().length<3)){var e=new SuperMap.Plot.Transaction;L.supermap.plotting.getControl().getTransManager().add(e);var i=function(t,e,i,o,l){var s=new SuperMap.Plot.TransactionInfo;s.layerId=t,s.uuid=e,s.functionName="move",s.undoParams=i,s.redoParams=o,l.transInfos.push(s)},o=[];for(let t=0;t<this.getSelectedFeatures().length;t++){var l=this.getSelectedFeatures()[t].getBounds();o.push(new SuperMap.Geometry.Point(l.getCenter().lng,l.getCenter().lat))}var s=this.getSelectedFeatures().slice();if(t===SuperMap.Plot.UniformDistributionType.LEVEL){for(let t=0;t<o.length;t++)for(let e=0;e<o.length-1-t;e++)if(o[e].x>o[e+1].x){let t=o[e+1];o[e+1]=o[e],o[e]=t;let i=s[e+1];s[e+1]=s[e],s[e]=i}for(var n=Math.abs(o[o.length-1].x-o[0].x)/(o.length-1),a=1;a<o.length-1;a++){var r=o[o.length-1].x-n*a-o[a].x;s[a].move(0,r),this._resetEditMarkersValue(s[a]),i(s[a].layer._leaflet_id,s[a].uuid,[0,-r],[0,r],e)}}else if(t===SuperMap.Plot.UniformDistributionType.VERTICAL){for(var p=0;p<o.length;p++)for(var u=0;u<o.length-1-p;u++)if(o[u].y>o[u+1].y){var h=o[u+1];o[u+1]=o[u],o[u]=h;var g=s[u+1];s[u+1]=s[u],s[u]=g}var c=Math.abs(o[o.length-1].y-o[0].y)/(o.length-1);for(let t=1;t<o.length-1;t++){var y=o[o.length-1].y-c*t-o[t].y;s[t].move(y,0),this._resetEditMarkersValue(s[t]),i(s[t].layer._leaflet_id,s[t].uuid,[-y,0],[y,0],e)}}}}});L.Map.include({getPlotEditControl:function(){return this._plotEditControl?this._plotEditControl:null}});L.supermap.plotting.editControl=function(t){return new kt(t)};var Vt=L.supermap.ServiceBase.extend({initialize:function(t,e){L.supermap.ServiceBase.prototype.initialize.call(this,t,e)},getSMLInfos:function(t,e,i){var o=this;return i||(i=o),new a(o.url,{proxy:o.options.proxy,withCredentials:o.options.withCredentials,crossOrigin:o.options.crossOrigin,headers:o.options.headers,serverType:o.options.serverType,eventListeners:{scope:i,processCompleted:e,processFailed:e}}).processAsync(t),o},editSMLFile:function(t,e,i){var o=this;return i||(i=o),new l(o.url,{proxy:o.options.proxy,withCredentials:o.options.withCredentials,crossOrigin:o.options.crossOrigin,headers:o.options.headers,serverType:o.options.serverType,eventListeners:{scope:i,processCompleted:e,processFailed:e}}).processAsync(t),o}});L.supermap.smlFileService=function(t,e){return new Vt(t,e)};var Yt=L.supermap.ServiceBase.extend({initialize:function(t,e){L.supermap.ServiceBase.prototype.initialize.call(this,t,e)},getSymbolInfo:function(t,e,i){var o=this;return i||(i=o),new r(o.url,{proxy:o.options.proxy,withCredentials:o.options.withCredentials,crossOrigin:o.options.crossOrigin,headers:o.options.headers,serverType:o.options.serverType,eventListeners:{scope:i,processCompleted:e,processFailed:e}}).processAsync(t),o}});L.supermap.symbolInfoService=function(t,e){return new Yt(t,e)};var zt=L.supermap.ServiceBase.extend({initialize:function(t,e){L.supermap.ServiceBase.prototype.initialize.call(this,t,e)},getLibIDs:function(t,e){var i=this;return e||(e=i),new s(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:e,processCompleted:t,processFailed:t}}).processAsync(),i},getLibInfo:function(t,e,i){var o=this;return i||(i=o),new n(o.url,{proxy:o.options.proxy,withCredentials:o.options.withCredentials,crossOrigin:o.options.crossOrigin,headers:o.options.headers,serverType:o.options.serverType,eventListeners:{scope:i,processCompleted:e,processFailed:e}}).processAsync(t),o}});L.supermap.symbolLibService=function(t,e){return new zt(t,e)}})()})();