1234567 |
- /*!
- *
- * iclient-plot-leaflet.(http://iclient.supermap.io)
- * Copyright© 2000 - 2019 SuperMap Software Co.Ltd
- * version: v10.0.0
- *
- */!function(t){var e={};function i(o){if(e[o])return e[o].exports;var s=e[o]={i:o,l:!1,exports:{}};return t[o].call(s.exports,s,s.exports,i),s.l=!0,s.exports}i.m=t,i.c=e,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(o,s,function(e){return t[e]}.bind(null,s));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e,i){"use strict";i.r(e);var o=window.SuperMap=window.SuperMap||{},s=o.Plot=o.Plot||{},l=(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,REGULARPOLYGON:410,CHORDSYMBOL:370,PIESYMBOL:380,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}),n=SuperMap.Plot.LineRelationType={SOLID:0,DASH:1,ARROW:2},a=SuperMap.Plot.AlgoSurroundLineType={NONE:0,INNER:1,OUT:2,ALL:3},r=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"},p=SuperMap.Plot.RelLineText={ONLINE:0,ONLEFTLINE:1,ONRIGHTLINE:2,ONBOTHLINE:3},u=SuperMap.Plot.RadiusLineType={NONE:0,SOLID:1,ARROW:2},h=SuperMap.Plot.AnnoPosition={LEFTTOP:0,LEFTBOTTOM:1,RIGHTTOP:2,RIGHTBOTTOM:3,TOP:4,BOTTOM:5,LEFT:6,RIGHT:7},y=SuperMap.Plot.ArrowLineType={DOUBLELINE:0,TRIANGLESOLID:1,NONE:2},c=SuperMap.Plot.TextBoxType={WITHTIPBOX:0,RECTBOX:1,LINEBOX:2,NONEBOX:3},S=SuperMap.Plot.PositionOffsetType={LINE:0,GRADIENTLINE:1},P=SuperMap.Plot.AlignType={LEFT:0,RIGHT:1,UP:2,DOWN:3,VERTICALCENTER:4,HORIZONTALCENTER:5},g=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};var d=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.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.initializecompleted="initializecompleted",SuperMap.Plot.Event.cachecompleted="cachecompleted",SuperMap.Plot.Event.reseteditmarkersvalues="reseteditmarkersvalues",SuperMap.Plot.Event.reseteditmarkers="reseteditmarkers";var f=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};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},SuperMap.Plot.GOAnimationState={UNKNOWN:0,PLAYING:1,PAUSE:2,STOP:3,RESET:4};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,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))})}};class m{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)}}SuperMap.EditSmlFileParameters=m;class M 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 s=null;t.method&&"POST"===t.method&&(s=SuperMap.EditSmlFileParameters.toJsonParameters(t)),e.request({method:i,data:s,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}}SuperMap.EditSmlFileService=M;class b 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=b;class T{constructor(t){t=t||{},this.libID=t.libID,this.CLASS_NAME="SuperMap.GetLibInfoParameter"}destroy(){this.libID=null}}SuperMap.GetLibInfoParameter=T;class v 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=v;class A{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="+t.start),!t.count||null===t.count&&0===t.count||(e+="&count="+t.count),e}}}SuperMap.GetSMLInfosParameters=A;class x 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=x;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="+t.libID+"&code="+t.code;if(t.inputPoints&&null!==t.inputPoints&&0!==t.inputPoints.length){e+="&inputPoints=[";for(let i=0;i<t.inputPoints.length;i++)i===t.inputPoints.length-1?e+='{"x":'+t.inputPoints[i].x+', "y":'+t.inputPoints[i].y+"}]":e+='{"x":'+t.inputPoints[i].x+', "y":'+t.inputPoints[i].y+"},"}if(t.scalePoints&&null!==t.scalePoints&&0!==t.scalePoints.length){e+="&scalePoints=[";for(let i=0;i<t.scalePoints.length;i++)i===t.scalePoints.length-1?e+='{"x":'+t.scalePoints[i].x+', "y":'+t.scalePoints[i].y+"}]":e+='{"x":'+t.scalePoints[i].x+', "y":'+t.scalePoints[i].y+"},"}if(t.scaleValues&&null!==t.scaleValues&&0!==t.scaleValues.length){e+="&scaleValues=[";for(let i=0;i<t.scaleValues.length;i++)i===t.scaleValues.length-1?e+=t.scaleValues[i]+"]":e+=t.scaleValues[i]+","}if(t.subSymbols&&null!==t.subSymbols&&0!==t.subSymbols.length){e+="&subSymbols=[";for(let i=0;i<t.subSymbols.length;i++)i===t.subSymbols.length-1?e+=t.subSymbols[i].code+"]":e+=t.subSymbols[i].code+","}return t.newScalePoint&&null!==t.newScalePoint&&(e+='&newScalePoint={"x":'+t.newScalePoint.x+', "y":'+t.newScalePoint.y+"}"),t.newScalePointIndex&&null!==t.newScalePointIndex&&(e+="&newScalePointIndex="+t.newScalePointIndex),t.symbolRank&&null!==t.symbolRank&&(e+="&symbolRank="+t.symbolRank),t.negativeImage&&null!==t.negativeImage&&(e+="&negativeImage="+t.negativeImage),t.surroundLineType&&null!==t.surroundLineType&&(e+="&surroundLineType="+t.surroundLineType),e}}}SuperMap.GetSymbolInfoParameters=_;class O 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.serviceProcessCompleted,failure:i.serviceProcessFailed})}}}SuperMap.GetSymbolInfoService=O;class w{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.DefaultStyle=w;class I{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.ExtendProperty=I;class D{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.LayerDataStruct=D;class E{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.MapInfoStruct=E;class C{constructor(t,e,i,o,s){this.x=parseFloat(t),this.y=parseFloat(e),(i||0==i)&&(this.z=parseFloat(i)),o&&(this.number=o),s&&(this.time=s),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.OrbitPoint=C;class N{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)}}SuperMap.Plot.Property=N;class U{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 U(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=U;class R{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.SitDataStruct=R;class B{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.SMLInfoStruct=B;class G{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.SubSymbol=G;class F{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.style=i,this.CLASS_NAME="SuperMap.Plot.SymbolText"}destroy(){this.textContent=null,this.textPosition=null,this.offsetX=null,this.offsetY=null}clone(){var t={offsetX:this.offsetX,offsetY:this.offsetY},e={};return e=SuperMap.Util.copyAttributes(e,this.style),new SuperMap.Plot.SymbolText(this.textContent,this.textPosition,e,t)}setSymbolData(){var t={};return t.textContent=this.textContent,t.textPosition=this.textPosition,t.offsetX=this.offsetX,t.offsetY=this.offsetY,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,SuperMap.Plot.AnalysisSymbol.getStyle(t,!0),this}}SuperMap.Plot.SymbolText=F;class k{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}}SuperMap.Plot.TimeWindowParameter=k;class z{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 z(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=z;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"}};class Y{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),s=Math.max(t.y,e.y),l=Math.min(t.x,e.x),n=Math.min(t.y,e.y);return{ptMinX:l,ptMinY:n,width:Math.abs(o-l),height:Math.abs(s-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 s=this.feature.style.fillCenterOffsetX*e.r,l=this.feature.style.fillCenterOffsetY*e.r,n=e.r/Math.sqrt(2)+Math.abs(s)>e.r/Math.sqrt(2)+Math.abs(l)?e.r/Math.sqrt(2)+Math.abs(s):e.r/Math.sqrt(2)+Math.abs(l);(t=this.getContext().createRadialGradient(e.center.x+s,e.center.y-l,0,e.center.x+s,e.center.y-l,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,s=e.height,l=SuperMap.Plot.PlottingUtil.colorStringToRGB(t[0].color);i.strokeStyle=`rgba(${l.red},${l.green},${l.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,s),i.lineTo(o,0);break;case 3:i.moveTo(0,0),i.lineTo(o,0),i.moveTo(0,0),i.lineTo(0,s);break;case 4:i.moveTo(0,s),i.lineTo(o,0),i.moveTo(0,0),i.lineTo(o,s);break;case 5:i.moveTo(0,0),i.lineTo(o,s);break;case 6:i.moveTo(0,0),i.lineTo(o,0);break;case 7:i.moveTo(0,0),i.lineTo(0,s)}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)),s=e(i(360-t%360)),l=Math.pow(2,-52);return(o.x<=0||Math.abs(o.x)<=l)&&(o.x=0),(o.y<=0||Math.abs(o.y)<=l)&&(o.y=0),(s.x<=0||Math.abs(s.x)<=l)&&(s.x=0),(s.y<=0||Math.abs(s.y)<=l)&&(s.y=0),{x1:o.x,y1:o.y,x2:s.x,y2:s.y}}}SuperMap.Plot.CalculateCanvasGradient=Y;class V{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,s=i.colors.length;o<s;o++){var l=L.SVG.create("stop");l.setAttributeNS(null,"offset",i.colors[o].offset),l.setAttributeNS(null,"style","stop-color:"+SuperMap.Plot.PlottingUtil.colorRGBA(i.colors[o].color,i.colors[o].opacity)),e.appendChild(l)}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 s(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 l(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&&s("M 0 7.3 L 0 0",i,t[0]):4===t[0].fillID&&null===i&&s("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?(l("0 0 0 7.3 7.3 7.3 7.3 0",i,t[1]),s("M 7.3 0 L 0 0",i,t[0])):(l("0 0 0 5.4 5.4 5.4 5.4 0",i,t[1]),s("M 5.4 0 L 0 0",i,t[0])),4===t[0].fillID?s("M 0 5.4 L 0 0",i,t[0]):3===t[0].fillID&&s("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}}}}SuperMap.Plot.CalculateSVGGradient=V;var W=SuperMap.Plot.AnalysisSymbol=SuperMap.Plot.AnalysisSymbol||{};SuperMap.Plot.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},SuperMap.Plot.AnalysisSymbol.analysisDotBasicInfo=function(t){let e=SuperMap.Plot.PlottingUtil.DPI,i=new Object;i.anchorPoint=new SuperMap.Geometry.Point(t.anchorPoint.x,t.anchorPoint.y);let o=0,s=0;return void 0!==t.symbolSizeInLib?(o=Math.round(t.symbolSizeInLib.x*e/25.4/10),s=Math.round(t.symbolSizeInLib.y*e/25.4/10)):(o=Math.round(t.symbolSize.x*e/25.4/10),s=Math.round(t.symbolSize.y*e/25.4/10)),i.symbolSizeInLib=new SuperMap.Size(o,s),i.symbolSizeInLib.w=o,i.symbolSizeInLib.h=s,i.middleMarkBounds=new SuperMap.Bounds(t.middleMarkBounds.leftBottom.x,t.middleMarkBounds.leftBottom.y,t.middleMarkBounds.rightTop.x,t.middleMarkBounds.rightTop.y),i},SuperMap.Plot.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 SuperMap.Plot.SubSymbol(t.libID,t.subSymbols[e]));if(t.scalePoints){i.scalePoints=[];for(let e=0;e<t.scalePoints.length;e++){let o=new SuperMap.Geometry.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},SuperMap.Plot.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 s=t.innerCells[o];if(t.symbolIsCanFill&&s.type!==SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL){let o=new Object,l=SuperMap.Plot.AnalysisSymbol.getStyle(t,e);o.type=32,o.style={fillSymbolID:l.fillSymbolID,fillColor:l.fillColor,fillOpacity:l.fillOpacity,strokeOpacity:0,strokeWidth:0,fillLimit:!1,lineColorLimit:!0,lineWidthLimit:!0},o.positionPoints=[];for(let t=0;t<s.positionPoints.length;t++){let e=new SuperMap.Geometry.Point(s.positionPoints[t].x,s.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(SuperMap.Plot.AnalysisSymbol.analysisInnerCell(o[t],e))}return i},SuperMap.Plot.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=SuperMap.Plot.AnalysisSymbol.getStyle(t,e),null!=t.positionPoints){let e=t.positionPoints;for(let t=0;t<e.length;t++){let o=new SuperMap.Geometry.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===SuperMap.Plot.SymbolType.RECTANGLESYMBOL){let t=i.positionPoints[0],e=i.positionPoints[1],o=t.clone(),s=new SuperMap.Geometry.Point(e.x,t.y),l=e.clone(),n=new SuperMap.Geometry.Point(t.x,e.y);i.positionPoints=[],i.positionPoints.push(o),i.positionPoints.push(s),i.positionPoints.push(l),i.positionPoints.push(n),i.type=SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL}i.type===SuperMap.Plot.SymbolType.TEXTSYMBOL&&(i.style.fontSizeLimit=!0)}return i},SuperMap.Plot.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":3===t?"lm":4===t?"cm":5===t?"rm":"lt"}var s=SuperMap.Plot.PlottingUtil.DPI,l={};return t.style?(e?(l.fillSymbolID=t.style.fillSymbolID,l.fillSymbolID||(l.fill=t.style.fill)):(!1===t.style.fill?t.style.fillSymbolID=1:!0===t.style.fill&&(t.style.fillSymbolID=0),l.fillSymbolID=t.style.fillSymbolID),void 0!==t.style.strokeGradientMode&&null!=t.style.strokeGradientMode?1===t.style.strokeGradientMode?l.strokeGradientMode="LINEAR":2===t.style.strokeGradientMode?l.strokeGradientMode="RADIAL":"LINEAR"!==t.style.strokeGradientMode&&"RADIAL"!==t.style.strokeGradientMode&&(l.strokeGradientMode="NONE"):l.strokeGradientMode="NONE",t.style.strokeBackColor?void 0!==t.style.strokeBackColor.red?(l.strokeBackColor=i(t.style.strokeBackColor),l.strokeBackOpacity=(t.style.strokeBackColor.alpha/255).toFixed(2)):(l.strokeBackColor=t.style.strokeBackColor,l.strokeBackOpacity=t.style.strokeBackOpacity):t.style.fillBackColor&&(void 0!==t.style.fillBackColor.red?(l.strokeBackColor=i(t.style.fillBackColor),l.strokeBackOpacity=(t.style.fillBackColor.alpha/255).toFixed(2)):(l.strokeBackColor=t.style.strokeBackColor,l.strokeBackOpacity=t.style.strokeBackOpacity)),void 0!==t.style.fillGradientMode&&null!=t.style.fillGradientMode&&(1===t.style.fillGradientMode?l.fillGradientMode="LINEAR":2===t.style.fillGradientMode?l.fillGradientMode="RADIAL":"LINEAR"!==t.style.fillGradientMode&&"RADIAL"!==t.style.fillGradientMode&&(l.fillGradientMode="NONE")),null!=t.style.fillGradientAngle&&void 0!==t.style.fillGradientAngle?l.fillAngle=t.style.fillGradientAngle:void 0!==t.style.fillAngle&&null!=t.style.fillAngle&&(l.fillAngle=t.style.fillAngle),void 0!==t.style.fillGradientOffsetRatioX&&null!=t.style.fillGradientOffsetRatioX?l.fillCenterOffsetX=t.style.fillGradientOffsetRatioX/100:void 0!==t.style.fillCenterOffsetX&&null!=t.style.fillCenterOffsetX&&(l.fillCenterOffsetX=t.style.fillCenterOffsetX/100),void 0!==t.style.fillGradientOffsetRatioY&&null!=t.style.fillGradientOffsetRatioY?l.fillCenterOffsetY=t.style.fillGradientOffsetRatioY/100:void 0!==t.style.fillCenterOffsetY&&null!=t.style.fillCenterOffsetY&&(l.fillCenterOffsetY=t.style.fillCenterOffsetY/100),void 0!==t.style.fillForeColor&&(l.fillColor=i(t.style.fillForeColor)),void 0!==t.style.fillOpaqueRate&&(l.fillOpacity=(t.style.fillOpaqueRate/100).toFixed(2),100!==t.style.fillOpaqueRate||1===t.style.fillGradientMode&&2===t.style.fillGradientMode||(l.fillOpacity=(t.style.fillForeColor.alpha/255).toFixed(2))),void 0!==t.style.fillBackColor&&(void 0!==t.style.fillBackColor.red?l.fillBackColor=i(t.style.fillBackColor):l.fillBackColor=t.style.fillBackColor),0===t.style.fillBackOpaque?l.fillBackOpacity=0:t.style.fillBackColor&&t.style.fillBackColor.alpha?l.fillBackOpacity=(t.style.fillBackColor.alpha/255).toFixed(2):l.fillBackOpacity=t.style.fillBackOpacity,void 0!==t.style.lineColor&&(!0===e?(l.color=i(t.style.lineColor),l.opacity=(t.style.lineColor.alpha/255).toFixed(2)):(l.strokeColor=i(t.style.lineColor),l.strokeOpacity=(t.style.lineColor.alpha/255).toFixed(2))),!0===e?void 0!==t.style.lineWidth?l.weight=Math.ceil(t.style.lineWidth*s/25.4):l.weight=t.style.strokeWidth:void 0!==t.style.lineWidth?l.strokeWidth=Math.ceil(t.style.lineWidth*s/25.4):l.strokeWidth=t.style.strokeWidth,e?(l.lineSymbolID=t.style.lineSymbolID,l.lineSymbolID||(l.dashArray=t.style.dashArray),!l.dashArray&&t.style.strokeDashstyle&&("dash"===t.style.strokeDashstyle?l.lineSymbolID=1:"dot"===t.style.strokeDashstyle?l.lineSymbolID=2:"dashdot"===t.style.strokeDashstyle?l.lineSymbolID=3:l.lineSymbolID=0)):1===t.style.lineSymbolID?l.strokeDashstyle="dash":2===t.style.lineSymbolID?l.strokeDashstyle="dot":3===t.style.lineSymbolID?l.strokeDashstyle="dashdot":t.style.strokeDashstyle?l.strokeDashstyle=t.style.strokeDashstyle:l.strokeDashstyle="solid",t.textStyle2D&&null!=t.textStyle2D?(void 0!==t.textStyle2D.sizeFixed&&(l.sizeFixed=t.textStyle2D.sizeFixed),void 0!==t.textStyle2D.fontName&&(l.fontFamily=t.textStyle2D.fontName),void 0!==t.textStyle2D.fontHeight&&(l.sizeFixed?l.fontSize=Math.ceil(t.textStyle2D.fontHeight*s/25.4):l.fontSize=t.textStyle2D.fontHeight),void 0!==t.textStyle2D.foreColor&&(l.fontColor=i(t.textStyle2D.foreColor)),void 0!==t.textStyle2D.align&&(l.labelAlign=o(t.textStyle2D.align)),void 0!==t.textStyle2D.rotation&&(l.labelRotation=-t.textStyle2D.rotation),void 0!==t.textStyle2D.bold&&(l.fontWeight=-t.textStyle2D.bold),l.labelXOffset=0,l.labelYOffset=0):t.textStyle&&null!=t.textStyle&&(void 0!==t.textStyle.sizeFixed&&(l.sizeFixed=t.textStyle.sizeFixed),void 0!==t.textStyle.fontName&&(l.fontFamily=t.textStyle.fontName),void 0!==t.textStyle.fontHeight&&(l.sizeFixed?l.fontSize=Math.ceil(t.textStyle.fontHeight*s/25.4):l.fontSize=t.textStyle.fontHeight),void 0!==t.textStyle.foreColor&&(l.fontColor=i(t.textStyle.foreColor)),void 0!==t.textStyle.align&&(l.labelAlign=o(t.textStyle.align)),void 0!==t.textStyle.rotation&&(l.labelRotation=-t.textStyle.rotation),void 0!==t.textStyle.bold&&(l.fontWeight=-t.textStyle.bold),l.labelXOffset=0,l.labelYOffset=0),void 0!==t.style.fontOpacity&&(l.fontOpacity=t.style.fontOpacity),void 0!==t.style.fontStroke?l.fontStroke=t.style.fontStroke:t.textStyle2D&&void 0!==t.textStyle2D.outline&&(l.fontStroke=t.textStyle2D.outline),void 0!==t.style.fontStrokeColor?l.fontStrokeColor=t.style.fontStrokeColor:t.textStyle2D&&void 0!==t.textStyle2D.backColor&&(l.fontStrokeColor=i(t.textStyle2D.backColor)),void 0!==l.fontStrokeWidth&&(l.fontStrokeWidth=t.style.fontStrokeWidth),void 0!==t.style.fontBackground&&(l.fontBackground=t.style.fontBackground),void 0!==t.style.fontBackgroundColor&&(l.fontBackgroundColor=t.style.fontBackgroundColor),void 0!==t.style.fontShadow&&(l.fontShadow=t.style.fontShadow),void 0!==t.style.fontShadowColor&&(l.fontShadowColor=t.style.fontShadowColor),void 0!==t.style.fontShadowOffsetX&&(l.fontShadowOffsetX=t.style.fontShadowOffsetX),void 0!==t.style.fontShadowOffsetY&&(l.fontShadowOffsetY=t.style.fontShadowOffsetY),void 0!==t.style.fontSpace&&(l.fontSpace=t.style.fontSpace),void 0!==t.style.fontPercent&&(l.fontPercent=t.style.fontPercent),void 0!==t.style.fontWeight&&(l.fontWeight=t.style.fontWeight),void 0!==t.style.fontStyle&&(l.fontStyle=t.style.fontStyle),void 0!==t.surroundLineColor&&null!=t.surroundLineColor&&(l.surroundLineColor=i(t.surroundLineColor),l.surroundLineColorOpacity=(t.surroundLineColor.alpha/255).toFixed(2)),void 0!==t.surroundLineWidth2D&&null!=t.surroundLineWidth2D?l.surroundLineWidth=Math.round(t.surroundLineWidth2D*s/25.4):void 0!==t.surroundLineWidth&&null!=t.surroundLineWidth&&(l.surroundLineWidth=Math.round(t.surroundLineWidth*s/25.4)),!1===t.visibility?l.display="none":l.display="display",l):l},SuperMap.Plot.AnalysisSymbol.setStyle=function(t,e,i){let o=SuperMap.Plot.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),t.fillGradientMode&&(e.style.fillGradientMode=t.fillGradientMode),t.fillGradientMode&&("LINEAR"===t.fillGradientMode?e.style.fillGradientMode=1:"RADIAL"===t.fillGradientMode?e.style.fillGradientMode=2:e.style.fillGradientMode=0),t.strokeGradientMode&&("LINEAR"===t.strokeGradientMode?e.style.strokeGradientMode=1:"RADIAL"===t.strokeGradientMode?e.style.strokeGradientMode=2:e.style.strokeGradientMode=0),t.strokeBackColor&&(e.style.strokeBackColor=SuperMap.Plot.PlottingUtil.colorStringToRGB(t.strokeBackColor)),t.strokeBackOpacity&&(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),t.fillColor&&(e.style.fillForeColor=SuperMap.Plot.PlottingUtil.colorStringToRGB(t.fillColor)),void 0!==t.fillOpacity&&null!=t.fillOpacity&&(e.style.fillOpaqueRate=100*t.fillOpacity,e.style.fillForeColor.alpha=255),t.fillBackColor&&(e.style.fillBackColor=SuperMap.Plot.PlottingUtil.colorStringToRGB(t.fillBackColor)),void 0!==t.fillBackOpacity&&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=SuperMap.Plot.PlottingUtil.colorStringToRGB(t.color):t.strokeColor&&(e.style.lineColor=SuperMap.Plot.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,t.fontFamily&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.fontName=t.fontFamily:e.textStyle&&null!=e.textStyle&&(e.textStyle.fontName=t.fontFamily)),t.sizeFixed&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.sizeFixed=t.sizeFixed:e.textStyle&&null!=e.textStyle&&(e.textStyle.sizeFixed=t.sizeFixed)),t.fontSize&&(e.textStyle2D&&null!=e.textStyle2D?t.sizeFixed?e.textStyle2D.fontHeight=25.4*t.fontSize/o:e.textStyle2D.fontHeight=t.fontSize:e.textStyle&&null!=e.textStyle&&(t.sizeFixed?e.textStyle.fontHeight=25.4*t.fontSize/o:e.textStyle.fontHeight=t.fontSize)),t.fontWeight&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.bold=t.fontWeight:e.textStyle&&null!=e.textStyle&&(e.textStyle.bold=t.fontWeight)),t.fontColor&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.foreColor=SuperMap.Plot.PlottingUtil.colorStringToRGB(t.fontColor):e.textStyle&&null!=e.textStyle&&(e.textStyle.foreColor=SuperMap.Plot.PlottingUtil.colorStringToRGB(t.fontColor))),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.fontOpacity&&(e.style.fontOpacity=t.fontOpacity),void 0!==t.fontStroke&&(e.textStyle2D.outline=t.fontStroke),void 0!==t.fontStrokeColor&&(e.textStyle2D.backColor=SuperMap.Plot.PlottingUtil.colorStringToRGB(t.fontStrokeColor)),void 0!==t.fontStrokeWidth&&(e.style.fontStrokeWidth=t.fontStrokeWidth),void 0!==t.fontBackground&&(e.style.fontBackground=t.fontBackground),void 0!==t.fontBackgroundColor&&(e.style.fontBackgroundColor=t.fontBackgroundColor),void 0!==t.fontShadow&&(e.style.fontShadow=t.fontShadow),void 0!==t.fontShadowColor&&(e.style.fontShadowColor=t.fontShadowColor),void 0!==t.fontShadowOffsetX&&(e.style.fontShadowOffsetX=t.fontShadowOffsetX),void 0!==t.fontShadowOffsetY&&(e.style.fontShadowOffsetY=t.fontShadowOffsetY),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=SuperMap.Plot.PlottingUtil.colorStringToRGB(t.surroundLineColor)),null!=t.surroundLineColorOpacity&&void 0!==t.surroundLineColorOpacity&&(e.surroundLineColor.alpha=255*t.surroundLineColorOpacity),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=3:e.textStyle&&null!=e.textStyle&&(e.textStyle.align=3):"cm"===t.labelAlign?e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.align=4:e.textStyle&&null!=e.textStyle&&(e.textStyle.align=4):"rm"===t.labelAlign&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.align=5:e.textStyle&&null!=e.textStyle&&(e.textStyle.align=5))),t.display&&"none"===t.display?e.visibility=!1:e.visibility=!0,t},SuperMap.Plot.AnalysisSymbol.mergeDefaultStyleToFeature=function(t,e,i){let o,s;o=t.style,s=!0!==i?t.geometry:t,e&&!0===e.defaultFlag&&!1===s.isEdit&&(s.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)},SuperMap.Plot.AnalysisSymbol.mergeSymbolDataAndServerData=function(t,e){t.hasOwnProperty("algoMinEditPts")||(t.algoMinEditPts=e.algoMinEditPts),t.hasOwnProperty("algoMaxEditPts")||(t.algoMaxEditPts=e.algoMaxEditPts),t.hasOwnProperty("innerCells")||(t.innerCells=SuperMap.Util.cloneObject(e.innerCells)),t.hasOwnProperty("symbolRanks")||(t.symbolRanks=SuperMap.Util.cloneObject(e.symbolRanks)),t.hasOwnProperty("symbolSizeInLib")||(t.symbolSizeInLib=SuperMap.Util.cloneObject(e.symbolSize)),t.hasOwnProperty("middleMarkExist")||(t.middleMarkExist=SuperMap.Util.cloneObject(e.middleMarkExist)),t.hasOwnProperty("middleMarkBounds")||(t.middleMarkBounds=SuperMap.Util.cloneObject(e.middleMarkBounds)),t.hasOwnProperty("anchorPoint")||(t.anchorPoint=SuperMap.Util.cloneObject(e.anchorPoint))},SuperMap.Plot.AnalysisSymbol.setSymbolData=function(t,e,i){null==e&&(e={}),e.hasOwnProperty("type")||(e.type="GRAPHICOBJECT"),e.hasOwnProperty("version")||(e.version=2),e.isEdit=!0,e.uuid=t.uuid,e.associatedUuid=t.associatedUuid,e.hasOwnProperty("rotate2D")?e.rotate2D.x=t.dRotate:e.rotate2D={x:t.dRotate,y:0,z:0},e.hasOwnProperty("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=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 o=0;o<t.avoidRegions.length;o++){let s={};SuperMap.Plot.AnalysisSymbol.setStyle(t.avoidRegions[o].feature.style,s,i),e.avoidRegions.push([t.avoidRegions[o].getSymbolData(),s])}if(!0===i?SuperMap.Plot.AnalysisSymbol.setStyle(t.style,e,i):null!=t.feature&&SuperMap.Plot.AnalysisSymbol.setStyle(t.feature.style,e),t.symbolType===SuperMap.Plot.SymbolType.AIRROUTE||t.symbolType===SuperMap.Plot.SymbolType.NAVYROUTE||t.symbolType===SuperMap.Plot.SymbolType.MISSILEROUTE){for(var s in e.routeNodes=[],t.routeNodes)e.routeNodes.push(t.routeNodes[s].setSymbolData());e.arrRoutePts=t.arrRoutePts,i||SuperMap.Plot.AnalysisSymbol.setStyle(t.lineStyle,e)}else if(t.symbolType===SuperMap.Plot.SymbolType.GROUPOBJECT||t.symbolType===SuperMap.Plot.SymbolType.FLAGGROUP||t.symbolType===SuperMap.Plot.SymbolType.NAVYDEPLOYMENT||t.symbolType===SuperMap.Plot.SymbolType.AIRDEPLOYMENT){if(e.subAssociatedUuids=t.subAssociatedUuids,e.subFeatures=[],i)for(var l=0;l<t.subObjects.length;l++)e.subFeatures.push(t.subObjects[l].getSymbolData());else for(let i=0;i<t.components.length;i++)e.subFeatures.push(t.components[i].geometry.getSymbolData());0===t.libID&&t.symbolType===SuperMap.Plot.SymbolType.FLAGGROUP?e.ratio=t.ratio:0===t.libID&&t.symbolType===SuperMap.Plot.SymbolType.AIRDEPLOYMENT?(e.colNum=t.colNum,e.speceDis=t.speceDis,e.isShowTooltip=t.isShowTooltip):0===t.libID&&t.symbolType===SuperMap.Plot.SymbolType.NAVYDEPLOYMENT&&(e.colNum=t.colNum,e.speceDis=t.speceDis)}else if(0===t.libID&&t.symbolType===SuperMap.Plot.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===SuperMap.Plot.SymbolType.SYMBOLTEXT1)e.space=t.space,e.offsetX=t.offsetX,e.offsetY=t.offsetY;else if(0===t.libID&&t.symbolType===SuperMap.Plot.SymbolType.SATELLITE){if(e.hasOwnProperty("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===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS)e.timeWindows=t.timeWindows;else{let o;o=!0===i?L.Util.latLngsToSuperMapPoints(t.getLatLngs()):t.controlPoints,e.hasOwnProperty("localePoints")||(e.localePoints=[]);let s=o.length;t.symbolType===SuperMap.Plot.SymbolType.ELLIPSESYMBOL&&(s=3);for(let t=0;t<s;t++)e.localePoints.length>t?(e.localePoints[t].x=o[t].x,e.localePoints[t].y=o[t].y,e.localePoints[t].hasOwnProperty("z")||(e.localePoints[t].z=0)):e.localePoints.push({x:o[t].x,y:o[t].y,z:0});if(0===t.libID&&t.symbolType===SuperMap.Plot.SymbolType.LINERELATION)e.endAssociatedUuid=t.endAssociatedUuid,e.lineRelationType=t.lineRelationType,e.startAssociatedUuid=t.startAssociatedUuid,e.subSectionCount=t.subSectionCount;else if(t.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL){e.surroundLineType=t.surroundLineType,e.symbolRank=t.symbolRank,e.negativeImage=t.negativeImage,e.space=t.space,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/SuperMap.Plot.PlottingUtil.DPI,o=25.4*t.symbolSize.h*10/SuperMap.Plot.PlottingUtil.DPI;e.symbolSize={x:i,y:o};let s=25.4*t.symbolSizeInLib.w*10/SuperMap.Plot.PlottingUtil.DPI,l=25.4*t.symbolSizeInLib.h*10/SuperMap.Plot.PlottingUtil.DPI;e.symbolSizeInLib={x:s,y:l},e.positionOffset=t.positionOffset,e.positionOffsetType=t.positionOffsetType,e.positionOffsetX=t.positionOffsetX,e.positionOffsetY=t.positionOffsetY,!1===t.widthHeightLimit||!0===t.widthHeightLimit?e.limitWidthHeight=t.widthHeightLimit:e.limitWidthHeight=t.limitWidthHeight}else{if(e.surroundLineType=t.surroundLineType,e.hasOwnProperty("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===SuperMap.Plot.SymbolType.ALGOSYMBOL?(e.arrowHeadType=t.arrowHeadType,e.arrowBodyType=t.arrowBodyType,e.arrowTailType=t.arrowTailType):0===t.libID&&t.symbolType===SuperMap.Plot.SymbolType.ARROWLINE?e.arrowAngle=t.arrowAngle:0===t.libID&&t.symbolType===SuperMap.Plot.SymbolType.COMBINATIONALCIRCLE?e.defaultRadius=t.defaultRadius:0===t.libID&&t.symbolType===SuperMap.Plot.SymbolType.CONCENTRICCIRCLE||(0===t.libID&&t.symbolType===SuperMap.Plot.SymbolType.LINEMARKING?(e.islocationCircle=t.islocationCircle,e.textBoxType=t.textBoxType):0===t.libID&&t.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXTBOX?(e.roundBox=t.roundBox,e.textBoxType=t.textBoxType):0===t.libID&&t.symbolType===SuperMap.Plot.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===SuperMap.Plot.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},SuperMap.Plot.AnalysisSymbol.parseSymbolData=function(t,e,i){if(null!=e){if(void 0!==e.isEdit&&(t.isEdit=e.isEdit),e.hasOwnProperty("version")&&(t.version=e.version),t.libID=parseInt(e.libID),t.code=parseInt(e.code),t.maxEditPts=parseInt(e.algoMaxEditPts),t.minEditPts=parseInt(e.algoMinEditPts),t.symbolType=e.symbolType,t.symbolName=e.symbolName,t.textContent=e.textContent,void 0!==e.dScale?t.dScale=e.dScale:void 0!==e.scale2D&&(t.dScale=e.scale2D.x),void 0!==e.dRotate?t.dRotate=e.dRotate:void 0!==e.rotate2D&&(t.dRotate=e.rotate2D.x),void 0!==e.resolution&&(t.resolution=e.resolution),void 0!==e.uuid&&(t.uuid=e.uuid),void 0!==e.associatedUuid&&(t.associatedUuid=e.associatedUuid),void 0!==e.textDisplay&&(t.textDisplay=e.textDisplay),void 0!==e.annotationPosition&&(i?t.annotationPosition=e.annotationPosition:t.textPosition=e.annotationPosition),void 0!==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(e.hasOwnProperty("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 s=e.subSymbols[i].code;if(void 0===s)continue;let l={};void 0!==e.subSymbols[i].textContent&&(l.textContent=e.subSymbols[i].textContent),void 0!==e.subSymbols[i].totalNum&&(l.totalNum=e.subSymbols[i].totalNum),void 0!==e.subSymbols[i].symbolData&&(l.symbolData=e.subSymbols[i].symbolData),t.subSymbols.push(new SuperMap.Plot.SubSymbol(o,s,l))}}if(e.avoidRegions&&0!==e.avoidRegions.length)for(let o=0;o<e.avoidRegions.length;o++){let s={libID:0,code:SuperMap.Plot.SymbolType.AVOIDREGION,map:t.map,symbolData:e.avoidRegions[o][0]},l=null;if(i)(l=L.supermap.plotting.avoidRegion(0,SuperMap.Plot.SymbolType.AVOIDREGION,[],s)).style=SuperMap.Plot.AnalysisSymbol.getStyle(t.symbolData.avoidRegions[o][1],!0);else{l=new SuperMap.Geometry.AvoidRegion(s);let t=new SuperMap.Feature.Vector(l);t.style=SuperMap.Plot.AnalysisSymbol.getStyle(e.avoidRegions[o][1],i),l.feature=t,l.calculateParts()}t.avoidRegions.push(l)}if(!0===i&&(t.style=SuperMap.Plot.AnalysisSymbol.getStyle(e,!0)),t.symbolType===SuperMap.Plot.SymbolType.AIRROUTE||t.symbolType===SuperMap.Plot.SymbolType.NAVYROUTE||t.symbolType===SuperMap.Plot.SymbolType.MISSILEROUTE){for(var o in t.routeNodes=[],e.routeNodes){var s=new SuperMap.Plot.RouteNode;t.routeNodes.push(s.parseSymbolData(e.routeNodes[o]))}t.arrRoutePts=[];for(let o=0;o<e.arrRoutePts.length;o++){let s=[];for(let t=0;t<e.arrRoutePts[o].length;t++)e.arrRoutePts[o][t].hasOwnProperty("lat")&&e.arrRoutePts[o][t].hasOwnProperty("lng")?s.push(new SuperMap.Geometry.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||s.push(new SuperMap.Geometry.Point(e.arrRoutePts[o][t].x,e.arrRoutePts[o][t].y));i&&(s=L.Util.superMapPointsToLatLngs(s)),t.arrRoutePts.push(s)}i||(t.lineStyle=SuperMap.Plot.AnalysisSymbol.getStyle(e,!1))}else if(t.symbolType===SuperMap.Plot.SymbolType.GROUPOBJECT||t.symbolType===SuperMap.Plot.SymbolType.FLAGGROUP||t.symbolType===SuperMap.Plot.SymbolType.NAVYDEPLOYMENT||t.symbolType===SuperMap.Plot.SymbolType.AIRDEPLOYMENT){if(t.subAssociatedUuids=e.subAssociatedUuids,i){var l=[];for(let t=0;t<e.subFeatures.length;t++){let i=e.subFeatures[t];i.uuid=SuperMap.Plot.PlottingUtil.generateUuid();let o=L.supermap.plotting.PlottingObject.createSymbol(i.libID,i.code,null,{symbolData:i});l.push(o)}t.subObjects=l}else for(let i=0;i<e.subFeatures.length;i++){let o=e.subFeatures[i],s=SuperMap.Geometry.PlottingGeometry.createFeature(o.libID,o.code,null,{symbolData:o,map:t.map});s.geometry.ownGroupObj=t,t.components.push(s)}0===t.libID&&t.symbolType===SuperMap.Plot.SymbolType.FLAGGROUP?(t.ratio=e.ratio,t.subFeatures=e.subFeatures):0===t.libID&&t.symbolType===SuperMap.Plot.SymbolType.AIRDEPLOYMENT?(t.colNum=e.colNum,t.speceDis=e.speceDis,t.isShowTooltip=e.isShowTooltip):0===t.libID&&t.symbolType===SuperMap.Plot.SymbolType.NAVYDEPLOYMENT&&(t.colNum=e.colNum,t.speceDis=e.speceDis)}else if(0===t.libID&&t.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT){t.addFrame=e.addFrame,t.symbolTexts=[];for(let i=0,o=e.symbolTexts.length;i<o;i++){let o=new SuperMap.Plot.SymbolText;o.parseSymbolData(e.symbolTexts[i]),t.symbolTexts.push(o)}}else if(0===t.libID&&t.symbolType===SuperMap.Plot.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===SuperMap.Plot.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 SuperMap.Plot.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===SuperMap.Plot.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 SuperMap.Geometry.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===SuperMap.Plot.SymbolType.LINERELATION)t.endAssociatedUuid=e.endAssociatedUuid,t.lineRelationType=e.lineRelationType,t.startAssociatedUuid=e.startAssociatedUuid,t.subSectionCount=e.subSectionCount;else if(t.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL){t.surroundLineType=e.surroundLineType,t.symbolRank=e.symbolRank,t.negativeImage=e.negativeImage;let i=SuperMap.Plot.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),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*SuperMap.Plot.PlottingUtil.DPI/25.4/10,i.y=e.symbolSizeInLib.y*SuperMap.Plot.PlottingUtil.DPI/25.4/10):(i.x=e.symbolSize.x*SuperMap.Plot.PlottingUtil.DPI/25.4/10,i.y=e.symbolSize.y*SuperMap.Plot.PlottingUtil.DPI/25.4/10),t.setSymbolSize(i.x,i.y)}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),void 0!==e.positionOffsetY&&null!==e.positionOffsetY&&(t.positionOffsetY=e.positionOffsetY)}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===SuperMap.Plot.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===SuperMap.Plot.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===SuperMap.Plot.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===SuperMap.Plot.SymbolType.CONCENTRICCIRCLE)t.symbolData.hasOwnProperty("startAngle")&&(t.scaleValues[0]=t.symbolData.startAngle),t.symbolData.hasOwnProperty("endAngle")&&(t.scaleValues[1]=t.symbolData.endAngle);else if(0===t.libID&&t.symbolType===SuperMap.Plot.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===SuperMap.Plot.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===SuperMap.Plot.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===SuperMap.Plot.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===SuperMap.Plot.SymbolType.ARCREGION){if(i){if(t.centerPoint=L.latLng(e.centerPoint.y,e.centerPoint.x),t.symbolData.circlePts){for(var n=[],a=0;a<e.circlePts.length;a++)n.push(new SuperMap.Geometry.Point(e.circlePts[a].x,e.circlePts[a].y));0!==n.length&&(t.circlePts=n)}t.spatialAnalystUrl=e.spatialAnalystUrl}else t.centerPoint=new SuperMap.Geometry.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===SuperMap.Plot.SymbolType.POLYGONREGION&&(t.symbolData.hasOwnProperty("textPosition")?t.scaleValues[1]=t.symbolData.textPosition:void 0===t.scaleValues[1]&&(t.scaleValues[1]=t.symbolData.annotationPosition))}}}};var j=SuperMap.Plot.PlottingUtil=SuperMap.Plot.PlottingUtil||{};SuperMap.Plot.PlottingUtil.DEFAULT_PRECISION=14,SuperMap.Plot.PlottingUtil.DPI=96,SuperMap.Plot.PlottingUtil.RTOD=57.29577951308232,SuperMap.Plot.PlottingUtil.DTOR=.017453292519943295,SuperMap.Plot.PlottingUtil.dirAngle=function(t,e){let i,o,s,l,n,a;i=e.x,o=e.y,n=i-(s=t.x),a=o-(l=t.y);var r=Math.atan2(a,n);return r<0&&(r+=2*Math.PI),r},SuperMap.Plot.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("")},SuperMap.Plot.PlottingUtil.cloneObject=function(t){return JSON.parse(JSON.stringify(t))},SuperMap.Plot.PlottingUtil.colorRGBA=function(t,e){let i=t.substring(1,3),o=parseInt(i,16),s=t.substring(3,5),l=parseInt(s,16),n=t.substring(5);return"rgba("+o+","+l+","+parseInt(n,16)+","+e+")"},SuperMap.Plot.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},SuperMap.Plot.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 s=t.substring(5);return e.blue=parseInt(s,16),e},SuperMap.Plot.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),s=e.substring(4,6);return{color:"#"+e.substring(6)+s+o,alpha:parseInt(i,16)/255}},SuperMap.Plot.PlottingUtil.hexToDecimal=function(t,e){let i=t.substring(1,3),o=t.substring(3,5),s=t.substring(5),l=parseInt(s+o+i,16),n=Math.round(255*e).toString(16);return parseInt(n+"000000",16)+l},SuperMap.Plot.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"},SuperMap.Plot.PlottingUtil.trim=function(t){return null==t?"":t.replace(/(^\s*)|(\s*$)/g,"")},SuperMap.Plot.PlottingUtil.getTextWidth=function(t,e){" "===e&&(e="_");let 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.style.display="inline-block",i.innerHTML=e;var o=i.clientWidth,s=e.length;return void 0===t.fontSpace&&void 0===t.fontPercent||(0!==t.fontSpace&&100!==t.fontPercent&&void 0!==t.fontSpace||void 0!==t.fontPercent?o=t.fontPercent/100*o+t.fontSpace*(t.fontPercent/100)*(s-1):0===t.fontSpace&&100!==t.fontPercent&&void 0!==t.fontPercent?o=t.fontPercent/100*o:0!==t.fontSpace&&100===t.fontPercent&&void 0!==t.fontSpace&&(o+=t.fontSpace*(s-1))),document.body.removeChild(i),o},SuperMap.Plot.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},SuperMap.Plot.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("<","<")).replace(">",">")).replace(/%/g,"%2525")).replace(/&/g,"%26");case Array:let t=[];for(let i=0,o=e.length;i<o;i++)t.push(SuperMap.Plot.PlottingUtil.toJSON(e[i]));return"["+t.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(SuperMap.Plot.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+'":'+SuperMap.Plot.PlottingUtil.toJSON(e[i]));return t.length>0?"{"+t.join(",")+"}":"{}"}return e.toString()}},SuperMap.Plot.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=SuperMap.Plot.PlottingUtil.copyAttributes(e.style,t.style)),i.feature=e,i.calculateParts()}return e},SuperMap.Plot.PlottingUtil.getSurroundLinePts=function(t,e){var i=[],o=[];for(let s=0;s<t.length-1;s++){let l,n,a=[];if(SuperMap.Plot.PlottingUtil.equalFuzzy(t[s].x,t[s+1].x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(t[s].y,t[s+1].y))continue;a.push(t[s]),a.push(t[s+1]);let r=SuperMap.Plot.PlottingUtil.parallel(a,e);if(l=r[0],n=r[1],0!=i.length){let t=SuperMap.Plot.PlottingUtil.intersectLines(l,n,i[0],i[1]);if(t.isIntersectLines){let e=t.intersectPoint,i=SuperMap.Plot.PlottingUtil.distance(l,n);SuperMap.Plot.PlottingUtil.distance(e,n)>2*i?o.push(n):(o[o.length-1]=e,o.push(n))}else o.push(n)}else o.push(l),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=SuperMap.Plot.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},SuperMap.Plot.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},SuperMap.Plot.PlottingUtil.getDataFromServer=function(t,e,i,o,s,l,n,a){let r;if(void 0!==l&&(r=l),"undefined"!=typeof SuperMap&&void 0!==SuperMap.GetSymbolInfoService){let l=new SuperMap.GetSymbolInfoService(t);l.events.on({processCompleted:n,processFailed:a,scope:r});let p=new SuperMap.GetSymbolInfoParameters;p.libID=e,p.code=i,s&&SuperMap.Plot.PlottingUtil.extend(p,s),o&&null!=o&&(SuperMap.Plot.PlottingUtil.isArray(o)||(o=[o]),p.inputPoints=o),l.processAsync(p)}else if(void 0!==typeof SuperMap&&void 0!==typeof SuperMap.REST&&void 0!==typeof SuperMap.REST.GetSymbolInfoService){let l=new SuperMap.REST.GetSymbolInfoService(t);l.events.on({processCompleted:n,processFailed:a,scope:r});let p=new SuperMap.REST.GetSymbolInfoParameters;if(p.libID=e,p.code=i,s&&SuperMap.Plot.PlottingUtil.extend(p,s),o&&null!=o&&(SuperMap.Plot.PlottingUtil.isArray(o)||(o=[o]),p.inputPoints=o),s&&s.credential){let t=s.credential;l.processAsync(p,t)}else l.processAsync(p)}},SuperMap.Plot.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},s={x:0,y:0};for(let l=2;l<t.length;l++)s.x=t[l].x-t[l-1].x,s.y=t[l].y-t[l-1].y,o.x=t[l-1].x-t[l-2].x,o.y=t[l-1].y-t[l-2].y,i+=e(o,s);return s.x=t[1].x-t[0].x,s.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,s))>=0?-1:1},SuperMap.Plot.PlottingUtil.isNear=function(t,e){return e||(e=SuperMap.Plot.PlottingUtil.TORLERANCE_STATIC),t<e&&t>-e},SuperMap.Plot.PlottingUtil.equalFuzzy=function(t,e,i){return i||(i=1e-18),Math.abs(t-e)<=i},SuperMap.Plot.PlottingUtil.intersectLines=function(t,e,i,o){var s={isIntersectLines:!1};if(t.x===e.x&&t.y===e.y||i.x===o.x&&i.y===o.y)return s;let l=e.x-t.x,n=e.y-t.y,a=o.x-i.x,r=o.y-i.y,p=l*r-a*n;if(SuperMap.Plot.PlottingUtil.isNear(p))return s;let u=(l*(t.y-i.y)-n*(t.x-i.x))/p,h=new SuperMap.Geometry.Point(0,0);return h.x=u*a+i.x,h.y=u*r+i.y,s.isIntersectLines=!0,s.intersectPoint=h,s},SuperMap.Plot.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(t[o].containsPoint(e))return i.index=o,!0;return!1}function o(t,e,i){let o=t.components[0].components,s=new SuperMap.Geometry.Point(0,0);for(let t=0;t<o.length-1;t++)if(SuperMap.Plot.PlottingUtil.intersectLineSegs(e,i,o[t],o[t+1],s))return s;return null}function s(t,e){if(0===t.length||SuperMap.Plot.PlottingUtil.equalFuzzy(e[0].x,e[e.length-1].x,.5)&&SuperMap.Plot.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(SuperMap.Plot.PlottingUtil.equalFuzzy(t[o][0].x,i.x,.5)&&SuperMap.Plot.PlottingUtil.equalFuzzy(t[o][0].y,i.y,.5)){e=e.concat(t[o]),t.splice(o,1);let i=s(t,e);if(void 0!==i&&0!==i.length)return i}else if(SuperMap.Plot.PlottingUtil.equalFuzzy(t[o][t[o].length-1].x,i.x,.5)&&SuperMap.Plot.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=s(t,e);if(void 0!==i&&0!==i.length)return i}return e}if(SuperMap.Plot.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 l=[];for(let e=0;e<t.length;e++)l.push(new SuperMap.Geometry.Polygon([new SuperMap.Geometry.LinearRing(t[e])]));let n=[];for(let e=0;e<t.length;e++){let s=[],a=[],r=-1,p=-1,u=l.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(l[h.index],t[e][n-1],t[e][n]);i&&i!==t[e][n-1]&&i!==t[e][n]&&a.push(i),s.push(a),a=[]}}else{if(0===n&&(r=s.length),n===t[e].length-1&&(p=s.length),0===a.length&&void 0!==h.index){let i=o(l[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&&s.push(a),r<s.length&&p<s.length&&r!==p){for(let t=0;t<s[r].length;t++)s[p].push(s[r][t]);s.splice(r,1)}n=n.concat(s)}let a=[];for(;0!==n.length;){let t=n[0];n.splice(0,1);let e=s(n,t);void 0!==e&&(t=e),t.length>2&&a.push(t)}return a},SuperMap.Plot.PlottingUtil.isRight=function(t,e,i){let o=e,s=i,l=e,n=t;return(s.x-o.x)*(n.y-l.y)-(n.x-l.x)*(s.y-o.y)<0},SuperMap.Plot.PlottingUtil.radian=function(t,e){let i,o,s=0;return i=e.x-t.x,o=e.y-t.y,(s=Math.atan2(o,i))<0&&(s+=2*Math.PI),s},SuperMap.Plot.PlottingUtil.findBisectorPoint=function(t,e,i,o){let s=SuperMap.Plot.PlottingUtil.radian(e,t),l=(s+SuperMap.Plot.PlottingUtil.radian(e,i))/2,n=Math.cos(l-s+Math.PI/2),a=o;SuperMap.Plot.PlottingUtil.isNear(n,.15)||(a=o/n);let r=e.x+a*Math.cos(l),p=e.y+a*Math.sin(l);return new SuperMap.Geometry.Point(r,p)},SuperMap.Plot.PlottingUtil.findPoint=function(t,e,i,o){if(t===e||Math.abs(i)<1e-18)return t;let s=SuperMap.Plot.PlottingUtil.radian(t,e)+o*Math.PI/180;var l=t.x+i*Math.cos(s),n=t.y+i*Math.sin(s);return new SuperMap.Geometry.Point(l,n)},SuperMap.Plot.PlottingUtil.isSameQuadrant=function(t,e,i,o){let s=(e.x-t.x)*(o.x-i.x),l=(e.y-t.y)*(o.y-i.y);return!(Math.abs(s)<1e-18&&Math.abs(l)<1e-18)&&((s>0||Math.abs(s)<1e-18)&&(l>0||Math.abs(l)<1e-18))},SuperMap.Plot.PlottingUtil.isCross=function(t,e,i,o){let s=new SuperMap.Geometry.Point(0,0);return!(!SuperMap.Plot.PlottingUtil.intersectLineSegs(t,e,i,o,s)||s==t||s===e||s===i||s==o)},SuperMap.Plot.PlottingUtil.intersectLineSegs=function(t,e,i,o,s){if(SuperMap.Plot.PlottingUtil.equalFuzzy(t.x,e.x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(t.y,e.y))return s.x=t.x,s.y=t.y,!1;if(SuperMap.Plot.PlottingUtil.equalFuzzy(i.x,o.x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(i.y,o.y))return s.x=i.x,s.y=i.y,!1;let l=0,n=0;if(l=t.x>e.x?t.x:e.x,n=t.x<e.x?t.x:e.x,i.x-l>1e-16&&o.x-l>1e-16||i.x-n<-1e-16&&o.x-n<-1e-16)return!1;if(l=t.y>e.y?t.y:e.y,n=t.y<e.y?t.y:e.y,i.y-l>1e-16&&o.y-l>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,y=t.y-i.y,c=a*u-p*r,S=c;if(Math.abs(a)>1e-18&&Math.abs(p)>1e-18&&(S/=a*p),Math.abs(S)<1e-18)return t===i?(s.x=t.x,s.y=t.y,!SuperMap.Plot.PlottingUtil.isSameQuadrant(t,e,i,o)):e===o?(s.x=e.x,s.y=e.y,!SuperMap.Plot.PlottingUtil.isSameQuadrant(t,e,i,o)):t===o?(s.x=t.x,s.y=t.y,SuperMap.Plot.PlottingUtil.isSameQuadrant(t,e,i,o)):e===i&&(s.x=e.x,s.y=e.y,SuperMap.Plot.PlottingUtil.isSameQuadrant(t,e,i,o));let P=(a*y-r*h)/c,g=(p*y-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))&&(!(g<0&&(Math.abs(g*a)>1e-16||Math.abs(g*r)>1e-16))&&(!(g>1&&(Math.abs((g-1)*a)>1e-16||Math.abs((g-1)*r)>1e-16))&&(Math.abs(P)<1e-18?(s.x=i.x,s.y=i.y,!0):Math.abs(P-1)<1e-18?(s.x=o.x,s.y=o.y,!0):Math.abs(g)<1e-18?(s.x=t.x,s.y=t.y,!0):Math.abs(g-1)<1e-18?(s.x=e.x,s.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))&&(!(g<0&&(Math.abs(g*a)>1e-16||Math.abs(g*r)>1e-16))&&(!(g>1&&(Math.abs((g-1)*a)>1e-16||Math.abs((g-1)*r)>1e-16))&&(s.x=P*p+i.x,s.y=P*u+i.y,!0))))))))},SuperMap.Plot.PlottingUtil.parallel=function(t,e){let i=[],o=t.length;if(!t||null==t||t.length<2)return i;let s=!1;t.length>3&&t[0].x===t[t.length-1].x&&t[0].y===t[t.length-1].y&&(s=!0),s?(i[0]=SuperMap.Plot.PlottingUtil.findBisectorPoint(t[t.length-2],t[0],t[1],e),i[t.length-1]=i[0]):(i[0]=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],e,90),i[t.length-1]=SuperMap.Plot.PlottingUtil.findPoint(t[t.length-1],t[t.length-2],-e,90));let l=t[0],n=t[1],a=t[1];for(let s=1;s<t.length-1;s++)if(n=t[s],t[s]!==t[s-1]&&(l=t[s-1]),t[s]!==t[s+1]){a=t[s+1];let o=SuperMap.Plot.PlottingUtil.findBisectorPoint(l,n,a,e);SuperMap.Plot.PlottingUtil.isCross(l,i[s-1],n,o)&&(o=i[s-1]),i[s]=o}else{let r=s;for(;r<o-1;){if(t[r]!==t[r+1]){a=t[r+1];break}r++}if(r<o-1){let t=SuperMap.Plot.PlottingUtil.FindBisectorPoint(l,n,a,e);for(SuperMap.Plot.PlottingUtil.isCross(l,i[s-1],n,t)&&(t=i[s-1]);s<r;)i[s]=t,s++;s=r-1}}return i},SuperMap.Plot.PlottingUtil.distance=function(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))},SuperMap.Plot.PlottingUtil.projectPoint=function(t,e,i){if(e===i)return e;let o=new SuperMap.Geometry.Point(0,0),s=i.x-e.x,l=e.y-i.y,n=s*s,a=l*l,r=s*l,p=s*s+l*l;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},SuperMap.Plot.PlottingUtil.pointToLineDis=function(t,e,i){let o=SuperMap.Plot.PlottingUtil.projectPoint(t,e,i);return SuperMap.Plot.PlottingUtil.distance(t,o)},SuperMap.Plot.PlottingUtil.pointToPloyLineDis=function(t,e,i){if(e===i)return SuperMap.Plot.PlottingUtil.distance(t,e);let o=(e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y),s=(i.x-t.x)*(i.x-t.x)+(i.y-t.y)*(i.y-t.y),l=(e.x-i.x)*(e.x-i.x)+(e.y-i.y)*(e.y-i.y),n=(o+l-s)/(2*l);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)},SuperMap.Plot.PlottingUtil.isCounterClockwise=function(t,e,i){return(i.x-e.x)*(t.y-e.y)-(t.x-e.x)*(i.y-e.y)>0},SuperMap.Plot.PlottingUtil.clearSamePts=function(t){let e=t.length;for(let i=0;i<e-1;)SuperMap.Plot.PlottingUtil.equalFuzzy(t[i].x,t[i+1].x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(t[i].y,t[i+1].y)?(t.splice(i,1),e--):i++;return t},SuperMap.Plot.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 s=0;s<3*i-2;s+=3)e[s]=t[o].clone(),e[s+1]=new SuperMap.Geometry.Point(0,0),e[s+2]=new SuperMap.Geometry.Point(0,0),o++;for(let o=1;o<i-1;o++)SuperMap.Plot.PlottingUtil.getTrianglePoints(8,3,t[o-1],t[o],t[o+1],e[3*o+1],e[3*o+2]);SuperMap.Plot.PlottingUtil.getTrapezoidPoints(.6,e[0],e[3],e[4],e[2]),SuperMap.Plot.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},SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt=function(t,e){let i=t.slice();!0===e&&i.push(i[0]);let o=SuperMap.Plot.PlottingUtil.getBeizerCtrlPt(i);return SuperMap.Plot.PlottingUtil.generateBeizerPointsWithCtrlPt(o)},SuperMap.Plot.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 s=t[o].x,l=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(SuperMap.Plot.PlottingUtil.equalFuzzy(s,n,1e-10)&&SuperMap.Plot.PlottingUtil.equalFuzzy(l,a,1e-10)&&SuperMap.Plot.PlottingUtil.equalFuzzy(r,u,1e-10)&&SuperMap.Plot.PlottingUtil.equalFuzzy(p,h,1e-10))i.push(new SuperMap.Geometry.Point(s,l)),i.push(new SuperMap.Geometry.Point(r,p));else for(let t=0;t<=1;t+=.03125){let e,o,y,c,S=t*t,P=S*t;e=1-3*t+3*S-P,o=3*(t-2*S+P),y=3*(S-P),c=P;let g=new SuperMap.Geometry.Point(e*s+o*n+y*r+c*u,e*l+o*a+y*p+c*h);i.push(g)}}return i},SuperMap.Plot.PlottingUtil.computeBeizerPoints=function(t,e,i){let o=SuperMap.Plot.PlottingUtil.polylineDistance(e),s=[],l=[],n=[];if(t){l.push(e[0]);let t=i[0],a=i[1],r=e[0].x+o*t,p=e[0].y+o*a;l.push(new SuperMap.Geometry.Point(r,p)),s.push(new SuperMap.Geometry.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;l.push(new SuperMap.Geometry.Point(r,p)),s.push(new SuperMap.Geometry.Point(r,p)),l.push(new SuperMap.Geometry.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,l.push(new SuperMap.Geometry.Point(r,p)),s.push(new SuperMap.Geometry.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,l.push(new SuperMap.Geometry.Point(r,p)),s.push(new SuperMap.Geometry.Point(r,p)),l.push(new SuperMap.Geometry.Point(e[u].x,e[u].y)),l.push(new SuperMap.Geometry.Point(e[u].x,e[u].y)),l.push(new SuperMap.Geometry.Point(e[u].x,e[u].y)),n=SuperMap.Plot.PlottingUtil.generateBeizerPointsWithCtrlPt(l)}else{i=[];let t=(l=SuperMap.Plot.PlottingUtil.getBeizerCtrlPt(e))[1].x-l[0].x,a=l[1].y-l[0].y,r=t/o,p=a/o;i.push(r),i.push(p),s.push(l[1]);for(let t=1;t<e.length-1;t++){let e=(l[3*t-1].x-l[3*t].x)/o,n=(l[3*t-1].y-l[3*t].y)/o;i.push(e),i.push(n),s.push(l[3*t-1]);let a=(l[3*t+1].x-l[3*t].x)/o,r=(l[3*t+1].y-l[3*t].y)/o;i.push(a),i.push(r),s.push(l[3*t+1])}t=l[3*(e.length-1)-1].x-l[3*(e.length-1)].x,a=l[3*(e.length-1)-1].y-l[3*(e.length-1)].y,r=t/o,p=a/o,i.push(r),i.push(p),s.push(l[3*(e.length-1)-1]),n=SuperMap.Plot.PlottingUtil.generateBeizerPointsWithCtrlPt(l)}return{scalePoints:s,scaleValues:i,beizerPoints:n}},SuperMap.Plot.PlottingUtil.getTrianglePoints=function(t,e,i,o,s,l,n){let a=i.x,r=i.y,p=o.x,u=o.y,h=s.x,y=s.y;SuperMap.Plot.PlottingUtil.getPointsByTriangle(t,e,a,r,p,u,h,y,l,n)},SuperMap.Plot.PlottingUtil.getPointsByTriangle=function(t,e,i,o,s,l,n,a,r,p){let u=s+(n-i),h=l+(a-o),y=0,c=0;if(i==n)y=i,c=h;else if(o==a)y=u,c=o;else{let t=1*(a-o)/(n-i),e=o-i*t;c=t*(y=(h+u/t-e)/(t+1/t))+e}let S=Math.sqrt(1*(s-u)*(s-u)+1*(l-h)*(l-h)),P=Math.sqrt(1*(i-s)*(i-s)+1*(o-l)*(o-l)),g=Math.sqrt(1*(s-n)*(s-n)+1*(l-a)*(l-a)),d=0;u=y+(u-y)*(d=P+g?1+(g-P)*t/(g+P):1),h=c+(h-c)*d,0==S&&(S=1),r.x=s+(s-u)*P/(e*S),r.y=l+(l-h)*P/(e*S),p.x=s+(u-s)*g/(e*S),p.y=l+(h-l)*g/(e*S)},SuperMap.Plot.PlottingUtil.getTrapezoidPoints=function(t,e,i,o,s){let l=e.x,n=e.y,a=i.x,r=i.y,p=o.x,u=o.y;return SuperMap.Plot.PlottingUtil.getPointsByTrapezoid(t,l,n,a,r,p,u,s)},SuperMap.Plot.PlottingUtil.getPointsByTrapezoid=function(t,e,i,o,s,l,n,a){let r=0,p=0,u=0,h=0;if(0==Math.abs(i-s))r=e+o-l,p=n;else if(0==Math.abs(e-o))r=l,p=i+s-n;else{let t=1*(i-s)/(e-o),a=n-t*l;p=t*(r=((s+i)/2+(e+o)/(2*t)-a)/(t+1/t))+a,r=2*r-l,p=2*p-n}let y=Math.sqrt(1*(e-o)*(e-o)+1*(i-s)*(i-s)),c=Math.sqrt(1*(e-r)*(e-r)+1*(i-p)*(i-p));return y>0?(u=e+(o-e)*c/y,h=i+(s-i)*c/y):(u=e,h=i),a.x=u+(r-u)*t,a.y=h+(p-h)*t,a},SuperMap.Plot.PlottingUtil.pointIsOnPolyLine=function(t,e,i){if(SuperMap.Plot.PlottingUtil.equalFuzzy(t.x,e.x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(t.y,e.y)||SuperMap.Plot.PlottingUtil.equalFuzzy(t.x,i.x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(t.y,i.y))return!0;let o=t.x-e.x,s=t.y-e.y,l=t.x-i.x,n=t.y-i.y,a=(o*l+s*n)/(Math.sqrt(o*o+s*s)*Math.sqrt(l*l+n*n));return!!SuperMap.Plot.PlottingUtil.equalFuzzy(a,-1,.1)},SuperMap.Plot.PlottingUtil.pointIsOnPolyLines=function(t,e){if(!e||0===e.length)return{isOnPolyLine:!1,index:-1};let i=!1,o=-1;for(let s=0;s<e.length-1;s++)if(i=SuperMap.Plot.PlottingUtil.pointIsOnPolyLine(t,e[s],e[s+1])){o=s;break}return{isOnPolyLine:i,index:o}},SuperMap.Plot.PlottingUtil.computePointToLineMinDis=function(t,e){let i=-1,o=-1;for(let s=0;s<e.length-1;s++){let l=e[s],n=e[s+1],a=SuperMap.Plot.PlottingUtil.projectPoint(t,l,n);if(!SuperMap.Plot.PlottingUtil.pointIsOnPolyLine(a,l,n))continue;let r=SuperMap.Plot.PlottingUtil.distance(t,a);i<0?(i=r,o&&(o=s)):i>r&&(i=r,o=s)}return o&&i<0&&(o=-1),{minDis:i,index:o}},SuperMap.Plot.PlottingUtil.findPointInLine=function(t,e,i){if(t===e||Math.abs(i)<1e-18)return t;let o=e.x-t.x,s=e.y-t.y,l=i/Math.sqrt(o*o+s*s),n=t.x+o*l,a=t.y+s*l;return new SuperMap.Geometry.Point(n,a)},SuperMap.Plot.PlottingUtil.operateControlPoints=function(t){let e=t,i=e.length;if(3==i){let i=new SuperMap.Geometry.Point(0,0);SuperMap.Plot.PlottingUtil.getTrapezoidPoints(1,t[0],t[1],t[2],i),e.push(i)}if(i>4&&(e.splice(4,i-4),i=e.length),SuperMap.Plot.PlottingUtil.pointIsRightToLine(t[0],t[1],e[2])){let t=e[0];e[0]=e[1],e[1]=t}if(!SuperMap.Plot.PlottingUtil.pointIsRightToVerticle(e[0],e[1],e[2])){let t=e[2];e[2]=e[3],e[3]=t}return e},SuperMap.Plot.PlottingUtil.pointIsRightToLine=function(t,e,i){return(e.x-t.x)*(i.y-t.y)-(i.x-t.x)*(e.y-t.y)<0},SuperMap.Plot.PlottingUtil.pointIsRightToVerticle=function(t,e,i){let o=new SuperMap.Geometry.Point(.5*(e.x+t.x),.5*(e.y+t.y)),s=new SuperMap.Geometry.Point(e.x-t.x,e.y-t.y),l=new SuperMap.Geometry.Point(i.x-o.x,i.y-o.y);return s.x*l.x+s.y*l.y>0},SuperMap.Plot.PlottingUtil.linePnt=function(t,e,i){let o=SuperMap.Plot.PlottingUtil.distance(t,e);if(0==o)return t;{let s=i/o;return SuperMap.Plot.PlottingUtil.findPointOnLineByRatio(s,t,e)}},SuperMap.Plot.PlottingUtil.findPointOnLineByRatio=function(t,e,i){let o=new SuperMap.Geometry.Point(0,0);return o.x=e.x+(i.x-e.x)*t,o.y=e.y+(i.y-e.y)*t,o},SuperMap.Plot.PlottingUtil.rotateAngle=function(t,e,i){let o=e,s=Math.cos(o),l=Math.sin(o),n=i.x-t.x,a=i.y-t.y;return i.x=n*s-a*l+t.x,i.y=n*l+a*s+t.y,i},SuperMap.Plot.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},SuperMap.Plot.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+=SuperMap.Plot.PlottingUtil.distance(t[o],t[o+1]))>e||SuperMap.Plot.PlottingUtil.equalFuzzy(i,e)){let s=i-e,l=t[o+1],n=t[o],a=s/SuperMap.Plot.PlottingUtil.distance(l,n),r=new SuperMap.Geometry.Point(0,0);return r.x=l.x+(n.x-l.x)*a,r.y=l.y+(n.y-l.y)*a,{index:o,pt:r}}return{index:-1,pt:null}},SuperMap.Plot.PlottingUtil.polylineDistance=function(t){if(0===t.length)return 0;let e=0;for(let i=0;i<t.length-1;i++)e+=SuperMap.Plot.PlottingUtil.distance(t[i],t[i+1]);return e},SuperMap.Plot.PlottingUtil.rotate=function(t,e,i,o){let s=o.x-t.x,l=o.y-t.y,n=s*e-l*i+t.x,a=s*i+l*e+t.y;return new SuperMap.Geometry.Point(n,a)},SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale=function(t,e,i){let o=e.x,s=e.y,l=i.x,n=i.y,a=Math.sqrt(1*(o-l)*(o-l)+1*(s-n)*(s-n)),r=0,p=0;return 0==a?(r=o,p=s):(r=o+(l-o)*t/a,p=s+(n-s)*t/a),new SuperMap.Geometry.Point(r,p)},SuperMap.Plot.PlottingUtil.getExcentrePointOnSegmentByScale=function(t,e,i){let o=e.x,s=e.y,l=i.x,n=i.y,a=0,r=0,p=Math.sqrt(1*(o-l)*(o-l)+1*(s-n)*(s-n));return 0===p?(a=o,r=s):(a=o+(o-l)*t/p,r=s+(s-n)*t/p),new SuperMap.Geometry.Point(a,r)},SuperMap.Plot.PlottingUtil.getSidePointsOfLine=function(t,e,i){let o=e.x,s=e.y,l=i.x,n=i.y,a=Math.sqrt(1*(o-l)*(o-l)+1*(s-n)*(s-n)),r=0,p=0;0==a?(p=0,r=t):(r=t*(o-l)/a,p=t*(s-n)/a);let u=-p+l,h=+r+n,y=+p+l,c=-r+n;return{pntLeft:new SuperMap.Geometry.Point(y,c),pntRight:new SuperMap.Geometry.Point(u,h)}},SuperMap.Plot.PlottingUtil.pointProjectToSegment=function(t,e,i){let o,s,l=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,l=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)==(s=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<l&&a<l||n>l&&a>l)&&(r=0);else switch(o){case 1:(4==s&&n<l||2==s&&n>l)&&(r=0);break;case 2:(1==s&&n<l||3==s&&n>l)&&(r=0);break;case 3:(2==s&&n<l||4==s&&n>l)&&(r=0);break;case 4:(3==s&&n<l||1==s&&n>l)&&(r=0)}let p=new SuperMap.Geometry.Point(0,0);return SuperMap.Plot.PlottingUtil.equalFuzzy(l-1.7976931348623157e308,0)?(p.x=t.x,p.y=e.y):SuperMap.Plot.PlottingUtil.equalFuzzy(l,0)?(p.x=e.x,p.y=t.y):(p.x=(l*(e.y-t.y)+l*l*t.x+e.x)/(l*l+1),p.y=t.y+l*(p.x-t.x)),{isOnline:1===r,projectPoint:p}},SuperMap.Plot.PlottingUtil.coordinateTrans=function(t,e,i){let o=SuperMap.Plot.PlottingUtil.distance(new SuperMap.Geometry.Point(0,0),e),s=SuperMap.Plot.PlottingUtil.radian(new SuperMap.Geometry.Point(0,0),e)+i*Math.PI/180,l=o*Math.cos(s)+t.x,n=o*Math.sin(s)+t.y;return new SuperMap.Geometry.Point(l,n)},SuperMap.Plot.PlottingUtil.triangleHeightAndPartBottomLen=function(t,e,i){let o,s,l=(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,s=0;else if(0==l)o=n,s=0;else{let t=(n*n+a*a-l)/2/n/a,e=0;t>=1?(t=1,e=0):e=Math.sqrt(1-t*t),o=a*t,s=a*e}return{dLen1:o,dLen2:s}},SuperMap.Plot.PlottingUtil.paraLine=function(t,e,i){let o=[];if(2>t.length)return o;if(i){let i=t[1].clone();i=SuperMap.Plot.PlottingUtil.rotateAngle(t[0],Math.PI/2,i),o.push(SuperMap.Plot.PlottingUtil.linePnt(t[0],i,e));for(let s=1;s<t.length-1;s++){if(SuperMap.Plot.PlottingUtil.equalFuzzy(t[s].x,t[s+1].x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(t[s].y,t[s+1].y))continue;let l=SuperMap.Plot.PlottingUtil.radian(t[s],t[s+1]),n=SuperMap.Plot.PlottingUtil.radian(t[s],t[s-1])-l;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[s+1].clone(),i=SuperMap.Plot.PlottingUtil.rotateAngle(t[s],r,i),o.push(SuperMap.Plot.PlottingUtil.linePnt(t[s],i,p))}i=t[t.length-2].clone(),i=SuperMap.Plot.PlottingUtil.rotateAngle(t[t.length-1],-1*Math.PI/2,i),o.push(SuperMap.Plot.PlottingUtil.linePnt(t[t.length-1],i,e))}else{let i=t[1].clone();i=SuperMap.Plot.PlottingUtil.rotateAngle(t[0],-Math.PI/2,i),o.push(SuperMap.Plot.PlottingUtil.linePnt(t[0],i,e));for(let s=1;s<t.length-1;s++){if(SuperMap.Plot.PlottingUtil.equalFuzzy(t[s].x,t[s+1].x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(t[s].y,t[s+1].y))continue;let l=SuperMap.Plot.PlottingUtil.radian(t[s],t[s+1]),n=SuperMap.Plot.PlottingUtil.radian(t[s],t[s-1])-l;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[s-1].clone(),i=SuperMap.Plot.PlottingUtil.rotateAngle(t[s],r,i),o.push(SuperMap.Plot.PlottingUtil.linePnt(t[s],i,p))}i=t[t.length-2].clone(),i=SuperMap.Plot.PlottingUtil.rotateAngle(t[t.length-1],Math.PI/2,i),o.push(SuperMap.Plot.PlottingUtil.linePnt(t[t.length-1],i,e))}return o},SuperMap.Plot.PlottingUtil.circlePoint=function(t,e,i,o){o*=Math.PI/180;let s=t.x+e*Math.cos(o),l=t.y+i*Math.sin(o);return new SuperMap.Geometry.Point(s,l)},SuperMap.Plot.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 SuperMap.Geometry.Point(e/t.length,i/t.length)},SuperMap.Plot.PlottingUtil.ptIsInPolygon=function(t,e){if(!t||0===t.length)return!1;let i=0,o=t.length;for(let s=0;s<o;s++){let l=t[s],n=t[(s+1)%o];if(l.y===n.y)continue;let a=l.y<n.y?l.y:n.y,r=l.y>n.y?l.y:n.y;e.y<a||e.y>r||(e.y-l.y)*(n.x-l.x)/(n.y-l.y)+l.x>e.x&&i++}return i%2==1},SuperMap.Plot.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=SuperMap.Plot.PlottingUtil.pointProjectToSegment(t,e[i],e[i+1]);if(o.isOnline)return{index:i,pt:o.projectPoint}}return{index:-1,pt:null}},SuperMap.Plot.PlottingUtil.isPloyClockwise=function(t){let e=SuperMap.Plot.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},SuperMap.Plot.PlottingUtil.isSamePt=function(t,e){return!(!SuperMap.Plot.PlottingUtil.equalFuzzy(t.x,e.x)||!SuperMap.Plot.PlottingUtil.equalFuzzy(t.y,e.y))},SuperMap.Plot.PlottingUtil.getPtsIndexByDistance=function(t,e){let i=SuperMap.Plot.PlottingUtil.findPointInPolyLine(e,t);return{index:i.index,pts:i.pt,bfind:-1!==i.index}},SuperMap.Plot.PlottingUtil.ptInBounds=function(t,e){return t.x>e.left&&t.x<e.right&&t.y<e.top&&t.y>e.bottom},SuperMap.Plot.PlottingUtil.InnerAngle=function(t,e,i){if(t==e||t==i)return 0;let o=SuperMap.Plot.PlottingUtil.distance(t,e),s=SuperMap.Plot.PlottingUtil.distance(t,i),l=SuperMap.Plot.PlottingUtil.distance(e,i),n=(o*o+s*s-l*l)/(2*o*s);return n>1&&SuperMap.Plot.PlottingUtil.equalFuzzy(n,1)?n=1:n<1&&SuperMap.Plot.PlottingUtil.equalFuzzy(n,-1)&&(n=-1),Math.acos(n)},SuperMap.Plot.PlottingUtil.plumbLineLen=function(t,e,i){return SuperMap.Plot.PlottingUtil.distance(t,e)*Math.sin(SuperMap.Plot.PlottingUtil.InnerAngle(e,t,i))},SuperMap.Plot.PlottingUtil.paraPolygon=function(t,e,i){let o=[],s=SuperMap.Plot.PlottingUtil.clonePoints(t),l=s.length;if(l<2)return o;let n=new SuperMap.Geometry.Point(0,0);if(i){if(l<3)n=s[1].clone(),SuperMap.Plot.PlottingUtil.rotateAngle(s[0],Math.PI,n),o.push(SuperMap.Plot.PlottingUtil.linePnt(s[0],n,e));else{let t=SuperMap.Plot.PlottingUtil.radian(s[0],s[1]),i=SuperMap.Plot.PlottingUtil.radian(s[0],s[s.length-1])-t;for(;i<0;)i+=2*Math.PI;let l,a=i/2;l=a>Math.PI/2?a-Math.PI/2:Math.PI/2-a;let r=e/Math.cos(l);n=s[1].clone(),n=SuperMap.Plot.PlottingUtil.rotateAngle(s[0],a,n),o.push(SuperMap.Plot.PlottingUtil.linePnt(s[0],n,r))}for(let t=1;t<l-1;t++){let i=SuperMap.Plot.PlottingUtil.radian(s[t],s[t+1]),l=SuperMap.Plot.PlottingUtil.radian(s[t],s[t-1])-i;for(;l<0;)l+=2*Math.PI;let a,r=l/2;a=r>Math.PI/2?r-Math.PI/2:Math.PI/2-r;let p=e/Math.cos(a);n=s[t+1].clone(),n=SuperMap.Plot.PlottingUtil.rotateAngle(s[t],r,n),o.push(SuperMap.Plot.PlottingUtil.linePnt(s[t],n,p))}if(l<3)n=s[l-2].clone(),SuperMap.Plot.PlottingUtil.rotateAngle(s[l-1],0,n),o.push(SuperMap.Plot.PlottingUtil.linePnt(s[l-1],n,e));else{let t=SuperMap.Plot.PlottingUtil.radian(s[l-1],s[0]),i=SuperMap.Plot.PlottingUtil.radian(s[l-1],s[l-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=s[0].clone(),n=SuperMap.Plot.PlottingUtil.rotateAngle(s[l-1],r,n),o.push(SuperMap.Plot.PlottingUtil.linePnt(s[l-1],n,p))}}else{if(l<3){let t=s[1].clone();SuperMap.Plot.PlottingUtil.rotateAngle(s[0],0,t),o.push(SuperMap.Plot.PlottingUtil.linePnt(s[0],t,e))}else{let t=SuperMap.Plot.PlottingUtil.radian(s[0],s[1]),i=SuperMap.Plot.PlottingUtil.radian(s[0],s[l-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=s[l-1].clone(),n=SuperMap.Plot.PlottingUtil.rotateAngle(s[0],r,n),o.push(SuperMap.Plot.PlottingUtil.linePnt(s[0],n,p))}for(let t=1;t<l-1;t++){let i=SuperMap.Plot.PlottingUtil.radian(s[t],s[t+1]),l=SuperMap.Plot.PlottingUtil.radian(s[t],s[t-1])-i;for(;l<0;)l+=2*Math.PI;let a,r=Math.PI-l/2;a=r>Math.PI/2?r-Math.PI/2:Math.PI/2-r;let p=e/Math.cos(a);n=s[t-1].clone(),n=SuperMap.Plot.PlottingUtil.rotateAngle(s[t],r,n),o.push(SuperMap.Plot.PlottingUtil.linePnt(s[t],n,p))}if(l<3)n=s[l-2].clone(),SuperMap.Plot.PlottingUtil.rotateAngle(s[l-1],Math.PI,n),o.push(SuperMap.Plot.PlottingUtil.linePnt(s[l-1],n,e));else{let t=SuperMap.Plot.PlottingUtil.radian(s[l-1],s[0]),i=SuperMap.Plot.PlottingUtil.radian(s[l-1],s[l-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=s[l-2].clone(),n=SuperMap.Plot.PlottingUtil.rotateAngle(s[l-1],r,n),o.push(SuperMap.Plot.PlottingUtil.linePnt(s[l-1],n,p))}}return o},SuperMap.Plot.PlottingUtil.getOutRectangleDis=function(t){if(2>t.length)return 0;let e=t[0].x,i=t[0].x,o=t[0].y,s=t[0].y;for(let l=1;l<t.length;l++)e<t[l].x&&(e=t[l].x),i>t[l].x&&(i=t[l].x),o<t[l].y&&(o=t[l].y),s>t[l].y&&(s=t[l].y);return SuperMap.Plot.PlottingUtil.distance(new SuperMap.Geometry.Point(e,o),new SuperMap.Geometry.Point(i,s))},SuperMap.Plot.PlottingUtil.clonePoints=function(t){let e=[];if(void 0===t||null===t)return e;if(SuperMap.Plot.PlottingUtil.isArray(t)||(t=[t]),t&&null!=t)for(let i=0;i<t.length;i++)void 0!==t[i]&&null!==t[i]&&e.push(t[i].clone());return e},SuperMap.Plot.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("toString")&&(t.toString=e.toString)}return t},SuperMap.Plot.PlottingUtil.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},SuperMap.Plot.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},SuperMap.Plot.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},SuperMap.Plot.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)t.hasOwnProperty(i)&&(e[i]=SuperMap.Plot.PlottingUtil.cloneObject(t[i]));return e}throw new Error("Unable to copy obj! Its type isn't supported.")},SuperMap.Plot.PlottingUtil.rad=function(t){return t*Math.PI/180},SuperMap.Plot.PlottingUtil.deg=function(t){return 180*t/Math.PI},SuperMap.Plot.PlottingUtil.VincentyConstants={a:6378137,b:6356752.3142,f:1/298.257223563},SuperMap.Plot.PlottingUtil.distVincenty=function(t,e){var i,o,s,l=SuperMap.Plot.PlottingUtil.VincentyConstants,n=l.a,a=l.b,r=l.f;"undefined"!=typeof L&&void 0!==L.LatLng&&t instanceof L.LatLng&&e instanceof L.LatLng?(i=SuperMap.Plot.PlottingUtil.rad(e.lng-t.lng),o=Math.atan((1-r)*Math.tan(SuperMap.Plot.PlottingUtil.rad(t.lat))),s=Math.atan((1-r)*Math.tan(SuperMap.Plot.PlottingUtil.rad(e.lat)))):(i=SuperMap.Plot.PlottingUtil.rad(e.lon-t.lon),o=Math.atan((1-r)*Math.tan(SuperMap.Plot.PlottingUtil.rad(t.lat))),s=Math.atan((1-r)*Math.tan(SuperMap.Plot.PlottingUtil.rad(e.lat))));for(var p=Math.sin(o),u=Math.cos(o),h=Math.sin(s),y=Math.cos(s),c=i,S=2*Math.PI,P=20;Math.abs(c-S)>1e-12&&--P>0;){var g=Math.sin(c),d=Math.cos(c),f=Math.sqrt(y*g*(y*g)+(u*h-p*y*d)*(u*h-p*y*d));if(0==f)return 0;var m=p*h+u*y*d,M=Math.atan2(f,m),b=Math.asin(u*y*g/f),T=Math.cos(b)*Math.cos(b),v=m-2*p*h/T,A=r/16*T*(4+r*(4-3*T));S=c,c=i+(1-A)*r*Math.sin(b)*(M+A*f*(v+A*m*(2*v*v-1)))}if(0==P)return NaN;var x=T*(n*n-a*a)/(a*a),_=x/1024*(256+x*(x*(74-47*x)-128));return(a*(1+x/16384*(4096+x*(x*(320-175*x)-768)))*(M-_*f*(v+_/4*(m*(2*v*v-1)-_/6*v*(4*f*f-3)*(4*v*v-3))))).toFixed(3)/1e3},SuperMap.Plot.PlottingUtil.destinationVincenty=function(t,e,i){var o,s,l=SuperMap.Plot.PlottingUtil,n=l.VincentyConstants,a=n.a,r=n.b,p=n.f;"undefined"!=typeof L&&void 0!==L.LatLng&&t instanceof L.LatLng?(o=t.lng,s=t.lat):(o=t.lon,s=t.lat);for(var u=i,h=l.rad(e),y=Math.sin(h),c=Math.cos(h),S=(1-p)*Math.tan(l.rad(s)),P=1/Math.sqrt(1+S*S),g=S*P,d=Math.atan2(S,c),f=P*y,m=1-f*f,M=m*(a*a-r*r)/(r*r),b=1+M/16384*(4096+M*(M*(320-175*M)-768)),T=M/1024*(256+M*(M*(74-47*M)-128)),v=u/(r*b),A=2*Math.PI;Math.abs(v-A)>1e-12;){var x=Math.cos(2*d+v),_=Math.sin(v),O=Math.cos(v);A=v,v=u/(r*b)+T*_*(x+T/4*(O*(2*x*x-1)-T/6*x*(4*_*_-3)*(4*x*x-3)))}var w=g*_-P*O*c,I=Math.atan2(g*O+P*_*c,(1-p)*Math.sqrt(f*f+w*w)),D=p/16*m*(4+p*(4-3*m)),E=Math.atan2(_*y,P*O-g*_*c)-(1-D)*p*f*(v+D*_*(x+D*O*(2*x*x-1)));return"undefined"!=typeof L&&void 0!==L.LatLng&&t instanceof L.LatLng?L.latLng(l.deg(I),o+l.deg(E)):new SuperMap.LonLat(o+l.deg(E),l.deg(I))};var H=SuperMap.Plot.Primitives=SuperMap.Plot.Primitives||{};SuperMap.Plot.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=SuperMap.Plot.PlottingUtil.distance(t[0],t[1]);SuperMap.Plot.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=SuperMap.Plot.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,SuperMap.Plot.PlottingUtil.clearSamePts(i),i}},bezier:function(t,e){if(t){let i=[];return i=e?SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(t):t,SuperMap.Plot.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?SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(t):t,SuperMap.Plot.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 SuperMap.Geometry.Point(e,i),s=[];return s.push.apply(s,t),s.push(o),s.push(s[0]),s}},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=[],s=Math.sqrt((i.x-e.x)*(i.x-e.x)+(i.y-e.y)*(i.y-e.y)),l=360/this.nSegmentCount;for(let t=0;t<this.nSegmentCount;t++){let i=(t*l+1)*Math.PI/180,n=new SuperMap.Geometry.Point(Math.cos(i)*s+e.x,Math.sin(i)*s+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 SuperMap.Geometry.Point(i.x,e.y),i.clone(),new SuperMap.Geometry.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,s){if(!0===i){if((!o||null==o)&&t&&t.length>=3&&(o=SuperMap.Plot.PlottingUtil.distance(t[0],t[1])),(!s||null==s)&&t&&t.length>=3){let e=SuperMap.Plot.PlottingUtil.projectPoint(t[2],t[0],t[1]);s=SuperMap.Plot.PlottingUtil.distance(e,t[2])}}else s=SuperMap.Plot.PlottingUtil.distance(t[0],t[2]),o=SuperMap.Plot.PlottingUtil.distance(t[0],t[1]);if(e&&null!=e?e*=Math.PI/180:e=SuperMap.Plot.PlottingUtil.radian(t[0],t[1]),t&&t.length>0){let l=0,n=2*Math.PI,a=n/this.nSegmentCount,r=this.getArcSpatialData(t[0],o,s,e,l,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-s*i,t[2].y=t[0].y+s*o):(t[2].x=t[0].x+s*i,t[2].y=t[0].y-s*o)}return r}},getArcSpatialData:function(t,e,i,o,s,l,n){let a=[];if(Math.abs(n)<1e-9)return a;for(;l<s;)l+=2*Math.PI;for(;l>s+2*Math.PI;)s+=2*Math.PI;let r=Math.cos(o)*e,p=Math.sin(o)*e,u=Math.cos(o)*i,h=Math.sin(o)*i,y=this.calcEllipseRadian(s,e,i),c=this.calcEllipseRadian(l,e,i);c-y<1e-5&&(c+=2*Math.PI);let S=Math.round(Math.abs((c-y)/n)+1);if(S<2)return a;for(var P=0;P<S-1;y+=n,P++){P===S-2&&(y=l);let e=t.x+r*Math.cos(y)-h*Math.sin(y),i=t.y+p*Math.cos(y)+u*Math.sin(y);a.push(new SuperMap.Geometry.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},getArcInfo:function(t,e,i){let o={};o.pntCenter=new SuperMap.Geometry.Point(0,0),o.dRadius=0,o.dStartAngle=0,o.dEndAngle=0;let s=e.x-t.x,l=e.y-t.y;if(Math.abs(s)<1e-9){let s={},l={};s.x=(e.x+t.x)/2,s.y=(e.y+t.y)/2,l.x=(e.x+i.x)/2,l.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=s.y,Math.abs(n)<1e-9?o.pntCenter.x=l.x:o.pntCenter.x=l.x-n*(s.y-l.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=l/s,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(SuperMap.Plot.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,s=e*Math.sin(t),l=i*Math.cos(t),n=Math.atan2(s,l);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=SuperMap.Plot.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]),(SuperMap.Plot.PlottingUtil.isSamePt(t[0],t[2])||SuperMap.Plot.PlottingUtil.isSamePt(t[1],t[2]))&&(e.push(t[0]),e.push(t[1])),SuperMap.Plot.PlottingUtil.isSamePt(t[0],t[1]))return e.push(t[0]),void e.push(t[2]);i=this.reNormalizeKidneyCtrlPoints(i);let s=new SuperMap.Geometry.Point(0,0),l=new SuperMap.Geometry.Point(0,0);s.x=.5*(i[0].x+i[1].x),s.y=.5*(i[0].y+i[1].y),l.x=s.x-.1*(i[2].x-s.x),l.y=s.y-.1*(i[2].y-s.y);let n=this.GetPtsByTriangle(3,0,i[1],i[0],l);e.push(n.pr),e.push(l),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 SuperMap.Geometry.Point(0,0),o=0;return i.x=.5*(t.x+e.x),i.y=.5*(t.y+e.y),o=SuperMap.Plot.PlottingUtil.distance(e,t)/2.7,this.GetPointsOfNormal(o,t,i).pt3},GetPointsOfNormal:function(t,e,i){let o=new SuperMap.Geometry.Point(0,0),s=new SuperMap.Geometry.Point(0,0),l=new SuperMap.Geometry.Point(0,0),n=0;return 0==(n=SuperMap.Plot.PlottingUtil.distance(e,i))?(l.y=0,l.x=t):(l.x=t*(e.x-i.x)/n,l.y=t*(e.y-i.y)/n),o.x=-l.y+i.x,o.y=l.x+i.y,s.x=l.y+i.x,s.y=-l.x+i.y,{pt3:o,pt4:s}},reNormalizeKidneyCtrlPoints:function(t){let e=[];e.push(new SuperMap.Geometry.Point(0,0)),e.push(new SuperMap.Geometry.Point(0,0)),e.push(new SuperMap.Geometry.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],s=t[2],l=0,n=0,a=0;if(l=SuperMap.Plot.PlottingUtil.distance(o,i),n=SuperMap.Plot.PlottingUtil.distance(s,o),a=SuperMap.Plot.PlottingUtil.distance(i,s),n>=l&&n>=a){let t=i.clone();i=s.clone(),s=t.clone()}else if(a>=l&&a>=n){let t=s.clone();s=o.clone(),o=t.clone()}if(!SuperMap.Plot.PlottingUtil.isRight(s,i,o)){let t=i.clone();i=o.clone(),o=t.clone()}e[0]=i,e[1]=o,e[2]=s}return e},GetPtsByTriangle:function(t,e,i,o,s){let l=new SuperMap.Geometry.Point(0,0),n=0,a=0;return n=SuperMap.Plot.PlottingUtil.distance(s,i),a=SuperMap.Plot.PlottingUtil.distance(o,s),1==e&&(n*=2),2==e&&(a*=2),l.x=(n*o.x+a*i.x)/(n+a),l.y=(n*o.y+a*i.y)/(n+a),{pl:this.GetWhichPtOfNormal(t,i,l,s),pr:this.GetWhichPtOfNormal(t,o,l,s)}},GetWhichPtOfNormal:function(t,e,i,o){let s,l=0,n=0;n=SuperMap.Plot.PlottingUtil.distance(o,e)/t;let a=this.GetPointsOfNormal(n,i,o);return s=(l=SuperMap.Plot.PlottingUtil.distance(e,a.pt4))>=(n=SuperMap.Plot.PlottingUtil.distance(e,a.pt3))?a.pt3:a.pt4},getBezierPtsWithScalePts:function(t,e,i,o){let s=[],l=t.x,n=t.y,a=e.x,r=e.y,p=i.x,u=i.y,h=o.x,y=o.y;if(SuperMap.Plot.PlottingUtil.equalFuzzy(l,a,1e-10)&&SuperMap.Plot.PlottingUtil.equalFuzzy(n,r,1e-10)&&SuperMap.Plot.PlottingUtil.equalFuzzy(p,h,1e-10)&&SuperMap.Plot.PlottingUtil.equalFuzzy(u,y,1e-10))s.push(new SuperMap.Geometry.Point(l,n)),s.push(new SuperMap.Geometry.Point(p,u));else for(let t=0;t<=1;t+=.03125){let e,i,o,c,S=t*t,P=S*t;e=1-3*t+3*S-P,i=3*(t-2*S+P),o=3*(S-P),c=P;let g=new SuperMap.Geometry.Point(e*l+i*a+o*p+c*h,e*n+i*r+o*u+c*y);s.push(g)}return s},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}}};var X=SuperMap.Plot.RouteNodePrimitives=SuperMap.Plot.RouteNodePrimitives||{};SuperMap.Plot.RouteNodePrimitives={initialize:function(){},rendezvousPoint:function(){let t=[],e=new Object;e.type=SuperMap.Plot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMap.Geometry.Point(0,0)),e.positionPoints.push(new SuperMap.Geometry.Point(0,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};let i=new Object;return i.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,i.positionPoints=[],i.positionPoints.push(new SuperMap.Geometry.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=SuperMap.Plot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMap.Geometry.Point(0,0)),e.positionPoints.push(new SuperMap.Geometry.Point(0,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};let i=new Object;return i.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,i.positionPoints=[],i.positionPoints.push(new SuperMap.Geometry.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=SuperMap.Plot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMap.Geometry.Point(0,0)),e.positionPoints.push(new SuperMap.Geometry.Point(0,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};let i=new Object;return i.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,i.positionPoints=[],i.positionPoints.push(new SuperMap.Geometry.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 SuperMap.Geometry.Point(0,0),s=new SuperMap.Geometry.Point(0,30);t||(t=90);let l=new Object;l.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,l.positionPoints=[];for(let e=t+10;e<170+t;e+=10){let t=SuperMap.Plot.PlottingUtil.findPoint(o,s,30,e);l.positionPoints.push(t)}l.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},i.push(l);let n=l.positionPoints[l.positionPoints.length-1],a=l.positionPoints[l.positionPoints.length-2],r=SuperMap.Plot.PlottingUtil.findPoint(n,a,9,22.5),p=SuperMap.Plot.PlottingUtil.findPoint(n,a,9,-22.5),u=new Object;u.type=SuperMap.Plot.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=SuperMap.Plot.SymbolType.POLYLINESYMBOL,h.positionPoints=[];for(let e=190+t;e<350+t;e+=10){let t=SuperMap.Plot.PlottingUtil.findPoint(o,s,30,e);h.positionPoints.push(t)}h.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},i.push(h);let y=h.positionPoints[h.positionPoints.length-1],c=h.positionPoints[h.positionPoints.length-2],S=SuperMap.Plot.PlottingUtil.findPoint(y,c,9,22.5),P=SuperMap.Plot.PlottingUtil.findPoint(y,c,9,-22.5),g=new Object;g.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,g.positionPoints=[],g.positionPoints.push(S),g.positionPoints.push(y.clone()),g.positionPoints.push(P),g.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},i.push(g);for(let t=0;t<i.length;t++)for(let s=0;s<i[t].positionPoints.length;s++){let l=e*(Math.PI/180);SuperMap.Plot.PlottingUtil.rotateAngle(o,l,i[t].positionPoints[s])}return i},standbyPoint_Inner:function(){let t=[],e=new Object;e.type=SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMap.Geometry.Point(-20,0)),e.positionPoints.push(new SuperMap.Geometry.Point(20,10)),e.positionPoints.push(new SuperMap.Geometry.Point(20,-10)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(e);let i=new Object;i.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,i.positionPoints=[],i.positionPoints.push(new SuperMap.Geometry.Point(-5,0)),i.positionPoints.push(new SuperMap.Geometry.Point(17,0)),i.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(i);let o=new Object;return o.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,o.positionPoints=[],o.positionPoints.push(new SuperMap.Geometry.Point(-2,1.5)),o.positionPoints.push(new SuperMap.Geometry.Point(-5,0)),o.positionPoints.push(new SuperMap.Geometry.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=SuperMap.Plot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMap.Geometry.Point(0,0)),e.positionPoints.push(new SuperMap.Geometry.Point(0,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};let i=new Object;return i.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,i.positionPoints=[],i.positionPoints.push(new SuperMap.Geometry.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=SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMap.Geometry.Point(-15,25)),e.positionPoints.push(new SuperMap.Geometry.Point(15,25)),e.positionPoints.push(new SuperMap.Geometry.Point(15,-25)),e.positionPoints.push(new SuperMap.Geometry.Point(0,-35)),e.positionPoints.push(new SuperMap.Geometry.Point(-15,-25)),e.positionPoints.push(new SuperMap.Geometry.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=SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMap.Geometry.Point(-30,30)),e.positionPoints.push(new SuperMap.Geometry.Point(30,30)),e.positionPoints.push(new SuperMap.Geometry.Point(30,-30)),e.positionPoints.push(new SuperMap.Geometry.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=SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMap.Geometry.Point(0,30)),e.positionPoints.push(new SuperMap.Geometry.Point(30,0)),e.positionPoints.push(new SuperMap.Geometry.Point(0,-30)),e.positionPoints.push(new SuperMap.Geometry.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=SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMap.Geometry.Point(0,30)),e.positionPoints.push(new SuperMap.Geometry.Point(20,-30)),e.positionPoints.push(new SuperMap.Geometry.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=SuperMap.Plot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMap.Geometry.Point(0,0)),e.positionPoints.push(new SuperMap.Geometry.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=SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMap.Geometry.Point(0,-30)),e.positionPoints.push(new SuperMap.Geometry.Point(20,30)),e.positionPoints.push(new SuperMap.Geometry.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=SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMap.Geometry.Point(0,30)),e.positionPoints.push(new SuperMap.Geometry.Point(30,-30)),e.positionPoints.push(new SuperMap.Geometry.Point(-30,-30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(e),t},eightSpiralPoint:function(){let t=[],e=new Object;e.type=SuperMap.Plot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMap.Geometry.Point(30,0)),e.positionPoints.push(new SuperMap.Geometry.Point(0,0)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};let i=new Object;return i.type=SuperMap.Plot.SymbolType.CIRCLESYMBOL,i.positionPoints=[],i.positionPoints.push(new SuperMap.Geometry.Point(-30,0)),i.positionPoints.push(new SuperMap.Geometry.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=SuperMap.Plot.SymbolType.POLYLINESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMap.Geometry.Point(-30,20)),e.positionPoints.push(new SuperMap.Geometry.Point(30,20)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};let i=new Object;i.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,i.positionPoints=[],i.positionPoints.push(new SuperMap.Geometry.Point(30,-20)),i.positionPoints.push(new SuperMap.Geometry.Point(-30,-20)),i.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};let o=new Object;o.type=SuperMap.Plot.SymbolType.ARCSYMBOL,o.positionPoints=[],o.positionPoints.push(new SuperMap.Geometry.Point(-30,20)),o.positionPoints.push(new SuperMap.Geometry.Point(-50,0)),o.positionPoints.push(new SuperMap.Geometry.Point(-30,-20)),o.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};let s=new Object;return s.type=SuperMap.Plot.SymbolType.ARCSYMBOL,s.positionPoints=[],s.positionPoints.push(new SuperMap.Geometry.Point(30,20)),s.positionPoints.push(new SuperMap.Geometry.Point(50,0)),s.positionPoints.push(new SuperMap.Geometry.Point(30,-20)),s.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(e),t.push(i),t.push(o),t.push(s),t},attackPoint:function(){let t=[],e=new Object;e.type=SuperMap.Plot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMap.Geometry.Point(0,0)),e.positionPoints.push(new SuperMap.Geometry.Point(0,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};let i=new Object;return i.type=SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,i.positionPoints=[],i.positionPoints.push(new SuperMap.Geometry.Point(0,20)),i.positionPoints.push(new SuperMap.Geometry.Point(20,-20)),i.positionPoints.push(new SuperMap.Geometry.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=SuperMap.Plot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMap.Geometry.Point(0,0)),e.positionPoints.push(new SuperMap.Geometry.Point(0,30)),e.style={surroundLineFlag:!1,fontSize:14};let i=new Object;return i.type=SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,i.positionPoints=[],i.positionPoints.push(new SuperMap.Geometry.Point(-15,15)),i.positionPoints.push(new SuperMap.Geometry.Point(15,15)),i.positionPoints.push(new SuperMap.Geometry.Point(15,-15)),i.positionPoints.push(new SuperMap.Geometry.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 SuperMap.Plot.RouteNodeType.RENDEZVOUS:return this.rendezvousPoint();case SuperMap.Plot.RouteNodeType.EXPANDING:return this.expandingPoint();case SuperMap.Plot.RouteNodeType.VOLLEY:return this.volleyPoint();case SuperMap.Plot.RouteNodeType.STANDBY:return e?this.standbyPoint_Inner():this.standbyPoint_Outer(null,i);case SuperMap.Plot.RouteNodeType.SUPPLY:return this.supplyPoint();case SuperMap.Plot.RouteNodeType.TAKEOFF:return this.takeoffPoint();case SuperMap.Plot.RouteNodeType.INITIAL:return this.initialPoint();case SuperMap.Plot.RouteNodeType.VISUALINITAL:return this.visualInitalPoint();case SuperMap.Plot.RouteNodeType.LANCH:case SuperMap.Plot.RouteNodeType.WEAPONLAUNCH:return this.lanchPoint();case SuperMap.Plot.RouteNodeType.TURNING:case SuperMap.Plot.RouteNodeType.COMMONROUTE:return this.turningPoint();case SuperMap.Plot.RouteNodeType.AIMING:return this.aimingPoint();case SuperMap.Plot.RouteNodeType.TARGET:return this.targetPoint();case SuperMap.Plot.RouteNodeType.ATTACK:return this.attackPoint();case SuperMap.Plot.RouteNodeType.SUPPRESS:return this.suppressPoint();case SuperMap.Plot.RouteNodeType.EIGHTSPIRAL:return this.eightSpiralPoint();case SuperMap.Plot.RouteNodeType.HAPPYVALLEY:return this.happyValleyPoint();default:return[]}},getRouteNodeNameByType:function(t){switch(t){case SuperMap.Plot.RouteNodeType.RENDEZVOUS:return"会合点";case SuperMap.Plot.RouteNodeType.EXPANDING:return"展开点";case SuperMap.Plot.RouteNodeType.VOLLEY:return"齐射点";case SuperMap.Plot.RouteNodeType.STANDBY:return"待机点";case SuperMap.Plot.RouteNodeType.SUPPLY:return"补给点";case SuperMap.Plot.RouteNodeType.TAKEOFF:return"起飞点";case SuperMap.Plot.RouteNodeType.INITIAL:return"初始点";case SuperMap.Plot.RouteNodeType.VISUALINITAL:return"可视化初始点";case SuperMap.Plot.RouteNodeType.LANCH:return"发射点";case SuperMap.Plot.RouteNodeType.WEAPONLAUNCH:return"武器发射点";case SuperMap.Plot.RouteNodeType.TURNING:return"转弯点";case SuperMap.Plot.RouteNodeType.COMMONROUTE:return"普通航路点";case SuperMap.Plot.RouteNodeType.AIMING:return"目标瞄准点";case SuperMap.Plot.RouteNodeType.TARGET:return"目标点";case SuperMap.Plot.RouteNodeType.ATTACK:return"攻击点";case SuperMap.Plot.RouteNodeType.SUPPRESS:return"压制点";case SuperMap.Plot.RouteNodeType.EIGHTSPIRAL:return"八字盘旋点";case SuperMap.Plot.RouteNodeType.HAPPYVALLEY:return"跑马圈点";default:return""}}};var J=SuperMap.Plot.AddPoint_WayType={UNKNOWN:0,POLYLINE:1,CURVE:2};SuperMap.Plot.Path2D=class{constructor(){this.m_pData=null,this.CLASS_NAME="SuperMap.Plot.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 SuperMap.Plot.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 SuperMap.Plot.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 s=new SuperMap.Plot.Element(t.x,t.y,2),l=new SuperMap.Plot.Element(e.x,e.y,3),n=new SuperMap.Plot.Element(i.x,i.y,3);o.elements.push(s),o.elements.push(l),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 s=new SuperMap.Plot.Element(t.x,t.y,2),l=new SuperMap.Plot.Element(e.x,e.y,3),n=new SuperMap.Plot.Element(i.x,i.y,3);o.elements.push(s),o.elements.push(l),o.elements.push(n)}}ToSubPathPolygons(t){var e,i,o=this.getDataPtr();if(this.IsEmpty())return!1;var s=[],l=this.GetElementCount();for(let M=0;M<l;M++){var n=o.elements[M];switch(n.GetType()){case 0:s.length>1&&t.push(s),s=[],e=n.GetX(),i=n.GetY(),s.push(new SuperMap.Geometry.Point(e,i));break;case 1:e=n.GetX(),i=n.GetY(),s.push(new SuperMap.Geometry.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(),y=o.elements[M+1].GetY(),c=o.elements[M+2].GetX(),S=o.elements[M+2].GetY();for(let t=0;t<=1;t+=.03125){var P=t*t,g=P*t,d=1-3*t+3*P-g,f=3*(t-2*P+g),m=3*(P-g),L=g;s.push(new SuperMap.Geometry.Point(d*a+f*p+m*h+L*c,d*r+f*u+m*y+L*S))}M+=2}}return s.length>1&&t.push(s),!0}ensureData(){null==this.m_pData&&this.ensureData_helper()}ensureData_helper(){var t=new SuperMap.Plot.Path2DData,e=new SuperMap.Plot.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 SuperMap.Plot.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}};SuperMap.Plot.Element=class{constructor(t,e,i){this.m_x=t,this.m_y=e,this.m_type=i,this.CLASS_NAME="SuperMap.Plot.Element"}GetX(){return this.m_x}GetY(){return this.m_y}GetType(){return this.m_type}GetPosition(){return SuperMap.Geometry.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 SuperMap.Plot.PlottingUtil.equalFuzzy(this.m_x,t.m_x,1e-10)&&SuperMap.Plot.PlottingUtil.equalFuzzy(this.m_y,t.m_y,1e-10)&&this.m_type==t.m_type}clone(){return new SuperMap.Plot.Path2D.Element(this.m_x,this.m_y,this.m_type)}};SuperMap.Plot.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="SuperMap.Plot.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 SuperMap.Plot.Element(t.GetX(),t.GetY(),SuperMap.Plot.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}}};SuperMap.Plot.ArrowToolkit=SuperMap.Plot.ArrowToolkit||{};SuperMap.Plot.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},SuperMap.Plot.ArrowToolkit.ArrowTailType={ARROWTAIL_NONE:0,ARROWTAIL_LINE:1,ARROWTAIL_CURVE:2,ARROWTAIL_COATTAIL:3,ARROWTAIL_COATTAIL_POLYBODY:4},SuperMap.Plot.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},SuperMap.Plot.ArrowToolkit.ArrowBodyType={ARROWBODY_POLYLINE:0,ARROWBODY_POLYBEZIER:1,ARROWBODY_COATTAIL:5,ARROWBODY_PARALLEL:2,ARROWBODY_TRAPEZOID:3,ARROWBODY_MULTIPOLYBEZIER:4},SuperMap.Plot.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=SuperMap.Plot.PlottingUtil.parallel(t,e),i.rightParallelPts=SuperMap.Plot.PlottingUtil.parallel(t,-e),i)},SuperMap.Plot.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 l=0;l<t.length-1;l++){t[l].x===t[l+1].x&&t[l].y===t[l+1].y&&(o.leftParallelPts.push(o.leftParallelPts[o.leftParallelPts.length-1]),o.rightParallelPts.push(o.rightParallelPts[o.rightParallelPts.length-1]));var s=t[l+1];s=SuperMap.Plot.PlottingUtil.rotate(t[l],0,1,s),o.leftParallelPts.push(SuperMap.Plot.PlottingUtil.findPointInLine(t[l],s,e)),s=t[l],s=SuperMap.Plot.PlottingUtil.rotate(t[l+1],0,-1,s),o.leftParallelPts.push(SuperMap.Plot.PlottingUtil.findPointInLine(t[l+1],s,i)),s=t[l+1],s=SuperMap.Plot.PlottingUtil.rotate(t[l],0,-1,s),o.rightParallelPts.push(SuperMap.Plot.PlottingUtil.findPointInLine(t[l],s,e)),s=t[l],s=SuperMap.Plot.PlottingUtil.rotate(t[l+1],0,1,s),o.rightParallelPts.push(SuperMap.Plot.PlottingUtil.findPointInLine(t[l+1],s,i))}return o},SuperMap.Plot.ArrowToolkit.generateArrowBodyShapePts=function(t,e,i){var o={};switch(i){case SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_PARALLEL:case SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_TRAPEZOID:var s=e[0],l=e[1],n=e[2],a=SuperMap.Plot.PlottingUtil.equalFuzzy(n,0);if(!a&&t.length>2){var r=t.length;t.splice(2,r-2)}var p=SuperMap.Plot.PlottingUtil.polylineDistance(t);o.arrowTouLen=p*s;var u=SuperMap.Plot.PlottingUtil.findPointInPolyLine(t,p-o.arrowTouLen).pt,h=[],y=o.arrowTouLen*n,c=o.arrowTouLen*l,S=t.length-1;for(let e=0;e<S;e++)h.push(t[e]);h.push(u);var P={leftParallelPts:[],rightParallelPts:[]};P=!0===a?SuperMap.Plot.ArrowToolkit.parallel(h,c):SuperMap.Plot.ArrowToolkit.trapezoid(h,y,c);var g=t[t.length-1];t[t.length-1]=u,t.push(g);o.leftBodyPts=P.leftParallelPts,o.rightBodyPts=P.rightParallelPts,o.OpectrlPoints=null;break;case SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_MULTIPOLYBEZIER:{var d=SuperMap.Plot.PlottingUtil.polylineDistance(t);if(0==d)return;let i=SuperMap.Plot.ArrowToolkit.OperateCtrlPts(t);var f=i.length;f--;var m=SuperMap.Plot.ArrowToolkit.generateMultiBezier(i,f,e,d);t=[];for(let e=0;e<i.length;e++)t.push(i[e]);o.arrowTouLen=m.arrowTouLen,o.leftBodyPts=m.leftBodyPts,o.rightBodyPts=m.rightBodyPts,o.OpectrlPoints=i}}return o},SuperMap.Plot.ArrowToolkit.generateArrowHeadShapePts=function(t,e,i,o,s){var l=[];switch(s){case SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITH_EAR:case SuperMap.Plot.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(!SuperMap.Plot.PlottingUtil.equalFuzzy(r,0)&&!SuperMap.Plot.PlottingUtil.equalFuzzy(p,0)){var h=SuperMap.Plot.PlottingUtil.clonePoints(t);h.splice(h.length-1,1),u=SuperMap.Plot.PlottingUtil.polylineDistance(h)*r*p}var y=new SuperMap.Geometry.Point((e[0].x+e[1].x)/2,(e[0].y+e[1].y)/2);if(SuperMap.Plot.PlottingUtil.equalFuzzy(a,0)){var c=o*n,S=t[t.length-1];return S=SuperMap.Plot.PlottingUtil.rotate(y,0,1,S),l.push(SuperMap.Plot.PlottingUtil.findPointInLine(y,S,c)),l.push(t[t.length-1]),S=t[t.length-1],S=SuperMap.Plot.PlottingUtil.rotate(y,0,-1,S),l.push(SuperMap.Plot.PlottingUtil.findPointInLine(y,S,c)),l}var P=o*a,g=SuperMap.Plot.PlottingUtil.getExcentrePointOnSegmentByScale(P,y,t[t.length-1]);P=o*n,P+=u;var d=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(P,t[t.length-1],g),f=d.pntLeft,m=d.pntRight,L=t[t.length-1];return l.push(m),l.push(L),l.push(f),l}},SuperMap.Plot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine=function(t,e,i,o){var s=[];if(2>t.length)return s;var l,n=SuperMap.Plot.PlottingUtil.polylineDistance(t),a=SuperMap.Plot.PlottingUtil.equalFuzzy(e,0);switch(i){case SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYLINE:s=s.concat(t),o&&!a&&SuperMap.Plot.PlottingUtil.distance(t[t.length-1],t[t.length-2])>e&&(l=SuperMap.Plot.PlottingUtil.findPointInPolyLine(t,n-e),s.splice(s.length-1,1),s.push(l.pt));break;case SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYBEZIER:if(2==t.length)s=s.concat(t),o&&!a&&SuperMap.Plot.PlottingUtil.distance(t[t.length-1],t[t.length-2])>e&&(l=SuperMap.Plot.PlottingUtil.findPointInPolyLine(t,n-e),s.splice(s.length-1,1),s.push(l.pt));else{var r=SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(t);if(a)s=s.concat(r);else{var p=r[r.length-1];if(!a&&(e<SuperMap.Plot.PlottingUtil.distance(t[t.length-1],t[t.length-2])||SuperMap.Plot.PlottingUtil.equalFuzzy(SuperMap.Plot.PlottingUtil.distance(t[t.length-1],t[t.length-2]),e,1e-7))){for(var u=r.length-1;u>1;u--){if(!(e>SuperMap.Plot.PlottingUtil.distance(p,r[u]))){var h=SuperMap.Plot.PlottingUtil.findPoint(p,r[u],e,0);r.push(h),s=r;break}r.splice(u,1)}o||s.push(p)}else s=s.concat(r)}}break;case SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_COATTAIL:var y=e;if(y>n)return s;var c,S,P=Math.ceil(n/(1.4*y)),g=0,d=[];for(let e=0;e<P;e++)c=SuperMap.Plot.PlottingUtil.getPtsIndexByDistance(y*g,t),S=SuperMap.Plot.PlottingUtil.getPtsIndexByDistance(y*(g+1),t),c.bfind&&S.bfind&&(d.push(c.pts),d.push(S.pts)),g=1.4*(e+1);s=d}return s},SuperMap.Plot.ArrowToolkit.generateArrowHeadShapePtsBySingleLine=function(t,e,i){var o=[];if(2>t.length)return o;switch(i){case SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_POLYLINE:{let i=t[0],s=t[1],l=SuperMap.Plot.PlottingUtil.distance(i,s);if(SuperMap.Plot.PlottingUtil.equalFuzzy(l,e,1e-7)||l>e){let l=SuperMap.Plot.PlottingUtil.findPoint(i,s,e,0),n=e*Math.tan(.125*Math.PI),a=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(n,t[0],l);o.push(a.pntLeft),o.push(t[0]),o.push(a.pntRight)}break}case SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE:break;case SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE_SOLID:{let i=t[0],s=t[1],l=SuperMap.Plot.PlottingUtil.distance(i,s);if(SuperMap.Plot.PlottingUtil.equalFuzzy(l,e,1e-7)||l>e){let l=e*Math.tan(.125*Math.PI),n=SuperMap.Plot.PlottingUtil.findPoint(i,s,e,0),a=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(l,t[0],n);o.push(a.pntLeft),o.push(i),o.push(a.pntRight),o.push(a.pntLeft)}break}case SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL:{let i=t[0],s=2*Math.sqrt(e*e/3),l=SuperMap.Plot.PlottingUtil.distance(t[0],t[1]);if(SuperMap.Plot.PlottingUtil.equalFuzzy(s/2,l,1e-7)||l>s/2){let e=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],s,20),l=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],s,-20),n=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],s/2,0);o.push(i),o.push(e),o.push(n),o.push(l),o.push(i)}break}case SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL_HOLLOW:{var s=[];let i=t[0],h=2*Math.sqrt(e*e/3),y=SuperMap.Plot.PlottingUtil.distance(t[0],t[1]);if(SuperMap.Plot.PlottingUtil.equalFuzzy(h/1.4,y,1e-7)||y>h/1.4){let e=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],h,20),y=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],h,-20),c=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],h/1.4,0);s.push(i),s.push(e),s.push(c),s.push(y),s.push(i);var l=new SuperMap.Geometry.Point((s[0].x+s[1].x)/2,(s[0].y+s[1].y)/2),n=new SuperMap.Geometry.Point((s[3].x+s[4].x)/2,(s[3].y+s[4].y)/2),a=new SuperMap.Geometry.Point((l.x+n.x)/2,(l.y+n.y)/2),r=.75*SuperMap.Plot.PlottingUtil.distance(l,n)/2,p=SuperMap.Plot.PlottingUtil.findPointInLine(a,l,r),u=SuperMap.Plot.PlottingUtil.findPointInLine(a,n,r);o.push(s[0]),o.push(p),o.push(s[1]),o.push(s[2]),o.push(s[3]),o.push(u),o.push(s[4])}break}}return o},SuperMap.Plot.ArrowToolkit.generateArrowTailShapePts=function(t,e,i,o){var s=e.length,l=[],n=0;for(let e=0;e<t.length-1;e++)n+=SuperMap.Plot.PlottingUtil.distance(t[e],t[e+1]);var a=n*i;switch(o){case SuperMap.Plot.ArrowToolkit.ArrowTailType.ARROWTAIL_NONE:break;case SuperMap.Plot.ArrowToolkit.ArrowTailType.ARROWTAIL_LINE:var r=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],a,90),p=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],a,-90);l.push(r),l.push(p);break;case SuperMap.Plot.ArrowToolkit.ArrowTailType.ARROWTAIL_CURVE:{let o=new SuperMap.Geometry.Point(.5*(e[0].x+e[s-1].x),.5*(e[0].y+e[s-1].y)),l=SuperMap.Plot.PlottingUtil.distance(e[0],e[s-1]);var u=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(l*i,o,t[t.length-1]),h=new SuperMap.Geometry.Point(0,0),y=new SuperMap.Geometry.Point(0,0);SuperMap.Plot.PlottingUtil.getTrianglePoints(SuperMap.Plot.ArrowToolkit.ConstValue.DUOJIANTOU_TAIL_RATE_1,SuperMap.Plot.ArrowToolkit.ConstValue.DUOJIANTOU_TAIL_RATE_2,e[0],u,e[s-1],h,y);var c=new SuperMap.Geometry.Point(0,0);SuperMap.Plot.PlottingUtil.getTrapezoidPoints(SuperMap.Plot.ArrowToolkit.ConstValue.DUOJIANTOU_TAIL_RATE_3,e[0],u,h,c);var S=new SuperMap.Geometry.Point(0,0);SuperMap.Plot.PlottingUtil.getTrapezoidPoints(SuperMap.Plot.ArrowToolkit.ConstValue.DUOJIANTOU_TAIL_RATE_3,e[s-1],u,y,S)}break;case SuperMap.Plot.ArrowToolkit.ArrowTailType.ARROWTAIL_COATTAIL:var P=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],a,157.5),g=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],a,-157.5);l.push(P),l.push(t[0]),l.push(g);break;case SuperMap.Plot.ArrowToolkit.ArrowTailType.ARROWTAIL_COATTAIL_POLYBODY:{let t=new SuperMap.Geometry.Point(.5*(e[0].x+e[s-1].x),.5*(e[0].y+e[s-1].y)),o=SuperMap.Plot.PlottingUtil.distance(e[0],e[s-1]);var d=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(o*i,e[0],t);l.push(e[s-1]),l.push(d.pntLeft),l.push(e[0])}}return l},SuperMap.Plot.ArrowToolkit.generateArrowTailShapePtsBySingleLine=function(t,e,i){var o=[];switch(i){case SuperMap.Plot.ArrowToolkit.ArrowTailType.ARROWTAIL_NONE:break;case SuperMap.Plot.ArrowToolkit.ArrowTailType.ARROWTAIL_LINE:var s=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],e,90),l=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],e,-90);o.push(s),o.push(l);break;case SuperMap.Plot.ArrowToolkit.ArrowTailType.ARROWTAIL_COATTAIL:var n=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],e,157.5),a=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],e,-157.5);o.push(n),o.push(t[0]),o.push(a)}return o},SuperMap.Plot.ArrowToolkit.OperateCtrlPts=function(t){var e=SuperMap.Plot.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,s=new SuperMap.Geometry.Point(i,o),l=e[2].clone();e[2]=s,e.push(l)}return e},SuperMap.Plot.ArrowToolkit.generateMultiBezier=function(t,e,i,o){var s=0,l=[],n=[],a=[],r=[],p=[],u=[],h=i[0],y=i[1],c=(t[0].x+t[1].x)/2,S=(t[0].y+t[1].y)/2,P=Math.abs(c-t[2].x),g=Math.abs(S-t[2].y),d=0;if(P>0&&g>0){var f=1/(c-t[2].x),m=-1/(S-t[2].y),L=1*t[2].y/(S-t[2].y)-1*t[2].x/(c-t[2].x);d=Math.abs(f*t[0].x+m*t[0].y+L)/Math.sqrt(f*f+m*m)}else g<=1e-4?d=Math.abs(S-t[1].y):P<=1e-4&&(d=Math.abs(c-t[1].x));var M=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(d,t[2],new SuperMap.Geometry.Point(c,S)),b=SuperMap.Plot.PlottingUtil.pointIsRightToLine(t[1],t[2],t[0]);b?(l[1]=t[1],n[1]=t[0]):(l[1]=t[0],n[1]=t[1]),t[1]=new SuperMap.Geometry.Point((t[0].x+t[1].x)/2,(t[0].y+t[1].y)/2);var T=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))*SuperMap.Plot.ArrowToolkit.ConstValue.sv_AtWidthDivAwWidth,v=(s=T*SuperMap.Plot.ArrowToolkit.ConstValue.sv_AtLenDivAtWidth)*y;SuperMap.Plot.PlottingUtil.equalFuzzy(h,0)||(v=(s=o*h)*y);var A,x,_=SuperMap.Plot.PlottingUtil.distance(t[e],t[e-1]),O=2*s;_<O&&(v=(s=_/2)*y),t.push(t[e]),A=0,x=0;var w=0,I=[];for(w=2;w<=e;w++)A+=SuperMap.Plot.PlottingUtil.distance(t[w],t[w-1]);for(A-=s,w=2;w<=e-1;w++)x+=SuperMap.Plot.PlottingUtil.distance(t[w],t[w-1]),I[w]=v+(T-v)*Math.pow((A-x)/A,SuperMap.Plot.ArrowToolkit.ConstValue.sv_AtScaleParameter);I[e]=v;var D,E,C=new SuperMap.Geometry.Point(0,0),N=new SuperMap.Geometry.Point(0,0),U=new SuperMap.Geometry.Point(0,0);for(w=2;w<=e-1;w++)SuperMap.Plot.PlottingUtil.getTrianglePoints(0,3,t[w-1],t[w],t[w+1],N,U),w==e-1&&SuperMap.Plot.PlottingUtil.getTrapezoidPoints(.5,t[e],t[e-1],U,C),D=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(I[w],N,t[w]),(b=SuperMap.Plot.PlottingUtil.pointIsRightToLine(U,N,D.pntRight))?(l[w]=new SuperMap.Geometry.Point(D.pntRight.x,D.pntRight.y),n[w]=new SuperMap.Geometry.Point(D.pntLeft.x,D.pntLeft.y)):(l[w]=new SuperMap.Geometry.Point(D.pntLeft.x,D.pntLeft.y),n[w]=new SuperMap.Geometry.Point(D.pntRight.x,D.pntRight.y));for(Math.sqrt(1*(t[e].x-C.x)*(t[e].x-C.x)+1*(t[e].y-C.y)*(t[e].y-C.y))>0&&(t[e]=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(s,t[e],C)),D=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(v,t[e+1],t[e]),(b=SuperMap.Plot.PlottingUtil.pointIsRightToLine(t[e],t[e+1],D.pntLeft))?(n[e]=new SuperMap.Geometry.Point(D.pntLeft.x,D.pntLeft.y),l[e]=new SuperMap.Geometry.Point(D.pntRight.x,D.pntRight.y)):(n[e]=new SuperMap.Geometry.Point(D.pntRight.x,D.pntRight.y),l[e]=new SuperMap.Geometry.Point(D.pntLeft.x,D.pntLeft.y)),w=2;w<e;w++)SuperMap.Plot.PlottingUtil.getTrianglePoints(3,3,l[w-1],l[w],l[w+1],N,U),a[w]=new SuperMap.Geometry.Point(N.x,N.y),r[w]=new SuperMap.Geometry.Point(U.x,U.y),SuperMap.Plot.PlottingUtil.getTrianglePoints(3,3,n[w-1],n[w],n[w+1],N,U),p[w]=new SuperMap.Geometry.Point(N.x,N.y),u[w]=new SuperMap.Geometry.Point(U.x,U.y),2==w&&(SuperMap.Plot.PlottingUtil.getTrapezoidPoints(.5,l[1],l[2],a[2],C),r[1]=new SuperMap.Geometry.Point(C.x,C.y),SuperMap.Plot.PlottingUtil.getTrapezoidPoints(.5,n[1],n[2],p[2],C),u[1]=new SuperMap.Geometry.Point(C.x,C.y)),w==e-1&&(O=(_=SuperMap.Plot.PlottingUtil.distance(l[e],l[e-1]))/3,(E=SuperMap.Plot.PlottingUtil.getExcentrePointOnSegmentByScale(O,t[e],t[e+1])).x+=l[e].x-t[e].x,E.y+=l[e].y-t[e].y,O=(_=T-v)*Math.pow(O/A,SuperMap.Plot.ArrowToolkit.ConstValue.sv_AtScaleParameter),D=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(O,l[e],E),a[e]=new SuperMap.Geometry.Point(D.pntLeft.x,D.pntLeft.y),O=(_=SuperMap.Plot.PlottingUtil.distance(n[e],n[e-1]))/3,(E=SuperMap.Plot.PlottingUtil.getExcentrePointOnSegmentByScale(O,t[e],t[e+1])).x+=n[e].x-t[e].x,E.y+=n[e].y-t[e].y,O=(_=T-v)*Math.pow(O/A,SuperMap.Plot.ArrowToolkit.ConstValue.sv_AtScaleParameter),D=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(O,n[e],E),p[e]=new SuperMap.Geometry.Point(D.pntRight.x,D.pntRight.y));return{arrowTouLen:s,leftBodyPts:SuperMap.Plot.ArrowToolkit.genArrowBody(e,l,a,r),rightBodyPts:SuperMap.Plot.ArrowToolkit.genArrowBody(e,n,p,u)}},SuperMap.Plot.ArrowToolkit.genArrowBody=function(t,e,i,o){var s=new SuperMap.Plot.Path2D;if(!(t<2)){s.MoveTo(e[1]);for(let l=1;l<=t-1;l++)s.CubicTo(o[l],i[l+1],e[l+1]);var l=[];return s.ToSubPathPolygons(l),l[0]}};SuperMap.Plot.AlgoSymbol=class{addScalePoint(t,e){if(null!=t){void 0!==e&&null!==e||(e=this.scalePoints.length);var i=new SuperMap.Geometry.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:SuperMap.Plot.AlgoSymbolFactory.getMaxEditPts(t.libID,t.code),this.minEditPts=t.minEditPts?t.minEditPts:SuperMap.Plot.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:SuperMap.Plot.AlgoSymbolFactory.getDefaultSubSymbols(t.libID,t.code),this.polylineConnectLocationPoint=!!t.polylineConnectLocationPoint&&t.polylineConnectLocationPoint,this.style=t.style?t.style:SuperMap.Plot.PlottingUtil.copyAttributes(this.style,SuperMap.Plot.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.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=[],this.style=null}init(){if(this.components=[],this.scalePoints=[],this.controlPoints.length>=2&&this.controlPoints.length<this.minEditPts&&this.calAssistantLine(),this.maxEditPts<this.controlPoints.length&&this.symbolType!==SuperMap.Plot.SymbolType.ELLIPSESYMBOL){var t=this.controlPoints.shift(),e=this.controlPoints.pop();this.controlPoints=[],this.controlPoints.push(t,e)}}finish(){}calculateParts(){this.init();var t=SuperMap.Plot.PlottingUtil.clearSamePts(this.controlPoints);if(t=SuperMap.Plot.PlottingUtil.clonePoints(t),this.controlPoints.length>=this.minEditPts){var e={textContent:this.textContent,type:this.symbolType,surroundLineFlag:!1,positionPoints:t,style:{}};if(e.type===SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL&&e.positionPoints.push(e.positionPoints[0]),this.symbolType===SuperMap.Plot.SymbolType.PARALLELLINE){if(this.controlPoints&&this.controlPoints.length>=3){var i=!1;void 0!==this.controlPoints[0].z&&(i=!0);var o=SuperMap.Plot.PlottingUtil.distance(this.controlPoints[0],this.controlPoints[1]);SuperMap.Plot.PlottingUtil.isRight(this.controlPoints[0],this.controlPoints[1],this.controlPoints[2])&&(o=-o);var s=[];for(let t=1;t<this.controlPoints.length;t++)s.push(this.controlPoints[t].clone());var l=SuperMap.Plot.PlottingUtil.parallel(s,o);if(this.controlPoints[0].x=l[0].x,this.controlPoints[0].y=l[0].y,i)for(let t=0;t<s.length;t++)l[t].z=s[t].z;this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,s),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,l)}}else this.components.push(e)}}modifyPoint(t,e){if(0===this.libID&&31===this.code){if(0===t)return this.controlPoints[0].x=(this.controlPoints[1].x+this.controlPoints[3].x)/2,void(this.controlPoints[0].y=(this.controlPoints[1].y+this.controlPoints[3].y)/2);var i=-1;0==(i=(t+2)%4)&&(i=4);var o=SuperMap.Plot.PlottingUtil.distance(this.controlPoints[0],this.controlPoints[t]),s=SuperMap.Plot.PlottingUtil.findPointInLine(this.controlPoints[0],this.controlPoints[i],o),l=new SuperMap.Geometry.Point(2*this.controlPoints[0].x-s.x,2*this.controlPoints[0].y-s.y),n=this.getPixelFromLonLat(s.x,s.y),a=this.getPixelFromLonLat(l.x,l.y),r=!1;(SuperMap.Plot.PlottingUtil.equalFuzzy(n.x-a.x,0)||SuperMap.Plot.PlottingUtil.equalFuzzy(n.y-a.y,0))&&(r=!0),r?(this.controlPoints[i].x=l.x,this.controlPoints[i].y=l.y,this.controlPoints[t].x=s.x,this.controlPoints[t].y=s.y):(this.controlPoints[i].x=s.x,this.controlPoints[i].y=s.y,this.controlPoints[t].x=l.x,this.controlPoints[t].y=l.y)}else 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)),s=this.map.layerPointToLatLng(L.point(t,0));e=new SuperMap.Geometry.Point(o.lng,o.lat),i=new SuperMap.Geometry.Point(s.lng,s.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)),s=this.map.getLonLatFromPixel(new SuperMap.Pixel(t,0)),e=new SuperMap.Geometry.Point(o.lon,o.lat),i=new SuperMap.Geometry.Point(s.lon,s.lat));return SuperMap.Plot.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 s=this.textContent;if(0!==s.length){var l=s.split("\n");s="";for(var n=0,a=0;a<l.length;a++){n++;var r=l[a],p=SuperMap.Plot.PlottingUtil.getTextWidth(this.style,r),u=this.getPixelFromLonLat(t,e),h=this.getPixelFromLonLat(i,o),y=parseFloat(Math.abs(h.x-u.x)),c=parseFloat(Math.abs(u.y-h.y)),S=0;if(this.style.weight?S=parseFloat(this.style.fontSize)+2*this.style.weight+.2*parseFloat(this.style.fontSize)+n:this.style.strokeWidth&&(S=parseFloat(this.style.fontSize)+2*this.style.strokeWidth+.2*parseFloat(this.style.fontSize)+n),S>c)break;if(p>=y){var P=r.split("");r="";var g="",d=P.length;for(let t=0;t<d;t++){if(g+=P[t],SuperMap.Plot.PlottingUtil.getTextWidth(this.style,g)>=y){var f=P[t];if(P[t]="\n",n++,this.style.weight?S=parseFloat(this.style.fontSize)*n+n+2*this.style.weight+.2*parseFloat(this.style.fontSize):this.style.strokeWidth&&(S=parseFloat(this.style.fontSize)*n+n+2*this.style.strokeWidth+.2*parseFloat(this.style.fontSize)),!(S<c)){0===s.length?s=r:(s+="\n",s+=r);break}P[t]+=f,g=f}r+=P[t],t===d-1&&(0===s.length?s=r:(s+="\n",s+=r))}}else 0===s.length?s=r:(s+="\n",s+=r)}if(0!==s.length){var m=this.style.labelAlign,L=0,M=0;"l"===m[0]?L=t:"r"===m[0]?L=i:"c"===m[0]&&(L=(t+i)/2),"t"===m[1]?M=e:"b"===m[1]?M=o:"m"===m[1]&&(M=(e+o)/2);var b=new SuperMap.Geometry.Point(L,M),T={};T.positionPoints=[b],T.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,T.textContent=s,T.style={surroundLineFlag:!1,labelAlign:m},this.components.push(T)}}}addCell(t,e,i,o){if(t&&e){var s={};s.type=t,s.textContent=o,s.positionPoints=e,s.style=null==i?{surroundLineFlag:!1}:i,this.components.push(s)}}addText(t,e,i,o,s){if(t&&e){var l={};l.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,l.textContent=t,l.positionPoints=[e];var n=i/t.length/2;l.style={},l.style.surroundLineFlag=!1,l.style.labelRotation=-o,l.style.fontSize=n,l.style.fontColor=void 0===s?"#000000":s,l.style.fontSizeLimit=!0,l.style.sizeFixed=!1,l.style.labelAlign="cm",l.style.label=t,this.components.push(l)}}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 s=SuperMap.Plot.PlottingUtil.polylineDistance(t),l=SuperMap.Plot.PlottingUtil.getPtsIndexByDistance(s*(i-e),t),n=SuperMap.Plot.PlottingUtil.getPtsIndexByDistance(s*(i+e),t);return o.startIndex=l.index,o.startPt=l.pts,o.endIndex=n.index,o.endPt=n.pts,o}computeDashLine(t,e,i){var o=[],s=SuperMap.Plot.PlottingUtil.polylineDistance(i);if(s<=0)return[];for(var l,n=i[0],a=1,r=0,p=!0,u=!0;r<s;){let s=[];var h;s.push(n),r+=t;var y=SuperMap.Plot.PlottingUtil.getPtsIndexByDistance(r,i);if(h=y.index,l=y.pts,!(p=y.bfind))break;if(a<h)for(let t=a;t<h;t++)s.push(i[t]);s.push(l),o.push(s),r+=e;var c=SuperMap.Plot.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&&SuperMap.Plot.PlottingUtil.equalFuzzy(SuperMap.Plot.PlottingUtil.distance(t[0],t[1]),0)||o.push(t)}if(!u){var S=i[i.length-1],P=SuperMap.Plot.PlottingUtil.distance(l,S);if(P*=.01,!SuperMap.Plot.PlottingUtil.equalFuzzy(P,0)){var g=SuperMap.Plot.PlottingUtil.linePnt(S,l,P);let t=[];t.push(g),t.push(S),o.push(t)}}return o}addArrow(t,e){if(t.length<2)return t;var i,o=SuperMap.Plot.PlottingUtil.polylineDistance(this.controlPoints);void 0===e&&(this.isEdit,e=.5*this.getSubSymbolScaleValue());var s=t.slice();i=o*e;var l,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<SuperMap.Plot.PlottingUtil.distance(n,t[e])){r=e;break}t.splice(r+1,t.length-r),t.push(n)}if(t.length>1){SuperMap.Plot.PlottingUtil.distance(t[t.length-1],t[t.length-2])>a&&(l=SuperMap.Plot.PlottingUtil.getPtsIndexByDistance(a,[t[t.length-1],t[t.length-2]])).bfind&&(t.splice(t.length-1,1),t.push(l.pts)),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,t);var p=t[t.length-1],u=n,h=i;if(void 0===p)return t;var y=SuperMap.Plot.PlottingUtil.radian(p,u)*SuperMap.Plot.PlottingUtil.RTOD,c=SuperMap.Plot.PlottingUtil.circlePoint(u,h,h,y+157.5),S=SuperMap.Plot.PlottingUtil.circlePoint(u,h,h,y+202.5),P={surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0,lineTypeLimit:!0,surroundLineLimit:!0,surroundLineType:SuperMap.Plot.AlgoSurroundLineType.NONE};this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,[c,n,S],P)}else this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,s)}addDovetailArrow(t,e){if(t.length<2)return t;var i,o=SuperMap.Plot.PlottingUtil.polylineDistance(this.controlPoints);void 0===e&&(this.isEdit,e=.5*this.getSubSymbolScaleValue()),i=o*e;var s=t[t.length-1];if(t.length>2){var l=-1;for(let e=t.length-2;e>=0;e--)if(i<SuperMap.Plot.PlottingUtil.distance(s,t[e])){l=e;break}t.splice(l+1,t.length-l),t.push(s)}this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,t);var n=t[t.length-2],a=t[t.length-1],r=i;if(void 0===n)return t;if(!(SuperMap.Plot.PlottingUtil.distance(n,a)<i)){var p=SuperMap.Plot.PlottingUtil.radian(n,a)*SuperMap.Plot.PlottingUtil.RTOD,u=SuperMap.Plot.PlottingUtil.circlePoint(a,r,r,p+157.5),h=SuperMap.Plot.PlottingUtil.circlePoint(a,r,r,p+202.5),y=SuperMap.Plot.PlottingUtil.circlePoint(a,.5*r,.5*r,p+180),c=[];c.push(u),c.push(t[t.length-1]),c.push(h),c.push(y);var S={surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0,lineTypeLimit:!0,surroundLineLimit:!0,surroundLineType:SuperMap.Plot.AlgoSurroundLineType.NONE};this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,c,S)}}getDefaultSubSymbolSize(){var t=0;if(this.map){var e=this.getLonLatFromPixel(0,0),i=this.getLonLatFromPixel(this.subSymbolDefaultPixelSize,0),o=new SuperMap.Geometry.Point(e.lon,e.lat),s=new SuperMap.Geometry.Point(i.lon,i.lat);t=SuperMap.Plot.PlottingUtil.distance(o,s)}if(0===t){if(0!==this.subSymbolSize)return this.subSymbolSize;var l=0;for(let t=0;t<this.controlPoints.length-1;t++)l+=SuperMap.Plot.PlottingUtil.distance(this.controlPoints[t],this.controlPoints[t+1]);t=.3*l}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),s=this.pixelBoundsToLonLat(o);return document.body.removeChild(i),s}calAssistantLine(){var t=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);this.symbolType===SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL&&(t.splice(1,0,new SuperMap.Geometry.Point(this.controlPoints[1].x,this.controlPoints[0].y)),t.push(new SuperMap.Geometry.Point(this.controlPoints[0].x,this.controlPoints[1].y)),t.push(new SuperMap.Geometry.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&&!SuperMap.Plot.PlottingUtil.equalFuzzy(t,0)?t:SuperMap.Plot.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,s,l){if(null==t.symbolData||null==t.symbolData.innerCells)return null;void 0===s&&(s=0),void 0===l&&(l=0);var n=SuperMap.Plot.AnalysisSymbol.analysisSymbolCells(t.symbolData,!0),a=0,r=0,p=0,u=0;for(let t=0;t<n.length;t++){var h=SuperMap.Plot.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 y=new SuperMap.Geometry.Point(a,r),c=new SuperMap.Geometry.Point(p,u),S=(y.y-c.y)/i,P=(y.x-c.x)/i,g=P>S?P:S,d=new SuperMap.Geometry.Point(.5*(y.x+c.x),.5*(y.y+c.y));d.x+=s*(y.x-c.x),d.y+=l*(y.y-c.y);for(let t=0,i=n.length;t<i;t++){for(let i=0,s=n[t].positionPoints.length;i<s;i++)n[t].positionPoints[i].x-=d.x,n[t].positionPoints[i].y-=d.y,n[t].positionPoints[i].x/=g,n[t].positionPoints[i].y/=g,SuperMap.Plot.PlottingUtil.rotateAngle(new SuperMap.Geometry.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===SuperMap.Plot.SymbolType.TEXTSYMBOL&&(n[t].style.fontSize/=10*g,n[t].style.labelRotation=-o,n[t].style.sizeFixed=!1),n[t].isCalculate=!1,n[t].style.surroundLineType=0,n[t].style.surroundLineLimit=!0,this.components.push(n[t])}return n}ComputeZValue(t,e,i){var o=SuperMap.Plot.PlottingUtil.pointProjectToSegment(t,e,i),s=new SuperMap.Geometry.Point(o.projectPoint.x,o.projectPoint.y),l=SuperMap.Plot.PlottingUtil.distance(e,i),n=SuperMap.Plot.PlottingUtil.distance(e,t),a=SuperMap.Plot.PlottingUtil.distance(i,t);if(!o.isOnline){if(n>=l)return i.z;if(a>=l)return e.z}return s.x!=e.x&&e.x!=i.x?e.z+(s.x-e.x)/(e.x-i.x)*(e.z-i.z):s.y!=e.y&&e.y!=i.y?e.z+(s.y-e.y)/(e.y-i.y)*(e.z-i.z):0==(n=SuperMap.Plot.PlottingUtil.distance(e,s))?e.z:e.z-(e.z-i.z)*(n/l)}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 s=SuperMap.Plot.PlottingUtil.polylineDistance(o);if(0==s)return!1;var l=SuperMap.Plot.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=SuperMap.Plot.PlottingUtil.polylineDistance(n)/s,h=l*u,y=SuperMap.Plot.PlottingUtil.getPtsIndexByDistance(h,e),c=y.index,S=y.pts;if(y.bfind){var P=t[L-1].z,g=t[L].z,d=l*(u-r),f=0;for(let t=++a;t<=c;t++){var m=P+(g-P)*((f+=t==a?SuperMap.Plot.PlottingUtil.distance(p,e[t]):SuperMap.Plot.PlottingUtil.distance(e[t-1],e[t]))/d);i.push({x:e[t].x,y:e[t].y,z:m})}a=c}r=u,p=S}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 s=SuperMap.Plot.PlottingUtil.polylineDistance(t);if(0!=s){var l=[];l.push(t[0]),e.push({x:t[0].x,y:t[0].y,z:i});for(let a=1;a<t.length-1;a++){l.push(t[a]);var n=i+(o-i)*SuperMap.Plot.PlottingUtil.polylineDistance(l)/s;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})}};SuperMap.Plot.ArrowLine=class extends SuperMap.Plot.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="SuperMap.Plot.ArrowLine"}calculateParts(){if(this.init(),!(null==this.controlPoints||this.controlPoints.length<this.minEditPts)){var t=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);t=SuperMap.Plot.PlottingUtil.clearSamePts(t);var e=SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(t);e=SuperMap.Plot.PlottingUtil.clearSamePts(e);var i=SuperMap.Plot.PlottingUtil.polylineDistance(e);this.isEdit||(this.scaleValues[0]=.5*this.getSubSymbolScaleValue(i));var o,s=this.scaleValues[0]*i,l=this.arrowAngle*Math.PI/180/2,n=(o=e.length>2?SuperMap.Plot.PlottingUtil.radian(e[e.length-1],e[e.length-2]):SuperMap.Plot.PlottingUtil.radian(e[1],e[0]))-l,a=e[e.length-1].x+s*Math.cos(n),r=e[e.length-1].y+s*Math.sin(n),p=new SuperMap.Geometry.Point(a,r),u=o+l,h=e[e.length-1].x+s*Math.cos(u),y=e[e.length-1].y+s*Math.sin(u),c=new SuperMap.Geometry.Point(h,y),S=[];S.push(p),S.push(e[e.length-1].clone()),S.push(c);var P={surroundLineFlag:!1,fillLimit:!0,lineTypeLimit:!0},g=SuperMap.Plot.PlottingUtil.radian(e[0],e[1]);n=g-l,a=e[0].x+s*Math.cos(n),r=e[0].y+s*Math.sin(n),p=new SuperMap.Geometry.Point(a,r),u=g+l,h=e[0].x+s*Math.cos(u),y=e[0].y+s*Math.sin(u),c=new SuperMap.Geometry.Point(h,y);var d=[];d.push(p),d.push(e[0].clone()),d.push(c);var f=this.scaleValues[1]===SuperMap.Plot.ArrowLineType.DOUBLELINE?SuperMap.Plot.SymbolType.POLYLINESYMBOL:SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,m=this.scaleValues[2]===SuperMap.Plot.ArrowLineType.DOUBLELINE?SuperMap.Plot.SymbolType.POLYLINESYMBOL:SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL;this.scaleValues[1]===SuperMap.Plot.ArrowLineType.DOUBLELINE?this.addCell(f,d,P):this.scaleValues[1]===SuperMap.Plot.ArrowLineType.TRIANGLESOLID&&this.addCell(f,d,P),this.scaleValues[2]===SuperMap.Plot.ArrowLineType.DOUBLELINE?this.addCell(m,S,P):this.scaleValues[2]===SuperMap.Plot.ArrowLineType.TRIANGLESOLID&&this.addCell(m,S,P),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,e),this.finish()}}};SuperMap.Plot.RegularPolygon=class extends SuperMap.Plot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(1),this.CLASS_NAME="SuperMap.Plot.RegularPolygon"}calculateParts(){if(this.init(),!(this.controlPoints.length<this.minEditPts)){var t=SuperMap.Plot.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],s=new SuperMap.Geometry.Point(this.controlPoints[this.controlPoints.length-1].x,this.controlPoints[this.controlPoints.length-1].y);SuperMap.Plot.PlottingUtil.rotateAngle(this.controlPoints[0],i,s),this.scaleValues[0]=SuperMap.Plot.PlottingUtil.distance(t[0],this.calculateMidPt(o,s))/SuperMap.Plot.PlottingUtil.distance(t[0],t[t.length-1])}var l=[],n=this.controlPoints[this.controlPoints.length-1].clone();l.push(n.clone()),n=SuperMap.Plot.PlottingUtil.rotateAngle(this.controlPoints[0],i/2,n);var a=SuperMap.Plot.PlottingUtil.findPointOnLineByRatio(this.scaleValues[0],this.controlPoints[0],n);l.push(a);for(let t=1;t<e;t++)n=SuperMap.Plot.PlottingUtil.rotateAngle(this.controlPoints[0],i/2,n),l.push(n.clone()),n=SuperMap.Plot.PlottingUtil.rotateAngle(this.controlPoints[0],i/2,n),a=SuperMap.Plot.PlottingUtil.findPointOnLineByRatio(this.scaleValues[0],this.controlPoints[0],n),l.push(a);var r=l[1];this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,l,{surroundLineFlag:!1,fill:!1}),this.addScalePoint(r),this.finish()}}calculateMidPt(t,e){return new SuperMap.Geometry.Point((t.x+e.x)/2,(t.y+e.y)/2)}modifyPoint(t,e){if(0===t&&!0===e.isScalePoint){var i=SuperMap.Plot.PlottingUtil.distance(this.controlPoints[0],this.controlPoints[this.controlPoints.length-1]),o=this.scalePoints[0],s=SuperMap.Plot.PlottingUtil.projectPoint(e,this.controlPoints[0],o),l=SuperMap.Plot.PlottingUtil.distance(this.controlPoints[0],s);this.scaleValues[0]=l/i}this.calculateParts()}};SuperMap.Plot.Brace=class extends SuperMap.Plot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(.1),this.scaleValues.push(.1)),this.CLASS_NAME="SuperMap.Plot.Brace"}calculateParts(){this.init();var t=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMap.Plot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e=t[0],i=t[1],o=SuperMap.Plot.PlottingUtil.distance(e,i);this.scaleValues.length<2&&(this.scaleValues=[],this.scaleValues.push(.1),this.scaleValues.push(.1));var s=this.scaleValues[0],l=this.scaleValues[1],n=new SuperMap.Geometry.Point(o*s,o*s),a=new SuperMap.Geometry.Point(o*(.5-l/2),0),r=new SuperMap.Geometry.Point(.5*o,-o*l),p=new SuperMap.Geometry.Point(o*(.5+l/2),0),u=new SuperMap.Geometry.Point(o*(1-s),o*s),h=[],y=180*Math.PI/180,c=270*Math.PI/180,S=3*Math.PI/180;for(let t=y;t<=c;t+=S){let e=new SuperMap.Geometry.Point(n.x+o*s,n.y);e=SuperMap.Plot.PlottingUtil.rotateAngle(n,t,e),h.push(e)}h.push(a),h.push(r),h.push(p),y=270*Math.PI/180,c=360*Math.PI/180;for(let t=y;t<=c;t+=S){let e=new SuperMap.Geometry.Point(u.x+o*s,u.y);e=SuperMap.Plot.PlottingUtil.rotateAngle(u,t,e),h.push(e)}var P=SuperMap.Plot.PlottingUtil.radian(e,i),g=[];for(let t=0;t<h.length;t++){var d=new SuperMap.Geometry.Point(h[t].x+e.x,h[t].y+e.y);d=SuperMap.Plot.PlottingUtil.rotateAngle(e,P,d),g.push(d)}this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,g),this.scalePoints=[];var f=new SuperMap.Geometry.Point(o*s,0),m=new SuperMap.Geometry.Point(f.x+e.x,f.y+e.y);(m=SuperMap.Plot.PlottingUtil.rotateAngle(e,P,m)).isScalePoint=!0,m.tag=0,this.addScalePoint(m);var L=new SuperMap.Geometry.Point(r.x+e.x,r.y+e.y);SuperMap.Plot.PlottingUtil.rotateAngle(e,P,L),L.isScalePoint=!0,L.tag=1,this.addScalePoint(L)}}modifyPoint(t,e){if(!0===e.isScalePoint){var i=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints),o=SuperMap.Plot.PlottingUtil.distance(i[0],i[1]);if(0==t){let t=SuperMap.Plot.PlottingUtil.distance(i[0],e)/o;t>0&&t<.4&&(this.scaleValues[0]=t)}else if(1==t){var s=new SuperMap.Geometry.Point((i[0].x+i[1].x)/2,(i[0].y+i[1].y)/2);let t=SuperMap.Plot.PlottingUtil.distance(e,s)/o;0<t&&.2>t&&(this.scaleValues[1]=t)}}this.calculateParts()}};SuperMap.Plot.Trapezoid=class extends SuperMap.Plot.AlgoSymbol{constructor(t){super(t),this.CLASS_NAME="SuperMap.Plot.Trapezoid"}calculateParts(){this.init();var t=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMap.Plot.PlottingUtil.clearSamePts(t)).length>=2&&t.length<this.minEditPts&&this.calAssistantLine(),!(t.length<this.minEditPts)){var e=[],i=t[0],o=t[1],s=t[2],l=new SuperMap.Geometry.Point(0,0);this.GetPointsByTrapezoid(1,s,o,i,l),e.push(i),e.push(o),e.push(s),e.push(l);var n=SuperMap.Plot.PlottingUtil.intersectLines(i,o,s,l),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]=l,e[3]=i),4==e.length&&this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,e)}}GetPointsByTrapezoid(t,e,i,o,s){var l=e.x,n=e.y,a=i.x,r=i.y,p=o.x,u=o.y,h=0,y=0,c=0,S=0;if(SuperMap.Plot.PlottingUtil.equalFuzzy(Math.abs(n-r),0))h=l+a-p,y=u;else if(SuperMap.Plot.PlottingUtil.equalFuzzy(Math.abs(l-a),0))h=p,y=n+r-u;else{var P=1*(n-r)/(l-a),g=u-P*p;y=P*(h=((r+n)/2+(l+a)/(2*P)-g)/(P+1/P))+g,h=2*h-p,y=2*y-u}var d=Math.sqrt(1*(l-a)*(l-a)+1*(n-r)*(n-r)),f=Math.sqrt(1*(l-h)*(l-h)+1*(n-y)*(n-y));d>0?(c=l+(a-l)*f/d,S=n+(r-n)*f/d):(c=l,S=n);var m=c+(h-c)*t,L=S+(y-S)*t;s.x=m,s.y=L}};SuperMap.Plot.GeoTooltipBox=class extends SuperMap.Plot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.126),this.CLASS_NAME="SuperMap.Plot.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,s,l,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?(s=this.controlPoints[0].y,i=this.controlPoints[1].y):(s=this.controlPoints[1].y,i=this.controlPoints[0].y),l=this.controlPoints[2].x,n=this.controlPoints[2].y;var a=0,r=(i-s)/(o-e);a=l<e?n>i?Math.abs((n-i)/(l-e))>r?2:1:n<s&&Math.abs((n-s)/(l-e))>r?4:1:l>o?n>i?Math.abs((n-i)/(l-o))>r?2:3:n<s&&Math.abs((n-s)/(l-o))>r?4:3:n>i?2:n<s?4:0,this.scalePoints=[];var p=[];switch(p.push(new SuperMap.Geometry.Point(e,s)),p.push(new SuperMap.Geometry.Point(e,i)),p.push(new SuperMap.Geometry.Point(o,i)),p.push(new SuperMap.Geometry.Point(o,s)),a){case 0:break;case 1:this.addScalePoint(new SuperMap.Geometry.Point(e,i-(i-s)*t)),p.splice(a,0,new SuperMap.Geometry.Point(e,i-(i-s)*t)),p.splice(a,0,this.controlPoints[2].clone()),p.splice(a,0,new SuperMap.Geometry.Point(e,s+(i-s)*t));break;case 2:this.addScalePoint(new SuperMap.Geometry.Point(o-(o-e)*t,i)),p.splice(a,0,new SuperMap.Geometry.Point(o-(o-e)*t,i)),p.splice(a,0,this.controlPoints[2].clone()),p.splice(a,0,new SuperMap.Geometry.Point(e+(o-e)*t,i));break;case 3:this.addScalePoint(new SuperMap.Geometry.Point(o,i-(i-s)*t)),p.splice(a,0,new SuperMap.Geometry.Point(o,s+(i-s)*t)),p.splice(a,0,this.controlPoints[2].clone()),p.splice(a,0,new SuperMap.Geometry.Point(o,i-(i-s)*t));break;case 4:this.addScalePoint(new SuperMap.Geometry.Point(o-(o-e)*t,s)),p.splice(a,0,new SuperMap.Geometry.Point(e+(o-e)*t,s)),p.splice(a,0,this.controlPoints[2].clone()),p.splice(a,0,new SuperMap.Geometry.Point(o-(o-e)*t,s))}this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,p),this.annotationContent(e,i,o,s)}this.finish()}}modifyPoint(t,e){if(!0===e.isScalePoint&&0==t){var i,o,s,l,n,a,r=this.scalePoints[0];this.controlPoints[0].x<this.controlPoints[1].x?(i=this.controlPoints[0].x,s=this.controlPoints[1].x):(i=this.controlPoints[1].x,s=this.controlPoints[0].x),this.controlPoints[0].y<this.controlPoints[1].y?(l=this.controlPoints[0].y,o=this.controlPoints[1].y):(l=this.controlPoints[1].y,o=this.controlPoints[0].y),n=this.controlPoints[2].x,a=this.controlPoints[2].y;var p=(o-l)/(s-i),u=.25;switch(n<i?a>o?Math.abs((a-o)/(n-i))>p?2:1:a<l&&Math.abs((a-l)/(n-i))>p?4:1:n>s?a>o?Math.abs((a-o)/(n-s))>p?2:3:a<l&&Math.abs((a-l)/(n-s))>p?4:3:a>o?2:a<l?4:0){case 1:case 3:var h=r.y+(e.y-r.y);h>o&&(h=o),h<(o+l)/2&&(h=(o+l)/2),u=1-2*(o-h)/(o-l);break;case 2:case 4:var y=r.x+(e.x-r.x);y>s&&(y=s),y<(i+s)/2&&(y=(i+s)/2),u=1-2*(s-y)/(s-i)}u<0&&(u=0),u>1&&(u=1),this.scaleValues[0]=u}this.calculateParts()}};SuperMap.Plot.GeoTooltipBoxM=class extends SuperMap.Plot.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="SuperMap.Plot.GeoTooltipBoxM"}destroy(){super.destory()}calculateParts(){this.init();var t=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMap.Plot.PlottingUtil.clearSamePts(t)).length>=this.minEditPts){var e,i,o,s;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?(s=t[0].y,i=t[1].y):(s=t[1].y,i=t[0].y),this.scalePoints=[];var l=[];l.push(new SuperMap.Geometry.Point(e,s)),l.push(new SuperMap.Geometry.Point(e,i)),l.push(new SuperMap.Geometry.Point(o,i)),l.push(new SuperMap.Geometry.Point(o,s)),this.isEdit||(this.scaleValues[0]=e,this.scaleValues[1]=s-.3*(i-s),this.scaleValues[2]=e+.5*(o-e),this.scaleValues[3]=s-.3*(i-s));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,s)),a.push(new SuperMap.Geometry.Point(this.scaleValues[2*t],this.scaleValues[2*t+1]));var r,p,u,h,y=a.length,c=[],S=[],P=[],g=[],d=[];for(let t=0;t<n.length;t++)0===n[t]&&c.push(a[t]),1===n[t]&&S.push(a[t]),2===n[t]&&P.push(a[t]),3===n[t]&&g.push(a[t]),4===n[t]&&d.push(a[t]);var f=n.slice();f.sort();var m=new SuperMap.Geometry.Point(0,0);if(f[0]===f[f.length-1]&&0!==f[0]){var L=[];switch(f[0]){case 0:break;case 1:r=1/(2*S.length+1);var M=new SuperMap.Geometry.Point;for(let t=0;t<2*S.length;t++)M=new SuperMap.Geometry.Point(e,s+(i-s)*r*(t+1)),L.unshift(M);break;case 2:p=1/(2*P.length+1);var b=new SuperMap.Geometry.Point;for(let t=0;t<2*P.length;t++)b=new SuperMap.Geometry.Point(e+(o-e)*p*(t+1),i),L.unshift(b);break;case 3:u=1/(2*g.length+1);var T=new SuperMap.Geometry.Point;for(let t=0;t<2*g.length;t++)T=new SuperMap.Geometry.Point(o,s+(i-s)*u*(t+1)),L.push(T);break;case 4:h=1/(2*d.length+1);var v=new SuperMap.Geometry.Point;for(let t=0;t<2*d.length;t++)v=new SuperMap.Geometry.Point(e+(o-e)*h*(t+1),s),L.push(v)}for(let t=0;t<y;t++)for(let e=0;e<y;e++){let i=SuperMap.Plot.PlottingUtil.intersectLineSegs(L[2*t+1],a[t],L[2*e],a[e],m);if(i&&SuperMap.Plot.PlottingUtil.equalFuzzy(m.x,L[2*t+1].x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(m.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<y;t++)l.splice(f[0],0,L[2*t]),l.splice(f[0],0,a[t]),l.splice(f[0],0,L[2*t+1])}else{var A,x,_=[],O=[],w=[],I=[];for(let t=0;t<n.length;t++)switch(n[t]){case 0:break;case 1:r=1/(2*S.length+1);for(let t=0;t<2*S.length;t++){var D=new SuperMap.Geometry.Point(e,s+(i-s)*r*(t+1));_.unshift(D)}for(let t=0;t<S.length;t++)for(let e=1;e<S.length;e++)(A=SuperMap.Plot.PlottingUtil.intersectLineSegs(_[2*t+1],S[t],_[2*e],S[e],m))&&SuperMap.Plot.PlottingUtil.equalFuzzy(m.x,_[2*t+1].x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(m.y,_[2*t+1].y)&&(A=!1),A&&(x=S[e].clone(),S[e]=S[t],S[t]=x);break;case 2:p=1/(2*P.length+1);for(let t=0;t<2*P.length;t++){var E=new SuperMap.Geometry.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++)(A=SuperMap.Plot.PlottingUtil.intersectLineSegs(O[2*t+1],P[t],O[2*e],P[e],m))&&SuperMap.Plot.PlottingUtil.equalFuzzy(m.x,O[2*t+1].x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(m.y,O[2*t+1].y)&&(A=!1),A&&(x=P[e].clone(),P[e]=P[t],P[t]=x);break;case 3:u=1/(2*g.length+1);for(let t=0;t<2*g.length;t++){var C=new SuperMap.Geometry.Point(o,s+(i-s)*u*(t+1));w.push(C)}for(let t=0;t<g.length;t++)for(let e=1;e<g.length;e++)(A=SuperMap.Plot.PlottingUtil.intersectLineSegs(w[2*t+1],g[t],w[2*e],g[e],m))&&SuperMap.Plot.PlottingUtil.equalFuzzy(m.x,w[2*t+1].x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(m.y,w[2*t+1].y)&&(A=!1),A&&(x=g[e].clone(),g[e]=g[t],g[t]=x);break;case 4:h=1/(2*d.length+1);for(let t=0;t<2*d.length;t++){var N=new SuperMap.Geometry.Point(e+(o-e)*h*(t+1),s);I.push(N)}for(let t=0;t<d.length;t++)for(let e=1;e<d.length;e++)(A=SuperMap.Plot.PlottingUtil.intersectLineSegs(I[2*t+1],d[t],I[2*e],d[e],m))&&SuperMap.Plot.PlottingUtil.equalFuzzy(m.x,I[2*t+1].x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(m.y,I[2*t+1].y)&&(A=!1),A&&(x=d[e].clone(),d[e]=d[t],d[t]=x)}for(let t=0;t<d.length;t++)l.splice(4,0,I[2*t]),l.splice(4,0,d[t]),l.splice(4,0,I[2*t+1]);for(let t=0;t<g.length;t++)l.splice(3,0,w[2*t]),l.splice(3,0,g[t]),l.splice(3,0,w[2*t+1]);for(let t=0;t<P.length;t++)l.splice(2,0,O[2*t]),l.splice(2,0,P[t]),l.splice(2,0,O[2*t+1]);for(let t=0;t<S.length;t++)l.splice(1,0,_[2*t]),l.splice(1,0,S[t]),l.splice(1,0,_[2*t+1])}for(let t=0;t<a.length;t++)this.addScalePoint(a[t],t)}this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,l),this.annotationContent(e,i,o,s),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,s,l){var n=(o-l)/(s-i);return t<i?e>o?Math.abs((e-o)/(t-i))>n?2:1:e<l&&Math.abs((e-l)/(t-i))>n?4:1:t>s?e>o?Math.abs((e-o)/(t-s))>n?2:3:e<l&&Math.abs((e-l)/(t-s))>n?4:3:e>o?2:e<l?4:0}};SuperMap.Plot.SymbolTextBox=class extends SuperMap.Plot.AlgoSymbol{constructor(t){super(t),this.roundBox=!!t.roundBox&&t.roundBox,this.textBoxType=t.textBoxType?t.textBoxType:SuperMap.Plot.TextBoxType.WITHTIPBOX,0===this.scaleValues.length&&(this.scaleValues.push(.126),this.scaleValues.push(0),this.scaleValues.push(0)),this.CLASS_NAME="SuperMap.Plot.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,s;this.scalePoints=[];var l=[];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?(s=this.controlPoints[0].y,i=this.controlPoints[1].y):(s=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),y=Math.max(i,s),c=Math.min(i,s),S=.1*Math.min(Math.abs(e-o),Math.abs(i-s)),P=new SuperMap.Geometry.Point(h+S,c+S),g=new SuperMap.Geometry.Point(h+S,y-S),d=new SuperMap.Geometry.Point(u-S,y-S),f=new SuperMap.Geometry.Point(u-S,c+S),m=this.calculateArc(P,S,3*Math.PI/2,Math.PI,-1,180),L=this.calculateArc(g,S,Math.PI,Math.PI/2,-1,180),M=this.calculateArc(d,S,Math.PI/2,0,-1,180),b=this.calculateArc(f,S,2*Math.PI,3*Math.PI/2,-1,180);n=m.length,a=m.length+L.length,r=m.length+L.length+M.length,p=m.length+L.length+M.length+b.length,l=m.concat(L,M,b)}else l.push(new SuperMap.Geometry.Point(e,s)),l.push(new SuperMap.Geometry.Point(e,i)),l.push(new SuperMap.Geometry.Point(o,i)),l.push(new SuperMap.Geometry.Point(o,s));this.isEdit||(this.scaleValues[1]=e+.1*(o-e),this.scaleValues[2]=s+-.3*(i-s));var T=new SuperMap.Geometry.Point(this.scaleValues[1],this.scaleValues[2]),v=this.getAction(this.scaleValues[1],this.scaleValues[2],e,i,o,s);if(this.textBoxType===SuperMap.Plot.TextBoxType.WITHTIPBOX)switch(this.addScalePoint(T,0),v){case 0:break;case 1:this.addScalePoint(new SuperMap.Geometry.Point(e,i-(i-s)*t)),l.splice(n,0,new SuperMap.Geometry.Point(e,i-(i-s)*t)),l.splice(n,0,T),l.splice(n,0,new SuperMap.Geometry.Point(e,s+(i-s)*t));break;case 2:this.addScalePoint(new SuperMap.Geometry.Point(o-(o-e)*t,i)),l.splice(a,0,new SuperMap.Geometry.Point(o-(o-e)*t,i)),l.splice(a,0,T),l.splice(a,0,new SuperMap.Geometry.Point(e+(o-e)*t,i));break;case 3:this.addScalePoint(new SuperMap.Geometry.Point(o,i-(i-s)*t)),l.splice(r,0,new SuperMap.Geometry.Point(o,s+(i-s)*t)),l.splice(r,0,T),l.splice(r,0,new SuperMap.Geometry.Point(o,i-(i-s)*t));break;case 4:this.addScalePoint(new SuperMap.Geometry.Point(o-(o-e)*t,s)),l.splice(p,0,new SuperMap.Geometry.Point(e+(o-e)*t,s)),l.splice(p,0,T),l.splice(p,0,new SuperMap.Geometry.Point(o-(o-e)*t,s))}0!==l.length&&(this.textBoxType===SuperMap.Plot.TextBoxType.NONEBOX?this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,l,{surroundLineFlag:!1,weight:0,lineWidthLimit:!0}):this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,l))}else this.controlPoints.length>=2&&this.controlPoints.length<this.minEditPts&&this.addCell(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,this.controlPoints);this.annotationContent(e,i,o,s),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,s,l,n,a,r=this.scalePoints[0];this.controlPoints[0].x<this.controlPoints[1].x?(i=this.controlPoints[0].x,s=this.controlPoints[1].x):(i=this.controlPoints[1].x,s=this.controlPoints[0].x),this.controlPoints[0].y<this.controlPoints[1].y?(l=this.controlPoints[0].y,o=this.controlPoints[1].y):(l=this.controlPoints[1].y,o=this.controlPoints[0].y),n=this.scaleValues[1],a=this.scaleValues[2];var p=(o-l)/(s-i),u=.25;switch(n<i?a>o?Math.abs((a-o)/(n-i))>p?2:1:a<l&&Math.abs((a-l)/(n-i))>p?4:1:n>s?a>o?Math.abs((a-o)/(n-s))>p?2:3:a<l&&Math.abs((a-l)/(n-s))>p?4:3:a>o?2:a<l?4:0){case 1:case 3:var h=r.y+(e.y-r.y);h>o&&(h=o),h<(o+l)/2&&(h=(o+l)/2),u=1-2*(o-h)/(o-l);break;case 2:case 4:var y=r.x+(e.x-r.x);y>s&&(y=s),y<(i+s)/2&&(y=(i+s)/2),u=1-2*(s-y)/(s-i)}u<0&&(u=0),u>1&&(u=1),this.scaleValues[0]=u}this.calculateParts()}calculateArc(t,e,i,o,s,l){(!s||1!=s&&-1!=s)&&(s=-1),l||(l=360);var n=Math.PI/l/2,a=n*s,r=Math.abs(o-i),p=[];for(let o=i,s=0;s<r;s+=n){var u=new SuperMap.Geometry.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,s,l){var n=(o-l)/(s-i);return t<i?e>o?Math.abs((e-o)/(t-i))>n?2:1:e<l&&Math.abs((e-l)/(t-i))>n?4:1:t>s?e>o?Math.abs((e-o)/(t-s))>n?2:3:e<l&&Math.abs((e-l)/(t-s))>n?4:3:e>o?2:e<l?4:0}};SuperMap.Plot.ConcentricCircle=class extends SuperMap.Plot.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="SuperMap.Plot.ConcentricCircle"}calculateParts(){this.init();var t=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if(!(null==(t=SuperMap.Plot.PlottingUtil.clearSamePts(t))||t.length<2)){for(2==t.length&&t.push(t[1].clone());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;var e=SuperMap.Plot.PlottingUtil.distance(t[0],t[1]),i=SuperMap.Plot.PlottingUtil.distance(t[0],t[2]),o=[],s=[],l=Math.PI/180,n=(this.scaleValues[1]-this.scaleValues[0])/72;for(let h=this.scaleValues[0];h<this.scaleValues[1]+n/2;h+=n){var a=t[0].x+e*Math.cos(h*l),r=t[0].y+e*Math.sin(h*l),p=t[0].x+i*Math.cos(h*l),u=t[0].y+i*Math.sin(h*l);o.push(new SuperMap.Geometry.Point(a,r)),s.push(new SuperMap.Geometry.Point(p,u))}var h=[];for(let t=0;t<o.length;t++)h.push(o[t]);for(let t=s.length-1;t>=0;t--)h.push(s[t]);this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,h,{surroundLineFlag:!1,lineWidthLimit:!0,weight:0,strokeWidth:0}),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,o),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,s);var y=t[0].x+e/2*Math.cos(this.scaleValues[0]*l),c=t[0].y+e/2*Math.sin(this.scaleValues[0]*l),S=t[0].x+i/2*Math.cos(this.scaleValues[1]*l),P=t[0].y+i/2*Math.sin(this.scaleValues[1]*l),g=new SuperMap.Geometry.Point(y,c);g.isScalePoint=!0,g.tag=0,this.addScalePoint(g);var d=new SuperMap.Geometry.Point(S,P);d.isScalePoint=!0,d.tag=1,this.addScalePoint(d)}}modifyPoint(t,e){if(!0===e.isScalePoint){for(var i=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints),o=180*SuperMap.Plot.PlottingUtil.radian(i[0],e)/Math.PI;o>360;)o-=360;for(;o<0;)o+=360;0==t?this.scaleValues[0]=o:1==t&&(this.scaleValues[1]=o)}this.calculateParts()}};SuperMap.Plot.CombinationalCircle=class extends SuperMap.Plot.AlgoSymbol{constructor(t){super(t),this.angleRange=[],this.defaultRadius=t.defaultRadius?t.defaultRadius:60,this.CLASS_NAME="SuperMap.Plot.CombinationalCircle"}calculateParts(){if(this.init(),this.controlPoints=SuperMap.Plot.PlottingUtil.clearSamePts(this.controlPoints),!(null==this.controlPoints||this.controlPoints.length<1)){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=SuperMap.Plot.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=SuperMap.Plot.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,s,l;0==u?(l=t,o=SuperMap.Plot.PlottingUtil.radian(e[t],e[p])*SuperMap.Plot.PlottingUtil.RTOD,s=Math.acos((i*i+this.scaleValues[t]*this.scaleValues[t]-this.scaleValues[p]*this.scaleValues[p])/(2*i*this.scaleValues[t]))*SuperMap.Plot.PlottingUtil.RTOD):(l=p,o=SuperMap.Plot.PlottingUtil.radian(e[p],e[t])*SuperMap.Plot.PlottingUtil.RTOD,s=Math.acos((i*i+this.scaleValues[p]*this.scaleValues[p]-this.scaleValues[t]*this.scaleValues[t])/(2*i*this.scaleValues[p]))*SuperMap.Plot.PlottingUtil.RTOD);var n=o-s,a=o+s,r=n<0&&a>0||n>360||a>360;n=this.adjustAngle(n),a=this.adjustAngle(a);for(let t=this.angleRange[l].length-1;t>=0;t--)if(r){if(a>this.angleRange[l][t].End||SuperMap.Plot.PlottingUtil.equalFuzzy(a,this.angleRange[l][t].End)){this.angleRange[l].splice(t,1);continue}if(a>this.angleRange[l][t].Start&&(this.angleRange[l][t].Start=a),n<this.angleRange[l][t].Start||SuperMap.Plot.PlottingUtil.equalFuzzy(n,this.angleRange[l][t].Start)){this.angleRange[l].splice(t,1);continue}n<this.angleRange[l][t].End&&(this.angleRange[l][t].End=n)}else if(n<this.angleRange[l][t].Start&&a>this.angleRange[l][t].End)this.angleRange[l].splice(t,1);else if(n>this.angleRange[l][t].Start&&a<this.angleRange[l][t].End)this.angleRange[l].push({Start:this.angleRange[l][t].Start,End:n}),this.angleRange[l].push({Start:a,End:this.angleRange[l][t].End}),this.angleRange[l].splice(t,1);else{if(n>this.angleRange[l][t].End)continue;if(n>this.angleRange[l][t].Start&&(this.angleRange[l][t].End=n),a<this.angleRange[l][t].Start)continue;a<this.angleRange[l][t].End&&(this.angleRange[l][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(SuperMap.Plot.SymbolType.CIRCLESYMBOL,[e[t],new SuperMap.Geometry.Point(e[t].x,e[t].y+this.scaleValues[t])]);else{var y=[],c=(h-u)/72;for(let i=u;i<h+c/2;i+=c){var S=e[t].x+this.scaleValues[t]*Math.cos(i*SuperMap.Plot.PlottingUtil.DTOR),P=e[t].y+this.scaleValues[t]*Math.sin(i*SuperMap.Plot.PlottingUtil.DTOR);y.push(new SuperMap.Geometry.Point(S,P))}this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,y),p.push(y)}}for(var g=[];0!==p.length;){var d=p[0];p.splice(0,1),void 0!==(d=this.generatePolygon(p,d))&&g.push(d)}var f=[];for(let t=0;t<g.length;t++)f.push(g[t]);for(let t=f.length-1;t>=0;t--)for(let e=0;e<f[t].length;e++){for(let i in f)if(parseInt(i)!==t){var m=f[i];if(SuperMap.Plot.PlottingUtil.ptIsInPolygon(m,f[t][e])){var L=t,M=parseInt(i);f[M].push(f[M][0]),f[L].push(f[L][0]),f[M]=f[M].concat(f[L]),f.splice(L,1);break}}if(!isNaN(L)&&!isNaN(M))break}for(let t=0;t<f.length;t++){var b={type:SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,positionPoints:f[t],style:{surroundLineFlag:!1,lineWidthLimit:!0,weight:0,strokeWidth:0}};this.components.splice(0,0,b)}for(let t=0;t<e.length;t++){var T=new SuperMap.Geometry.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||SuperMap.Plot.PlottingUtil.equalFuzzy(e[0].x,e[e.length-1].x,1e-7)&&SuperMap.Plot.PlottingUtil.equalFuzzy(e[0].y,e[e.length-1].y,1e-7))return e;var i,o=e[e.length-1];for(let s=0;s<t.length;s++)if(SuperMap.Plot.PlottingUtil.equalFuzzy(t[s][0].x,o.x,1e-7)&&SuperMap.Plot.PlottingUtil.equalFuzzy(t[s][0].y,o.y,1e-7)){if(e=e.concat(t[s]),t.splice(s,1),void 0!==(i=this.generatePolygon(t,e))&&0!==i.length)return i}else if(SuperMap.Plot.PlottingUtil.equalFuzzy(t[s][t[s].length-1].x,o.x,1e-7)&&SuperMap.Plot.PlottingUtil.equalFuzzy(t[s][t[s].length-1].y,o.y,1e-7)){for(let i=t[s].length-1;i>=0;i--)e.push(t[s][i]);if(t.splice(s,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=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints),o=SuperMap.Plot.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}};SuperMap.Plot.FreeCurve=class extends SuperMap.Plot.AlgoSymbol{constructor(t){super(t),this.CLASS_NAME="SuperMap.Plot.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),s=this.reSample(this.controlPoints,o/50);s.length<3&&(s=this.controlPoints),this.controlPoints=[],this.controlPoints=this.controlPoints.concat(s)}var l=SuperMap.Plot.PlottingUtil.computeBeizerPoints(this.isEdit,this.controlPoints,this.scaleValues);l.scalePoints=SuperMap.Plot.PlottingUtil.clearSamePts(l.scalePoints),l.scaleValues=SuperMap.Plot.PlottingUtil.clearSamePts(l.scaleValues),this.scaleValues=l.scaleValues;for(let t=0,e=l.scalePoints.length;t<e;t++){var n=l.scalePoints[t];n.isScalePoint=!0,n.tag=t,this.addScalePoint(n)}t=SuperMap.Plot.PlottingUtil.clonePoints(l.beizerPoints)}this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,t)}}modifyPoint(t,e){if(!0===e.isScalePoint){if(t<0||t>2*this.controlPoints.length-1)return;var i=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if(2>i.length)return;var o=SuperMap.Plot.PlottingUtil.polylineDistance(i),s=-1;s=t%2==0?Math.floor(t/2):Math.floor((t+1)/2);var l=(e.x-i[s].x)/o,n=(e.y-i[s].y)/o;this.scaleValues[2*t]=l,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 s=new SuperMap.Geometry.Point(0,0),l=0,n=0,a=0,r=2*Math.PI;s=t[0],i.push(s);var p=!1,u=!1,h=!1;for(let P=1;P<o;P++)if(n=Math.sqrt((t[P].y-s.y)*(t[P].y-s.y)+(t[P].x-s.x)*(t[P].x-s.x)),SuperMap.Plot.PlottingUtil.equalFuzzy(0,n))p&&(s=t[P-1],P--,i.push(s),a=0,r=2*Math.PI,p=!1,u=!1,h=!1);else{var y=(t[P].x-s.x)/n,c=(t[P].y-s.y)/n;if(l=c>0||SuperMap.Plot.PlottingUtil.equalFuzzy(0,c)?Math.acos(y):2*Math.PI-Math.acos(y),r>2*Math.PI&&l+2*Math.PI<r?(l+=2*Math.PI,a<0&&(a+=2*Math.PI)):a<0&&l-2*Math.PI>a&&(l-=2*Math.PI,r>2*Math.PI&&(r-=2*Math.PI)),l>a&&l<r||SuperMap.Plot.PlottingUtil.equalFuzzy(0,l-a)||SuperMap.Plot.PlottingUtil.equalFuzzy(0,l-r)){var S=Math.atan(e/n);u?a<l-S&&(a=l-S):(u=!0,a=l-S),h?r>l+S&&(r=l+S):(h=!0,r=l+S),p=!0}else s=t[P-1],P--,i.push(s),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 s=t,l=o,n=!1;SuperMap.Plot.PlottingUtil.equalFuzzy(s[0].x,s[l-1].x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(s[0].y,s[l-1].y);){if((l-=1)<=0)return i;n=!0}var a,r,p=[];for(a=0;a<l;a++)p.push(0);for(p[0]=1,p[l-1]=1,r=0,a=1;a<l-1;a++)if(SuperMap.Plot.PlottingUtil.distance(s[r],s[a])>1e-10&&SuperMap.Plot.PlottingUtil.distance(s[r],s[a+1])>1e-10){var u=180*SuperMap.Plot.PlottingUtil.InnerAngle(s[a],s[r],s[a+1])/Math.PI;u>e&&u<180-e&&(p[a]=1,r++)}var h=0;for(a=0;a<l;a++)1==p[a]&&h++;if(h>0){for(n&&h++,i=[],r=0,a=0;a<l;a++)1==p[a]&&(i[r++]=s[a]);return n&&(i[r]=i[0]),i}return i}};SuperMap.Plot.NodeChain=class extends SuperMap.Plot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(0),this.scaleValues[1]=.1),this.CLASS_NAME="SuperMap.Plot.NodeChain"}destroy(){super.destroy()}calculateParts(){if(this.init(),this.controlPoints&&null!==this.controlPoints){var t=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMap.Plot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,t),this.isEdit||(this.scaleValues[1]=.25*this.getSubSymbolScaleValue());var e=SuperMap.Plot.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 s=new SuperMap.Geometry.Point(t[e].x,t[e].y+i);this.computeSubSymbol(this.subSymbols[0],s,2*o,0)}else this.addCircles(t,i,o);else this.addCircles(t,i,o);var l=new SuperMap.Geometry.Point(t[0].x,t[0].y+i);this.addScalePoint(l);var n=SuperMap.Plot.PlottingUtil.circlePoint(l,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 s=new SuperMap.Geometry.Point(t[n].x,t[n].y+e),l=this.getCirclePts(s,i);this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,l,o)}}getCirclePts(t,e){var i=[];for(let s=0;s<=360;s+=12){var o=SuperMap.Plot.PlottingUtil.circlePoint(t,e,e,s);i.push(o)}return i}modifyPoint(t,e){if(!0===e.isScalePoint){var i=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if((i=SuperMap.Plot.PlottingUtil.clearSamePts(i)).length<this.minEditPts)return;var o=SuperMap.Plot.PlottingUtil.polylineDistance(i);if(0===t)this.scaleValues[0]=(e.y-i[0].y)/o;else if(1===t){var s=SuperMap.Plot.PlottingUtil.distance(e,i[0]);this.scaleValues[1]=s/o}}this.calculateParts()}};SuperMap.Plot.Runway=class extends SuperMap.Plot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.2),this.CLASS_NAME="SuperMap.Plot.Runway"}destroy(){super.destroy()}calculateParts(){if(this.init(),this.controlPoints.length>=this.minEditPts){var t=this.controlPoints[0],e=this.controlPoints[1],i=SuperMap.Plot.PlottingUtil.distance(t,e),o=this.scaleValues[0]*i,s=SuperMap.Plot.PlottingUtil.parallel(this.controlPoints,o/2),l=SuperMap.Plot.PlottingUtil.parallel(this.controlPoints,-o/2),n=180*SuperMap.Plot.PlottingUtil.radian(t,e)/Math.PI,a=[];for(let e=n+90;e<=n+270;e+=10){var r=SuperMap.Plot.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=SuperMap.Plot.PlottingUtil.circlePoint(e,o/2,o/2,t);p.push(u)}var h=[];(h=(h=(h=(h=h.concat(a)).concat(l)).concat(p)).concat(s)).push(h[0]),this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,h);var y=new SuperMap.Geometry.Point(a[0].x,a[0].y);this.addScalePoint(y)}}modifyPoint(t,e){if(!0===e.isScalePoint&&0==t){var i=SuperMap.Plot.PlottingUtil.distance(e,this.controlPoints[0]),o=SuperMap.Plot.PlottingUtil.distance(this.controlPoints[0],this.controlPoints[1]);this.scaleValues[0]=2*i/o}this.calculateParts()}};SuperMap.Plot.CurveEight=class extends SuperMap.Plot.AlgoSymbol{constructor(t){super(t),this.CLASS_NAME="SuperMap.Plot.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=SuperMap.Plot.PlottingUtil.distance(t,e)/2,o=180*SuperMap.Plot.PlottingUtil.radian(t,e)/Math.PI,s=new SuperMap.Geometry.Point((t.x+e.x)/2,(t.y+e.y)/2),l=SuperMap.Plot.PlottingUtil.circlePoint(s,i,i,o+90),n=SuperMap.Plot.PlottingUtil.circlePoint(s,3*i,3*i,o+90);this.addCell(SuperMap.Plot.SymbolType.CIRCLESYMBOL,[l,new SuperMap.Geometry.Point(l.x+i,l.y)]),this.addCell(SuperMap.Plot.SymbolType.CIRCLESYMBOL,[n,new SuperMap.Geometry.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=SuperMap.Plot.PlottingUtil.isRight(r,n,a)?180*SuperMap.Plot.PlottingUtil.radian(a,n)/Math.PI+90:180*SuperMap.Plot.PlottingUtil.radian(n,a)/Math.PI+90;let u=SuperMap.Plot.PlottingUtil.distance(n,a)/2,h=new SuperMap.Geometry.Point((n.x+a.x)/2,(n.y+a.y)/2),y=SuperMap.Plot.PlottingUtil.circlePoint(h,u,u,p),c=SuperMap.Plot.PlottingUtil.plumbLineLen(r,n,a);if(c<=4*u){var t=SuperMap.Plot.PlottingUtil.circlePoint(h,3*u,3*u,p);this.addCell(SuperMap.Plot.SymbolType.CIRCLESYMBOL,[y,new SuperMap.Geometry.Point(y.x+u,y.y)]),this.addCell(SuperMap.Plot.SymbolType.CIRCLESYMBOL,[t,new SuperMap.Geometry.Point(t.x+u,t.y)])}else{let t=SuperMap.Plot.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,S=p-180-n+360;var e=[];for(let t=p+n-360;t<=a;t+=4){let i=SuperMap.Plot.PlottingUtil.circlePoint(y,u,u,t);e.push(i)}var i=SuperMap.Plot.PlottingUtil.circlePoint(y,u,u,a);e.push(i);var o=[];for(let e=r;e<S;e+=4){let i=SuperMap.Plot.PlottingUtil.circlePoint(t,u,u,e);o.push(i)}var s=SuperMap.Plot.PlottingUtil.circlePoint(t,u,u,S);o.push(s);var l=[];l=l.concat(e);for(let t=o.length-1;t>=0;t--)l.push(o[t]);this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,l)}}}};SuperMap.Plot.PathText=class extends SuperMap.Plot.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.CLASS_NAME="SuperMap.Plot.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?SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(this.controlPoints):SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints),this.relLineText===SuperMap.Plot.RelLineText.ONBOTHLINE){this.relLineText=SuperMap.Plot.RelLineText.ONRIGHTLINE;var e=this.getTextPathPts(t,!1);this.computeText(e,this.textContent[0],t),this.relLineText=SuperMap.Plot.RelLineText.ONLEFTLINE;var i=this.showPathLine;this.showPathLine=!1;var o=this.getTextPathPts(t,!0);this.textContent.length>1?this.computeText(o,this.textContent[1],t):this.computeText(o,this.textContent[0],t),this.relLineText=SuperMap.Plot.RelLineText.ONBOTHLINE,this.showPathLine=i}else{var s=[];s=this.relLineText===SuperMap.Plot.RelLineText.ONRIGHTLINE?this.getTextPathPts(t,!1):this.relLineText===SuperMap.Plot.RelLineText.ONLEFTLINE?this.getTextPathPts(t,!0):t,this.computeText(s,this.textContent[0],t)}this.finish()}}getTextPathPts(t,e){t=SuperMap.Plot.PlottingUtil.clearSamePts(t);var i=this.getLonLatDistanceFromPixel(this.textToLineDistance);if(0>=i)return SuperMap.Plot.PlottingUtil.clonePoints(t);var o=SuperMap.Plot.PlottingUtil.paraLine(t,i,e);return SuperMap.Plot.PlottingUtil.clearSamePts(o)}computeText(t,e,i){if(!(t.length<2)){var o=e.length,s=t,l=s.length,n=0;for(let t=0;t<s.length-1;t++)n+=SuperMap.Plot.PlottingUtil.distance(s[t],s[t+1]);var a={index:-1,pt:s[0]},r=0,p=0,u=0,h=180/Math.PI,y=this.getTextBounds(this.style,e),c="lm";c=this.relLineText===SuperMap.Plot.RelLineText.ONLINE?"lm":this.relLineText===SuperMap.Plot.RelLineText.ONLEFTLINE?"lb":"lt",(r=(n-y.getWidth())/2)<=0&&(r=0);var S=[];for(let t=0;t<o;t++){var P=this.getTextBounds(this.style,e.charAt(t));S.push(new SuperMap.Bounds(0,-y.getHeight(),P.getWidth(),0))}for(var g,d=!1,f=!1,m=0,L=0,M=[];p<=r&&u<l-1;)u++,p+=SuperMap.Plot.PlottingUtil.distance(s[u-1],s[u]);var b=SuperMap.Plot.PlottingUtil.findPointInPolyLine(s,r),T=SuperMap.Plot.PlottingUtil.radian(s[u-1],s[u])*h;T>180&&(T-=360),T<-180&&(T+=360),T>90&&T<=180?(m=-180,d=!0,f=!0):T>-180&&T<-90&&(m=180,d=!0,f=!0),0!=m?this.relLineText===SuperMap.Plot.RelLineText.ONLINE||(c=this.relLineText===SuperMap.Plot.RelLineText.ONLEFTLINE?"lt":"lb"):this.relLineText===SuperMap.Plot.RelLineText.ONLINE||(c=this.relLineText===SuperMap.Plot.RelLineText.ONLEFTLINE?"lb":"lt");for(let t=0;t<o&&!(r>n);t++){var v=t;for(f&&(v=o-t-1),L=(g=S[v]).getWidth(),d&&(r+=L);p<=r&&u<l-1;)u++,p+=SuperMap.Plot.PlottingUtil.distance(s[u-1],s[u]);var A=(T=SuperMap.Plot.PlottingUtil.radian(s[u-1],s[u])*h)+m;if((a=SuperMap.Plot.PlottingUtil.findPointInPolyLine(s,r)).index<0)break;g.add(a.pt.x,a.pt.y);var x=e.charAt(v),_={};_.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,_.textContent=x,_.positionPoints=[a.pt],_.style={surroundLineFlag:!1,labelAlign:c,labelRotation:-A},M.push(_),d||(r+=L)}var O=SuperMap.Plot.PlottingUtil.findPointInPolyLine(s,r);if(this.showPathLine){if(this.relLineText===SuperMap.Plot.RelLineText.ONLINE&&this.isAvoid){if(b.index>=0){var w=[];for(let t=0;t<=b.index;t++)w.push(i[t]);w.push(b.pt),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,w)}if(O.index>=0){var I=[];I.push(O.pt);for(let t=O.index+1;t<i.length;t++)I.push(i[t]);this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,I)}}else this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,i);this.showPathLineArrow&&this.addArrow(i)}for(let t=0;t<M.length;t++)this.components.push(M[t])}}addArrow(t){if(t.length<2)return t;var e=SuperMap.Plot.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 s=t.length-2;s>=0;s--)if(e<SuperMap.Plot.PlottingUtil.distance(i,t[s])){o=s;break}t.splice(o+1,t.length-o),t.push(i)}var s=t[t.length-2],l=t[t.length-1],n=e;if(void 0===s)return t;if(!(SuperMap.Plot.PlottingUtil.distance(s,l)<e)){var a=SuperMap.Plot.PlottingUtil.radian(s,l)*SuperMap.Plot.PlottingUtil.RTOD,r=SuperMap.Plot.PlottingUtil.circlePoint(l,n,n,a+157.5),p=SuperMap.Plot.PlottingUtil.circlePoint(l,n,n,a+202.5);this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,[r,t[t.length-1],p],{surroundLineFlag:!1,fillLimit:!0,lineTypeLimit:!0,fill:!0})}}};SuperMap.Plot.LineMarking=class extends SuperMap.Plot.AlgoSymbol{constructor(t){super(t),this.islocationCircle=!!t.islocationCircle&&t.islocationCircle,this.textBoxType=t.textBoxType?t.textBoxType:SuperMap.Plot.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="SuperMap.Plot.LineMarking"}destroy(){this.islocationCircle=null,this.textBoxType=null,super.destroy()}calculateParts(){this.init(),this.controlPoints=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints),this.controlPoints=SuperMap.Plot.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,s;this.scalePoints=[];var l=[];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?(s=this.controlPoints[0].y,i=this.controlPoints[1].y):(s=this.controlPoints[1].y,i=this.controlPoints[0].y),l.push(new SuperMap.Geometry.Point(e,s)),l.push(new SuperMap.Geometry.Point(e,i)),l.push(new SuperMap.Geometry.Point(o,i)),l.push(new SuperMap.Geometry.Point(o,s)),!1===this.isEdit&&(this.scaleValues[1]=e+.1*(o-e),this.scaleValues[2]=s+-.3*(i-s));var n=this.getAction(this.scaleValues[1],this.scaleValues[2],e,i,o,s),a=new SuperMap.Geometry.Point(this.scaleValues[1],this.scaleValues[2]);if(this.textBoxType===SuperMap.Plot.TextBoxType.RECTBOX||this.textBoxType===SuperMap.Plot.TextBoxType.LINEBOX){var r=[];switch(n){case 0:this.addScalePoint(a);break;case 1:this.addScalePoint(a),r.push(new SuperMap.Geometry.Point(e,i-(i-s)*t)),r.push(a);break;case 2:this.addScalePoint(a),r.push(new SuperMap.Geometry.Point(o-(o-e)*t,i)),r.push(a);break;case 3:this.addScalePoint(a),r.push(new SuperMap.Geometry.Point(o,i-(i-s)*t)),r.push(a);break;case 4:this.addScalePoint(a),r.push(new SuperMap.Geometry.Point(o-(o-e)*t,s)),r.push(a)}this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,r)}if(0!==l.length&&this.textBoxType===SuperMap.Plot.TextBoxType.RECTBOX)this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,l);else if(0!==l.length&&this.textBoxType===SuperMap.Plot.TextBoxType.LINEBOX){var p=[];switch(n){case 0:break;case 1:p=(p=p.concat(l[0])).concat(l[1]);break;case 2:p=(p=p.concat(l[1])).concat(l[2]);break;case 3:p=(p=p.concat(l[2])).concat(l[3]);break;case 4:p=(p=p.concat(l[3])).concat(l[0])}0!==p.length?this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,p):this.addCell(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,this.controlPoints)}this.islocationCircle&&this.addCell(SuperMap.Plot.SymbolType.CIRCLESYMBOL,[a,new SuperMap.Geometry.Point(a.x-.05,a.y-.05)]),this.annotationContent(e,i,o,s)}else this.controlPoints.length>=2&&this.controlPoints.length<this.minEditPts&&this.addCell(SuperMap.Plot.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,s,l){var n=(o-l)/(s-i);return t<i?e>o?Math.abs((e-o)/(t-i))>n?2:1:e<l&&Math.abs((e-l)/(t-i))>n?4:1:t>s?e>o?Math.abs((e-o)/(t-s))>n?2:3:e<l&&Math.abs((e-l)/(t-s))>n?4:3:e>o?2:e<l?4:0}};SuperMap.Plot.LineRelation=class extends SuperMap.Plot.AlgoSymbol{constructor(t){super(t),this.subSectionCount=t.subSectionCount?t.subSectionCount:10,this.CLASS_NAME="SuperMap.Plot.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=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);null!==t&&t.length>=this.minEditPts&&this.computeLine(t)}computeLine(t){this.components=[];var e=t[0],i=t[t.length-1];this.subSectionCount<=1&&(this.subSectionCount=10);var o=SuperMap.Plot.PlottingUtil.distance(e,i)/(2*this.subSectionCount-1);if(this.lineRelationType===SuperMap.Plot.LineRelationType.SOLID)this.addCell(24,t,{surroundLineFlag:!1});else if(this.lineRelationType===SuperMap.Plot.LineRelationType.DASH)for(let t=0;t<this.subSectionCount;t++){let s=SuperMap.Plot.PlottingUtil.findPoint(e,i,2*t*o,0),l=SuperMap.Plot.PlottingUtil.findPoint(e,i,(2*t+1)*o,0);this.addCell(24,[s,l],{surroundLineFlag:!1})}else if(this.lineRelationType===SuperMap.Plot.LineRelationType.ARROW)for(let t=0;t<this.subSectionCount;t++){let s=SuperMap.Plot.PlottingUtil.findPoint(e,i,2*t*o,0),l=SuperMap.Plot.PlottingUtil.findPoint(e,i,(2*t+1)*o,0),n=SuperMap.Plot.PlottingUtil.findPoint(l,s,o,60),a=SuperMap.Plot.PlottingUtil.findPoint(l,s,o,-60);this.addCell(24,[n,l,a],{surroundLineFlag:!1})}}};SuperMap.Plot.PolygonRegion=class extends SuperMap.Plot.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="SuperMap.Plot.PolygonRegion"}destroy(){super.destroy()}calculateParts(){this.init();var t=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if(null!=(t=SuperMap.Plot.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=[SuperMap.Plot.PlottingUtil.getPolygonCenterPt(t)];else{var o=null,s=null;this.scaleValues[1]===t.length?(o=t[t.length-1],s=t[0]):(o=t[this.scaleValues[1]-1],s=t[this.scaleValues[1]]),i.labelRotation=-SuperMap.Plot.PlottingUtil.radian(o,s)/Math.PI*180;var l=this.scaleValues[0]*SuperMap.Plot.PlottingUtil.distance(o,s);e=[SuperMap.Plot.PlottingUtil.findPoint(o,s,l,0)]}this.addCell(34,e,i,this.textContent);var n=new SuperMap.Geometry.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=SuperMap.Plot.PlottingUtil.distance(e,this.controlPoints[0]);for(let t=1;t<this.controlPoints.length;t++){var s=SuperMap.Plot.PlottingUtil.distance(e,this.controlPoints[t]);s<o&&(o=s,i=t)}var l=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);(l=SuperMap.Plot.PlottingUtil.clearSamePts(l)).push(l[0].clone());var n=SuperMap.Plot.PlottingUtil.computePointToLineMinDis(e,l);if(-1===n.minDis)this.scaleValues[1]=i+1,this.offsetX=0,this.offsetY=0;else{var a=SuperMap.Plot.PlottingUtil.projectPoint(e,l[n.index],l[n.index+1]),r=SuperMap.Plot.PlottingUtil.distance(e,a),p=SuperMap.Plot.PlottingUtil.getPolygonCenterPt(this.controlPoints),u=SuperMap.Plot.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,y=null;this.scaleValues[1]===this.controlPoints.length?(h=this.controlPoints[this.controlPoints.length-1],y=this.controlPoints[0]):(h=this.controlPoints[this.scaleValues[1]-1],y=this.controlPoints[this.scaleValues[1]]);var c=SuperMap.Plot.PlottingUtil.distance(a,h),S=SuperMap.Plot.PlottingUtil.distance(h,y);this.scaleValues[0]=c/S}}}this.calculateParts()}parseSymbolData(){super.parseSymbolData(),this.symbolData&&(this.scaleValues[1]=this.symbolData.annotationPosition)}setSymbolData(){super.setSymbolData(),this.symbolData&&(this.symbolData.annotationPosition=this.scaleValues[1])}};SuperMap.Plot.Wire=class extends SuperMap.Plot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.05),this.CLASS_NAME="SuperMap.Plot.Wire"}calculateParts(){this.init();var t=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMap.Plot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){this.isEdit||(this.scaleValues[0]=2*this.getSubSymbolScaleValue());var e=SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(t);e=SuperMap.Plot.PlottingUtil.clearSamePts(e);var i=SuperMap.Plot.PlottingUtil.polylineDistance(e);this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,e);var o=i*this.scaleValues[0],s=i*this.scaleValues[0]/2,l=SuperMap.Plot.PlottingUtil.clonePoints(e),n=parseInt((i-s)/o);for(let t=0;t<=n&&!(s+o*t>i);t++){var a=SuperMap.Plot.PlottingUtil.findPointInPolyLine(l,s+o*t);if(-1!==a.index){var r=new SuperMap.Geometry.Point(a.pt.x,a.pt.y),p=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(o/2,e[a.index],r);this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,[p.pntLeft,p.pntRight])}}this.finish()}}};SuperMap.Plot.LinearArrow=class extends SuperMap.Plot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(.04),this.scaleValues.push(.02),this.scaleValues.push(0),this.scaleValues.push(.04),this.scaleValues.push(.02),this.scaleValues.push(0)),this.CLASS_NAME="SuperMap.Plot.LinearArrow"}calculateParts(){if(this.init(),!(null==this.controlPoints||this.controlPoints.length<this.minEditPts)){var t=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMap.Plot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){this.scalePoints=[],this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,t);var e=SuperMap.Plot.PlottingUtil.polylineDistance(t);if(!SuperMap.Plot.PlottingUtil.equalFuzzy(this.scaleValues[0],0)&&!SuperMap.Plot.PlottingUtil.equalFuzzy(this.scaleValues[1],0)){let i=this.scaleValues[0]*e,o=this.scaleValues[1]*e,s=SuperMap.Plot.PlottingUtil.findPointInLine(t[0],t[1],i),l=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(o,t[1],s),n=[];if(n.push(l.pntLeft),n.push(t[0]),n.push(l.pntRight),this.addScalePoint(l.pntLeft,0),SuperMap.Plot.PlottingUtil.equalFuzzy(this.scaleValues[2],0))this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,n,{fillLimit:!0,fill:!0}),this.addScalePoint(s,1);else if(SuperMap.Plot.PlottingUtil.equalFuzzy(this.scaleValues[2],1))this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,n),this.addScalePoint(t[0],1);else{let e=i*this.scaleValues[2],o=SuperMap.Plot.PlottingUtil.findPointInLine(s,t[0],e);n.push(o),this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,n,{fillLimit:!0,fill:!0}),this.addScalePoint(o,1)}}if(!SuperMap.Plot.PlottingUtil.equalFuzzy(this.scaleValues[3],0)&&!SuperMap.Plot.PlottingUtil.equalFuzzy(this.scaleValues[4],0)){let i=this.scaleValues[3]*e,o=this.scaleValues[4]*e,s=SuperMap.Plot.PlottingUtil.findPointInLine(t[1],t[0],i),l=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(o,t[0],s),n=[];if(n.push(l.pntLeft),n.push(t[1]),n.push(l.pntRight),this.addScalePoint(l.pntLeft,2),SuperMap.Plot.PlottingUtil.equalFuzzy(this.scaleValues[5],0))this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,n,{fillLimit:!0,fill:!0}),this.addScalePoint(s,3);else if(SuperMap.Plot.PlottingUtil.equalFuzzy(this.scaleValues[5],1))this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,n),this.addScalePoint(t[1],3);else{let e=i*this.scaleValues[5],o=SuperMap.Plot.PlottingUtil.findPointInLine(s,t[1],e);n.push(o),this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,n,{fillLimit:!0,fill:!0}),this.addScalePoint(o,3)}}this.finish()}}}modifyPoint(t,e){if(!0===e.isScalePoint){var i=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);i=SuperMap.Plot.PlottingUtil.clearSamePts(i);var o=SuperMap.Plot.PlottingUtil.polylineDistance(i);if(0===t){let t=SuperMap.Plot.PlottingUtil.pointProjectToSegment(e,i[0],i[1]);if(t.isOnline){let s=this.scaleValues[0]*o,l=s*this.scaleValues[2],n=SuperMap.Plot.PlottingUtil.findPointInLine(i[0],i[1],s),a=SuperMap.Plot.PlottingUtil.findPointInLine(n,i[0],l);s=SuperMap.Plot.PlottingUtil.distance(i[0],t.projectPoint),this.scaleValues[0]=s/o;let r=SuperMap.Plot.PlottingUtil.distance(e,t.projectPoint);this.scaleValues[1]=r/o,l=SuperMap.Plot.PlottingUtil.distance(a,t.projectPoint),this.scaleValues[2]=l/s}}else if(1===t){let t=this.scaleValues[0]*o,s=SuperMap.Plot.PlottingUtil.findPointInLine(i[0],i[1],t),l=SuperMap.Plot.PlottingUtil.pointProjectToSegment(e,s,i[0]);if(l.isOnline){let e=SuperMap.Plot.PlottingUtil.distance(s,l.projectPoint);this.scaleValues[2]=e/t,this.scaleValues[2]<0?this.scaleValues[2]=0:this.scaleValues[2]>1&&(this.scaleValues[2]=1)}}else if(2===t){let t=SuperMap.Plot.PlottingUtil.pointProjectToSegment(e,i[0],i[1]);if(t.isOnline){let s=this.scaleValues[3]*o,l=s*this.scaleValues[5],n=SuperMap.Plot.PlottingUtil.findPointInLine(i[1],i[0],s),a=SuperMap.Plot.PlottingUtil.findPointInLine(n,i[1],l);s=SuperMap.Plot.PlottingUtil.distance(i[1],t.projectPoint),this.scaleValues[3]=s/o;let r=SuperMap.Plot.PlottingUtil.distance(e,t.projectPoint);this.scaleValues[4]=r/o,l=SuperMap.Plot.PlottingUtil.distance(a,t.projectPoint),this.scaleValues[5]=l/s}}else if(3===t){let t=this.scaleValues[3]*o,s=SuperMap.Plot.PlottingUtil.findPointInLine(i[1],i[0],t),l=SuperMap.Plot.PlottingUtil.pointProjectToSegment(e,s,i[1]);if(l.isOnline){let e=SuperMap.Plot.PlottingUtil.distance(s,l.projectPoint);this.scaleValues[5]=e/t,this.scaleValues[5]<0?this.scaleValues[5]=0:this.scaleValues[5]>1&&(this.scaleValues[5]=1)}}}this.calculateParts()}};SuperMap.Plot.AlgoSymbol1001=class extends SuperMap.Plot.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="SuperMap.Plot.AlgoSymbol1001"}calculateParts(){this.init();var t=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints),e=(t=SuperMap.Plot.PlottingUtil.clearSamePts(t)).length;if(e>=this.minEditPts){this.scalePoints=[];var i=SuperMap.Plot.PlottingUtil.clonePoints(t),o=!1;void 0!==i[0].z&&(o=!0);var s=SuperMap.Plot.ArrowToolkit.generateArrowBodyShapePts(t,this.scaleValues,SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_PARALLEL),l=s.arrowTouLen,n=s.leftBodyPts,a=s.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=SuperMap.Plot.ArrowToolkit.generateArrowHeadShapePts(t,r,p,l,SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITHOUT_EAR),h=[];if(o){var y=[],c=[],S=[];for(let t=0;t<e-1;t++)c.push({x:n[t].x,y:n[t].y,z:i[t].z}),S.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},g={x:i[e-1].x,y:i[e-1].y,z:i[e-1].z},d=this.ComputeZValue(n[e-1],g,P);c.push({x:n[e-1].x,y:n[e-1].y,z:d});var f=this.ComputeZValue(a[e-1],g,P);S.push({x:a[e-1].x,y:a[e-1].y,z:f});for(let t=0;t<u.length;t++){var m=this.ComputeZValue(u[t],g,P);y.push({x:u[t].x,y:u[t].y,z:m})}h=(h=h.concat(c)).concat(y);for(let t=S.length-1;t>=0;t--)h.push(S[t]);let t=new SuperMap.Geometry.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2),o=new SuperMap.Geometry.Point(t.x,t.y);o.isScalePoint=!0,o.tag=0,this.addScalePoint(o);let s=new SuperMap.Geometry.Point(n[n.length-1].x,n[n.length-1].y);s.isScalePoint=!0,s.tag=1,this.addScalePoint(s);let l=new SuperMap.Geometry.Point(u[0].x,u[0].y);l.isScalePoint=!0,l.tag=2,this.addScalePoint(l);for(let t=0;t<this.scalePoints.length;t++){let e=new SuperMap.Geometry.Point(this.scalePoints[t].x,this.scalePoints[t].y);this.scalePoints[t].z=this.ComputeZValue(e,g,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 SuperMap.Geometry.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2),e=new SuperMap.Geometry.Point(t.x,t.y);e.isScalePoint=!0,e.tag=0,this.addScalePoint(e);let i=new SuperMap.Geometry.Point(n[n.length-1].x,n[n.length-1].y);i.isScalePoint=!0,i.tag=1,this.addScalePoint(i);let o=new SuperMap.Geometry.Point(u[0].x,u[0].y);o.isScalePoint=!0,o.tag=2,this.addScalePoint(o)}this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,h,{surroundLineFlag:!1,lineWidthLimit:!0,strokeWidth:0,weight:0}),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,h)}}modifyPoint(t,e){if(!0===e.isScalePoint){var i=new SuperMap.Geometry.Point(this.scalePoints[0].x,this.scalePoints[0].y),o=new SuperMap.Geometry.Point(this.scalePoints[1].x,this.scalePoints[1].y),s=new SuperMap.Geometry.Point(this.scalePoints[2].x,this.scalePoints[2].y),l=this.scaleValues[0],n=SuperMap.Plot.PlottingUtil.polylineDistance(this.controlPoints),a=n*l;if(0==t){let t=SuperMap.Plot.PlottingUtil.pointProjectToSegment(e,this.controlPoints[this.controlPoints.length-2],this.controlPoints[this.controlPoints.length-1]),i=t.projectPoint;if(t.isOnline){let t=SuperMap.Plot.PlottingUtil.distance(i,this.controlPoints[this.controlPoints.length-1]);this.scaleValues[0]=t/n}}else if(1==t){let t=SuperMap.Plot.PlottingUtil.pointProjectToSegment(e,o,s).projectPoint,l=SuperMap.Plot.PlottingUtil.distance(t,i);this.scaleValues[1]=l/a}else if(2==t){let t=SuperMap.Plot.PlottingUtil.pointProjectToSegment(e,this.controlPoints[1],s).projectPoint,o=SuperMap.Plot.PlottingUtil.pointProjectToSegment(t,i,this.controlPoints[1]),l=o.projectPoint,n=SuperMap.Plot.PlottingUtil.distance(l,i);!0===o.inOnline?this.scaleValues[4]=-n/a:this.scaleValues[4]=n/a}}this.calculateParts()}};SuperMap.Plot.AlgoSymbol1002=class extends SuperMap.Plot.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="SuperMap.Plot.AlgoSymbol1002"}calculateParts(){this.init(),this.m_scalePoints=[];var t=SuperMap.Plot.PlottingUtil.clearSamePts(this.controlPoints);if((t=SuperMap.Plot.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),s=this.scaleValues.length;if(s<2*o-1){0==s&&(this.scaleValues.push(this.SV1_defaultATLenDivABLen),s++);var l=2*o-1-s;for(let t=0;t<l;t+=2)this.scaleValues.splice(s/2+1,0,this.SV1_defaultATLenDivABLen),this.scaleValues.splice(this.scaleValues.length,0,this.SV2_defaultAYPosScale)}else if(s>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);SuperMap.Plot.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 y=[];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]);y.push(c)}var S=[],P=[],g=[];for(let t=0;t<o;t++)if(!(2>y[t].length)){var d=p[t][p[t].length-1],f=u[t][0],m=new SuperMap.Geometry.Point(.5*(d.x+f.x),.5*(d.y+f.y)),L=y[t][y[t].length-1],M=y[t][y[t].length-2],b=this.ComputeZValue(m,L,M),T={x:m.x,y:m.y,z:b},v=[],A=[];for(let e=0;e<y[t].length-1;e++)if(0==t)A.push(y[t][e]);else{let i={x:y[t][e].x,y:y[t][e].y,z:.5*(y[t][e].z+y[t-1][e].z)};A.push(i)}A.push(T),this.ComputeBeizerZValueByDis(A,p[t],v),S.push(v),v=[];var x=[];x.push(T);for(let e=y[t].length-2;e>=0;e--)if(t==o-1)x.push(y[t][e]);else{let i={x:y[t][e].x,y:y[t][e].y,z:.5*(y[t][e].z+y[t+1][e].z)};x.push(i)}this.ComputeBeizerZValueByDis(x,u[t],v),P.push(v),v=[];var _=h[t];for(let t=0;t<_.length;t++){let e=this.ComputeZValue(_[t],L,M);v.push({x:_[t].x,y:_[t].y,z:e})}g.push(v)}var O=[];for(let t=0;t<o;t++)O=(O=(O=O.concat(S[t])).concat(g[t])).concat(P[t]);return SuperMap.Plot.PlottingUtil.clearSamePts(O),n.shapePts.length>0&&this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,O,{surroundLineFlag:!1}),this.scalePoints=this.scalePoints.concat(this.m_scalePoints),!0}n.shapePts.length>0&&(this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,n.shapePts,{surroundLineFlag:!1,lineWidthLimit:!0,strokeWidth:0,weight:0}),this.addCell(SuperMap.Plot.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,s=Math.floor(o/this.MIN_PTCOUNT_PERARROW),l=0;if(t<s){var n=[],a=t*this.MIN_PTCOUNT_PERARROW;n[0]=i[a],n[1]=i[a+1],n[2]=i[a+2];var r=SuperMap.Plot.PlottingUtil.polylineDistance(n),p=new SuperMap.Geometry.Point(0,0),u=new SuperMap.Geometry.Point(0,0),h=new SuperMap.Geometry.Point(0,0);SuperMap.Plot.PlottingUtil.getTrianglePoints(this.AB_CTRLPT_RATE1,this.AB_CTRLPT_RATE2,n[0],n[1],n[2],p,u),SuperMap.Plot.PlottingUtil.getTrapezoidPoints(this.AB_CTRLPT_RATE3,n[2],n[1],u,h),l=SuperMap.Plot.PlottingUtil.triangleHeightAndPartBottomLen(n[2],h,e).dLen1/(this.SV4_DefaultAELenDividedByATLen+1)/r}else{var y=[],c=[],S=(t-s)*this.MIN_PTCOUNT_PERARROW;y[0]=i[S],y[1]=i[S+1],y[2]=i[S+2];var P=(t-s+1)*this.MIN_PTCOUNT_PERARROW;c[0]=i[P],c[1]=i[P+1],c[2]=i[P+2];var g=new SuperMap.Geometry.Point(0,0),d=new SuperMap.Geometry.Point(0,0),f=new SuperMap.Geometry.Point(0,0);g.x=.5*(y[2].x+c[2].x),d.x=.5*(y[1].x+c[1].x),f.x=.5*(y[0].x+c[0].x),g.y=.5*(y[2].y+c[2].y),d.y=.5*(y[1].y+c[1].y),f.y=.5*(y[0].y+c[0].y);var m=SuperMap.Plot.PlottingUtil.distance(g,d),L=SuperMap.Plot.PlottingUtil.distance(f,d);let o=SuperMap.Plot.PlottingUtil.triangleHeightAndPartBottomLen(g,d,e),n=o.dLen1;l=n<m?n/(m+L):((n=(o=SuperMap.Plot.PlottingUtil.triangleHeightAndPartBottomLen(d,f,e)).dLen1)+m)/(m+L)}l>this.MAX_SCALEVALUE?l=this.MAX_SCALEVALUE:l<this.MIN_SCALEVALUE&&(l=this.MIN_SCALEVALUE),this.scaleValues[t]=l}this.calculateParts()}arrowMeshs(t){var e=[],i=[],o=[],s=new SuperMap.Plot.Path2D,l=t.length,n=Math.floor(l/this.MIN_PTCOUNT_PERARROW),a=this.generateAWWidth(n,t),r=[],p=[],u=0,h=0,y=0,c=[];for(h=0,y=0;h<n;h++,y+=this.MIN_PTCOUNT_PERARROW){c[0]=t[y],c[1]=t[y+1],c[2]=t[y+2],u=this.scaleValues[h];var S=this.generateArrowBodyPts(c,a[h],u);u=S.dATLenDivABLen,r[h]=S.arrowBodyPts,p.push(u)}var P=[],g=0,d=0,f=0,m=[],L=[];for(h=0;h<n-1;h++,d+=this.MIN_PTCOUNT_PERARROW){f=d+this.MIN_PTCOUNT_PERARROW,m[0]=t[d],m[1]=t[d+1],m[2]=t[d+2],L[0]=t[f],L[1]=t[f+1],L[2]=t[f+2],g=this.scaleValues[n+h];var M=this.generateAYPts(m,r[h],L,r[h+1],g);P.push(M.arrowLeftYaoPts),P.push(M.arrowRightYaoPts)}var b=[],T=r[0],v=[],A=0,x=[];s.MoveTo(T[0]),s.CurveTo(T[1],T[2],T[3]),s.CurveTo(T[4],T[5],T[6]),s.ToSubPathPolygons(v),e.push(v[0]),A=v[0].length;for(let t=7;t<10;t++)s.LineTo(T[t]);for(v=[],s.ToSubPathPolygons(v);A<v[0].length;A++)x.push(v[0][A]);for(o.push(x),b.push(T[0]),b.push(t[0]),h=1,y=this.MIN_PTCOUNT_PERARROW;h<n;h++,y+=this.MIN_PTCOUNT_PERARROW){var _=r[h],O=h+h-2,w=P[O];for(s.LineTo(w[0]),s.CurveTo(w[1],w[2],w[3]),v=[],x=[],s.ToSubPathPolygons(v);A<v[0].length;A++)x.push(v[0][A]);i.push(x);var I=P[O+1];for(s.CurveTo(I[1],I[2],I[3]),v=[],x=[],s.ToSubPathPolygons(v);A<v[0].length;A++)x.push(v[0][A]);e.push(x);for(let t=7;t<10;t++)s.LineTo(_[t]);for(v=[],x=[],s.ToSubPathPolygons(v);A<v[0].length;A++)x.push(v[0][A]);o.push(x),b.push(t[y].clone())}var D=r[n-1];for(s.LineTo(D[10]),s.CurveTo(D[11],D[12],D[13]),s.CurveTo(D[14],D[15],D[16]),v=[],x=[],s.ToSubPathPolygons(v);A<v[0].length;A++)x.push(v[0][A]);i.push(x),b.push(D[16]);var E=[];return s.ToSubPathPolygons(E),{shapePts:E[0],arrLeftPts2D:e,arrRightPts2D:i,arrHeadPts2D:o}}operateCtrlPts(t){var e=SuperMap.Plot.PlottingUtil.clonePoints(t),i=e.length,o=Math.floor(i/this.MIN_PTCOUNT_PERARROW),s=i%this.MIN_PTCOUNT_PERARROW,l=new SuperMap.Geometry.Point;if(2==s&&(l.x=.5*(e[i-2].x+e[i-1].x),l.y=.5*(e[i-2].y+e[i-1].y),l.x==e[i-1].x&&l.y==e[i-1].y||(e.push(e[i-1].clone()),e[i-1]=l,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(!SuperMap.Plot.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}operateCtrlPts3D(t){var e=t,i=e.length,o=Math.floor(i/this.MIN_PTCOUNT_PERARROW),s={x:0,y:0,z:0};if(2==i%3&&(s.x=.5*(e[i-2].x+e[i-1].x),s.y=.5*(e[i-2].y+e[i-1].y),s.z=.5*(e[i-2].z+e[i-1].z),s.x==e[i-1].x&&s.y==e[i-1].y&&s.z==e[i-1].z||(e.push(e[i-1]),e[i-1]=s,i++,o++)),i>3){var l=o-1;for(let t=0,i=l;t<l;i--,t++){var n=3*i;for(let t=0;t<n;t+=3)if(!SuperMap.Plot.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=SuperMap.Plot.PlottingUtil.distance(e[0],e[this.MIN_PTCOUNT_PERARROW]);i.push(o);for(var s=1,l=this.MIN_PTCOUNT_PERARROW;s<t-1;s++,l+=this.MIN_PTCOUNT_PERARROW)o=.5*(SuperMap.Plot.PlottingUtil.distance(e[l-this.MIN_PTCOUNT_PERARROW],e[l])+SuperMap.Plot.PlottingUtil.distance(e[l],e[l+this.MIN_PTCOUNT_PERARROW])),i.push(o);o=SuperMap.Plot.PlottingUtil.distance(e[l-this.MIN_PTCOUNT_PERARROW],e[l]),i.push(o)}return i}generateArrowBodyPts(t,e,i){var o=[],s=[],l=[],n=[],a=[],r=[],p=[],u=t.length-1;if(u<2)return{dATLenDivABLen:i=0,arrowBodyPts:o};var h=i,y=this.SV2_DefaultAJWidDiviedByATLen,c=this.SV3_DefaultAEWidDividedByATLen,S=this.SV4_DefaultAELenDividedByATLen,P=SuperMap.Plot.PlottingUtil.clonePoints(t),g=SuperMap.Plot.PlottingUtil.polylineDistance(P),d=0==e?g*this.ATL_DIV_ABL_1:(g+e)*this.ATL_DIV_ABL,f=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(d,P[1],P[0]);s[1]=f.pntLeft.clone(),l[1]=f.pntRight.clone();var m=0;m=SuperMap.Plot.PlottingUtil.equalFuzzy(h,0,1e-14)?d*this.ATL_DIV_AWW:g*h;var L=SuperMap.Plot.PlottingUtil.distance(P[1],P[2]);m+m>L&&(m=.5*L);var M=m*y;P.push(P[u].clone());var b,T=0;b=g-m;var v=[],A=0;for(A=2;A<=u;A++)T+=SuperMap.Plot.PlottingUtil.distance(P[A-1],P[A-2]),SuperMap.Plot.PlottingUtil.equalFuzzy(b,0,1e-14)?v[A]=0:SuperMap.Plot.PlottingUtil.equalFuzzy(b-T,0,1e-14)?v[A]=M:v[A]=M+(d-M)*Math.pow((b-T)/b,this.SV_ATScaleParameter);v[u+1]=M;var x=new SuperMap.Geometry.Point(0,0),_=new SuperMap.Geometry.Point(0,0),O=new SuperMap.Geometry.Point(0,0);for(A=2;A<=u;A++){SuperMap.Plot.PlottingUtil.getTrianglePoints(this.AB_CTRLPT_RATE1,this.AB_CTRLPT_RATE2,P[A-2],P[A-1],P[A],_,O),u==A&&SuperMap.Plot.PlottingUtil.getTrapezoidPoints(this.AB_CTRLPT_RATE3,P[u],P[u-1],O,x);let t=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(v[A],_,P[A-1]);l[A]=t.pntLeft,s[A]=t.pntRight}var w,I,D=x.clone();if(SuperMap.Plot.PlottingUtil.distance(P[u],D)>0){var E=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(m,P[u],x);P[u]=E.clone()}for(f=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(M,P[u+1],P[u]),s[u+1]=f.pntLeft,l[u+1]=f.pntRight,A=2;A<=u;A++)SuperMap.Plot.PlottingUtil.getTrianglePoints(this.AB_CTRLPT_RATE2,this.AB_CTRLPT_RATE2,s[A-1],s[A],s[A+1],_,O),n[A]=_.clone(),a[A]=O.clone(),SuperMap.Plot.PlottingUtil.getTrianglePoints(this.AB_CTRLPT_RATE2,this.AB_CTRLPT_RATE2,l[A-1],l[A],l[A+1],_,O),r[A]=_.clone(),p[A]=O.clone();SuperMap.Plot.PlottingUtil.getTrapezoidPoints(this.AB_CTRLPT_RATE3,s[1],s[2],n[2],x),a[1]=x.clone(),SuperMap.Plot.PlottingUtil.getTrapezoidPoints(this.AB_CTRLPT_RATE3,l[1],l[2],r[2],x),p[1]=x.clone(),I=SuperMap.Plot.PlottingUtil.distance(s[u+1],s[u])*(1/3),(w=SuperMap.Plot.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),f=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(I,s[u+1],w),n[u+1]=f.pntLeft.clone(),I=SuperMap.Plot.PlottingUtil.distance(l[u+1],l[u])*(1/3),(w=SuperMap.Plot.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),f=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(I,l[u+1],w),r[u+1]=f.pntRight.clone();var C=[],N=m*S,U=SuperMap.Plot.PlottingUtil.getExcentrePointOnSegmentByScale(N,P[u],P[u+1]);this.m_scalePoints.push(U.clone()),N=m*c,f=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(N,P[u+1],U),C.push(f.pntRight),C.push(P[u+1]),C.push(f.pntLeft);var R=[];for(R.push(s[u+1]),A=u;A>=1;A--)R.push(n[A+1]),R.push(a[A]),R.push(s[A]);var B=[];for(A=1;A<=u;A++)B.push(l[A]),B.push(p[A]),B.push(r[A+1]);B.push(l[u+1]),o.push.apply(o,B),o.push.apply(o,C),o.push.apply(o,R),i=m/g;var G=[];for(A=R.length-1;A>=0;A--)G.push(R[A]);return{dATLenDivABLen:i,arrowBodyPts:o}}generateAYPts(t,e,i,o,s){var l=new SuperMap.Geometry.Point(.5*(t[2].x+i[2].x),.5*(t[2].y+i[2].y)),n=new SuperMap.Geometry.Point(.5*(t[1].x+i[1].x),.5*(t[1].y+i[1].y)),a=new SuperMap.Geometry.Point(.5*(t[0].x+i[0].x),.5*(t[0].y+i[0].y)),r=SuperMap.Plot.PlottingUtil.distance(l,n),p=SuperMap.Plot.PlottingUtil.distance(a,n),u=s*(r+p),h=new SuperMap.Geometry.Point(0,0),y=new SuperMap.Geometry.Point(0,0),c=new SuperMap.Geometry.Point(0,0);if(u>r){u=r+p-u,h=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(u,a,n);var S=SuperMap.Plot.PlottingUtil.distance(t[1],t[0]),P=SuperMap.Plot.PlottingUtil.distance(i[1],i[0]);S=S*u/p,y=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(S,t[0],t[1]),P=P*u/p,c=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(P,i[0],i[1])}else{h=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(u,l,n);var g=SuperMap.Plot.PlottingUtil.distance(t[1],t[2]),d=SuperMap.Plot.PlottingUtil.distance(i[1],i[2]);g=g*u/r,y=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(g,t[2],t[1]),d=d*u/r,c=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(d,i[2],i[1])}this.m_scalePoints.push(h.clone());var f=this.SV_ArrowWoCtrl*SuperMap.Plot.PlottingUtil.distance(h,y),m=this.SV_ArrowWoCtrl*SuperMap.Plot.PlottingUtil.distance(h,c),L=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(f,h,y),M=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(m,h,c),b=e[11].clone(),T=e[10].clone(),v=o[5].clone(),A=o[6].clone(),x=SuperMap.Plot.PlottingUtil.intersectLines(T,b,h,y),_=SuperMap.Plot.PlottingUtil.distance(x.intersectPoint,T),O=SuperMap.Plot.PlottingUtil.distance(T,h);_=_>O?this.SV_AJCtrl*O:this.SV_AJCtrl*_;var w=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(_,T,b);b=w.clone(),e[11]=w.clone(),x=SuperMap.Plot.PlottingUtil.intersectLines(A,v,h,c),_=(_=SuperMap.Plot.PlottingUtil.distance(x.intersectPoint,A))>(O=SuperMap.Plot.PlottingUtil.distance(A,h))?this.SV_AJCtrl*O:this.SV_AJCtrl*_,v=(w=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(_,A,v)).clone(),o[5]=w.clone();var I=[];I.push(T),I.push(b),I.push(L),I.push(h);var D=[];return D.push(h),D.push(M),D.push(v),D.push(A),{arrowLeftYaoPts:I,arrowRightYaoPts:D}}};SuperMap.Plot.AlgoSymbol1003=class extends SuperMap.Plot.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="SuperMap.Plot.AlgoSymbol1003"}calculateParts(){this.init();var t=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints),e=(t=SuperMap.Plot.PlottingUtil.clearSamePts(t)).length;if(e>=this.minEditPts){if(SuperMap.Plot.PlottingUtil.equalFuzzy(this.controlPoints[0].x,this.controlPoints[1].x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(this.controlPoints[0].y,this.controlPoints[1].y))return;var i=SuperMap.Plot.PlottingUtil.clonePoints(t),o=!1;void 0!==i[0].z&&(o=!0);var s=SuperMap.Plot.ArrowToolkit.generateArrowBodyShapePts(t,this.scaleValues,SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_TRAPEZOID),l=s.arrowTouLen,n=s.leftBodyPts,a=s.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=SuperMap.Plot.ArrowToolkit.generateArrowHeadShapePts(t,r,p,l,SuperMap.Plot.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 y=[],c={x:i[1].x,y:i[1].y,z:i[1].z},S={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,S);y.push({x:h[t].x,y:h[t].y,z:e})}let t=new SuperMap.Geometry.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2),o=new SuperMap.Geometry.Point(t.x,t.y);o.isScalePoint=!0,o.tag=0,this.addScalePoint(o);let s=new SuperMap.Geometry.Point(n[n.length-1].x,n[n.length-1].y);s.isScalePoint=!0,s.tag=1,this.addScalePoint(s);let l=new SuperMap.Geometry.Point(u[0].x,u[0].y);l.isScalePoint=!0,l.tag=2,this.addScalePoint(l);var P={x:i[e-1].x,y:i[e-1].y,z:i[e-1].z},g={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 f={x:this.scalePoints[t].x,y:this.scalePoints[t].y};let e=this.ComputeZValue(f,P,g);d.push({x:f.x,y:f.y,z:e})}this.scalePoints=d,this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,y)}else{let t=new SuperMap.Geometry.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2),e=new SuperMap.Geometry.Point(t.x,t.y);e.isScalePoint=!0,e.tag=0,this.addScalePoint(e);let i=new SuperMap.Geometry.Point(n[n.length-1].x,n[n.length-1].y);i.isScalePoint=!0,i.tag=1,this.addScalePoint(i);let o=new SuperMap.Geometry.Point(u[0].x,u[0].y);o.isScalePoint=!0,o.tag=2,this.addScalePoint(o),this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,h)}}}modifyPoint(t,e){if(!0===e.isScalePoint){var i=new SuperMap.Geometry.Point(this.scalePoints[0].x,this.scalePoints[0].y),o=new SuperMap.Geometry.Point(this.scalePoints[1].x,this.scalePoints[1].y),s=new SuperMap.Geometry.Point(this.scalePoints[2].x,this.scalePoints[2].y),l=this.scaleValues[0],n=SuperMap.Plot.PlottingUtil.polylineDistance(this.controlPoints),a=n*l;if(0==t){let t=SuperMap.Plot.PlottingUtil.pointProjectToSegment(e,this.controlPoints[0],this.controlPoints[1]),i=t.projectPoint;if(t.isOnline){let t=SuperMap.Plot.PlottingUtil.distance(i,this.controlPoints[1]);this.scaleValues[0]=t/n}}else if(1==t){let t=SuperMap.Plot.PlottingUtil.pointProjectToSegment(e,o,s).projectPoint,l=SuperMap.Plot.PlottingUtil.distance(t,i),n=a*this.scaleValues[1];this.scaleValues[1]=l/a,this.scaleValues[2]=(a*this.scaleValues[2]+l-n)/a}else if(2==t){let t=SuperMap.Plot.PlottingUtil.pointProjectToSegment(e,this.controlPoints[1],s).projectPoint,o=SuperMap.Plot.PlottingUtil.pointProjectToSegment(t,i,this.controlPoints[1]),l=o.projectPoint,n=SuperMap.Plot.PlottingUtil.distance(l,i);!0===o.inOnline?this.scaleValues[4]=-n/a:this.scaleValues[4]=n/a}}this.calculateParts()}};SuperMap.Plot.AlgoSymbol1004=class extends SuperMap.Plot.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.Plot.AlgoSymbol1004"}calculateParts(){this.init(),this.applyUse()}applyUse(){var t=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMap.Plot.PlottingUtil.clearSamePts(t)).length>=2&&t.length<this.minEditPts&&this.calAssistantLine(),!(t.length<this.minEditPts)){var e=this.arrowMeshs(t);SuperMap.Plot.PlottingUtil.clearSamePts(e.shapePts);var i=SuperMap.Plot.PlottingUtil.clonePoints(t),o=i.length,s=!1;if(void 0!==i[0].z&&(s=!0),s){var l=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);if(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]);var h=[],y={x:(i[0].x+i[1].x)/2,y:(i[0].y+i[1].y)/2},c={x:(l[l.length-1].x+n[0].x)/2,y:(l[l.length-1].y+n[0].y)/2},S=this.ComputeZValue(c,i[o-1],i[o-2]),P=0,g=0;l[0].x==i[0].x&&l[0].y==i[0].y?(P=i[0].z,g=i[1].z):(P=i[1].z,g=i[0].z),h.push({x:y.x,y:y.y,z:P});for(let t=2;t<o-1;t++)h.push(i[t]);h.push({x:c.x,y:c.y,z:S});var d=[];this.ComputeBeizerZValueByDis(h,l,d),(h=[]).push({x:c.x,y:c.y,z:S});for(let t=o-2;t>=2;t--)h.push(i[t]);h.push({x:y.x,y:y.y,z:g});var f=[];this.ComputeBeizerZValueByDis(h,n,f);var m=[];for(let t=0;t<a.length;t++){var L=this.ComputeZValue(a[t],i[o-1],i[o-2]);m.push({x:a[t].x,y:a[t].y,z:L})}if(d.length>0&&f.length>0&&m.length>0){p=(p=(p=(p=[]).concat(d)).concat(m)).concat(f),this.addCell(SuperMap.Plot.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]),T=new SuperMap.Geometry.Point(u[t].x,u[t].y);T.z=b,M.push(T)}3!=u.length?this.scalePoints=[]:this.scalePoints=this.scalePoints.concat(M)}}else{if(0==e.shapePts.length)return;if(this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.shapePts,{surroundLineFlag:!1,lineWidthLimit:!0,strokeWidth:0,weight:0}),this.addCell(SuperMap.Plot.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])}}}modifyPoint(t,e){if(!0===e.isScalePoint){var i=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);i=SuperMap.Plot.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 s,l,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);s=u[0],l=u[1],n=u[2],a=u[3]}else s=this.scaleValues[0],l=this.scaleValues[1],n=this.scaleValues[2],a=this.scaleValues[3];var h=SuperMap.Plot.PlottingUtil.polylineDistance(i),y=[];for(let t=0;t<this.scalePoints.length;t++)y.push(this.scalePoints[t].clone());if(0==y.length)return;y[t]=e.clone();var c,S,P=o-1;c=o<=3?new SuperMap.Geometry.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2):r[P-1].clone();var g,d,f,m,L,M,b=new SuperMap.Geometry.Point(0,0),T=new SuperMap.Geometry.Point(0,0),v=new SuperMap.Geometry.Point(0,0);SuperMap.Plot.PlottingUtil.getTrianglePoints(0,3,c,r[P],r[P+1],T,v),SuperMap.Plot.PlottingUtil.getTrapezoidPoints(.5,r[o],r[o-1],v,b),S=b.clone();var A=SuperMap.Plot.PlottingUtil.triangleHeightAndPartBottomLen(r[o],S,y[2]);g=A.dLen1,A.dLen2,0==g&&(g=.1),d=g,s=(g/=a+1)/h,1==t?(m=(A=SuperMap.Plot.PlottingUtil.triangleHeightAndPartBottomLen(r[o],S,y[1])).dLen1,n=(L=A.dLen2)/g,a=(m-g)/g):0==t?(g=(A=SuperMap.Plot.PlottingUtil.triangleHeightAndPartBottomLen(r[o],S,y[0])).dLen1,l=(f=A.dLen2)/g,(M=SuperMap.Plot.PlottingUtil.distance(r[o],r[o-1]))<2*g&&(g=.5*M),m=(A=SuperMap.Plot.PlottingUtil.triangleHeightAndPartBottomLen(r[o],S,y[1])).dLen1,n=(L=A.dLen2)/g,(a=(d-g)/g)<.1&&(n=L/(g=d/(1+(a=.1))),l=f/g),s=g/h):2==t&&(s=g/h),f=g*l,(M=SuperMap.Plot.PlottingUtil.distance(r[o],r[o-1]))<2*g&&(f=(g=.5*M)*l,s=g/h),this.scaleValues[0]=s,this.scaleValues[1]=l,this.scaleValues[2]=n,this.scaleValues[3]=a}this.calculateParts()}arrowMeshs(t){var e=[],i=[],o=[],s=[],l=SuperMap.Plot.PlottingUtil.clonePoints(t),n=SuperMap.Plot.ArrowToolkit.generateArrowBodyShapePts(l,this.scaleValues,SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_MULTIPOLYBEZIER),a=n.arrowTouLen,r=n.leftBodyPts,p=n.rightBodyPts;if(!SuperMap.Plot.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 y=SuperMap.Plot.ArrowToolkit.generateArrowHeadShapePts(l,u,h,a,SuperMap.Plot.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<y.length;t++)e.push(y[t]),s.push(y[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:s}}updateScalePoints(t){var e=t.length,i=[];if(!(e<3)){var o=SuperMap.Plot.PlottingUtil.polylineDistance(t);if(!SuperMap.Plot.PlottingUtil.equalFuzzy(o,0)){var s=this.operateCtrlPts(t);e=s.length,e--;var l=[];for(let t=0;t<this.scaleValues.length;t++)l.push(this.scaleValues[t]);var n=this.genArrowBodyPts(o,s,l),a=n.ArrowBodyCenterPts,r=this.genAtPts(e,a,l,n.ArrowTouLen),p=this.calc3rdScalePt(e,a,l,n.ArrowTouLen);return i.push(new SuperMap.Geometry.Point(n.LeftBodyPtsTemp[e].x,n.LeftBodyPtsTemp[e].y)),i.push(new SuperMap.Geometry.Point(r[2].x,r[2].y)),i.push(new SuperMap.Geometry.Point(p.x,p.y)),i}}}operateCtrlPts(t){var e=SuperMap.Plot.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,s=new SuperMap.Geometry.Point(i,o),l=e[2];e[2]=s,e.push(l)}return e}genArrowBodyPts(t,e,i){var o,s,l,n=[],a=[],r=[],p=[],u=[],h=[],y=e.length;if(y--,i.length<this.calcScaleValueCount(y)){var c=this.calcDefaultScaleValues(y);s=c[0],l=c[1]}else s=i[0],l=i[1];var S=SuperMap.Plot.PlottingUtil.clonePoints(e),P=(S[0].x+S[1].x)/2,g=(S[0].y+S[1].y)/2,d=Math.abs(P-S[2].x),f=Math.abs(g-S[2].y),m=0;if(d>0&&f>0){var L=1/(P-S[2].x),M=-1/(g-S[2].y),b=1*S[2].y/(g-S[2].y)-1*S[2].x/(P-S[2].x);m=Math.abs(L*S[0].x+M*S[0].y+b)/Math.sqrt(L*L+M*M)}else f<=1e-4?m=Math.abs(g-S[1].y):d<=1e-4&&(m=Math.abs(P-S[1].x));var T=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(m,S[2],new SuperMap.Geometry.Point(P,g)),v=SuperMap.Plot.PlottingUtil.pointIsRightToLine(S[1],S[2],S[0]);v?(n[1]=S[1],a[1]=S[0]):(n[1]=S[0],a[1]=S[1]),S[1]=new SuperMap.Geometry.Point((S[0].x+S[1].x)/2,(S[0].y+S[1].y)/2);var A=Math.sqrt((T.pntLeft.x-T.pntRight.x)*(T.pntLeft.x-T.pntRight.x)+(T.pntLeft.y-T.pntRight.y)*(T.pntLeft.y-T.pntRight.y))*this.sv_AtWidthDivAwWidth,x=(o=A*this.sv_AtLenDivAtWidth)*l;SuperMap.Plot.PlottingUtil.equalFuzzy(s,0)||(x=(o=t*s)*l);var _,O,w=SuperMap.Plot.PlottingUtil.distance(S[y],S[y-1]),I=2*o;w<I&&(x=(o=w/2)*l),S.push(S[y].clone()),_=0,O=0;var D=0,E=[];for(D=2;D<=y;D++)_+=SuperMap.Plot.PlottingUtil.distance(S[D],S[D-1]);for(_-=o,D=2;D<=y-1;D++)O+=SuperMap.Plot.PlottingUtil.distance(S[D],S[D-1]),E[D]=x+(A-x)*Math.pow((_-O)/_,this.sv_AtScaleParameter);E[y]=x;var C,N,U=new SuperMap.Geometry.Point(0,0),R=new SuperMap.Geometry.Point(0,0),B=new SuperMap.Geometry.Point(0,0);for(D=2;D<=y-1;D++)SuperMap.Plot.PlottingUtil.getTrianglePoints(0,3,S[D-1],S[D],S[D+1],R,B),D==y-1&&SuperMap.Plot.PlottingUtil.getTrapezoidPoints(.5,S[y],S[y-1],B,U),C=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(E[D],R,S[D]),(v=SuperMap.Plot.PlottingUtil.pointIsRightToLine(B,R,C.pntRight))?(n[D]=new SuperMap.Geometry.Point(C.pntRight.x,C.pntRight.y),a[D]=new SuperMap.Geometry.Point(C.pntLeft.x,C.pntLeft.y)):(n[D]=new SuperMap.Geometry.Point(C.pntLeft.x,C.pntLeft.y),a[D]=new SuperMap.Geometry.Point(C.pntRight.x,C.pntRight.y));for(Math.sqrt(1*(S[y].x-U.x)*(S[y].x-U.x)+1*(S[y].y-U.y)*(S[y].y-U.y))>0&&(S[y]=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(o,S[y],U)),C=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(x,S[y+1],S[y]),(v=SuperMap.Plot.PlottingUtil.pointIsRightToLine(S[y],S[y+1],C.pntLeft))?(a[y]=new SuperMap.Geometry.Point(C.pntLeft.x,C.pntLeft.y),n[y]=new SuperMap.Geometry.Point(C.pntRight.x,C.pntRight.y)):(a[y]=new SuperMap.Geometry.Point(C.pntRight.x,C.pntRight.y),n[y]=new SuperMap.Geometry.Point(C.pntLeft.x,C.pntLeft.y)),D=2;D<y;D++)SuperMap.Plot.PlottingUtil.getTrianglePoints(3,3,n[D-1],n[D],n[D+1],R,B),r[D]=new SuperMap.Geometry.Point(R.x,R.y),p[D]=new SuperMap.Geometry.Point(B.x,B.y),SuperMap.Plot.PlottingUtil.getTrianglePoints(3,3,a[D-1],a[D],a[D+1],R,B),u[D]=new SuperMap.Geometry.Point(R.x,R.y),h[D]=new SuperMap.Geometry.Point(B.x,B.y),2==D&&(SuperMap.Plot.PlottingUtil.getTrapezoidPoints(.5,n[1],n[2],r[2],U),p[D]=new SuperMap.Geometry.Point(U.x,U.y),SuperMap.Plot.PlottingUtil.getTrapezoidPoints(.5,a[1],a[2],u[2],U),h[D]=new SuperMap.Geometry.Point(U.x,U.y)),D==y-1&&(I=(w=SuperMap.Plot.PlottingUtil.distance(n[y],n[y-1]))/3,(N=SuperMap.Plot.PlottingUtil.getExcentrePointOnSegmentByScale(I,S[y],S[y+1])).x+=n[y].x-S[y].x,N.y+=n[y].y-S[y].y,I=(w=A-x)*Math.pow(I/_,this.sv_AtScaleParameter),C=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(I,n[y],N),r[y]=new SuperMap.Geometry.Point(C.pntLeft.x,C.pntLeft.y),I=(w=SuperMap.Plot.PlottingUtil.distance(a[y],a[y-1]))/3,(N=SuperMap.Plot.PlottingUtil.getExcentrePointOnSegmentByScale(I,S[y],S[y+1])).x+=a[y].x-S[y].x,N.y+=a[y].y-S[y].y,I=(w=A-x)*Math.pow(I/_,this.sv_AtScaleParameter),C=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(I,a[y],N),u[y]=new SuperMap.Geometry.Point(C.pntRight.x,C.pntRight.y));return{ArrowBodyCenterPts:SuperMap.Plot.PlottingUtil.clonePoints(S),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 s=i[2],l=[],n=o*i[3],a=SuperMap.Plot.PlottingUtil.getExcentrePointOnSegmentByScale(n,e[t],e[t+1]);n=o*s;var r=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(n,e[t+1],a);return l.push(new SuperMap.Geometry.Point(r.pntLeft.x,r.pntLeft.y)),l.push(e[t+1]),l.push(new SuperMap.Geometry.Point(r.pntRight.x,r.pntRight.y)),l}calc3rdScalePt(t,e,i,o){var s=o*i[3];return SuperMap.Plot.PlottingUtil.getExcentrePointOnSegmentByScale(s,e[t],e[t+1])}};SuperMap.Plot.AlgoSymbol1005=class extends SuperMap.Plot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.1),this.CLASS_NAME="SuperMap.Plot.AlgoSymbol1005"}calculateParts(){this.init();var t=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMap.Plot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){this.scaleValues[0]=this.getSubSymbolScaleValue();var e=SuperMap.Plot.PlottingUtil.polylineDistance(t)*this.scaleValues[0],i=SuperMap.Plot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,e,SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYBEZIER,!1),o=[];o.push(i[i.length-1]),o.push(i[i.length-2]);var s=SuperMap.Plot.ArrowToolkit.generateArrowHeadShapePtsBySingleLine(o,e,SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_POLYLINE);this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,i),s.length>0&&this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,s)}}};SuperMap.Plot.AlgoSymbol1006=class extends SuperMap.Plot.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="SuperMap.Plot.AlgoSymbol1006"}calculateParts(){this.init(),this.m_scalePoints=[];var t=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMap.Plot.PlottingUtil.clearSamePts(t)).length>=2&&t.length<this.minEditPts&&this.calAssistantLine(),!(t.length<this.minEditPts)){var e=SuperMap.Plot.PlottingUtil.clonePoints(t),i=e.length,o=!1;void 0!==e[0].z&&(o=!0);var s=this.arrowMeshs(t);if(o){var l=[];for(let t=0;t<i;t++)l.push(e[t]);var n=s.LeftArowLeftBody,a=s.LeftArowHead,r=s.LeftArowRightBody,p=s.RightArowLeftBody,u=s.RightArowHead,h=s.RightArowRightBody;if(0==n.length)return!1;var y=[],c=[],S=[];if(3==l.length)n[0].x==l[0].x&&n[0].y==l[0].y?(c.push(l[0]),c.push(l[2]),S.push(l[1]),S.push(l[2])):(c.push(l[1]),c.push(l[2]),S.push(l[0]),S.push(l[2]));else{if(4!=l.length)return!1;n[0].x==l[0].x&&n[0].y==l[0].y?(c.push(l[0]),S.push(l[1])):(c.push(l[1]),S.push(l[0])),a[1].x==l[2].x&&a[1].y==l[2].y?(c.push(l[2]),S.push(l[3])):(c.push(l[3]),S.push(l[2]))}var P=new SuperMap.Geometry.Point;P=SuperMap.Plot.PlottingUtil.pointProjectToSegment(n[n.length-1],{x:c[0].x,y:c[0].y},{x:c[1].x,y:c[1].y}).projectPoint;var g=this.ComputeZValue(P,c[1],c[0]),d=[];this.ComputeHeight(n,d,c[0].z,g),y=y.concat(d);for(let t=0;t<a.length;t++){P=SuperMap.Plot.PlottingUtil.pointProjectToSegment(a[t],{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]);y.push({x:a[t].x,y:a[t].y,z:f})}P=SuperMap.Plot.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=SuperMap.Plot.PlottingUtil.pointProjectToSegment(r[r.length-1],{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]);P=SuperMap.Plot.PlottingUtil.pointProjectToSegment(p[0],{x:S[0].x,y:S[0].y},{x:S[1].x,y:S[1].y}).projectPoint;var L=(this.ComputeZValue(P,S[1],S[0])+m)/2,M=[];this.ComputeHeight(r,M,g,L),y=y.concat(M),P=SuperMap.Plot.PlottingUtil.pointProjectToSegment(p[p.length-1],{x:S[0].x,y:S[0].y},{x:S[1].x,y:S[1].y}).projectPoint;var b=this.ComputeZValue(P,S[1],S[0]),T=[];this.ComputeHeight(p,T,L,b),y=y.concat(T);for(let t=0;t<u.length;t++){P=SuperMap.Plot.PlottingUtil.pointProjectToSegment(u[t],{x:S[0].x,y:S[0].y},{x:S[1].x,y:S[1].y}).projectPoint;var v=this.ComputeZValue(P,S[1],S[0]);y.push({x:u[t].x,y:u[t].y,z:v})}P=SuperMap.Plot.PlottingUtil.pointProjectToSegment(h[0],{x:S[0].x,y:S[0].y},{x:S[1].x,y:S[1].y}).projectPoint;var A=this.ComputeZValue(P,S[1],S[0]),x=[];this.ComputeHeight(h,x,A,S[0].z),(y=y.concat(x)).length>0&&this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,y,{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 _=s.shapePts;_.length>0&&(this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,_,{surroundLineFlag:!1,lineWidthLimit:!0,strokeWidth:0,weight:0}),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,_,{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,o=SuperMap.Plot.PlottingUtil.operateControlPoints(this.controlPoints),s=new SuperMap.Geometry.Point((o[0].x+o[1].x)/2,(o[0].y+o[1].y)/2),l=new SuperMap.Geometry.Point((o[2].x+o[3].x)/2,(o[2].y+o[3].y)/2),n=SuperMap.Plot.PlottingUtil.pointProjectToSegment(e,s,l);if(n.isOnline){var a=SuperMap.Plot.PlottingUtil.distance(n.projectPoint,s),r=SuperMap.Plot.PlottingUtil.distance(s,l);(i=SuperMap.Plot.PlottingUtil.equalFuzzy(a,0)?this.SV1_MinValue:a/r)>this.SV1_MaxValue&&(i=this.SV1_MaxValue)}else i=SuperMap.Plot.PlottingUtil.distance(n.projectPoint,s)<SuperMap.Plot.PlottingUtil.distance(n.projectPoint,l)?this.SV1_MinValue:this.SV1_MaxValue;this.scaleValues=[],this.scaleValues.push(i)}this.calculateParts()}arrowMeshs(t){var e=new SuperMap.Plot.Path2D,i=[];this.m_bIsAnimation&&4==t.length?i=SuperMap.Plot.PlottingUtil.clonePoints(t):(i=SuperMap.Plot.PlottingUtil.operateControlPoints(t),void 0!==t[0].z&&(i[i.length-1].z=i[i.length-2].z));var o=this.scaleValues[0],s=SuperMap.Plot.PlottingUtil.distance(i[0],i[3]),l=SuperMap.Plot.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 SuperMap.Geometry.Point(a,r),u=.5*(i[1].x+i[2].x),h=.5*(i[1].y+i[2].y),y=new SuperMap.Geometry.Point(u,h),c=SuperMap.Plot.PlottingUtil.distance(p,y);c<this.MIN_LEN_LeftToRightCenter&&(c=this.MIN_LEN_LeftToRightCenter),p.x=a+s*(a-u)/(c*this.QIANJI_RATE1),p.y=r+s*(r-h)/(c*this.QIANJI_RATE1),y.x=u+l*(u-a)/(c*this.QIANJI_RATE1),y.y=h+l*(h-r)/(c*this.QIANJI_RATE1);var S=new SuperMap.Geometry.Point(0,0),P=new SuperMap.Geometry.Point(0,0);S.x=a+s*(a-u)/(c*this.QIANJI_RATE2),S.y=r+s*(r-h)/(c*this.QIANJI_RATE2),P.x=u+l*(u-a)/(c*this.QIANJI_RATE2),P.y=h+l*(h-r)/(c*this.QIANJI_RATE2);var g=new SuperMap.Geometry.Point((i[0].x+i[1].x)/2,(i[0].y+i[1].y)/2),d=new SuperMap.Geometry.Point((i[2].x+i[3].x)/2,(i[2].y+i[3].y)/2),f=i[3].x-(i[3].x-p.x)*this.SCALE_AT,m=i[3].y-(i[3].y-p.y)*this.SCALE_AT,L=i[2].x-(i[2].x-y.x)*this.SCALE_AT,M=i[2].y-(i[2].y-y.y)*this.SCALE_AT,b=new SuperMap.Geometry.Point(0,0),T=new SuperMap.Geometry.Point(0,0),v=new SuperMap.Geometry.Point(0,0),A=new SuperMap.Geometry.Point(0,0);T.x=f-(m-i[3].y)*this.SCALE_ATAJ,T.y=m+(f-i[3].x)*this.SCALE_ATAJ,b.x=f+(m-i[3].y)*this.SCALE_ATAJ,b.y=m-(f-i[3].x)*this.SCALE_ATAJ,A.x=L-(M-i[2].y)*this.SCALE_ATAJ,A.y=M+(L-i[2].x)*this.SCALE_ATAJ,v.x=L+(M-i[2].y)*this.SCALE_ATAJ,v.y=M-(L-i[2].x)*this.SCALE_ATAJ;var x=new SuperMap.Geometry.Point(0,0),_=new SuperMap.Geometry.Point(0,0),O=new SuperMap.Geometry.Point(0,0),w=new SuperMap.Geometry.Point(0,0);x.x=3*b.x-2*f-(i[3].x-f)*this.SCALE_ATAE,x.y=3*b.y-2*m-(i[3].y-m)*this.SCALE_ATAE,_.x=3*T.x-2*f-(i[3].x-f)*this.SCALE_ATAE,_.y=3*T.y-2*m-(i[3].y-m)*this.SCALE_ATAE,O.x=3*v.x-2*L-(i[2].x-L)*this.SCALE_ATAE,O.y=3*v.y-2*M-(i[2].y-M)*this.SCALE_ATAE,w.x=3*A.x-2*L-(i[2].x-L)*this.SCALE_ATAE,w.y=3*A.y-2*M-(i[2].y-M)*this.SCALE_ATAE,p.x=a+s*(a-u)/(c*this.QIANJI_RATE4),p.y=r+s*(r-h)/(c*this.QIANJI_RATE4),y.x=u+l*(u-a)/(c*this.QIANJI_RATE4),y.y=h+l*(h-r)/(c*this.QIANJI_RATE4);var I=new SuperMap.Geometry.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 D=new SuperMap.Geometry.Point(0,0);D.x=i[1].x+(y.x-i[1].x)*this.SCALE_AW,D.y=i[1].y+(y.y-i[1].y)*this.SCALE_AW;var E=new SuperMap.Geometry.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 C=new SuperMap.Geometry.Point(0,0);C.x=A.x+(y.x-A.x)*this.SCALE_ATAJctrlSameSide,C.y=A.y+(y.y-A.y)*this.SCALE_ATAJctrlSameSide;var N=new SuperMap.Geometry.Point(0,0);N.x=T.x+(S.x-T.x)*this.SCALE_ATAJctrlDefSide,N.y=T.y+(S.y-T.y)*this.SCALE_ATAJctrlDefSide;var U=new SuperMap.Geometry.Point(0,0);U.x=v.x+(P.x-v.x)*this.SCALE_ATAJctrlDefSide,U.y=v.y+(P.y-v.y)*this.SCALE_ATAJctrlDefSide;var R=new SuperMap.Geometry.Point(0,0);R.x=g.x+(d.x-g.x)*o,R.y=g.y+(d.y-g.y)*o,this.m_scalePoints.push(new SuperMap.Geometry.Point(R.x,R.y));var B=new SuperMap.Geometry.Point(0,0),G=new SuperMap.Geometry.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,G.x=i[1].x+(i[2].x-i[1].x)*o,G.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,G.x=G.x+(R.x-G.x)*this.QIANJI_RATE3,G.y=G.y+(R.y-G.y)*this.QIANJI_RATE3;var F=[];F.push(i[0].clone()),F.push(I.clone()),F.push(E.clone()),F.push(b.clone()),e.MoveTo(F[0]),e.CurveTo(F[1],F[2],F[3]);var k,z,Y=[],V=[],W=[],j=[],H=[],X=[];for(e.ToSubPathPolygons(X),k=X[0],z=X[0].length,e.LineTo(x),e.LineTo(i[3]),e.LineTo(_),(F=[]).push(T),F.push(N),F.push(B),F.push(R),e.LineTo(F[0]),X=[],e.ToSubPathPolygons(X);z<X[0].length;z++)Y.push(X[0][z]);for(z=X[0].length,e.CurveTo(F[1],F[2],F[3]),X=[],e.ToSubPathPolygons(X);z<X[0].length;z++)V.push(X[0][z]);for(z=X[0].length,(F=[]).push(G),F.push(U),F.push(v),e.CurveTo(F[0],F[1],F[2]),X=[],e.ToSubPathPolygons(X);z<X[0].length;z++)W.push(X[0][z]);for(z=X[0].length,e.LineTo(O),e.LineTo(i[2]),e.LineTo(w),(F=[]).push(A),F.push(C),F.push(D),F.push(n),e.LineTo(F[0]),X=[],e.ToSubPathPolygons(X);z<X[0].length;z++)j.push(X[0][z]);for(z=X[0].length,e.CurveTo(F[1],F[2],F[3]),X=[],e.ToSubPathPolygons(X);z<X[0].length;z++)H.push(X[0][z]);return X=[],e.ToSubPathPolygons(X),{shapePts:X[0],LeftArowLeftBody:k,LeftArowHead:Y,LeftArowRightBody:V,RightArowLeftBody:W,RightArowHead:j,RightArowRightBody:H}}};SuperMap.Plot.AlgoSymbol1007=class extends SuperMap.Plot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.1),this.CLASS_NAME="SuperMap.Plot.AlgoSymbol1007"}calculateParts(){this.init();var t=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMap.Plot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e=!1;void 0!==t[0].z&&(e=!0),this.scaleValues[0]=this.getSubSymbolScaleValue();var i=SuperMap.Plot.PlottingUtil.polylineDistance(t)*this.scaleValues[0],o=SuperMap.Plot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,i,SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYLINE,!0),s=[];s.push(t[t.length-1]),s.push(o[o.length-1]);var l=SuperMap.Plot.ArrowToolkit.generateArrowHeadShapePtsBySingleLine(s,i,SuperMap.Plot.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},y=this.ComputeZValue(o[n-1],u,h);a[n-1].z=y;for(var c=0;c<l.length;++c){var S=this.ComputeZValue(l[c],u,h);r.push({x:l[c].x,y:l[c].y,z:S})}this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,a);let e={surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0};r.length>0&&this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,r,e)}else{this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,o);let t={surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0};l.length>0&&this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,l,t)}}}};SuperMap.Plot.AlgoSymbol1008=class extends SuperMap.Plot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.1),this.CLASS_NAME="SuperMap.Plot.AlgoSymbol1008"}calculateParts(){this.init();var t=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMap.Plot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){this.scaleValues[0]=this.getSubSymbolScaleValue();var e=SuperMap.Plot.PlottingUtil.polylineDistance(t)*this.scaleValues[0],i=Math.sqrt(e*e/3),o=SuperMap.Plot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,i,SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYBEZIER,!0),s=[];s.push(t[t.length-1]),s.push(o[o.length-1]);var l=SuperMap.Plot.ArrowToolkit.generateArrowHeadShapePtsBySingleLine(s,e,SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL);o.push(t[t.length-1]),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,o),l.length>0&&this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,l,{surroundLineFlag:!1,fillLimit:!0,fill:!0})}}};SuperMap.Plot.AlgoSymbol1009=class extends SuperMap.Plot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.1),this.CLASS_NAME="SuperMap.Plot.AlgoSymbol1009"}calculateParts(){this.init();var t=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMap.Plot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e=!1;void 0!==t[0].z&&(e=!0),this.scaleValues[0]=this.getSubSymbolScaleValue();var i=SuperMap.Plot.PlottingUtil.polylineDistance(t)*this.scaleValues[0],o=SuperMap.Plot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,0,SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYLINE,!1),s=[];s.push(o[o.length-1]),s.push(o[o.length-2]);var l=SuperMap.Plot.ArrowToolkit.generateArrowHeadShapePtsBySingleLine(s,i,SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_POLYLINE),n=[];n.push(o[0]),n.push(o[1]);var a=SuperMap.Plot.ArrowToolkit.generateArrowTailShapePtsBySingleLine(n,i,SuperMap.Plot.ArrowToolkit.ArrowTailType.ARROWTAIL_COATTAIL);if(e){for(var r=t.length,p=[],u=[],h=[],y=0;y<r;++y)p.push({x:t[y].x,y:t[y].y,z:t[y].z});var c,S={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],S,P),p.push({x:o[r-1].x,y:o[r-1].y,z:c});for(var g=0;g<l.length;++g)c=this.ComputeZValue(l[g],S,P),u.push({x:l[g].x,y:l[g].y,z:c});for(var d={x:t[1].x,y:t[1].y,z:t[1].z},f={x:t[0].x,y:t[0].y,z:t[0].z},m=0;m<a.length;++m)c=this.ComputeZValue(a[m],d,f),h.push({x:a[m].x,y:a[m].y,z:c});let e={surroundLineFlag:!1};this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,p,e),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,u),0!==h.length&&this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,h)}else{let t={surroundLineFlag:!1};this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,o,t),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,l),0!==a.length&&this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,a)}}}};SuperMap.Plot.AlgoSymbol1010=class extends SuperMap.Plot.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="SuperMap.Plot.AlgoSymbol1010"}calculateParts(){this.init();var t=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMap.Plot.PlottingUtil.clearSamePts(t)).length>=2&&t.length<this.minEditPts&&this.calAssistantLine(),!(t.length<this.minEditPts)){var e=this.arrowMeshs(t);if(SuperMap.Plot.PlottingUtil.clearSamePts(e.shapePts),0!==e.shapePts.length){this.addCell(SuperMap.Plot.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=SuperMap.Plot.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,s,l,n,a=i.length;if(a<=2)return;this.scaleValues.length<4?(o=0,s=.148,l=.4,n=.312):(o=this.scaleValues[0],s=this.scaleValues[1],l=this.scaleValues[2],n=this.scaleValues[3]);var r=SuperMap.Plot.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.length)return;if(u[t]=e.clone(),3===t){var h=SuperMap.Plot.ArrowToolkit.generateArrowBodyShapePts(i,this.scaleValues,SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_MULTIPOLYBEZIER),y=new SuperMap.Geometry.Point(.5*(h.leftBodyPts[0].x+h.rightBodyPts[0].x),.5*(h.leftBodyPts[0].y+h.rightBodyPts[0].y)),c=SuperMap.Plot.PlottingUtil.distance(h.leftBodyPts[0],h.rightBodyPts[0]);this.scaleValues[4]=SuperMap.Plot.PlottingUtil.distance(y,e)/c}else{var S,P,g=a-1;S=a<=3?new SuperMap.Geometry.Point((p[0].x+p[1].x)/2,(p[0].y+p[1].y)/2):p[g-1].clone();var d,f,m,L,M,b,T=new SuperMap.Geometry.Point(0,0),v=new SuperMap.Geometry.Point(0,0),A=new SuperMap.Geometry.Point(0,0);SuperMap.Plot.PlottingUtil.getTrianglePoints(0,3,S,p[g],p[g+1],v,A),SuperMap.Plot.PlottingUtil.getTrapezoidPoints(.5,p[a],p[a-1],A,T),P=T.clone();var x=SuperMap.Plot.PlottingUtil.triangleHeightAndPartBottomLen(p[a],P,u[2]);d=x.dLen1,x.dLen2,0===d&&(d=.1),f=d,o=(d/=n+1)/r,1===t?(L=(x=SuperMap.Plot.PlottingUtil.triangleHeightAndPartBottomLen(p[a],P,u[1])).dLen1,l=(M=x.dLen2)/d,n=(L-d)/d):0===t?(d=(x=SuperMap.Plot.PlottingUtil.triangleHeightAndPartBottomLen(p[a],P,u[0])).dLen1,s=(m=x.dLen2)/d,(b=SuperMap.Plot.PlottingUtil.distance(p[a],p[a-1]))<2*d&&(d=.5*b),L=(x=SuperMap.Plot.PlottingUtil.triangleHeightAndPartBottomLen(p[a],P,u[1])).dLen1,l=(M=x.dLen2)/d,(n=(f-d)/d)<.1&&(l=M/(d=f/(1+(n=.1))),s=m/d),o=d/r):2===t&&(o=d/r),m=d*s,(b=SuperMap.Plot.PlottingUtil.distance(p[a],p[a-1]))<2*d&&(m=(d=.5*b)*s,o=d/r),this.scaleValues[0]=o,this.scaleValues[1]=s,this.scaleValues[2]=l,this.scaleValues[3]=n}}this.calculateParts()}arrowMeshs(t){var e=[],i=[],o=[],s=[],l=[],n=[],a=SuperMap.Plot.PlottingUtil.clonePoints(t),r=SuperMap.Plot.ArrowToolkit.generateArrowBodyShapePts(a,this.scaleValues,SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_MULTIPOLYBEZIER),p=r.arrowTouLen,u=r.leftBodyPts,h=r.rightBodyPts;if(a=r.OpectrlPoints,!SuperMap.Plot.PlottingUtil.equalFuzzy(p,0)){var y=[];y.push(u[u.length-1]),y.push(h[h.length-1]);var c=[];c.push(this.scaleValues[2]),c.push(this.scaleValues[3]),c.push(0),c.push(0);var S=SuperMap.Plot.ArrowToolkit.generateArrowHeadShapePts(a,y,c,p,SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITH_EAR),P=[];P.push(u[0]),P.push(h[0]);var g,d=SuperMap.Plot.ArrowToolkit.generateArrowTailShapePts(t,P,this.scaleValues[4],SuperMap.Plot.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<S.length;t++)e.push(S[t]),s.push(S[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]),l.push(d[t]);var f=a.length;f-=2;var m=p*this.scaleValues[3];g=SuperMap.Plot.PlottingUtil.getExcentrePointOnSegmentByScale(m,a[f],a[f+1]);var L=new SuperMap.Geometry.Point(i[i.length-1].x,i[i.length-1].y);L.isScalePoint=!0,L.tag=0,n.push(L),(L=new SuperMap.Geometry.Point(s[0].x,s[0].y)).isScalePoint=!0,L.tag=1,n.push(L),(L=new SuperMap.Geometry.Point(g.x,g.y)).isScalePoint=!0,L.tag=2,n.push(L),(L=new SuperMap.Geometry.Point(d[1].x,d[1].y)).isScalePoint=!0,L.tag=3,n.push(L)}return{shapePts:e,leftBodyPts:i,rightBodyPts:o,arrowHeadPts:s,arrowTailPts:l,m_scalePoints:n}}operateCtrlPts(t){var e=SuperMap.Plot.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,s=new SuperMap.Geometry.Point(i,o),l=e[2];e[2]=s,e.push(l)}return e}};SuperMap.Plot.AlgoSymbol1011=class extends SuperMap.Plot.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="SuperMap.Plot.AlgoSymbol1011"}calculateParts(){this.init();var t=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMap.Plot.PlottingUtil.clearSamePts(t)).length<2)){var e=SuperMap.Plot.PlottingUtil.polylineDistance(t);if(0!==e){var i=e*this.scaleValues[4],o=SuperMap.Plot.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 s=[];for(let t=0;t<this.scaleValues.length;t++)s.push(this.scaleValues[t]);this.scaleValues=[];for(let t=0;t<s.length-1;t++)this.scaleValues.push(s[t]);SuperMap.Plot.AlgoSymbol1004.prototype.calculateParts.apply(this,arguments);var l=o.pntRight.clone();l.isScalePoint=!0,l.tag=3,this.addScalePoint(l),this.controlPoints=SuperMap.Plot.PlottingUtil.clonePoints(t),this.scaleValues=[];for(let t=0;t<s.length;t++)this.scaleValues.push(s[t])}}}modifyPoint(t,e){if(!0===e.isScalePoint){var i=SuperMap.Plot.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,s=i[0].clone(),l=SuperMap.Plot.PlottingUtil.polylineDistance(i),n=l*this.scaleValues[4],a=SuperMap.Plot.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,y,c=i.length,S=this.operateCtrlPts(i);c=S.length,c--;var P=this.calcScaleValueCount(i.length);if(P++,this.scaleValues.length<P){var g=this.calcDefaultScaleValues(c);r=g[0],p=g[1],u=g[2],h=g[3],y=this.sv_arrowTailWidth}else r=this.scaleValues[0],p=this.scaleValues[1],u=this.scaleValues[2],h=this.scaleValues[3],y=this.scaleValues[4];o=SuperMap.Plot.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 f,m,L=c-1;f=c<=3?new SuperMap.Geometry.Point((S[0].x+S[1].x)/2,(S[0].y+S[1].y)/2):S[L-1].clone();var M,b,T,v,A,x,_=new SuperMap.Geometry.Point(0,0),O=new SuperMap.Geometry.Point(0,0),w=new SuperMap.Geometry.Point(0,0);SuperMap.Plot.PlottingUtil.getTrianglePoints(0,3,f,S[L],S[L+1],O,w),SuperMap.Plot.PlottingUtil.getTrapezoidPoints(.5,S[c],S[c-1],w,_),m=_.clone();var I=SuperMap.Plot.PlottingUtil.triangleHeightAndPartBottomLen(S[c],m,d[2]);M=I.dLen1,I.dLen2,0===M&&(M=.1),b=M,r=(M/=h+1)/o,1===t?(v=(I=SuperMap.Plot.PlottingUtil.triangleHeightAndPartBottomLen(S[c],m,d[1])).dLen1,u=(A=I.dLen2)/M,h=(v-M)/M):0===t?(M=(I=SuperMap.Plot.PlottingUtil.triangleHeightAndPartBottomLen(S[c],m,d[0])).dLen1,p=(T=I.dLen2)/M,(x=SuperMap.Plot.PlottingUtil.distance(S[c],S[c-1]))<2*M&&(M=.5*x),v=(I=SuperMap.Plot.PlottingUtil.triangleHeightAndPartBottomLen(S[c],m,d[1])).dLen1,u=(A=I.dLen2)/M,(h=(b-M)/M)<.1&&(u=A/(M=b/(1+(h=.1))),p=T/M),r=M/o):2===t?r=M/o:y=SuperMap.Plot.PlottingUtil.distance(e,s)/l,T=M*p,(x=SuperMap.Plot.PlottingUtil.distance(S[c],S[c-1]))<2*M&&(T=(M=.5*x)*p,r=M/o),this.scaleValues[0]=r,this.scaleValues[1]=p,this.scaleValues[2]=u,this.scaleValues[3]=h,this.scaleValues[4]=y}this.calculateParts()}arrowMeshs(t){var e=[],i=[],o=[],s=[],l=SuperMap.Plot.PlottingUtil.clonePoints(t),n=SuperMap.Plot.ArrowToolkit.generateArrowBodyShapePts(l,this.scaleValues,SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_MULTIPOLYBEZIER),a=n.arrowTouLen,r=n.leftBodyPts,p=n.rightBodyPts;if(!SuperMap.Plot.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 y=SuperMap.Plot.ArrowToolkit.generateArrowHeadShapePts(l,u,h,a,SuperMap.Plot.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<y.length;t++)e.push(y[t]),s.push(y[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:s}}updateScalePoints(t){var e=t.length,i=[];if(!(e<3)){var o=SuperMap.Plot.PlottingUtil.polylineDistance(t);if(!SuperMap.Plot.PlottingUtil.equalFuzzy(o,0)){var s=this.operateCtrlPts(t);e=s.length,e--;var l=[];for(let t=0;t<this.scaleValues.length;t++)l.push(this.scaleValues[t]);var n=this.genArrowBodyPts(o,s,l),a=n.ArrowBodyCenterPts,r=this.genAtPts(e,a,l,n.ArrowTouLen),p=this.calc3rdScalePt(e,a,l,n.ArrowTouLen);return i.push(new SuperMap.Geometry.Point(n.LeftBodyPtsTemp[e].x,n.LeftBodyPtsTemp[e].y)),i.push(new SuperMap.Geometry.Point(r[2].x,r[2].y)),i.push(new SuperMap.Geometry.Point(p.x,p.y)),i}}}operateCtrlPts(t){var e=SuperMap.Plot.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,s=new SuperMap.Geometry.Point(i,o),l=e[2];e[2]=s,e.push(l)}return e}genArrowBodyPts(t,e,i){var o,s,l,n=[],a=[],r=[],p=[],u=[],h=[],y=e.length;if(y--,i.length<this.calcScaleValueCount(y)){var c=this.calcDefaultScaleValues(y);s=c[0],l=c[1]}else s=i[0],l=i[1];var S=SuperMap.Plot.PlottingUtil.clonePoints(e),P=(S[0].x+S[1].x)/2,g=(S[0].y+S[1].y)/2,d=Math.abs(P-S[2].x),f=Math.abs(g-S[2].y),m=0;if(d>0&&f>0){var L=1/(P-S[2].x),M=-1/(g-S[2].y),b=1*S[2].y/(g-S[2].y)-1*S[2].x/(P-S[2].x);m=Math.abs(L*S[0].x+M*S[0].y+b)/Math.sqrt(L*L+M*M)}else f<=1e-4?m=Math.abs(g-S[1].y):d<=1e-4&&(m=Math.abs(P-S[1].x));var T=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(m,S[2],new SuperMap.Geometry.Point(P,g)),v=SuperMap.Plot.PlottingUtil.pointIsRightToLine(S[1],S[2],S[0]);v?(n[1]=S[1],a[1]=S[0]):(n[1]=S[0],a[1]=S[1]),S[1]=new SuperMap.Geometry.Point((S[0].x+S[1].x)/2,(S[0].y+S[1].y)/2);var A=Math.sqrt((T.pntLeft.x-T.pntRight.x)*(T.pntLeft.x-T.pntRight.x)+(T.pntLeft.y-T.pntRight.y)*(T.pntLeft.y-T.pntRight.y))*this.sv_AtWidthDivAwWidth,x=(o=A*this.sv_AtLenDivAtWidth)*l;SuperMap.Plot.PlottingUtil.equalFuzzy(s,0)||(x=(o=t*s)*l);var _,O,w=SuperMap.Plot.PlottingUtil.distance(S[y],S[y-1]),I=2*o;w<I&&(x=(o=w/2)*l),S.push(S[y].clone()),_=0,O=0;var D=0,E=[];for(D=2;D<=y;D++)_+=SuperMap.Plot.PlottingUtil.distance(S[D],S[D-1]);for(_-=o,D=2;D<=y-1;D++)O+=SuperMap.Plot.PlottingUtil.distance(S[D],S[D-1]),E[D]=x+(A-x)*Math.pow((_-O)/_,this.sv_AtScaleParameter);E[y]=x;var C,N,U=new SuperMap.Geometry.Point(0,0),R=new SuperMap.Geometry.Point(0,0),B=new SuperMap.Geometry.Point(0,0);for(D=2;D<=y-1;D++)SuperMap.Plot.PlottingUtil.getTrianglePoints(0,3,S[D-1],S[D],S[D+1],R,B),D===y-1&&SuperMap.Plot.PlottingUtil.getTrapezoidPoints(.5,S[y],S[y-1],B,U),C=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(E[D],R,S[D]),(v=SuperMap.Plot.PlottingUtil.pointIsRightToLine(B,R,C.pntRight))?(n[D]=new SuperMap.Geometry.Point(C.pntRight.x,C.pntRight.y),a[D]=new SuperMap.Geometry.Point(C.pntLeft.x,C.pntLeft.y)):(n[D]=new SuperMap.Geometry.Point(C.pntLeft.x,C.pntLeft.y),a[D]=new SuperMap.Geometry.Point(C.pntRight.x,C.pntRight.y));for(Math.sqrt(1*(S[y].x-U.x)*(S[y].x-U.x)+1*(S[y].y-U.y)*(S[y].y-U.y))>0&&(S[y]=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(o,S[y],U)),C=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(x,S[y+1],S[y]),(v=SuperMap.Plot.PlottingUtil.pointIsRightToLine(S[y],S[y+1],C.pntLeft))?(a[y]=new SuperMap.Geometry.Point(C.pntLeft.x,C.pntLeft.y),n[y]=new SuperMap.Geometry.Point(C.pntRight.x,C.pntRight.y)):(a[y]=new SuperMap.Geometry.Point(C.pntRight.x,C.pntRight.y),n[y]=new SuperMap.Geometry.Point(C.pntLeft.x,C.pntLeft.y)),D=2;D<y;D++)SuperMap.Plot.PlottingUtil.getTrianglePoints(3,3,n[D-1],n[D],n[D+1],R,B),r[D]=new SuperMap.Geometry.Point(R.x,R.y),p[D]=new SuperMap.Geometry.Point(B.x,B.y),SuperMap.Plot.PlottingUtil.getTrianglePoints(3,3,a[D-1],a[D],a[D+1],R,B),u[D]=new SuperMap.Geometry.Point(R.x,R.y),h[D]=new SuperMap.Geometry.Point(B.x,B.y),2===D&&(SuperMap.Plot.PlottingUtil.getTrapezoidPoints(.5,n[1],n[2],r[2],U),p[D]=new SuperMap.Geometry.Point(U.x,U.y),SuperMap.Plot.PlottingUtil.getTrapezoidPoints(.5,a[1],a[2],u[2],U),h[D]=new SuperMap.Geometry.Point(U.x,U.y)),D===y-1&&(I=(w=SuperMap.Plot.PlottingUtil.distance(n[y],n[y-1]))/3,(N=SuperMap.Plot.PlottingUtil.getExcentrePointOnSegmentByScale(I,S[y],S[y+1])).x+=n[y].x-S[y].x,N.y+=n[y].y-S[y].y,I=(w=A-x)*Math.pow(I/_,this.sv_AtScaleParameter),C=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(I,n[y],N),r[y]=new SuperMap.Geometry.Point(C.pntLeft.x,C.pntLeft.y),I=(w=SuperMap.Plot.PlottingUtil.distance(a[y],a[y-1]))/3,(N=SuperMap.Plot.PlottingUtil.getExcentrePointOnSegmentByScale(I,S[y],S[y+1])).x+=a[y].x-S[y].x,N.y+=a[y].y-S[y].y,I=(w=A-x)*Math.pow(I/_,this.sv_AtScaleParameter),C=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(I,a[y],N),u[y]=new SuperMap.Geometry.Point(C.pntRight.x,C.pntRight.y));return{ArrowBodyCenterPts:SuperMap.Plot.PlottingUtil.clonePoints(S),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 s=i[2],l=[],n=o*i[3],a=SuperMap.Plot.PlottingUtil.getExcentrePointOnSegmentByScale(n,e[t],e[t+1]);n=o*s;var r=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(n,e[t+1],a);return l.push(new SuperMap.Geometry.Point(r.pntLeft.x,r.pntLeft.y)),l.push(e[t+1]),l.push(new SuperMap.Geometry.Point(r.pntRight.x,r.pntRight.y)),l}calc3rdScalePt(t,e,i,o){var s=o*i[3];return SuperMap.Plot.PlottingUtil.getExcentrePointOnSegmentByScale(s,e[t],e[t+1])}};SuperMap.Plot.AlgoSymbol1012=class extends SuperMap.Plot.AlgoSymbol1005{constructor(t){super(t),this.subSymbolDefaultPixelSize=15,this.CLASS_NAME="SuperMap.Plot.AlgoSymbol1012"}};SuperMap.Plot.AlgoSymbol1013=class extends SuperMap.Plot.AlgoSymbol1007{constructor(t){super(t),this.subSymbolDefaultPixelSize=15,this.CLASS_NAME="SuperMap.Plot.AlgoSymbol1013"}};SuperMap.Plot.AlgoSymbol1014=class extends SuperMap.Plot.AlgoSymbol1008{constructor(t){super(t),this.subSymbolDefaultPixelSize=15,this.CLASS_NAME="SuperMap.Plot.AlgoSymbol1014"}};SuperMap.Plot.AlgoSymbol1015=class extends SuperMap.Plot.AlgoSymbol1009{constructor(t){super(t),this.subSymbolDefaultPixelSize=15,this.CLASS_NAME="SuperMap.Plot.AlgoSymbol1015"}};SuperMap.Plot.AlgoSymbol1016=class extends SuperMap.Plot.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="SuperMap.Plot.AlgoSymbol1016"}calculateParts(){this.init();var t=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMap.Plot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e={surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fillStyle:0,lineTypeLimit:!0};this.scaleValues[0]=this.getSubSymbolScaleValue();var i,o=SuperMap.Plot.PlottingUtil.polylineDistance(t)*this.scaleValues[0],s=2*Math.sqrt(o*o/3)/1.4,l=Math.sqrt(o*o/3),n=!1;this.arrowBodyType===SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_COATTAIL?i=SuperMap.Plot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,o,this.arrowBodyType,n):this.arrowHeadType===SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE||this.arrowHeadType===SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE_SOLID?(n=!0,i=SuperMap.Plot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,o,this.arrowBodyType,n)):this.arrowHeadType===SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_POLYLINE?i=SuperMap.Plot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,o,this.arrowBodyType,n):this.arrowHeadType===SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL_HOLLOW?(n=!0,i=SuperMap.Plot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,s,this.arrowBodyType,n)):this.arrowHeadType===SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL?(n=!0,i=SuperMap.Plot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,l,this.arrowBodyType,n)):i=SuperMap.Plot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,0,this.arrowBodyType,n);var a=[];this.arrowBodyType===SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_COATTAIL?(a.push(t[t.length-1]),a.push(t[t.length-2])):n?(a.push(t[t.length-1]),a.push(i[i.length-1])):(a.push(i[i.length-1]),a.push(i[i.length-2]));var r,p=SuperMap.Plot.ArrowToolkit.generateArrowHeadShapePtsBySingleLine(a,o,this.arrowHeadType);if(i.length>1)if(this.arrowBodyType!==SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_COATTAIL)this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,i);else for(var u=0,h=i.length-1;u<h;u+=2){var y=SuperMap.Plot.PlottingUtil.distance(i[u+1],i[u]),c=180*SuperMap.Plot.PlottingUtil.radian(i[u+1],i[u])/Math.PI,S=SuperMap.Plot.PlottingUtil.circlePoint(i[u+1],.3*y,.3*y,c+30),P=SuperMap.Plot.PlottingUtil.circlePoint(i[u+1],.3*y,.3*y,c+330),g=SuperMap.Plot.PlottingUtil.circlePoint(i[u],.3*y,.3*y,c+30),d=SuperMap.Plot.PlottingUtil.circlePoint(i[u],.3*y,.3*y,c+330),f=[];f.push(S,i[u+1],P,d,i[u],g),this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,f,e)}r=this.arrowBodyType===SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYBEZIER?SuperMap.Plot.ArrowToolkit.generateArrowTailShapePtsBySingleLine([i[0],i[1]],o,this.arrowTailType):SuperMap.Plot.ArrowToolkit.generateArrowTailShapePtsBySingleLine([t[0],t[1]],o,this.arrowTailType);var m=SuperMap.Plot.SymbolType.POLYLINESYMBOL;this.arrowHeadType!==SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL&&this.arrowHeadType!==SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE_SOLID&&this.arrowHeadType!==SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE&&this.arrowHeadType!==SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL_HOLLOW||(m=SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL),p.length>1&&this.addCell(m,p,e),r.length>1&&this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,r)}}};SuperMap.Plot.AlgoSymbol1017=class extends SuperMap.Plot.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=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMap.Plot.PlottingUtil.clearSamePts(t)).length>=this.minEditPts){this.scalePoints=[];var e=SuperMap.Plot.PlottingUtil.clonePoints(t);this.isEdit||(this.scaleValues[0]=1.5*this.getSubSymbolScaleValue());var i=SuperMap.Plot.ArrowToolkit.generateArrowBodyShapePts(e,this.scaleValues,SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_PARALLEL),o=i.arrowTouLen,s=i.leftBodyPts,l=i.rightBodyPts,n=[];n.push(s[s.length-1]),n.push(l[l.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=SuperMap.Plot.ArrowToolkit.generateArrowHeadShapePts(e,n,a,o,SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITHOUT_EAR),p=[];p=(p=p.concat(s)).concat(r);for(let t=l.length-1;t>=0;t--)p.push(l[t]);p.push(p[0]),this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,p,{lineWidthLimit:!0,strokeWidth:0,weight:0,surroundLineFlag:!1});var u=SuperMap.Plot.PlottingUtil.clonePoints(s),h=[];for(let t=l.length-1;t>=0;t--)h.push(l[t]);h=h.concat(u),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,h);var y=SuperMap.Plot.PlottingUtil.clonePoints(r);y.push(l[l.length-1]),y.splice(0,0,s[s.length-1]),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,y,{lineTypeLimit:!0});var c=new SuperMap.Geometry.Point((n[0].x+n[1].x)/2,(n[0].y+n[1].y)/2),S=new SuperMap.Geometry.Point(c.x,c.y);S.isScalePoint=!0,S.tag=0,this.scalePoints.push(S);var P=new SuperMap.Geometry.Point(s[s.length-1].x,s[s.length-1].y);P.isScalePoint=!0,P.tag=1,this.scalePoints.push(P);var g=new SuperMap.Geometry.Point(r[0].x,r[0].y);g.isScalePoint=!0,g.tag=2,this.scalePoints.push(g),this.finish()}}modifyPoint(t,e){if(!0===e.isScalePoint){var i=new SuperMap.Geometry.Point(this.scalePoints[0].x,this.scalePoints[0].y),o=new SuperMap.Geometry.Point(this.scalePoints[1].x,this.scalePoints[1].y),s=new SuperMap.Geometry.Point(this.scalePoints[2].x,this.scalePoints[2].y),l=this.scaleValues[0],n=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);n=SuperMap.Plot.PlottingUtil.clearSamePts(n);var a=SuperMap.Plot.PlottingUtil.polylineDistance(n),r=a*l;if(0==t){let t=SuperMap.Plot.PlottingUtil.pointProjectToSegment(e,n[n.length-2],n[n.length-1]),i=t.projectPoint;if(t.isOnline){let t=SuperMap.Plot.PlottingUtil.distance(i,n[n.length-1]);this.scaleValues[0]=t/a}}else if(1==t){let t=SuperMap.Plot.PlottingUtil.pointProjectToSegment(e,o,s).projectPoint,l=SuperMap.Plot.PlottingUtil.distance(t,i);this.scaleValues[1]=l/r}else if(2==t){let t=SuperMap.Plot.PlottingUtil.pointProjectToSegment(e,n[1],s).projectPoint,o=SuperMap.Plot.PlottingUtil.pointProjectToSegment(t,i,n[1]),l=o.projectPoint,a=SuperMap.Plot.PlottingUtil.distance(l,i);!1===o.isOnline&&(this.scaleValues[4]=a/r)}}this.calculateParts()}};SuperMap.Plot.AlgoSymbol1018=class extends SuperMap.Plot.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=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMap.Plot.PlottingUtil.clearSamePts(t)).length>=2&&t.length<this.minEditPts&&this.calAssistantLine(),!(t.length<3)){var e=SuperMap.Plot.PlottingUtil.clonePoints(t),i=this.arrowMeshs(e),o=SuperMap.Plot.PlottingUtil.clonePoints(i.shapePts);(o=SuperMap.Plot.PlottingUtil.clearSamePts(o)).push(o[0]);var s=SuperMap.Plot.PlottingUtil.clearSamePts(i.leftBodyPts),l=SuperMap.Plot.PlottingUtil.clearSamePts(i.rightBodyPts),n=SuperMap.Plot.PlottingUtil.clearSamePts(i.arrowHeadPts);if(0!=i.shapePts.length){var a=SuperMap.Plot.PlottingUtil.polylineDistance(s),r=SuperMap.Plot.PlottingUtil.getPtsIndexByDistance(.4*a,s),p=[],u=[],h=[];if(r.bfind)for(let t=0;t<=r.index;t++)p.push(s[t]);var y=SuperMap.Plot.PlottingUtil.getPtsIndexByDistance(.45*a,s),c=SuperMap.Plot.PlottingUtil.getPtsIndexByDistance(.8*a,s);if(y.bfind&&c.bfind)for(let t=y.index;t<=c.index;t++)u.push(s[t]);var S=SuperMap.Plot.PlottingUtil.getPtsIndexByDistance(.85*a,s);if(S.bfind)for(let t=S.index;t<s.length;t++)h.push(s[t]);var P=SuperMap.Plot.PlottingUtil.polylineDistance(l),g=SuperMap.Plot.PlottingUtil.getPtsIndexByDistance(.15*P,l),d=[],f=[],m=[];if(g.bfind)for(let t=0;t<=g.index;t++)d.push(l[t]);var L=SuperMap.Plot.PlottingUtil.getPtsIndexByDistance(.2*P,l),M=SuperMap.Plot.PlottingUtil.getPtsIndexByDistance(.55*P,l);if(L.bfind&&M.bfind)for(let t=L.index;t<=M.index;t++)f.push(l[t]);var b=SuperMap.Plot.PlottingUtil.getPtsIndexByDistance(.6*P,l);if(b.bfind)for(let t=b.index;t<l.length;t++)m.push(l[t]);var T=SuperMap.Plot.PlottingUtil.clonePoints(n);T.splice(0,0,s[s.length-1]),T.push(l[0]),this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,o,{lineWidthLimit:!0,strokeWidth:0,weight:0,surroundLineFlag:!1}),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,p,{surroundLineFlag:!1}),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,u,{surroundLineFlag:!1}),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,h,{surroundLineFlag:!1}),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,d,{surroundLineFlag:!1}),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,f,{surroundLineFlag:!1}),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,m,{surroundLineFlag:!1}),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,T,{surroundLineFlag:!1,lineTypeLimit:!0});var v=this.updateScalePoints(e);if(this.scalePoints=[],3!=v.length)v=[];else for(let t=0;t<v.length;t++)v[t].isScalePoint=!0,v[t].tag=t,this.scalePoints.push(v[t]);this.finish()}else this.finish()}}modifyPoint(t,e){if(!0===e.isScalePoint){var i=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);i=SuperMap.Plot.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 s,l,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);s=u[0],l=u[1],n=u[2],a=u[3]}else s=this.scaleValues[0],l=this.scaleValues[1],n=this.scaleValues[2],a=this.scaleValues[3];var h=SuperMap.Plot.PlottingUtil.polylineDistance(i),y=[];for(let t=0;t<this.scalePoints.length;t++)y.push(this.scalePoints[t].clone());if(0==y.length)return;y[t]=e.clone();var c,S,P=o-1;c=o<=3?new SuperMap.Geometry.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2):r[P-1].clone();var g,d,f,m,L,M,b=new SuperMap.Geometry.Point(0,0),T=new SuperMap.Geometry.Point(0,0),v=new SuperMap.Geometry.Point(0,0);SuperMap.Plot.PlottingUtil.getTrianglePoints(0,3,c,r[P],r[P+1],T,v),SuperMap.Plot.PlottingUtil.getTrapezoidPoints(.5,r[o],r[o-1],v,b),S=b.clone();var A=SuperMap.Plot.PlottingUtil.triangleHeightAndPartBottomLen(r[o],S,y[2]);g=A.dLen1,A.dLen2,0==g&&(g=.1),d=g,s=(g/=a+1)/h,1==t?(m=(A=SuperMap.Plot.PlottingUtil.triangleHeightAndPartBottomLen(r[o],S,y[1])).dLen1,n=(L=A.dLen2)/g,a=(m-g)/g):0==t?(g=(A=SuperMap.Plot.PlottingUtil.triangleHeightAndPartBottomLen(r[o],S,y[0])).dLen1,l=(f=A.dLen2)/g,(M=SuperMap.Plot.PlottingUtil.distance(r[o],r[o-1]))<2*g&&(g=.5*M),m=(A=SuperMap.Plot.PlottingUtil.triangleHeightAndPartBottomLen(r[o],S,y[1])).dLen1,n=(L=A.dLen2)/g,(a=(d-g)/g)<.1&&(n=L/(g=d/(1+(a=.1))),l=f/g),s=g/h):2==t&&(s=g/h),f=g*l,(M=SuperMap.Plot.PlottingUtil.distance(r[o],r[o-1]))<2*g&&(f=(g=.5*M)*l,s=g/h),this.scaleValues[0]=s,this.scaleValues[1]=l,this.scaleValues[2]=n,this.scaleValues[3]=a}this.calculateParts()}arrowMeshs(t){var e=[],i=[],o=[],s=[],l=SuperMap.Plot.PlottingUtil.clonePoints(t),n=SuperMap.Plot.ArrowToolkit.generateArrowBodyShapePts(l,this.scaleValues,SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_MULTIPOLYBEZIER),a=n.arrowTouLen,r=n.leftBodyPts,p=n.rightBodyPts;if(!SuperMap.Plot.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 y=SuperMap.Plot.ArrowToolkit.generateArrowHeadShapePts(l,u,h,a,SuperMap.Plot.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<y.length;t++)e.push(y[t]),s.push(y[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:s}}updateScalePoints(t){var e=t.length,i=[];if(!(e<3)){var o=SuperMap.Plot.PlottingUtil.polylineDistance(t);if(!SuperMap.Plot.PlottingUtil.equalFuzzy(o,0)){var s=this.operateCtrlPts(t);e=s.length,e--;var l=[];for(let t=0;t<this.scaleValues.length;t++)l.push(this.scaleValues[t]);var n=this.genArrowBodyPts(o,s,l),a=n.ArrowBodyCenterPts,r=this.genAtPts(e,a,l,n.ArrowTouLen),p=this.calc3rdScalePt(e,a,l,n.ArrowTouLen);return i.push(new SuperMap.Geometry.Point(n.LeftBodyPtsTemp[e].x,n.LeftBodyPtsTemp[e].y)),i.push(new SuperMap.Geometry.Point(r[2].x,r[2].y)),i.push(new SuperMap.Geometry.Point(p.x,p.y)),i}}}operateCtrlPts(t){var e=SuperMap.Plot.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,s=new SuperMap.Geometry.Point(i,o),l=e[2];e[2]=s,e.push(l)}return e}genArrowBodyPts(t,e,i){var o,s,l,n=[],a=[],r=[],p=[],u=[],h=[],y=e.length;if(y--,i.length<this.calcScaleValueCount(y)){var c=this.calcDefaultScaleValues(y);s=c[0],l=c[1]}else s=i[0],l=i[1];var S=SuperMap.Plot.PlottingUtil.clonePoints(e),P=(S[0].x+S[1].x)/2,g=(S[0].y+S[1].y)/2,d=Math.abs(P-S[2].x),f=Math.abs(g-S[2].y),m=0;if(d>0&&f>0){var L=1/(P-S[2].x),M=-1/(g-S[2].y),b=1*S[2].y/(g-S[2].y)-1*S[2].x/(P-S[2].x);m=Math.abs(L*S[0].x+M*S[0].y+b)/Math.sqrt(L*L+M*M)}else f<=1e-4?m=Math.abs(g-S[1].y):d<=1e-4&&(m=Math.abs(P-S[1].x));var T=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(m,S[2],new SuperMap.Geometry.Point(P,g)),v=SuperMap.Plot.PlottingUtil.pointIsRightToLine(S[1],S[2],S[0]);v?(n[1]=S[1],a[1]=S[0]):(n[1]=S[0],a[1]=S[1]),S[1]=new SuperMap.Geometry.Point((S[0].x+S[1].x)/2,(S[0].y+S[1].y)/2);var A=Math.sqrt((T.pntLeft.x-T.pntRight.x)*(T.pntLeft.x-T.pntRight.x)+(T.pntLeft.y-T.pntRight.y)*(T.pntLeft.y-T.pntRight.y))*this.sv_AtWidthDivAwWidth,x=(o=A*this.sv_AtLenDivAtWidth)*l;SuperMap.Plot.PlottingUtil.equalFuzzy(s,0)||(x=(o=t*s)*l);var _,O,w=SuperMap.Plot.PlottingUtil.distance(S[y],S[y-1]),I=2*o;w<I&&(x=(o=w/2)*l),S.push(S[y].clone()),_=0,O=0;var D=0,E=[];for(D=2;D<=y;D++)_+=SuperMap.Plot.PlottingUtil.distance(S[D],S[D-1]);for(_-=o,D=2;D<=y-1;D++)O+=SuperMap.Plot.PlottingUtil.distance(S[D],S[D-1]),E[D]=x+(A-x)*Math.pow((_-O)/_,this.sv_AtScaleParameter);E[y]=x;var C,N,U=new SuperMap.Geometry.Point(0,0),R=new SuperMap.Geometry.Point(0,0),B=new SuperMap.Geometry.Point(0,0);for(D=2;D<=y-1;D++)SuperMap.Plot.PlottingUtil.getTrianglePoints(0,3,S[D-1],S[D],S[D+1],R,B),D==y-1&&SuperMap.Plot.PlottingUtil.getTrapezoidPoints(.5,S[y],S[y-1],B,U),C=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(E[D],R,S[D]),(v=SuperMap.Plot.PlottingUtil.pointIsRightToLine(B,R,C.pntRight))?(n[D]=new SuperMap.Geometry.Point(C.pntRight.x,C.pntRight.y),a[D]=new SuperMap.Geometry.Point(C.pntLeft.x,C.pntLeft.y)):(n[D]=new SuperMap.Geometry.Point(C.pntLeft.x,C.pntLeft.y),a[D]=new SuperMap.Geometry.Point(C.pntRight.x,C.pntRight.y));for(Math.sqrt(1*(S[y].x-U.x)*(S[y].x-U.x)+1*(S[y].y-U.y)*(S[y].y-U.y))>0&&(S[y]=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(o,S[y],U)),C=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(x,S[y+1],S[y]),(v=SuperMap.Plot.PlottingUtil.pointIsRightToLine(S[y],S[y+1],C.pntLeft))?(a[y]=new SuperMap.Geometry.Point(C.pntLeft.x,C.pntLeft.y),n[y]=new SuperMap.Geometry.Point(C.pntRight.x,C.pntRight.y)):(a[y]=new SuperMap.Geometry.Point(C.pntRight.x,C.pntRight.y),n[y]=new SuperMap.Geometry.Point(C.pntLeft.x,C.pntLeft.y)),D=2;D<y;D++)SuperMap.Plot.PlottingUtil.getTrianglePoints(3,3,n[D-1],n[D],n[D+1],R,B),r[D]=new SuperMap.Geometry.Point(R.x,R.y),p[D]=new SuperMap.Geometry.Point(B.x,B.y),SuperMap.Plot.PlottingUtil.getTrianglePoints(3,3,a[D-1],a[D],a[D+1],R,B),u[D]=new SuperMap.Geometry.Point(R.x,R.y),h[D]=new SuperMap.Geometry.Point(B.x,B.y),2==D&&(SuperMap.Plot.PlottingUtil.getTrapezoidPoints(.5,n[1],n[2],r[2],U),p[D]=new SuperMap.Geometry.Point(U.x,U.y),SuperMap.Plot.PlottingUtil.getTrapezoidPoints(.5,a[1],a[2],u[2],U),h[D]=new SuperMap.Geometry.Point(U.x,U.y)),D==y-1&&(I=(w=SuperMap.Plot.PlottingUtil.distance(n[y],n[y-1]))/3,(N=SuperMap.Plot.PlottingUtil.getExcentrePointOnSegmentByScale(I,S[y],S[y+1])).x+=n[y].x-S[y].x,N.y+=n[y].y-S[y].y,I=(w=A-x)*Math.pow(I/_,this.sv_AtScaleParameter),C=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(I,n[y],N),r[y]=new SuperMap.Geometry.Point(C.pntLeft.x,C.pntLeft.y),I=(w=SuperMap.Plot.PlottingUtil.distance(a[y],a[y-1]))/3,(N=SuperMap.Plot.PlottingUtil.getExcentrePointOnSegmentByScale(I,S[y],S[y+1])).x+=a[y].x-S[y].x,N.y+=a[y].y-S[y].y,I=(w=A-x)*Math.pow(I/_,this.sv_AtScaleParameter),C=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(I,a[y],N),u[y]=new SuperMap.Geometry.Point(C.pntRight.x,C.pntRight.y));return{ArrowBodyCenterPts:SuperMap.Plot.PlottingUtil.clonePoints(S),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 s=i[2],l=[],n=o*i[3],a=SuperMap.Plot.PlottingUtil.getExcentrePointOnSegmentByScale(n,e[t],e[t+1]);n=o*s;var r=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(n,e[t+1],a);return l.push(new SuperMap.Geometry.Point(r.pntLeft.x,r.pntLeft.y)),l.push(e[t+1]),l.push(new SuperMap.Geometry.Point(r.pntRight.x,r.pntRight.y)),l}calc3rdScalePt(t,e,i,o){var s=o*i[3];return SuperMap.Plot.PlottingUtil.getExcentrePointOnSegmentByScale(s,e[t],e[t+1])}};SuperMap.Plot.AlgoSymbol1019=class extends SuperMap.Plot.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=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMap.Plot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){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=SuperMap.Plot.PlottingUtil.distance(e,i),s=this.scaleValues[0],l=new SuperMap.Geometry.Point(0,-o*s),n=new SuperMap.Geometry.Point(0,o*s),a=this.scaleValues[1],r=this.scaleValues[3],p=new SuperMap.Geometry.Point(o*(1-r),-o*a),u=new SuperMap.Geometry.Point(o*(1-r),o*a),h=this.scaleValues[2],y=this.scaleValues[4],c=new SuperMap.Geometry.Point(o*(1-y),-o*h),S=new SuperMap.Geometry.Point(o*(1-y),o*h),P=new SuperMap.Geometry.Point(o,0),g=SuperMap.Plot.PlottingUtil.radian(e,i),d=[];d.push(l),d.push(p),d.push(c),d.push(P),d.push(S),d.push(u),d.push(n),d.push(l);var f=[];for(let t=0;t<d.length;t++){var m=SuperMap.Plot.PlottingUtil.coordinateTrans(e,d[t],g*SuperMap.Plot.PlottingUtil.RTOD);f.push(m)}var L=[];for(let t=f.length-1;t>=0;--t)L.push(f[t]);this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,L,{lineWidthLimit:!0,strokeWidth:0,weight:0,surroundLineFlag:!1}),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,[L[2],L[1],L[7],L[6]],{surroundLineFlag:!1}),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,[L[6],L[5],L[4],L[3],L[2]],{lineTypeLimit:!0,surroundLineFlag:!1}),this.scalePoints=[];var M=f[0].clone();M.isScalePoint=!0,M.tag=0,this.scalePoints.push(M);var b=f[1].clone();b.isScalePoint=!0,b.tag=1,this.scalePoints.push(b);var T=f[2].clone();T.isScalePoint=!0,T.tag=2,this.scalePoints.push(T),this.finish()}}modifyPoint(t,e){if(e.isScalePoint&&(t>=0||t<3)){var i=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);i=SuperMap.Plot.PlottingUtil.clearSamePts(i);var o=SuperMap.Plot.PlottingUtil.distance(i[0],i[1]),s=i[0].clone(),l=i[1].clone(),n=e.clone();if(0==t){var a=SuperMap.Plot.PlottingUtil.distance(n,s)/o;this.scaleValues[0]=a}else if(1==t){let t=SuperMap.Plot.PlottingUtil.projectPoint(n,s,l),e=SuperMap.Plot.PlottingUtil.distance(t,n)/o;this.scaleValues[1]=e;let i=SuperMap.Plot.PlottingUtil.distance(t,l)/o;this.scaleValues[3]=i}else if(2==t){let t=SuperMap.Plot.PlottingUtil.projectPoint(n,s,l),e=SuperMap.Plot.PlottingUtil.distance(t,n)/o;this.scaleValues[2]=e;let i=SuperMap.Plot.PlottingUtil.distance(t,l)/o;this.scaleValues[4]=i}}this.calculateParts()}};SuperMap.Plot.AlgoSymbol1020=class extends SuperMap.Plot.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=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMap.Plot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){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=SuperMap.Plot.PlottingUtil.distance(e,i),s=this.scaleValues[0],l=new SuperMap.Geometry.Point(0,-o*s),n=new SuperMap.Geometry.Point(0,o*s),a=this.scaleValues[1],r=this.scaleValues[3],p=new SuperMap.Geometry.Point(o*(1-r),-o*a),u=new SuperMap.Geometry.Point(o*(1-r),o*a),h=this.scaleValues[2],y=this.scaleValues[4],c=new SuperMap.Geometry.Point(o*(1-y),-o*h),S=new SuperMap.Geometry.Point(o*(1-y),o*h),P=new SuperMap.Geometry.Point(o,0),g=SuperMap.Plot.PlottingUtil.radian(e,i),d=SuperMap.Plot.PlottingUtil.distance(l,p),f=SuperMap.Plot.PlottingUtil.findPointInLine(l,p,.3*d),m=SuperMap.Plot.PlottingUtil.findPointInLine(l,p,.4*d),L=SuperMap.Plot.PlottingUtil.distance(u,n),M=SuperMap.Plot.PlottingUtil.findPointInLine(u,n,.6*L),b=SuperMap.Plot.PlottingUtil.findPointInLine(u,n,.7*L),T=[];T.push(l),T.push(f),T.push(m),T.push(p),T.push(c),T.push(P),T.push(S),T.push(u),T.push(M),T.push(b),T.push(n);var v=[];for(let t=0;t<T.length;t++){var A=SuperMap.Plot.PlottingUtil.coordinateTrans(e,T[t],g*SuperMap.Plot.PlottingUtil.RTOD);v.push(A)}var x=[];for(let t=v.length-1;t>=0;--t)x.push(v[t]);var _=SuperMap.Plot.PlottingUtil.clonePoints(x);_.push(_[0]),this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,_,{lineWidthLimit:!0,strokeWidth:0,weight:0,surroundLineFlag:!1}),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,[x[0],x[1]]),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,[x[2],x[3]]),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,[x[3],x[4],x[5],x[6],x[7]],{lineTypeLimit:!0}),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,[x[7],x[8]]),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,[x[9],x[10]]),this.scalePoints=[];var O=v[0].clone();O.isScalePoint=!0,O.tag=0,this.scalePoints.push(O);var w=v[3].clone();w.isScalePoint=!0,w.tag=1,this.scalePoints.push(w);var I=v[4].clone();I.isScalePoint=!0,I.tag=2,this.scalePoints.push(I),this.finish()}}modifyPoint(t,e){if(e.isScalePoint&&(t>=0||t<3)){var i=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);i=SuperMap.Plot.PlottingUtil.clearSamePts(i);var o=SuperMap.Plot.PlottingUtil.distance(i[0],i[1]),s=i[0].clone(),l=i[1].clone(),n=e.clone();if(0==t){let t=SuperMap.Plot.PlottingUtil.distance(n,s)/o;this.scaleValues[0]=t}else if(1==t){let t=SuperMap.Plot.PlottingUtil.projectPoint(n,s,l),e=SuperMap.Plot.PlottingUtil.distance(t,n)/o;this.scaleValues[1]=e;let i=SuperMap.Plot.PlottingUtil.distance(t,l)/o;this.scaleValues[3]=i}else if(2==t){let t=SuperMap.Plot.PlottingUtil.projectPoint(n,s,l),e=SuperMap.Plot.PlottingUtil.distance(t,n)/o;this.scaleValues[2]=e;let i=SuperMap.Plot.PlottingUtil.distance(t,l)/o;this.scaleValues[4]=i}}this.calculateParts()}};SuperMap.Plot.AlgoSymbol1021=class extends SuperMap.Plot.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=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if(t=SuperMap.Plot.PlottingUtil.clearSamePts(t),this.components=[],this.m_scalePoints=[],t.length>=2&&t.length<this.minEditPts&&this.calAssistantLine(),!(t.length<3)){var e=SuperMap.Plot.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=SuperMap.Plot.PlottingUtil.polylineDistance(i.LeftArowLeftBody[0]),s=SuperMap.Plot.PlottingUtil.getPtsIndexByDistance(.4*o,i.LeftArowLeftBody[0]),l=[],n=[];if(s.bfind)for(let t=0;t<=s.index;t++)l.push(i.LeftArowLeftBody[0][t]);var a=SuperMap.Plot.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=SuperMap.Plot.PlottingUtil.polylineDistance(i.RightArowLeftBody),p=SuperMap.Plot.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 y=SuperMap.Plot.PlottingUtil.getPtsIndexByDistance(.5*r,i.RightArowLeftBody);if(y.bfind)for(let t=y.index;t<i.RightArowLeftBody.length-1;t++)h.push(i.RightArowLeftBody[t]);var c=SuperMap.Plot.PlottingUtil.polylineDistance(i.RightArowRightBody),S=SuperMap.Plot.PlottingUtil.getPtsIndexByDistance(.4*c,i.RightArowRightBody),P=[],g=[];if(S.bfind)for(let t=0;t<=S.index;t++)P.push(i.RightArowRightBody[t]);var d=SuperMap.Plot.PlottingUtil.getPtsIndexByDistance(.5*c,i.RightArowRightBody);if(d.bfind)for(let t=d.index;t<i.RightArowRightBody.length-1;t++)g.push(i.RightArowRightBody[t]);i.shapePts.length>0&&(this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,i.shapePts,{strokeWidth:0,weight:0,lineWidthLimit:!0}),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,l),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,n),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,i.LeftArowHead,{lineTypeLimit:!0}),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,i.LeftArowRightBody),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,u),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,h),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,i.RightArowHead,{lineTypeLimit:!0}),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,P),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,g)),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.finish()}}modifyPoint(t,e){if(!0===e.isScalePoint){var i=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);i=SuperMap.Plot.PlottingUtil.clearSamePts(i);var o,s=SuperMap.Plot.PlottingUtil.operateControlPoints(i),l=new SuperMap.Geometry.Point((s[0].x+s[1].x)/2,(s[0].y+s[1].y)/2),n=new SuperMap.Geometry.Point((s[2].x+s[3].x)/2,(s[2].y+s[3].y)/2),a=SuperMap.Plot.PlottingUtil.pointProjectToSegment(e,l,n);if(a.isOnline){var r=SuperMap.Plot.PlottingUtil.distance(a.projectPoint,l),p=SuperMap.Plot.PlottingUtil.distance(l,n);(o=SuperMap.Plot.PlottingUtil.equalFuzzy(r,0)?this.SV1_MinValue:r/p)>this.SV1_MaxValue&&(o=this.SV1_MaxValue)}else o=SuperMap.Plot.PlottingUtil.distance(a.projectPoint,l)<SuperMap.Plot.PlottingUtil.distance(a.projectPoint,n)?this.SV1_MinValue:this.SV1_MaxValue;this.scaleValues=[],this.scaleValues.push(o)}this.calculateParts()}arrowMeshs(t){var e=new SuperMap.Plot.Path2D,i=[];i=this.m_bIsAnimation&&4===t.length?SuperMap.Plot.PlottingUtil.clonePoints(t):SuperMap.Plot.PlottingUtil.operateControlPoints(t);var o=this.scaleValues[0],s=SuperMap.Plot.PlottingUtil.distance(i[0],i[3]),l=SuperMap.Plot.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 SuperMap.Geometry.Point(a,r),u=.5*(i[1].x+i[2].x),h=.5*(i[1].y+i[2].y),y=new SuperMap.Geometry.Point(u,h),c=SuperMap.Plot.PlottingUtil.distance(p,y);c<this.MIN_LEN_LeftToRightCenter&&(c=this.MIN_LEN_LeftToRightCenter),p.x=a+s*(a-u)/(c*this.QIANJI_RATE1),p.y=r+s*(r-h)/(c*this.QIANJI_RATE1),y.x=u+l*(u-a)/(c*this.QIANJI_RATE1),y.y=h+l*(h-r)/(c*this.QIANJI_RATE1);var S=new SuperMap.Geometry.Point(0,0),P=new SuperMap.Geometry.Point(0,0);S.x=a+s*(a-u)/(c*this.QIANJI_RATE2),S.y=r+s*(r-h)/(c*this.QIANJI_RATE2),P.x=u+l*(u-a)/(c*this.QIANJI_RATE2),P.y=h+l*(h-r)/(c*this.QIANJI_RATE2);var g=new SuperMap.Geometry.Point((i[0].x+i[1].x)/2,(i[0].y+i[1].y)/2),d=new SuperMap.Geometry.Point((i[2].x+i[3].x)/2,(i[2].y+i[3].y)/2),f=i[3].x-(i[3].x-p.x)*this.SCALE_AT,m=i[3].y-(i[3].y-p.y)*this.SCALE_AT,L=i[2].x-(i[2].x-y.x)*this.SCALE_AT,M=i[2].y-(i[2].y-y.y)*this.SCALE_AT,b=new SuperMap.Geometry.Point(0,0),T=new SuperMap.Geometry.Point(0,0),v=new SuperMap.Geometry.Point(0,0),A=new SuperMap.Geometry.Point(0,0);T.x=f-(m-i[3].y)*this.SCALE_ATAJ,T.y=m+(f-i[3].x)*this.SCALE_ATAJ,b.x=f+(m-i[3].y)*this.SCALE_ATAJ,b.y=m-(f-i[3].x)*this.SCALE_ATAJ,A.x=L-(M-i[2].y)*this.SCALE_ATAJ,A.y=M+(L-i[2].x)*this.SCALE_ATAJ,v.x=L+(M-i[2].y)*this.SCALE_ATAJ,v.y=M-(L-i[2].x)*this.SCALE_ATAJ;var x=new SuperMap.Geometry.Point(0,0),_=new SuperMap.Geometry.Point(0,0),O=new SuperMap.Geometry.Point(0,0),w=new SuperMap.Geometry.Point(0,0);x.x=3*b.x-2*f-(i[3].x-f)*this.SCALE_ATAE,x.y=3*b.y-2*m-(i[3].y-m)*this.SCALE_ATAE,_.x=3*T.x-2*f-(i[3].x-f)*this.SCALE_ATAE,_.y=3*T.y-2*m-(i[3].y-m)*this.SCALE_ATAE,O.x=3*v.x-2*L-(i[2].x-L)*this.SCALE_ATAE,O.y=3*v.y-2*M-(i[2].y-M)*this.SCALE_ATAE,w.x=3*A.x-2*L-(i[2].x-L)*this.SCALE_ATAE,w.y=3*A.y-2*M-(i[2].y-M)*this.SCALE_ATAE,p.x=a+s*(a-u)/(c*this.QIANJI_RATE4),p.y=r+s*(r-h)/(c*this.QIANJI_RATE4),y.x=u+l*(u-a)/(c*this.QIANJI_RATE4),y.y=h+l*(h-r)/(c*this.QIANJI_RATE4);var I=new SuperMap.Geometry.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 D=new SuperMap.Geometry.Point(0,0);D.x=i[1].x+(y.x-i[1].x)*this.SCALE_AW,D.y=i[1].y+(y.y-i[1].y)*this.SCALE_AW;var E=new SuperMap.Geometry.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 C=new SuperMap.Geometry.Point(0,0);C.x=A.x+(y.x-A.x)*this.SCALE_ATAJctrlSameSide,C.y=A.y+(y.y-A.y)*this.SCALE_ATAJctrlSameSide;var N=new SuperMap.Geometry.Point(0,0);N.x=T.x+(S.x-T.x)*this.SCALE_ATAJctrlDefSide,N.y=T.y+(S.y-T.y)*this.SCALE_ATAJctrlDefSide;var U=new SuperMap.Geometry.Point(0,0);U.x=v.x+(P.x-v.x)*this.SCALE_ATAJctrlDefSide,U.y=v.y+(P.y-v.y)*this.SCALE_ATAJctrlDefSide;var R=new SuperMap.Geometry.Point(0,0);R.x=g.x+(d.x-g.x)*o,R.y=g.y+(d.y-g.y)*o,this.m_scalePoints.push(new SuperMap.Geometry.Point(R.x,R.y));var B=new SuperMap.Geometry.Point(0,0),G=new SuperMap.Geometry.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,G.x=i[1].x+(i[2].x-i[1].x)*o,G.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,G.x=G.x+(R.x-G.x)*this.QIANJI_RATE3,G.y=G.y+(R.y-G.y)*this.QIANJI_RATE3;var F=[];F.push(i[0].clone()),F.push(I.clone()),F.push(E.clone()),F.push(b.clone()),e.MoveTo(F[0]),e.CurveTo(F[1],F[2],F[3]);var k,z=[],Y=[],V=[],W=[],j=[],H=[],X=[];for(e.ToSubPathPolygons(X),z.push(X[0]),k=X[0].length,e.LineTo(x),e.LineTo(i[3]),e.LineTo(_),(F=[]).push(T),F.push(N),F.push(B),F.push(R),e.LineTo(F[0]),X=[],e.ToSubPathPolygons(X);k<X[0].length;k++)Y.push(X[0][k]);for(k=X[0].length,e.CurveTo(F[1],F[2],F[3]),X=[],e.ToSubPathPolygons(X);k<X[0].length;k++)V.push(X[0][k]);for(k=X[0].length,(F=[]).push(G),F.push(U),F.push(v),e.CurveTo(F[0],F[1],F[2]),X=[],e.ToSubPathPolygons(X);k<X[0].length;k++)W.push(X[0][k]);for(k=X[0].length,e.LineTo(O),e.LineTo(i[2]),e.LineTo(w),(F=[]).push(A),F.push(C),F.push(D),F.push(n),e.LineTo(F[0]),X=[],e.ToSubPathPolygons(X);k<X[0].length;k++)j.push(X[0][k]);for(k=X[0].length,e.CurveTo(F[1],F[2],F[3]),X=[],e.ToSubPathPolygons(X);k<X[0].length;k++)H.push(X[0][k]);return X=[],e.ToSubPathPolygons(X),{shapePts:X[0],LeftArowLeftBody:z,LeftArowHead:Y,LeftArowRightBody:V,ArowMidBody:[],RightArowLeftBody:W,RightArowHead:j,RightArowRightBody:H}}};SuperMap.Plot.AlgoSymbol1022=class extends SuperMap.Plot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.05),this.CLASS_NAME="SuperMap.Geometry.AlgoSymbol1022"}calculateParts(){this.init();var t=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMap.Plot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e=SuperMap.Plot.PlottingUtil.polylineDistance(t),i=e*this.scaleValues[0],o=SuperMap.Plot.PlottingUtil.paraLine(t,i,!0),s=SuperMap.Plot.PlottingUtil.paraLine(t,i,!1),l=SuperMap.Plot.PlottingUtil.findPointInLine(o[0],o[1],.6*e),n=SuperMap.Plot.PlottingUtil.findPointInLine(o[0],o[1],.5*e),a=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(.1*e,o[0],n).pntLeft;this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,[a,l,o[1]],{surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0});var r=SuperMap.Plot.PlottingUtil.findPointInLine(s[0],s[1],.4*e),p=SuperMap.Plot.PlottingUtil.findPointInLine(s[0],s[1],.5*e),u=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(.1*e,s[0],p).pntRight;this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,[u,r,s[0]],{surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0}),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,o),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,[s[1],s[0]]),this.addScalePoint(o[0],0),this.finish()}}modifyPoint(t,e){if(!0===e.isScalePoint){var i=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);i=SuperMap.Plot.PlottingUtil.clearSamePts(i);var o=SuperMap.Plot.PlottingUtil.polylineDistance(i);if(0===t){var s=SuperMap.Plot.PlottingUtil.distance(i[0],e)/o;this.scaleValues[0]=s}}this.calculateParts()}};SuperMap.Plot.AlgoSymbol315=class extends SuperMap.Plot.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="SuperMap.Plot.AlgoSymbol315"}calculateParts(){this.init();var t=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMap.Plot.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+=SuperMap.Plot.PlottingUtil.distance(t[i],t[i+1]);SuperMap.Plot.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],s=e*this.scaleValues[5],l=SuperMap.Plot.PlottingUtil.distance(t[1],t[0]),n=SuperMap.Plot.PlottingUtil.linePnt(t[1],t[0],l+s);this.scaleValues[8],i=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(o,t[1],n);var a,r=e*this.scaleValues[6],p=e*this.scaleValues[7],u=SuperMap.Plot.PlottingUtil.linePnt(t[0],t[1],l+p);this.scaleValues[9],a=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(r,t[0],u);var h=[];h.push(new SuperMap.Geometry.Point(i.pntLeft.x,i.pntLeft.y)),h.push(new SuperMap.Geometry.Point(t[0].x,t[0].y)),h.push(new SuperMap.Geometry.Point(t[1].x,t[1].y)),h.push(new SuperMap.Geometry.Point(a.pntRight.x,a.pntRight.y));var y=SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(h);y=SuperMap.Plot.PlottingUtil.clearSamePts(y),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,y),this.addScalePoint(i.pntLeft,3),this.addScalePoint(a.pntRight,4)}}modifyPoint(t,e){if(!0===e.isScalePoint){var i=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);i=SuperMap.Plot.PlottingUtil.clearSamePts(i);var o=SuperMap.Plot.PlottingUtil.polylineDistance(i),s=SuperMap.Plot.PlottingUtil.projectPoint(e,i[0],i[1]);if(t<=2&&(SuperMap.Plot.AlgoSymbol1004.prototype.modifyPoint.apply(this,arguments),super.modifyPoint(t,e)),3===t){let t=SuperMap.Plot.PlottingUtil.distance(e,s)/o,l=SuperMap.Plot.PlottingUtil.distance(s,i[0])/o;this.scaleValues[4]=t,this.scaleValues[5]=l,SuperMap.Plot.PlottingUtil.pointIsRightToLine(i[0],i[1],e)?this.scaleValues[8]=1:this.scaleValues[8]=0}if(4===t){let t=SuperMap.Plot.PlottingUtil.distance(e,s)/o,l=SuperMap.Plot.PlottingUtil.distance(s,i[1])/o;this.scaleValues[6]=t,this.scaleValues[7]=l,SuperMap.Plot.PlottingUtil.pointIsRightToLine(i[0],i[1],e)?this.scaleValues[9]=1:this.scaleValues[9]=0}}this.calculateParts()}};SuperMap.Plot.AlgoSymbol15200=class extends SuperMap.Plot.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=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMap.Plot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e=SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(t);e=SuperMap.Plot.PlottingUtil.clearSamePts(e),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,e);var i=0;for(let t=0,o=e.length-1;t<o;t++)i+=SuperMap.Plot.PlottingUtil.distance(e[t],e[t+1]);var o=0;for(let e=0,i=t.length-1;e<i;e++)o+=SuperMap.Plot.PlottingUtil.distance(t[e],t[e+1]);this.isEdit||(this.scaleValues[0]=.5*this.getSubSymbolScaleValue());var s=this.scaleValues[0]*o,l=this.scaleValues[1],n=this.scaleValues[2]*o,a=.3*n;for(let t=n;t<i;t+=n){var r=SuperMap.Plot.PlottingUtil.getPtsIndexByDistance(t,e);if(-1===r.index)return void this.finish();var p=t+a,u=SuperMap.Plot.PlottingUtil.getPtsIndexByDistance(p,e);if(-1===u.index)return void this.finish();var h=[],y=[];h.push(r.pts);var c=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(s,e[r.index],r.pts);0===l?h.push(new SuperMap.Geometry.Point(c.pntLeft.x,c.pntLeft.y)):h.push(new SuperMap.Geometry.Point(c.pntRight.x,c.pntRight.y)),y.push(u.pts);var S=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(s,e[u.index],u.pts);if(0===l?y.push(new SuperMap.Geometry.Point(S.pntLeft.x,S.pntLeft.y)):y.push(new SuperMap.Geometry.Point(S.pntRight.x,S.pntRight.y)),n===t){this.scalePoints=[];var P=new SuperMap.Geometry.Point(h[1].x,h[1].y);P.isScalePoint=!0,P.tag=0,this.scalePoints.push(P),(P=new SuperMap.Geometry.Point(h[0].x,h[0].y)).isScalePoint=!0,P.tag=1,this.scalePoints.push(P)}this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,h),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,y)}this.finish()}}computeScaleValues(t,e){if(!0===e.isScalePoint){var i=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if((i=SuperMap.Plot.PlottingUtil.clearSamePts(i)).length<this.minEditPts)return;var o=0;for(let t=0,e=i.length-1;t<e;t++)o+=SuperMap.Plot.PlottingUtil.distance(i[t],i[t+1]);var s=SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(i),l=new SuperMap.Geometry.Point(e.x,e.y);if(0===t){var n=SuperMap.Plot.PlottingUtil.findPointInPolyLine(s,o*this.scaleValues[2]);if(-1===n.index)return;var a=SuperMap.Plot.PlottingUtil.distance(n.pt,l)/o,r=SuperMap.Plot.PlottingUtil.pointIsRightToLine(s[0],s[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=s.length-1;t<i;t++){var y=SuperMap.Plot.PlottingUtil.pointProjectToSegment(e,s[t],s[t+1]);if(y.isOnline){var c=SuperMap.Plot.PlottingUtil.distance(y.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 S=0;for(let t=0,e=u-1;t<e;t++)S+=SuperMap.Plot.PlottingUtil.distance(s[t],s[t+1]);var P=(S+=SuperMap.Plot.PlottingUtil.distance(h,s[u]))/o;P>.7&&(P=.7),this.scaleValues[2]=P}}}};var q=SuperMap.Plot.BasicAlgoSymbolFactory=SuperMap.Plot.BasicAlgoSymbolFactory||{};SuperMap.Plot.BasicAlgoSymbolFactory.getAlgoSymbol=function(t,e,i){if(0===t)switch(e){case SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL:return new SuperMap.Plot.GeoTooltipBox(i);case SuperMap.Plot.SymbolType.ANNOFRAMESYMBOLM:return new SuperMap.Plot.GeoTooltipBoxM(i);case SuperMap.Plot.SymbolType.PATHTEXT:return new SuperMap.Plot.PathText(i);case SuperMap.Plot.SymbolType.ARROWLINE:return new SuperMap.Plot.ArrowLine(i);case SuperMap.Plot.SymbolType.CURVEEIGHT:return new SuperMap.Plot.CurveEight(i);case SuperMap.Plot.SymbolType.RUNWAY:return new SuperMap.Plot.Runway(i);case SuperMap.Plot.SymbolType.CONCENTRICCIRCLE:return new SuperMap.Plot.ConcentricCircle(i);case SuperMap.Plot.SymbolType.COMBINATIONALCIRCLE:return new SuperMap.Plot.CombinationalCircle(i);case SuperMap.Plot.SymbolType.FREECURVE:return new SuperMap.Plot.FreeCurve(i);case SuperMap.Plot.SymbolType.REGULARPOLYGON:return new SuperMap.Plot.RegularPolygon(i);case SuperMap.Plot.SymbolType.BRACESYMBOL:return new SuperMap.Plot.Brace(i);case SuperMap.Plot.SymbolType.TRAPEZOIDSYMBOL:return new SuperMap.Plot.Trapezoid(i);case SuperMap.Plot.SymbolType.SYMBOLTEXTBOX:return new SuperMap.Plot.SymbolTextBox(i);case SuperMap.Plot.SymbolType.NODECHAIN:return new SuperMap.Plot.NodeChain(i);case SuperMap.Plot.SymbolType.LINERELATION:return new SuperMap.Plot.LineRelation(i);case SuperMap.Plot.SymbolType.LINEMARKING:return new SuperMap.Plot.LineMarking(i);case SuperMap.Plot.SymbolType.POLYGONREGION:return new SuperMap.Plot.PolygonRegion(i);case SuperMap.Plot.SymbolType.WIRE:return new SuperMap.Plot.Wire(i);case SuperMap.Plot.SymbolType.LinearArrow:return new SuperMap.Plot.LinearArrow(i);default:return new SuperMap.Plot.AlgoSymbol(i)}else if(22===t)switch(e){case 1001:return new SuperMap.Plot.AlgoSymbol1001(i);case 1002:return new SuperMap.Plot.AlgoSymbol1002(i);case 1003:return new SuperMap.Plot.AlgoSymbol1003(i);case 1004:return new SuperMap.Plot.AlgoSymbol1004(i);case 1005:return new SuperMap.Plot.AlgoSymbol1005(i);case 1006:return new SuperMap.Plot.AlgoSymbol1006(i);case 1007:return new SuperMap.Plot.AlgoSymbol1007(i);case 1008:return new SuperMap.Plot.AlgoSymbol1008(i);case 1009:return new SuperMap.Plot.AlgoSymbol1009(i);case 1010:return new SuperMap.Plot.AlgoSymbol1010(i);case 1011:return new SuperMap.Plot.AlgoSymbol1011(i);case 1012:return new SuperMap.Plot.AlgoSymbol1012(i);case 1013:return new SuperMap.Plot.AlgoSymbol1013(i);case 1014:return new SuperMap.Plot.AlgoSymbol1014(i);case 1015:return new SuperMap.Plot.AlgoSymbol1015(i);case 1016:return new SuperMap.Plot.AlgoSymbol1016(i);case 1017:return new SuperMap.Plot.AlgoSymbol1017(i);case 1018:return new SuperMap.Plot.AlgoSymbol1018(i);case 1019:return new SuperMap.Plot.AlgoSymbol1019(i);case 1020:return new SuperMap.Plot.AlgoSymbol1020(i);case 1021:return new SuperMap.Plot.AlgoSymbol1021(i);case 1022:return new SuperMap.Plot.AlgoSymbol1022(i);default:return null}else{if(421!==t)return null;switch(e){case 311:return new SuperMap.Plot.AlgoSymbol1004(i);case 315:return new SuperMap.Plot.AlgoSymbol315(i);case 317:return new SuperMap.Plot.AlgoSymbol1006(i);case 318:return new SuperMap.Plot.AlgoSymbol1002(i);case 319:return new SuperMap.Plot.AlgoSymbol15200(i);default:return null}}},SuperMap.Plot.BasicAlgoSymbolFactory.getSymbolWayType=function(t,e){if(0===t)switch(e){case SuperMap.Plot.SymbolType.POLYLINESYMBOL:case SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL:return SuperMap.Plot.AddPoint_WayType.POLYLINE;case SuperMap.Plot.SymbolType.POLYBEZIERSYMBOL:case SuperMap.Plot.SymbolType.POLYBEZIERCLOSESYMBOL:return SuperMap.Plot.AddPoint_WayType.CURVE;default:return SuperMap.Plot.AddPoint_WayType.UNKNOWN}else if(22===t)switch(e){case 1005:case 1008:case 1012:case 1014:return SuperMap.Plot.AddPoint_WayType.CURVE;case 1007:case 1009:case 1013:case 1015:case 1017:return SuperMap.Plot.AddPoint_WayType.POLYLINE;default:return SuperMap.Plot.AddPoint_WayType.UNKNOWN}},SuperMap.Plot.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:return!1;default:return!0}},SuperMap.Plot.BasicAlgoSymbolFactory.getDefaultSubSymbols=function(){return[]},SuperMap.Plot.BasicAlgoSymbolFactory.getMinEditPts=function(t,e){if(0===t)switch(e){case SuperMap.Plot.SymbolType.TEXTSYMBOL:case SuperMap.Plot.SymbolType.COMBINATIONALCIRCLE:return 1;case SuperMap.Plot.SymbolType.CIRCLESYMBOL:case SuperMap.Plot.SymbolType.RECTANGLESYMBOL:case SuperMap.Plot.SymbolType.POLYLINESYMBOL:case SuperMap.Plot.SymbolType.POLYBEZIERSYMBOL:case SuperMap.Plot.SymbolType.KIDNEY:case SuperMap.Plot.SymbolType.ARROWLINE:case SuperMap.Plot.SymbolType.BRACESYMBOL:case SuperMap.Plot.SymbolType.CURVEEIGHT:case SuperMap.Plot.SymbolType.FREECURVE:case SuperMap.Plot.SymbolType.LINEMARKING:case SuperMap.Plot.SymbolType.LINERELATION:case SuperMap.Plot.SymbolType.NODECHAIN:case SuperMap.Plot.SymbolType.PATHTEXT:case SuperMap.Plot.SymbolType.REGULARPOLYGON:case SuperMap.Plot.SymbolType.RUNWAY:case SuperMap.Plot.SymbolType.SYMBOLTEXTBOX:case SuperMap.Plot.SymbolType.ANNOFRAMESYMBOLM:case SuperMap.Plot.SymbolType.CONCENTRICCIRCLE:case SuperMap.Plot.SymbolType.WIRE:case SuperMap.Plot.SymbolType.LinearArrow:return 2;case SuperMap.Plot.SymbolType.ARCSYMBOL:case SuperMap.Plot.SymbolType.CHORDSYMBOL:case SuperMap.Plot.SymbolType.PIESYMBOL:case SuperMap.Plot.SymbolType.ELLIPSESYMBOL:case SuperMap.Plot.SymbolType.PARALLELOGRAM:case SuperMap.Plot.SymbolType.PARALLELLINE:case SuperMap.Plot.SymbolType.POLYBEZIERCLOSESYMBOL:case SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL:case SuperMap.Plot.SymbolType.POLYGONREGION:case SuperMap.Plot.SymbolType.TRAPEZOIDSYMBOL:case SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL: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:return 2;case 311:case 315:case 317:case 318:return 3}},SuperMap.Plot.BasicAlgoSymbolFactory.getMaxEditPts=function(t,e){if(0===t)switch(e){case SuperMap.Plot.SymbolType.TEXTSYMBOL:return 1;case SuperMap.Plot.SymbolType.CIRCLESYMBOL:case SuperMap.Plot.SymbolType.RECTANGLESYMBOL:case SuperMap.Plot.SymbolType.BRACESYMBOL:case SuperMap.Plot.SymbolType.LINEMARKING:case SuperMap.Plot.SymbolType.LINERELATION:case SuperMap.Plot.SymbolType.RUNWAY:case SuperMap.Plot.SymbolType.SYMBOLTEXTBOX:case SuperMap.Plot.SymbolType.ANNOFRAMESYMBOLM:case SuperMap.Plot.SymbolType.LinearArrow:return 2;case SuperMap.Plot.SymbolType.ARCSYMBOL:case SuperMap.Plot.SymbolType.CHORDSYMBOL:case SuperMap.Plot.SymbolType.PIESYMBOL:case SuperMap.Plot.SymbolType.ELLIPSESYMBOL:case SuperMap.Plot.SymbolType.PARALLELOGRAM:case SuperMap.Plot.SymbolType.KIDNEY:case SuperMap.Plot.SymbolType.CONCENTRICCIRCLE:case SuperMap.Plot.SymbolType.CURVEEIGHT:case SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL:case SuperMap.Plot.SymbolType.TRAPEZOIDSYMBOL:return 3;case SuperMap.Plot.SymbolType.POLYLINESYMBOL:case SuperMap.Plot.SymbolType.POLYBEZIERSYMBOL:case SuperMap.Plot.SymbolType.PARALLELLINE:case SuperMap.Plot.SymbolType.POLYBEZIERCLOSESYMBOL:case SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL:case SuperMap.Plot.SymbolType.ARROWLINE:case SuperMap.Plot.SymbolType.COMBINATIONALCIRCLE:case SuperMap.Plot.SymbolType.FREECURVE:case SuperMap.Plot.SymbolType.NODECHAIN:case SuperMap.Plot.SymbolType.PATHTEXT:case SuperMap.Plot.SymbolType.POLYGONREGION:case SuperMap.Plot.SymbolType.REGULARPOLYGON:case SuperMap.Plot.SymbolType.WIRE: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 317:return 4;case 311:case 315:case 318:case 319:return 99999}},SuperMap.Plot.BasicAlgoSymbolFactory.getDefaultStyle=function(){return{}},SuperMap.Plot.BasicAlgoSymbolFactory.zoomInCalSymbol=function(){if(22!==libID)return!1;switch(code){case 1012:case 1013:case 1014:case 1015:return!0;default:return!1}},SuperMap.Plot.BasicAlgoSymbolFactory.zoomCalSymbol=function(){return!1},SuperMap.Plot.BasicAlgoSymbolFactory.getSymbolName=function(t,e){var i="";if(0===t)switch(e){case SuperMap.Plot.SymbolType.TEXTSYMBOL:i="文本";break;case SuperMap.Plot.SymbolType.CIRCLESYMBOL:i="圆";break;case SuperMap.Plot.SymbolType.RECTANGLESYMBOL:i="矩形";break;case SuperMap.Plot.SymbolType.ARCSYMBOL:i="弧线";break;case SuperMap.Plot.SymbolType.CHORDSYMBOL:i="弓形";break;case SuperMap.Plot.SymbolType.PIESYMBOL:i="扇形";break;case SuperMap.Plot.SymbolType.ELLIPSESYMBOL:i="椭圆";break;case SuperMap.Plot.SymbolType.PARALLELOGRAM:i="平行四边形";break;case SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL:i="多边形";break;case SuperMap.Plot.SymbolType.POLYLINESYMBOL:i="折线";break;case SuperMap.Plot.SymbolType.POLYBEZIERSYMBOL:i="贝赛尔曲线";break;case SuperMap.Plot.SymbolType.POLYBEZIERCLOSESYMBOL:i="闭合贝塞尔曲线";break;case SuperMap.Plot.SymbolType.PARALLELLINE:i="平行线";break;case SuperMap.Plot.SymbolType.KIDNEY:i="集结地";break;case SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL:i="注记指示框";break;case SuperMap.Plot.SymbolType.ARROWLINE:i="箭头线";break;case SuperMap.Plot.SymbolType.COMBINATIONALCIRCLE:i="组合圆";break;case SuperMap.Plot.SymbolType.CONCENTRICCIRCLE:i="同心圆";break;case SuperMap.Plot.SymbolType.CURVEEIGHT:i="八字形";break;case SuperMap.Plot.SymbolType.FREECURVE:i="自由线";break;case SuperMap.Plot.SymbolType.ANNOFRAMESYMBOLM:i="多角标注框";break;case SuperMap.Plot.SymbolType.LINEMARKING:i="线型标注";break;case SuperMap.Plot.SymbolType.LINERELATION:i="对象间连线";break;case SuperMap.Plot.SymbolType.NODECHAIN:i="节点链";break;case SuperMap.Plot.SymbolType.PATHTEXT:i="沿线注记";break;case SuperMap.Plot.SymbolType.POLYGONREGION:i="多边形区域管理";break;case SuperMap.Plot.SymbolType.RUNWAY:i="跑道线";break;case SuperMap.Plot.SymbolType.SYMBOLTEXTBOX:i="标注框";break;case SuperMap.Plot.SymbolType.REGULARPOLYGON:i="正多边形";break;case SuperMap.Plot.SymbolType.BRACESYMBOL:i="大括号";break;case SuperMap.Plot.SymbolType.TRAPEZOIDSYMBOL:i="梯形";break;case SuperMap.Plot.SymbolType.WIRE:i="铁丝网";break;case SuperMap.Plot.SymbolType.LinearArrow:i="直线箭头"}return i};var Z=SuperMap.Plot.AlgoSymbolFactory=SuperMap.Plot.AlgoSymbolFactory||{};SuperMap.Plot.AlgoSymbolFactory.getAlgoSymbol=function(t){var e=t.libID,i=t.code;return 0!==e&&22!==e&&421!==e||void 0===SuperMap.Plot.BasicAlgoSymbolFactory?100===e&&void 0!==SuperMap.Plot.JBAlgoSymbolFactory?SuperMap.Plot.JBAlgoSymbolFactory.getAlgoSymbol(e,i,t):123===e&&void 0!==SuperMap.Plot.WJAlgoSymbolFactory?SuperMap.Plot.WJAlgoSymbolFactory.getAlgoSymbol(e,i,t):999===e&&void 0!==SuperMap.Plot.YJAlgoSymbolFactory?SuperMap.Plot.YJAlgoSymbolFactory.getAlgoSymbol(e,i,t):null:SuperMap.Plot.BasicAlgoSymbolFactory.getAlgoSymbol(e,i,t)},SuperMap.Plot.AlgoSymbolFactory.getSymbolWayType=function(t,e){if(0===t)switch(e){case SuperMap.Plot.SymbolType.POLYLINESYMBOL:case SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL:return SuperMap.Plot.AddPoint_WayType.POLYLINE;case SuperMap.Plot.SymbolType.POLYBEZIERSYMBOL:case SuperMap.Plot.SymbolType.POLYBEZIERCLOSESYMBOL:return SuperMap.Plot.AddPoint_WayType.CURVE;default:return SuperMap.Plot.AddPoint_WayType.UNKNOWN}if(22===t)switch(e){case 1005:case 1008:case 1012:case 1014:return SuperMap.Plot.AddPoint_WayType.CURVE;case 1007:case 1009:case 1013:case 1015:return SuperMap.Plot.AddPoint_WayType.POLYLINE;default:return SuperMap.Plot.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 SuperMap.Plot.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 SuperMap.Plot.AddPoint_WayType.POLYLINE;default:return SuperMap.Plot.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 SuperMap.Plot.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 SuperMap.Plot.AddPoint_WayType.POLYLINE;default:return SuperMap.Plot.AddPoint_WayType.UNKNOWN}},SuperMap.Plot.AlgoSymbolFactory.isAccessServer=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMap.Plot.BasicAlgoSymbolFactory?100===t&&void 0!==SuperMap.Plot.JBAlgoSymbolFactory?SuperMap.Plot.JBAlgoSymbolFactory.isAccessServer(t,e):123===t&&void 0!==SuperMap.Plot.WJAlgoSymbolFactory?SuperMap.Plot.WJAlgoSymbolFactory.isAccessServer(t,e):999!==t||void 0===SuperMap.Plot.YJAlgoSymbolFactory||SuperMap.Plot.YJAlgoSymbolFactory.isAccessServer(t,e):SuperMap.Plot.BasicAlgoSymbolFactory.isAccessServer(t,e)},SuperMap.Plot.AlgoSymbolFactory.getDefaultSubSymbols=function(t,e){return 100===t&&void 0!==SuperMap.Plot.JBAlgoSymbolFactory?SuperMap.Plot.JBAlgoSymbolFactory.getDefaultSubSymbols(t,e):123===t&&void 0!==SuperMap.Plot.WJAlgoSymbolFactory?SuperMap.Plot.WJAlgoSymbolFactory.getDefaultSubSymbols(t,e):999===t&&void 0!==SuperMap.Plot.YJAlgoSymbolFactory?SuperMap.Plot.YJAlgoSymbolFactory.getDefaultSubSymbols(t,e):[]},SuperMap.Plot.AlgoSymbolFactory.getMinEditPts=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMap.Plot.BasicAlgoSymbolFactory?100===t&&void 0!==SuperMap.Plot.JBAlgoSymbolFactory?SuperMap.Plot.JBAlgoSymbolFactory.getMinEditPts(t,e):123===t&&void 0!==SuperMap.Plot.WJAlgoSymbolFactory?SuperMap.Plot.WJAlgoSymbolFactory.getMinEditPts(t,e):999===t&&void 0!==SuperMap.Plot.YJAlgoSymbolFactory?SuperMap.Plot.YJAlgoSymbolFactory.getMinEditPts(t,e):0:SuperMap.Plot.BasicAlgoSymbolFactory.getMinEditPts(t,e)},SuperMap.Plot.AlgoSymbolFactory.getMaxEditPts=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMap.Plot.BasicAlgoSymbolFactory?100===t&&void 0!==SuperMap.Plot.JBAlgoSymbolFactory?SuperMap.Plot.JBAlgoSymbolFactory.getMaxEditPts(t,e):123===t&&void 0!==SuperMap.Plot.WJAlgoSymbolFactory?SuperMap.Plot.WJAlgoSymbolFactory.getMaxEditPts(t,e):999===t&&void 0!==SuperMap.Plot.YJAlgoSymbolFactory?SuperMap.Plot.YJAlgoSymbolFactory.getMaxEditPts(t,e):0:SuperMap.Plot.BasicAlgoSymbolFactory.getMaxEditPts(t,e)},SuperMap.Plot.AlgoSymbolFactory.getDefaultStyle=function(t,e){return 100===t&&void 0!==SuperMap.Plot.JBAlgoSymbolFactory?SuperMap.Plot.JBAlgoSymbolFactory.getDefaultStyle(t,e):123===t&&void 0!==SuperMap.Plot.WJAlgoSymbolFactory?SuperMap.Plot.WJAlgoSymbolFactory.getDefaultStyle(t,e):999===t&&void 0!==SuperMap.Plot.YJAlgoSymbolFactory?SuperMap.Plot.YJAlgoSymbolFactory.getDefaultStyle(t,e):{}},SuperMap.Plot.AlgoSymbolFactory.getSymbolName=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMap.Plot.BasicAlgoSymbolFactory?"":SuperMap.Plot.BasicAlgoSymbolFactory.getSymbolName(t,e)},SuperMap.Plot.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 3032e3:case 4010800:case 4010801:case 4011100:case 4011101:case 4022100:case 4022101:case 4022102:return!0;default:return!1}},SuperMap.Plot.AlgoSymbolFactory.zoomInCalSymbol=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMap.Plot.BasicAlgoSymbolFactory?100===t&&void 0!==SuperMap.Plot.JBAlgoSymbolFactory?SuperMap.Plot.JBAlgoSymbolFactory.zoomInCalSymbol(t,e):123===t&&void 0!==SuperMap.Plot.WJAlgoSymbolFactory?SuperMap.Plot.WJAlgoSymbolFactory.zoomInCalSymbol(t,e):999===t&&void 0!==SuperMap.Plot.YJAlgoSymbolFactory?SuperMap.Plot.YJAlgoSymbolFactory.zoomInCalSymbol(t,e):0:SuperMap.Plot.BasicAlgoSymbolFactory.zoomInCalSymbol(t,e)},SuperMap.Plot.AlgoSymbolFactory.zoomCalSymbol=function(t,e){if((0===t||22===t||421===t)&&void 0!==SuperMap.Plot.BasicAlgoSymbolFactory)return SuperMap.Plot.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===SuperMap.Plot.WJAlgoSymbolFactory)return!1;switch(e){case 50312:case 50313:case 50314:case 50348:return!0;default:return!1}}};SuperMap.MD5=SuperMap.MD5||{};var K=function(t){function e(t,e){return t<<e|t>>>32-e}function i(t,e){var i,o,s,l,n;return s=2147483648&t,l=2147483648&e,n=(1073741823&t)+(1073741823&e),(i=1073741824&t)&(o=1073741824&e)?2147483648^n^s^l:i|o?1073741824&n?3221225472^n^s^l:1073741824^n^s^l:n^s^l}function o(t,o,s,l,n,a,r){return i(e(t=i(t,i(i(function(t,e,i){return t&e|~t&i}(o,s,l),n),r)),a),o)}function s(t,o,s,l,n,a,r){return i(e(t=i(t,i(i(function(t,e,i){return t&i|e&~i}(o,s,l),n),r)),a),o)}function l(t,o,s,l,n,a,r){return i(e(t=i(t,i(i(function(t,e,i){return t^e^i}(o,s,l),n),r)),a),o)}function n(t,o,s,l,n,a,r){return i(e(t=i(t,i(i(function(t,e,i){return e^(t|~i)}(o,s,l),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,y,c,S,P,g,d=Array();for(d=function(t){for(var e,i=t.length,o=i+8,s=16*((o-o%64)/64+1),l=Array(s-1),n=0,a=0;a<i;)n=a%4*8,l[e=(a-a%4)/4]=l[e]|t.charCodeAt(a)<<n,a++;return n=a%4*8,l[e=(a-a%4)/4]=l[e]|128<<n,l[s-2]=i<<3,l[s-1]=i>>>29,l}(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,S=4023233417,P=2562383102,g=271733878,r=0;r<d.length;r+=16)p=c,u=S,h=P,y=g,S=n(S=n(S=n(S=n(S=l(S=l(S=l(S=l(S=s(S=s(S=s(S=s(S=o(S=o(S=o(S=o(S,P=o(P,g=o(g,c=o(c,S,P,g,d[r+0],7,3614090360),S,P,d[r+1],12,3905402710),c,S,d[r+2],17,606105819),g,c,d[r+3],22,3250441966),P=o(P,g=o(g,c=o(c,S,P,g,d[r+4],7,4118548399),S,P,d[r+5],12,1200080426),c,S,d[r+6],17,2821735955),g,c,d[r+7],22,4249261313),P=o(P,g=o(g,c=o(c,S,P,g,d[r+8],7,1770035416),S,P,d[r+9],12,2336552879),c,S,d[r+10],17,4294925233),g,c,d[r+11],22,2304563134),P=o(P,g=o(g,c=o(c,S,P,g,d[r+12],7,1804603682),S,P,d[r+13],12,4254626195),c,S,d[r+14],17,2792965006),g,c,d[r+15],22,1236535329),P=s(P,g=s(g,c=s(c,S,P,g,d[r+1],5,4129170786),S,P,d[r+6],9,3225465664),c,S,d[r+11],14,643717713),g,c,d[r+0],20,3921069994),P=s(P,g=s(g,c=s(c,S,P,g,d[r+5],5,3593408605),S,P,d[r+10],9,38016083),c,S,d[r+15],14,3634488961),g,c,d[r+4],20,3889429448),P=s(P,g=s(g,c=s(c,S,P,g,d[r+9],5,568446438),S,P,d[r+14],9,3275163606),c,S,d[r+3],14,4107603335),g,c,d[r+8],20,1163531501),P=s(P,g=s(g,c=s(c,S,P,g,d[r+13],5,2850285829),S,P,d[r+2],9,4243563512),c,S,d[r+7],14,1735328473),g,c,d[r+12],20,2368359562),P=l(P,g=l(g,c=l(c,S,P,g,d[r+5],4,4294588738),S,P,d[r+8],11,2272392833),c,S,d[r+11],16,1839030562),g,c,d[r+14],23,4259657740),P=l(P,g=l(g,c=l(c,S,P,g,d[r+1],4,2763975236),S,P,d[r+4],11,1272893353),c,S,d[r+7],16,4139469664),g,c,d[r+10],23,3200236656),P=l(P,g=l(g,c=l(c,S,P,g,d[r+13],4,681279174),S,P,d[r+0],11,3936430074),c,S,d[r+3],16,3572445317),g,c,d[r+6],23,76029189),P=l(P,g=l(g,c=l(c,S,P,g,d[r+9],4,3654602809),S,P,d[r+12],11,3873151461),c,S,d[r+15],16,530742520),g,c,d[r+2],23,3299628645),P=n(P,g=n(g,c=n(c,S,P,g,d[r+0],6,4096336452),S,P,d[r+7],10,1126891415),c,S,d[r+14],15,2878612391),g,c,d[r+5],21,4237533241),P=n(P,g=n(g,c=n(c,S,P,g,d[r+12],6,1700485571),S,P,d[r+3],10,2399980690),c,S,d[r+10],15,4293915773),g,c,d[r+1],21,2240044497),P=n(P,g=n(g,c=n(c,S,P,g,d[r+8],6,1873313359),S,P,d[r+15],10,4264355552),c,S,d[r+6],15,2734768916),g,c,d[r+13],21,1309151649),P=n(P,g=n(g,c=n(c,S,P,g,d[r+4],6,4149444226),S,P,d[r+11],10,3174756917),c,S,d[r+2],15,718787259),g,c,d[r+9],21,3951481745),c=i(c,p),S=i(S,u),P=i(P,h),g=i(g,y);return(a(c)+a(S)+a(P)+a(g)).toLowerCase()};SuperMap.MD5.md5=K,L.supermap.plotting=L.supermap.plotting||{};var Q=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){var e=1;this.options.fontPercent&&100!==this.options.fontPercent&&(e=this.options.fontPercent/100);var i=0,o=0,s=this.options.text.split("\n"),l=s.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*(l-1)+a*l;for(let t=0;t<l;t++)if(this.options.fontSpace&&0!=this.options.fontSpace||this.options.fontPercent&&100!=this.options.fontPercent){let o=(this._renderer._ctx.measureText(s[t]).width+this.options.fontSpace*(s[t].length-1))*e;i<o&&(i=o)}else{let e=this._renderer._ctx.measureText(s[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*(l-1)+e*l;for(let t=0;t<l;t++){let e=SuperMap.Plot.PlottingUtil.getTextWidth(this.options,s[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 y in"lt"===h?(a=this._point.x,r=this._point.y,p=this._point.x+i,u=this._point.y+o):"ct"===h?(a=this._point.x-i/2,r=this._point.y,p=this._point.x+i/2,u=this._point.y+o):"rt"===h?(a=this._point.x-i,r=this._point.y,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._point.y):"cb"===h?(a=this._point.x-i/2,r=this._point.y-o,p=this._point.x+i/2,u=this._point.y):"rb"===h?(a=this._point.x-i,r=this._point.y-o,p=this._point.x,u=this._point.y):"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[y].symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL&&0===this.options.fontPercent&&0===this.options.fontPercent){var c=p-a,S=(c+this.options.fontSpace*(this.options.text.length-1))*this.options.fontPercent/100-c;switch(h){case"lt":case"lm":case"lb":p+=S;break;case"rt":case"rm":case"rb":a-=S;break;case"ct":case"cm":case"cb":a-=S/2,p+=S/2}}var P=new L.Bounds;if(this.options.labelRotation&&0!==this.options.labelRotation){var g=[];g.push(L.point(a,r)),g.push(L.point(a,u)),g.push(L.point(p,r)),g.push(L.point(p,u));var d=this.options.labelRotation*(Math.PI/180);for(let t=0;t<g.length;t++)SuperMap.Plot.PlottingUtil.rotateAngle(this._point,d,g[t]),P.extend(g[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 Q(t,e)},L.supermap.plotting.Text=Q;var tt=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])},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()},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},getPxBounds:function(){var t=void 0!=this.options.graphicXOffset?this.options.graphicXOffset:-.5*this.options.graphicWidth,e=void 0!=this.options.graphicYOffset?this.options.graphicYOffset:-.5*this.options.graphicHeight,i=this._point.x+t,o=this._point.y+e,s=i+this.options.graphicWidth,l=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,l)),a.push(L.point(s,o)),a.push(L.point(s,l));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(s,l));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 tt(t,e)},L.supermap.plotting.PointImage=tt;var et=L.Class.extend({feature: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")},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()},getCacheInfo:function(){return{canvas:this.canvas,anchor:this.anchor,size:this.size}},_computeImageSize:function(){var t=this.feature.getBoundsWithText(),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())),this.leftTopPixel=L.point(e.min.x,e.min.y);var i=e.getSize(),o=this.feature.style.weight;i.x+=o+this.options.extent,i.y+=o+this.options.extent,this.anchor=this._latlngToLayerPoint(this.feature.getLatLngs())[0],this.size=[i.x,i.y]},_latlngToLayerPoint:function(t){for(var e=[],i=0;i<t.length;i++){var o=this.feature._map.latLngToLayerPoint(t[i]);o.x=o.x-this.leftTopPixel.x+(this.feature.style.weight+this.options.extent)/2,o.y=o.y-this.leftTopPixel.y+(this.feature.style.weight+this.options.extent)/2,e.push(o)}return e},_drawFeatures:function(){for(var t in this._ctx.translate(0,0),this.feature.components){var e=this.feature.components[t];tt&&e instanceof tt?this._drawImage(e):Q&&e instanceof Q?this._drawText(e):L.Rectangle&&e instanceof L.Rectangle?this._drawRectangle(e):L.Polygon&&e instanceof L.Polygon?this._drawPolygon(e):L.Polyline&&e instanceof L.Polyline&&this._drawPolyline(e)}},_drawPolyline:function(t){var e=this._latlngToLayerPoint(t.getLatLngs()),i=t.options;this._ctx.beginPath(),this._ctx.globalAlpha=i.opacity;var o=this._addDashArray(t);0!==o.length&&this._ctx.setLineDash(o),this._ctx.moveTo(e[0].x,e[0].y);for(var s=1,l=e.length;s<l;s++)this._ctx.lineTo(e[s].x,e[s].y);i.fill&&(this._ctx.globalCompositeOperation=!0===Boolean(this.feature.surroundLineType)?"destination-over":"source-over"),this._ctx.globalAlpha=i.opacity,this._ctx.strokeStyle=i.color,this._ctx.lineWidth=i.weight,this._ctx.stroke()},_drawRectangle:function(t){var e=this._latlngToLayerPoint(t.getLatLngs()[0]),i=t.options;this._ctx.beginPath(),this._ctx.globalAlpha=!0===i.fill?i.fillOpacity:i.opacity;var o=this._addDashArray(t);0!==o.length&&this._ctx.setLineDash(o),i.fill&&(this._ctx.globalCompositeOperation=!0===Boolean(this.feature.surroundLineType)?"destination-over":"source-over",this._ctx.fillStyle=SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillColor,this.feature.style.fillOpacity),this._ctx.fill()),this._ctx.strokeStyle=i.color,this._ctx.lineWidth=i.weight,this._ctx.strokeRect(e[0].x,e[0].y,e[1].x-e[0].x,e[1].y-e[0].y)},_drawPolygon:function(t){var e=this._latlngToLayerPoint(t.getLatLngs()[0]),i=t.options;this._ctx.beginPath(),this._ctx.globalAlpha=!0===i.fill?i.fillOpacity:i.opacity,this._ctx.setLineDash(this._addDashArray(t)),this._ctx.moveTo(e[0].x,e[0].y);for(var o=1,s=e.length;o<s;o++){var l=e[o].x,n=e[o].y;this._ctx.lineTo(l,n)}this._ctx.closePath(),i.fill&&(this._ctx.globalCompositeOperation=!0===Boolean(this.feature.surroundLineType)?"destination-over":"source-over",i.fillLimit?this._ctx.fillStyle=SuperMap.Plot.PlottingUtil.colorRGBA(i.color,i.opacity):this._ctx.fillStyle=i.fillColor,this._ctx.fill(i.fillRule||"evenodd")),this._ctx.strokeStyle=i.color,this._ctx.lineWidth=i.weight,this._ctx.stroke()},_drawText:function(t){var e=this._latlngToLayerPoint(t.getLatLngs())[0],i=t.options,o=(i=SuperMap.Util.extend({fontColor:"#000000",labelAlign:"cm"},i)).fontSize.toLocaleString()+"px",s=[i.fontStyle?i.fontStyle:"normal","normal",i.fontWeight?i.fontWeight:"normal",i.fontSize?o:"1em",i.fontFamily?i.fontFamily:"sans-serif"].join(" ");this._ctx.globalAlpha=i.fontOpacity,this._ctx.fillStyle=SuperMap.Plot.PlottingUtil.colorRGBA(i.fontColor,i.fontOpacity),this._ctx.font=s,this._ctx.fillText&&(this._ctx.textAlign=L.Canvas.LABEL_ALIGN[i.labelAlign[0]]||"center"),this._ctx.textBaseline=L.Canvas.LABEL_ALIGN[i.labelAlign[1]]||"middle",this._ctx.fillText(i.text,e.x,e.y)},_drawImage:function(t){var e=this,i=this._latlngToLayerPoint(t.getLatLngs())[0],o=t.options,s=new Image;s.src=o.externalGraphic,o.graphicTitle&&(s.title=o.graphicTitle),s.onload=function(){(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 s=void 0!==t.graphicXOffset?t.graphicXOffset:-.5*i,l=void 0!==t.graphicYOffset?t.graphicYOffset:-.5*o,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(s,l),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()}}).call({point:i,style:o,img:s}),s.onload=null},window.ActiveXObject||"ActiveXObject"in window?s.onload():s.complete&&s.onload()},_addDashArray:function(t){if(null===t||null===t.options.dashArray||void 0===t.options.dashArray||0===t.options.dashArray.length)return[0,0];var e=[];return t.options.dashArray.split(",").map(function(t,i,o){return e.push(parseFloat(o[i])),e}),e}});L.supermap.plotting.dotSymbolStyle=function(t){return new et(t)};var it=L.Class.extend({options:{graphicWidth:0,graphicHeight:0},initialize:function(t){t=t||{},this._latlng=t._latlng,this._image=t._image,this._uuid=t._uuid},setLatLng:function(t){this._latlng=t},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},updateImage:function(){this.layer.updateGraphics(this)}}),ot={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},st={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"};var lt=L.Handler.extend({statics:{DRAGGING_CLS:"leaflet-plottingObject-draggable"},initialize:function(t){this._plottingObject=t,this._startPoint=null,this._dragStartPoint=null,this._mapDraggingWasEnabled=!1},addHooks:function(){this._plottingObject.on("mousedown",this._onDragStart,this),this._plottingObject.options.className=this._plottingObject.options.className?this._plottingObject.options.className+" "+lt.DRAGGING_CLS:lt.DRAGGING_CLS,this._plottingObject._plottingObject&&L.DomUtil.addClass(this._plottingObject._plottingObject,lt.DRAGGING_CLS)},removeHooks:function(){this._plottingObject.off("mousedown",this._onDragStart,this),this._plottingObject.options.className=this._plottingObject.options.className.replace(new RegExp("\\s+"+lt.DRAGGING_CLS),""),this._plottingObject._plottingObject&&L.DomUtil.removeClass(this._plottingObject._plottingObject,lt.DRAGGING_CLS)},moved:function(){return this._plottingObject._dragMoved},_onDragStart:function(t){var e=t.originalEvent._simulated?"touchstart":t.originalEvent.type;this._mapDraggingWasEnabled=!1,this._startPoint=t.latlng.clone(),this._dragStartPoint=t.latlng.clone(),L.DomEvent.stop(t.originalEvent),L.DomUtil.addClass(this._plottingObject._map._container,"leaflet-dragging"),L.DomEvent.on(document,st[e],this._onDrag,this).on(document,ot[e],this._onDragEnd,this),this._plottingObject._map.dragging.enabled()&&(this._plottingObject._map.dragging.disable(),this._mapDraggingWasEnabled=!0),this._plottingObject._dragMoved=!1},_onDrag:function(t){L.DomEvent.stop(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),s=this._plottingObject._map.mouseEventToContainerPoint(e);if(o.distanceTo(s)<=this._plottingObject._map.options.tapTolerance)return}var l=i.lat,n=i.lng,a=l-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=l,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,i,o,s,l=this._plottingObject._map.mouseEventToLatLng(t),n=this.moved();if(n&&L.DomEvent.stop(t),L.DomEvent.off(document,"mousemove touchmove",this._onDrag,this),L.DomEvent.off(document,"mouseup touchend",this._onDragEnd,this),n){this._plottingObject.fire("dragend",{distance:(e=this._dragStartPoint,i=l,o=e.x-i.x,s=e.y-i.y,Math.sqrt(o*o+s*s))});var a=this._plottingObject._containsPoint;this._plottingObject._containsPoint=L.Util.falseFn,L.Util.requestAnimFrame(function(){L.DomEvent.skipped({type:"click"}),this._plottingObject._containsPoint=a},this)}this._startPoint=null,this._dragStartPoint=null,this._plottingObject._dragMoved=!1,this._mapDraggingWasEnabled&&(n&&L.DomEvent.fakeStop({type:"click"}),this._plottingObject._map.dragging.enable()),n&&(this._plottingObject.moveend=!0)}}),nt=L.Evented.extend({dragging:null,uuid:null,libID:null,code:null,textDisplay:!0,minEditPts:1,maxEditPts:1,symbolType:null,symbolName: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,options:{},_defaultStyle:{display:"display",color:"#ff0000",lineSymbolID:0,opacity:"1.00",weight:2,strokelinecap:"square",strokelinejoin:"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="",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 s=0;s<this.avoidRegions.length;s++)this.avoidRegions[s].associatedUuid=this.uuid},onAdd:function(t){this.layer=t,this._renderer=t._renderer,this._map=t._map,this.redraw(),this.isEdit=!0,lt&&(this.dragging||(this.dragging=new lt(this))),null===this.fromZoom&&(this.fromZoom=this._map.getZoom())},_clearComponents:function(){for(var t=0;t<this.components.length;t++)this.components[t].removeEventParent(this),this.components[t]instanceof nt?this.components[t]._clearComponents():(this.components[t].onRemove(),delete this.components[t]);this.components=[],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){t._map=this._map,t._renderer=this._renderer,t.addEventParent(this),t instanceof nt?t.onAdd(this.layer):t.onAdd(),this.components.push(t)},_project:function(){var t=this;t._pxBounds=new L.Bounds,t.components.map(function(e){return e instanceof nt&&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)},setScale:function(){},setRotate:function(){},setTextPosition:function(){},setTextContent:function(t){this.textContent=t,this.redraw(),this.symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL&&this.isSelected&&this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},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&&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},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(){this._clearComponents(),this._redrawComponents()},_redrawComponents:function(){"none"!==this.style.display?(this._calculateParts(),this._calculateAvoidRegions()):this.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL&&this.symbolType!==SuperMap.Plot.SymbolType.AlgoSymbol&&0!==this.libID||this._updateSymbolTexts()},_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 nt||(this.components[t].onRemove(),delete this.components[t]);this.components=[];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 s=e[o];if(s instanceof nt)i=i.concat(this._layersWithoutAvoidRegion(t,s.components)),s._clearComponents();else{if(1===t._relationToLayer(s))continue;if(s instanceof Q||0!==t._relationToLayer(s))i.push(s);else if(s instanceof L.Polygon){let e={};e=SuperMap.Util.copyAttributes(e,s.options);let o=L.Util.latLngsToSuperMapPoints(s.getLatLngs()[0][0]),n=L.Util.latLngsToSuperMapPoints(s.getLatLngs()[0][s.getLatLngs()[0].length-1]);SuperMap.Plot.PlottingUtil.isSamePt(o[0],n[0])||s.getLatLngs()[0].push(s.getLatLngs()[0][0]),o=L.Util.latLngsToSuperMapPoints(s.getLatLngs()[0][0]),n=L.Util.latLngsToSuperMapPoints(s.getLatLngs()[0][s.getLatLngs()[0].length-1]),SuperMap.Plot.PlottingUtil.isSamePt(o[0],n[0])||s.getLatLngs()[0].push(s.getLatLngs()[0][0]);for(var l=0;l<s.getLatLngs().length;l++){let o=t._getWithoutPts(s.getLatLngs()[l],!0);for(let t=0;t<o.length;t++){let s=L.polyline(L.Util.superMapPointsToLatLngs(o[t]),e);i.push(s)}}}else if(s instanceof L.Polyline){let e={};e=SuperMap.Util.copyAttributes(e,s.options);let o=t._getWithoutPts(s.getLatLngs(),!1);for(let t=0;t<o.length;t++){e.fill=!1;let s=L.polyline(L.Util.superMapPointsToLatLngs(o[t]),e);i.push(s)}}}}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},_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(),s=i.getEast(),l=i.getNorth(),n=i.getSouth();switch(e){case 1:l=t.lat,o=t.lng;break;case 3:l=t.lat,s=t.lng;break;case 6:o=t.lng,n=t.lat;break;case 8:s=t.lng,n=t.lat;break;case 2:l=t.lat;break;case 4:o=t.lng;break;case 5:s=t.lng;break;case 7:n=t.lat}var a=new L.LatLngBounds;return a._southWest=L.latLng(n,o),a._northEast=L.latLng(l,s),a},_getHandleCount:function(){switch(this.symbolType){case SuperMap.Plot.SymbolType.ELLIPSESYMBOL:case SuperMap.Plot.SymbolType.CIRCLESYMBOL: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 s=this._map.latLngToLayerPoint(L.latLng(t.getSouth(),t.getWest()));s.x-=5,s.y+=5;for(var l=L.point((e.x+i.x)/2,e.y),n=L.point(e.x,(e.y+o.y)/2),a=L.point((o.x+s.x)/2,o.y),r=L.point(i.x,(i.y+s.y)/2),p=this._map.layerPointToLatLng(e),u=this._map.layerPointToLatLng(i),h=this._map.layerPointToLatLng(o),y=this._map.layerPointToLatLng(s),c=this._map.layerPointToLatLng(n),S=this._map.layerPointToLatLng(a),P=this._map.layerPointToLatLng(r),g=this._map.layerPointToLatLng(l),d=[u.clone(),g.clone(),p.clone(),P.clone(),c.clone(),y.clone(),S.clone(),h.clone()],f=1,m=0;m<d.length;m++)d[m].nHandle=f++;return d}},_getHandleAndRotatePoints:function(){var t={handlePoints:[],rotatePoints:[]},e=this.getBounds();if(!e.isValid())return t;this._getHandleCount()>9?this.symbolType===SuperMap.Plot.SymbolType.REGULARPOLYGON?(t.handlePoints.push(this.getLatLngs()[0].clone()),t.handlePoints.push(this.getLatLngs()[this.getLatLngs().length-1].clone())):t.handlePoints=L.Util.cloneLatLngs(this.getLatLngs()):t.handlePoints=this._getHandlePointsByBounds(e);for(var i=0;i<t.handlePoints.length;i++)t.handlePoints[i].tag=i;if(!0===this.getLocked())return t;if(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 o=this._map.latLngToLayerPoint(L.latLng(e.getNorth(),e.getEast())),s=L.point(o.x+15,o.y-15),l=this._map.layerPointToLatLng(s);l.isRotatePoint=!0,t.rotatePoints=[l]}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(this.symbolData.hasOwnProperty("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 s=L.supermap.plotting.avoidRegion(0,SuperMap.Plot.SymbolType.AVOIDREGION,[],e);s.style=SuperMap.Plot.AnalysisSymbol.getStyle(this.symbolData.avoidRegions[t][1],!0),this.avoidRegions.push(s)}}},_setSymbolData:function(t){if(void 0===t&&(t=!0),null===this.symbolData&&(this.symbolData={}),this.symbolData.hasOwnProperty("type")||(this.symbolData.type="GRAPHICOBJECT"),this.symbolData.hasOwnProperty("rotate2D")?this.symbolData.rotate2D.x=this.dRotate:this.symbolData.rotate2D={x:this.dRotate,y:0,z:0},this.symbolData.hasOwnProperty("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 s={};SuperMap.Plot.AnalysisSymbol.setStyle(this.avoidRegions[t].style,s,!0),this.symbolData.avoidRegions.push([this.avoidRegions[t].getSymbolData(),s])}},_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&&this.symbolType!==SuperMap.Plot.SymbolType.ALGOSYMBOL||(-1!==t.maxScale&&(this.maxScale=t.maxScale),-1!==t.minScale&&(this.minScale=t.minScale)),-1!==t.scaleByMap&&(this.scaleByMap=t.scaleByMap)}},_removeRedundancySymbolData:function(t){null!==t&&(t.hasOwnProperty("center")&&delete t.center,t.hasOwnProperty("id")&&delete t.id,t.hasOwnProperty("parts")&&delete t.parts,t.hasOwnProperty("points")&&delete t.points,t.hasOwnProperty("position")&&delete t.position,t.hasOwnProperty("prjCoordSys")&&delete t.prjCoordSys,t.hasOwnProperty("rotationX")&&delete t.rotationX,t.hasOwnProperty("rotationY")&&delete t.rotationY,t.hasOwnProperty("rotationZ")&&delete t.rotationZ,t.hasOwnProperty("scaleX")&&delete t.scaleX,t.hasOwnProperty("scaleY")&&delete t.scaleY,t.hasOwnProperty("scaleZ")&&delete t.scaleZ)},destroy:function(){this.dragging=null,this.uuid=null,this.libID=null,this.code=null,this.minEditPts=0,this.maxEditPts=0,this.symbolType=null,this.symbolName=null,this.isSelected=!1,this.enableEdit=!1,this.note="",this.extendProperty=null,this.custom=null,this.symbolData=null,this.dScale=null,this.textContent=null,this.annotationPosition=null,this.subSymbols=null,this.fromZoom=null,this.style=null,this.isLocked=!1,this.anchorPoint=null,this.avoidRegions=null,this.ownerGroup=null,this.geoSymbolTexts=null,this.isEdit=null,this.layer.removeFeatures(this),this._render=null,this.layer=null},toGeoJsonStr:function(){return this.getSymbolData(),SuperMap.Plot.PlottingUtil.toJSON(this.symbolData)}});L.supermap.plotting.PlottingObject=nt,nt.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,s,l){o||(o={}),o.custom=l;var n=null;if(o&&o.symbolData&&o.symbolData.textStyle2D&&(o.symbolData.textStyle2D.sizeFixed=!0),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.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:return L.supermap.plotting.picture(t,e,i,o);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),s&&SuperMap.Util.extend(n.style,s),i&&null!==i&&(SuperMap.Util.isArray(i)||(i=[i]),i.length>n.maxEditPts&&(i=i.slice(0,n.maxEditPts)),n.latLngs=L.Util.cloneLatLngs(i)),n};var at=nt.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,nt.prototype.initialize.call(this,t,e,i,o)},_addComponents:function(t){nt.prototype._addComponents.call(this,t),t.layer=this.layer,t.isEdit=!0,lt&&(t.dragging||(t.dragging=new lt(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),nt.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)},redraw:function(){if("none"!==this.style.display){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])}else this._clearComponents()},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 s=0;s<e.length;s++)e[s].addTo(this._map),e[s].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&&(nt.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(nt.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),this.components[i].dRotate+=t},_resize:function(t,e){for(var i=0;i<this.components.length;i++)this.components[i]instanceof at?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(){nt.prototype.destroy.call(this),this.subObjects=[]}}),rt=function(t,e,i,o){return new at(t,e,i,o)};L.supermap.plotting.groupObject=rt,L.supermap.plotting.GroupObject=at;var pt=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=[]},onAdd:function(t){this.layer=t,this._renderer=t._renderer,this._map=t._map,this.redraw(),lt&&(this.dragging||(this.dragging=new lt(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=[]},_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),s=i(t.y,14);function l(t,e,i,o,s){return(o-e)/(s-i)*(t-s)+o}for(var n,a,r,p,u,h,y,c=e.length-1,S=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((y=i(l(s,r,p,u,h),14))===o&&(p<h&&s>=p&&s<=h||p>h&&s<=p&&s>=h)){S=-1;break}y<=o||r!==u&&(y<Math.min(r,u)||y>Math.max(r,u))||(p<h&&s>=p&&s<h||p>h&&s<p&&s>=h)&&++S}else if(s===p&&(r<=u&&o>=r&&o<=u||r>=u&&o<=r&&o>=u)){S=-1;break}return-1===S?1:!!(1&S)},_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 Q){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 s=this._containsPoint(i[0]);s&&(e=1);for(let t=1;t<i.length;t++)if(s!==this._containsPoint(i[t])){e=0;break}if(2===e){var l=L.Util.latLngsToSuperMapPoints(this.getLatLngs());l.push(l[0].clone());for(let t=0;t<i.length-1;t++){for(var n=0;n<l.length-1;n++)if(SuperMap.Plot.PlottingUtil.isCross(i[t],i[t+1],l[n],l[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=[],s=[],l=0;l<i.length;l++)if(this._containsPoint(i[l])||s.push(i[l].clone()),l<=i.length-2)for(var n=this._intersectSegs(i[l],i[l+1]),a=0;a<n.length;a++)s.push(n[a].clone()),s.length>1&&(o.push(s),s=[]);0!==s.length&&o.push(s);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=[],s=0;s<i.length-1;s++){var l=new SuperMap.Geometry.Point;SuperMap.Plot.PlottingUtil.intersectLineSegs(t,e,i[s],i[s+1],l)&&o.push(l)}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}}),ut=function(t,e,i,o){return new pt(t,e,i,o)};L.supermap.plotting.avoidRegion=ut,L.supermap.plotting.AvoidRegion=pt;var ht=nt.extend({surroundLineType:null,scaleByMap:null,latLngs:[],initialize:function(t,e,i,o){this.geoSymbolTexts=[],this.subAssociatedUuids=[],this.latLngs=i||[],nt.prototype.initialize.call(this,t,e,i,o),null===this.surroundLineType&&(this.surroundLineType=SuperMap.Plot.AlgoSurroundLineType.NONE)},destroy:function(){nt.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},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 s=this._resizeBounds(t,e,i);if(!(SuperMap.Plot.PlottingUtil.equalFuzzy(s.getWest(),s.getEast())&&SuperMap.Plot.PlottingUtil.equalFuzzy(s.getNorth(),s.getSouth())||SuperMap.Plot.PlottingUtil.equalFuzzy(i.getWest(),i.getEast())&&SuperMap.Plot.PlottingUtil.equalFuzzy(i.getNorth(),i.getSouth()))){var l=SuperMap.Plot.PlottingUtil.equalFuzzy(i.getWest(),i.getEast())?0:(s.getEast()-s.getWest())/(i.getEast()-i.getWest()),n=SuperMap.Plot.PlottingUtil.equalFuzzy(i.getNorth(),i.getSouth())?0:(s.getNorth()-s.getSouth())/(i.getNorth()-i.getSouth()),a=L.latLng((i.getNorth()+i.getSouth())/2,(i.getWest()+i.getEast())/2),r=L.latLng((s.getNorth()+s.getSouth())/2,(s.getWest()+s.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)*l,this.latLngs[0].lat=r.lat+(o[0].lat-a.lat)*n,this.latLngs[1].lng=r.lng+(o[1].lng-a.lng)*l,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===l&&(l=0),1===n&&(n=0);let t=Math.sqrt(l*l+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(l*l+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)*l,this.latLngs[t].lat=r.lat+(o[t].lat-a.lat)*n}}},_getLatLng:function(t,e,i){var o=0,s=0;switch(t){case 1:o=e.getWest()+i.lng,s=e.getNorth()+i.lat;break;case 3:o=e.getEast()+i.lng,s=e.getNorth()+i.lat;break;case 6:o=e.getWest()+i.lng,s=e.getSouth()+i.lat;break;case 8:o=e.getEast()+i.lng,s=e.getSouth()+i.lat;break;case 2:o=(e.getEast()+e.getWest())/2,s=e.getNorth()+i.lat;break;case 4:o=e.getWest()+i.lng,s=(e.getNorth()+e.getSouth())/2;break;case 5:o=e.getEast()+i.lng,s=(e.getNorth()+e.getSouth())/2;break;case 7:o=(e.getEast()+e.getWest())/2,s=e.getSouth()+i.lat}return L.latLng(s,o)},_setSymbolData:function(t){if(nt.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,this.symbolData.hasOwnProperty("localePoints")||(this.symbolData.localePoints=[]);var e=this.getLatLngs().length;this.symbolType===SuperMap.Plot.SymbolType.ELLIPSESYMBOL&&(e=3);for(var 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(nt.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 s=0;s<t.length;s++){L.Util.isMercatorProjection(i)&&(t[s].positionPoints=L.Util.conventProjectPts(L.Util.superMapPointsToLatLngs(t[s].positionPoints)));var o={type:t[s].type,positionPoints:SuperMap.Plot.PlottingUtil.clonePoints(t[s].positionPoints),style:SuperMap.Util.cloneObject(t[s].style),angle:t[s].angle,isCalculate:t[s].isCalculate,textContent:t[s].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,s){var l=this._createLayer(t,e,o,s);this._isPolylineType(t)&&(i.fillLimit=!0,i.fill=!1);var n={};if(n=SuperMap.Util.copyAttributes(n,i),this._copyStyleForCell(n,this.style,l),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)}return L.setOptions(l,n),this._addComponents(l),l},_createLayer:function(t,e,i,o){var s=null;switch(t){case 24:case 44:case 48:case 290:case 400:case 590:s=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:s=L.polygon(e,{smoothFactor:0});break;case 26:s=L.rectangle(e);break;case 34:s=L.supermap.plotting.text(e,{text:i});break;case 2e3:s=L.circle(e[0],o)}return s},_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=[],s={},l={},n={},a={},r=this.surroundLineType===SuperMap.Plot.AlgoSurroundLineType.OUT?1:-1,p=this.style.surroundLineWidth/2+this.style.weight/2,u=this._map.layerPointToLatLng(L.point(0,0)),h=this._map.layerPointToLatLng(L.point(p,0)),y=new SuperMap.Geometry.Point(u.lng,u.lat),c=new SuperMap.Geometry.Point(h.lng,h.lat);e=SuperMap.Plot.PlottingUtil.distance(y,c),(s=SuperMap.Util.cloneObject(this.style)).surroundLineFlag=!0,s.fill=!1,s.fillLimit=!0,s.fillColorLimit=!0;for(var S=0,P=t.length;S<P;S++)if((!t[S].style.lineWidthLimit||0!==t[S].style.weight)&&(!0!==t[S].style.surroundLineLimit?t[S].style.surroundLineType=this.surroundLineType:void 0===t[S].style.surroundLineType&&(t[S].style.surroundLineType=SuperMap.Plot.AlgoSurroundLineType.NONE),t[S].style.surroundLineType!==SuperMap.Plot.AlgoSurroundLineType.NONE&&t[S].type!==SuperMap.Plot.SymbolType.TEXTSYMBOL)){if(t[S].style.surroundLineType===SuperMap.Plot.AlgoSurroundLineType.INNER||t[S].style.surroundLineType===SuperMap.Plot.AlgoSurroundLineType.OUT){var g=SuperMap.Plot.PlottingUtil.innerOutlineDir(t[S].positionPoints)*r*e;if(this._isPolylineType(t[S].type)||t[S].positionPoints.push(t[S].positionPoints[0]),0===(i=SuperMap.Plot.PlottingUtil.getSurroundLinePts(t[S].positionPoints,g)).length)continue;l={type:t[S].type,positionPoints:i,style:s},t.splice(++S,0,l),++P}if(t[S].style.surroundLineType===SuperMap.Plot.AlgoSurroundLineType.ALL){if(0===(i=SuperMap.Plot.PlottingUtil.clonePoints(t[S].positionPoints)).length)continue;if(l={type:t[S].type,positionPoints:i,style:s},t.splice(++S,0,l),++P,0===(o=SuperMap.Plot.PlottingUtil.clonePoints(t[S].positionPoints)).length)continue;(a=SuperMap.Util.copyAttributes(this.style)).surroundLineFlag=!1,a.fill=!1,a.fillLimit=!0,a.fillColorLimit=!0,n={type:t[S].type,positionPoints:o,style:a},t.splice(++S,0,n),++P}}}}},_updateSymbolTexts:function(){for(var t=0;t<this.geoSymbolTexts.length;t++){var e=this.geoSymbolTexts[t];if(null===e||void 0===e)return;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 ht?this.components[i]._rotate(t,e):(this.components[i]instanceof tt&&(this.components[i].options.rotation+=-t),this.components[i]instanceof Q&&(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){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)},_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 ht?this.components[i]._resize(t,e):(this.components[i]instanceof tt&&(this.components[i].options.graphicWidth*=t,this.components[i].options.graphicHeight*=t),this.components[i]instanceof Q&&(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},_copyStyleForCell:function(t,e,i){if(e.display&&"none"===e.display)t.display=e.display;else{if(!0===t.surroundLineFlag)this.surroundLineType===SuperMap.Plot.AlgoSurroundLineType.ALL?t.weight=2*e.surroundLineWidth+e.weight:t.weight=e.surroundLineWidth,t.color=e.surroundLineColor,t.opacity=e.surroundLineColorOpacity,t.dashArray=null;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 Q)1===t.fillSymbolID?t.fill=!1:0===t.fillSymbolID&&(t.fill=!0),t.fillColorLimit||(t.fillColor=t.strokeColor,t.fillOpacity=t.strokeOpacity);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=ht;var yt=ht.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.scalePoints=[],this.scaleValues=[],this.symbolType=0===t?e:SuperMap.Plot.SymbolType.ALGOSYMBOL,ht.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),delete this.controlPoints),this._setBasicSymbolName()},onAdd:function(t){this.superMapAlgoSymbol&&(this.superMapAlgoSymbol.map=t._map),ht.prototype.onAdd.call(this,t)},getTextContent:function(){return this.textContent},getArrowHeadType:function(){return this.arrowHeadType},setArrowHeadType:function(t){1016===this.code&&this.arrowHeadType!==t&&(this.arrowHeadType=t,this.redraw())},getArrowTailType:function(){return this.arrowTailType},setArrowTailType:function(t){1016===this.code&&this.arrowTailType!==t&&(this.arrowTailType=t,this.redraw())},getArrowBodyType:function(){return this.arrowBodyType},setArrowBodyType:function(t){1016===this.code&&this.arrowBodyType!==t&&(this.arrowBodyType=t,this.redraw())},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},setSurroundLineType:function(t){this.surroundLineType=t,this.redraw()},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 s=new SuperMap.GetSymbolInfoParameters;s.libID=this.libID,s.code=this.code,s.inputPoints=L.Util.latLngsToSuperMapPoints(this.getLatLngs()),s.subSymbols=this.subSymbols,L.supermap.symbolInfoService(this.serverUrl).getSymbolInfo(s,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(ht.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(ht.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])}this.symbolData.hasOwnProperty("arrowTailType")&&(this.arrowTailType=this.symbolData.arrowTailType),this.symbolData.hasOwnProperty("arrowBodyType")&&(this.arrowBodyType=this.symbolData.arrowBodyType),this.symbolData.hasOwnProperty("arrowHeadType")&&(this.arrowHeadType=this.symbolData.arrowHeadType)}},_setSymbolData:function(t){if(ht.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),this.symbolData.hasOwnProperty("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(){if("none"!==this.style.display)if(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){if(this.superMapCalculateParts(),this._setBasicSymbolText(),this.symbolType===SuperMap.Plot.SymbolType.ELLIPSESYMBOL){if(3===this.superMapAlgoSymbol.controlPoints.length){var t=new SuperMap.Geometry.Point(2*this.superMapAlgoSymbol.controlPoints[0].x-this.superMapAlgoSymbol.controlPoints[1].x,2*this.superMapAlgoSymbol.controlPoints[0].y-this.superMapAlgoSymbol.controlPoints[1].y);this.superMapAlgoSymbol.controlPoints.push(t);let e=new SuperMap.Geometry.Point(2*this.superMapAlgoSymbol.controlPoints[0].x-this.superMapAlgoSymbol.controlPoints[2].x,2*this.superMapAlgoSymbol.controlPoints[0].y-this.superMapAlgoSymbol.controlPoints[2].y);this.superMapAlgoSymbol.controlPoints.push(e)}else if(5===this.superMapAlgoSymbol.controlPoints.length){let t=new SuperMap.Geometry.Point(2*this.superMapAlgoSymbol.controlPoints[0].x-this.superMapAlgoSymbol.controlPoints[2].x,2*this.superMapAlgoSymbol.controlPoints[0].y-this.superMapAlgoSymbol.controlPoints[2].y);this.superMapAlgoSymbol.controlPoints[4].x=t.x,this.superMapAlgoSymbol.controlPoints[4].y=t.y}this.latLngs=L.Util.superMapPointsToLatLngs(this.superMapAlgoSymbol.controlPoints)}}else!this.superMapAlgoSymbol&&this.getLatLngs().length>=this.minEditPts&&(this._calAccessServerSymbol(),this._setBasicSymbolText())},_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){if((e=new SuperMap.Geometry.Point(e.lng,e.lat)).isScalePoint=!0,this._clearComponents(),this.superMapModifyPoint(t,e),this.symbolType===SuperMap.Plot.SymbolType.ELLIPSESYMBOL){if(this.isCalculate=!1,this.superMapAlgoSymbol.calculateParts(),this._transSymbolCellsToLayers(this.superMapAlgoSymbol.components),this.symbolType===SuperMap.Plot.SymbolType.ELLIPSESYMBOL)for(var i=0;i<this.superMapAlgoSymbol.components.length;i++)this.superMapAlgoSymbol.components[i].isCalculate=this.isCalculate;if(3===this.superMapAlgoSymbol.controlPoints.length){var o=new SuperMap.Geometry.Point(2*this.superMapAlgoSymbol.controlPoints[0].x-this.superMapAlgoSymbol.controlPoints[1].x,2*this.superMapAlgoSymbol.controlPoints[0].y-this.superMapAlgoSymbol.controlPoints[1].y);this.superMapAlgoSymbol.controlPoints.push(o);let t=new SuperMap.Geometry.Point(2*this.superMapAlgoSymbol.controlPoints[0].x-this.superMapAlgoSymbol.controlPoints[2].x,2*this.superMapAlgoSymbol.controlPoints[0].y-this.superMapAlgoSymbol.controlPoints[2].y);this.superMapAlgoSymbol.controlPoints.push(t)}else if(5===this.superMapAlgoSymbol.controlPoints.length){let t=new SuperMap.Geometry.Point(2*this.superMapAlgoSymbol.controlPoints[0].x-this.superMapAlgoSymbol.controlPoints[2].x,2*this.superMapAlgoSymbol.controlPoints[0].y-this.superMapAlgoSymbol.controlPoints[2].y);this.superMapAlgoSymbol.controlPoints[4].x=t.x,this.superMapAlgoSymbol.controlPoints[4].y=t.y}this.latLngs=L.Util.superMapPointsToLatLngs(this.superMapAlgoSymbol.controlPoints)}this._calculateAvoidRegions()},_reView:function(){if(void 0!==this.prevStrokeWidth&&this.prevStrokeWidth!==this.style.weight&&(this.strokeWidth=this.style.weight),this.fromZoom!==this._map.getZoom()){var t=this.getBounds();if(!0===this.isEdit&&t.isValid()){var e=this._map.getZoomScale(this._map.getZoom(),this.fromZoom);if(this.dScale*=e,void 0!==this.strokeWidth&&null!==this.strokeWidth||(this.strokeWidth=this.style.weight),void 0===this.baseScale){var i=Math.abs(t.getEast()-t.getWest()),o=Math.abs(t.getNorth()-t.getSouth());i<o&&(i=o);let e=this.strokeWidth/.5*5;var s=this._map.layerPointToLatLng(L.point(0,0)),l=this._map.layerPointToLatLng(L.point(e,0)),n=Math.sqrt((s.lat-l.lat)*(s.lat-l.lat)+(s.lng-l.lng)*(s.lng-l.lng));this.baseScale=n/i}if(this.dScale<=this.baseScale){this.scaleStrokeWidth=!0;let t=this.strokeWidth/.5*5;var a=this.dScale*t/this.baseScale;this.style.weight=Math.round(a/10),this.style.weight>=this.strokeWidth&&(this.style.weight=this.strokeWidth),this.style.weight<=.5&&(this.style.weight=.5)}else!0===this.scaleStrokeWidth&&(this.style.weight=this.strokeWidth,this.scaleStrokeWidth=!1),this.strokeWidth=this.style.weight;if(this.prevStrokeWidth=this.style.weight,34===this.symbolType&&!1===this.style.sizeFixed||34!==this.symbolType)for(var r in this.textContent.length>0&&(this.style.fontSize*=e),this.components)this.components[r]instanceof Q&&(this.components[r].options.fontSize*=e);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.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){ht.prototype._resize.call(this,t,e);var i=new SuperMap.Geometry.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 s=0;s<this.symbolData.innerCells[e].positionPoints.length;s++){var o=new SuperMap.Geometry.Point(this.symbolData.innerCells[e].positionPoints[s].x,this.symbolData.innerCells[e].positionPoints[s].y);SuperMap.Plot.PlottingUtil.resize(i,t,o),this.symbolData.innerCells[e].positionPoints[s].x=o.x,this.symbolData.innerCells[e].positionPoints[s].y=o.y}for(let e=0;e<this.symbolData.scalePoints.length;e++){var s=new SuperMap.Geometry.Point(this.symbolData.scalePoints[e].x,this.symbolData.scalePoints[e].y);SuperMap.Plot.PlottingUtil.resize(i,t,s),this.symbolData.scalePoints[e].x=s.x,this.symbolData.scalePoints[e].y=s.y}}},_setBasicSymbolName:function(){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)}},_setBasicSymbolText:function(){if(!1!==this.textDisplay&&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){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=SuperMap.Plot.PlottingUtil.cloneObject(this.style);i.surroundLineFlag=!1,i.labelAlign="cm",i.fontSize=this.style.fontSize,i.fontSizeLimit=!1,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,22===this.libID&&1016===this.code&&(this.superMapAlgoSymbol.arrowHeadType=this.arrowHeadType,this.superMapAlgoSymbol.arrowBodyType=this.arrowBodyType,this.superMapAlgoSymbol.arrowTailType=this.arrowTailType),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))},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())}}),ct=function(t,e,i,o){return new yt(t,e,i,o)};L.supermap.plotting.algoSymbol=ct,L.supermap.plotting.AlgoSymbol=yt;var St=ht.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,ht.prototype.initialize.call(this,t,e,i,o)},destroy:function(){this.space=null,this.inner=null,this.textAnchor=null,ht.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),s=SuperMap.Plot.PlottingUtil.getTextCount(this.towardNode.textContent[0]);for(let t=1;t<this.towardNode.textContent.length;t++){var l=SuperMap.Plot.PlottingUtil.getTextCount(this.towardNode.textContent[t]);s<l&&(s=l)}if(null===this.towardNode.offsetX||null===this.towardNode.offsetY){var n=this.space+(this.dScale*this.style.fontSize+1)*s/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),y=a*SuperMap.Plot.PlottingUtil.distance(u,h);!0===this.inner&&(y=-y);var c=SuperMap.Plot.PlottingUtil.parallel([e,i],y);this.latLngs=[];var S=L.latLng((c[0].y+c[1].y)/2,(c[0].x+c[1].x)/2);this.latLngs.push(S);var P=this._map.latLngToLayerPoint(o),g=this._map.latLngToLayerPoint(S);this.towardNode.offsetX=g.x-P.x,this.towardNode.offsetY=g.y-P.y}else{var d=this._map.latLngToLayerPoint(o),f=L.point(d.x+this.towardNode.offsetX,d.y+this.towardNode.offsetY),m=this._map.layerPointToLatLng(f);0===this.latLngs.length?this.latLngs.push(m):this.latLngs[0]=m}var M=180*SuperMap.Plot.PlottingUtil.radian(e,i)/Math.PI,b=this._getTextContentsCells(s),T="";null!==this._map&&this._map instanceof L.Map&&(T=this._map.options.crs.code);for(let t=0;t<b.length;t++){var v=b[t];L.Util.isMercatorProjection(T)&&(v.positionPoints=L.Util.conventProjectPts(L.Util.superMapPointsToLatLngs(v.positionPoints))),v.positionPoints=SuperMap.Plot.Primitives.getSpatialData(v.type,v.positionPoints,v.angle);for(var A=[],x=0;x<v.positionPoints.length;x++)A.push(SuperMap.Plot.PlottingUtil.coordinateTrans(new SuperMap.Geometry.Point(this.latLngs[0].lng,this.latLngs[0].lat),v.positionPoints[x],M));var _=null;if(L.Util.isMercatorProjection(T)){for(var O=[],w=0,I=(_=L.Util.unConventProjectPts(A)).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(_[w])[0],0));_=L.Util.superMapPointsToLatLngs(O)}else _=L.Util.superMapPointsToLatLngs(A);v.type===SuperMap.Plot.SymbolType.TEXTSYMBOL?0!==v.textContent.length&&(v.style.labelRotation=90-M,this._createAndDrawLayer(SuperMap.Plot.SymbolType.TEXTSYMBOL,_,v.style,v.textContent)):this._createAndDrawLayer(v.type,_,v.style,v.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)),s=this._map.layerPointToLatLng(L.point(i,0)),l=SuperMap.Plot.PlottingUtil.distance({x:o.lng,y:o.lat},{x:s.lng,y:s.lat}),n=l,a=l*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 y=1;y<=e.length;y++){var c=new Object;c.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,c.positionPoints=[],c.positionPoints.push(new SuperMap.Geometry.Point(-(y+1)*n+u,.5*a)),c.positionPoints.push(new SuperMap.Geometry.Point(-(y+1)*n+u,-.5*a)),c.style={surroundLineFlag:!1,fontSize:12},p.push(c);var S=new Object;S.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,S.positionPoints=[],S.positionPoints.push(new SuperMap.Geometry.Point(-(.5+y+1)*n+u,0)),S.textContent=e[y-1],S.style={surroundLineFlag:!1,fontSize:12,fontFamily:"Microsoft YaHei"},S.style.labelAlign="cm",p.push(S)}var P=new SuperMap.Geometry.Point(-1.4*n+u,0),g=new Object;g.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,g.positionPoints=[],g.positionPoints.push(P),g.textContent=this.towardNode.index.toString(),g.style={surroundLineFlag:!1,fontSize:12,fontSizeLimit:!0,fontFamily:"Microsoft YaHei"},g.style.labelAlign="cm",p.push(g);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 St(t,e,i,o)},L.supermap.plotting.LiterateSign=St;var Pt=yt.extend({relLineText:0,showPathLine:!0,showPathLineArrow:!1,isCurve:!1,isAvoid:!1,textToLineDistance:0,getRelLineText:function(){return this.relLineText},setRelLineText:function(t){this.relLineText!==t&&(this.relLineText=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,yt.prototype.initialize.call(this,t,e,i,o)},_reView:function(){this.fromZoom!==this._map.getZoom()&&(this.redraw(),this.fromZoom=this._map.getZoom())},toSuperMapAlgorithms:function(){yt.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 Pt(t,e,i,o)},L.supermap.plotting.PathText=Pt;var gt=ht.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),s=0;s<o.length;s++)o[s]instanceof St||(o[s].latLngs[0]=L.latLng(t,e)),o[s].redraw();var l=this.route._getFeatureEndWith(this.routeNode);for(let i=0;i<l.length;i++)l[i]instanceof St||(l[i].latLngs[1]=L.latLng(t,e)),l[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){ht.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,ht.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(),s=L.latLng(o.getNorth(),o.getEast()),l=this.routeNode.style;l.labelAlign="lb",this._createAndDrawLayer(SuperMap.Plot.SymbolType.TEXTSYMBOL,[s],l,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 s=0;s<o.positionPoints.length;s++){o.positionPoints[s].x=o.positionPoints[s].x*this.dScale,o.positionPoints[s].y=o.positionPoints[s].y*this.dScale;var l=this.dRotate*(Math.PI/180);SuperMap.Plot.PlottingUtil.rotateAngle({x:this.anchorPoint.lng,y:this.anchorPoint.lat},l,o.positionPoints[s]),o.positionPoints[s]=this._transitionPoint(o.positionPoints[s],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 gt(t,e,i,o)},L.supermap.plotting.RouteNode=gt;var dt=nt.extend({routeNodes:[],nextRouteNodeType:SuperMap.Plot.RouteNodeType.TURNING,arrRoutePts:[],initialize:function(t,e,i,o){this.scaleByMap=!0,this.minEditPts=1,this.maxEditPts=9999,this.routeNodes=[],this.arrRoutePts=[],nt.prototype.initialize.call(this,t,e,i,o)},destroy:function(){this.routeNodes=null,this.arrRoutePts=null,nt.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 yt){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 yt){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 s=[],l=0;l<i;l++)s.push(t),s.push(e);!0===this.highlightFlag&&this.highlightStyle&&null!==this.highlightStyle?s.push(this.highlightStyle):s.push(this.lineStyle);for(var n=this,a=s.length,r=0;r<a;r++)setTimeout(function(){for(var t in n.components)if(n.components[t]instanceof yt){var e=SuperMap.Util.copyAttributes(n.components[t].style,s[0]);n.components[t].setStyle(e)}s.splice(0,1)},o*r)},applyTextStyle:function(t){var e;for(var i in this.components)(this.components[i]instanceof St||this.components[i]instanceof Pt)&&(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 s=0;s<this.routeNodes[o].towardNodes.length;s++)this.routeNodes[o].towardNodes[s].style=SuperMap.Util.copyAttributes(this.routeNodes[o].towardNodes[s].style,e)},applyLineStyle:function(t){for(var e in this.components)this.components[e]instanceof St||this.components[e]instanceof Pt||this.components[e]instanceof gt||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 gt&&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 s=this._getFeatureStartWith(t),l=0;l<s.length;l++)s[l].latLngs[0]=L.latLng(t.y,t.x),s[l].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,s,l,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!==s&&(i.textContent=s),void 0!==l&&(i.relLineText=l),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 s=!1,l=0;l<e.towardNodes.length;l++)e.towardNodes[l].routeNodeId===t.id&&(s=!0);if(!1===s){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 s=0;s<o.towardNodes.length;s++){var l=this._getNodeByUuid(o.towardNodes[s].routeNodeId);if(null!==l){var n=SuperMap.Plot.PlottingUtil.computePointToLineMinDis({x:t.lng,y:t.lat},[{x:o.x,y:o.y},{x:l.x,y:l.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[s]),o.towardNodes.splice(s,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 s=this.routeNodes[o];if(null!==s&&(s.towardNodes&&null!==s.towardNodes)){0===s.towardNodes.length&&i.push(s);for(var l=0;l<s.towardNodes.length;l++){var n=this._getNodeByUuid(s.towardNodes[l].routeNodeId);if(null!==n){var a=SuperMap.Plot.PlottingUtil.computePointToLineMinDis({x:t.lng,y:t.lat},[{x:s.x,y:s.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(s.towardNodes[l]),s.towardNodes.splice(l,1);let i=new SuperMap.Plot.TowardNode;return i.routeNodeId=e.id,s.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 gt&&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 gt||this.components[e]instanceof St)&&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},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 s=[];if(s.push(L.latLng(e.y,e.x)),s.push(L.latLng(o.y,o.x)),0===this.arrRoutePts.length){let t=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.POLYLINESYMBOL,s,{enableEdit:!1},this.style);this._addComponents(t),t._startRouteNode=e.id,t._endRouteNode=o.id}var l=e.towardNodes[i].textContent;if(null!==l){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,s,{relLineText:n,showPathLine:!1,textContent:l,enableEdit:!1},a);this._addComponents(r),r._startRouteNode=e.id,r._endRouteNode=o.id}}}this._createRouteNode(e)}}this._finishRoute()},_initRoute:function(){this.prevRouteNode=[],this.prevLiterateSign=[];for(let t=0;t<this.components.length;t++)this.components[t]instanceof gt?this.prevRouteNode.push(this.components[t]):this.components[t]instanceof St?this.prevLiterateSign.push(this.components[t]):this.components[t]._clearComponents();this.components=[]},_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){at.prototype._addComponents.call(this,t)},_clearComponents:function(){at.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(nt.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,this.symbolData.routeNodes[i].hasOwnProperty("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++)this.symbolData.arrRoutePts[t][e].hasOwnProperty("x")&&this.symbolData.arrRoutePts[t][e].hasOwnProperty("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(){nt.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=dt;var ft=L.Path.extend({name:"",serverUrl:null,features:null,initialize:function(t,e,i){i=i||{},L.setOptions(this,i),this.name=t,this.serverUrl=e,this.features=[]},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;this._map.on("zoomend",function(){for(var t=0;t<e.features.length;t++)e.features[t]._reView()})},onRemove:function(){L.Path.prototype.onRemove.call(this),this.removeAllFeatures()},addFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]);for(let e=0;e<t.length;)t[e]instanceof nt||t[e]instanceof pt?(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,s=t.length;o<s;o++){var e=t[o];if(e instanceof nt||t[o]instanceof pt){(e instanceof at||e instanceof dt)&&this._map&&this._map.getPlotEditControl()&&this._map.getPlotEditControl().disableEditFeatures(e.components),this._map&&this._map.getPlotEditControl()&&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)}}this._update()},getFeatures:function(){return this.features.slice()},removeAllFeatures:function(){this.removeFeatures(this.features.slice()),this.features=[]},_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),s=0,l=i.length;s<l;s++)e=i[s].style.zIndex,i[s]!==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}}),mt=ft.extend({addFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]),ft.prototype.addFeatures.call(this,t)}});L.supermap.plotting.animationLayer=function(t,e){return new mt(t,e)},L.Map.include({getFeatureByUuid:function(t){var e=[];for(var i in this._layers)if(this._layers[i]instanceof Tt){var o=this._layers[i].getFeatureByUuid(t);null!==o&&e.push(o)}return 0===e.length?null:e[0]},getPlottingLayers:function(){var t=[],e=this._layers;for(var i in e)e[i]instanceof Tt&&t.push(e[i]);return t},clearPlottingLayers:function(){var t=this._layers;for(var e in t)t[e]instanceof Tt&&(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,s=[];for(var l in this[t])s.push(this[t][l]);return SuperMap.Array.filter(s,function(t){return t[e]===i||o&&i.test(t[e])})},latLngToLayerPoint:function(t){return this.project(L.latLng(t))._subtract(this.getPixelOrigin())}});i(2),i(1);var Lt=at.extend({ratio:null,scalePoints:null,scaleValues:null,initialize:function(t,e,i,o){at.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)},destroy:function(){at.prototype.destroy.call(this),this.ratio=[]},setRotate:function(t){isNaN(t)||(this.dRotate+=t,this.redraw())},redraw:function(){if("none"!==this.style.display){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],s=this.components[t-1],l=this._calculateFlagTop(s),n=L.Util.cloneLatLngs(s.getLatLngs())[0],a=this._map.latLngToLayerPoint(n);!0===s.positionOffset&&(a.x+=s.positionOffsetX,a.y+=s.positionOffsetY),n=this._map.layerPointToLatLng(a),l=this._pointRotate(this.dRotate,n,l);var r=this._findPointOnLineByRatio(o,n,l);this.components[t].dRotate=this.dRotate,this.components[t].setLatLngs([r]);var p=new L.latLng(r);p.tag=t,this.scalePoints.push(p)}}}else this._clearComponents()},_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)),s=t+Math.atan2(i.lat-e.lat,i.lng-e.lng);return i.lng=e.lng+o*Math.cos(s),i.lat=e.lat+o*Math.sin(s),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),s=i.lng-e.lng,l=e.lat-i.lat,n=s*s,a=l*l,r=s*l,p=s*s+l*l;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 s=Math.sqrt(Math.pow(i.lng-o.lng,2)+Math.pow(i.lat-o.lat,2)),l=this._projectPoint(e,i,o),n=Math.sqrt(Math.pow(i.lng-l.lng,2)+Math.pow(i.lat-l.lat,2));this.ratio[t-1]=n/s}this.redraw()},_reView:function(){for(var t in this.components)this.components[t].scaleByMap=this.scaleByMap,this.components[t]._reView();this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},_parseSymbolData:function(){at.prototype._parseSymbolData.call(this),this.symbolData&&(this.ratio=this.symbolData.ratio)},_setSymbolData:function(){at.prototype._setSymbolData.call(this),this.symbolData&&(this.symbolData.ratio=this.ratio)}}),Mt=function(t,e,i,o){return new Lt(t,e,i,o)};L.supermap.plotting.flagGroup=Mt,L.supermap.plotting.FlagGroup=Lt;var bt=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.Control.prototype.initialize.call(this,e),L.setOptions(this,e),this._temportary=new ft("avoidRegionControl-temportary",this.serverUrl),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),this._map=null},_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),s=L.supermap.plotting.editMarker(o,{icon:this.options.avoidIcon,nHandle:-1,tag:i});this._addToMapAndBindMarker(s),e.push(s),s.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);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)}}),Tt=ft.extend({tolerancePixel:5,isLocked:!1,isEditable:!0,isSelected:!0,visibility:!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().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){ft.prototype.initialize.call(this,t,e,i),this.setVisibility(this.visibility)},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){SuperMap.Util.isArray(t)||(t=[t]),this.fire(SuperMap.Plot.Event.beforefeaturesadded,{features:t}),ft.prototype.addFeatures.call(this,t),this.fire(SuperMap.Plot.Event.featuresadded,{features:t}),this._map.getPlotEditControl()&&this.isSelected&&this._map.getPlotEditControl().enableEditFeatures(t)},removeFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]),this.fire(SuperMap.Plot.Event.beforefeaturesremoved,{features:t}),ft.prototype.removeFeatures.call(this,t),this.fire(SuperMap.Plot.Event.featuresremoved,{features:t})},removeAllFeatures:function(){this.fire(SuperMap.Plot.Event.beforefeaturesremoved,{features:this.features}),ft.prototype.removeAllFeatures.call(this),this.fire(SuperMap.Plot.Event.featuresremoved,{features:this.features})},createSymbol:function(t,e,i,o,s,l,n,a){var r;if(l||(l={}),l.uuid=o,l.serverUrl=this.serverUrl,void 0!==l.symbolData&&null!==l.symbolData||!SuperMap.Plot.AlgoSymbolFactory.isAccessServer(t,e))if((r=L.supermap.plotting.PlottingObject.createSymbol(t,e,i,l,s,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 y=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).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(y,r.subSymbols[e]);-1!==o&&y.splice(o,1),r.subSymbols[e].symbolData=SuperMap.Plot.PlottingUtil.cloneObject(t.result)}0===y.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).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 S=null,P=!1;if(l.hasOwnProperty("negativeImage")||l.hasOwnProperty("symbolRank")||l.hasOwnProperty("surroundLineType")?P=!0:S=this._getSymbolDataFromCache(t,e),!S||P){let o=new SuperMap.GetSymbolInfoParameters({libID:t,code:e});i&&(o.inputPoints=L.Util.latLngsToSuperMapPoints(i)),l.hasOwnProperty("negativeImage")&&(o.negativeImage=l.negativeImage),l.hasOwnProperty("symbolRank")&&(o.symbolRank=l.symbolRank),l.hasOwnProperty("surroundLineType")&&(o.surroundLineType=l.surroundLineType);var g=Math.floor(1e3*Math.random());o.dynamicToken=g,L.supermap.symbolInfoService(this.serverUrl).getSymbolInfo(o,function(o){o.result.dynamicToken&&o.result.dynamicToken===SuperMap.MD5.md5(g.toString())&&(P||o.result.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL||(delete o.result.dynamicToken,this._cacheSymbolData(o.result)),l.symbolData=SuperMap.Plot.PlottingUtil.cloneObject(o.result),r=L.supermap.plotting.PlottingObject.createSymbol(t,e,i,l,s,a),this.addFeatures(r),"function"==typeof n&&n({feature:r}))},this)}else l.symbolData=S,r=L.supermap.plotting.PlottingObject.createSymbol(t,e,i,l,s,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 ht&&i.push(t[o]);if(i.length>1){var s=new at(0,SuperMap.Plot.SymbolType.GROUPOBJECT,[],{subObjects:i,uuid:e});return this.addFeatures(s),s}return null},unGroupObject:function(t){var e=[];return t.symbolType===SuperMap.Plot.SymbolType.GROUPOBJECT||t.symbolType===SuperMap.Plot.SymbolType.FLAGGROUP?(e=t._unGroupObject(),this.removeFeatures(t),t.destroy()):e.push(t),e},createInterferenceBeam:function(t,e,i,o,s,l){s||(s={}),s.associatedUuid=t,s.uuid=i,s.custom=l;var n=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.INTERFERENCEBEAM,e,s,o,l);return this.addFeatures(n),n},createSatellite:function(t,e,i,o,s,l,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).getSymbolInfo(u,function(p){this._cacheSymbolData(p.result),n||(n={}),n.serverUrl=this.serverUrl,n.orbitPoints=i,n.textContent=o,n.uuid=s,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,l,r);this.addFeatures(u),"function"==typeof a&&a({feature:u})},this)}else{n||(n={}),n.serverUrl=this.serverUrl,n.orbitPoints=i,n.textContent=o,n.uuid=s,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,l,r);this.addFeatures(h),"function"==typeof a&&a({feature:h})}},createSatelliteTimeWindows:function(t,e,i,o,s,l){s||(s={}),s.associatedUuid=t,s.timeWindows=e,s.custom=l,s.uuid=i;var n=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS,[],s,o,l);return this.addFeatures(n),n},createSatelliteTimeWindows1:function(t,e,i,o,s,l){s||(s={}),s.associatedUuid=t;for(var n=0;n<e.length;n++)e[n].type="Number";s.timeWindows=e,s.custom=l,s.uuid=i;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS,[],s,o,l);return this.addFeatures(a),a},createSatelliteTimeWindows2:function(t,e,i,o,s,l){s||(s={}),s.associatedUuid=t;for(var n=0;n<e.length;n++)e[n].type="Time";s.timeWindows=e,s.custom=l,s.uuid=i;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS,[],s,o,l);return this.addFeatures(a),a},createSymbolText:function(t,e,i,o,s,l){s||(s={}),s.associatedUuid=t,s.symbolTexts=e,s.custom=l,s.uuid=i;var n=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SYMBOLTEXT,[],s,o,l);return this.addFeatures(n),n},createSymbolText1:function(t,e,i,o,s,l){s||(s={}),s.associatedUuid=t,s.textContent=e,s.custom=l,s.uuid=i;var n=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SYMBOLTEXT1,[],s,o,l);return this.addFeatures(n),n},createNavyDeployment:function(t,e,i,o,s,l,n){if(s||(s={}),s.associatedUuid=t,s.custom=n,s.serverUrl=this.serverUrl,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 y=new SuperMap.GetSymbolInfoParameters({libID:a[h].libID,code:a[h].code});L.supermap.symbolInfoService(this.serverUrl).getSymbolInfo(y,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){s.subSymbols=e;var p=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.NAVYDEPLOYMENT,[],s,o,n);this.addFeatures(p),"function"==typeof l&&l({feature:p})}},this)}else{s.subSymbols=e;var c=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.NAVYDEPLOYMENT,[],s,o,n);this.addFeatures(c),"function"==typeof l&&l({feature:c})}}},createAirDeployment:function(t,e,i,o,s,l,n){if(s||(s={}),s.associatedUuid=t,s.custom=n,s.serverUrl=this.serverUrl,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 y=new SuperMap.GetSymbolInfoParameters({libID:a[h].libID,code:a[h].code});L.supermap.symbolInfoService(this.serverUrl).getSymbolInfo(y,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){s.subSymbols=e;var p=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.AIRDEPLOYMENT,[],s,o,n);this.addFeatures(p),"function"==typeof l&&l({feature:p})}},this)}else{s.subSymbols=e;var c=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.AIRDEPLOYMENT,[],s,o,n);this.addFeatures(c),"function"==typeof l&&l({feature:c})}}},createNavyRoute:function(t,e,i,o,s,l){s||(s={}),s.routeNodes=e,s.uuid=i,s.custom=l,s.arrRoutePts=t;var n=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.NAVYROUTE,[],s,o,l);return this.addFeatures(n),n},createMissileRoute:function(t,e,i,o,s,l){s||(s={}),s.routeNodes=e,s.uuid=i,s.custom=l,s.arrRoutePts=t;var n=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.MISSILEROUTE,[],s,o,l);return this.addFeatures(n),n},createAirRoute:function(t,e,i,o,s,l){s||(s={}),s.routeNodes=e,s.uuid=i,s.custom=l,s.arrRoutePts=t;var n=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.AIRROUTE,[],s,o,l);return this.addFeatures(n),n},createFlags:function(t,e,i){for(var o=[],s=0;s<t.length;s++)100===t[s].libID&&t[s].code>=2800&&t[s].code<=2900&&o.push(t[s]);var l=null;return o.length>1&&(l=new Lt(0,SuperMap.Plot.SymbolType.FLAGGROUP,[],{subObjects:o,ratio:e,uuid:i}),this.addFeatures(l)),l},createArcRegion:function(t,e,i,o,s,l,n,a,r,p,u){r||(r={}),r.centerPoint=t,r.radius=e,r.startAngle=i,r.endAngle=o,r.textContent=s,r.textPosition=l,r.uuid=n,r.custom=u,r.spatialAnalystUrl=this.spatialAnalystUrl;var h=new SuperMap.BufferDistance({value:1e3*r.radius}),y=new SuperMap.BufferSetting({endType:SuperMap.BufferEndType.ROUND,leftDistance:h,rightDistance:h,semicircleLineSegment:36}),c=new SuperMap.GeometryBufferAnalystParameters({sourceGeometry:L.marker(r.centerPoint),sourceGeometrySRID:parseInt(this._map.options.crs.code.split(":")[1]),bufferSetting:y}),S=this;L.supermap.spatialAnalystService(this.spatialAnalystUrl).bufferAnalysis(c,function(t){r.circlePts=[];for(var e=t.result.resultGeometry.points,i=0,o=e.length;i<o;i++)r.circlePts.push(new SuperMap.Geometry.Point(e[i].x,e[i].y));var s=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.ARCREGION,[],r,a,u);S.addFeatures(s),"function"==typeof p&&p({feature:s})},SuperMap.DataFormat.ISERVER)},geoJsonToFeature:function(t,e){var i=JSON.parse(t),o=parseInt(i.libID),s=parseInt(i.code);if(i.isEdit=!0,SuperMap.Plot.AlgoSymbolFactory.isAccessServer(o,s)){let t={};t.negativeImage=i.negativeImage,t.symbolRank=parseInt(i.symbolRank),t.surroundLineType=parseInt(i.surroundLineType);var l=!1;(t.negativeImage||0!==t.surroundLineType||0!==t.symbolRank)&&(l=!0);var n=this._getSymbolDataFromCache(o,s);if(l||null===n){let a=new SuperMap.GetSymbolInfoParameters({libID:o,code:s,negativeImage:t.negativeImage,symbolRank:t.symbolRank,surroundLineType:t.surroundLineType,inputPoints:i.localePoints,subSymbols:i.subSymbols});L.supermap.symbolInfoService(this.serverUrl).getSymbolInfo(a,function(t){if(!t.result.libID||!t.result.code)return;t.result.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL||l||this._cacheSymbolData(t.result),n=SuperMap.Util.cloneObject(t.result),SuperMap.Plot.AnalysisSymbol.mergeSymbolDataAndServerData(i,n);let a={symbolData:i,serverUrl:this.serverUrl,isGeoJSONData:!0},r=L.supermap.plotting.PlottingObject.createSymbol(o,s,null,a);this.addFeatures(r),"function"==typeof e&&e({feature:r})},this)}else{SuperMap.Plot.AnalysisSymbol.mergeSymbolDataAndServerData(i,n);let t={symbolData:i,serverUrl:this.serverUrl,isGeoJSONData:!0},l=L.supermap.plotting.PlottingObject.createSymbol(o,s,null,t);this.addFeatures(l),"function"==typeof e&&e({feature:l})}}else if(i.subSymbols&&0!==i.subSymbols.length){for(var a=[],r=0,p=i.subSymbols.length;r<p;r++)if(!i.subSymbols[r].symbolData){var u=L.supermap.plotting.getControl(this._map,this.serverUrl).getSymbolLibManager().getSymbolLibByLibId(i.subSymbols[r].libID);if(u)u.querySymbolbyKey(s.toString()).length>0&&(i.subSymbols[r].symbolData=this._getSymbolDataFromCache(i.subSymbols[r].libID,i.subSymbols[r].code),null===i.subSymbols[r].symbolData&&-1===SuperMap.Util.indexOf(a,i.subSymbols[r])&&a.push(i.subSymbols[r]))}for(var h=a.slice(),y=0;y<a.length;y++){let t=new SuperMap.GetSymbolInfoParameters({libID:a[y].libID,code:a[y].code});L.supermap.symbolInfoService(this.serverUrl).getSymbolInfo(t,function(t){this._cacheSymbolData(t.result);for(var l=0,n=i.subSymbols.length;l<n;l++)if(null===i.subSymbols[l].symbolData&&i.subSymbols[l].libID===t.result.libID&&i.subSymbols[l].code===t.result.code){var a=SuperMap.Util.indexOf(h,i.subSymbols[l]);-1!==a&&h.splice(a,1),i.subSymbols[l].symbolData=SuperMap.Plot.PlottingUtil.cloneObject(t.result)}if(0===h.length){let t={symbolData:i,serverUrl:this.serverUrl,symbolType:i.symbolType,isGeoJSONData:!0},l=L.supermap.plotting.PlottingObject.createSymbol(o,s,null,t);this.addFeatures(l),"function"==typeof e&&e({feature:l})}},this)}if(0===a.length){let t={symbolData:i,serverUrl:this.serverUrl,symbolType:i.symbolType,isGeoJSONData:!0},l=L.supermap.plotting.PlottingObject.createSymbol(o,s,null,t);this.addFeatures(l),"function"==typeof e&&e({feature:l})}}else{let t={symbolData:i,serverUrl:this.serverUrl,symbolType:i.symbolType,isGeoJSONData:!0},l=L.supermap.plotting.PlottingObject.createSymbol(o,s,null,t);this.addFeatures(l),"function"==typeof e&&e({feature:l})}},_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)),s=new SuperMap.Geometry.Point(i.lng,i.lat),l=new SuperMap.Geometry.Point(o.lng,o.lat),n=SuperMap.Plot.PlottingUtil.distance(s,l),a=this.features.length-1;a>=0&&null===(e=this._selectFeature(this.features[a],t.latlng,n));a--);return e},_getSymbolDataFromCache:function(t,e){var i=L.supermap.plotting.getControl(this._map,this.serverUrl).getSymbolLibManager().getSymbolLibByLibId(t);return null!==i?i.getSymbolData(e):null},_cacheSymbolData:function(t){var e=L.supermap.plotting.getControl(this._map,this.serverUrl).getSymbolLibManager().getSymbolLibByLibId(t.libID);null!==e&&e.cacheSymbolData(t)},_isAvoidRegion:function(...t){if(0!==t.length){let o=null,s=!1;if(0===t[0].avoidRegions.length)return t[0];if(o=new bt(t[0]),this._map.addControl(o),s=!0){for(var e=0,i=t[0].avoidRegions.length;e<i;e++)this.removeFeatures(t[0].avoidRegions[e]);return this._map.removeControl(o),s=!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 nt))return null;if(t instanceof at){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 dt){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 s=t.getBounds();if(s&&s.isValid()&&e.lng>=s.getWest()&&e.lng<=s.getEast()&&e.lat>=s.getSouth()&&e.lat<=s.getNorth())return t}else{var l=this._map.latLngToLayerPoint(e);for(let e=0,i=t.components.length;e<i;e++)if(t.components[e]._containsPoint&&t.components[e]._containsPoint(l))return t}return null}}),vt=function(t,e,i){return new Tt(t,e,i)};L.supermap.plotting.plottingLayer=vt;var At=Tt.extend({}),xt=L.Path.extend({cacheImages:null,graphics:null,_tempDrawingLayer:null,_currentLatLng:null,options:{renderer:L.canvas()},initialize:function(t){this._tempDrawingLayer=new At("temportary"),t=t||{},L.Util.setOptions(this,t),this.cacheImages={},this.graphics=[],this.selectGraphics=[]},getEvents:function(){var t={click:this._handleClick,mousemove:this._onMapMouseMove};return this._map._zoomAnimated&&(t.zoomanim=this._zoomAnim),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++){var s=this._map.latLngToLayerPoint(e[i].getLatLng()),l=L.point(s.x-e[i].getImage().anchor.x,s.y-e[i].getImage().anchor.y),n=L.point(s.x+(e[i].getImage().size[0]-e[i].getImage().anchor.x),s.y+(e[i].getImage().size[1]-e[i].getImage().anchor.y));if(L.bounds(l,n).contains(this._map.latLngToLayerPoint(t.latlng))){this._tempDrawingLayer._renderer._container.style.cursor=e[i].getImage().feature.isSelected?"move":"pointer";break}this._tempDrawingLayer._renderer._container.style.cursor=""}},addFeatures:function(t){L.Util.isArray(t)||(t=[t]);for(let o=0,s=t.length;o<s;o++){var e=t[o],i=this._generateFromFeature(e);if(this.cacheImages[i]){this.cacheImages[i].imgCount++;let t=new et(e);t.canvas=this.cacheImages[i].img.canvas,t.anchor=this.cacheImages[i].img.anchor,t.size=this.cacheImages[i].img.size,t.pxBounds=this.cacheImages[i].img.pxBounds,this.graphics[o]=new it({_latlng:e.getLatLngs()[0],_image:t,_uuid:i})}else{if(0===e.components.length){this._tempDrawingLayer.addFeatures(e);let t=new et(e);t.render(),this.cacheImages[i]={img:t.getCacheInfo(),imgCount:1},this.graphics[o]=new it({_latlng:e.getLatLngs()[0],_image:t,_uuid:i})}this._tempDrawingLayer.removeFeatures(e)}this.graphics[o].layer=this,e.graphic=this.graphics[o]}this._update()},removeGraphics:function(t){L.Util.isArray(t)||(t=[t]);var e=this;t.map(function(t){let i=SuperMap.Util.indexOf(e.selectGraphics,t);-1!==i&&(t.updateImage(),e._tempDrawingLayer.removeFeatures(t.getImage().feature),e.selectGraphics.splice(i,1));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),e._renderer._clear(),t}),this._update()},updateGraphics:function(t){L.Util.isArray(t)||(t=[t]);var e=this;t.map(function(t){let i=t.getUuid();return e.cacheImages[i]&&0==--e.cacheImages[i].imgCount&&delete e.cacheImages[i],e._renderer._clear(),i=e._generateFromFeature(t.getImage().feature),e.cacheImages[i]||(t.getImage().render(),t.setUuid(i),t.setLatLng(t.getImage().feature.getLatLngs()[0]),e.cacheImages[i]={img:t.getImage().getCacheInfo(),imgCount:1}),t}),this._update()},removeAllGraphics:function(){if(0!==this.selectGraphics.length)for(var t=0,e=this.selectGraphics.length;t<e;t++)this.selectGraphics[t].updateImage(),this._tempDrawingLayer.removeFeatures(this.selectGraphics[t].getImage().feature);this.selectGraphics=[],this.graphics=[],this.cacheImages={},this._update()},_generateFromFeature:function(t){return(t.libID+t.code+Math.round(t.symbolSize.w)+Math.round(t.symbolSize.h)+t.textContent+t.annotationPosition+t.style.color+t.style.weight+t.style.opacities+t.dashArray+t.fill+t.fillColor+t.dRotate).toString()},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._tempDrawingLayer)},onRemove:function(){L.Path.prototype.onRemove.call(this),this._map.removeLayer(this._tempDrawingLayer)},_update:function(){this._map&&this._updatePath()},_containsPoint:function(){return!1},_updatePath:function(){this._renderer._drawPlottingGraphics(this._getGraphicsInBounds())},_project:function(){var t=this;t._getGraphicsInBounds().map(function(e){var i=t._map.latLngToLayerPoint(e.getLatLng()),o=L.point(i.x-e.getImage().anchor.x,i.y-e.getImage().anchor.y),s=L.point(i.x+(e.getImage().size[0]-e.getImage().anchor.x),i.y+(e.getImage().size[1]-e.getImage().anchor.y));return e._pxBounds=L.bounds(o,s),e}),t._pxBounds=L.bounds(L.point(0,0),L.point(this._canvas.width,this._canvas.height))},_getGraphicsInBounds:function(){var t=[],e=this._map.getBounds();return this.graphics.map(function(i){return e.contains(i.getLatLng())&&t.push(i),i}),t},_handleClick:function(t){var e=this;if(0!==this.selectGraphics.length)for(let t=0,i=this.selectGraphics.length;t<i;t++)this.selectGraphics[t].updateImage(),e._tempDrawingLayer.removeFeatures(this.selectGraphics[t].getImage().feature);this.selectGraphics=[];var i=e._getGraphicsInBounds();for(let a=0,r=i.length;a<r;a++){var o=e._map.latLngToLayerPoint(i[a].getLatLng()),s=L.point(o.x-i[a].getImage().anchor.x,o.y-i[a].getImage().anchor.y),l=L.point(o.x+(i[a].getImage().size[0]-i[a].getImage().anchor.x),o.y+(i[a].getImage().size[1]-i[a].getImage().anchor.y));if(L.bounds(s,l).contains(e._map.latLngToLayerPoint(t.latlng))){this.selectGraphics.push(i[a]);var n=e._generateFromFeature(i[a].getImage().feature);e.cacheImages[n]&&0==--e.cacheImages[n].imgCount&&delete e.cacheImages[n],e._tempDrawingLayer.addFeatures(i[a].getImage().feature),e._map.getPlotEditControl()&&(i[a].getImage().feature.enableEdit||e._map.getPlotEditControl().enableEditFeatures(i[a].getImage().feature),e._map.getPlotEditControl().selectFeatures(i[a].getImage().feature));break}}e._map.getPlotEditControl()&&(e._map.getPlotEditControl()._onTriggerMapClick=!1),L.DomEvent.stopPropagation(t)}}),_t=function(t){return new xt(t)};L.supermap.plotting.graphicLayer=_t;var Ot=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:[],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.goAnimationLayer)return!1;if(this.goFeature=t,this.animationGOFeature=this.cloneGOFeature(t),null===this.animationGOFeature)return!1;if(e.goAnimationLayer.addFeatures(this.animationGOFeature),this.getGOAnimationType()===SuperMap.Plot.GOAnimationType.ANIMATION_WAY&&0!==t.geoSymbolTexts.length)for(var i=0;i<t.geoSymbolTexts.length;i++){var o=t.geoSymbolTexts[i];if(null!==o){var s=o.getSymbolData();s.associatedUuid=this.animationGOFeature.uuid;var l={symbolData:s,map:o.map,serverUrl:o.serverUrl},n=L.supermap.plotting.PlottingObject.createSymbol(o.libID,o.code,null,l,null);this.symbolTexts.push(n),e.goAnimationLayer.addFeatures(n)}}return this.showAnimationFeature(!1),!0},getGOFeature:function(){return this.goFeature},play:function(){var t=new Date;this.animationState===SuperMap.Plot.GOAnimationState.PAUSE?this.innerStartTime+=t.getTime()/1e3-this.pauseTime:this.innerStartTime=t.getTime()/1e3,this.lastExecute=!1,this.animationState=SuperMap.Plot.GOAnimationState.PLAYING;var e=L.supermap.plotting.getControl().getGOAnimationManager();this.goFeature.isSelected&&e.map.getPlotEditControl()&&e.map.getPlotEditControl().unselectFeatures(this.goFeature),this.showAnimationFeature(!0)},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=(new Date).getTime()/1e3;if(this.innerStartTime+this.startTime>t)return 0;var e=(t-this.innerStartTime-this.startTime)/this.duration;return e>=1&&!this.lastExecute?this.repeat?(this.innerStartTime=(new Date).getTime()/1e3,e=0,this.lastExecute=!1,this.animationState=SuperMap.Plot.GOAnimationState.PLAYING):(e=1,this.lastExecute=!0,this.animationState=SuperMap.Plot.GOAnimationState.STOP):e<0&&(e=0),this.ratio=e,e},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_WAY&&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 s=i[o];if(s.goFeature===t){e=s.animationGOFeature;break}}return null===e&&((e=t.clone()).enableEdit=!1),e},removeAnimationFeature:function(){if(null!==this.animationGOFeature){var t=L.supermap.plotting.getControl().getGOAnimationManager(),e=t.goAnimations,i=!1;if(null!==e)for(let t=0;t<e.length;t++){var o=e[t];if(o!==this&&o.animationGOFeature===this.animationGOFeature){i=!0;break}}if(!i){t.goAnimationLayer.removeFeatures(this.animationGOFeature);for(let e=0;e<this.symbolTexts.length;)t.goAnimationLayer.removeFeatures(symbolTexts[e])}}},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.type=this.getGOAnimationType(),t},fromJSONData:function(t){this.startTime=t.startTime,this.duration=t.duration,this.repeat=t.repeat}});L.supermap.plotting.GOAnimation=Ot;var wt=Ot.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){Ot.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),s=this._executeSurroundLineWidthAnimation(t);return e||i||o||s},_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),s=parseInt(e.green+(i.green-e.green)*t),l=parseInt(e.blue+(i.blue-e.blue)*t);return this.animationGOFeature.setStyle({color:SuperMap.Plot.PlottingUtil.colorRGBToString({red:o,green:s,blue:l})}),!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),s=parseInt(e.green+(i.green-e.green)*t),l=parseInt(e.blue+(i.blue-e.blue)*t);return this.animationGOFeature.setStyle({surroundLineColor:SuperMap.Plot.PlottingUtil.colorRGBToString({red:o,green:s,blue:l})}),!0},_executeSurroundLineWidthAnimation:function(t){return!!this.surroundLineWidthAnimation&&(this.animationGOFeature.setStyle({surroundLineWidth:this.startSurroundLineWidth+(this.endSurroundLineWidth-this.startSurroundLineWidth)*t}),!0)},getJSONData:function(){var t=Ot.prototype.getJSONData.call(this);return t.lineColorAnimation=this.lineColorAnimation,t.startLineColor=this.startLineColor,t.endLineColor=this.endLineColor,t.lineWidthAnimation=this.lineWidthAnimation,t.startLineWidth=this.startLineWidth,t.endLineWidth=this.endLineWidth,t.surroundLineColorAnimation=this.surroundLineColorAnimation,t.startSurroundLineColor=this.startSurroundLineColor,t.endSurroundLineColor=this.endSurroundLineColor,t.surroundLineWidthAnimation=this.surroundLineWidthAnimation,t.startSurroundLineWidth=this.startSurroundLineWidth,t.endSurroundLineWidth=this.endSurroundLineWidth,t},fromJSONData:function(t){Ot.prototype.fromJSONData.call(this,t),this.lineColorAnimation=t.lineColorAnimation,this.startLineColor=t.startLineColor,this.endLineColor=t.endLineColor,this.lineWidthAnimation=t.lineWidthAnimation,this.startLineWidth=t.startLineWidth,this.endLineWidth=t.endLineWidth,this.surroundLineColorAnimation=t.surroundLineColorAnimation,this.startSurroundLineColor=t.startSurroundLineColor,this.endSurroundLineColor=t.endSurroundLineColor,this.surroundLineWidthAnimation=t.surroundLineWidthAnimation,this.startSurroundLineWidth=t.startSurroundLineWidth,this.endSurroundLineWidth=t.endSurroundLineWidth}});L.supermap.plotting.GOAnimationAttribute=wt;var It=Ot.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.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=Ot.prototype.getJSONData.call(this);return t.blinkStyle=this.blinkStyle,t.blinkInterval=this.blinkInterval,t.blinkNumber=this.blinkNumber,t.replaceStyle=this.replaceStyle,t.startColor=this.startColor,t.endColor=this.endColor,t},fromJSONData:function(t){Ot.prototype.fromJSONData.call(this,t),this.blinkStyle=t.blinkStyle,this.blinkInterval=t.blinkInterval,this.blinkNumber=t.blinkNumber,this.replaceStyle=t.replaceStyle,this.startColor=t.startColor,this.endColor=t.endColor}});L.supermap.plotting.GOAnimationBlink=It;var Dt=Ot.extend({startScale:0,endScale:1,timeSpace:50,lastDrawTime:0,lineLength:0,controlPoints:[],initialize:function(t){Ot.prototype.initialize.call(this,t),this.controlPoints=[],this.lineLength=0},getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_GROW},_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=[],s=[];e=new SuperMap.Geometry.Point((this.controlPoints[0].x+this.controlPoints[1].x)/2,(this.controlPoints[0].y+this.controlPoints[1].y)/2),s.push(e);for(let t=2;t<this.controlPoints.length;t++)s.push(this.controlPoints[t].clone());o.push(this.controlPoints[0]),o.push(this.controlPoints[1]);var l=this._findPos(this.lineLength*t,s);for(let t=1;t<=l.pos;t++)o.push(s[t]);return o.push(l.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],s=i[1],l=i[2],n=i[3],a=SuperMap.Plot.PlottingUtil.distance(o,n),r=SuperMap.Plot.PlottingUtil.distance(s,l),p=SuperMap.Plot.PlottingUtil.linePnt(o,n,a*t),u=SuperMap.Plot.PlottingUtil.linePnt(s,l,r*t),h=[];return h.push(o),h.push(s),h.push(u),h.push(p),null!==this.animationGOFeature.superMapAlgoSymbol&&this.animationGOFeature.superMapAlgoSymbol.hasOwnProperty("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),s=0;s<=o.pos;s++)e.push(i[s]);e.push(o.pts);var l=[];return e.length<3&&(l.push(e[0].clone()),l.push(new SuperMap.Geometry.Point((e[0].x+e[1].x)/2,(e[0].y+e[1].y)/2)),l.push(e[1].clone()),e=l),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),s=0;s<=o.pos;s++)e.push(i[s]);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,s=new SuperMap.Geometry.Point(e.x-i,e.y+o),l=new SuperMap.Geometry.Point(e.x+i,e.y-o);return this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs([s,l])),!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 s=0;s<i;s++){var l=SuperMap.Plot.PlottingUtil.distance(o,this.controlPoints[s]),n=l*t;if(n>l)return!1;var a=SuperMap.Plot.PlottingUtil.linePnt(o,this.controlPoints[s],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),s=2*Math.PI/(e+1),l=Math.PI/2+this.animationGOFeature.dRotate,n=o;SuperMap.Plot.PlottingUtil.rotateAngle(this.controlPoints[0],l,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],s,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=[],s=0;s<e;s++){var l=SuperMap.Plot.PlottingUtil.distance(i,this.controlPoints[s])*t,n=SuperMap.Plot.PlottingUtil.linePnt(i,this.controlPoints[s],l);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=SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(this.controlPoints);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),s=0;s<=o.pos;s++)i.push(e[s].clone());return i.push(o.pts),this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs(i)),!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 s=SuperMap.Plot.PlottingUtil.distance(e,this.controlPoints[o])*t,l=SuperMap.Plot.PlottingUtil.linePnt(e,this.controlPoints[o],s);i.push(l)}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 s=SuperMap.Plot.PlottingUtil.polylineDistance(o),l=this._findPos(s*t,o);this.animationGOFeature.scaleValues[1]=l.pts.x,this.animationGOFeature.scaleValues[2]=l.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),y=0;y<=h.pos;y++)e.push(i[y]);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){Ot.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 yt))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,s=0;for(i=1;i<e.length&&!(o+(s=SuperMap.Plot.PlottingUtil.distance(e[i-1],e[i]))>=t);i++)o+=s;var l,n=new Object;return l=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=l,n},getJSONData:function(){var t=Ot.prototype.getJSONData.call(this);return t.startScale=this.startScale,t.endScale=this.endScale,t},fromJSONData:function(t){Ot.prototype.fromJSONData.call(this,t),this.startScale=t.startScale,this.endScale=t.endScale}});L.supermap.plotting.GOAnimationGrow=Dt;var Et=Ot.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]),Ot.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,s=e-t,l=parseInt(Math.abs(s/360));if(t!==e)if(this.rotateDirection===SuperMap.Plot.RotateDirection.AntiClockWise)s<0&&(s+=360*(2*l+1)),o=t+s*i;else{var n=0;o=t+(360-(s=0===(n=s<0?s+360*(l+1):s-360*l)?360*l:360-n+360*l)*i)}return o},getJSONData:function(){var t=Ot.prototype.getJSONData.call(this);return t.rotateDirection=this.rotateDirection,t.startAngle=this.startAngle,t.endAngle=this.endAngle,t},fromJSONData:function(t){Ot.prototype.fromJSONData.call(this,t),this.rotateDirection=t.rotateDirection,this.startAngle=t.startAngle,this.endAngle=t.endAngle}});L.supermap.plotting.GOAnimationRotate=Et;var Ct=Ot.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]),Ot.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=Ot.prototype.getJSONData.call(this);return t.startScale=this.startScale,t.endScale=this.endScale,t},fromJSONData:function(t){Ot.prototype.fromJSONData.call(this,t),this.startScale=t.startScale,this.endScale=t.endScale}});L.supermap.plotting.GOAnimationScale=Ct;var Nt=Ot.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=Ot.prototype.getJSONData.call(this);return t.showEffect=this.showEffect,t.finalDisplay=this.finalDisplay,t},fromJSONData:function(t){Ot.prototype.fromJSONData.call(this,t),this.showEffect=t.showEffect,this.finalDisplay=t.finalDisplay}});L.supermap.plotting.GOAnimationShow=Nt;var Ut=Ot.extend({showPath:!1,tangentDirection:!1,pathWidth:.5,pathColor:"#00FFFF",currentPt:null,pathType:SuperMap.Plot.WayPathType.POLYLINE,wayPoints:null,shapePoints:null,pathFeature:null,pathLength:0,destroy:function(){null!==this.pathFeature&&(L.supermap.plotting.getControl().getGOAnimationManager().map.removeLayer(this.pathFeature),this.pathFeature=null);Ot.prototype.destroy.call(this)},getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_WAY},setShowPath:function(t){this.showPath=t},resetAnimationFeature:function(t){Ot.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 s=this.animationGOFeature.getLatLngs()[0],l=o.y-s.lat,n=o.x-s.lng;if(this.animationGOFeature.move(l,n),this.tangentDirection){var a=i.angle;1===t&&(a=0);var r=this.animationGOFeature.dRotate;this.animationGOFeature._rotate(a-r,this.animationGOFeature.getLatLngs()[0])}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),null!==this.pathFeature)&&(L.supermap.plotting.getControl().getGOAnimationManager().map.removeLayer(this.pathFeature),this.pathFeature.destroy(),this.pathFeature=null)},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)))},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)))},getPathWidth:function(){return this.pathWidth},setPathType:function(t){void 0!==t&&null!==t&&(this.pathType!==t&&(this.pathType=t,null!==this.pathFeature&&(L.supermap.plotting.getControl().getGOAnimationManager().map.removeLayer(this.pathFeature),this.pathFeature.destroy(),this.pathFeature=null)))},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,s=0,l=0;for(o=1;o<e.length&&!(s+(l=SuperMap.Plot.PlottingUtil.distance(e[o-1],e[o]))>=t);o++)s+=l;var n=SuperMap.Plot.PlottingUtil.findPoint(e[o-1],e[o],t-s,0);return this.tangentDirection&&(i.angle=SuperMap.Plot.PlottingUtil.radian(n,e[o])/Math.PI*180),n},getJSONData:function(){var t=Ot.prototype.getJSONData.call(this);t.showPath=this.showPath,t.tangentDirection=this.tangentDirection,t.pathType=this.pathType,t.pathWidth=this.pathWidth,t.pathColor=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){Ot.prototype.fromJSONData.call(this,t),this.showPath=t.showPath,this.tangentDirection=t.tangentDirection,this.pathType=t.pathType,this.pathWidth=t.pathWidth,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.GOAnimationWay=Ut;var Rt=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,s){var l=e+o+" "+e+s;t[o+s]=L.DomUtil.create("div",l,i)}o("top","left"),o("top","right"),o("bottom","left"),o("bottom","right")},_clearControlPos:function(){L.DomUtil.remove(this._controlContainer)}});var Bt=L.Handler.extend({symbolData:null,plotting:null,_isDrawing:!1,libID:0,code:24,serverUrl:"",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){this._map=t,this._drawingLayer=e,this._tempDrawingLayer=new ft("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("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this),this._map.getPlotEditControl()&&this._map.getPlotEditControl()._avoidEditing&&this._map.getPlotEditControl().avoidEdit(!1))},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).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},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.addLatLng(t);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).getSymbolInfo(e,function(t){this.plotting.symbolData=t.result,this.plotting.setLatLngs(this._latlngs)},this)}else if(this.plotting&&this.plotting instanceof dt){var i=this._map.layerPointToLatLng(L.point(0,0)),o=this._map.layerPointToLatLng(L.point(this.options.tolerancePixel,0)),s=SuperMap.Plot.PlottingUtil.distance({x:i.lng,y:i.lat},{x:o.lng,y:o.lat});this.plotting._addRouteNodeByPos(t,s)}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),0===this.libID&&this.code===SuperMap.Plot.SymbolType.FREECURVE&&!0===this.isFreeCure&&(this.plotting.latLngs=L.Util.superMapPointsToLatLngs(this.plotting.superMapAlgoSymbol.controlPoints),this.isFreeCure=!1),-1===this.plotting.libID&&(this.plotting.libID=this.libID,this.plotting.code=this.code);var t=this.plotting.clone();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();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).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 dt){if(!1===this._isDrawing)if(this._isDrawing=!0,SuperMap.Plot.AlgoSymbolFactory.isAccessServer(this.libID,this.code))if(this.symbolData=this._drawingLayer._getSymbolDataFromCache(this.libID,this.code),null===this.symbolData){var o=Math.floor(1e3*Math.random());let t=new SuperMap.GetSymbolInfoParameters({libID:this.libID,code:this.code});t.dynamicToken=o,L.supermap.symbolInfoService(this._drawingLayer.serverUrl).getSymbolInfo(t,function(t){t.result.dynamicToken&&t.result.dynamicToken===SuperMap.MD5.md5(o.toString())?this.libID!==t.result.libID||this.code!==t.result.code?this.symbolData=null:(this._drawingLayer._cacheSymbolData(t.result),this.symbolData=t.result,this.plotting=L.supermap.plotting.PlottingObject.createSymbol(this.libID,this.code,[],{symbolData:this.symbolData,serverUrl:this._drawingLayer.serverUrl,map:this._map}),this._control.fire(SuperMap.Plot.Event.beforefeatureadded,{feature:this.plotting}),this._tempDrawingLayer.addFeatures(this.plotting),this.plotting.isEdit=!1):this.symbolData=null},this)}else this.plotting=L.supermap.plotting.PlottingObject.createSymbol(this.libID,this.code,[],{symbolData:this.symbolData,serverUrl:this._drawingLayer.serverUrl,map:this._map}),this._control.fire(SuperMap.Plot.Event.beforefeatureadded,{feature:this.plotting}),this._tempDrawingLayer.addFeatures(this.plotting),this.plotting.isEdit=!1;else if(this.plotting=L.supermap.plotting.PlottingObject.createSymbol(this.libID,this.code,[],{serverUrl:this._drawingLayer.serverUrl,spatialAnalystUrl:this._drawingLayer.spatialAnalystUrl,map:this._map}),this.plotting.subSymbols&&0!==this.plotting.subSymbols.length){for(var s=[],l=0,n=this.plotting.subSymbols.length;l<n;l++)null===this.plotting.subSymbols[l].symbolData&&(this.plotting.subSymbols[l].symbolData=this._drawingLayer._getSymbolDataFromCache(this.plotting.subSymbols[l].libID,this.plotting.subSymbols[l].code),null===this.plotting.subSymbols[l].symbolData&&-1===SuperMap.Util.indexOf(s,this.plotting.subSymbols[l])&&s.push(this.plotting.subSymbols[l]));for(var a=s.slice(),r=0;r<s.length;r++){var p=new SuperMap.GetSymbolInfoParameters({libID:s[r].libID,code:s[r].code});L.supermap.symbolInfoService(this.serverUrl).getSymbolInfo(p,function(t){this._drawingLayer._cacheSymbolData(t.result);for(var e=0,i=this.plotting.subSymbols.length;e<i;e++)if(null===this.plotting.subSymbols[e].symbolData&&this.plotting.subSymbols[e].libID===t.result.libID&&this.plotting.subSymbols[e].code===t.result.code){var o=SuperMap.Util.indexOf(a,this.plotting.subSymbols[e]);-1!==o&&a.splice(o,1),this.plotting.subSymbols[e].symbolData=SuperMap.Plot.PlottingUtil.cloneObject(t.result)}0===a.length&&(this._control.fire(SuperMap.Plot.Event.beforefeatureadded,{feature:this.plotting}),this._tempDrawingLayer.addFeatures(this.plotting),this.plotting.isEdit=!1)},this)}0===s.length&&(this._control.fire(SuperMap.Plot.Event.beforefeatureadded,{feature:this.plotting}),this._tempDrawingLayer.addFeatures(this.plotting),this.plotting.isEdit=!1)}else this._control.fire(SuperMap.Plot.Event.beforefeatureadded,{feature:this.plotting}),this._tempDrawingLayer.addFeatures(this.plotting),this.plotting.isEdit=!1}else{var u=L.Util.cloneLatLngs(this._latlngs);if(0===u.length?u.push(i):u[u.length-1].lat===i.lat&&u[u.length-1].lng===i.lng||u.push(i),0===this.libID&&this.code===SuperMap.Plot.SymbolType.FREECURVE&&!0===this.isFreeCure)this.plotting.addLatLng(i);else if(this.plotting.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL&&SuperMap.Plot.AlgoSymbolFactory.isAccessServer(this.plotting.libID,this.plotting.code)&&u.length>=this.plotting.minEditPts){let t=new SuperMap.GetSymbolInfoParameters({libID:this.libID,code:this.code});t.inputPoints=L.Util.latLngsToSuperMapPoints(u),L.supermap.symbolInfoService(this._drawingLayer.serverUrl).getSymbolInfo(t,function(t){this.plotting.symbolData=t.result,this.plotting.setLatLngs(u)},this)}else this.plotting.setLatLngs(u)}this._mouseMarker.setLatLng(i),L.DomEvent.preventDefault(t.originalEvent)},_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),s=this._calculateFinishDistance(i.latlng);(this.plotting instanceof ht||this.plotting instanceof L.supermap.plotting.Route)&&(this._latlngs.length+1>=this.plotting.maxEditPts||s<10&&L.Browser.touch)?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()),s=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),l=this._map.latLngToContainerPoint(s.getLatLng());e=o.distanceTo(l)}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)}}),Gt=Rt.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,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,e},onRemove:function(){this._map=null,this.handler=null},setDrawingLayer:function(t){this.drawingLayer=t,this.handler._drawingLayer=t,this.handler._tempDrawingLayer.serverUrl=t.serverUrl}}),Ft=function(t,e){return new Gt(t,e)};L.supermap.plotting.drawControl=Ft;var kt=Rt.extend({_dragStartScale:null,_dragStartRotate:null,_dragStartBounds:null,_dragStartLatLngs:null,_dragStartScaleValues:null,_dragStartPositionOffset:null,_dragStartScalePoints:null,_editMarkers:null,_disEditBox:null,_editFeatures:null,_mouseTolerance:10,_editMode:SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE,_avoidEditing:!1,selectedFeatures:[],options:{highlightFlag:!0,highlightStyle:{color:"#ffffff",opacity:1,weight:1},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]})},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.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 at||this._map.getPlottingLayers()[e].features[i]instanceof dt)&&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 nt&&(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 nt&&(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 bt(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,s=i.getFeatures().length;o<s;o++){var l=i.getFeatures()[o];if(l.isSelected&&!1===l.isLocked&&(l.layer=i,l instanceof nt))if(l.symbolType===SuperMap.Plot.SymbolType.ROUTENODE)this.pasteGeoAry.push(l.route);else if(this.pasteGeoAry.push(l),this.pasteGeoSel.push(l.isSelected),(l.symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS||l.symbolType===SuperMap.Plot.SymbolType.SATELLITE)&&l.hasOwnProperty("timeWindows")&&0!==l.timeWindows.length)for(var n=0,a=l.timeWindows.length;n<a;n++)l.timeWindows[n].hasOwnProperty("symbolType")&&l.timeWindows[n].symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS&&this.pasteGeoAry.push(l.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 nt&&(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 s=i[o];if(!0!==s.layer.isLocked&&!1!==s.layer.isEditable&&!1===s.isLocked){if(s instanceof nt)if(s.symbolType===SuperMap.Plot.SymbolType.ROUTENODE)this.pasteGeoAry.push(s.route),this.pasteGeoSel.push(s.route.isSelected),s.layer.removeFeatures(s.route);else{if(this.pasteGeoAry.push(s),this.pasteGeoSel.push(s.isSelected),s.hasOwnProperty("geoSymbolTexts")&&0!==s.geoSymbolTexts.length)for(let e=0,i=s.geoSymbolTexts.length;e<i;e++)s.geoSymbolTexts[e].hasOwnProperty("isSelected")&&!0===s.geoSymbolTexts[e].isSelected&&t.push(s.geoSymbolTexts[e].clone());if((s.symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS||s.symbolType===SuperMap.Plot.SymbolType.SATELLITE)&&s.hasOwnProperty("timeWindows")&&0!==s.timeWindows.length)for(let t=0,e=s.timeWindows.length;t<e;t++)s.timeWindows[t].hasOwnProperty("symbolType")&&s.timeWindows[t].symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS&&(this.pasteGeoAry.push(s.timeWindows[t]),s.layer.removeFeatures(s.timeWindows[t]));s.layer.removeFeatures(s);var l=new SuperMap.Plot.TransactionInfo;l.layerId=s.layer._leaflet_id,l.feature=s,e.transInfos.push(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 nt&&(this.pasteGeoAry.push(i),this.pasteGeoSel.push(i.isSelected),i instanceof gt?(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,s,l){var n=new SuperMap.Plot.TransactionInfo;n.layerId=t,n.uuid=e,n.functionName=i,n.undoParams=o,n.redoParams=s,l.transInfos.push(n)},o=1,s=this.getSelectedFeatures().length,l=null,n=null,a=null,r=this.getSelectedFeatures()[0].getBounds();if(t===SuperMap.Plot.AlignType.LEFT)for(;o<s;o++)l=this.getSelectedFeatures()[o].getBounds(),n=r.getWest()-l.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<s;o++)l=this.getSelectedFeatures()[o].getBounds(),n=r.getEast()-l.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<s;o++)l=this.getSelectedFeatures()[o].getBounds(),a=r.getNorth()-l.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<s;o++)l=this.getSelectedFeatures()[o].getBounds(),a=r.getSouth()-l.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<s;o++)l=this.getSelectedFeatures()[o].getBounds(),a=r.getCenter().lat-l.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<s;o++)l=this.getSelectedFeatures()[o].getBounds(),n=r.getCenter().lng-l.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){for(var t=this.getSelectedFeatures(),e=t.slice(),i=0,o=t.length;i<o;i++)t[i].layer.removeFeatures(t[i]);var s=new SuperMap.Plot.Transaction;s.transType=SuperMap.Plot.TransactionType.REMOVE,L.supermap.plotting.getControl().getTransManager().add(s);for(var l=0,n=e.length;l<n;l++){var a=new SuperMap.Plot.TransactionInfo;a.layerId=e[l].layer._leaflet_id,a.feature=e[l],s.transInfos.push(a)}}},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)},selectFeatures:function(t){if(SuperMap.Util.isArray(t)||(t=[t]),!1!==this.fire(SuperMap.Plot.Event.beforefeaturesselected,{features:t})){var e=[];for(var i in t)null!==t[i]._map&&t[i].enableEdit&&!1===t[i].isSelected&&(t[i].isSelected=!0,this.selectedFeatures.push(t[i]),this._collectEditMarkers(t[i]),this.options.draggable&&!t[i].layer.isLocked&&t[i].layer.isEditable&&t[i].dragging.enable(),null!==t[i].ownerGroup&&(t[i].ownerGroup.isSelected=!0),t[i]instanceof gt&&(t[i].route.isSelected=!0,this.options.highlightFlag&&t[i].route.highlight(this.options.highlightStyle)),e.push(t[i]));this.fire(SuperMap.Plot.Event.featuresselected,{features:e})}},unselectFeatures:function(t){if(void 0===t&&(t=this.selectedFeatures.slice()),SuperMap.Util.isArray(t)||(t=[t]),!1!==this.fire(SuperMap.Plot.Event.beforefeaturesunselected,{features:t})){for(var e=t.slice(),i=0;i<e.length;){var o=L.Util.indexOf(this.selectedFeatures,e[i]);-1!==o?(this._removeMarkers(e[i]),e[i].isSelected=!1,e[i].dragging.disable(),null!==e[i].ownerGroup&&(e[i].ownerGroup.isSelected=!1),e[i]instanceof gt&&(e[i].route.isSelected=!1,e[i].route.unhighlight()),this.selectedFeatures.splice(o,1),i++):e.splice(i,1)}this.fire(SuperMap.Plot.Event.featuresunselected,{features:e}),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=[],s=0,l=e.length;s<l;s++)e[s].isSelected||(e[s]instanceof gt||e[s].symbolType===SuperMap.Plot.SymbolType.LITERATESIGN?t.contains(e[s].route.getBounds().getCenter())&&-1===SuperMap.Util.indexOf(o,e[s].route)&&o.push(e[s].route):null!==e[s].ownerGroup?t.contains(e[s].ownerGroup.getBounds().getCenter())&&-1===SuperMap.Util.indexOf(o,e[s].ownerGroup)&&o.push(e[s].ownerGroup):e[s].getBounds().isValid()&&t.contains(e[s].getBounds().getCenter())&&o.push(e[s]));0!==o.length&&this.selectFeatures(o),this._mapDraggingWasEnabled&&this._map.dragging.enable(),this.multiple=!1}},_enableFeatureEdit:function(t){t instanceof nt&&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 nt&&(t.isSelected&&this.unselectFeatures(t),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 gt&&(e._isFirstNode()||e._isLastNode())||e.symbolType===SuperMap.Plot.SymbolType.ANNOFRAMESYMBOLM))i="crosshair";else if(this._editMode===SuperMap.Plot.EditMode.ADDCONTROLPOINT&&e instanceof dt){var o=this._getAddPointTolerance(),s=e._selectNodeLayer(t.latlng,o);null===s||s instanceof gt&&(s._isFirstNode()||s._isLastNode())?i="crosshair":null!==s&&(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 at?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 s=new SuperMap.Plot.TransactionInfo;s.layerId=this.selectedFeatures[e].layer._leaflet_id,s.uuid=this.selectedFeatures[e].uuid,s.functionName="move",this.transaction.transInfos.push(s)}}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.getLayer(this.transaction.transInfos[t].layerId).getFeatureByUuid(e);if(null===i)for(var o=0;o<this.features.length;o++)if(this.features[t].uuid===e){i=this.features[t];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 s=this._dragStartScale[e];!1===i.limitWidthHeight?(this.transaction.transInfos[t].undoParams=[s.x,s.y],this.transaction.transInfos[t].redoParams=[i.getScale().x,i.getScale().y]):(this.transaction.transInfos[t].undoParams=[s],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 l=[],n=[];for(let t=0;t<this._dragStartScaleValues[e].length;t++)l.push(this._dragStartScaleValues[e][t]);for(let t=0;t<i.scaleValues.length;t++)n.push(i.scaleValues[t]);this.transaction.transInfos[t].undoParams=[l],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]),y={x:h.x+this._dragStartPositionOffset[e].x,y:h.y+this._dragStartPositionOffset[e].y},c=this._map.layerPointToLatLng(y);h.x+=i.positionOffsetX,h.y+=i.positionOffsetY;var S=this._map.layerPointToLatLng(h);p=c.lng-S.lng,u=c.lat-S.lat}else i instanceof at?(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 at?(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);for(var e=[],i=this._map.getPlottingLayers(),o=0;o<i.length;o++){var s=i[o]._getFeatureFromEvent(t);if(s){e.push(s);break}}this.unselectFeatures(),L.DomEvent.stopPropagation(t)}},_onClick:function(t){var e=t.target;if(e.isSelected&&e.symbolType===SuperMap.Plot.SymbolType.SATELLITE&&e.timeWindows.length>0){var i=e.layer._getFeatureFromEvent(t);i.symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS&&(e=i)}if(this.transaction||(this.transaction=new SuperMap.Plot.Transaction,this.transaction.transType=SuperMap.Plot.TransactionType.EDIT,this.isAddTransInfo=!0),e instanceof nt)if(e instanceof at&&e.moveend)e.moveend=!1;else if(null!==e.ownerGroup&&e.ownerGroup.moveend)e.ownerGroup.moveend=!1;else{var o,s;if(this._editMode!==SuperMap.Plot.EditMode.ADDCONTROLPOINT)e instanceof at&&!e.isSelected?(!1===t.originalEvent.ctrlKey&&this.unselectFeatures(),this.selectFeatures(e)):e instanceof dt||e.isSelected||null!==e.ownerGroup&&!0!==e.ownerGroup.isSelected||(!1===t.originalEvent.ctrlKey&&this.unselectFeatures(),this.selectFeatures(e));else if(e instanceof dt||e.isSelected){if(!1===e.isLocked&&e.isSelected)if(e instanceof dt){var l=this._getAddPointTolerance();if(null===(a=e._selectNodeLayer(t.latlng,l))){let i=this._getAddPointTolerance(),o=e._addRouteNodeByPosWithoutLast(t.latlng,i);null!==o&&(this.unselectFeatures(),this.selectFeatures(o))}}else if(e instanceof gt&&e.route.isSelected){let t=e._isFirstNode(),i=e._isLastNode();if(!0===t||!0===i){let o=e.route._addRouteNodeByNode(e.routeNode,t,i);if(null!==o){this.unselectFeatures(),this.selectFeatures(o);var n=new SuperMap.Plot.TransactionInfo;n.layerId=o.layer._leaflet_id,n.uuid=o.uuid,n.functionName="setLatLngs",n.undoParams=[L.Util.cloneLatLngs(o.getLatLngs())],n.redoParams=[L.Util.cloneLatLngs(o.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(e)}else this._addPoint(e,t.latlng)}else if(!1===t.originalEvent.ctrlKey&&this.unselectFeatures(),this.selectFeatures(e),e instanceof gt&&((o=e._isFirstNode())||(s=e._isLastNode()))){var a=e.route._addRouteNodeByNode(e.routeNode,o,s);null!==a&&(this.unselectFeatures(),this.selectFeatures(a))}L.DomEvent.stopPropagation(t)}},_addPoint:function(t,e){if(null!==t&&void 0!==t){var i=t.scaleValues.slice(),o=L.Util.cloneLatLngs(t.getLatLngs()),s=L.Util.latLngsToSuperMapPoints(t.getLatLngs());if(t.symbolType===SuperMap.Plot.SymbolType.ANNOFRAMESYMBOLM){var l=L.supermap.plotting.editMarker(e,{icon:this.options.scaleIcon,nHandle:-2,tag:t.scalePoints.length});l.owner=t,this._addToMapAndBindMarker(l),this._editMarkers[t.uuid].push(l),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)),s=L.Util.latLngsToSuperMapPoints(t.getLatLngs()),r>0&&r<s.length){var u=L.supermap.plotting.editMarker(new L.LatLng(a.y,a.x),{icon:this.options.editIcon,nHandle:-1});if(u.owner=t,this._addToMapAndBindMarker(u),this._editMarkers[t.uuid].splice(r,0,u),s.splice(r,0,a),100!==t.libID||17703!==t.code&&17704!==t.code)t.latLngs=L.Util.superMapPointsToLatLngs(s);else{var h=SuperMap.Plot.PlottingUtil.computeBeizerPoints(!1,s,t.scaleValues);t.scalePoints=L.Util.superMapPointsToLatLngs(h.scalePoints),t.scaleValues=h.scaleValues,t.setLatLngs(L.Util.superMapPointsToLatLngs(s)),this._resetEditMarkersValue(t)}let e=new SuperMap.Plot.TransactionInfo;e.layerId=t.layer._leaflet_id,e.uuid=t.uuid,e.functionName="setLatLngs",e.undoParams=[o],e.redoParams=[t.getLatLngs()],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 s=[],l=0;for(let t=1,e=i.length;t<e;t++){var n=[];for(let e=l,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]),s.push(n),n=[],l=e;break}n.push(o[e])}}var a=-1,r=-1;for(let t=0;t<s.length;t++){var p=this._computePointToLineMinDis(e,s[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),y=[];for(let t=1,e=u.length;t<e;t++){var c=[];for(let e=l,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]),y.push(c),c=[],e;break}c.push(h[e])}}var S=-1,P=-1;for(let t=0;t<y.length;t++){var g=this._computePointToLineMinDis(e,y[t]).minDis;g<0||(P<0?(P=g,S=t+1):P>g&&(P=g,S=t+1))}return S>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},_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,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 Tt&&(t.layer.getLocked()||!t.layer.getEditable())){var o=t.getBounds();if(null!==o&&o.isValid()){var s=L.latLng(o.getNorth(),o.getEast()),l=L.latLng(o.getNorth(),o.getWest()),n=L.latLng(o.getSouth(),o.getEast()),a=L.latLng(o.getSouth(),o.getWest()),r=new L.Polygon([s,l,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 at||t instanceof gt)if(t instanceof Lt&&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 y=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:y});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 gt)&&(c=-3);let s=new L.LatLng(e.handlePoints[o].lat,e.handlePoints[o].lng),l=L.supermap.plotting.editMarker(s,{icon:this.options.editIcon,nHandle:c,tag:o});this._addToMapAndBindMarker(l),l.owner=t,i.push(l)}if(this._editMode===SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE)for(let o in e.rotatePoints){let s=new L.LatLng(e.rotatePoints[o].lat,e.rotatePoints[o].lng),l=L.supermap.plotting.editMarker(s,{icon:this.options.rotateIcon,nHandle:0});this._addToMapAndBindMarker(l),i.push(l),l.owner=t}}else if(this._editMode===SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE){let e=t._getHandleAndRotatePoints();for(let o=0,s=e.handlePoints.length;o<s;o++){let s=e.handlePoints[o].nHandle;!t.enableEdit||t.symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL||t.symbolType===SuperMap.Plot.SymbolType.ELLIPSESYMBOL&&0===parseInt(o)?s=-3:t._getHandleCount()>9&&(s=-1);let l=new L.LatLng(e.handlePoints[o].lat,e.handlePoints[o].lng),n=L.supermap.plotting.editMarker(l,{icon:this.options.editIcon,nHandle:s,tag:o});this._addToMapAndBindMarker(n),n.owner=t,i.push(n)}for(let o=0,s=e.rotatePoints.length;o<s;o++){let s=new L.LatLng(e.rotatePoints[o].lat,e.rotatePoints[o].lng),l=L.supermap.plotting.editMarker(s,{icon:this.options.rotateIcon,nHandle:t.enableEdit?0:-3});this._addToMapAndBindMarker(l),i.push(l),l.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 s=L.supermap.plotting.editMarker(e[o],{icon:this.options.editIcon,nHandle:t.enableEdit?-1:-3,tag:o});this._addToMapAndBindMarker(s),i.push(s),s.owner=t}for(let e in t.scalePoints){let o=new L.LatLng(t.scalePoints[e].lat,t.scalePoints[e].lng),s=t.scalePoints[e].tag?t.scalePoints[e].tag:e,l=L.supermap.plotting.editMarker(o,{icon:this.options.scaleIcon,nHandle:t.enableEdit?-2:-3,tag:s});this._addToMapAndBindMarker(l),i.push(l),l.owner=t}}else if(t.symbolType===SuperMap.Plot.SymbolType.PARALLELLINE){var S=L.Util.superMapPointsToLatLngs(t.superMapAlgoSymbol.controlPoints[0]);t.getLatLngs()[0]=L.latLng(S[0].lat,S[0].lng);for(let e in t.latLngs){let o=new L.LatLng(t.latLngs[e].lat,t.latLngs[e].lng),s=L.supermap.plotting.editMarker(o,{icon:this.options.editIcon,nHandle:t.enableEdit?-1:-3,tag:e});this._addToMapAndBindMarker(s),i.push(s),s.owner=t}}else if(t.symbolType===SuperMap.Plot.SymbolType.ELLIPSESYMBOL)for(let e in t.latLngs)if(0===parseInt(e)){let o=new L.LatLng(t.latLngs[e].lat,t.latLngs[e].lng),s=L.supermap.plotting.editMarker(o,{icon:this.options.editIcon,nHandle:-3,tag:e});this._addToMapAndBindMarker(s),i.push(s),s.owner=t}else{let o=new L.LatLng(t.latLngs[e].lat,t.latLngs[e].lng),s=L.supermap.plotting.editMarker(o,{icon:this.options.editIcon,nHandle:t.enableEdit?-1:-3,tag:e});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),s=L.supermap.plotting.editMarker(o,{icon:this.options.editIcon,nHandle:t.enableEdit?-1:-3,tag:e});this._addToMapAndBindMarker(s),i.push(s),s.owner=t}for(let e in t.scalePoints){let o=new L.LatLng(t.scalePoints[e].lat,t.scalePoints[e].lng),s=t.scalePoints[e].tag?t.scalePoints[e].tag:e,l=L.supermap.plotting.editMarker(o,{icon:this.options.scaleIcon,nHandle:t.enableEdit?-2:-3,tag:s});this._addToMapAndBindMarker(l),i.push(l),l.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),s=t.scalePoints[e].tag?t.scalePoints[e].tag:e,l=L.supermap.plotting.editMarker(o,{icon:this.options.scaleIcon,nHandle:t.enableEdit?-2:-3,tag:s});this._addToMapAndBindMarker(l),i.push(l),l.owner=t}this._editMarkers[t.uuid]=i,this._disEditBox[t.uuid]=e},_resetEditMarkersValue:function(t){if(this._editMarkers.hasOwnProperty(t.uuid)){var e=this._editMarkers[t.uuid],i=this._disEditBox[t.uuid];if(null==i||!t.layer.getLocked()&&t.layer.getEditable())if(t instanceof at||t instanceof gt)if(t instanceof Lt&&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 s=L.Util.superMapPointsToLatLngs(t.superMapAlgoSymbol.controlPoints[0]);t.getLatLngs()[0]=L.latLng(s[0].lat,s[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 l=i+parseInt(o);e[l]._latlng=t.scalePoints[o],e[l].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){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.redraw,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],s=o.indexOf(t.target);this._map.removeLayer(o[s]),o.splice(s,1),t.target.owner.latLngs.splice(s,1),t.target.owner.redraw();let l=new SuperMap.Plot.Transaction;L.supermap.plotting.getControl().getTransManager().add(l);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=[t.target.owner.getLatLngs()],l.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 s=new SuperMap.Plot.Transaction;L.supermap.plotting.getControl().getTransManager().add(s);let l=new SuperMap.Plot.TransactionInfo;l.layerId=t.target.owner.layer._leaflet_id,l.uuid=t.target.owner.uuid,l.functionName="setLatLngs",l.undoParams=[o],l.redoParams=[t.target.owner.getLatLngs()],s.transInfos.push(l)}},_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 at?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.endAssociatedUuid?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 s=i.getBounds();s.isValid()&&(i.anchorPoint=s.getCenter())}var l=this._editMarkers[i.uuid];for(let t in l)-3===l[t].options.nHandle&&l[t].setOpacity(0),l[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.getLatLngs()[0]:i.anchorPoint;var s=this._map.latLngToLayerPoint(o);i.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&!0===i.positionOffset&&(s.x+=i.positionOffsetX*i.dScale,s.y+=i.positionOffsetY*i.dScale);var l=this._map.latLngToLayerPoint(t.latlng),n=this._map.latLngToLayerPoint(t.oldLatLng),a=l.x-s.x-(n.x-s.x),r=l.y-s.y-(n.y-s.y);if(0!==a&&0!==r){var p=180*(Math.atan2(n.y-s.y,n.x-s.x)-Math.atan2(l.y-s.y,l.x-s.x))/Math.PI,u=p;if(void 0!==this._lastPixel)u=180*(Math.atan2(this._lastPixel.y-s.y,this._lastPixel.x-s.x)-Math.atan2(l.y-s.y,l.x-s.x))/Math.PI;!function(t,i){for(var o=0;o<e.selectedFeatures.length;o++){var s=0;if(s=e.selectedFeatures[o].symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL?t+e._dragStartRotate[e.selectedFeatures[o].uuid]:i,(s%=360)<0&&(s+=360),e.selectedFeatures[o].setRotate(s),e.isAddTransInfo){var l=new SuperMap.Plot.TransactionInfo;l.layerId=e.selectedFeatures[o].layer._leaflet_id,l.uuid=e.selectedFeatures[o].uuid,l.functionName="setRotate",e.transaction.transInfos.push(l)}}e.isAddTransInfo=!1}(p,u)}this._lastPixel=l},_dragResize:function(t,e){var i=this;function o(t,o,l){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],y=i.selectedFeatures[a]._getLatLng(e,u,l);i.selectedFeatures[a]._resizeLatLngs(y,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(s.serverUrl).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 s=t.target.owner,l=this._dragStartBounds[s.uuid],n=l.getEast()-l.getWest(),a=l.getNorth()-l.getSouth(),r=s._resizeOffset(t.latlng,e,l);!0===t.originalEvent.altKey&&(r.lng<r.lat?r.lng=r.lat*n/a:r.lat=r.lng*a/n);var p=1,u=s._resizeBounds(t.latlng,e,l),h=!0===Boolean(n)?(u.getEast()-u.getWest())/n:.5,y=!0===Boolean(a)?(u.getNorth()-u.getSouth())/a:.5;p=2===e||7===e?y:4===e||5===e?h:h<y?h:y,s.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&!1===s.limitWidthHeight?o(h,y,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),s=!1;if(-2===t.target.options.nHandle&&(s=!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 l=(new Date).getTime(),n=this._map.latLngToLayerPoint(t.latlng);if(s&&void 0!==this._lastDragPixel&&null!==this._lastDragPixel&&!((Math.abs(n.x-this._lastDragPixel.x)>3||Math.abs(n.y-this._lastDragPixel.y)>3)&&l-this.lastDownTime>100))return;var a=new SuperMap.GetSymbolInfoParameters;a.libID=e.libID,a.code=e.code,s?(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).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;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)}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 s=new SuperMap.Plot.TransactionInfo;s.layerId=t,s.uuid=e,s.feature=i,o.transInfos.push(s)},i=null,o=null,s=this.pasteGeoAry.slice();if(0!==arguments.length){var l=new L.LatLngBounds;for(let t=0,e=s.length;t<e;t++){var n=s[t];if(n instanceof at)for(let t=0;t<n.subObjects.length;t++){var a=n.subObjects[t];l.extend(a._bounds)}else n instanceof nt&&l.extend(n._bounds)}i=l.getCenter()}0!==this.getSelectedFeatures().length&&this.unselectFeatures();var r=this._map.getPlottingLayers();for(let l in s)if(s[l]instanceof nt&&(o=s[l].clone()),0!==arguments.length&&null!==i){for(let t=0,e=r.length;t<e;t++)s[l].layer===r[t]&&r[t].addFeatures(o);if(o instanceof dt||o.move(arguments[0].lat-i.lat,arguments[0].lng-i.lng),this.selectFeatures(o),s[l]&&s[l].geoSymbolTexts)for(let i=0;i<s[l].geoSymbolTexts.length;i++){let n=s[l].geoSymbolTexts[i].getSymbolData();n.associatedUuid=o.uuid;for(let i in s)if(s[i].symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT||s[i].symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1){let o=s[l].layer.createSymbol(n.libID,n.code,null,{symbolData:n});this.selectFeatures(o),s.splice(i,1),e(o.layer._leaflet_id,o.uuid,o,t);break}}if(s[l]&&s[l].deployments)for(let i=0;i<s[l].deployments.length;i++){let n=s[l].deployments[i].getSymbolData();n.associatedUuid=o.uuid;for(let i in s)if(s[i].symbolType===SuperMap.Plot.SymbolType.NAVYDEPLOYMENT||s[i].symbolType===SuperMap.Plot.SymbolType.AIRDEPLOYMENT){let o=s[l].layer.createSymbol(n.libID,n.code,null,{symbolData:n});this.selectFeatures(o),s.splice(i,1),e(o.layer._leaflet_id,o.uuid,o,t);break}}if(s[l]&&s[l].timeWindows)for(let i=0;i<s[l].timeWindows.length;i++){let n=s[l].timeWindows[i].getSymbolData();n.associatedUuid=o.uuid;for(let i in s)if(s[i].symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS){let o=s[l].layer.createSymbol(n.libID,n.code,null,{symbolData:n});this.selectFeatures(o),s.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(s[l].layer===r[i]){if(r[i].addFeatures(o),1012!==o.code&&this.selectFeatures(o),e(o.layer._leaflet_id,o.uuid,o,t),s[l]&&s[l].geoSymbolTexts)for(let i=0;i<s[l].geoSymbolTexts.length;i++){let n=s[l].geoSymbolTexts[i].getSymbolData();n.associatedUuid=o.uuid;for(let i in s)if(s[i].symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT||s[i].symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1){var p=s[l].layer.createSymbol(n.libID,n.code,null,{symbolData:n});this.selectFeatures(p),s.splice(i,1),e(p.layer._leaflet_id,p.uuid,p,t);break}}if(s[l]&&s[l].deployments)for(let i=0;i<s[l].deployments.length;i++){let n=s[l].deployments[i].getSymbolData();n.associatedUuid=o.uuid;for(let i in s)if(s[i].symbolType===SuperMap.Plot.SymbolType.NAVYDEPLOYMENT||s[i].symbolType===SuperMap.Plot.SymbolType.AIRDEPLOYMENT){let o=s[l].layer.createSymbol(n.libID,n.code,null,{symbolData:n});this.selectFeatures(o),s.splice(i,1),e(o.layer._leaflet_id,o.uuid,o,t);break}}if(s[l]&&s[l].timeWindows)for(let i=0;i<s[l].timeWindows.length;i++){if(!s[l].timeWindows[i].hasOwnProperty("symbolType"))return;let n=s[l].timeWindows[i].getSymbolData();n.associatedUuid=o.uuid;for(let i in s)if(s[i].symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS){let o=s[l].layer.createSymbol(n.libID,n.code,null,{symbolData:n});this.selectFeatures(o),s.splice(i,1),e(o.layer._leaflet_id,o.uuid,o,t);break}}}}},pasteToPositionAndLayer:function(t,e){var i=!0;e&&e instanceof Tt&&(i=!1);var o=!1;null!==t&&void 0!==t||(o=!0);var s=null,l=this.pasteGeoAry.slice();if(!o){for(var n=new L.LatLngBounds,a=0;a<l.length;a++){var r=l[a];r instanceof dt&&n.extend(r._bounds),n.extend(r._bounds)}s=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<l.length;n++){let a=l[n];if(!0!==a.layer.isLocked&&!1!==a.layer.isEditable){var p=null;if(p=a instanceof dt?a.route.clone():a.clone(),i?a.layer.addFeatures(p):e.addFeatures(p),o||null===s||p instanceof dt||p.move(t.lat-s.lat,t.lng-s.lng),void 0!==this.pasteGeoSel&&this.pasteGeoSel.length>n&&!0===this.pasteGeoSel[n])if(a instanceof dt){var u=p._getNodeFeature(p._getNodeByUuid(a.routeNode.id));this.selectedFeatures(u)}else this.selectFeatures(p);if(l[n]&&l[n].geoSymbolTexts)for(let t=0;t<l[n].geoSymbolTexts.length;t++){let e=l[n].geoSymbolTexts[t].getSymbolData();e.associatedUuid=p.uuid;for(let t in l)if(l[t].symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT||l[t].symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1){let i=l[n].layer.createSymbol(e.libID,e.code,null,{symbolData:e});this.selectFeatures(i),l.splice(t,1);break}}if(l[n]&&l[n].deployments)for(let t=0;t<l[n].deployments.length;t++){let e=l[n].deployments[t].getSymbolData();e.associatedUuid=p.uuid;for(let t in l)if(l[t].symbolType===SuperMap.Plot.SymbolType.NAVYDEPLOYMENT||l[t].symbolType===SuperMap.Plot.SymbolType.AIRDEPLOYMENT){let i=l[n].layer.createSymbol(e.libID,e.code,null,{symbolData:e});this.selectFeatures(i),l.splice(t,1);break}}if(l[n]&&l[n].timeWindows)for(let t=0;t<l[n].timeWindows.length;t++){let e=l[n].timeWindows[t].getSymbolData();e.associatedUuid=p.uuid;for(let t in l)if(l[t].symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS){let i=l[n].layer.createSymbol(e.libID,e.code,null,{symbolData:e});this.selectFeatures(i),l.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 s=function(t,e,i,o,s){var l=new SuperMap.Plot.TransactionInfo;l.layerId=t,l.uuid=e,l.functionName="setSymbolSize",l.undoParams=i,l.redoParams=o,s.transInfos.push(l)};if(t===SuperMap.Plot.EqualLargeType.WIDTH){var l=e[e.length-1].symbolSize.w;for(let t=0;t<e.length-1;t++){var n=e[t].symbolSize.w;e[t].setSymbolSize(l,e[t].symbolSize.h),s(e[t].layer._leaflet_id,e[t].uuid,[n,e[t].symbolSize.h],[l,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),s(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,y=e[t].symbolSize.h;e[t].setSymbolSize(p,u),s(e[t].layer._leaflet_id,e[t].uuid,[h,y],[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,s){var l=new SuperMap.Plot.TransactionInfo;l.layerId=t,l.uuid=e,l.functionName="move",l.undoParams=i,l.redoParams=o,s.transInfos.push(l)},o=[];for(let t=0;t<this.getSelectedFeatures().length;t++){var s=this.getSelectedFeatures()[t].getBounds();o.push(new SuperMap.Geometry.Point(s.getCenter().lng,s.getCenter().lat))}var l=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=l[e+1];l[e+1]=l[e],l[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;l[a].move(0,r),this._resetEditMarkersValue(l[a]),i(l[a].layer._leaflet_id,l[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 y=l[u+1];l[u+1]=l[u],l[u]=y}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 S=o[o.length-1].y-c*t-o[t].y;l[t].move(S,0),this._resetEditMarkersValue(l[t]),i(l[t].layer._leaflet_id,l[t].uuid,[-S,0],[S,0],e)}}}}});L.Map.include({getPlotEditControl:function(){return this._plotEditControl?this._plotEditControl:null}});var zt=function(t){return new kt(t)};L.supermap.plotting.editControl=zt;var Yt=L.Marker.extend({options:{nHandle:0,tag:0}});L.supermap.plotting.editMarker=function(t,e){return new Yt(t,e)};var Vt=yt.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="连接线",yt.prototype.initialize.call(this,t,e,i,o)},onAdd:function(t){yt.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 jt&&(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 jt&&(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 jt&&o instanceof jt&&(this.startAssociatedUuid=t,this.endAssociatedUuid=e,this.setJoinLineToDotSymbol(this.startAssociatedUuid),this.setJoinLineToDotSymbol(this.endAssociatedUuid),this.redraw())},destroy:function(){this.startFeature=null,this.endFeature=null,yt.prototype.destroy.call(this)},_calculateParts:function(){var t=null,e=this._map.getFeatureByUuid(this.startAssociatedUuid);if(null!==e){var i=L.Util.latLngsToSuperMapPoints(e.latLngs);null!==i&&0<i.length&&(t=i[0])}var o=null,s=this._map.getFeatureByUuid(this.endAssociatedUuid);if(null!==s){var l=L.Util.latLngsToSuperMapPoints(s.latLngs);null!==l&&0<l.length&&(o=l[0])}if(this.superMapAlgoSymbol.controlPoints=L.Util.latLngsToSuperMapPoints(this.latLngs),this.superMapAlgoSymbol.lineRelationType=this.lineRelationType,null!==t&&(0===this.superMapAlgoSymbol.controlPoints.length?this.superMapAlgoSymbol.controlPoints.push(t):this.superMapAlgoSymbol.controlPoints[0]=t),null!==o){if(0===this.superMapAlgoSymbol.controlPoints.length)return;1===this.superMapAlgoSymbol.controlPoints.length?this.superMapAlgoSymbol.controlPoints.push(o):this.superMapAlgoSymbol.controlPoints[this.superMapAlgoSymbol.controlPoints.length-1]=o}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,s=this.avoidRegions.length;o<s;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 jt)if(this._map.latLngToLayerPoint(i[o].getLatLngs()[0]).distanceTo(e)<5)return i[o]}return null},setJoinLineToDotSymbol:function(t){var e=this._map.getFeatureByUuid(t);if(null!=e&&e instanceof jt){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 jt)for(var i=0,o=e.joinLines.length;i<o;i++)if(this===e.joinLines[i]){e.joinLines.splice(i,1);break}}},_parseSymbolData:function(){yt.prototype._parseSymbolData.call(this),this.symbolData&&(this.symbolData.hasOwnProperty("startAssociatedUuid")&&(this.startAssociatedUuid=this.symbolData.startAssociatedUuid),this.symbolData.hasOwnProperty("endAssociatedUuid")&&(this.endAssociatedUuid=this.symbolData.endAssociatedUuid),this.symbolData.hasOwnProperty("lineRelationType")&&(this.lineRelationType=this.symbolData.lineRelationType))},_setSymbolData:function(){yt.prototype._setSymbolData.call(this),this.symbolData&&(this.symbolData.endAssociatedUuid=this.endAssociatedUuid,this.symbolData.lineRelationType=this.lineRelationType,this.symbolData.startAssociatedUuid=this.startAssociatedUuid)}}),Wt=function(t,e,i,o){return new Vt(t,e,i,o)};L.supermap.plotting.lineRelation=Wt,L.supermap.plotting.LineRelation=Vt;var jt=ht.extend({symbolSizeInLib:null,dRotate:0,initialScale:null,symbolSize:null,positionOffset:!1,positionOffsetType:null,positionOffsetX:null,positionOffsetY:null,symbolRank:null,negativeImage:null,middleMarkBounds:null,flagTextSize:60,maxScale:5,minScale:1,space:7,deployments:null,joinLines:null,limitWidthHeight:!0,initialize:function(t,e,i,o){if(this.symbolType=SuperMap.Plot.SymbolType.DOTSYMBOL,this.minEditPts=1,this.maxEditPts=1,this.joinLines=[],this.deployments=[],this.symbolSizeInLib=new SuperMap.Size(0,0),this.symbolSize=new SuperMap.Size(0,0),null===this.initialScale&&(this.initialScale={}),ht.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),this.dScale>this.maxScale?this.dScale=this.maxScale: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 s=this.symbolSizeInLib.w,l=this.symbolSize.w;this.symbolSizeInLib.w<this.symbolSizeInLib.h&&(s=this.symbolSizeInLib.h,l=this.symbolSize.h),this.initialScale.x=l/s,isNaN(this.initialScale.x)||this.initialScale.x===1/0||(!0===this.limitWidthHeight?(this.symbolSize.w=this.initialScale.x*this.dScale*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale.x*this.dScale*this.symbolSizeInLib.h):(this.symbolSize.w=this.initialScale.x*this.dScale*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale.y*this.dScale*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.annotationIndex=-1,this.textPosition=null,this.symbolSizeInLib=null,this.symbolSize=null,this.middleMarkBounds=null,this.positionOffsetX=null,this.positionOffsetY=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].startAssociatedUuid=null),this.joinLines[t].endAssociatedUuid===this.uuid&&(this.joinLines[t].endAssociatedUuid=null));this.joinLines=[],this.deployments=[],ht.prototype.destroy.call(this)},_reView:function(){if(void 0!==this.prevStrokeWidth&&this.prevStrokeWidth!==this.style.weight&&(this.strokeWidth=this.style.weight,this.prevStrokeWidth=this.style.weight),void 0!==this.prevFontSize&&this.prevFontSize!==this.style.fontSize&&(this.fontSize=this.style.fontSize/this.dScale/this.initialScale.x,this.prevFontSize=this.style.fontSize),void 0!==this.prevSpace&&this.prevSpace*this.dScale!==this.space&&(this.prevSpace=this.space/this.dScale),this.fromZoom!==this._map.getZoom()){if(this.scaleByMap&&!1!==this.scaleByMap)if(void 0===this.actualScale&&(this.actualScale=this.dScale),void 0===this.prevScale&&(this.prevScale=this.dScale),this.actualScale*=this._map.getZoomScale(this._map.getZoom(),this.fromZoom),this.actualScale>this.maxScale?this.dScale=this.maxScale:this.actualScale<this.minScale?this.dScale=this.minScale:this.dScale=this.actualScale,this.dScale!==this.prevScale){var t=this.initialScale.x*this.dScale;!0===this.limitWidthHeight?(this.symbolSize.w=t*this.symbolSizeInLib.w,this.symbolSize.h=t*this.symbolSizeInLib.h):this.prevScale?(this.symbolSize.w=this.initialScale.x*this.dScale*this.symbolSizeInLib.w/this.prevScale,this.symbolSize.h=this.initialScale.y*this.dScale*this.symbolSizeInLib.h/this.prevScale):(this.symbolSize.w=this.initialScale.x*this.dScale*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale.y*this.dScale*this.symbolSizeInLib.h),void 0===this.prevSpace&&(this.prevSpace=this.space),void 0===this.strokeWidth&&(this.strokeWidth=this.style.weight);var e=this.strokeWidth/.5*5;if(this.symbolSize.w<e&&this.symbolSize.h<e){this.scaleStrokeWidth=!0;var i=this.symbolSize.w>this.symbolSize.h?this.symbolSize.w:this.symbolSize.h;this.style.weight=Math.round(i/10),this.style.weight>=this.weight&&(this.style.weight=this.weight),this.style.weight<=.5&&(this.style.weight=.5)}else!0===this.scaleStrokeWidth&&(this.scaleStrokeWidth=!1),this.style.weight=this.strokeWidth;if(this.prevStrokeWidth=this.style.weight,this.style.fontSize=this.style.fontSize*this._map.getZoomScale(this._map.getZoom(),this.fromZoom),this.prevFontSize=this.style.fontSize,0!==this.textContent.length&&8===this.annotationPosition){var o;!0===this.limitWidthHeight?o=this.middleMarkBounds.scale(this.dScale*this.initialScale.x,this.anchorPoint):this._widthHeightLimitScale();var s=96*o.getWidth()/25.4/10,l=96*o.getHeight()/25.4/10;this.components[this._annotationId].options.graphicWidth=s,this.components[this._annotationId].options.graphicHeight=l}for(var n in this.components)n===this._annotationId&&this.components[n]instanceof Q?this.components[n].options.fontSize=this.style.fontSize:n!==this._annotationId&&this.components[n]instanceof Q?this.components[n].options.fontSize=t*(this.components[n].options.fontSize/this.prevScale/this.initialScale.x):n!==this._annotationId&&!0!==this.components[n].isLeadLine&&(this.components[n].options.weight=this.style.weight);for(var a=0;a<this.geoSymbolTexts.length;a++){var r=this.geoSymbolTexts[a];null!==r&&r._calculateParts()}var p=this.dScale/this.prevScale,u=this._map.getZoomScale(this._map.getZoom(),this.fromZoom);p!==u&&this._resizeCells(p*(1/u),this.getLatLngs()[0]),this._renderer instanceof L.Canvas&&p===u&&!0===this.positionOffset&&(this._clearComponents(),this._calculateParts()),this.prevScale=this.dScale}else{let t=this._map.getZoomScale(this.fromZoom,this._map.getZoom());this._resizeCells(t,this.getLatLngs()[0])}else{for(var h=0;h<this.geoSymbolTexts.length;h++)this.geoSymbolTexts[h].fromZoom=this._map.getZoom();let t=this._map.getZoomScale(this.fromZoom,this._map.getZoom());var y=this.getLatLngs()[0];this._resizeCells(t,y)}this.fromZoom=this._map.getZoom(),this.layer._map.getRenderer(this.layer)instanceof L.Canvas&&this._updateCanvasFills(),this._updateSymbolTexts();var c="";null!==this._map&&this._map instanceof L.Map&&(c=this._map.options.crs.code,L.Util.isMercatorProjection(c)&&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){for(let t=0;t<this.deployments.length;t++){var e=this.deployments[t];null!==e&&(e.symbolType!==SuperMap.Plot.SymbolType.NAVYDEPLOYMENT&&e.symbolType!==SuperMap.Plot.SymbolType.AIRDEPLOYMENT||(e.style.display=this.style.display,e.redraw()))}for(let t=0;t<this.joinLines.length;t++){var i=this.joinLines[t];null!==i&&(i.style.display=this.style.display,i.redraw())}for(let t=0;t<this.geoSymbolTexts.length;t++){var o=this.geoSymbolTexts[t];null!==o&&(o.style.display=this.style.display,o.redraw())}return this.latLngs=t,this.redraw()},getSpace:function(){return this.space},setSpace:function(t){this.space!==t&&(this.space=t,0!==this.textContent.length&&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(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)}},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.dScale*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale.x*this.dScale*this.symbolSizeInLib.h):(this.symbolSize.w=t*this.symbolSizeInLib.w,this.symbolSize.h=e*this.symbolSizeInLib.h),this.style.fontSize=this.fontSize*this.dScale*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(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getPositionOffset:function(){return this.positionOffset},setPositionOffsetType:function(t){this.positionOffsetType!==t&&(this.positionOffsetType=t,this.positionOffset&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},getPositionOffsetType:function(){return this.positionOffsetType},setTextContent:function(t){this.textContent=t,this._handleAnnotation()},middleMarkExist:function(){return this.symbolData.middleMarkExist},setTextPosition:function(t){8===t&&!1===this.symbolData.middleMarkExist||this.annotationPosition!==t&&(this.annotationPosition=t,this._handleAnnotation())},getSymbolSize:function(){return this.symbolSize},setSymbolSize:function(t,e){if(0===this.symbolSizeInLib.w||0===this.symbolSizeInLib.h)this.initialScale.x=1;else{null===this.symbolSize&&(this.symbolSize=new SuperMap.Size(0,0));var i=t/this.dScale/this.symbolSizeInLib.w,o=e/this.dScale/this.symbolSizeInLib.h;!0===this.limitWidthHeight?(this.initialScale.x!==i?this.initialScale.x=i:this.initialScale.x!==o&&(this.initialScale.x=o),this.symbolSize.w=this.initialScale.x*this.dScale*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale.x*this.dScale*this.symbolSizeInLib.h):(this.initialScale.x=i,this.initialScale.y=o,this.symbolSize.w=this.initialScale.x*this.dScale*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale.y*this.dScale*this.symbolSizeInLib.h)}var s;s=!1===this.limitWidthHeight?this.initialScale.x<this.initialScale.y?this.initialScale.x:this.initialScale.y:this.initialScale.x,void 0===this.fontSize?this.fontSize=this.style.fontSize/this.dScale/s:this.style.fontSize=this.fontSize*this.dScale*s,this.prevFontSize=this.style.fontSize,this._map&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},setSurroundLineType:function(t){if(this.surroundLineType!==t){var e=new SuperMap.GetSymbolInfoParameters;e.libID=this.libID,e.code=this.code,e.negativeImage=this.negativeImage,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.fire(SuperMap.Plot.Event.reseteditmarkersvalues),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.negativeImage=this.negativeImage,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.fire(SuperMap.Plot.Event.reseteditmarkersvalues),this._map&&this._map.getPlotEditControl()&&this._map.getPlotEditControl().fire(SuperMap.Plot.Event.featuresmodified,{features:[this]})},this)}},getNegativeImage:function(){return this.negativeImage},setNegativeImage:function(t){if(this.negativeImage!==t){var e=new SuperMap.GetSymbolInfoParameters;e.libID=this.libID,e.code=this.code,e.negativeImage=t,e.symbolRank=this.symbolRank,e.surroundLineType=this.surroundLineType,L.supermap.symbolInfoService(this.serverUrl).getSymbolInfo(e,function(t){this.symbolData.innerCells=t.result.innerCells,this.negativeImage=t.result.negativeImage,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues),this._map&&this._map.getPlotEditControl()&&this._map.getPlotEditControl().fire(SuperMap.Plot.Event.featuresmodified,{features:[this]})},this)}},move:function(t,e){if(this.hasOwnProperty("_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 s=this._map.latLngToLayerPoint(L.latLng(this.getLatLngs()[0].lat+t,this.getLatLngs()[0].lng+e)),l=this._map.latLngToLayerPoint(this.getLatLngs()[0]);this.positionOffsetX+=(s.x-l.x)/this.dScale,this.positionOffsetY+=(s.y-l.y)/this.dScale,this.redraw()}else ht.prototype._move.call(this,t,e);if(null!==this.joinLines&&0<this.joinLines.length)for(let t=0;t<this.joinLines.length;t++){var n=this.joinLines[t];null!==n&&(n instanceof Vt&&n.redraw())}if(null!==this.deployments&&0<this.deployments.length)for(let t=0;t<this.deployments.length;t++){var a=this.deployments[t];if(null!==a&&(a.symbolType===SuperMap.Plot.SymbolType.NAVYDEPLOYMENT||a.symbolType===SuperMap.Plot.SymbolType.AIRDEPLOYMENT)){for(var r in a.components)a.components[r].symbolType===SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL&&(a.components[r].latLngs[2]=this.latLngs[0],a.components[r].redraw());for(let t in a.subObjects)a.subObjects[t].redraw()}}for(let i=0,o=this.avoidRegions.length;i<o;i++)L.Util.moveLatLngs(this.avoidRegions[i].getLatLngs(),t,e);var p="";null!==this._map&&this._map instanceof L.Map&&(p=this._map.options.crs.code,L.Util.isMercatorProjection(p)&&this.redraw()),this._updateSymbolTexts()},getBounds:function(){var t=new L.LatLngBounds;for(var e in this.components){var i=this.components[e];i.isLeadLine||i.isAnnotation||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},_setSymbolData:function(t){if(ht.prototype._setSymbolData.call(this,t),this.symbolData){this.symbolData.hasOwnProperty("type")||(this.symbolData.type="GRAPHICOBJECT"),this.symbolData.symbolRank=this.symbolRank,this.symbolData.negativeImage=this.negativeImage,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,s=25.4*this.symbolSizeInLib.h*10/96;this.symbolData.symbolSizeInLib={x:o,y:s},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,s=this.symbolSize.h/this.dScale/this.symbolSizeInLib.h;this.initialScale!==o?this.initialScale=o:this.initialScale!==s&&(this.initialScale=s),this.symbolSize.w=this.initialScale*this.dScale*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale*this.dScale*this.symbolSizeInLib.h}}var l=this.symbolSizeInLib.w,n=this.symbolSize.w;this.symbolSizeInLib.w<this.symbolSizeInLib.h&&(l=this.symbolSizeInLib.h,n=this.symbolSize.h),this.initialScale=n/l,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},_parseSymbolData:function(){if(ht.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,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)}},_calculateParts:function(){if(!(this.getLatLngs().length<this.minEditPts)&&"none"!==this.style.display){var t=SuperMap.Plot.AnalysisSymbol.analysisSymbolCells(this.symbolData,!0),e=this._map.latLngToLayerPoint(this.getLatLngs()[0]);if(!0===this.positionOffset&&(e.x+=this.positionOffsetX*this.dScale,e.y+=this.positionOffsetY*this.dScale),!0===this.limitWidthHeight)var i=this.initialScale.x*this.dScale;for(var o=0,s=t.length;o<s;o++){var l=t[o];if(0!==this.surroundLineType||!0!==l.surroundLineFlag){l.type===SuperMap.Plot.SymbolType.TEXTSYMBOL&&(l.style.fontSize=i*(l.style.fontSize/10),l.style.fontSize<6&&(l.style.fontSize=6),l.style.labelRotation+=-this.dRotate),null!=l.polybezierClose&&(l.type===SuperMap.Plot.SymbolType.POLYBEZIERSYMBOL||l.type===SuperMap.Plot.SymbolType.POLYBEZIERCLOSESYMBOL?(l.type,SuperMap.Plot.SymbolType.POLYBEZIERSYMBOL,l.positionPoints=SuperMap.Plot.PlottingUtil.generateBeizerPointsWithCtrlPt(l.positionPoints),l.isClosed&&l.positionPoints[0]!==l.positionPoints[l.positionPoints.length-1]&&l.positionPoints.push(l.positionPoints[0])):l.type===SuperMap.Plot.SymbolType.KIDNEY&&(l.positionPoints=SuperMap.Plot.Primitives.getSpatialData(l.type,l.positionPoints)));for(var n=0,a=l.positionPoints.length;n<a;n++){l.positionPoints[n].x-=this.symbolData.anchorPoint.x,l.positionPoints[n].y-=this.symbolData.anchorPoint.y,!0===this.limitWidthHeight?(l.positionPoints[n].x=l.positionPoints[n].x*i,l.positionPoints[n].y=l.positionPoints[n].y*i):(l.positionPoints[n].x=l.positionPoints[n].x*this.symbolSize.w/this.symbolSizeInLib.w,l.positionPoints[n].y=l.positionPoints[n].y*this.symbolSize.h/this.symbolSizeInLib.h);var r=this.dRotate*(Math.PI/180);SuperMap.Plot.PlottingUtil.rotateAngle({x:0,y:0},r,l.positionPoints[n]),l.positionPoints[n]=this._transitionPoint(l.positionPoints[n],e)}l.positionPoints=L.Util.latLngsToSuperMapPoints(l.positionPoints)}}this._transSymbolCellsToLayers(t),this._generateLeadLine(),this._annotationId=-1,this.isNotRedrawText||void 0!==this.isNotRedrawText||this._handleAnnotation(),this._updateSymbolTexts(),this._bounds=this.getBounds()}},_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 l=this._map.latLngToLayerPoint(this.getLatLngs()[0]),n=L.point(l.x+this.positionOffsetX*this.dScale,l.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),s=180*SuperMap.Plot.PlottingUtil.radian(i,o)/Math.PI;if(s>45&&s<135||s>225&&s<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(){if(-1!==this._annotationId&&(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);var t=this.getBounds();if(this.textContent&&null!==this.textContent&&0!==this.textContent.length&&null!==t&&t.isValid()){var e=SuperMap.Plot.PlottingUtil.cloneObject(this.style),i=this.space*this.dScale,o=null;if(0===this.annotationPosition){e.labelAlign="rb";let s=L.latLng(t.getNorth(),t.getWest()),l=this._map.latLngToLayerPoint(s);l.x-=i,o=this._map.layerPointToLatLng(l)}else if(1===this.annotationPosition){e.labelAlign="rt";let s=L.latLng(t.getSouth(),t.getWest()),l=this._map.latLngToLayerPoint(s);l.x-=i,o=this._map.layerPointToLatLng(l)}else if(2===this.annotationPosition){e.labelAlign="lb";let s=L.latLng(t.getNorth(),t.getEast()),l=this._map.latLngToLayerPoint(s);l.x+=i,o=this._map.layerPointToLatLng(l)}else if(3===this.annotationPosition){e.labelAlign="lt";let s=L.latLng(t.getSouth(),t.getEast()),l=this._map.latLngToLayerPoint(s);l.x+=i,o=this._map.layerPointToLatLng(l)}else if(4===this.annotationPosition){e.labelAlign="cb";let s=L.latLng(t.getNorth(),(t.getWest()+t.getEast())/2),l=this._map.latLngToLayerPoint(s);l.y-=i,o=this._map.layerPointToLatLng(l)}else if(5===this.annotationPosition){e.labelAlign="ct";let s=L.latLng(t.getSouth(),(t.getWest()+t.getEast())/2),l=this._map.latLngToLayerPoint(s);l.y+=i,o=this._map.layerPointToLatLng(l)}else if(6===this.annotationPosition){e.labelAlign="rm";let s=L.latLng((t.getSouth()+t.getNorth())/2,t.getWest()),l=this._map.latLngToLayerPoint(s);l.x-=i,o=this._map.layerPointToLatLng(l)}else if(7===this.annotationPosition){e.labelAlign="lm";let s=L.latLng((t.getSouth()+t.getNorth())/2,t.getEast()),l=this._map.latLngToLayerPoint(s);l.x+=i,o=this._map.layerPointToLatLng(l)}else if(8===this.annotationPosition&&this.symbolData.middleMarkExist){var s;s=!0===this.limitWidthHeight?this.middleMarkBounds.scale(this.dScale*this.initialScale.x,this.anchorPoint):this._widthHeightLimitScale();var l=new SuperMap.Geometry.Point((s.left+s.right)/2,(s.top+s.bottom)/2);if(this.negativeImage){var n=SuperMap.Plot.PlottingUtil.projectPoint(l,new SuperMap.Geometry.Point(this.anchorPoint.x,100),new SuperMap.Geometry.Point(this.anchorPoint.x,this.anchorPoint.y));SuperMap.Plot.PlottingUtil.rotateAngle(n,Math.PI,l)}l.x-=this.anchorPoint.x,l.y-=this.anchorPoint.y;var a=this.dRotate*(Math.PI/180);SuperMap.Plot.PlottingUtil.rotateAngle(new SuperMap.Geometry.Point(0,0),a,l);var r=this._map.latLngToLayerPoint(this.getLatLngs()[0]);!0===this.positionOffset&&(r.x+=this.positionOffsetX*this.dScale,r.y+=this.positionOffsetY*this.dScale);var p=96*s.getWidth()/25.4/10,u=96*s.getHeight()/25.4/10;e.graphicWidth=p,e.graphicHeight=u,o=this._transitionPoint(l,r)}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 h={externalGraphic:e.externalGraphic,graphicWidth:e.graphicWidth,graphicHeight:e.graphicHeight,rotation:-this.dRotate};let t=L.supermap.plotting.pointImage([o],h);this._annotationId=this.components.length,this._addComponents(t)}else if(8!==this.annotationPosition){if(!1===this.limitWidthHeight)var y=this.initialScale.x<this.initialScale.y?this.initialScale.x:this.initialScale.y;void 0!==this.prevFontSize&&this.prevFontSize!==this.style.fontSize&&(!0===this.limitWidthHeight?this.fontSize=this.style.fontSize/this.dScale/this.initialScale.x:this.fontSize=this.style.fontSize/this.dScale/y,this.prevFontSize=this.style.fontSize),void 0!==this.fontSize?(!0===this.limitWidthHeight?this.style.fontSize=this.fontSize*this.dScale*this.initialScale.x:this.style.fontSize=this.fontSize*this.dScale*y,this.prevFontSize=this.style.fontSize):(!0===this.limitWidthHeight?this.fontSize=this.style.fontSize/this.dScale/this.initialScale.x:this.fontSize=this.style.fontSize/this.dScale/y,this.prevFontSize=this.style.fontSize),e.fontSize=this.style.fontSize,e.fontSizeLimit=!1,e.labelRotation=0,this._annotationId=this.components.length,this._createAndDrawLayer(34,[o],e,this.textContent).isAnnotation=!0}}}},_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"),s=SuperMap.Plot.PlottingUtil.getTextWidth(i,t);o.width=s+20,o.height=parseFloat(i.fontSize)+10,document.body.appendChild(o);var l=o.getContext("2d");l.fillStyle=i.fontColor,l.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(l.fillText)l.font=n,l.textAlign="center",l.textBaseline="middle",l.fillText(t,o.width/2,o.height/2);else if(l.mozDrawText){l.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=l.mozMeasureText("xx");p[1]+=u*(1+r*numRows);var h=p[0]+a*l.mozMeasureText(t),y=p[1]+u;l.translate(h,y),l.mozDrawText(t),l.translate(-h,-y)}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))},_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){ht.prototype._rotate.call(this,t,e),this.dRotate+=t},_resize:function(t,e){ht.prototype._resize.call(this,t,e),!0===this.limitWidthHeight?(this.initialScale.x*=t,this.symbolSize.w=this.initialScale.x*this.dScale*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale.x*this.dScale*this.symbolSizeInLib.h):(this.symbolSize.w=this.initialScale.x*this.dScale*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale.y*this.dScale*this.symbolSizeInLib.h),this.style.fontSize=this.fontSize*this.dScale*this.initialScale.x,this.prevFontSize=this.style.fontSize},_widthHeightLimitScale:function(){var t=this.initialScale.x,e=this.initialScale.y,i=this.anchorPoint.x,o=this.anchorPoint.y,s=(this.middleMarkBounds.left-i)*t+i,l=(this.middleMarkBounds.bottom-o)*e+o,n=(this.middleMarkBounds.right-i)*t+i,a=(this.middleMarkBounds.top-o)*e+o;return new SuperMap.Bounds(s,l,n,a)},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}}),Ht=function(t,e,i,o){return new jt(t,e,i,o)};L.supermap.plotting.dotSymbol=Ht,L.supermap.plotting.DotSymbol=jt;var Xt=ht.extend({path: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))},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,ht.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)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,t.graphicXOffset=this.style.graphicXOffset?this.style.graphicXOffset:void 0,t.graphicYOffset=this.style.graphicYOffset?this.style.graphicYOffset:void 0;var e={externalGraphic:t.externalGraphic,graphicWidth:t.graphicWidth,graphicHeight:t.graphicHeight,rotation:-this.dRotate};let i=L.supermap.plotting.pointImage(L.Util.cloneLatLngs(this.getLatLngs()),e);this._addComponents(i),this._bounds=this.getBounds()},getBounds:function(){var t=this._map.latLngToLayerPoint(this.getLatLngs()[0]),e=this.style.graphicXOffset?this.style.graphicXOffset:.5*this.style.graphicWidth,i=this.style.graphicYOffset?this.style.graphicYOffset:.5*this.style.graphicHeight,o=L.point(t.x-e,t.y-i),s=L.point(o.x+this.style.graphicWidth,o.y+this.style.graphicHeight),l=this._map.layerPointToLatLng(o),n=this._map.layerPointToLatLng(s);return L.latLngBounds(l,n)},move:function(t,e){ht.prototype._move.call(this,t,e)},_reView:function(){this.fromZoom!==this._map.getZoom()&&this.fire(SuperMap.Plot.Event.reseteditmarkersvalues),this.fromZoom=this._map.getZoom()}});L.supermap.plotting.picture=function(t,e,i,o){return new Xt(t,e,i,o)},L.supermap.plotting.Picture=Xt;var Jt=yt.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=[],ht.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,yt.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=this.getArcPts(this.startAngle,this.endAngle))[0].clone();i.isScalePoint=!0,i.tag=0;var o=e[e.length-1].clone();o.isScalePoint=!0,o.tag=1,this.scalePoints.push(i),this.scalePoints.push(o),e.push(this.centerPoint.clone()),this.latLngs.length>2&&this.latLngs.splice(1,this.latLngs.length-1)}this._createAndDrawLayer(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,e,{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._createAndDrawLayer(34,[o],{surroundLineFlag:!1,labelAlign:"cm"},this.textContent),i=o.clone()}else{var s=this.textPosition+t,l=this.textPosition-t,n=this.getArcPts(l,s),a=SuperMap.Plot.RelLineText.ONLEFTLINE;SuperMap.Plot.PlottingUtil.isPloyClockwise(n)&&(a=SuperMap.Plot.RelLineText.ONRIGHTLINE);for(var r=SuperMap.Plot.PlottingUtil.clonePoints(n),p=[],u=r.length-1;u>=0;u--)p.push(r[u]);this._addComponents(L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.PATHTEXT,p,{textContent:this.textContent,showPathLine:!1,isCurve:!1,relLineText:a},this.style)),i=n[Math.ceil(n.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),s=[];if(s.push(this.centerPoint),s.push(L.latLng(e.y,e.x)),SuperMap.Plot.RadiusLineType.NONE!==this.radiusLineType&&this._createAndDrawLayer(SuperMap.Plot.SymbolType.POLYLINESYMBOL,s,{surroundLineFlag:!1}),this.radiusLineType===SuperMap.Plot.RadiusLineType.ARROW){var l;if(null===this.map)l=0;else{var n=this._map.layerPointToLatLng(L.point(0,0)),a=this._map.layerPointToLatLng(L.point(this.subSymbolDefaultPixelSize,0));l=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,l,12.5),p=SuperMap.Plot.PlottingUtil.findPoint(e,i,l,-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._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),y=SuperMap.Plot.PlottingUtil.findPoint(i,e,.8*o,0),c=SuperMap.Plot.PlottingUtil.findPoint(h,e,.02*o,90),S=SuperMap.Plot.PlottingUtil.findPoint(y,e,.02*o,90),P=L.latLng(c.y,c.x),g=L.latLng(S.y,S.x);let t=SuperMap.Plot.RelLineText.ONLEFTLINE;var d=[];c.x<S.x?(d.push(P),d.push(g)):(d.push(g),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},this.style))}if(2===this.radiusText.length){let t=SuperMap.Plot.RelLineText.ONRIGHTLINE;var f=SuperMap.Plot.PlottingUtil.findPoint(h,e,.02*o,270),m=SuperMap.Plot.PlottingUtil.findPoint(y,e,.02*o,270),M=L.latLng(f.y,f.x),b=L.latLng(m.y,m.x),T=[];f.x<m.x?(T.push(M),T.push(b)):(T.push(b),T.push(M),t=SuperMap.Plot.RelLineText.ONLEFTLINE),this._addComponents(L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.PATHTEXT,T,{textContent:this.radiusText[1],showPathLine:!1,relLineText:t},this.style))}var v=L.latLng(e.y,e.x);v.isScalePoint=!0,v.tag=3,this.scalePoints.push(v)}},_parseSymbolData:function(){yt.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=[],yt.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){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){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 s=!1;1===this.latLngs.length&&(s=!0,this.latLngs.push(this.scalePoints[0])),yt.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]),s&&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=t;o<=e;o+=5){let t=SuperMap.Plot.PlottingUtil.destinationVincenty(this.centerPoint,360-o+90,1e3*this.radius);i.push(t)}if(o-e>0&&o-e<5){let t=SuperMap.Plot.PlottingUtil.destinationVincenty(this.centerPoint,360-e+90,1e3*this.radius);i.push(t)}return i}}),qt=function(t,e,i,o){return new Jt(t,e,i,o)};L.supermap.plotting.arcRegion=qt;var Zt=at.extend({colNum:null,space:null,initialize:function(t,e,i,o){at.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),null===this.scaleByMap&&(this.scaleByMap=!0)},destroy:function(){this.space=null,this.colNum=null,at.prototype.destroy.call(this)},redraw:function(){"none"!==this.style.display?this._redrawComponents():this._clearComponents()},_calculateParts:function(){var t=this.layer.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}if(e||t.deployments.push(this),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]);if(0===this.components.length){var i=L.Util.cloneLatLngs(t.latLngs[0]),o=this._map.latLngToLayerPoint(L.latLng(i[0].lat,i[0].lng)),s=this._transitionPoint(new SuperMap.Geometry.Point(this.space,0),o),l=Math.abs(s.lng-i[0].lng),n=new SuperMap.Geometry.Point(0,0),a=this._transitionPoint(n,o),r=new SuperMap.Geometry.Point(100,100),p=this._transitionPoint(r,o),u=new L.LatLngBounds(L.latLng(a.lat,a.lng),L.latLng(p.lat,p.lng)),h=Math.ceil(this._getSubSymbolCount(this.subSymbols.length-1)/this.colNum),y=Math.abs(u.getNorth()-u.getSouth())*h+l*(h+1),c=L.latLng(i[0].lat+y/2,i[0].lng-5*l);for(let t=0;t<this.subSymbols.length;t++)for(var S=0;S<this.subSymbols[t].totalNum;S++){var P=this._getSubSymbolCount(t-1)+S+1,g=Math.ceil(P/h),d=P-h*(g-1);if(1!==g&&1===d){var f=this._calculateBounds();c.lng=f.getWest()}this.subSymbols[t].symbolData.textContent=this.subSymbols[t].textContent;for(var m=c.lng-(l+Math.abs(u.getWest()-u.getEast())/3),M=c.lat-d*(Math.abs(u.getNorth()-u.getSouth())+l),b=0,T=0,v=0,A=0,x=0;x<this.subSymbols[t].symbolData.innerCells.length;x++)for(var _=0;_<this.subSymbols[t].symbolData.innerCells[x].positionPoints.length;_++)b<=this.subSymbols[t].symbolData.innerCells[x].positionPoints[_].x&&(b=this.subSymbols[t].symbolData.innerCells[x].positionPoints[_].x),T>=this.subSymbols[t].symbolData.innerCells[x].positionPoints[_].x&&(T=this.subSymbols[t].symbolData.innerCells[x].positionPoints[_].x),v<=this.subSymbols[t].symbolData.innerCells[x].positionPoints[_].y&&(v=this.subSymbols[t].symbolData.innerCells[x].positionPoints[_].y),A>=this.subSymbols[t].symbolData.innerCells[x].positionPoints[_].y&&(A=this.subSymbols[t].symbolData.innerCells[x].positionPoints[_].y);var O=L.latLng(M,m),w=this._map.latLngToLayerPoint(L.latLng(M,m)),I=new SuperMap.Geometry.Point(b,(v+A)/2),D=new SuperMap.Geometry.Point(I.x,I.y),E=new SuperMap.Geometry.Point(this.subSymbols[t].symbolData.anchorPoint.x,this.subSymbols[t].symbolData.anchorPoint.y),C=this._transitionPoint(D,w),N=this._transitionPoint(E,w);O.lat+=N.lat-C.lat,O.lng+=N.lng-C.lng;var U=this.subSymbols[t].symbolData.libID,R=this.subSymbols[t].symbolData.code;this.subSymbols[t].symbolData.annotationPosition=6;var B=SuperMap.Util.cloneObject(this.subSymbols[t].symbolData),G=L.supermap.plotting.PlottingObject.createSymbol(U,R,O,{serverUrl:this.serverUrl,symbolData:B,scaleByMap:!0,minScale:0,maxScale:2048,space:0});G.enableEdit=!0,G.ownerGroup=this,this._addComponents(G),this.bounds=this._calculateBounds(),this.subObjects.push(G)}if(this.bounds=new L.LatLngBounds,this.bounds=this._calculateBounds(),null!==this.textContent&&0!==this.textContent.length){var F=L.latLng(i[0].lat+y/2+l,i[0].lng-5*l),k=L.supermap.plotting.PlottingObject.createSymbol(0,34,[F],{textContent:this.textContent,serverUrl:this.serverUrl});k.style.labelAlign="rb",k.style.scaleByMap=!0,k.enableEdit=!0,k.ownerGroup=this,this._addComponents(k),this.bounds.extend(k.getBounds()),this.subObjects.push(k)}var z=new L.LatLngBounds(L.latLng(this.bounds.getSouth()-l,this.bounds.getWest()-l),L.latLng(this.bounds.getNorth()+l,this.bounds.getEast()+l)),Y=[];Y.push(L.latLng(z.getNorth(),z.getWest())),Y.push(L.latLng(z.getSouth(),z.getEast()));var V=L.latLng(i[0].lat,i[0].lng);V.isFixedPos=!0,Y.push(V);var W=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL,Y,{serverUrl:this.serverUrl});for(var j in W.enableEdit=!0,W.ownerGroup=this,this.subObjects.splice(0,0,W),this._addComponents(W),this._clearComponents(),this.subObjects)this.subObjects[j].ownerGroup=this,this.subObjects[j].enableEdit=!0,this._addComponents(this.subObjects[j])}}},_reView:function(){for(var t in this.subObjects)this.subObjects[t].layer&&this.subObjects[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)},_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)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())}}}),Kt=function(t,e,i,o){return new Zt(t,e,i,o)};L.supermap.plotting.navyDeployment=Kt,L.supermap.plotting.NavyDeployment=Zt;var Qt=Zt.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.layer.getFeatureByUuid(this.associatedUuid),i=L.Util.cloneLatLngs(e.latLngs[0]),o=this._map.latLngToLayerPoint(L.latLng(i[0].lat,i[0].lng)),s=this._transitionPoint(new SuperMap.Geometry.Point(this.space,0),o),l=Math.abs(s.lng-i[0].lng),n=new L.LatLngBounds(L.latLng(this.bounds.getSouth()-l,this.bounds.getWest()-l),L.latLng(this.bounds.getNorth()+l,this.bounds.getEast()+l)),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){Zt.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)},destroy:function(){this.isShowTooltip=null,Zt.prototype.destroy.call(this)},_calculateParts:function(){var t=this.layer.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}if(e||t.deployments.push(this),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]);if(0===this.components.length){var i=L.Util.cloneLatLngs(t.latLngs[0]),o=this._map.latLngToLayerPoint(L.latLng(i[0].lat,i[0].lng)),s=this._transitionPoint(new SuperMap.Geometry.Point(this.space,0),o),l=Math.abs(s.lng-i[0].lng),n=new SuperMap.Geometry.Point(0,0),a=this._transitionPoint(n,o),r=new SuperMap.Geometry.Point(100,100),p=this._transitionPoint(r,o),u=new L.LatLngBounds(L.latLng(a.lat,a.lng),L.latLng(p.lat,p.lng)),h=Math.ceil(this._getSubSymbolCount(this.subSymbols.length-1)/this.colNum),y=Math.abs(u.getWest()-u.getEast())*this.colNum+l*(this.colNum-1),c=L.latLng(i[0].lat-l,i[0].lng-.5*y+.5*Math.abs(u.getEast()-u.getWest()));!0===this.isShowTooltip&&(c.lat-=4*l),this._setSubSymbolText();var S=[];for(let t=0;t<this.subSymbols.length;t++)for(var P=0;P<this.subSymbols[t].totalNum;P++)S.push(this.subSymbols[t]);var g=0;for(let t=0;t<h;t++){for(P=0;P<this.colNum&&!(g>=S.length);P++){var d=S[g];if(void 0!==d.symbolData&&null!==d.symbolData){for(var f=d.symbolData.libID,m=d.symbolData.code,M=c.lng+P*(l+Math.abs(u.getEast()-u.getWest())),b=c.lat-(2*l+Math.abs(u.getNorth()-u.getSouth())/2),T=0,v=0,A=0,x=0,_=0;_<d.symbolData.innerCells.length;_++)for(var O=0;O<d.symbolData.innerCells[_].positionPoints.length;O++)T<=d.symbolData.innerCells[_].positionPoints[O].x&&(T=d.symbolData.innerCells[_].positionPoints[O].x),v>=d.symbolData.innerCells[_].positionPoints[O].x&&(v=d.symbolData.innerCells[_].positionPoints[O].x),A<=d.symbolData.innerCells[_].positionPoints[O].y&&(A=d.symbolData.innerCells[_].positionPoints[O].y),x>=d.symbolData.innerCells[_].positionPoints[O].y&&(x=d.symbolData.innerCells[_].positionPoints[O].y);var w=L.latLng(b,M),I=this._map.latLngToLayerPoint(L.latLng(b,M)),D=new SuperMap.Geometry.Point((T+v)/2,A),E=new SuperMap.Geometry.Point(D.x,D.y),C=new SuperMap.Geometry.Point(S[g].symbolData.anchorPoint.x,S[g].symbolData.anchorPoint.y),N=this._transitionPoint(E,I),U=this._transitionPoint(C,I);w.lat+=U.lat-N.lat,w.lng+=U.lng-N.lng,d.symbolData.annotationPosition=5;var R=SuperMap.Util.cloneObject(d.symbolData),B=L.supermap.plotting.PlottingObject.createSymbol(f,m,w,{symbolData:R,scaleByMap:!0,minScale:0,maxScale:2048,space:0});B.enableEdit=!0,B.ownerGroup=this,this._addComponents(B),this.subObjects.push(B),g++}}this.bounds=this._calculateBounds(),c.lat=this.bounds.getSouth()}if(this.isShowTooltip){var G=new L.LatLngBounds(L.latLng(this.bounds.getSouth()-l,this.bounds.getWest()-l),L.latLng(this.bounds.getNorth()+l+1.2,this.bounds.getEast()+l)),F=[];F.push(L.latLng(G.getNorth(),G.getWest())),F.push(L.latLng(G.getSouth(),G.getEast()));var k=L.latLng(i[0].lat,i[0].lng);k.isFixedPos=!0,F.push(k);var z=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL,F,{serverUrl:this.serverUrl});for(var Y in z.enableEdit=!0,z.ownerGroup=this,this.subObjects.splice(0,0,z),this._addComponents(z),this._clearComponents(),this.subObjects)this.subObjects[Y].enableEdit=!0,this.subObjects[Y].ownerGroup=this,this._addComponents(this.subObjects[Y])}}}},_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(){Zt.prototype._parseSymbolData.call(this),this.symbolData&&(this.isShowTooltip=this.symbolData.isShowTooltip)},_setSymbolData:function(){Zt.prototype._setSymbolData.call(this),this.symbolData&&(this.symbolData.isShowTooltip=this.isShowTooltip)}}),$t=function(t,e,i,o){return new Qt(t,e,i,o)};L.supermap.plotting.airDeployment=$t,L.supermap.plotting.AirDeployment=Qt;var te=dt.extend({space:null,inner:null,initialize:function(t,e,i,o){dt.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,dt.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});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});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),s=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.LITERATESIGN,null,{startRouteNode:t,towardNode:e,route:this,inner:this.inner,space:this.space},o);this._addComponents(s),s._startRouteNode=t.id,s._endRouteNode=e.routeNodeId}}}),ee=function(t,e,i,o){return new te(t,e,i,o)};L.supermap.plotting.airRoute=ee,L.supermap.plotting.AirRoute=te;var ie=dt.extend({initialize:function(t,e,i,o){this.libID=0,this.code=SuperMap.Plot.SymbolType.MISSILEROUTE,this.symbolType=SuperMap.Plot.SymbolType.MISSILEROUTE,this.symbolName="导弹航线",dt.prototype.initialize.call(this,t,e,i,o)}}),oe=function(t,e,i,o){return new ie(t,e,i,o)};L.supermap.plotting.missileRoute=oe,L.supermap.plotting.MissileRoute=ie;var se=dt.extend({initialize:function(t,e,i,o){this.libID=0,this.code=SuperMap.Plot.SymbolType.NAVYROUTE,this.symbolType=SuperMap.Plot.SymbolType.NAVYROUTE,this.symbolName="海军航线",dt.prototype.initialize.call(this,t,e,i,o)}}),le=function(t,e,i,o){return new se(t,e,i,o)};L.supermap.plotting.navyRoute=le,L.supermap.plotting.NavyRoute=se;var ne=ht.extend({initialize:function(t,e,i,o){ht.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(){ht.prototype.destroy.apply(this,arguments)},_calculateParts:function(){null!==this.getLatLngs()&&this.getLatLngs().length>=this.minEditPts&&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(){}}),ae=function(t,e,i,o){return new ne(t,e,i,o)};L.supermap.plotting.interferenceBeam=ae,L.supermap.plotting.InterferenceBeam=ne;var re=ht.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=[]),ht.prototype.initialize.call(this,t,e,i,o)},_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._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),s=SuperMap.Plot.PlottingUtil.findPointInPolyLine(i,o*this.scaleValues[0]).pt.clone(),l=Math.floor(this.orbitPoints.length/2),n=new SuperMap.Geometry.Point(this.orbitPoints[l].x,this.orbitPoints[l].y),a=SuperMap.Plot.PlottingUtil.radian(n,new SuperMap.Geometry.Point(this.orbitPoints[l-1].x,this.orbitPoints[l-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(s.y,s.x)],r,p);this._addComponents(u),u.isEdit=!0,this.scalePoints=[];var h=new L.latLng(s.y,s.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,s=this.avoidRegions.length;o<s;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){ht.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 s=this.timeWindows[t];null!==s&&s.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);ht.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),s=SuperMap.Plot.PlottingUtil.clonePoints(i);if((s=SuperMap.Plot.PlottingUtil.clearSamePts(s)).length<this.minEditPts)return;var l=SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(s);l=SuperMap.Plot.PlottingUtil.clearSamePts(l);var n,a=SuperMap.Plot.PlottingUtil.polylineDistance(l),r=SuperMap.Plot.PlottingUtil.distance(l[0],o[0]);for(let t=0;t<l.length;t++)r>SuperMap.Plot.PlottingUtil.distance(l[t],o[0])&&(r=SuperMap.Plot.PlottingUtil.distance(l[t],o[0]),n=t);var p=0;0===n&&(n=1);for(let t=0;t<n;t++)p+=SuperMap.Plot.PlottingUtil.distance(l[t],l[t+1]);this.scaleValues[0]=p/a}this.redraw()}}),pe=function(t,e,i,o){return new re(t,e,i,o)};L.supermap.plotting.satellite=pe,L.supermap.plotting.Satellite=re;var ue=ht.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="卫星时间窗",ht.prototype.initialize.call(this,t,e,i,o),this.scaleValues||(this.scaleValues=[])},_calculateParts:function(){if(this.associatedUuid){var t=this.layer.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,s;if("Number"===this.timeWindows[e].type){for(let t=0,l=i.length;t<l;t++)if(this.timeWindows[e].startOrbitPoint===i[t].number&&(o=t),this.timeWindows[e].endOrbitPoint===i[t].number){s=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){s=t;break}var l=[];for(let t=o;t<=s;t++)l.push(new L.latLng(i[t].y,i[t].x));l.length>1&&(this._createAndDrawLayer(24,l,{surroundLineFlag:!1,lineWidthLimit:!0,weight:4*t.style.weight+this.style.weight}),l[0].isScalePoint=!0,l[0].tag=2*e,this.scalePoints.push(l[0]),l[l.length-1].isScalePoint=!0,l[l.length-1].tag=2*e+1,this.scalePoints.push(l[l.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.layer.getFeatureByUuid(this.associatedUuid);if(!i)return;var o=i.getLatLngs(),s=i.orbitPoints,l=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(l[0],n[0]),p=0;for(let t=0;t<o.length-a;t++)r>=SuperMap.Plot.PlottingUtil.distance(l[0],n[t])&&(r=SuperMap.Plot.PlottingUtil.distance(l[0],n[t]),p=t);for(let e=0;e<this.timeWindows.length;e++)"Number"===this.timeWindows[e].type?(this.timeWindows[t].startOrbitPoint=p+s[0].number,this.timeWindows[t].endOrbitPoint=p+a+s[0].number):"Time"===this.timeWindows[e].type&&(this.timeWindows[t].startOrbitPoint=p+s[0].time,this.timeWindows[t].endOrbitPoint=p+a+s[0].time)}else{t=(t-1)/2;var u=SuperMap.Plot.PlottingUtil.distance(l[0],n[n.length-1]);for(let t=0;t<o.length;t++)u>=SuperMap.Plot.PlottingUtil.distance(l[0],n[t])&&(u=SuperMap.Plot.PlottingUtil.distance(l[0],n[t]),p=t);for(let e=0;e<this.timeWindows.length;e++)"Number"===this.timeWindows[e].type?(this.timeWindows[t].endOrbitPoint=p+s[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+s[0].time,this.timeWindows[t].endOrbitPoint<=this.timeWindows[t].startOrbitPoint&&(this.timeWindows[t].endOrbitPoint=this.timeWindows[t].startOrbitPoint+1))}}this.redraw()}}),he=function(t,e,i,o){return new ue(t,e,i,o)};L.supermap.plotting.satelliteTimeWindows=he,L.supermap.plotting.SatelliteTimeWindows=ue;var ye=ht.extend({symbolTexts:[],addFrame:!1,getFrame:function(){return this.addFrame},setFrame:function(t){this.addFrame!==t&&(this.addFrame=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},updateSymbolText:function(t,e){this.symbolTexts.length>e&&(this.symbolTexts[e]=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},removeSymbolTextsFromDotSymbol:function(t){if(t&&"string"==typeof t){var e=this.layer.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="对象标注",ht.prototype.initialize.call(this,t,e,i,o)},_calculateParts:function(){this.latLngs=[];var t,e=[],i=this.symbolTexts;if(i.length>0){var o=this.layer.getFeatureByUuid(this.associatedUuid);if(null===o||void 0===o)return;var s=!1,l=o.geoSymbolTexts;for(let t=0,e=l.length;t<e;t++)if(this===l[t]){s=!0;break}s||l.push(this);var n={surroundLineFlag:!1,lineColorLimit:!0,fillColorLimit:!0,lineWidthLimit:!0,lineTypeLimit:!0,fontColorLimit:!0,fontSizeLimit:!0,fillLimit:!0};this._calculateSize(o);var a=o.getBounds();if(!a||!a.isValid())return;for(let t=0,s=i.length;t<s;t++){this._mergeStyleToSymbolText(i[t]);var r=i[t].textContent;if(null!==r&&0!==r.length){if(i[t].textPosition=void 0===i[t].textPosition?0:i[t].textPosition,this.addFrame)var p=SuperMap.Plot.PlottingUtil.getTextWidth(i[t].style,i[t].textContent);var u,h,y,c=L.point(0,0),S=L.point(0,0);switch(i[t].textPosition){case 0:i[t].style.labelAlign="rb",u=L.latLng(a.getNorth(),a.getWest()),(h=this._map.latLngToLayerPoint(u)).x-=i[t].offsetX,h.y-=i[t].offsetY,!0===this.addFrame&&(c.x=h.x,c.y=h.y,S.x=h.x-p,S.y=h.y-parseInt(i[t].style.fontSize));break;case 1:i[t].style.labelAlign="rt",u=L.latLng(a.getSouth(),a.getWest()),(h=this._map.latLngToLayerPoint(u)).x-=i[t].offsetX,h.y+=i[t].offsetY,!0===this.addFrame&&(c.x=h.x,c.y=h.y,S.x=h.x-p,S.y=h.y+parseInt(i[t].style.fontSize));break;case 2:i[t].style.labelAlign="lb",u=L.latLng(a.getNorth(),a.getEast()),(h=this._map.latLngToLayerPoint(u)).x+=i[t].offsetX,h.y-=i[t].offsetY,!0===this.addFrame&&(c.x=h.x,c.y=h.y,S.x=h.x+p,S.y=h.y-parseInt(i[t].style.fontSize));break;case 3:i[t].style.labelAlign="lt",u=L.latLng(a.getSouth(),a.getEast()),(h=this._map.latLngToLayerPoint(u)).x+=i[t].offsetX,h.y+=i[t].offsetY,!0===this.addFrame&&(c.x=h.x,c.y=h.y,S.x=h.x+p,S.y=h.y+parseInt(i[t].style.fontSize));break;case 4:i[t].style.labelAlign="cb",u=L.latLng(a.getNorth(),(a.getWest()+a.getEast())/2),(h=this._map.latLngToLayerPoint(u)).x+=i[t].offsetX,h.y-=i[t].offsetY,!0===this.addFrame&&(c.x=h.x-p/2,c.y=h.y,S.x=h.x+p/2,S.y=h.y-parseInt(i[t].style.fontSize));break;case 5:i[t].style.labelAlign="ct",u=L.latLng(a.getSouth(),(a.getWest()+a.getEast())/2),(h=this._map.latLngToLayerPoint(u)).x+=i[t].offsetX,h.y+=i[t].offsetY,!0===this.addFrame&&(c.x=h.x-p/2,c.y=h.y,S.x=h.x+p/2,S.y=h.y+parseInt(i[t].style.fontSize));break;case 6:i[t].style.labelAlign="rm",u=L.latLng((a.getSouth()+a.getNorth())/2,a.getWest()),(h=this._map.latLngToLayerPoint(u)).x-=i[t].offsetX,h.y+=i[t].offsetY,!0===this.addFrame&&(c.x=h.x,c.y=h.y+parseInt(i[t].style.fontSize)/2,S.x=h.x-p,S.y=h.y-parseInt(i[t].style.fontSize)/2);break;case 7:i[t].style.labelAlign="lm",u=L.latLng((a.getSouth()+a.getNorth())/2,a.getEast()),(h=this._map.latLngToLayerPoint(u)).x+=i[t].offsetX,h.y+=i[t].offsetY,!0===this.addFrame&&(c.x=h.x,c.y=h.y+parseInt(i[t].style.fontSize)/2,S.x=h.x+p,S.y=h.y-parseInt(i[t].style.fontSize)/2)}var P=this._map.layerPointToLatLng(h),g=SuperMap.Util.copyAttributes(n,this.symbolTexts[t].style);if(this.addFrame){var d=this._map.layerPointToLatLng(c),f=this._map.layerPointToLatLng(S),m={};m.positionPoints=[d,f],m.style=SuperMap.Util.cloneObject(g),m.type=SuperMap.Plot.SymbolType.RECTANGLESYMBOL,e.push(m);var M=null;M=1===o.symbolType?o.latLngs[0]:a.getCenter();var b={};b.positionPoints=[P,M],b.style=SuperMap.Util.cloneObject(g),b.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,e.push(b),y=L.latLng((f.lat-d.lat)/2+d.lat,(d.lng-f.lng)/2+f.lng)}else y=P;var T={};T.positionPoints=y,T.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,T.style=SuperMap.Util.cloneObject(g),T.textContent=i[t].textContent,this.addFrame&&(T.style.labelAlign="cm"),e.push(T),this.latLngs.push(P)}}}for(var v=0;v<e.length;v++)t=L.Util.isArray(e[v].positionPoints)?e[v].positionPoints:[e[v].positionPoints],this._createAndDrawLayer(e[v].type,t,e[v].style,e[v].textContent)},destroy:function(){this.frame=!1,this.symbolTexts=null,ht.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)t.style.hasOwnProperty(e)||(t.style[e]=this.style[e])},_calculateSize:function(t){this.scaleByMap=t.scaleByMap,!1===this.scaleByMap?this.fromZoom=this._map.getZoom():this.fromZoom<=this._map.getZoom()&&(this.dScale=t.dScale)},_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),s=this.layer.getFeatureByUuid(this.associatedUuid);if(null===s||void 0===s)return;var l,n,a=s.getBounds();0===i?(l=L.latLng(a.getNorth(),a.getWest()),n=this._map.latLngToLayerPoint(l),this.symbolTexts[t].offsetX=n.x-o.x,this.symbolTexts[t].offsetY=n.y-o.y):1===i?(l=L.latLng(a.getSouth(),a.getWest()),n=this._map.latLngToLayerPoint(l),this.symbolTexts[t].offsetX=n.x-o.x,this.symbolTexts[t].offsetY=o.y-n.y):2===i?(l=L.latLng(a.getNorth(),a.getEast()),n=this._map.latLngToLayerPoint(l),this.symbolTexts[t].offsetX=o.x-n.x,this.symbolTexts[t].offsetY=n.y-o.y):3===i?(l=L.latLng(a.getSouth(),a.getEast()),n=this._map.latLngToLayerPoint(l),this.symbolTexts[t].offsetX=o.x-n.x,this.symbolTexts[t].offsetY=o.y-n.y):4===i?(l=L.latLng(a.getNorth(),(a.getWest()+a.getEast())/2),n=this._map.latLngToLayerPoint(l),this.symbolTexts[t].offsetX=o.x-n.x,this.symbolTexts[t].offsetY=n.y-o.y):5===i?(l=L.latLng(a.getSouth(),(a.getWest()+a.getEast())/2),n=this._map.latLngToLayerPoint(l),this.symbolTexts[t].offsetX=o.x-n.x,this.symbolTexts[t].offsetY=o.y-n.y):6===i?(l=L.latLng((a.getNorth()+a.getSouth())/2,a.getWest()),n=this._map.latLngToLayerPoint(l),this.symbolTexts[t].offsetX=n.x-o.x,this.symbolTexts[t].offsetY=o.y-n.y):7===i&&(l=L.latLng((a.getNorth()+a.getSouth())/2,a.getEast()),n=this._map.latLngToLayerPoint(l),this.symbolTexts[t].offsetX=o.x-n.x,this.symbolTexts[t].offsetY=o.y-n.y)}},_reView:function(){this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},move:function(){},_parseSymbolData:function(){if(ht.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(){ht.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 s in this.components)delete t.labelAlign,SuperMap.Util.copyAttributes(this.components[s].options,t),this._copyStyleForCell(this.components[s].options,this.style,this.components[s]),this.components[s].setStyle(this.components[s].options)}}}),ce=function(t,e,i,o){return new ye(t,e,i,o)};L.supermap.plotting.symbolText=ce,L.supermap.plotting.SymbolText=ye;var Se=ht.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),ht.prototype.initialize.call(this,t,e,i,o)},destroy:function(){this.space=null,this.offsetX=null,this.offsetY=null,ht.prototype.destroy.call(this)},removeSymbolTextsFromDotSymbol:function(t){if(t&&"string"==typeof t){var e=this.layer.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(){this.latLngs=[];var t=[],e=this.layer.getFeatureByUuid(this.associatedUuid);if(null!==e){var i=!1;for(let t=0;t<e.geoSymbolTexts.length;t++)if(this===e.geoSymbolTexts[t]){i=!0;break}i||e.geoSymbolTexts.push(this),this._calculateSize(e);var o=e.latLngs[0],s=this._map.latLngToLayerPoint(o),l=new SuperMap.Pixel(s.x+this.offsetX,s.y+this.offsetY),n=this._map.layerPointToLatLng(l);0===this.latLngs.length?this.latLngs.push(n):(this.latLngs[0].lng=n.lng,this.latLngs[0].lat=n.lat);var a=L.Util.cloneLatLngs(this.latLngs[0]);a.push(o);var r={style:{surroundLineFlag:!1}};r.style=SuperMap.Util.copyAttributes(r.style,this.style),r.positionPoints=a,r.type=24,t.push(r),SuperMap.Util.isArray(this.textContent)||(this.textContent=[this.textContent]);var p=this.textContent.length,u=this.style.fontSize*p+p+1,h=this._map.latLngToLayerPoint(L.latLng(this.latLngs[0].lat,this.latLngs[0].lng)),y=L.point(h.x,h.y-u/2),c=L.point(h.x,h.y+u/2),S=[this._map.layerPointToLatLng(y),this._map.layerPointToLatLng(c)],P={};P.positionPoints=S,P.style={surroundLineFlag:!1},P.style=SuperMap.Util.copyAttributes(P.style,this.style),P.type=24,t.push(P);var g,d=new SuperMap.Geometry.Point(this.latLngs[0].lng,this.latLngs[0].lat);if(0!==this.textContent.length){var f=e.getBounds(),m=new SuperMap.Geometry.Point((f.getWest()+f.getEast())/2,f.getNorth()),M=new SuperMap.Geometry.Point((f.getWest()+f.getEast())/2,f.getSouth()),b=SuperMap.Plot.PlottingUtil.pointIsRightToLine(m,M,d),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===b?L.point(h.x-this.space,h.y):L.point(h.x+this.space,h.y);var A={},x=this._map.layerPointToLatLng(v);A.positionPoints=x,A.type=34,A.textContent=T,A.style={},A.style=SuperMap.Util.copyAttributes(A.style,this.style),A.style.labelAlign=!0===b?"rm":"lm",t.push(A)}for(let e=0;e<t.length;e++)g=L.Util.isArray(t[e].positionPoints)?t[e].positionPoints:[t[e].positionPoints],this._createAndDrawLayer(t[e].type,g,t[e].style,t[e].textContent)}},_calculateSize:function(t){this.scaleByMap=t.scaleByMap,!1===this.scaleByMap?this.fromZoom=this._map.getZoom():this.fromZoom<=this._map.getZoom()&&(this.dScale=t.dScale),void 0!==this.prevOffsetX&&this.prevOffsetX!==this.offsetX&&(this.scaleBeforeOffsetX=this.offsetX/this.dScale,this.prevOffsetX=this.offsetX),!0===this.scaleByMap&&(void 0===this.scaleBeforeOffsetX&&(this.scaleBeforeOffsetX=this.offsetX),this.offsetX=this.scaleBeforeOffsetX*this.dScale,this.prevOffsetX=this.offsetX),void 0!==this.prevOffsetY&&this.prevOffsetY!==this.offsetY&&(this.scaleBeforeOffsetY=this.offsetY/this.dScale,this.prevOffsetY=this.offsetY),!0===this.scaleByMap&&(void 0===this.scaleBeforeOffsetY&&(this.scaleBeforeOffsetY=this.offsetY),this.offsetY=this.scaleBeforeOffsetY*this.dScale,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=this.style.strokeWidth:this.style.weight=this.weight,this.prevStrokeWidth=this.style.weight),void 0!==this.prevFontSize&&this.prevFontSize!==this.style.fontSize&&(this.fontSize=this.style.fontSize/this.dScale,this.prevFontSize=this.style.fontSize),!0===this.scaleByMap&&(void 0===this.fontSize&&(this.fontSize=this.style.fontSize),this.style.fontSize=this.fontSize*this.dScale,this.prevFontSize=this.style.fontSize)},_reView:function(){this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},_modifyPoint:function(){var t=this.layer.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));this.offsetX=i.x-e.x,this.offsetY=i.y-e.y,this.redraw()}},_parseSymbolData:function(){ht.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(){ht.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))}}),Pe=function(t,e,i,o){return new Se(t,e,i,o)};L.supermap.plotting.symbolText1=Pe,L.supermap.plotting.SymbolText1=Se;var ge=L.Evented.extend({serverUrl:null,goAnimations:null,map:null,goAnimationLayer:null,initialize:function(t,e){null===this.goAnimations&&(this.goAnimations=[]),t&&null!==t&&null===this.map&&this.setMap(t),e&&null===this.serverUrl&&(ge.prototype.serverUrl=e)},destroy:function(){ge.prototype.goAnimations=null,ge.prototype.map.removeLayer(this.goAnimationLayer),this.goAnimationLayer.destroy(),ge.prototype.goAnimationLayer=null,ge.prototype.map=null,ge.prototype.serverUrl=null},setMap:function(t){if(null===t)return!1;ge.prototype.map=t;null===this.goAnimationLayer&&(ge.prototype.goAnimationLayer=L.supermap.plotting.animationLayer("animation",{displayInLayerSwitcher:!1})),this.map.addLayer(this.goAnimationLayer)},createGOAnimation:function(t,e,i){var o,s=this.createGOAnimationByType(t,e);if(null===s)return null;if(i._eventParents)for(var l in i._eventParents)o=i._eventParents[l];return i instanceof L.supermap.plotting.Route||o instanceof L.supermap.plotting.Route?null:s.setGOFeature(i)?(this.goAnimations.push(s),s):null},findGOAnimationByName:function(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:function(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:function(t){if(null===this.goAnimations||"undefined"===t||null===t)return[];var e=this.map.getFeatureByUuid(t);return this.findGOAnimationsByFeature(e)},removeGOAnimationByName:function(t){if(null===this.goAnimations||null===t||""===t)return!1;var e=this.findGOAnimationByName(t);return this.removeGOAnimation(e)},removeGOAnimation:function(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(),this.goAnimations.splice(e,1),t.destroy();break}return!0},removeAllGOAnimation:function(){if(null!==this.goAnimations){for(var t=0;t<this.goAnimations.length;t++)this.removeGOAnimation(this.goAnimations[t]);this.goAnimations=[]}},execute:function(){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:function(){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:function(t){if(!(t.grow&&t instanceof yt))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).getSymbolInfo(e,function(e){t.symbolData.innerCells=e.result.innerCells,t.redraw()},this)},play:function(){if(0!==this.goAnimations.length)for(var t=0;t<this.goAnimations.length;t++)this.goAnimations[t].play()},stop:function(){if(0!==this.goAnimations.length)for(var t=0;t<this.goAnimations.length;t++)this.goAnimations[t].stop()},pause:function(){if(0!==this.goAnimations.length)for(var t=0;t<this.goAnimations.length;t++)this.goAnimations[t].pause()},reset:function(){if(0!==this.goAnimations.length)for(var t=0;t<this.goAnimations.length;t++)this.goAnimations[t].reset()},createGOAnimationByType:function(t,e){if(null===e||""===e||null===this.goAnimationLayer)return null;if(null!==this.findGOAnimationByName(e))return null;var i=null;switch(t){case SuperMap.Plot.GOAnimationType.ANIMATION_WAY:i=new Ut;break;case SuperMap.Plot.GOAnimationType.ANIMATION_BLINK:i=new It;break;case SuperMap.Plot.GOAnimationType.ANIMATION_ATTRIBUTE:i=new wt;break;case SuperMap.Plot.GOAnimationType.ANIMATION_SHOW:i=new Nt;break;case SuperMap.Plot.GOAnimationType.ANIMATION_ROTATE:i=new Et;break;case SuperMap.Plot.GOAnimationType.ANIMATION_SCALE:i=new Ct;break;case SuperMap.Plot.GOAnimationType.ANIMATION_GROW:i=new Dt;break;default:return null}return null!==i&&(i.name=e),i},getJSONData:function(){for(var t={animations:[]},e=0;e<this.goAnimations.length;e++)t.animations.push(this.goAnimations[e].getJSONData());return t},fromJSONData:function(t){for(var e=0;e<t.animations.length;e++){var i=t.animations[e],o=i.goFeatureUuid,s=this.map.getFeatureByUuid(o),l=i.name,n=i.type;if(s&&l&&-1!==n){var a=this.createGOAnimation(n,l,s);null!==a&&a.fromJSONData(i)}}},saveEvoFile:function(){},openEvoFileOnServer:function(){}}),de=function(t,e,i){return new ge(t,e,i)};L.supermap.plotting.goAnimationManager=de;var fe=L.Evented.extend({map:null,serverUrl:null,smlInfo:null,smlFileName:null,initialize:function(t,e,i){i&&SuperMap.Util.extend(this,i),t&&null!==t&&null===this.map&&(fe.prototype.map=t),e&&null===this.serverUrl&&(fe.prototype.serverUrl=e),null===this.smlInfo&&(fe.prototype.smlInfo=new SuperMap.Plot.SMLInfoStruct),null===this.smlFileName&&(fe.prototype.smlFileName="situationMap")},destroy:function(){fe.prototype.map=null,fe.prototype.smlInfo.destroy(),fe.prototype.smlInfo=null,fe.prototype.smlFileName=null,fe.prototype.serverUrl=null},getSitDataLayers:function(){return this.map.getPlottingLayers()},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 s=0,l=o.length;s<l;s++)(i=o[s].useCanvas||o[s].useCanvas2?L.supermap.plotting.plottingLayer(o[s].layerName,this.serverUrl,{renderer:L.canvas()}):L.supermap.plotting.plottingLayer(o[s].layerName,this.serverUrl,{renderer:L.svg()})).spatialAnalystUrl=o[s].spatialAnalystUrl,this.map.addLayer(i),this._load(o[s],i),void 0!==o[s].isEditable&&null!==o[s].isEditable&&i.setEditable(o[s].isEditable),void 0!==o[s].isLocked&&null!==o[s].isLocked&&i.setLocked(o[s].isLocked),void 0!==o[s].visibility&&null!==o[s].visibility&&i.setVisibility(o[s].visibility)},addSmlData:function(t,e){this.smlInfo.fromJSON(t.smlInfo);for(var i=t.layerDatas,o=null,s=!1,l=0;l<i.length;l++)if(null!==i[l].layerName){var n=this.map.getLayersByName(i[l].layerName);if(0!==n.length?o=n[0]:e&&((o=L.supermap.plotting.plottingLayer(i[l].layerName,this.serverUrl)).spatialAnalystUrl=i[l].spatialAnalystUrl,this.map.addLayer(o)),t.mapInfo&&o&&!s){var a=new SuperMap.Plot.MapInfoStruct;a.fromJSON(t.mapInfo),null!==a.zoom&&null!==a.centerX&&null!==a.centerY&&this.map.setView(L.latLng(a.centerY,a.centerX),a.zoom,{reset:!0}),s=!0}null!==o&&this._load(i[l],o)}},addSmlDataToLayer:function(t,e){this.smlInfo.fromJSON(t.smlInfo);var i=t.layerDatas,o=null,s=this.map.getLayersByName(e);if(0!==s.length?o=s[0]:(o=L.supermap.plotting.plottingLayer(e,this.serverUrl),this.map.addLayer(o)),t.mapInfo&&o){var l=new SuperMap.Plot.MapInfoStruct;l.fromJSON(t.mapInfo),null!==l.zoom&&null!==l.centerX&&null!==l.centerY&&this.map.setView(L.latLng(l.centerY,l.centerX),l.zoom,{reset:!0})}for(var n=0;n<i.length;n++)this._load(i[n],o)},openSmlFile:function(t,e){var i=this.serverUrl+"smlInfos/",o=document.getElementById(t).value.split("\\"),s=o[o.length-1];i+=s;var l=this;""!==s&&$.ajaxFileUpload({url:i,secureuri:!1,fileElementId:t,dataType:"json",timeout:36e5,success:function(){l.openSmlFileOnServer(s,e)},error:function(){e({success:!1,message:"打开本地态势图文件失败"})}})},addSmlFile:function(t,e,i){var o=this.serverUrl+"smlInfos/",s=document.getElementById(t).value.split("\\"),l=s[s.length-1];o+=l;var n=this;""!==l&&$.ajaxFileUpload({url:o,secureuri:!1,fileElementId:t,dataType:"json",timeout:36e5,success:function(){n.addSmlFileOnServer(l,e,i)},error:function(){i({success:!1,message:"叠加本地态势图文件失败"})}})},uploadSmlFile:function(t,e){var i=this.serverUrl+"smlInfos/",o=document.getElementById(t).value.split("\\"),s=o[o.length-1];i+=s,""!==s&&$.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/",s=document.getElementById(t).value.split("\\"),l=s[s.length-1];o+=l;var n=this;""!==l&&$.ajaxFileUpload({url:o,secureuri:!1,fileElementId:t,dataType:"json",timeout:36e5,success:function(){n.addSmlFileToLayerOnServer(l,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).editSMLFile(o,function(t){if(t.result.succeed){var o=t.result;this.smlInfo.fromJSON(o.smlInfo);for(var s=o.layerDatas,l=null,n=!1,a=0;a<s.length;a++){var r=[];if(s[a].layerName&&(r=this.map.getLayersByName(s[a].layerName)),0!==r.length?l=r[0]:e&&((l=L.supermap.plotting.plottingLayer(s[a].layerName,this.serverUrl)).spatialAnalystUrl=s[a].spatialAnalystUrl,this.map.addLayer(l)),o.mapInfo&&l&&!n){var p=new SuperMap.Plot.MapInfoStruct;p.fromJSON(o.mapInfo),null!==p.zoom&&null!==p.centerX&&null!==p.centerY&&this.map.setView(L.latLng(p.centerY,p.centerX),p.zoom,{reset:!0}),n=!0}null!==l&&this._load(s[a],l)}null!==l&&"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).editSMLFile(o,function(t){if(t.result.succeed){var o=t.result;this.smlInfo.fromJSON(o.smlInfo);var s=o.layerDatas,l=null,n=this.map.getLayersByName(e);if(0!==n.length?l=n[0]:(l=L.supermap.plotting.plottingLayer(e,this.serverUrl),this.map.addLayer(l)),o.mapInfo&&l){var a=new SuperMap.Plot.MapInfoStruct;a.fromJSON(o.mapInfo),null!==a.zoom&&null!==a.centerX&&null!==a.centerY&&this.map.setView(L.latLng(a.centerY,a.centerX),a.zoom,{reset:!0})}for(var r=0;r<s.length;r++)this._load(s[r],l);"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).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,s=e,l=new SuperMap.GetSMLInfosParameters;l.start=o,l.count=s,L.supermap.smlFileService(this.serverUrl).getSMLInfos(l,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,s=t.layerDatas;this.map.clearPlottingLayers();for(var l=0,n=s.length;l<n;l++)(o=s[l].useCanvas||s[l].useCanvas2?L.supermap.plotting.plottingLayer(s[l].layerName,this.serverUrl,{renderer:L.canvas()}):L.supermap.plotting.plottingLayer(s[l].layerName,this.serverUrl,{renderer:L.svg()})).spatialAnalystUrl=s[l].spatialAnalystUrl,this.map.addLayer(o),this._load(s[l],o),void 0!==s[l].isEditable&&null!==s[l].isEditable&&o.setEditable(s[l].isEditable),void 0!==s[l].isLocked&&null!==s[l].isLocked&&o.setLocked(s[l].isLocked),void 0!==s[l].visibility&&null!==s[l].visibility&&o.setVisibility(s[l].visibility)},openSmlFileOnServer:function(t,e){var i=new SuperMap.EditSmlFileParameters;i.method="GET",i.smlFileName=t,L.supermap.smlFileService(this.serverUrl).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).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 s=new SuperMap.Plot.SitDataStruct;s.smlInfo=this.smlInfo;var l=new SuperMap.Plot.MapInfoStruct;l.zoom=this.map.getZoom(),l.centerX=this.map.getCenter().lng,l.centerY=this.map.getCenter().lat,s.mapInfo=l,s.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.isEditable=e[n].getEditable(),r.isLocked=e[n].getLocked(),r.visibility=e[n].getVisibility(),r.features=a,s.layerDatas.push(r)}var p=new SuperMap.EditSmlFileParameters;p.method="POST",p.sitData=s,p.smlFileName=t,p.isCover=i,L.supermap.smlFileService(this.serverUrl).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 s=t.features[i];if(null!==s){var l;s.resolution?l=this.map.getZoom():s.fromZoom&&(l=s.fromZoom),!1===s.scaleByMap&&(l=this.map.getZoom()),s.hasOwnProperty("isEdit")||(s.isEdit=!0);let t=s.uuid;e.createSymbol(s.libID,s.code,void 0,t,{},{serverUrl:this.serverUrl,symbolData:s,fromZoom:l,map:this.map})}}}}),me=function(t,e,i){return new fe(t,e,i)};L.supermap.plotting.sitDataManager=me;var Le=L.Evented.extend({url:null,libID:null,symbolLibData:null,cachedSymbolList:null,needCacheList:null,symbolNames:null,initialize:function(t){this.cachedSymbolList={},this.needCacheList=[],t&&SuperMap.Util.extend(this,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).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){for(var t=this.needCacheList.slice(),e=0,i=t.length;e<i;e++){var o=Math.floor(1e3*Math.random()),s=new SuperMap.GetSymbolInfoParameters;s.libID=this.libID,s.code=t[e],s.dynamicToken=o,L.supermap.symbolInfoService(this.url).getSymbolInfo(s,function(t){if(t.result.succeed){if(t.result.dynamicToken&&t.result.dynamicToken===SuperMap.MD5.md5(o.toString()))delete t.result.dynamicToken,this.cacheSymbolData(t.result);else{var e=SuperMap.Util.indexOf(this.needCacheList,t.result.code);-1!==e&&this.needCacheList.splice(e,1)}0===this.needCacheList.length&&this.fire(SuperMap.Plot.Event.cachecompleted,{success:!0})}},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 this.cachedSymbolList.hasOwnProperty(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 s=0;s<e.childNodes.length;s++)for(var l=i+"/"+e.symbolName,n=this.querySymbol(t,e.childNodes[s],l),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}}),Me=function(t){return new Le(t)};L.supermap.plotting.symbolLib=Me;var be=L.Evented.extend({url:null,libIDs:null,symbolLibs:null,symbolLibJsons:null,isInializeOK:!1,initialize:function(t,e){be.prototype.url=t,null===this.libIDs&&(be.prototype.libIDs=[]),null===this.symbolLibs&&(be.prototype.symbolLibs=[]),null===this.symbolLibJsons&&(be.prototype.symbolLibJsons=[]),e&&SuperMap.Util.extend(this,e)},destroy:function(){be.prototype.url=null,be.prototype.libIDs=null,be.prototype.symbolLibs=null,be.prototype.symbolLibJsons=null,be.prototype.isInializeOK=!1,be.prototype.isInitialize=!1},initializeAsync:function(){this.isInitializeOK()?this.fire(SuperMap.Plot.Event.initializecompleted,{success:!0,libIDs:this.libIDs}):this.isInitialize||(be.prototype.isInitialize=!0,L.supermap.symbolLibService(this.url).getLibIDs(function(t){if(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(be.prototype.libIDs[e]===t.result[o]){i=!0;break}!1===i&&be.prototype.libIDs.slice(e,1)}else be.prototype.libIDs=t.result;this.initializeSymbolLib()}else be.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).getLibInfo(o,function(e){if(e.result.succeed){var i=SuperMap.Util.indexOf(t,e.result.libID);-1!==i&&(t.splice(i,1),be.prototype.symbolLibJsons.push(e.result),be.prototype.symbolLibs.push(new Le({symbolLibData:e.result})),this.symbolLibs[this.symbolLibs.length-1].url=this.url),0===t.length&&(be.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 Le({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),s=0;s<o.length;s++)e.push(o[s]);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()),s=0;s<o.length;s++)e.push(o[s]);return e}}),Te=function(t,e){return new be(t,e)};L.supermap.plotting.symbolLibManager=Te;var ve=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,s=i.length;o<s;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 l=0;l<i.length;l++){let t=this.map.getLayer(i[l].layerId);var n=null;if(n=t?t.getFeatureByUuid(i[l].uuid):L.supermap.plotting.getControl(this.map).getFeatureByUuid(i[l].uuid),null!==t||null!==n){var a=i[l].redoParams;if(e&&(a=i[l].undoParams),"setFontAlign"===i[l].functionName)a.length>0&&n.setFontAlign(a[0]);else if("setLatLngs"===i[l].functionName)a.length>0&&n.setLatLngs(a[0]);else if("modifyPoint"===i[l].functionName)a.length>0&&n._modifyPoint(a[0],a[1]);else if("setTextContent"===i[l].functionName)a.length>0&&n.setTextContent(a[0]);else if("setRadiusText"===i[l].functionName)2===a.length&&n.setRadiusText(a[0],a[1]);else if("setType"===i[l].functionName&&n instanceof L.supermap.plotting.RouteNode)a.length>0&&n.setType(a[0]);else if("setStrokeColor"===i[l].functionName&&n.geometry instanceof SuperMap.Geometry.GroupObject)a.length>0&&n.setStyle(a[0]);else if("addAvoidRegion"===i[l].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[l].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[l].functionName||"createFlags"===i[l].functionName){var r=null;e?t&&i[l].undoParams.length>0&&(r=t.unGroupObject(i[l].undoParams[0])):"createGroupObject"===i[l].functionName?r=t.createGroupObject(i[l].redoParams[0]):"createFlags"===i[l].functionName&&(r=t.createFlags(i[l].redoParams[0])),null!==r&&t._map.getPlotEditControl().selectFeatures(r)}else"updateSymbolText"===i[l].functionName?a.length>0&&n.updateSymbolText(a[0],a[1]):i[l].functionName&&null!==a&&n[i[l].functionName](a[0],a[1]);if(i[l].propertyName){var p=i[l].undoValue;e||(p=i[l].redoValue),n.hasOwnProperty(i[l].propertyName)?n[i[l].propertyName]=p:null!==n&&(n.style[i[l].propertyName]=p)}n&&n.layer&&(n.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL||8!==n.textPosition||"fontColor"!==i[l].propertyName&&"fontFamily"!==i[l].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 ve(t)};var Ae=null,xe=L.Evented.extend({serverUrl:null,map:null,defaultStyle:null,sitDataManager:null,symbolLibManager:null,clientID:null,dpi:96,animationManager:null,transManager:null,initialize:function(t,e){t&&null!==t&&(xe.prototype.map=t),e&&(xe.prototype.serverUrl=e),this.defaultStyle=new SuperMap.Plot.DefaultStyle,this.sitDataManager=new fe(this.map,this.serverUrl),this.symbolLibManager=new be(this.serverUrl),this.animationManager=new ge(this.map,this.serverUrl),this.transManager=new ve(this.map)},destroy:function(){xe.prototype.serverUrl=null,xe.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),Ae=null},getDefaultStyle:function(){return this.defaultStyle},getSitDataManager:function(){return this.sitDataManager},getSymbolLibManager:function(){return this.symbolLibManager},getGOAnimationManager:function(){return this.animationManager},getClientID:function(){return this.clientID},setClientID:function(t){this.clientID=t},getDPI:function(){return this.dpi},setDPI:function(t){this.dpi=t},getTransManager:function(){return this.transManager},setMap:function(t){xe.prototype.map=t,null===this.sitDataManager.map&&(fe.prototype.map=t),null===this.animationManager.map&&this.animationManager.setMap(t)},setPlotUrl:function(t){xe.prototype.serverUrl=t,null===this.sitDataManager.serverUrl&&(fe.prototype.serverUrl=t),null===this.symbolLibManager.url&&(be.prototype.url=t),null===this.animationManager.serverUrl&&(ge.prototype.serverUrl=t)},getFeatureByUuid:function(t){if(null!==this.map){for(var e=this.map.getPlottingLayers(),i=0,o=e.length;i<o;i++){var s=e[i].getFeatureByUuid(t);if(null!==s)return s}return null}return null}});L.supermap.plotting.getControl=function(t,e){return null===Ae&&(Ae=new xe(t,e)),t&&null!==t&&null===Ae.map&&Ae.setMap(t),e&&null!==e&&null===Ae.serverUrl&&Ae.setPlotUrl(e),Ae};var _e=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 s=i[o];for(var l in s.features){var n=s.features[l];n instanceof nt&&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 s=i[o];for(var l in s.features){var n=s.features[l];if(n instanceof nt){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,s=0;s<o;s++){var l=t[s],n=t[(s+1)%o];if(l.lat!==n.lat){var a=l.lat<n.lat?l.lat:n.lat,r=l.lat>n.lat?l.lat:n.lat;if(!(e.lat<a||e.lat>r))(e.lat-l.lat)*(n.lng-l.lng)/(n.lat-l.lat)+l.lng>e.lng&&i++}}return i%2==1},getGObjectsInCircle:function(t,e){if(t&&e){for(var i=[],o=this.map.getPlottingLayers(),s=0;s<o.length;s++){var l=o[s];for(var n in l.features){var a=l.features[n];if(a instanceof nt){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(),s=0;s<o.length;s++){var l=o[s];for(var n in l.features){var a=l.features[n];if(a instanceof nt){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}}}),Oe=function(t){return new _e(t)};L.supermap.plotting.query=Oe;var we=L.supermap.ServiceBase.extend({initialize:function(t,e){L.supermap.ServiceBase.prototype.initialize.call(this,t,e)},getSMLInfos:function(t,e,i){return i||(i=this),new x(this.url,{eventListeners:{scope:i,processCompleted:e,processFailed:e}}).processAsync(t),this},editSMLFile:function(t,e,i){return i||(i=this),new M(this.url,{eventListeners:{scope:i,processCompleted:e,processFailed:e}}).processAsync(t),this}}),Ie=function(t,e){return new we(t,e)};L.supermap.smlFileService=Ie;var De=L.supermap.ServiceBase.extend({initialize:function(t,e){L.supermap.ServiceBase.prototype.initialize.call(this,t,e)},getSymbolInfo:function(t,e,i){return i||(i=this),new O(this.url,{serverType:this.options.serverType,eventListeners:{scope:i,processCompleted:e,processFailed:e}}).processAsync(t),this}}),Ee=function(t,e){return new De(t,e)};L.supermap.symbolInfoService=Ee;var Ce=L.supermap.ServiceBase.extend({initialize:function(t,e){L.supermap.ServiceBase.prototype.initialize.call(this,t,e)},getLibIDs:function(t,e){return e||(e=this),new b(this.url,{eventListeners:{scope:e,processCompleted:t,processFailed:t}}).processAsync(),this},getLibInfo:function(t,e,i){return i||(i=this),new v(this.url,{eventListeners:{scope:i,processCompleted:e,processFailed:e}}).processAsync(t),this}}),Ne=function(t,e){return new Ce(t,e)};L.supermap.symbolLibService=Ne;var Ue=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},Re=function(t){var e=[];L.Util.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++)e.push(L.latLng(t[i].y,t[i].x));return e},Be=function(t){var e=[];L.Util.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++)e.push(t[i].clone());return e},Ge=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)},Fe=function(t,e,i){L.Util.isArray(t)||(t=[t]);for(var o=i*(Math.PI/180),s=Math.cos(o),l=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*l+a*s+e.lat,t[n].lng=r*s-a*l+e.lng}},ke=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.latLngsToSuperMapPoints=Ue,L.Util.superMapPointsToLatLngs=Re,L.Util.cloneLatLngs=Be,L.Util.moveLatLngs=Ge,L.Util.rotateLatLngs=Fe,L.Util.resizeLatLngs=ke,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}},i.d(e,"Plot",function(){return s}),i.d(e,"SymbolType",function(){return l}),i.d(e,"LineRelationType",function(){return n}),i.d(e,"AlgoSurroundLineType",function(){return a}),i.d(e,"RouteNodeType",function(){return r}),i.d(e,"RelLineText",function(){return p}),i.d(e,"RadiusLineType",function(){return u}),i.d(e,"AnnoPosition",function(){return h}),i.d(e,"ArrowLineType",function(){return y}),i.d(e,"TextBoxType",function(){return c}),i.d(e,"PositionOffsetType",function(){return S}),i.d(e,"AlignType",function(){return P}),i.d(e,"EditMode",function(){return g}),i.d(e,"GOAnimationType",function(){return f}),i.d(e,"EditSmlFileParameters",function(){return m}),i.d(e,"GetLibInfoParameter",function(){return T}),i.d(e,"GetSMLInfosParameters",function(){return A}),i.d(e,"GetSymbolInfoParameters",function(){return _}),i.d(e,"DefaultStyle",function(){return w}),i.d(e,"ExtendProperty",function(){return I}),i.d(e,"LayerDataStruct",function(){return D}),i.d(e,"MapInfoStruct",function(){return E}),i.d(e,"OrbitPoint",function(){return C}),i.d(e,"Property",function(){return N}),i.d(e,"RouteNode",function(){return U}),i.d(e,"SitDataStruct",function(){return R}),i.d(e,"SMLInfoStruct",function(){return B}),i.d(e,"SubSymbol",function(){return G}),i.d(e,"SymbolText",function(){return F}),i.d(e,"TimeWindowParameter",function(){return k}),i.d(e,"TowardNode",function(){return z}),i.d(e,"Event",function(){return d}),i.d(e,"CalculateCanvasGradient",function(){return Y}),i.d(e,"CalculateSVGGradient",function(){return V}),i.d(e,"AnalysisSymbol",function(){return W}),i.d(e,"RouteNodePrimitives",function(){return X}),i.d(e,"PlottingUtil",function(){return j}),i.d(e,"Primitives",function(){return H}),i.d(e,"AddPoint_WayType",function(){return J}),i.d(e,"BasicAlgoSymbolFactory",function(){return q}),i.d(e,"AlgoSymbolFactory",function(){return Z}),i.d(e,"md5",function(){return K}),i.d(e,"PlottingLayer",function(){return Tt}),i.d(e,"plottingLayer",function(){return vt}),i.d(e,"PlottingGraphicLayer",function(){return xt}),i.d(e,"plottingGraphicLayer",function(){return _t}),i.d(e,"GOAnimation",function(){return Ot}),i.d(e,"GOAnimationAttribute",function(){return wt}),i.d(e,"GOAnimationBlink",function(){return It}),i.d(e,"GOAnimationGrow",function(){return Dt}),i.d(e,"GOAnimationRotate",function(){return Et}),i.d(e,"GOAnimationScale",function(){return Ct}),i.d(e,"GOAnimationShow",function(){return Nt}),i.d(e,"GOAnimationWay",function(){return Ut}),i.d(e,"PlotControl",function(){return Rt}),i.d(e,"AvoidRegionControl",function(){return bt}),i.d(e,"DrawGraphicObject",function(){return Bt}),i.d(e,"PlotDrawControl",function(){return Gt}),i.d(e,"drawControl",function(){return Ft}),i.d(e,"PlotEditControl",function(){return kt}),i.d(e,"editControl",function(){return zt}),i.d(e,"PlottingObject",function(){return nt}),i.d(e,"GraphicObject",function(){return ht}),i.d(e,"AlgoSymbol",function(){return yt}),i.d(e,"algoSymbol",function(){return ct}),i.d(e,"DotSymbol",function(){return jt}),i.d(e,"dotSymbol",function(){return Ht}),i.d(e,"ArcRegion",function(){return Jt}),i.d(e,"arcRegion",function(){return qt}),i.d(e,"GroupObject",function(){return at}),i.d(e,"groupObject",function(){return rt}),i.d(e,"FlagGroup",function(){return Lt}),i.d(e,"flagGroup",function(){return Mt}),i.d(e,"NavyDeployment",function(){return Zt}),i.d(e,"navyDeployment",function(){return Kt}),i.d(e,"AirDeployment",function(){return Qt}),i.d(e,"airDeployment",function(){return $t}),i.d(e,"AvoidRegion",function(){return pt}),i.d(e,"avoidRegion",function(){return ut}),i.d(e,"AirRoute",function(){return te}),i.d(e,"airRoute",function(){return ee}),i.d(e,"MissileRoute",function(){return ie}),i.d(e,"missileRoute",function(){return oe}),i.d(e,"NavyRoute",function(){return se}),i.d(e,"navyRoute",function(){return le}),i.d(e,"InterferenceBeam",function(){return ne}),i.d(e,"interferenceBeam",function(){return ae}),i.d(e,"LineRelation",function(){return Vt}),i.d(e,"lineRelation",function(){return Wt}),i.d(e,"Satellite",function(){return re}),i.d(e,"satellite",function(){return pe}),i.d(e,"SatelliteTimeWindows",function(){return ue}),i.d(e,"satelliteTimeWindows",function(){return he}),i.d(e,"GeoSymbolText",function(){return ye}),i.d(e,"geoSymbolText",function(){return ce}),i.d(e,"GeoSymbolText1",function(){return Se}),i.d(e,"geoSymbolText1",function(){return Pe}),i.d(e,"Plotting",function(){return xe}),i.d(e,"GOAnimationManager",function(){return ge}),i.d(e,"goAnimationManager",function(){return de}),i.d(e,"Query",function(){return _e}),i.d(e,"query",function(){return Oe}),i.d(e,"SitDataManager",function(){return fe}),i.d(e,"sitDataManager",function(){return me}),i.d(e,"SymbolLib",function(){return Le}),i.d(e,"symbolLib",function(){return Me}),i.d(e,"SymbolLibManager",function(){return be}),i.d(e,"symbolLibManager",function(){return Te}),i.d(e,"SMLFileService",function(){return we}),i.d(e,"smlFileService",function(){return Ie}),i.d(e,"SymbolInfoService",function(){return De}),i.d(e,"symbolInfoService",function(){return Ee}),i.d(e,"SymbolLibService",function(){return Ce}),i.d(e,"symbolLibService",function(){return Ne}),i.d(e,"latLngsToSuperMapPoints",function(){return Ue}),i.d(e,"superMapPointsToLatLngs",function(){return Re}),i.d(e,"cloneLatLngs",function(){return Be}),i.d(e,"moveLatLngs",function(){return Ge}),i.d(e,"rotateLatLngs",function(){return Fe}),i.d(e,"resizeLatLngs",function(){return ke})},function(t,e){L.Canvas.include({_drawPlottingGraphics:function(t){var e=this;e._ctx.clearRect(0,0,e._ctx.canvas.width,e._ctx.canvas.height),t.map(function(t){var i=e._map.latLngToLayerPoint(t.getLatLng()),o=i.x-t.getImage().anchor.x,s=i.y-t.getImage().anchor.y,l=t.getImage().img||t.getImage().canvas;return t.graphicHeight&&t.graphicWidth?e._ctx.drawImage(l,o,s,t.graphicHeight,t.graphicWidth):e._ctx.drawImage(l,o,s),t})},_drawPlottingLayers:function(t){t.map(function(e){return e instanceof L.Polyline&&e._update(),e instanceof L.Polygon&&e._update(),t})},_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 s=[i.fontStyle?i.fontStyle:"normal","normal",i.fontWeight?i.fontWeight:"normal",i.fontSize?i.fontSize+"px":"1em",i.fontFamily?i.fontFamily:"sans-serif"].join(" "),l=i.text.split("\n"),n=l.length;if(this._ctx.fillText){this._ctx.font=s,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=this._ctx.measureText(l[p]).width+i.fontSpace*(l[p].length-1),y=i.labelAlign[0]||"c";"c"===y?u-=h/2-this._ctx.measureText(l[p][0]).width/2:"r"===y&&(u-=h-i.fontSize);var c=0,S=l[p].split(""),P="";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 g=0;g<S.length;g++)!0===i.fontStroke&&this._ctx.strokeText(S[g],u+c,r*p),this._ctx.fillText(S[g],u+c,r*p),P+=S[g],c=this._ctx.measureText(P).width+parseFloat(i.fontSpace)*(g+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(l[p],0,r*p),this._ctx.fillText(l[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=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,s=isNaN(t.options.labelYOffset)?0:t.options.labelYOffset;i.x+=o,i.y-=s}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 l=t.options.labelRotation;t.options.labelRotation=0;var n=t.getPxBounds();t.options.labelRotation=l;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 y=i.x,c=i.y,S=t.options.labelRotation*Math.PI/180,P=Math.sqrt(Math.pow(h.x-y,2)+Math.pow(h.y-c,2)),g=S+Math.atan2(h.y-c,h.x-y);h.x=y+P*Math.cos(g),h.y=c+P*Math.sin(g)}var d=t.options.fontStroke;t.options.fontStroke=!1;var f=t.options.fontColor;t.options.fontColor=t.options.fontShadowColor,this._updateTextPt(h,t),t.options.fontColor=f,t.options.fontStroke=d}if(t.hasOwnProperty("_eventParents"))for(var m in t._eventParents)t._eventParents[m].hasOwnProperty("ownerGroup")&&null!==t._eventParents[m].ownerGroup&&(t._eventParents[m].ownerGroup.symbolType!==SuperMap.Plot.SymbolType.NAVYDEPLOYMENT&&t._eventParents[m].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 s=void 0!==t.graphicXOffset?t.graphicXOffset:-.5*i,l=void 0!==t.graphicYOffset?t.graphicYOffset:-.5*o,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(s,l),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.onload=function(){o.src=t.options.externalGraphic,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,s=(t._radiusY||o)/o,l=(360-t.options.endAngle)*(Math.PI/180),n=(360-t.options.startAngle)*(Math.PI/180);this._drawnLayers[t._leaflet_id]=t,1!==s&&(i.save(),i.scale(1,s)),i.beginPath(),i.arc(e.x,e.y/s,o,l,n,!1),1!==s&&i.restore(),this._fillStroke(i,t)}},_handleMouseHover:function(t,e){var i,o=null;for(var s in this._map._layers)if((i=this._map._layers[s])._drawFirst)for(var l=i._drawFirst;l;l=l.next)l.layer.options.interactive&&l.layer._containsPoint(e)&&!this._map._draggableMoved(l.layer)&&(o=l.layer);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)},_onClick:function(t){var e,i=this._map.mouseEventToLayerPoint(t),o=[],s=[];for(let t in this._map._layers)if(this._map._layers[t]._drawFirst)for(var l=this._map._layers[t]._drawFirst;l;l=l.next)if(l.layer.options.interactive&&l.layer._containsPoint(i)&&!this._map._draggableMoved(l.layer)&&(e=l.layer).hasOwnProperty("_eventParents")&&null!==e._eventParents)for(var n in e._eventParents)s.push(e),o.push(e._eventParents[n]);if(e&&s.length>1){if(o.length>0){var a=!1,r=[],p=[];for(let t=0,e=o.length;t<e;t++)o[t].isSelected&&o[t].moveend&&(a=!0),o[t].enableEdit&&(r.push(o[t]),p.push(s[t]));for(let e=0,i=r.length;e<i;e++){if(L.DomEvent.fakeStop(t),r[e].isSelected&&r[e].moveend){this._fireEvent([p[e]],t);break}if(r[e].isSelected&&r.length>1){this._fireEvent([p[e]],t);break}if(!a){this._fireEvent([p[p.length-1]],t);break}}}}else e&&(L.DomEvent.fakeStop(t),this._fireEvent([e],t))}}),L.Polyline.prototype._containsPoint=function(t,e){var i,o,s,l,n,a,r=this._clickTolerance()+5;if(this._pxBounds&&!this._pxBounds.contains(t))return!1;for(i=0,l=this._parts.length;i<l;i++)for(o=0,s=(n=(a=this._parts[i]).length)-1;o<n;s=o++)if((e||0!==o)&&L.LineUtil.pointToSegmentDistance(t,a[s],a[o])<=r)return!0;return!1},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},function(t,e){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=[],s=[];for(var l in this._layers){var n=this._layers[l];if(n.options.interactive&&"function"==typeof n._containsPoint&&n._containsPoint(i)&&!this._map._draggableMoved(n)&&(e=n).hasOwnProperty("_eventParents")&&null!=e._eventParents)for(var a in e._eventParents)s.push(e),o.push(e._eventParents[a])}if(e&&s.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(s[t]));for(let e=0,i=p.length;e<i;e++){if(L.DomEvent.fakeStop(t),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&&(L.DomEvent.fakeStop(t),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 s in this._layers)(i=this._layers[s]).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 s;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&&(s=i.options.fontSpace+i.options.fontPercent/100*parseFloat(i.options.fontSize)*i.options.text.length),100!==i.options.fontPercent&&0===i.options.fontSpace){var l=document.createElement("span");document.body.appendChild(l),l.style.width="auto",l.style.height="auto",i.options.fontSize&&(l.style.fontSize=new String(i.options.fontSize)+"px"),i.options.fontFamily&&(l.style.fontFamily=i.options.fontFamily),i.options.fontWeight&&(l.style.fontWeight=i.options.fontWeight),l.style.position="absolute",l.style.visibility="hidden",l.innerHTML=i.options.text;var n=l.clientWidth;s=i.options.fontPercent/100*n+i.options.text.length}t.setAttributeNS(null,"textLength",s),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 y=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]?y-=e/2:"r"===a[0]&&(y-=e);for(var c=0,S=p[h].split(""),P="",g=0;g<S.length;g++){let e=o+"tspan"+h+g;i._tspanNodeObj&&i._tspanNodeObj[e]||(i._tspanNodeObj[e]=L.SVG.create("tspan"));let s=i._tspanNodeObj[e];!1===L.Browser.gecko&&s.setAttributeNS(null,"baseline-shift",L.SVG.LABEL_VSHIFT[a[1]]||"-35%");var d=SuperMap.Plot.PlottingUtil.getTextWidth(i.options,S[g]);s.setAttributeNS(null,"textLength",d),s.setAttributeNS(null,"lengthAdjust","spacingAndGlyphs"),s.setAttribute("x",y+c+(0===h?0:d>>>1)),0!==g?s.setAttribute("dy","0em"):0===h?s.setAttribute("dy",r()+"em"):s.setAttribute("dy","1em");let l=""===S[g]?" ":S[g];i.options.isUnicode?L.Browser.ie||L.Browser.ielt9?(this.element.innerHTML=l,s.textContent=this.element.innerHTML):s.innerHTML=l:s.textContent=l,s.parentNode||t.appendChild(s),P+=S[g],c=SuperMap.Plot.PlottingUtil.getTextWidth(i.options,P)+parseFloat(i.options.fontSpace)*(i.options.fontPercent/100)}}else{let s=o+"tspan"+h;i._tspanNodeObj&&i._tspanNodeObj[s]||(i._tspanNodeObj[s]=L.SVG.create("tspan"));let l=i._tspanNodeObj[s];if(!1===L.Browser.gecko&&l.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]);l.setAttributeNS(null,"textLength",t),l.setAttributeNS(null,"lengthAdjust","spacingAndGlyphs")}l.setAttribute("x",e.x),0==h?l.setAttribute("dy",r()+"em"):l.setAttribute("dy","1em");let n=""===p[h]?" ":p[h];i.options.isUnicode?L.Browser.ie||L.Browser.ielt9?(this.element.innerHTML=n,l.textContent=this.element.innerHTML):l.innerHTML=n:l.textContent=n,l.parentNode||t.appendChild(l)}}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 s=isNaN(t.options.labelXOffset)?0:t.options.labelXOffset,l=isNaN(t.options.labelYOffset)?0:t.options.labelYOffset;o.x+=s,o.y-=l}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 y=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=y}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 S=t._shadowTextNode;if(S&&S.parentNode||(S=t._textNode),!S||!S.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 s=void 0!=t.options.graphicXOffset?t.options.graphicXOffset:-.5*i,l=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+s).toFixed()),t._imageNode.setAttributeNS(null,"y",(t._point.y+l).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 s=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+o+2*i+",0 "+o+2*-i+",0 ";this._setPath(t,s)}}}),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()}}]);
|