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

10 lines
1.1 MiB

/*!
*
* iclient-plot-leaflet.(https://iclient.supermap.io)
* Copyright© 2000 - 2023 SuperMap Software Co.Ltd
* version: v11.1.0
*
*/!function(){var t={61:function(){L.Path.include({onBefore:function(t){this._renderer._beforePath(this,t),this._reset(),this._renderer._addPath(this)}})},293:function(){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,o=this._map.mouseEventToLayerPoint(t),i=[],n=[];for(var l in this._layers){var a=this._layers[l];if(a.options.interactive&&"function"==typeof a._containsPoint&&a._containsPoint(o)&&!this._map._draggableMoved(a)&&(e=a,Object.prototype.hasOwnProperty.call(e,"_eventParents")&&null!=e._eventParents))for(var s in e._eventParents)n.push(e),i.push(e._eventParents[s])}if(e&&n.length>1){if(i.length>0){for(var r=!1,u=[],p=[],h=0,c=i.length;h<c;h++)i[h].isSelected&&i[h].moveend&&(r=!0),i[h].enableEdit&&(u.push(i[h]),p.push(n[h]));for(var y=0,g=u.length;y<g;y++){if(u[y].isSelected&&u[y].moveend){u[y].moveend=!1,this._fireEvent([p[y]],t),u[y].moveend=!0;break}if(u[y].isSelected&&u.length>1){this._fireEvent([p[y]],t);break}if(!r){this._fireEvent([p[p.length-1]],t);break}}}}else e&&e._eventParents[0]&&e._eventParents[0].fire(t.type,t)},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(L.DomUtil.removeClass(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,e){var o,i;for(var n in this._layers)(o=this._layers[n]).options.interactive&&"function"==typeof o._containsPoint&&o._containsPoint(e)&&(i=o);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(L.DomUtil.addClass(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,e,o){this._map._fireDOMEvent(e,o||e.type,t)},_updateTextPt:function(t,e,o,i){var n;if(t.setAttributeNS(null,"x",e.x),t.setAttributeNS(null,"y",e.y),o.options.display&&t.setAttributeNS(null,"display",o.options.display),!0===o.options.fontStroke&&(o.options.fontStrokeColor&&t.setAttributeNS(null,"stroke",o.options.fontStrokeColor),o.options.fontStrokeWidth&&t.setAttributeNS(null,"stroke-width",o.options.fontStrokeWidth)),o.options.labelRotation&&t.setAttributeNS(null,"transform","rotate("+o.options.labelRotation+" "+e.x+","+e.y+")"),o.options.fontColor&&t.setAttributeNS(null,"fill",o.options.fontColor),o.options.fontOpacity&&t.setAttributeNS(null,"opacity",o.options.fontOpacity),o.options.fontFamily&&t.setAttributeNS(null,"font-family",o.options.fontFamily),o.options.fontSize&&t.setAttributeNS(null,"font-size",o.options.fontSize),o.options.fontWeight&&t.setAttributeNS(null,"font-weight",o.options.fontWeight),o.options.fontStyle&&t.setAttributeNS(null,"font-layer.options",o.options.fontStyle),L.Browser.gecko){if(100!==o.options.fontPercent&&0!==o.options.fontSpace&&(n=o.options.fontSpace+o.options.fontPercent/100*parseFloat(o.options.fontSize)*o.options.text.length),100!==o.options.fontPercent&&0===o.options.fontSpace){var l=document.createElement("span");document.body.appendChild(l),l.style.width="auto",l.style.height="auto",o.options.fontSize&&(l.style.fontSize=new String(o.options.fontSize)+"px"),o.options.fontFamily&&(l.style.fontFamily=o.options.fontFamily),o.options.fontWeight&&(l.style.fontWeight=o.options.fontWeight),l.style.position="absolute",l.style.visibility="hidden",l.innerHTML=o.options.text;var a=l.clientWidth;n=o.options.fontPercent/100*a+o.options.text.length}t.setAttributeNS(null,"textLength",n),t.setAttributeNS(null,"lengthAdjust","spacingAndGlyphs")}t.setAttributeNS(null,"pointer-events","visible");var s=o.options.labelAlign||"cm";t.setAttributeNS(null,"text-anchor",L.SVG.LABEL_ALIGN[s[0]]||"middle"),!0===L.Browser.gecko&&t.setAttributeNS(null,"dominant-baseline",L.SVG.LABEL_ALIGN[s[1]]||"central");for(var r=function(){var t=L.SVG.LABEL_VFACTOR[s[1]];null==t&&(t=-.5);var e=t*(p-1);return L.Browser.ie&&(null===(t=L.SVG.LABEL_IE_VOFFSET[s[1]])&&(t=.35),e+=t),e},u=o.options.text.split("\n"),p=u.length;t.childNodes.length>p;)t.removeChild(t.lastChild);for(var h=0;h<p;h++){var c=e.x;if(0!==o.options.fontSpace||100!==o.options.fontPercent&&L.Browser.ie){var y=SuperMap.Plot.PlottingUtil.getTextWidth(o.options,u[h]);"c"===s[0]?c-=y/2:"r"===s[0]&&(c-=y);for(var g=0,f=u[h].split(""),P="",d=0;d<f.length;d++){var S=i+"tspan"+h+d;o._tspanNodeObj&&o._tspanNodeObj[S]||(o._tspanNodeObj[S]=L.SVG.create("tspan"));var m=o._tspanNodeObj[S];!1===L.Browser.gecko&&m.setAttributeNS(null,"baseline-shift",L.SVG.LABEL_VSHIFT[s[1]]||"-35%");var b=SuperMap.Plot.PlottingUtil.getTextWidth(o.options,f[d]);m.setAttributeNS(null,"textLength",b),m.setAttributeNS(null,"lengthAdjust","spacingAndGlyphs"),m.setAttribute("x",c+g+(0===h?0:b>>>1)),0!==d?m.setAttribute("dy","0em"):0===h?m.setAttribute("dy",r()+"em"):m.setAttribute("dy","1em");var M=""===f[d]?" ":f[d];o.options.isUnicode?L.Browser.ie||L.Browser.ielt9?(this.element.innerHTML=M,m.textContent=this.element.innerHTML):m.innerHTML=M:m.textContent=M,m.parentNode||t.appendChild(m),P+=f[d],g=SuperMap.Plot.PlottingUtil.getTextWidth(o.options,P)+parseFloat(o.options.fontSpace)*(o.options.fontPercent/100)}}else{var v=i+"tspan"+h;o._tspanNodeObj&&o._tspanNodeObj[v]||(o._tspanNodeObj[v]=L.SVG.create("tspan"));var A=o._tspanNodeObj[v];if(!1===L.Browser.gecko&&A.setAttributeNS(null,"baseline-shift",L.SVG.LABEL_VSHIFT[s[1]]||"-35%"),100!==o.options.fontPercent){var T=SuperMap.Plot.PlottingUtil.getTextWidth(o.options,u[h]);A.setAttributeNS(null,"textLength",T),A.setAttributeNS(null,"lengthAdjust","spacingAndGlyphs")}A.setAttribute("x",e.x),0==h?A.setAttribute("dy",r()+"em"):A.setAttribute("dy","1em");var _=""===u[h]?" ":u[h];o.options.isUnicode?L.Browser.ie||L.Browser.ielt9?(this.element.innerHTML=_,A.textContent=this.element.innerHTML):A.innerHTML=_:A.textContent=_,A.parentNode||t.appendChild(A)}}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 o=t._latlng,i=this._map.latLngToLayerPoint(o);if(void 0!=i){if(t.options.labelXOffset||t.options.labelYOffset){var n=isNaN(t.options.labelXOffset)?0:t.options.labelXOffset,l=isNaN(t.options.labelYOffset)?0:t.options.labelYOffset;i.x+=n,i.y-=l}if(!0===t.options.fontShadow){t._shadowTextNode&&t._shadowTextNode.parentNode||(t._shadowTextNode=L.SVG.create("text"),this._rootGroup.appendChild(t._shadowTextNode));var a=L.point(i.x,i.y);if(t.options.fontShadowOffsetX&&(a.x+=t.options.fontShadowOffsetX),t.options.fontShadowOffsetY&&(a.y+=t.options.fontShadowOffsetY),0!==t.options.labelRotation){var s=i.x,r=i.y,u=t.options.labelRotation*Math.PI/180,p=Math.sqrt(Math.pow(a.x-s,2)+Math.pow(a.y-r,2)),h=u+Math.atan2(a.y-r,a.x-s);a.x=s+p*Math.cos(h),a.y=r+p*Math.sin(h)}var c=t.options.fontStroke;t.options.fontStroke=!1;var y=t.options.fontColor;t.options.fontColor=t.options.fontShadowColor,this._updateTextPt(t._shadowTextNode,a,t,"shadow"),t.options.fontColor=y,t.options.fontStroke=c}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,i,t,"label"),!0===t.options.fontBackground){var g=t._shadowTextNode;if(g&&g.parentNode||(g=t._textNode),!g||!g.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 f=t._textNode.getBBox();t._backgroundTextNode.x.baseVal.value=f.x,t._backgroundTextNode.y.baseVal.value=f.y,t._backgroundTextNode.width.baseVal.value=f.width,t._backgroundTextNode.height.baseVal.value=f.height,t._backgroundTextNode.style.fill=t.options.fontBackgroundColor,t.options.labelRotation&&t._backgroundTextNode.setAttributeNS(null,"transform","rotate("+t.options.labelRotation+" "+i.x+","+i.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 o=t.options.graphicWidth||t.options.graphicHeight,i=t.options.graphicHeight||t.options.graphicWidth;o=o||2*t.options.pointRadius,i=i||2*t.options.pointRadius;var n=void 0!=t.options.graphicXOffset?t.options.graphicXOffset:-.5*o,l=void 0!=t.options.graphicYOffset?t.options.graphicYOffset:-.5*i,a=t.options.graphicOpacity||t.options.fillOpacity;t._imageNode.setAttributeNS(null,"x",(t._point.x+n).toFixed()),t._imageNode.setAttributeNS(null,"y",(t._point.y+l).toFixed()),t._imageNode.setAttributeNS(null,"width",o),t._imageNode.setAttributeNS(null,"height",i),t._imageNode.setAttributeNS("http://www.w3.org/1999/xlink","href",t.options.externalGraphic),t._imageNode.setAttributeNS(null,"style","opacity: "+a),t._imageNode.onclick=L.SVG.preventDefault;var s=t.options.rotation;void 0===s&&void 0===t._imageNode._rotation||!t._point||(t._imageNode._rotation=s,s|=0,t._imageNode.setAttributeNS(null,"transform","rotate("+s+" "+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,o=t._radius,i="a"+o+","+(t._radiusY||o)+" 0 1,0 ";sRadian=(360-t.options.endAngle)*(Math.PI/180),eRadian=(360-t.options.startAngle)*(Math.PI/180);var n=t._empty()?"M0 0":"M"+(e.x-o)+","+e.y+i+2*o+",0 "+i+2*-o+",0 ";this._setPath(t,n)}}}),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()}},203:function(){L.supermap.TiledMapLayer.include({setVisibility:function(t){return t?this.setOpacity(100):this.setOpacity(0),0},getVisibility:function(){return 0!=this.options.opacity}})}},e={};function o(i){var n=e[i];if(void 0!==n)return n.exports;var l=e[i]={exports:{}};return t[i](l,l.exports,o),l.exports}!function(){"use strict";var t=window.SuperMap=window.SuperMap||{};t.Plot=t.Plot||{},window.SuperMapAlgoPlot=t.Plot||{},SuperMap.Plot.ArrowTailType={ARROWTAIL_NONE:0,ARROWTAIL_LINE:1,ARROWTAIL_CURVE:2,ARROWTAIL_COATTAIL:3,ARROWTAIL_COATTAIL_POLYBODY:4},SuperMap.Plot.ArrowHeadType={ARROWHEAD_POLYLINE:0,ARROWHEAD_TRIANGLE:1,ARROWHEAD_COATTAIL:2,ARROWHEAD_TRIANGLE_SOLID:3,ARROWHEAD_WITH_EAR:4,ARROWHEAD_WITHOUT_EAR:5,ARROWHEAD_COATTAIL_HOLLOW:6},SuperMap.Plot.ArrowBodyType={ARROWBODY_POLYLINE:0,ARROWBODY_POLYBEZIER:1,ARROWBODY_PARALLEL:2,ARROWBODY_TRAPEZOID:3,ARROWBODY_MULTIPOLYBEZIER:4,ARROWBODY_COATTAIL:5},SuperMap.Plot.SymbolType={DOTSYMBOL:1,ALGOSYMBOL:2,TEXTSYMBOL:34,ELLIPSESYMBOL:31,CIRCLESYMBOL:29,RECTANGLESYMBOL:26,ARBITRARYPOLYGONSYMBOL:32,POLYLINESYMBOL:24,PARALLELOGRAM:28,ARCSYMBOL:44,NEWARCSYMBOL:4401,REGULARPOLYGON:410,CHORDSYMBOL:370,NEWCHORDSYMBOL:3701,PIESYMBOL:380,NEWPIESYMBOL:3801,KIDNEY:390,POLYBEZIERSYMBOL:590,PARALLELLINE:48,BRACESYMBOL:400,ANNOFRAMESYMBOL:320,ANNOFRAMESYMBOLM:321,TRAPEZOIDSYMBOL:350,POLYBEZIERCLOSESYMBOL:360,GROUPOBJECT:1e3,LINERELATION:1001,INTERFERENCEBEAM:1002,POLYGONREGION:1003,ARCREGION:1004,AIRROUTE:1005,NAVYROUTE:1006,MISSILEROUTE:1007,NAVYDEPLOYMENT:1008,AIRDEPLOYMENT:1009,SATELLITE:1010,SATELLITETIMEWINDOWS:1011,SYMBOLTEXT:1012,RUNWAY:1013,CURVEEIGHT:1014,ROUTENODE:1015,ARROWLINE:1016,PATHTEXT:1017,LITERATESIGN:1018,CONCENTRICCIRCLE:1019,FLAGGROUP:1020,SYMBOLTEXT1:1021,COMBINATIONALCIRCLE:1022,FREECURVE:1023,SYMBOLTEXTBOX:1024,NODECHAIN:1025,LINEMARKING:1026,AVOIDREGION:1027,WIRE:1028,LINEARARROW:1029,PICTURE:3e3},SuperMap.Plot.LineRelationType={SOLID:0,DASH:1,ARROW:2},SuperMap.Plot.AlgoSurroundLineType={NONE:0,INNER:1,OUT:2,ALL:3},SuperMap.Plot.RouteNodeType={RENDEZVOUS:"RENDEZVOUS",EXPANDING:"EXPANDING",VOLLEY:"VOLLEY",STANDBY:"STANDBY",SUPPLY:"SUPPLY",TAKEOFF:"TAKEOFF",INITIAL:"INITIAL",VISUALINITAL:"VISUALINITAL",LANCH:"LANCH",TURNING:"TURNING",AIMING:"AIMING",COMMONROUTE:"COMMONROUTE",WEAPONLAUNCH:"WEAPONLAUNCH",TARGET:"TARGET",ATTACK:"ATTACK",SUPPRESS:"SUPPRESS",EIGHTSPIRAL:"EIGHTSPIRAL",HAPPYVALLEY:"HAPPYVALLEY"},SuperMap.Plot.RelLineText={ONLINE:0,ONLEFTLINE:1,ONRIGHTLINE:2,ONBOTHLINE:3},SuperMap.Plot.RadiusLineType={NONE:0,SOLID:1,ARROW:2},SuperMap.Plot.Position={TOP:4,BOTTOM:5,LEFT:6,RIGHT:7},SuperMap.Plot.AnnoPosition={LEFTTOP:0,LEFTBOTTOM:1,RIGHTTOP:2,RIGHTBOTTOM:3,TOP:4,BOTTOM:5,LEFT:6,RIGHT:7,MIDDLE:8,ANCHOR:9},SuperMap.Plot.ArrowLineType={DOUBLELINE:0,TRIANGLESOLID:1,NONE:2},SuperMap.Plot.TextBoxType={WITHTIPBOX:0,RECTBOX:1,LINEBOX:2,NONEBOX:3},SuperMap.Plot.PositionOffsetType={LINE:0,GRADIENTLINE:1},SuperMap.Plot.AlignType={LEFT:0,RIGHT:1,UP:2,DOWN:3,VERTICALCENTER:4,HORIZONTALCENTER:5},SuperMap.Plot.EditMode={ADDCONTROLPOINT:0,EDITCONTROLPOINT:1,EDITCIRCUMRECTANGLE:2,REMOVECONTROLPOINT:3};SuperMap.Plot.EqualLargeType={WIDTH:0,HEIGHT:1,SAME:2},SuperMap.Plot.UniformDistributionType={LEVEL:0,VERTICAL:1};SuperMap.Plot.TransactionType={CREATE:0,EDIT:1,REMOVE:2},SuperMap.Plot.Event=SuperMap.Plot.Event||{};SuperMap.Plot.Event.beforefeatureadded="beforefeatureadded",SuperMap.Plot.Event.featureadded="featureadded",SuperMap.Plot.Event.beforefeaturesselected="beforefeaturesselected",SuperMap.Plot.Event.featuresselected="featuresselected",SuperMap.Plot.Event.updateFeature="updateFeature",SuperMap.Plot.Event.beforefeaturesunselected="beforefeaturesunselected",SuperMap.Plot.Event.featuresunselected="featuresunselected",SuperMap.Plot.Event.beforefeaturesmodified="beforefeaturesmodified",SuperMap.Plot.Event.featuresmodified="featuresmodified",SuperMap.Plot.Event.beforefeaturesremoved="beforefeaturesremoved",SuperMap.Plot.Event.featuresremoved="featuresremoved",SuperMap.Plot.Event.beforefeaturesadded="beforefeaturesadded",SuperMap.Plot.Event.featuresadded="featuresadded",SuperMap.Plot.Event.movingtargetsselected="featuresselected",SuperMap.Plot.Event.movingtargetsunselected="featuresunselected",SuperMap.Plot.Event.movingtargetcontextmenu="featurecontextmenu",SuperMap.Plot.Event.initializecompleted="initializecompleted",SuperMap.Plot.Event.cachecompleted="cachecompleted",SuperMap.Plot.Event.plottinglayeradded="plottinglayeradded",SuperMap.Plot.Event.plottinglayerremoved="plottinglayerremoved",SuperMap.Plot.Event.plottinglayeractive="plottinglayeractive",SuperMap.Plot.Event.childplotlayeradded="childplotlayeradded",SuperMap.Plot.Event.childplotlayerremoved="childplotlayerremoved",SuperMap.Plot.Event.childplotlayeractive="childplotlayeractive",SuperMap.Plot.Event.reseteditmarkersvalues="reseteditmarkersvalues",SuperMap.Plot.Event.reseteditmarkers="reseteditmarkers",SuperMap.Plot.Event.animationcreated="animationcreated",SuperMap.Plot.Event.animationdeleted="animationdeleted",SuperMap.Plot.Event.animationmodify="animationmodify",SuperMap.Plot.Event.animationbegin="animationbegin",SuperMap.Plot.Event.animationend="animationend",SuperMap.Plot.Event.animatitonpropertyconfig="animatitonpropertyconfig",SuperMap.Plot.Event.wayfeaturedrawfinished="wayfeaturedrawfinished",SuperMap.Plot.Event.wayfeaturemodifyfinished="wayfeaturemodifyfinished";SuperMap.Plot.GOAnimationType={ANIMATION_UNKNOWN:-1,ANIMATION_WAY:0,ANIMATION_BLINK:1,ANIMATION_ATTRIBUTE:2,ANIMATION_SHOW:3,ANIMATION_ROTATE:4,ANIMATION_SCALE:5,ANIMATION_GROW:6,ANIMATION_HIDE_EXP:12,ANIMATION_REDUCE_EXP:13,ANIMATION_MOVEIN_EXP:14,ANIMATION_MOVEOUT_EXP:15,ANIMATION_ZOOMIN_EXP:16,ANIMATION_ZOOMOUT_EXP:17,ANIMATION_CURVE_EXP:18,ANIMATION_BROKENLINE_EXP:19,ANIMATION_GROW_EXP:20,ANIMATION_WAY_EXP:21,ANIMATION_BLINK_EXP:22,ANIMATION_SHOW_EXP:23,ANIMATION_MOVEVIEW_EXP:24},SuperMap.Plot.BlinkAnimationBlinkStyle={Blink_Frequency:0,Blink_Number:1},SuperMap.Plot.BlinkAnimationReplaceStyle={Replace_NoColor:0,Replace_Color:1},SuperMap.Plot.RotateDirection={ClockWise:0,AntiClockWise:1},SuperMap.Plot.WayPathType={POLYLINE:0,CURVE:1};var e=SuperMap.Plot.GOAnimationState={UNKNOWN:0,PLAYING:1,PAUSE:2,STOP:3,RESET:4},i=SuperMap.Plot.AnimationPlayType={PLAYFROMNOW:0,PLAYSAMELASTONE:1,PLAYAFTERLASTONE:2,UNKNOWN:3};function n(t){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function a(){return(a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=u(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:o):n.value}}).apply(this,arguments)}function s(t,e){return(s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function r(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=u(t);if(e){var l=u(this).constructor;o=Reflect.construct(i,arguments,l)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(p,SuperMap.CommonServiceBase);var e,o,i,n=r(p);function p(t,e){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,p),(o=n.call(this,t,e)).CLASS_NAME="SuperMap.PlotCommonServiceBase",o}return e=p,(o=[{key:"destroy",value:function(){a(u(p.prototype),"destroy",this).call(this)}},{key:"_commit",value:function(t){"POST"!==t.method&&"PUT"!==t.method||(t.params&&(t.url=SuperMap.Util.urlAppend(t.url,SuperMap.Util.getParameterString(t.params||{}))),t.params=t.data),SuperMap.FetchRequest.commit(t.method,t.url,t.params,{headers:t.headers,withCredentials:t.withCredentials,crossOrigin:t.crossOrigin,timeout:t.async?0:null,proxy:t.proxy}).then(function(t){return t.text()}).then(function(e){var o=(new SuperMap.Format.JSON).read(e);(o||(o={error:e}),o.error)?(t.scope?SuperMap.Function.bind(t.failure,t.scope):t.failure)(o.error):(o.succeed=void 0==o.succeed||o.succeed,(t.scope?SuperMap.Function.bind(t.success,t.scope):t.success)(o))})}}])&&l(e.prototype,o),i&&l(e,i),Object.defineProperty(e,"prototype",{writable:!1}),p}();function h(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.PlotCommonServiceBase=p;var c=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||{},this.method=e.method?e.method:"POST",this.sitData=e.sitData?e.sitData:null,this.smlFileName=e.smlFileName?e.smlFileName:"",this.isCover=!!e.isCover&&e.isCover,this.CLASS_NAME="SuperMap.EditSmlFileParameters"}var e,o,i;return e=t,i=[{key:"toJsonParameters",value:function(t){if(t)return SuperMap.Plot.PlottingUtil.toJSON(t.sitData)}}],(o=[{key:"destroy",value:function(){this.method="POST",this.sitData=null,this.isCover=!1,this.smlFileName=""}}])&&h(e.prototype,o),i&&h(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function y(t){"@babel/helpers - typeof";return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function f(){return(f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=m(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:o):n.value}}).apply(this,arguments)}function P(t,e){return(P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=m(t);if(e){var n=m(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return S(t)}(this,o)}}function S(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(t){return(m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMap.EditSmlFileParameters=c;var b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&P(t,e)}(l,SuperMap.PlotCommonServiceBase);var e,o,i,n=d(l);function l(t,e){var o;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),o=n.call(this,t,e),(e=e||{})&&SuperMap.Util.extend(S(o),e);var i=S(o);return i.events=new SuperMap.Events(i,null,i.EVENT_TYPES,!0),i.eventListeners instanceof Object&&i.events.on(i.eventListeners),o.CLASS_NAME="SuperMap.EditSmlFileService",o}return e=l,(o=[{key:"destroy",value:function(){f(m(l.prototype),"destroy",this).call(this)}},{key:"processAsync",value:function(t){if(t){var e=this,o=t.method,i=e.url.substr(e.url.length-1,1);e.url+="/"==i?"smlInfos/":"/smlInfos/",e.url+=t.smlFileName+".json",e.url+="?isCover="+t.isCover;var n=null;t.method&&"POST"===t.method&&(n=SuperMap.EditSmlFileParameters.toJsonParameters(t)),e.request({method:o,data:n,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}}])&&g(e.prototype,o),i&&g(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function M(t){"@babel/helpers - typeof";return(M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function v(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function A(){return(A="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=x(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:o):n.value}}).apply(this,arguments)}function T(t,e){return(T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function _(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=x(t);if(e){var n=x(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===M(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return O(t)}(this,o)}}function O(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function x(t){return(x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMap.EditSmlFileService=b;var w=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&T(t,e)}(l,SuperMap.PlotCommonServiceBase);var e,o,i,n=_(l);function l(t,e){var o;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),o=n.call(this,t,e),(e=e||{})&&SuperMap.Util.extend(O(o),e);var i,a=O(o);return i=a.url.substr(a.url.length-1,1),a.url+="/"==i?"symbolLibs.json?":"/symbolLibs.json?",o.CLASS_NAME="SuperMap.GetLibIDsService",o}return e=l,(o=[{key:"destroy",value:function(){A(x(l.prototype),"destroy",this).call(this)}},{key:"processAsync",value:function(){this.request({method:"GET",data:null,scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}}])&&v(e.prototype,o),i&&v(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function E(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.GetLibIDsService=w;var C=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||{},this.libID=e.libID,this.CLASS_NAME="SuperMap.GetLibInfoParameter"}var e,o,i;return e=t,(o=[{key:"destroy",value:function(){this.libID=null}}])&&E(e.prototype,o),i&&E(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function I(t){"@babel/helpers - typeof";return(I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function R(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function D(){return(D="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=k(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:o):n.value}}).apply(this,arguments)}function U(t,e){return(U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function N(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=k(t);if(e){var n=k(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===I(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return B(t)}(this,o)}}function B(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function k(t){return(k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMap.GetLibInfoParameter=C;var F=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&U(t,e)}(l,SuperMap.PlotCommonServiceBase);var e,o,i,n=N(l);function l(t,e){var o;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),o=n.call(this,t,e),(e=e||{})&&SuperMap.Util.extend(B(o),e);var i,a=B(o);return i=a.url.substr(a.url.length-1,1),a.url+="/"==i?"symbolLibs/":"/symbolLibs/",o.CLASS_NAME="SuperMap.GetLibInfoService",o}return e=l,(o=[{key:"destroy",value:function(){D(k(l.prototype),"destroy",this).call(this)}},{key:"processAsync",value:function(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})}}])&&R(e.prototype,o),i&&R(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function V(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.GetLibInfoService=F;var j=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||{},this.start=e.start,this.count=e.count?e.count:null,this.CLASS_NAME="SuperMap.GetSMLInfosParameters"}var e,o,i;return e=t,i=[{key:"toUrlParameters",value:function(t){if(t){var e="";return null!==t.start&&(e="?start="+encodeURIComponent(t.start)),!t.count||null===t.count&&0===t.count||(e+="&count="+encodeURIComponent(t.count)),e}}}],(o=[{key:"destroy",value:function(){this.start=null,this.count=null}}])&&V(e.prototype,o),i&&V(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Y(t){"@babel/helpers - typeof";return(Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function z(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function G(){return(G="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Z(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:o):n.value}}).apply(this,arguments)}function W(t,e){return(W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function X(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Z(t);if(e){var n=Z(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return H(t)}(this,o)}}function H(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Z(t){return(Z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMap.GetSMLInfosParameters=j;var J=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&W(t,e)}(l,SuperMap.PlotCommonServiceBase);var e,o,i,n=X(l);function l(t,e){var o;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),o=n.call(this,t,e),(e=e||{})&&SuperMap.Util.extend(H(o),e);var i,a=H(o);return a.events=new SuperMap.Events(a,null,a.EVENT_TYPES,!0),a.eventListeners instanceof Object&&a.events.on(a.eventListeners),i=a.url.substr(a.url.length-1,1),a.url+="/"==i?"smlInfos":"/smlInfos",a.url+=".json",o.CLASS_NAME="SuperMap.GetSMLInfosService",o}return e=l,(o=[{key:"destroy",value:function(){G(Z(l.prototype),"destroy",this).call(this)}},{key:"processAsync",value:function(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})}}}])&&z(e.prototype,o),i&&z(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function q(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.GetSMLInfosService=J;var K=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||{},this.libID=e.libID,this.code=e.code,this.inputPoints=e.inputPoints?e.inputPoints:null,this.symbolRank=e.symbolRank?e.symbolRank:0,this.negativeImage=!!e.negativeImage&&e.negativeImage,this.surroundLineType=e.surroundLineType?e.surroundLineType:0,this.subSymbols=e.subSymbols?e.subSymbols:null,this.scaleValues=e.scaleValues?e.scaleValues:null,this.scalePoints=e.scalePoints?e.scalePoints:null,this.newScalePoint=e.newScalePoint?e.newScalePoint:null,this.newScalePointIndex=e.newScalePointIndex?e.newScalePointIndex:0,this.CLASS_NAME="SuperMap.GetSymbolInfoParameters"}var e,o,i;return e=t,i=[{key:"toUrlParameters",value:function(t){if(t&&null!==t.libID&&null!==t.code){var e="libID="+encodeURIComponent(t.libID)+"&code="+encodeURIComponent(t.code);if(t.inputPoints&&null!==t.inputPoints&&0!==t.inputPoints.length){for(var o="[",i=0;i<t.inputPoints.length;i++)i===t.inputPoints.length-1?o+='{"x":'+t.inputPoints[i].x+', "y":'+t.inputPoints[i].y+"}]":o+='{"x":'+t.inputPoints[i].x+', "y":'+t.inputPoints[i].y+"},";e+="&inputPoints="+encodeURIComponent(o)}if(t.scalePoints&&null!==t.scalePoints&&0!==t.scalePoints.length){for(var n="[",l=0;l<t.scalePoints.length;l++)l===t.scalePoints.length-1?n+='{"x":'+t.scalePoints[l].x+', "y":'+t.scalePoints[l].y+"}]":n+='{"x":'+t.scalePoints[l].x+', "y":'+t.scalePoints[l].y+"},";e+="&scalePoints="+encodeURIComponent(n)}if(t.scaleValues&&null!==t.scaleValues&&0!==t.scaleValues.length){for(var a="[",s=0;s<t.scaleValues.length;s++)s===t.scaleValues.length-1?a+=t.scaleValues[s]+"]":a+=t.scaleValues[s]+",";e+="&scaleValues="+encodeURIComponent(a)}if(t.subSymbols&&null!==t.subSymbols&&0!==t.subSymbols.length){for(var r="[",u=0;u<t.subSymbols.length;u++)u===t.subSymbols.length-1?r+=t.subSymbols[u].code+"]":r+=t.subSymbols[u].code+",";e+="&subSymbols="+encodeURIComponent(r)}return t.newScalePoint&&null!==t.newScalePoint&&(e+="&newScalePoint="+encodeURIComponent('{"x":'+t.newScalePoint.x+', "y":'+t.newScalePoint.y+"}")),t.newScalePointIndex&&null!==t.newScalePointIndex&&(e+="&newScalePointIndex="+encodeURIComponent(t.newScalePointIndex)),t.symbolRank&&null!==t.symbolRank&&(e+="&symbolRank="+encodeURIComponent(t.symbolRank)),t.negativeImage&&null!==t.negativeImage&&(e+="&negativeImage="+encodeURIComponent(t.negativeImage)),t.surroundLineType&&null!==t.surroundLineType&&(e+="&surroundLineType="+encodeURIComponent(t.surroundLineType)),e}}}],(o=[{key:"destroy",value:function(){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}}])&&q(e.prototype,o),i&&q(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Q(t){"@babel/helpers - typeof";return(Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tt(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function et(){return(et="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=lt(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:o):n.value}}).apply(this,arguments)}function ot(t,e){return(ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function it(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=lt(t);if(e){var n=lt(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Q(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return nt(t)}(this,o)}}function nt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function lt(t){return(lt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMap.GetSymbolInfoParameters=K;var at=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ot(t,e)}(l,SuperMap.PlotCommonServiceBase);var e,o,i,n=it(l);function l(t,e){var o;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),e=e||{};var i,a=nt(o=n.call(this,t,e));return i=a.url.substr(a.url.length-1,1),a.url+="/"==i?"graphicObject.json?":"/graphicObject.json?",o.CLASS_NAME="SuperMap.GetSymbolInfoService",o}return e=l,(o=[{key:"destroy",value:function(){et(lt(l.prototype),"destroy",this).call(this)}},{key:"processAsync",value:function(t){if(t){var e,o=this;e=SuperMap.GetSymbolInfoParameters.toUrlParameters(t),o.url+=e,t.dynamicToken&&(o.url+="&dynamicToken="+t.dynamicToken),"MSIE"===SuperMap.Browser.name.toUpperCase()&&(o.url=encodeURI(o.url)),o.request({method:"GET",params:null,scope:o,success:o.myServiceProcessCompleted,failure:o.serviceProcessFailed})}}},{key:"myServiceProcessCompleted",value:function(t){null!=(t=SuperMap.Util.transformResult(t))&&null!=t.textStyle2D&&null!=t.textStyle2D.fontHeight&&(t.textStyle2D.fontHeight=3),this.events.triggerEvent("processCompleted",{result:t})}}])&&tt(e.prototype,o),i&&tt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function st(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.GetSymbolInfoService=at;var rt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||{},this.lineColor=e.lineColor?e.lineColor:"#ff0000",this.lineWidth=e.lineWidth?e.lineWidth:2,this.lineType=e.lineType?e.lineType:0,this.lineOpacity=e.lineOpacity?e.lineOpacity:1,this.lineCap=e.lineCap?e.lineCap:"round",this.flagTextSize=e.flagTextSize?e.flagTextSize:60,this.maxScale=e.maxScale?e.maxScale:5,this.minScale=e.minScale?e.minScale:1,this.dotSymbolSize=e.dotSymbolSize?e.dotSymbolSize:40,this.dotTextSpace=e.dotTextSpace?e.dotTextSpace:7,this.scaleByMap=!!e.scaleByMap&&e.scaleByMap,this.fillColor=e.fillColor?e.fillColor:"#ff0000",this.fillOpacity=e.fillOpacity?e.fillOpacity:.31,this.fontColor=e.fontColor?e.fontColor:"#000000",this.fontOpacity=e.fontOpacity?e.fontOpacity:1,this.fontStroke=!!e.fontStroke&&e.fontStroke,this.fontStrokeColor=e.fontStrokeColor?e.fontStrokeColor:"#ff0000",this.fontStrokeWidth=e.fontStrokeWidth?e.fontStrokeWidth:"2px",this.fontBackground=!!e.fontBackground&&e.fontBackground,this.fontBackgroundColor=e.fontBackgroundColor?e.fontBackgroundColor:"#ff0000",this.fontShadow=!!e.fontShadow&&e.fontShadow,this.fontShadowColor=e.fontShadowColor?e.fontShadowColor:"#ff0000",this.fontShadowOffsetX=e.fontShadowOffsetX?e.fontShadowOffsetX:0,this.fontShadowOffsetY=e.fontShadowOffsetY?e.fontShadowOffsetY:0,this.fontSize=e.fontSize?e.fontSize:14,this.fontSpace=e.fontSpace?e.fontSpace:0,this.fontPercent=e.fontPercent?e.fontPercent:100,this.fontFamily=e.fontFamily?e.fontFamily:"微软雅黑",this.fontWeight=e.fontWeight?e.fontWeight:"bold",this.fontStyle=e.fontStyle?e.fontStyle:"",this.surroundLineType=e.surroundLineType?e.surroundLineType:0,this.surroundLineColor=e.surroundLineColor?e.surroundLineColor:"#ffff00",this.surroundLineWidth=e.surroundLineWidth?e.surroundLineWidth:4,this.surroundLineColorOpacity=e.surroundLineColorOpacity?e.surroundLineColorOpacity:1,this.fontStyle=e.fontStyle?e.fontStyle:"",this.fillBackColor=e.fillBackColor?e.fillBackColor:"#ff0000",this.fillBackOpacity=e.fillBackOpacity?e.fillBackOpacity:1,this.fillGradientMode=e.fillGradientMode?e.fillGradientMode:"NONE",this.fillCenterOffsetX=e.fillCenterOffsetX?e.fillCenterOffsetX:0,this.fillCenterOffsetY=e.fillCenterOffsetY?e.fillCenterOffsetY:0,this.fillAngle=e.fillAngle?e.fillAngle:0,this.fillSymbolID=e.fillSymbolID?e.fillSymbolID:1,this.defaultFlag=!!e.defaultFlag&&e.defaultFlag,this.CLASS_NAME="SuperMap.Plot.DefaultStyle",this.parserConfiguration()}var e,o,i;return e=t,(o=[{key:"parserConfiguration",value:function(){"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)))}},{key:"destroy",value:function(){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}}])&&st(e.prototype,o),i&&st(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ut(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.Plot.DefaultStyle=rt;var pt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||{},this.properties=e.properties?e.properties:[],this.CLASS_NAME="SuperMap.Plot.ExtendProperty"}var e,o,i;return e=t,(o=[{key:"addProperty",value:function(t,e){var o=this.findProperty(t);return null==o?this.properties.push(new SuperMap.Plot.Property(t,e)):o.setValue(e),!0}},{key:"deleteProperty",value:function(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}},{key:"findProperty",value:function(t){for(var e=0;e<this.properties.length;e++)if(this.properties[e].key===t)return this.properties[e];return null}},{key:"getPropertyValue",value:function(t){for(var e=0;e<this.properties.length;e++)if(this.properties[e].key===t)return this.properties[e].value;return null}},{key:"getPropertyByIndex",value:function(t){return t<this.properties.length?this.properties[t]:null}},{key:"getPropertyCount",value:function(){return this.properties.length}},{key:"destroy",value:function(){this.properties=null}}])&&ut(e.prototype,o),i&&ut(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ht(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.Plot.ExtendProperty=pt;var ct=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||{},this.layerName=e.layerName?e.layerName:null,this.spatialAnalystUrl=e.spatialAnalystUrl?e.spatialAnalystUrl:null,this.useCanvas2=!!e.useCanvas2&&e.useCanvas2,this.useCanvas=!!e.useCanvas&&e.useCanvas,this.features=e.features?e.features:null,this.CLASS_NAME="SuperMap.Plot.LayerDataStruct"}var e,o,i;return e=t,(o=[{key:"destroy",value:function(){this.layerName=null,this.spatialAnalystUrl=null,this.useCanvas2=null,this.useCanvas=null,this.features=null}},{key:"toJSON",value:function(){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)+"}"}}])&&ht(e.prototype,o),i&&ht(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function yt(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.Plot.LayerDataStruct=ct;var gt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||{},this.zoom=e.zoom?e.zoom:null,this.centerX=e.centerX?e.centerX:null,this.centerY=e.centerY?e.centerY:null,this.CLASS_NAME="SuperMap.Plot.MapInfoStruct"}var e,o,i;return e=t,(o=[{key:"destroy",value:function(){this.zoom=null,this.centerX=null,this.centerY=null}},{key:"fromJSON",value:function(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)}},{key:"toJSON",value:function(){return'{"zoom":'+SuperMap.Plot.PlottingUtil.toJSON(this.zoom)+',"centerX":'+SuperMap.Plot.PlottingUtil.toJSON(this.centerX)+',"centerY":'+SuperMap.Plot.PlottingUtil.toJSON(this.centerY)+"}"}}])&&yt(e.prototype,o),i&&yt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ft(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.Plot.MapInfoStruct=gt;var Pt=function(){function t(e,o,i,n,l){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.x=parseFloat(e),this.y=parseFloat(o),(i||0==i)&&(this.z=parseFloat(i)),n&&(this.number=n),l&&(this.time=l),this.CLASS_NAME="SuperMap.Plot.OrbitPoint"}var e,o,i;return e=t,(o=[{key:"destroy",value:function(){this.x=null,this.y=null,this.z=null,this.index=null,this.time=null}},{key:"clone",value:function(t){return null==t&&(t=new SuperMap.Plot.OrbitPoint(this.x,this.y,this.z)),SuperMap.Util.applyDefaults(t,this),t}}])&&ft(e.prototype,o),i&&ft(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function dt(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.Plot.OrbitPoint=Pt;var St=function(){function t(e,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e&&(this.key=e),o&&(this.value=o),this.CLASS_NAME="SuperMap.Plot.Property"}var e,o,i;return e=t,(o=[{key:"setKey",value:function(t){this.key=t}},{key:"getKey",value:function(){return this.key}},{key:"setValue",value:function(t){this.value=t}},{key:"getValue",value:function(){return this.value}},{key:"destroy",value:function(){this.key=null,this.value=null}},{key:"clone",value:function(){return new SuperMap.Plot.Property(this.key,this.value)}}])&&dt(e.prototype,o),i&&dt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function mt(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.Plot.Property=St;var bt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||{},this.id=e.id?e.id:SuperMap.Plot.PlottingUtil.generateUuid(),this.x=e.x?e.x:null,this.y=e.y?e.y:null,this.z=e.z?e.z:null,this.type=e.type?e.type:null,this.name=e.name?e.name:null,this.rotate=e.rotate?e.rotate:0,this.towardNodes=e.towardNodes?e.towardNodes:[],this.style=e.style?e.style:{},0===Object.keys(this.style).length&&(this.style=SuperMap.Util.cloneObject(L.supermap.plotting.PlottingObject.prototype._defaultStyle)),this.CLASS_NAME="SuperMap.Plot.RouteNode"}var e,o,i;return e=t,(o=[{key:"destroy",value:function(){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}},{key:"clone",value:function(){var e=new t({id:this.id,type:this.type,name:this.name,rotate:this.rotate,towardNodes:this.towardNodes});return e.positionPoint=this.positionPoint.clone(),e.style={},e.style=SuperMap.Util.copyAttributes(e.style,this.style),e}},{key:"parseSymbolData",value:function(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 o=new SuperMap.Plot.TowardNode;this.towardNodes.push(o.parseSymbolData(t.towardNodes[e]))}return this}},{key:"setSymbolData",value:function(){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}}])&&mt(e.prototype,o),i&&mt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Lt(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.Plot.RouteNode=bt;var Mt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||{},this.smlInfo=e.smlInfo?e.smlInfo:null,this.mapInfo=e.mapInfo?e.mapInfo:null,this.layerDatas=e.layerDatas?e.layerDatas:null,this.CLASS_NAME="SuperMap.Plot.SitDataStruct"}var e,o,i;return e=t,(o=[{key:"destroy",value:function(){this.smlInfo=null,this.mapInfo=null,this.layerDatas=null}}])&&Lt(e.prototype,o),i&&Lt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function vt(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.Plot.SitDataStruct=Mt;var At=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e&&(this.SMLName=e.SMLName,this.SMLDesc=e.SMLDesc,this.SMLSeclevel=e.SMLSeclevel,this.SMLDepat=e.SMLDepat,this.SMLAuthor=e.SMLAuthor,this.SMLTime=e.SMLTime),this.CLASS_NAME="SuperMap.Plot.SMLInfoStruct"}var e,o,i;return e=t,(o=[{key:"destroy",value:function(){this.SMLName="",this.SMLDesc="",this.SMLAuthor="",this.SMLSeclevel="",this.SMLDepat="",this.SMLTime=""}},{key:"fromJSON",value:function(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}},{key:"toJSON",value:function(){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)+"}"}}])&&vt(e.prototype,o),i&&vt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Tt(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.Plot.SMLInfoStruct=At;var _t=function(){function t(e,o,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),i=i||{},this.libID=e,this.code=o,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"}var e,o,i;return e=t,(o=[{key:"destroy",value:function(){this.libID=null,this.code=null,this.symbolData=null,this.totalNum=null}},{key:"clone",value:function(){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}}])&&Tt(e.prototype,o),i&&Tt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ot(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.Plot.SubSymbol=_t;var xt=function(){function t(e,o,i,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n=n||{},this.textContent=e,this.textPosition=o,void 0!==this.textPosition&&null!==this.textPosition||(this.textPosition=0),this.offsetX=n.offsetX?n.offsetX:0,this.offsetY=n.offsetY?n.offsetY:0,this.border=null!=n.border&&n.border,this.showRelationLine=null==n.showRelationLine||n.showRelationLine,this.paddingX=n.paddingX?n.paddingX:0,this.paddingY=n.paddingY?n.paddingY:0,this.style={display:"display",color:"#ff0000",lineSymbolID:0,opacity:"1.00",weight:2,lineCap:"square",lineJoin:"square",surroundLineColor:"#ffff00",surroundLineColorOpacity:"1.00",surroundLineWidth:4,fillSymbolID:1,fillColor:"#ff0000",fillOpacity:"0.31",fillBackColor:"#ff0000",fillBackOpacity:"1.00",fillGradientMode:"NONE",fontColor:"#000000",fontFamily:"Microsoft YaHei",fontSize:"12",fontStroke:!1,fontStrokeColor:"#ff0000",fontStrokeWidth:"2px",fontBackground:!1,fontBackgroundColor:"#ff0000",fontShadow:!1,fontShadowColor:"#ff0000",fontShadowOffsetX:0,fontShadowOffsetY:0,fontSpace:0,fontPercent:100,sizeFixed:!0,labelAlign:"lt",labelRotation:-0,labelXOffset:0,labelYOffset:0,fillAngle:0,fillCenterOffsetX:0,fillCenterOffsetY:0},null!=i&&(this.style=SuperMap.Util.copyAttributes(this.style,i)),this.lineStyle={color:"#ff0000",lineSymbolID:0,opacity:1,weight:2},null!=n.lineStyle&&(this.lineStyle=SuperMap.Util.copyAttributes(this.lineStyle,n.lineStyle)),this.CLASS_NAME="SuperMap.Plot.SymbolText"}var e,o,i;return e=t,(o=[{key:"destroy",value:function(){this.textContent=null,this.textPosition=null,this.offsetX=null,this.offsetY=null,this.border=null,this.paddingX=null,this.paddingY=null,this.showRelationLine=null,this.style=null,this.lineStyle=null}},{key:"clone",value:function(){var t={offsetX:this.offsetX,offsetY:this.offsetY,border:this.border,paddingX:this.paddingX,paddingY:this.paddingY,showRelationLine:this.showRelationLine},e={};e=SuperMap.Util.copyAttributes(e,this.style);var o=new SuperMap.Plot.SymbolText(this.textContent,this.textPosition,e,t),i={};return i=SuperMap.Util.copyAttributes(i,this.lineStyle),o.lineStyle=i,o}},{key:"setSymbolData",value:function(){var t={};return t.textContent=this.textContent,t.textPosition=this.textPosition,t.offsetX=this.offsetX,t.offsetY=this.offsetY,t.border=this.border,t.paddingX=this.paddingX,t.paddingY=this.paddingY,t.showRelationLine=this.showRelationLine,null!=this.lineStyle&&(t.lineStyle={},null!=this.lineStyle.color&&(t.lineStyle.color=this.lineStyle.color),null!=this.lineStyle.lineSymbolID&&(t.lineStyle.lineSymbolID=this.lineStyle.lineSymbolID),null!=this.lineStyle.dashArray&&(t.lineStyle.dashArray=this.lineStyle.dashArray),null!=this.lineStyle.opacity&&(t.lineStyle.opacity=this.lineStyle.opacity),null!=this.lineStyle.weight&&(t.lineStyle.weight=this.lineStyle.weight)),SuperMap.Plot.AnalysisSymbol.setStyle(this.style,t,!0),t}},{key:"parseSymbolData",value:function(t){return this.textContent=t.textContent,this.textPosition=t.textPosition,this.offsetX=t.offsetX,this.offsetY=t.offsetY,null!=t.border&&(this.border=t.border),null!=t.paddingX&&(this.paddingX=t.paddingX),null!=t.paddingY&&(this.paddingY=t.paddingY),null!=t.showRelationLine&&(this.showRelationLine=t.showRelationLine),null!=t.lineStyle&&(null==this.lineStyle&&(this.lineStyle=null),null!=t.lineStyle.color&&(this.lineStyle.color=t.lineStyle.color),null!=t.lineStyle.lineSymbolID&&(this.lineStyle.lineSymbolID=t.lineStyle.lineSymbolID),null!=t.lineStyle.dashArray&&(this.lineStyle.dashArray=t.lineStyle.dashArray),null!=t.lineStyle.opacity&&(this.lineStyle.opacity=t.lineStyle.opacity),null!=t.lineStyle.weight&&(this.lineStyle.weight=t.lineStyle.weight)),SuperMap.Plot.AnalysisSymbol.getStyle(t,!0),this}}])&&Ot(e.prototype,o),i&&Ot(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function wt(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.Plot.SymbolText=xt;var Et=function(){function t(e,o,i,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n=n||{},this.volume=e,this.position=o,void 0!==this.position&&null!==this.position||(this.position=SuperMap.Plot.Position.TOP),this.offsetX=n.offsetX?n.offsetX:0,this.offsetY=n.offsetY?n.offsetY:0,this.width=n.width?n.width:null,this.height=n.height?n.height:null,this.style={display:"display",color:"#808080",opacity:1,weight:4,remainingVolumeColor:"#00ff00",remainingVolumeOpacity:.8,consumeVolumeColor:"#000000",consumeVolumeOpacity:.8},null!=i&&(this.style=SuperMap.Util.copyAttributes(this.style,i)),this.CLASS_NAME="SuperMap.Plot.BloodVolume"}var e,o,i;return e=t,(o=[{key:"destroy",value:function(){this.volume=null,this.position=null,this.offsetX=null,this.offsetY=null,this.width=null,this.height=null,this.style=null}},{key:"clone",value:function(){var t={offsetX:this.offsetX,offsetY:this.offsetY,width:this.width,height:this.height},e={};return e=SuperMap.Util.copyAttributes(e,this.style),new SuperMap.Plot.BloodVolume(this.volume,this.position,e,t)}},{key:"setSymbolData",value:function(){var t={};t.volume=this.volume,t.position=this.position,t.offsetX=25.4*this.offsetX/SuperMap.Plot.PlottingUtil.DPI,t.offsetY=25.4*this.offsetY/SuperMap.Plot.PlottingUtil.DPI*-1,t.width=25.4*this.width/SuperMap.Plot.PlottingUtil.DPI,t.height=25.4*this.height/SuperMap.Plot.PlottingUtil.DPI,t.visible=null!=this.style.display&&"none"!=this.style.display,t.lineWidth=25.4*this.style.weight/SuperMap.Plot.PlottingUtil.DPI;var e=SuperMap.Plot.PlottingUtil.colorStringToRGB(this.style.color);t.lineColor={alpha:255*this.style.opacity,red:e.red,green:e.green,blue:e.blue};var o=SuperMap.Plot.PlottingUtil.colorStringToRGB(this.style.remainingVolumeColor);t.remainingColor={alpha:255*this.style.remainingVolumeOpacity,red:o.red,green:o.green,blue:o.blue};var i=SuperMap.Plot.PlottingUtil.colorStringToRGB(this.style.consumeVolumeColor);return t.consumeColor={alpha:255*this.style.consumeVolumeOpacity,red:i.red,green:i.green,blue:i.blue},t}},{key:"parseSymbolData",value:function(t){return this.volume=t.volume,this.position=t.position,this.offsetX=Math.ceil(t.offsetX*SuperMap.Plot.PlottingUtil.DPI/25.4),this.offsetY=-1*Math.ceil(t.offsetY*SuperMap.Plot.PlottingUtil.DPI/25.4),null!=t.width&&(this.width=Math.ceil(t.width*SuperMap.Plot.PlottingUtil.DPI/25.4)),null!=t.height&&(this.height=Math.ceil(t.height*SuperMap.Plot.PlottingUtil.DPI/25.4)),null==this.style&&(this.style={}),null!=t.style?(null!=t.style.display&&(this.style.display=t.style.display),null!=t.style.color&&(this.style.color=t.style.color),null!=t.style.opacity&&(this.style.opacity=t.style.opacity),null!=t.style.weight&&(this.style.weight=t.style.weight),null!=t.style.remainingVolumeColor&&(this.style.remainingVolumeColor=t.style.remainingVolumeColor),null!=t.style.remainingVolumeOpacity&&(this.style.remainingVolumeOpacity=t.style.remainingVolumeOpacity),null!=t.style.consumeVolumeColor&&(this.style.consumeVolumeColor=t.style.consumeVolumeColor),t.style.consumeVolumeOpacity&&(this.style.consumeVolumeOpacity=t.style.consumeVolumeOpacity)):(null!=t.visible&&!1===t.visible&&(this.style.display="none"),null!=t.lineColor&&(this.style.color=SuperMap.Plot.PlottingUtil.colorRGBToString(t.lineColor),this.style.opacity=(t.lineColor.alpha/255).toFixed(2)),null!=t.lineWidth&&(this.style.weight=Math.ceil(t.lineWidth*SuperMap.Plot.PlottingUtil.DPI/25.4)),null!=t.remainingColor&&(this.style.remainingVolumeColor=SuperMap.Plot.PlottingUtil.colorRGBToString(t.remainingColor),this.style.remainingVolumeOpacity=(t.remainingColor.alpha/255).toFixed(2)),null!=t.consumeColor&&(this.style.consumeVolumeColor=SuperMap.Plot.PlottingUtil.colorRGBToString(t.consumeColor),this.style.consumeVolumeOpacity=(t.consumeColor.alpha/255).toFixed(2))),this}}])&&wt(e.prototype,o),i&&wt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ct(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.Plot.BloodVolume=Et;var It=function(){function t(e,o,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),i=i||{},this.path=e,this.position=o,void 0!==this.position&&null!==this.position||(this.position=SuperMap.Plot.Position.TOP),this.offsetX=i.offsetX?i.offsetX:0,this.offsetY=i.offsetY?i.offsetY:0,this.width=i.width?i.width:32,this.height=i.height?i.height:32,this.CLASS_NAME="SuperMap.Plot.PictureFrame"}var e,o,i;return e=t,(o=[{key:"destroy",value:function(){this.path=null,this.position=null,this.offsetX=null,this.offsetY=null,this.width=null,this.height=null}},{key:"clone",value:function(){var t={offsetX:this.offsetX,offsetY:this.offsetY,width:this.width,height:this.height};return new SuperMap.Plot.PictureFrame(this.path,this.position,t)}},{key:"setSymbolData",value:function(){var t={};return t.path=this.path,t.position=this.position,t.offsetX=this.offsetX,t.offsetY=this.offsetY,t.width=this.width,t.height=this.height,t}},{key:"parseSymbolData",value:function(t){return this.path=t.path,this.position=t.position,null!=t.offsetX&&(this.offsetX=t.offsetX),null!=t.offsetY&&(this.offsetY=t.offsetY),null!=t.width&&(this.width=t.width),null!=t.height&&(this.height=t.height),this}}])&&Ct(e.prototype,o),i&&Ct(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Rt(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.Plot.PictureFrame=It;var Dt=function(){function t(e,o,i,n,l){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),l=l||{},this.latlngs=[],this.trajectoryLength=e,null==this.trajectoryLength&&(this.trajectoryLength=15),this.showTrackingLine=o,null==this.showTrackingLine&&(this.showTrackingLine=!0),this.showTrackingPoint=i,null==this.showTrackingPoint&&(this.showTrackingPoint=!1),this.saveTrackingPoint=null!=l.saveTrackingPoint&&l.saveTrackingPoint,this.trackingPointStyle=null!=l.trackingPointStyle?l.trackingPointStyle:0,this.trackingPointRadius=null!=l.trackingPointRadius?l.trackingPointRadius:2,this.style={color:"#ff0000",opacity:1,weight:1},null!=n&&(this.style=SuperMap.Util.copyAttributes(this.style,n)),this.CLASS_NAME="SuperMap.Plot.Trajectory"}var e,o,i;return e=t,(o=[{key:"addLatLng",value:function(t){this.latlngs.length>0&&SuperMap.Plot.PlottingUtil.equalFuzzy(t.lat,this.latlngs[this.latlngs.length-1].lat)&&SuperMap.Plot.PlottingUtil.equalFuzzy(t.lng,this.latlngs[this.latlngs.length-1].lng)||(!1===this.saveTrackingPoint&&-1!==this.trajectoryLength&&this.trajectoryLength>0?this.latlngs.length<this.trajectoryLength?this.latlngs.push(L.latLng(t.lat,t.lng)):(this.latlngs.splice(0,this.latlngs.length-this.trajectoryLength+1),this.latlngs.push(L.latLng(t.lat,t.lng))):-1!==this.trajectoryLength&&!0!==this.saveTrackingPoint||this.latlngs.push(L.latLng(t.lat,t.lng)))}},{key:"getDisplayLatLngs",value:function(t){var e=[];if("none"===this.style.display)return e;var o=[],i=0;this.trajectoryLength>0&&this.latlngs.length>this.trajectoryLength&&(i+=this.latlngs.length-this.trajectoryLength);for(var n=i;n<this.latlngs.length&&!t.contains(this.latlngs[n]);n++)if(!0===this.showTrackingLine&&n!==this.latlngs.length-1){0===o.length&&(o.push(t.getNorthWest()),o.push(t.getNorthEast()),o.push(t.getSouthEast()),o.push(t.getSouthWest()),o.push(t.getNorthWest()));for(var l=!1,a=0;a<o.length-1;a++)if(SuperMap.Plot.PlottingUtil.isCross(this.latlngs[n],this.latlngs[n+1],o[a],o[a+1])){l=!0;break}if(l)break}var s=i;for(n>i&&(s=n),n=s;n<this.latlngs.length;n++)e.push(this.latlngs[n]);return e}},{key:"generateUuidKey",value:function(){return this.trackingPointStyle.toString()+"_"+this.trackingPointRadius.toString()+"_"+this.style.color+"_"+this.style.weight.toString()}},{key:"destroy",value:function(){this.latlngs.length=0,this.trajectoryLength=null,this.showTrackingLine=null,this.showTrackingPoint=null,this.saveTrackingPoint=null,this.style=null}},{key:"clone",value:function(){var t={saveTrackingPoint:this.saveTrackingPoint},e={};return e=SuperMap.Util.copyAttributes(e,this.style),new SuperMap.Plot.Trajectory(this.trajectoryLength,this.showTrackingLine,this.showTrackingPoint,e,t)}},{key:"setSymbolData",value:function(){var t={};return t.trajectoryLength=this.trajectoryLength,t.showTrackingLine=this.showTrackingLine,t.showTrackingPoint=this.showTrackingPoint,t.saveTrackingPoint=this.saveTrackingPoint,SuperMap.Plot.AnalysisSymbol.setStyle(this.style,t,!0),t}},{key:"parseSymbolData",value:function(t){return this.trajectoryLength=t.trajectoryLength,this.showTrackingLine=t.showTrackingLine,this.showTrackingPoint=t.showTrackingPoint,this.saveTrackingPoint=t.saveTrackingPoint,SuperMap.Plot.AnalysisSymbol.getStyle(symbolTextData,!0),this}}])&&Rt(e.prototype,o),i&&Rt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ut(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.Plot.Trajectory=Dt;var Nt=function(){function t(e,o,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),i=i||{},this.radius=e,this.pixelRadius=i.pixelRadius?i.pixelRadius:0,this.points=i.points?i.points:0,this.style={display:"display",color:"#ff0000",opacity:1,weight:1,fill:!0,fillColor:"#ff0000",fillOpacity:.5},null!=o&&(this.style=SuperMap.Plot.PlottingUtil.copyAttributes(this.style,o)),this.CLASS_NAME="SuperMap.Plot.DetectionRange"}var e,o,i;return e=t,(o=[{key:"destroy",value:function(){this.pixelRadius=null,this.radius=null,this.points=null,this.style=null}},{key:"clone",value:function(){var t={points:this.points,pixelRadius:this.pixelRadius},e={};return e=SuperMap.Util.copyAttributes(e,this.style),new SuperMap.Plot.DetectionRange(this.radius,e,t)}},{key:"setSymbolData",value:function(){var t={};return t.radius=this.radius,t.pixelRadius=this.pixelRadius,t.points=this.points,null!=this.style&&(t.style={},null!=this.style.display&&(t.style.display=this.style.display),null!=this.style.color&&(t.style.color=this.style.color),null!=this.style.opacity&&(t.style.opacity=this.style.opacity),null!=this.style.weight&&(t.style.weight=this.style.weight),null!=this.style.fill&&(t.style.fill=this.style.fill),null!=this.style.fillColor&&(t.style.fillColor=this.style.fillColor),null!=this.style.fillOpacity&&(t.style.fillOpacity=this.style.fillOpacity)),t}},{key:"parseSymbolData",value:function(t){if(this.radius=t.radius,this.pixelRadius=t.pixelRadius,t.points){this.points=[];for(var e=0;e<t.points.length;e++)this.points.push(new SuperMap.Geometry.Point(t.points[e].x,t.points[e].y))}return null!=t.style&&(null==this.style&&(this.style={}),null!=t.style.display&&(this.style.display=t.style.display),null!=t.style.color&&(this.style.color=t.style.color),null!=t.style.opacity&&(this.style.opacity=t.style.opacity),null!=t.style.weight&&(this.style.weight=t.style.weight),null!=t.style.fill&&(this.style.remainingVolumeColor=t.style.fill),null!=t.style.fillColor&&(this.style.remainingVolumeOpacity=t.style.fillColor),null!=t.style.fillOpacity&&(this.style.consumeVolumeColor=t.style.fillOpacity)),this}}])&&Ut(e.prototype,o),i&&Ut(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Bt(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.Plot.DetectionRange=Nt;var kt=function(){function t(e,o,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.startOrbitPoint=e,this.endOrbitPoint=o,this.type=i,this.CLASS_NAME="SuperMap.Plot.TimeWindowParameter"}var e,o,i;return e=t,(o=[{key:"destroy",value:function(){this.startOrbitPoint=null,this.endOrbitPoint=null,this.type=null}}])&&Bt(e.prototype,o),i&&Bt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ft(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.Plot.TimeWindowParameter=kt;var Vt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||{},this.routeNodeId=e.routeNodeId?e.routeNodeId:null,this.relLineText=e.relLineText?e.relLineText:SuperMap.Plot.RelLineText.ONLEFTLINE,this.index=e.index?e.index:0,this.textContent=e.textContent?e.textContent:null,this.offsetX=e.offsetX?e.offsetX:null,this.offsetY=e.offsetY?e.offsetY:null,this.style=e.style?e.style:{fontSize:12,fontFamily:"Microsoft YaHei"},this.CLASS_NAME="SuperMap.Plot.TowardNode"}var e,o,i;return e=t,(o=[{key:"destroy",value:function(){this.routeNodeId=null,this.relLineText=null,this.textContent=null,this.style=null}},{key:"clone",value:function(){return new t({routeNodeId:this.routeNodeId,relLineText:this.relLineText,textContent:this.textContent,style:SuperMap.Util.cloneObject(this.style)})}},{key:"parseSymbolData",value:function(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}},{key:"setSymbolData",value:function(){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}}])&&Ft(e.prototype,o),i&&Ft(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function jt(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.Plot.TowardNode=Vt;var Yt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||{},this.transType=e.transType?e.transType:SuperMap.Plot.TransactionType.EDIT,this.transInfos=[],this.CLASS_NAME="SuperMap.Plot.Transaction"}var e,o,i;return e=t,(o=[{key:"destroy",value:function(){this.transInfos=null,this.transType=null}}])&&jt(e.prototype,o),i&&jt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function zt(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.Plot.Transaction=Yt;var Gt=function(t,e,o){return e&&zt(t.prototype,e),o&&zt(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}(function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||{},this.layer=e.layer?e.layer:null,this.feature=e.feature?e.feature:null,this.uuid=e.uuid?e.uuid:null,this.functionName=e.functionName?e.functionName:null,this.undoParams=e.undoParams?e.undoParams:null,this.redoParams=e.redoParams?e.redoParams:null,this.propertyName=e.propertyName?e.propertyName:null,this.undoValue=e.undoValue?e.undoValue:null,this.redoValue=e.redoValue?e.redoValue:null,this.CLASS_NAME="SuperMap.Plot.TransactionInfo"});function Wt(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.Plot.TransactionInfo=Gt;var Xt=function(){function t(e,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.feature=e,this._bounds=o}var e,o,i;return e=t,(o=[{key:"destroy",value:function(){this.feature=null}},{key:"getContext",value:function(){return this.feature._map.getRenderer(this.feature.layer)._ctx}},{key:"calculateObjectByBounds",value:function(){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())),o=this.feature._map.latLngToLayerPoint(L.latLng(this._bounds.getCenter()));if(t.x!==e.x||t.y!==e.y){var i=Math.max(t.x,e.x),n=Math.max(t.y,e.y),l=Math.min(t.x,e.x),a=Math.min(t.y,e.y);return{ptMinX:l,ptMinY:a,width:Math.abs(i-l),height:Math.abs(n-a),center:o,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)}}}},{key:"createGradient",value:function(){var t=null;if(this.getContext()instanceof CanvasRenderingContext2D){var e=this.calculateObjectByBounds();if("LINEAR"===this.feature.style.fillGradientMode){var o=this.getGradientDirection(this.feature.style.fillAngle);if(t=this.getContext().createLinearGradient(e.ptMinX+e.width*o.x1,e.ptMinY+e.height*o.y1,e.ptMinX+e.width*o.x2,e.ptMinY+e.height*o.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 i=this.feature.style.fillAngle;0===i||180===i||90===i||270===i?(t.addColorStop(0,SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillBackColor,this.feature.style.fillOpacity)),0!==i&&180!==i||t.addColorStop(this.feature.style.fillCenterOffsetX,SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillColor,this.feature.style.fillOpacity)),90!==i&&270!==i||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 n=this.feature.style.fillCenterOffsetX*e.r,l=this.feature.style.fillCenterOffsetY*e.r,a=e.r/Math.sqrt(2)+Math.abs(n)>e.r/Math.sqrt(2)+Math.abs(l)?e.r/Math.sqrt(2)+Math.abs(n):e.r/Math.sqrt(2)+Math.abs(l);(t=this.getContext().createRadialGradient(e.center.x+n,e.center.y-l,0,e.center.x+n,e.center.y-l,a)).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}}},{key:"createTextureFill",value:function(t){if(0!==t.length){var e=document.createElement("canvas");document.body.appendChild(e);var o=e.getContext("2d");e.width=8,e.height=8;var i=e.width,n=e.height,l=SuperMap.Plot.PlottingUtil.colorStringToRGB(t[0].color);o.strokeStyle="rgba(".concat(l.red,",").concat(l.green,",").concat(l.blue,",").concat(t[0].opacity,")"),o.lineWidth=1;var a=SuperMap.Plot.PlottingUtil.colorStringToRGB(t[1].color);switch(o.fillStyle="rgba(".concat(a.red,",").concat(a.green,",").concat(a.blue,",").concat(t[1].opacity,")"),o.fillRect(0,0,e.width,e.height),o.beginPath(),t[0].fillID){case 0:case 1:break;case 2:o.moveTo(0,n),o.lineTo(i,0);break;case 3:o.moveTo(0,0),o.lineTo(i,0),o.moveTo(0,0),o.lineTo(0,n);break;case 4:o.moveTo(0,n),o.lineTo(i,0),o.moveTo(0,0),o.lineTo(i,n);break;case 5:o.moveTo(0,0),o.lineTo(i,n);break;case 6:o.moveTo(0,0),o.lineTo(i,0);break;case 7:o.moveTo(0,0),o.lineTo(0,n)}o.closePath(),o.stroke(),o.fill();var s=o.createPattern(e,"repeat");return document.body.removeChild(e),s}}},{key:"createFillMode",value:function(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}},{key:"getGradientDirection",value:function(t){var e=function(t){return{x:Math.cos(t),y:Math.sin(t)}},o=function(t){return t*Math.PI/180},i=e(o(180-t%360)),n=e(o(360-t%360)),l=Math.pow(2,-52);return(i.x<=0||Math.abs(i.x)<=l)&&(i.x=0),(i.y<=0||Math.abs(i.y)<=l)&&(i.y=0),(n.x<=0||Math.abs(n.x)<=l)&&(n.x=0),(n.y<=0||Math.abs(n.y)<=l)&&(n.y=0),{x1:i.x,y1:i.y,x2:n.x,y2:n.y}}}])&&Wt(e.prototype,o),i&&Wt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ht(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMap.Plot.CalculateCanvasGradient=Xt;var Zt=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.feature=e}var e,o,i;return e=t,(o=[{key:"destroy",value:function(){this.feature=null}},{key:"createGradient",value:function(){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 o=this.createGradientDirection();for("LINEAR"===this.feature.style.fillGradientMode?((e=null===e?L.SVG.create("linearGradient"):e).setAttributeNS(null,"x1",o.x1),e.setAttributeNS(null,"y1",o.y1),e.setAttributeNS(null,"x2",o.x2),e.setAttributeNS(null,"y2",o.y2)):"RADIAL"===this.feature.style.fillGradientMode&&((e=null===e?L.SVG.create("radialGradient"):e).setAttributeNS(null,"cx",o.cx),e.setAttributeNS(null,"cy",o.cy),e.setAttributeNS(null,"fx",o.fx),e.setAttributeNS(null,"fy",o.fy),e.setAttributeNS(null,"r",o.r));e.hasChildNodes();)e.removeChild(e.firstChild);for(var i=0,n=o.colors.length;i<n;i++){var l=L.SVG.create("stop");l.setAttributeNS(null,"offset",o.colors[i].offset),l.setAttributeNS(null,"style","stop-color:"+SuperMap.Plot.PlottingUtil.colorRGBA(o.colors[i].color,o.colors[i].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}},{key:"createTextureFill",value:function(t){var e=!1;this.feature.layer._renderer._container.defs||(this.feature.layer._renderer._container.defs=L.SVG.create("defs"),e=!0);var o=document.getElementById("patternFill_"+this.feature.uuid);function i(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 n(t,e,o){var i=L.SVG.create("path");i.setAttributeNS(null,"d",t),i.setAttributeNS(null,"stroke",o.color),i.setAttributeNS(null,"stroke-width","2"),i.setAttributeNS(null,"stroke-linecap","square"),i.setAttributeNS(null,"stroke-opacity",o.opacity),e.appendChild(i)}function l(t,e,o){var i=L.SVG.create("polygon");i.setAttributeNS(null,"points",t),i.setAttributeNS(null,"fill",o.color),i.setAttributeNS(null,"fill-opacity",o.opacity),e.appendChild(i)}return o?(o.setAttributeNS(null,"patternTransform",i(t[0]).toString()),3===t[0].fillID||6===t[0].fillID||7===t[0].fillID?(o.setAttributeNS(null,"width",7.3),o.setAttributeNS(null,"height",7.3),o.childNodes[0].setAttributeNS(null,"points","0 0 0 7.3 7.3 7.3 7.3 0"),o.childNodes[1].setAttributeNS(null,"d","M 7.3 0 L 0 0")):(o.setAttributeNS(null,"width",5.4),o.setAttributeNS(null,"height",5.4),o.childNodes[0].setAttributeNS(null,"points","0 0 0 5.4 5.4 5.4 5.4 0"),o.childNodes[1].setAttributeNS(null,"d","M 5.4 0 L 0 0")),o.childNodes[0].setAttributeNS(null,"fill",t[1].color),o.childNodes[0].setAttributeNS(null,"fill-opacity",t[1].opacity),o.childNodes[1].setAttributeNS(null,"stroke",t[0].color),o.childNodes[1].setAttributeNS(null,"stroke-opacity",t[0].opacity),3===t[0].fillID||4===t[0].fillID?(o.childNodes[2]&&(o.childNodes[2].setAttributeNS(null,"stroke",t[0].color),o.childNodes[2].setAttributeNS(null,"stroke-opacity",t[0].opacity)),3===t[0].fillID?null===o&&n("M 0 7.3 L 0 0",o,t[0]):4===t[0].fillID&&null===o&&n("M 0 5.4 L 0 0",o,t[0])):o.childNodes[2]&&o.removeChild(o.childNodes[2]),0===o.id.length&&o.setAttributeNS(null,"id","patternFill_"+this.feature.uuid),o.id):((o=null===o?L.SVG.create("pattern"):o).setAttributeNS(null,"x",0),o.setAttributeNS(null,"y",0),3===t[0].fillID||6===t[0].fillID||7===t[0].fillID?(o.setAttributeNS(null,"width",7.3),o.setAttributeNS(null,"height",7.3)):(o.setAttributeNS(null,"width",5.4),o.setAttributeNS(null,"height",5.4)),o.setAttributeNS(null,"patternUnits","userSpaceOnUse"),o.setAttributeNS(null,"patternTransform",i(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",o,t[1]),n("M 7.3 0 L 0 0",o,t[0])):(l("0 0 0 5.4 5.4 5.4 5.4 0",o,t[1]),n("M 5.4 0 L 0 0",o,t[0])),4===t[0].fillID?n("M 0 5.4 L 0 0",o,t[0]):3===t[0].fillID&&n("M 0 7.3 L 0 0",o,t[0]),this.feature.layer._renderer._container.defs.appendChild(o),e&&this.feature.layer._renderer._container.appendChild(this.feature.layer._renderer._container.defs),0===o.id.length&&o.setAttributeNS(null,"id","patternFill_"+this.feature.uuid),o.id)}},{key:"createFillMode",value:function(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}},{key:"createGradientDirection",value:function(){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}}}}])&&Ht(e.prototype,o),i&&Ht(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Jt(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function qt(){return(qt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Kt(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:o):n.value}}).apply(this,arguments)}function Kt(t){return(Kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}
/* Copyright© 2000 - 2018 SuperMap Software Co.Ltd. All rights reserved.
* This program are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/SuperMap.Plot.CalculateSVGGradient=Zt;var Qt=function(){function t(e,o,i,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.x=parseFloat(e),this.y=parseFloat(o),this.tag=n||0==n?parseFloat(n):null,this.type=i||"Point",this.CLASS_NAME="SuperMapAlgoPlot"}var e,o,i;return e=t,(o=[{key:"clone",value:function(e){return null==e&&(e=new t(this.x,this.y)),SuperMap.Util.applyDefaults(e,this),e}},{key:"calculateBounds",value:function(){this.bounds=new Bounds(this.x,this.y,this.x,this.y)}},{key:"equals",value:function(t){var e=!1;return null!=t&&(e=this.x===t.x&&this.y===t.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(t.x)&&isNaN(t.y)),e}},{key:"move",value:function(t,e){this.x=this.x+t,this.y=this.y+e,this.clearBounds()}},{key:"toShortString",value:function(){return this.x+", "+this.y}},{key:"destroy",value:function(){this.x=null,this.y=null,this.tag=null,qt(Kt(t.prototype),"destroy",this).call(this)}},{key:"getVertices",value:function(t){return[this]}}])&&Jt(e.prototype,o),i&&Jt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();SuperMapAlgoPlot.Point=Qt;SuperMapAlgoPlot.AnalysisSymbol=SuperMapAlgoPlot.AnalysisSymbol||{};function $t(t){"@babel/helpers - typeof";return($t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}SuperMapAlgoPlot.AnalysisSymbol.analysisBasicInfo=function(t){var e=new Object;return e.libID=t.libID,e.code=t.code,e.symbolType=t.symbolType,e.symbolName=t.symbolName,e.textContent=t.textContent,e.minEditPts=t.algoMinEditPts,e.maxEditPts=t.algoMaxEditPts,e.surroundLineType=t.surroundLineType,e},SuperMapAlgoPlot.AnalysisSymbol.analysisDotBasicInfo=function(t){var e=SuperMapAlgoPlot.PlottingUtil.DPI,o=new Object;o.anchorPoint=new SuperMapAlgoPlot.Point(t.anchorPoint.x,t.anchorPoint.y);var i=0,n=0;return void 0!==t.symbolSizeInLib?(i=Math.round(t.symbolSizeInLib.x*e/25.4/10),n=Math.round(t.symbolSizeInLib.y*e/25.4/10)):(i=Math.round(t.symbolSize.x*e/25.4/10),n=Math.round(t.symbolSize.y*e/25.4/10)),o.symbolSizeInLib=new SuperMap.Size(i,n),o.symbolSizeInLib.w=i,o.symbolSizeInLib.h=n,t.middleMarkBounds&&(o.middleMarkBounds=new SuperMap.Bounds(t.middleMarkBounds.leftBottom.x,t.middleMarkBounds.leftBottom.y,t.middleMarkBounds.rightTop.x,t.middleMarkBounds.rightTop.y)),o},SuperMapAlgoPlot.AnalysisSymbol.analysisAlgoBasicInfo=function(t,e){var o=new Object;if(o.subSymbols=[],o.scalePoints=[],o.scaleValues=[],e&&t.subSymbols)for(var i=0;i<t.subSymbols.length;i++)o.subSymbols.push(new SuperMapAlgoPlot.SubSymbol(t.libID,t.subSymbols[i]));if(t.scalePoints){o.scalePoints=[];for(var n=0;n<t.scalePoints.length;n++){var l=new SuperMapAlgoPlot.Point(t.scalePoints[n].x,t.scalePoints[n].y);l.tag=n,l.isScalePoint=!0,o.scalePoints.push(l)}}if(t.scaleValues)for(var a=0;a<t.scaleValues.length;a++)o.scaleValues.push(t.scaleValues[a]);return o},SuperMapAlgoPlot.AnalysisSymbol.analysisSymbolCells=function(t,e){var o=[];if(t&&(function(t,o){if(t.innerCells&&t.innerCells.length)for(var i=0;i<t.innerCells.length;i++){var n=t.innerCells[i];if(t.symbolIsCanFill&&n.type!==SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL){var l=new Object,a=SuperMapAlgoPlot.AnalysisSymbol.getStyle(t,e);l.type=32,l.style={fillSymbolID:a.fillSymbolID,fillColor:a.fillColor,fillOpacity:a.fillOpacity,strokeOpacity:0,strokeWidth:0,fillLimit:!1,lineColorLimit:!0,lineWidthLimit:!0},l.positionPoints=[];for(var s=0;s<n.positionPoints.length;s++){var r=new SuperMapAlgoPlot.Point(n.positionPoints[s].x,n.positionPoints[s].y);l.positionPoints.push(r)}o.push(l)}}}(t,o),t.innerCells)){var i=t.innerCells;if(0!==i.length)for(var n=0;n<i.length;n++)o.push(SuperMapAlgoPlot.AnalysisSymbol.analysisInnerCell(i[n],e))}return o},SuperMapAlgoPlot.AnalysisSymbol.analysisInnerCell=function(t,e){var o=new Object;if(o.positionPoints=[],t){if(void 0!==t.polybezierClose&&(o.polybezierClose=t.polybezierClose),o.type=t.type,o.surroundLineFlag=t.surroundLineFlag,o.textContent=t.textContent,o.style=SuperMapAlgoPlot.AnalysisSymbol.getStyle(t,e),null!=t.positionPoints)for(var i=t.positionPoints,n=0;n<i.length;n++){var l=new SuperMapAlgoPlot.Point(i[n].x,i[n].y);o.positionPoints.push(l)}if(o.style.lineColorLimit=t.lineColorLimit,o.style.lineTypeLimit=t.lineTypeLimit,o.style.lineWidthLimit=t.lineWidthLimit,o.style.fillLimit=t.fillLimit,o.style.fillColorLimit=t.fillColorLimit,o.style.fontColorLimit=t.fontColorLimit,o.style.surroundLineLimit=t.surroundLineLimit,o.style.surroundLineFlag=t.surroundLineFlag,o.style.surroundLineType=t.surroundLineType,34==t.type?o.style.fontColorLimit=!0:o.style.fontColorLimit=t.fontColorLimit,o.type===SuperMapAlgoPlot.SymbolType.RECTANGLESYMBOL){var a=o.positionPoints[0],s=o.positionPoints[1],r=a.clone(),u=new SuperMapAlgoPlot.Point(s.x,a.y),p=s.clone(),h=new SuperMapAlgoPlot.Point(a.x,s.y);o.positionPoints=[],o.positionPoints.push(r),o.positionPoints.push(u),o.positionPoints.push(p),o.positionPoints.push(h),o.type=SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL}o.type===SuperMapAlgoPlot.SymbolType.TEXTSYMBOL&&(o.style.fontSizeLimit=!0)}return o},SuperMapAlgoPlot.AnalysisSymbol.getStyle=function(t,e){function o(t){var e=t.red.toString(16);e.length<2&&(e="0"+e);var o=t.green.toString(16);o.length<2&&(o="0"+o);var i=t.blue.toString(16);return i.length<2&&(i="0"+i),"#"+e+o+i}function i(t){return"TOPLEFT"===t?"lt":"TOPCENTER"===t?"ct":"TOPRIGHT"===t?"rt":"BOTTOMLEFT"===t?"lb":"BOTTOMCENTER"===t?"cb":"BOTTOMRIGHT"===t?"rb":"MIDDLELEFT"===t?"lm":"MIDDLECENTER"===t?"cm":"MIDDLERIGHT"===t?"rm":0===t?"lt":1===t?"ct":2===t?"rt":6===t?"lb":7===t?"cb":8===t?"rb":9===t?"lm":10===t?"cm":11===t?"rm":"lt"}var n=SuperMapAlgoPlot.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=o(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=o(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=o(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=o(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=o(t.style.lineColor),l.opacity=(t.style.lineColor.alpha/255).toFixed(2)):(l.strokeColor=o(t.style.lineColor),l.strokeOpacity=(t.style.lineColor.alpha/255).toFixed(2))),!0===e?null!=t.style.lineWidth?l.weight=Math.ceil(t.style.lineWidth*n/25.4):null!=t.style.weight&&(l.weight=t.style.weight):null!=t.style.lineWidth?l.strokeWidth=Math.ceil(t.style.lineWidth*n/25.4):null!=t.style.strokeWidth&&(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.fontSize=Math.ceil(t.textStyle2D.fontHeight*n/25.4)),void 0!==t.textStyle2D.foreColor&&(l.fontColor=o(t.textStyle2D.foreColor),l.fontOpacity=(t.textStyle2D.foreColor.alpha/255).toFixed(2)),void 0!==t.textStyle2D.align&&(l.labelAlign=i(t.textStyle2D.align)),void 0!==t.textStyle2D.rotation&&(l.labelRotation=-t.textStyle2D.rotation),null!=t.textStyle2D.bold&&(t.textStyle2D.bold?l.fontWeight="bold":l.fontWeight="normal"),l.labelXOffset=0,l.labelYOffset=0,null!=t.textStyle2D.outline?l.fontStroke=t.textStyle2D.outline: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=o(t.textStyle2D.backColor)),t.textStyle2D&&null!=t.textStyle2D.outlineWidth?l.fontStrokeWidth=t.style.outlineWidth*n/25.4:null!=l.fontStrokeWidth&&(l.fontStroke=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*n/25.4),void 0!==t.style.fontShadowOffsetY&&(l.fontShadowOffsetY=t.style.fontShadowOffsetY*n/25.4)):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*n/25.4):l.fontSize=t.textStyle.fontHeight),void 0!==t.textStyle.foreColor&&(l.fontColor=o(t.textStyle.foreColor),l.fontOpacity=(t.textStyle.foreColor.alpha/255).toFixed(2)),void 0!==t.textStyle.align&&(l.labelAlign=i(t.textStyle.align)),void 0!==t.textStyle.rotation&&(l.labelRotation=-t.textStyle.rotation),null!=t.textStyle.bold&&(t.textStyle.bold?l.fontWeight="bold":l.fontWeight="normal"),l.labelXOffset=0,l.labelYOffset=0),void 0!=t.style.fontStroke?l.fontStroke=t.style.fontStroke:t.textStyle2D&&null!=t.textStyle2D.outline&&(l.fontStroke=t.textStyle2D.outline),null!=t.style.fontStrokeColor?l.fontStrokeColor=t.style.fontStrokeColor:t.textStyle2D&&null!=t.textStyle2D.fontStrokeColor?l.fontStrokeColor=t.textStyle2D.fontStrokeColor:t.textStyle2D&&null!=t.textStyle2D.backColor&&(l.fontStrokeColor=o(t.textStyle2D.backColor)),t.textStyle2D&&null!=t.textStyle2D.outlineWidth?l.fontStrokeWidth=t.style.outlineWidth*n/25.4:null!=l.fontStrokeWidth&&(l.fontStroke=t.style.fontStrokeWidth),void 0!==t.style.fontBackground?l.fontBackground=t.style.fontBackground:t.textStyle2D&&null!=t.textStyle2D.backOpaque&&(l.fontBackground=t.textStyle2D.backOpaque),null!=t.style.fontBackgroundColor?l.fontBackgroundColor=t.style.fontBackgroundColor:t.textStyle2D&&null!=t.textStyle2D.fontBackgroundColor?l.fontBackgroundColor=t.textStyle2D.fontBackgroundColor:t.textStyle2D&&null!=t.textStyle2D.backColor&&(l.fontBackgroundColor=o(t.textStyle2D.backColor)),null!=t.style.fontShadow?l.fontShadow=t.style.fontShadow:t.textStyle2D&&null!=t.textStyle2D.shadow&&(l.fontShadow=t.textStyle2D.shadow),void 0!==t.style.fontShadowColor?l.fontShadowColor=t.style.fontShadowColor:t.textStyle2D&&null!=t.textStyle2D.shadowColor&&(l.fontShadowColor=o(t.textStyle2D.shadowColor)),void 0!==t.style.fontShadowOffsetX?l.fontShadowOffsetX=t.style.fontShadowOffsetX*n/25.4:t.textStyle2D&&null!=t.textStyle2D.shadowOffsetX&&(l.fontShadowOffsetX=t.textStyle2D.shadowOffsetX*n/25.4),void 0!==t.style.fontShadowOffsetY?l.fontShadowOffsetY=t.style.fontShadowOffsetY*n/25.4:t.textStyle2D&&null!=t.textStyle2D.shadowOffsetY&&(l.fontShadowOffsetY=t.textStyle2D.shadowOffsetY*n/25.4),void 0!==t.style.fontSpace&&(l.fontSpace=t.style.fontSpace),void 0!==t.style.fontPercent&&(l.fontPercent=t.style.fontPercent),null!=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=o(t.surroundLineColor),l.surroundLineColorOpacity=(t.surroundLineColor.alpha/255).toFixed(2)),void 0!==t.surroundLineWidth2D&&null!=t.surroundLineWidth2D?l.surroundLineWidth=Math.round(t.surroundLineWidth2D*n/25.4):void 0!==t.surroundLineWidth&&null!=t.surroundLineWidth&&(l.surroundLineWidth=Math.round(t.surroundLineWidth*n/25.4)),null!=t.style.graphicWidth&&(l.graphicWidth=t.style.graphicWidth),null!=t.style.graphicHeight&&(l.graphicHeight=t.style.graphicHeight),null!=t.style.graphicOpacity&&(l.graphicOpacity=t.style.graphicOpacity),null!=t.style.graphicXOffset&&(l.graphicXOffset=t.style.graphicXOffset),null!=t.style.graphicYOffset&&(l.graphicYOffset=t.style.graphicYOffset),!1===t.visible?l.display="none":l.display="display",l):l},SuperMapAlgoPlot.AnalysisSymbol.setStyle=function(t,e,o){var i=SuperMapAlgoPlot.PlottingUtil.DPI;if(null!=e)return e.style||(e.style={}),e.textStyle2D||(e.textStyle2D={}),o?(e.style.fillSymbolID=t.fillSymbolID,e.style.fillSymbolID||(e.style.fill=t.fill)):(!1===t.fill?t.fillSymbolID=1:!0===t.fill&&(t.fillSymbolID=0),e.style.fillSymbolID=t.fillSymbolID),null!=t.fillGradientMode&&(e.style.fillGradientMode=t.fillGradientMode),null!=t.fillGradientMode&&("LINEAR"===t.fillGradientMode?e.style.fillGradientMode=1:"RADIAL"===t.fillGradientMode?e.style.fillGradientMode=2:e.style.fillGradientMode=0),null!=t.strokeGradientMode&&("LINEAR"===t.strokeGradientMode?e.style.strokeGradientMode=1:"RADIAL"===t.strokeGradientMode?e.style.strokeGradientMode=2:e.style.strokeGradientMode=0),null!=t.strokeBackColor&&(e.style.strokeBackColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.strokeBackColor)),null!=t.strokeBackOpacity&&null!=t.strokeBackColor&&(e.style.strokeBackColor.alpha=255*t.strokeBackOpacity),null!=t.fillAngle&&void 0!==t.fillAngle&&(e.style.fillAngle=t.fillAngle,e.style.fillGradientAngle=t.fillAngle),null!=t.fillCenterOffsetX&&void 0!==t.fillCenterOffsetX&&(e.style.fillCenterOffsetX=100*t.fillCenterOffsetX,e.style.fillGradientOffsetRatioX=100*t.fillCenterOffsetX),null!=t.fillCenterOffsetY&&void 0!==t.fillCenterOffsetY&&(e.style.fillCenterOffsetY=100*t.fillCenterOffsetY,e.style.fillGradientOffsetRatioY=100*t.fillCenterOffsetY),null!=t.fillColor&&(e.style.fillForeColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.fillColor)),void 0!==t.fillOpacity&&null!=t.fillOpacity&&(e.style.fillOpaqueRate=100*t.fillOpacity,e.style.fillForeColor.alpha=255),null!=t.fillBackColor&&(e.style.fillBackColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.fillBackColor)),null!=t.fillBackOpacity&&(0===t.fillBackOpacity?(e.style.fillBackOpaque=0,e.style.fillBackColor.alpha=255):e.style.fillBackColor&&(e.style.fillBackOpaque=1,e.style.fillBackColor.alpha=255*t.fillBackOpacity)),!0===o&&t.color?e.style.lineColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.color):t.strokeColor&&(e.style.lineColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.strokeColor)),!0===o&&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===o&&t.weight?e.style.lineWidth=25.4*t.weight/i:t.strokeWidth&&(e.style.lineWidth=25.4*t.strokeWidth/i),o?(e.style.lineSymbolID=t.lineSymbolID,e.style.lineSymbolID||(e.style.dashArray=t.dashArray)):"dot"===t.strokeDashstyle?e.style.lineSymbolID=2:"dash"===t.strokeDashstyle||"longdash"===t.strokeDashstyle?e.style.lineSymbolID=1:"dashdot"===t.strokeDashstyle||"longdashdot"===t.strokeDashstyle?e.style.lineSymbolID=3:e.style.lineSymbolID=0,null!=t.fontFamily&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.fontName=t.fontFamily:e.textStyle&&null!=e.textStyle&&(e.textStyle.fontName=t.fontFamily)),null!=t.sizeFixed&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.sizeFixed=t.sizeFixed:e.textStyle&&null!=e.textStyle&&(e.textStyle.sizeFixed=t.sizeFixed)),null!=t.fontSize&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.fontHeight=25.4*t.fontSize/i:e.textStyle&&null!=e.textStyle&&(e.textStyle.fontHeight=25.4*t.fontSize/i)),null!=t.fontWeight&&(e.textStyle2D&&null!=e.textStyle2D?"bold"===t.fontWeight?e.textStyle2D.bold=!0:e.textStyle2D.bold=!1:e.textStyle&&null!=e.textStyle&&("bold"===t.fontWeight?e.textStyle.bold=!0:e.textStyle.bold=!1)),null!=t.fontColor&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.foreColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.fontColor):e.textStyle&&null!=e.textStyle&&(e.textStyle.foreColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.fontColor))),null!=t.fontOpacity&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.foreColor.alpha=255*t.fontOpacity:e.textStyle&&null!=e.textStyle&&(e.textStyle.foreColor.alpha=255*t.fontOpacity)),null!=t.labelRotation&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.rotation=-t.labelRotation:e.textStyle&&null!=e.textStyle&&(e.textStyle.rotation=-t.labelRotation)),void 0!==t.fontStroke&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.outline=t.fontStroke:e.textStyle&&null!=e.textStyle&&(e.textStyle.outline=t.fontStroke)),null!=t.fontStrokeColor&&(e.textStyle2D.fontStrokeColor=t.fontStrokeColor),void 0!==t.fontStrokeWidth&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.outlineWidth=25.4*t.fontStrokeWidth/i:e.textStyle&&null!=e.textStyle&&(e.textStyle.outlineWidth=25.4*t.fontStrokeWidth/i)),void 0!==t.fontBackground&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.backOpaque=t.fontBackground:e.textStyle&&null!=e.textStyle&&(e.textStyle.backOpaque=t.fontBackground)),void 0!==t.fontBackgroundColor&&(e.textStyle2D.fontBackgroundColor=t.fontBackgroundColor),null!=t.fontBackground&&!0===t.fontBackground?e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.backColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.fontBackgroundColor):e.textStyle&&null!=e.textStyle&&(e.textStyle.backColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.fontBackgroundColor)):null!=t.fontStroke&&!0===t.fontStroke&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.backColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.fontStrokeColor):e.textStyle&&null!=e.textStyle&&(e.textStyle.backColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.fontStrokeColor))),void 0!==t.fontShadow&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.shadow=t.fontShadow:e.textStyle&&null!=e.textStyle&&(e.textStyle.shadow=t.fontShadow)),void 0!==t.fontShadowColor&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.shadowColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.fontShadowColor):e.textStyle&&null!=e.textStyle&&(e.textStyle.shadowColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.fontShadowColor))),void 0!==t.fontShadowOffsetX&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.shadowOffsetX=25.4*t.fontShadowOffsetX/i:e.textStyle&&null!=e.textStyle&&(e.textStyle.shadowOffsetX=25.4*t.fontShadowOffsetX/i)),void 0!==t.fontShadowOffsetY&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.shadowOffsetY=25.4*t.fontShadowOffsetY/i:e.textStyle&&null!=e.textStyle&&(e.textStyle.shadowOffsetY=25.4*t.fontShadowOffsetY/i)),void 0!==t.fontSpace&&(e.style.fontSpace=t.fontSpace),void 0!==t.fontPercent&&(e.style.fontPercent=t.fontPercent),void 0!==t.fontWeight&&(e.style.fontWeight=t.fontWeight),void 0!==t.fontStyle&&(e.style.fontStyle=t.fontStyle),t.surroundLineColor&&(e.surroundLineColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(t.surroundLineColor)),null!=t.surroundLineColorOpacity&&void 0!==t.surroundLineColorOpacity&&(e.surroundLineColor.alpha=255*t.surroundLineColorOpacity),null!=t.surroundLineWidth&&(e.surroundLineWidth2D=25.4*t.surroundLineWidth/i),void 0!==t.labelAlign&&("lt"===t.labelAlign?e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.align=0:e.textStyle&&null!=e.textStyle&&(e.textStyle.align=0):"ct"===t.labelAlign?e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.align=1:e.textStyle&&null!=e.textStyle&&(e.textStyle.align=1):"rt"===t.labelAlign?e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.align=2:e.textStyle&&null!=e.textStyle&&(e.textStyle.align=2):"lb"===t.labelAlign?e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.align=6:e.textStyle&&null!=e.textStyle&&(e.textStyle.align=6):"cb"===t.labelAlign?e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.align=7:e.textStyle&&null!=e.textStyle&&(e.textStyle.align=7):"rb"===t.labelAlign?e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.align=8:e.textStyle&&null!=e.textStyle&&(e.textStyle.align=8):"lm"===t.labelAlign?e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.align=9:e.textStyle&&null!=e.textStyle&&(e.textStyle.align=9):"cm"===t.labelAlign?e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.align=10:e.textStyle&&null!=e.textStyle&&(e.textStyle.align=10):"rm"===t.labelAlign&&(e.textStyle2D&&null!=e.textStyle2D?e.textStyle2D.align=11:e.textStyle&&null!=e.textStyle&&(e.textStyle.align=11))),null!=t.graphicWidth&&(e.style.graphicWidth=t.graphicWidth),null!=t.graphicHeight&&(e.style.graphicHeight=t.graphicHeight),null!=t.graphicOpacity&&(e.style.graphicOpacity=t.graphicOpacity),null!=t.graphicXOffset&&(e.style.graphicXOffset=t.graphicXOffset),null!=t.graphicYOffset&&(e.style.graphicYOffset=t.graphicYOffset),t.display&&"none"===t.display?e.visible=!1:e.visible=!0,t},SuperMapAlgoPlot.AnalysisSymbol.mergeDefaultStyleToFeature=function(t,e,o){var i,n;i=t.style,n=!0!==o?t.geometry:t,e&&!0===e.defaultFlag&&!1===n.isEdit&&(n.surroundLineType=e.surroundLineType,i.surroundLineColor=e.surroundLineColor,i.surroundLineWidth=e.surroundLineWidth,i.surroundLineColorOpacity=e.surroundLineColorOpacity,i.fillBackColor=e.fillBackColor,i.fillBackOpacity=e.fillBackOpacity,i.fillGradientMode=e.fillGradientMode,i.fillCenterOffsetX=e.fillCenterOffsetX,i.fillCenterOffsetY=e.fillCenterOffsetY,i.fillAngle=e.fillAngle,!0===o?(i.color=e.lineColor,i.weight=e.lineWidth,i.opacity=e.lineOpacity,i.lineSymbolID=e.lineType,i.lineCap=e.lineCap,i.lineJoin=e.lineJoin):(i.strokeColor=e.lineColor,i.strokeWidth=e.lineWidth,i.strokeOpacity=e.lineOpacity,i.strokeDashstyle=e.lineType,i.strokeLinecap=e.lineCap,i.strokeLinejoin=e.lineJoin),i.fillSymbolID=e.fillSymbolID,i.fillColor=e.fillColor,i.fillOpacity=e.fillOpacity,i.fontColor=e.fontColor,i.fontOpacity=e.fontOpacity,i.fontSize=e.fontSize,i.fontFamily=e.fontFamily,i.fontWeight=e.fontWeight,i.fontStyle=e.fontStyle,i.fontStroke=e.fontStroke,i.fontStrokeColor=e.fontStrokeColor,i.fontStrokeWidth=e.fontStrokeWidth,i.fontBackground=e.fontBackground,i.fontBackgroundColor=e.fontBackgroundColor,i.fontShadow=e.fontShadow,i.fontShadowColor=e.fontShadowColor,i.fontShadowOffsetX=e.fontShadowOffsetX,i.fontShadowOffsetY=e.fontShadowOffsetY,i.fontSpace=e.fontSpace,i.fontPercent=e.fontPercent,i.strokeGradientMode=e.strokeGradientMode,i.strokeBackColor=e.strokeBackColor,i.strokeBackOpacity=e.strokeBackOpacity)},SuperMapAlgoPlot.AnalysisSymbol.mergeSymbolDataAndServerData=function(t,e){Object.prototype.hasOwnProperty.call(t,"algoMinEditPts")||(t.algoMinEditPts=e.algoMinEditPts),Object.prototype.hasOwnProperty.call(t,"algoMaxEditPts")||(t.algoMaxEditPts=e.algoMaxEditPts),Object.prototype.hasOwnProperty.call(t,"innerCells")||(t.innerCells=SuperMap.Util.cloneObject(e.innerCells)),Object.prototype.hasOwnProperty.call(t,"symbolRanks")||(t.symbolRanks=SuperMap.Util.cloneObject(e.symbolRanks)),Object.prototype.hasOwnProperty.call(t,"symbolSizeInLib")||(t.symbolSizeInLib=SuperMap.Util.cloneObject(e.symbolSize)),Object.prototype.hasOwnProperty.call(t,"middleMarkExist")||(t.middleMarkExist=SuperMap.Util.cloneObject(e.middleMarkExist)),Object.prototype.hasOwnProperty.call(t,"middleMarkBounds")||(t.middleMarkBounds=SuperMap.Util.cloneObject(e.middleMarkBounds)),Object.prototype.hasOwnProperty.call(t,"anchorPoint")||(t.anchorPoint=SuperMap.Util.cloneObject(e.anchorPoint))},SuperMapAlgoPlot.AnalysisSymbol.setSymbolData=function(t,e,o){null==e&&(e={}),Object.prototype.hasOwnProperty.call(e,"type")||(0!=t.libID||t.code!=SuperMap.Plot.SymbolType.GROUPOBJECT&&t.code!=SuperMap.Plot.SymbolType.FLAGGROUP?e.type="GRAPHICOBJECT":e.type="GraphicCollection"),Object.prototype.hasOwnProperty.call(e,"version")||(e.version=2),e.isEdit=!0,e.uuid=t.uuid,e.associatedUuid=t.associatedUuid,Object.prototype.hasOwnProperty.call(e,"rotate2D")?e.rotate2D.x=t.dRotate:e.rotate2D={x:t.dRotate,y:0,z:0},Object.prototype.hasOwnProperty.call(e,"scale2D")?e.scale2D.x=t.dScale:e.scale2D={x:t.dScale,y:0,z:0},e.libID=t.libID,e.code=t.code,e.algoMaxEditPts=t.maxEditPts,e.algoMinEditPts=t.minEditPts,e.symbolType=t.symbolType,e.symbolName=t.symbolName,e.annotationPosition=null!=t.annotationPosition?t.annotationPosition:t.textPosition,e.textContent=t.textContent,e.textDisplay=t.textDisplay,e.scaleByMap=t.scaleByMap,e.resolution=t.resolution,e.isLocked=t.isLocked,e.note=t.note,e.custom=t.custom,e.subSymbols=[];for(var i=0;i<t.subSymbols.length;i++){var n=t.subSymbols[i];e.subSymbols.push({libID:n.libID,code:n.code,symbolData:n.symbolData,textContent:n.textContent,totalNum:n.totalNum})}e.extendProperty=[];for(var l=t.getExtendProperty().getPropertyCount(),a=0;a<l;a++){var s=t.getExtendProperty().getPropertyByIndex(a);e.extendProperty.push({key:s.key,value:s.value})}e.avoidRegions=[];for(var r=0;r<t.avoidRegions.length;r++){for(var u=[],p=0;p<t.avoidRegions[0].latLngs.length;p++)u.push({x:t.avoidRegions[0].getLatLngs()[p].lng,y:t.avoidRegions[0].getLatLngs()[p].lat,z:0});e.avoidRegions.push(u)}if(!0===o?SuperMapAlgoPlot.AnalysisSymbol.setStyle(t.style,e,o):null!=t.feature&&SuperMapAlgoPlot.AnalysisSymbol.setStyle(t.feature.style,e),t.symbolType===SuperMapAlgoPlot.SymbolType.AIRROUTE||t.symbolType===SuperMapAlgoPlot.SymbolType.NAVYROUTE||t.symbolType===SuperMapAlgoPlot.SymbolType.MISSILEROUTE){for(var h in e.routeNodes=[],t.routeNodes)e.routeNodes.push(t.routeNodes[h].setSymbolData());e.arrRoutePts=t.arrRoutePts,o||SuperMapAlgoPlot.AnalysisSymbol.setStyle(t.lineStyle,e)}else if(t.symbolType===SuperMapAlgoPlot.SymbolType.GROUPOBJECT||t.symbolType===SuperMapAlgoPlot.SymbolType.FLAGGROUP||t.symbolType===SuperMapAlgoPlot.SymbolType.NAVYDEPLOYMENT||t.symbolType===SuperMapAlgoPlot.SymbolType.AIRDEPLOYMENT){if(e.subAssociatedUuids=t.subAssociatedUuids,e.geometries=[],o)for(p=0;p<t.subObjects.length;p++)e.geometries.push(t.subObjects[p].getSymbolData());else for(var c=0;c<t.components.length;c++)e.geometries.push(t.components[c].geometry.getSymbolData());0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.FLAGGROUP?e.ratios=t.ratio:0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.AIRDEPLOYMENT?(e.colNum=t.colNum,e.speceDis=t.speceDis,e.isShowTooltip=t.isShowTooltip):0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.NAVYDEPLOYMENT&&(e.colNum=t.colNum,e.speceDis=t.speceDis)}else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.SYMBOLTEXT){var y=[];for(var g in t.symbolTexts)y.push(t.symbolTexts[g].setSymbolData());e.symbolTexts=y,e.addFrame=t.addFrame}else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.SYMBOLTEXT1)e.space=t.space,e.offsetX=t.offsetX,e.offsetY=t.offsetY;else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.TRAJECTORY)e.trajectoryType=t.trajectoryType,e.trajectoryLength=t.trajectoryLength,e.showTrackingLine=t.showTrackingLine,e.showTrackingPoint=t.showTrackingPoint,e.trackingPointRadius=t.trackingPointRadius,e.saveTrackingPoint=t.saveTrackingPoint;else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.SATELLITE){if(Object.prototype.hasOwnProperty.call(e,"scaleValues"))for(var f=0;f<t.scaleValues.length;f++)e.scaleValues.length>f?e.scaleValues[f]=t.scaleValues[f]:e.scaleValues.push(t.scaleValues[f]);else e.scaleValues=[],e.scaleValues=t.scaleValues;e.visible=t.visible,e.orbitPoints=t.orbitPoints}else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.SATELLITETIMEWINDOWS)e.timeWindows=t.timeWindows;else{var P;P=!0===o?L.Util.latLngsToSuperMapPoints(t.getLatLngs()):t.controlPoints,e.localePoints=[];var d=P.length;t.symbolType===SuperMapAlgoPlot.SymbolType.ELLIPSESYMBOL&&(d=3);for(var S=0;S<d;S++)e.localePoints.push({x:P[S].x,y:P[S].y,z:0});if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.LINERELATION)e.endAssociation=t.endAssociatedUuid,e.lineRelationType=t.lineRelationType,e.startAssociation=t.startAssociatedUuid,e.subSectionCount=t.subSectionCount;else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.PICTURE){if(e.path=t.path,e.symbolTexts=[],null!=t.symbolTexts&&0!=t.symbolTexts.length)for(var m=0;m<t.symbolTexts.length;m++)e.symbolTexts.push(t.symbolTexts[m].setSymbolData());if(e.bloodVolumes=[],null!=t.bloodVolumes&&0!=t.bloodVolumes.length)for(var b=0;b<t.bloodVolumes.length;b++)e.bloodVolumes.push(t.bloodVolumes[b].setSymbolData());null!=t.trajectory&&(e.trajectory=t.trajectory.setSymbolData()),null!=e.antoRotation&&(t.antoRotation=e.antoRotation)}else if(t.symbolType===SuperMapAlgoPlot.SymbolType.DOTSYMBOL){e.surroundLineType=t.surroundLineType,e.symbolRank=t.symbolRank,e.negativeImage=t.negativeImage,e.horizontalMirror=t.horizontalMirror,e.verticalMirror=t.verticalMirror,e.space=25.4*t.space/SuperMapAlgoPlot.PlottingUtil.DPI,e.flagTextSize=t.flagTextSize,e.maxScale=t.maxScale,e.minScale=t.minScale,e.actualScale=t.actualScale,void 0!==t.fontSize&&(e.fontSize=t.fontSize),void 0!==t.strokeWidth&&(e.strokeWidth=t.strokeWidth);var M=25.4*t.symbolSize.w*10/SuperMapAlgoPlot.PlottingUtil.DPI,v=25.4*t.symbolSize.h*10/SuperMapAlgoPlot.PlottingUtil.DPI;e.symbolSize={x:M,y:v};var A=25.4*t.symbolSizeInLib.w*10/SuperMapAlgoPlot.PlottingUtil.DPI,T=25.4*t.symbolSizeInLib.h*10/SuperMapAlgoPlot.PlottingUtil.DPI;if(e.symbolSizeInLib={x:A,y:T},e.positionOffset=t.positionOffset,e.positionOffsetType=t.positionOffsetType,e.positionOffsetX=25.4*t.positionOffsetX*10/SuperMapAlgoPlot.PlottingUtil.DPI,e.positionOffsetY=25.4*t.positionOffsetY*10/SuperMapAlgoPlot.PlottingUtil.DPI*-1,!1===t.widthHeightLimit||!0===t.widthHeightLimit?e.limitWidthHeight=t.widthHeightLimit:e.limitWidthHeight=t.limitWidthHeight,e.symbolTexts=[],null!=t.symbolTexts&&0!=t.symbolTexts.length)for(var _=0;_<t.symbolTexts.length;_++)e.symbolTexts.push(t.symbolTexts[_].setSymbolData());if(e.bloodVolumes=[],null!=t.bloodVolumes&&0!=t.bloodVolumes.length)for(var O=0;O<t.bloodVolumes.length;O++)e.bloodVolumes.push(t.bloodVolumes[O].setSymbolData());if(e.pictureFrames=[],null!=t.pictureFrames&&0!=t.pictureFrames.length)for(var x=0;x<t.pictureFrames.length;x++)e.pictureFrames.push(t.pictureFrames[x].setSymbolData());null!=t.trajectory&&(e.trajectory=t.trajectory.setSymbolData()),null!=e.antoRotation&&(t.antoRotation=e.antoRotation)}else{if(e.surroundLineType=t.surroundLineType,Object.prototype.hasOwnProperty.call(e,"scaleValues"))for(var w=0;w<t.scaleValues.length;w++)e.scaleValues.length>w?e.scaleValues[w]=t.scaleValues[w]:e.scaleValues.push(t.scaleValues[w]);else e.scaleValues=[],e.scaleValues=t.scaleValues;e.subSymbolScaleValue=t.subSymbolScaleValue,e.baseScale=t.baseScale,e.strokeWidth=t.strokeWidth,e.polylineConnectLocationPoint=t.polylineConnectLocationPoint,22===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.ALGOSYMBOL?(e.arrowHeadType=t.arrowHeadType,e.arrowBodyType=t.arrowBodyType,e.arrowTailType=t.arrowTailType):0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.ARROWLINE?e.arrowAngle=t.arrowAngle:0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.COMBINATIONALCIRCLE?e.defaultRadius=t.defaultRadius:0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.CONCENTRICCIRCLE||(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.LINEMARKING?(e.islocationCircle=t.islocationCircle,e.textBoxType=t.textBoxType):0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.SYMBOLTEXTBOX?(e.roundBox=t.roundBox,e.textBoxType=t.textBoxType):0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.PATHTEXT?(e.isAvoid=t.isAvoid,e.isCurve=t.isCurve,e.relLineText=t.relLineText,e.showPathLine=t.showPathLine,e.textToLineDistance=t.textToLineDistance,e.showPathLineArrow=t.showPathLineArrow):0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.ARCREGION&&(o?(e.centerPoint={x:t.centerPoint.lng,y:t.centerPoint.lat},e.circlePts=t.circlePts,e.spatialAnalystUrl=t.spatialAnalystUrl):e.centerPoint=t.centerPoint,e.endAngle=t.endAngle,e.radius=t.radius,e.radiusPosAngle=t.radiusPosAngle,e.startAngle=t.startAngle,e.textPosition=t.textPosition,e.radiusLineType=t.radiusLineType,e.radiusText=t.radiusText))}}t.symbolData=e},SuperMapAlgoPlot.AnalysisSymbol.parseSymbolData=function(t,e,o){if(null!=e){if(null!=e.isEdit&&(t.isEdit=e.isEdit),Object.prototype.hasOwnProperty.call(e,"version")&&(t.version=e.version),Object.prototype.hasOwnProperty.call(e,"libID")&&(t.libID=parseInt(e.libID)),Object.prototype.hasOwnProperty.call(e,"code")&&(t.code=parseInt(e.code)),Object.prototype.hasOwnProperty.call(e,"algoMaxEditPts")&&(t.maxEditPts=parseInt(e.algoMaxEditPts)),Object.prototype.hasOwnProperty.call(e,"algoMinEditPts")&&(t.minEditPts=parseInt(e.algoMinEditPts)),Object.prototype.hasOwnProperty.call(e,"symbolType")&&(t.symbolType=parseInt(e.symbolType)),Object.prototype.hasOwnProperty.call(e,"symbolName")&&(t.symbolName=e.symbolName),Object.prototype.hasOwnProperty.call(e,"textContent")&&(t.textContent=e.textContent),Object.prototype.hasOwnProperty.call(e,"bubbleHeight")&&(t.bubbleHeight=e.bubbleHeight),Object.prototype.hasOwnProperty.call(e,"bubbleWidth")&&(t.bubbleWidth=e.bubbleWidth),Object.prototype.hasOwnProperty.call(e,"description")&&(t.description=e.description),Object.prototype.hasOwnProperty.call(e,"mediaList")&&(t.mediaList=e.mediaList),null!=e.dScale?t.dScale=e.dScale:void 0!==e.scale2D&&(t.dScale=e.scale2D.x),null!=e.dRotate?t.dRotate=e.dRotate:void 0!==e.rotate2D&&(t.dRotate=e.rotate2D.x),null!=e.resolution&&(t.resolution=e.resolution),null!=e.uuid&&(t.uuid=e.uuid),null!=e.associatedUuid&&(t.associatedUuid=e.associatedUuid),null!=e.textDisplay&&(t.textDisplay=e.textDisplay),null!=e.annotationPosition&&(o?t.annotationPosition=e.annotationPosition:t.textPosition=e.annotationPosition),null!=e.scaleByMap&&(t.scaleByMap=e.scaleByMap),void 0!==e.isLocked&&(t.isLocked=e.isLocked),void 0!==e.note&&(t.note=e.note),void 0!==e.custom&&(t.custom=e.custom),e.extendProperty)for(var i=0;i<e.extendProperty.length;i++){var n=e.extendProperty[i];t.extendProperty.addProperty(n.key,n.value)}if(Object.prototype.hasOwnProperty.call(e,"subSymbols")&&null!=e.subSymbols){t.subSymbols=[];for(var l=0;l<e.subSymbols.length;l++){var a=e.subSymbols[l].libID;void 0===a&&(a=t.libID);var s=e.subSymbols[l].code;if(void 0!==s){var r={};void 0!==e.subSymbols[l].textContent&&(r.textContent=e.subSymbols[l].textContent),void 0!==e.subSymbols[l].totalNum&&(r.totalNum=e.subSymbols[l].totalNum),void 0!==e.subSymbols[l].symbolData&&(r.symbolData=e.subSymbols[l].symbolData),t.subSymbols.push(new SuperMapAlgoPlot.SubSymbol(a,s,r))}}}if(e.avoidRegions&&0!==e.avoidRegions.length)for(var u=0;u<e.avoidRegions.length;u++){var p=null;if(Object.prototype.hasOwnProperty.call(e.avoidRegions[u][0],"controlPoints")){var h={libID:0,code:SuperMapAlgoPlot.SymbolType.AVOIDREGION,map:t.map,symbolData:e.avoidRegions[u][0]};if(o)(p=L.supermap.plotting.avoidRegion(0,SuperMapAlgoPlot.SymbolType.AVOIDREGION,[],h)).style=SuperMapAlgoPlot.AnalysisSymbol.getStyle(t.symbolData.avoidRegions[u][1],!0);else{p=new SuperMap.Geometry.AvoidRegion(h);var c=new SuperMap.Feature.Vector(p);c.style=SuperMapAlgoPlot.AnalysisSymbol.getStyle(e.avoidRegions[u][1],o),p.feature=c,p.calculateParts()}}else{for(var y=[],g=0;g<e.avoidRegions[u].length;g++)y.push(new SuperMapAlgoPlot.Point(e.avoidRegions[u][g].x,e.avoidRegions[u][g].y));if(o){var f={libID:0,code:SuperMapAlgoPlot.SymbolType.AVOIDREGION,map:t.map,latLngs:L.Util.superMapPointsToLatLngs(y)};p=L.supermap.plotting.avoidRegion(0,SuperMapAlgoPlot.SymbolType.AVOIDREGION,[],f)}else{var P={libID:0,code:SuperMapAlgoPlot.SymbolType.AVOIDREGION,map:t.map,controlPoints:y};p=new SuperMap.Geometry.AvoidRegion(P);var d=new SuperMap.Feature.Vector(p);p.feature=d,p.calculateParts()}}t.avoidRegions.push(p)}if(!0===o){var S=SuperMapAlgoPlot.AnalysisSymbol.getStyle(e,!0);SuperMap.Util.applyDefaults(S,t.style),t.style=S}if(t.symbolType===SuperMapAlgoPlot.SymbolType.AIRROUTE||t.symbolType===SuperMapAlgoPlot.SymbolType.NAVYROUTE||t.symbolType===SuperMapAlgoPlot.SymbolType.MISSILEROUTE){for(var m in t.routeNodes=[],e.routeNodes){var b=new SuperMapAlgoPlot.RouteNode;t.routeNodes.push(b.parseSymbolData(e.routeNodes[m]))}t.arrRoutePts=[];for(var M=0;M<e.arrRoutePts.length;M++){for(var v=[],A=0;A<e.arrRoutePts[M].length;A++)Object.prototype.hasOwnProperty.call(e.arrRoutePts[M][A],"lat")&&Object.prototype.hasOwnProperty.call(e.arrRoutePts[M][A],"lng")?v.push(new SuperMapAlgoPlot.Point(e.arrRoutePts[M][A].lng,e.arrRoutePts[M][A].lat)):void 0===e.arrRoutePts[M][A].x&&void 0===e.arrRoutePts[M][A].y||v.push(new SuperMapAlgoPlot.Point(e.arrRoutePts[M][A].x,e.arrRoutePts[M][A].y));o&&(v=L.Util.superMapPointsToLatLngs(v)),t.arrRoutePts.push(v)}o||(t.lineStyle=SuperMapAlgoPlot.AnalysisSymbol.getStyle(e,!1))}else if(t.symbolType===SuperMapAlgoPlot.SymbolType.GROUPOBJECT||t.symbolType===SuperMapAlgoPlot.SymbolType.FLAGGROUP||t.symbolType===SuperMapAlgoPlot.SymbolType.NAVYDEPLOYMENT||t.symbolType===SuperMapAlgoPlot.SymbolType.AIRDEPLOYMENT){if(null!=e.subAssociatedUuids&&(t.subAssociatedUuids=e.subAssociatedUuids),null!=e.geometries)if(o){for(var T=[],_=0;_<e.geometries.length;_++){var O=e.geometries[_];O.uuid=SuperMapAlgoPlot.PlottingUtil.generateUuid();var x=L.supermap.plotting.PlottingObject.createSymbol(O.libID,O.code,null,{symbolData:O});T.push(x)}t.subObjects=T}else for(var w=0;w<e.geometries.length;w++){var E=e.geometries[w],C=SuperMap.Geometry.PlottingGeometry.createFeature(E.libID,E.code,null,{symbolData:E,map:t.map});C.geometry.ownGroupObj=t,t.components.push(C)}else if(o){T=[];for(var I=0;I<e.subFeatures.length;I++){var R=e.subFeatures[I];R.uuid=SuperMapAlgoPlot.PlottingUtil.generateUuid();var D=L.supermap.plotting.PlottingObject.createSymbol(R.libID,R.code,null,{symbolData:R});T.push(D)}t.subObjects=T}else for(var U=0;U<e.subFeatures.length;U++){var N=e.subFeatures[U],B=SuperMap.Geometry.PlottingGeometry.createFeature(N.libID,N.code,null,{symbolData:N,map:t.map});B.geometry.ownGroupObj=t,t.components.push(B)}0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.FLAGGROUP&&(null!=e.ratios?t.ratios=e.ratios:null!=e.ratio&&(t.ratios=e.ratio)),0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.AIRDEPLOYMENT&&(t.colNum=e.colNum,t.speceDis=e.speceDis,t.isShowTooltip=e.isShowTooltip),0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.NAVYDEPLOYMENT&&(t.colNum=e.colNum,t.speceDis=e.speceDis)}else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.SYMBOLTEXT){t.addFrame=e.addFrame,t.symbolTexts=[];for(var k=0,F=e.symbolTexts.length;k<F;k++){var V=new SuperMapAlgoPlot.SymbolText;V.parseSymbolData(e.symbolTexts[k]),t.symbolTexts.push(V)}}else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.SYMBOLTEXT1)void 0!==e.space&&(t.space=e.space),void 0!==e.offsetX&&(t.offsetX=e.offsetX),void 0!==e.offsetY&&(t.offsetY=e.offsetY);else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.TRAJECTORY)void 0!==e.trajectoryType&&(t.trajectoryType=e.trajectoryType),void 0!==e.trajectoryLength&&(t.trajectoryLength=e.trajectoryLength),void 0!==e.showTrackingLine&&(t.showTrackingLine=e.showTrackingLine),void 0!==e.showTrackingPoint&&(t.showTrackingPoint=e.showTrackingPoint),void 0!==e.trackingPointRadius&&(t.trackingPointRadius=e.trackingPointRadius),void 0!==e.saveTrackingPoint&&(t.saveTrackingPoint=e.saveTrackingPoint);else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.SATELLITE){if(e.scaleValues&&0!==e.scaleValues.length){t.scaleValues=[];for(var j=0;j<e.scaleValues.length;j++)t.scaleValues.push(e.scaleValues[j])}if(e.subSymbol&&(t.subSymbols=[e.subSymbol]),t.visible=e.visible,e.orbitPoints){t.orbitPoints=[];for(var Y=0;Y<e.orbitPoints.length;Y++)t.orbitPoints.push(new SuperMapAlgoPlot.OrbitPoint(e.orbitPoints[Y].x,e.orbitPoints[Y].y,e.orbitPoints[Y].z,e.orbitPoints[Y].number,e.orbitPoints[Y].time))}}else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.SATELLITETIMEWINDOWS){t.timeWindows=e.timeWindows;for(var z=0;z<t.timeWindows.length;z++)"Time"!==e.type&&"number"!==e.type||(t.timeWindows[z].type=e.type)}else{if(e.localePoints){t.controlPoints=[];for(var G=0;G<e.localePoints.length;G++)t.controlPoints.push(new SuperMapAlgoPlot.Point(e.localePoints[G].x,e.localePoints[G].y));!0===o&&(t.latLngs=L.Util.superMapPointsToLatLngs(t.controlPoints),delete t.controlPoints)}if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.LINERELATION)null!=e.startAssociation?t.startAssociatedUuid=e.startAssociation:null!=e.startAssociatedUuid&&(t.startAssociatedUuid=e.startAssociatedUuid),null!=e.endAssociation?t.endAssociatedUuid=e.endAssociation:null!=e.endAssociatedUuid&&(t.endAssociatedUuid=e.endAssociatedUuid),null!=e.lineRelationType&&(t.lineRelationType=e.lineRelationType),null!=e.subSectionCount&&(t.subSectionCount=e.subSectionCount);else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.PICTURE){if(t.path=e.path,null!=e.symbolTexts&&0!==e.symbolTexts.length){t.symbolTexts=[];for(var W=0;W<e.symbolTexts.length;W++){var X=new SuperMapAlgoPlot.SymbolText;X.parseSymbolData(e.symbolTexts[W]),t.symbolTexts.push(X)}}if(null!=e.bloodVolumes&&0!==e.bloodVolumes.length){t.bloodVolumes=[];for(var H=0;H<e.bloodVolumes.length;H++){var Z=new SuperMapAlgoPlot.BloodVolume;Z.parseSymbolData(e.bloodVolumes[H]),t.bloodVolumes.push(Z)}}if(null!=e.trajectory){var J=new SuperMapAlgoPlot.Trajectory;J.parseSymbolData(e.trajectory),t.trajectory=J}null!=e.antoRotation&&(t.antoRotation=e.antoRotation)}else if(t.symbolType===SuperMapAlgoPlot.SymbolType.DOTSYMBOL){t.surroundLineType=e.surroundLineType,t.symbolRank=e.symbolRank,t.negativeImage=e.negativeImage,t.horizontalMirror=e.horizontalMirror,t.verticalMirror=e.verticalMirror;var q=SuperMapAlgoPlot.AnalysisSymbol.analysisDotBasicInfo(e);if(t.anchorPoint=q.anchorPoint,t.symbolSizeInLib=q.symbolSizeInLib,t.middleMarkBounds=q.middleMarkBounds,void 0!==e.actualScale&&(t.actualScale=e.actualScale),void 0!==e.limitWidthHeight&&(t.limitWidthHeight=e.limitWidthHeight),void 0!==e.fontSize&&(t.fontSize=e.fontSize),void 0!==e.strokeWidth&&(t.strokeWidth=e.strokeWidth),void 0!==e.space&&(t.space=e.space*SuperMapAlgoPlot.PlottingUtil.DPI/25.4),void 0!==e.flagTextSize&&(t.flagTextSize=e.flagTextSize),void 0!==e.maxScale&&(t.maxScale=e.maxScale),void 0!==e.minScale&&(t.minScale=e.minScale),!1!==t.isEdit){var K={x:0,y:0};-1===e.symbolSize.x&&-1===e.symbolSize.x?(K.x=e.symbolSizeInLib.x*SuperMapAlgoPlot.PlottingUtil.DPI/25.4/10,K.y=e.symbolSizeInLib.y*SuperMapAlgoPlot.PlottingUtil.DPI/25.4/10):(K.x=e.symbolSize.x*SuperMapAlgoPlot.PlottingUtil.DPI/25.4/10,K.y=e.symbolSize.y*SuperMapAlgoPlot.PlottingUtil.DPI/25.4/10),t.setSymbolSize(K.x,K.y,!1)}if(void 0!==e.positionOffset&&null!==e.positionOffset&&(t.positionOffset=e.positionOffset),void 0!==e.positionOffsetType&&null!==e.positionOffsetType&&(t.positionOffsetType=e.positionOffsetType),void 0!==e.positionOffsetX&&null!==e.positionOffsetX&&(t.positionOffsetX=e.positionOffsetX*SuperMapAlgoPlot.PlottingUtil.DPI/25.4/10),void 0!==e.positionOffsetY&&null!==e.positionOffsetY&&(t.positionOffsetY=e.positionOffsetY*SuperMapAlgoPlot.PlottingUtil.DPI/25.4/10*-1),null!=e.symbolTexts&&0!==e.symbolTexts.length){t.symbolTexts=[];for(var Q=0;Q<e.symbolTexts.length;Q++){var $=new SuperMapAlgoPlot.SymbolText;$.parseSymbolData(e.symbolTexts[Q]),t.symbolTexts.push($)}}if(null!=e.bloodVolumes&&0!==e.bloodVolumes.length){t.bloodVolumes=[];for(var tt=0;tt<e.bloodVolumes.length;tt++){var et=new SuperMapAlgoPlot.BloodVolume;et.parseSymbolData(e.bloodVolumes[tt]),t.bloodVolumes.push(et)}}if(null!=e.pictureFrames&&0!==e.pictureFrames.length){t.pictureFrames=[];for(var ot=0;ot<e.pictureFrames.length;ot++){var it=new SuperMapAlgoPlot.PictureFrame;it.parseSymbolData(e.pictureFrames[ot]),t.pictureFrames.push(it)}}if(null!=e.trajectory){var nt=new SuperMapAlgoPlot.Trajectory;nt.parseSymbolData(e.trajectory),t.trajectory=nt}null!=e.antoRotation&&(t.antoRotation=e.antoRotation)}else{if(t.surroundLineType=e.surroundLineType,e.scaleValues&&0!==e.scaleValues.length){t.scaleValues=[];for(var lt=0;lt<e.scaleValues.length;lt++)t.scaleValues.push(e.scaleValues[lt])}if(void 0!==e.strokeWidth&&null!==e.strokeWidth&&(t.strokeWidth=e.strokeWidth),void 0!==e.baseScale&&null!==e.baseScale&&(t.baseScale=e.baseScale),void 0!==e.polylineConnectLocationPoint&&null!==e.polylineConnectLocationPoint&&(t.polylineConnectLocationPoint=e.polylineConnectLocationPoint),22===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.ALGOSYMBOL)void 0!==e.arrowHeadType&&null!==e.arrowHeadType&&(t.arrowHeadType=e.arrowHeadType),void 0!==e.arrowBodyType&&null!==e.arrowBodyType&&(t.arrowBodyType=e.arrowBodyType),void 0!==e.arrowTailType&&null!==e.arrowTailType&&(t.arrowTailType=e.arrowTailType);else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.ARROWLINE)t.arrowAngle=e.arrowAngle,void 0!==e.arrowTypeStart&&(t.scaleValues[1]=e.arrowTypeStart),void 0!==e.arrowTypeEnd&&(t.scaleValues[2]=e.arrowTypeEnd);else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.COMBINATIONALCIRCLE){if(e.radius&&0!==e.radius.length&&0===t.scaleValues.length)for(var at=0;at<e.radius.length;at++)t.scaleValues.push(e.radius[at])}else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.CONCENTRICCIRCLE)Object.prototype.hasOwnProperty.call(t.symbolData,"startAngle")&&(t.scaleValues[0]=t.symbolData.startAngle),Object.prototype.hasOwnProperty.call(t.symbolData,"endAngle")&&(t.scaleValues[1]=t.symbolData.endAngle);else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.LINEMARKING)void 0!==e.islocationCircle&&null!==e.islocationCircle&&(t.islocationCircle=e.islocationCircle),void 0!==e.textBoxType&&null!==e.textBoxType&&(t.textBoxType=e.textBoxType),e.tipPoint&&(this.scaleValues[1]=e.tipPoint.x,this.scaleValues[2]=e.tipPoint.y);else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.SYMBOLTEXTBOX)void 0!==e.roundBox&&null!==e.roundBox&&(t.roundBox=e.roundBox),void 0!==e.textBoxType&&null!==e.textBoxType&&(t.textBoxType=e.textBoxType),e.tipPoint&&(this.scaleValues[1]=e.tipPoint.x,this.scaleValues[2]=e.tipPoint.y);else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOLM)e.tipPoint1&&(this.scaleValues[0]=e.tipPoint1.x,this.scaleValues[1]=e.tipPoint1.y),e.tipPoint2&&(this.scaleValues[2]=e.tipPoint2.x,this.scaleValues[3]=e.tipPoint2.y);else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.PATHTEXT)t.isAvoid=e.isAvoid,t.isCurve=e.isCurve,t.relLineText=e.relLineText,t.showPathLine=e.showPathLine,t.textToLineDistance=e.textToLineDistance,t.showPathLineArrow=e.showPathLineArrow;else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.ARCREGION){if(o){if(t.centerPoint=L.latLng(e.centerPoint.y,e.centerPoint.x),t.symbolData.circlePts){for(var st=[],rt=0;rt<e.circlePts.length;rt++)st.push(new SuperMapAlgoPlot.Point(e.circlePts[rt].x,e.circlePts[rt].y));0!==st.length&&(t.circlePts=st)}t.spatialAnalystUrl=e.spatialAnalystUrl}else t.centerPoint=new SuperMapAlgoPlot.Point(e.centerPoint.x,e.centerPoint.y);t.endAngle=e.endAngle,t.radius=e.radius,t.radiusPosAngle=e.radiusPosAngle,t.startAngle=e.startAngle,t.textPosition=e.textPosition,t.radiusLineType=e.radiusLineType,t.radiusText=e.radiusText}else 0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.POLYGONREGION&&(Object.prototype.hasOwnProperty.call(t.symbolData,"textPosition")?t.scaleValues[1]=t.symbolData.textPosition:void 0===t.scaleValues[1]&&(t.scaleValues[1]=t.symbolData.annotationPosition))}}}};SuperMapAlgoPlot.PlottingUtil=SuperMapAlgoPlot.PlottingUtil||{};SuperMapAlgoPlot.PlottingUtil.DEFAULT_PRECISION=14,SuperMapAlgoPlot.PlottingUtil.DPI=96,SuperMapAlgoPlot.PlottingUtil.RTOD=57.29577951308232,SuperMapAlgoPlot.PlottingUtil.DTOR=.017453292519943295,SuperMapAlgoPlot.PlottingUtil.dirAngle=function(t,e){var o,i,n,l;o=e.x,i=e.y,n=o-t.x,l=i-t.y;var a=Math.atan2(l,n);return a<0&&(a+=2*Math.PI),a},SuperMapAlgoPlot.PlottingUtil.generateUuid=function(){for(var t=[],e=0;e<36;e++)t[e]="0123456789abcdef".substr(Math.floor(16*Math.random()),1);return t[14]="4",t[19]="0123456789abcdef".substr(3&t[19]|8,1),t[8]=t[13]=t[18]=t[23]="-",t.join("")},SuperMapAlgoPlot.PlottingUtil.cloneObject=function(t){return JSON.parse(JSON.stringify(t))},SuperMapAlgoPlot.PlottingUtil.colorRGBA=function(t,e){var o=t.substring(1,3),i=parseInt(o,16),n=t.substring(3,5),l=parseInt(n,16),a=t.substring(5);return"rgba("+i+","+l+","+parseInt(a,16)+","+e+")"},SuperMapAlgoPlot.PlottingUtil.colorRGBToString=function(t){var e=t.red.toString(16);e.length<2&&(e="0"+e);var o=t.green.toString(16);o.length<2&&(o="0"+o);var i=t.blue.toString(16);return i.length<2&&(i="0"+i),"#"+e+o+i},SuperMapAlgoPlot.PlottingUtil.colorStringToRGB=function(t){var e={},o=t.substring(1,3);e.red=parseInt(o,16);var i=t.substring(3,5);e.green=parseInt(i,16);var n=t.substring(5);return e.blue=parseInt(n,16),e},SuperMapAlgoPlot.PlottingUtil.decimalToHex=function(t){for(var e=t.toString(16);e.length<8;)e="0"+e;var o=e.substring(0,2),i=e.substring(2,4),n=e.substring(4,6);return{color:"#"+e.substring(6)+n+i,alpha:parseInt(o,16)/255}},SuperMapAlgoPlot.PlottingUtil.hexToDecimal=function(t,e){var o=t.substring(1,3),i=t.substring(3,5),n=t.substring(5),l=parseInt(n+i+o,16),a=Math.round(255*e).toString(16);return parseInt(a+"000000",16)+l},SuperMapAlgoPlot.PlottingUtil.getAlign=function(t){return"TOPLEFT"===t?"lt":"TOPCENTER"===t?"ct":"TOPRIGHT"===t?"rt":"BOTTOMLEFT"===t?"lb":"BOTTOMCENTER"===t?"cb":"BOTTOMRIGHT"===t?"rb":"MIDDLELEFT"===t?"lm":"MIDDLECENTER"===t?"cm":"MIDDLERIGHT"===t?"rm":"lt"},SuperMapAlgoPlot.PlottingUtil.trim=function(t){return null==t?"":t.replace(/(^\s*)|(\s*$)/g,"")},SuperMapAlgoPlot.PlottingUtil.getTextWidth=function(t,e){e=e.replace(new RegExp(" ","g"),"_");var o=1;t.fontSize<12&&(o=t.fontSize/12);var i=document.createElement("span");document.body.appendChild(i),i.style.width="auto",i.style.height="auto",t.fontStyle&&(i.style.fontStyle=t.fontStyle),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 n=i.clientWidth,l=e.length;return null!=t.fontSpace&&null!=t.fontPercent?n=t.fontPercent/100*n+t.fontSpace*(t.fontPercent/100)*(l-1):null==t.fontSpace&&null!=t.fontPercent?n=t.fontPercent/100*n:null!=t.fontSpace&&null==t.fontPercent&&(n+=t.fontSpace*(l-1)),document.body.removeChild(i),n*o},SuperMapAlgoPlot.PlottingUtil.getTextCount=function(t){for(var e=0,o=0,i=0;i<t.length;i++)t.charCodeAt(i)>255?e++:o++;return e+o/2},SuperMapAlgoPlot.PlottingUtil.toJSON=function(t){var e=t;if(null==e)return null;switch(e.constructor){case String:return e=(e=(e=(e=(e=(e=(e='"'+e.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","&lt;")).replace(">","&gt;")).replace(/%/g,"%2525")).replace(/&/g,"%26");case Array:for(var o=[],i=0,n=e.length;i<n;i++)o.push(SuperMapAlgoPlot.PlottingUtil.toJSON(e[i]));return"["+o.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"===$t(e)){if(e.length){for(var l=[],a=0,s=e.length;a<s;a++)l.push(SuperMapAlgoPlot.PlottingUtil.toJSON(e[a]));return"["+l.join(",")+"]"}var r=[];for(var u in e)"function"!=typeof e[u]&&"CLASS_NAME"!==u&&"parent"!==u&&r.push('"'+u+'":'+SuperMapAlgoPlot.PlottingUtil.toJSON(e[u]));return r.length>0?"{"+r.join(",")+"}":"{}"}return e.toString()}},SuperMapAlgoPlot.PlottingUtil.copyFeature=function(t){var e=null;if(null!=t&&t.geometry){var o=t.geometry.clone();e=new SuperMap.Feature.Vector(o),t.style&&(e.style=SuperMapAlgoPlot.PlottingUtil.copyAttributes(e.style,t.style)),o.feature=e,o.calculateParts()}return e},SuperMapAlgoPlot.PlottingUtil.inverse=function(t){for(var e=[],o=t.length-1;o>=0;o--)e.push(t[o]);return e},SuperMapAlgoPlot.PlottingUtil.getSurroundLinePts=function(t,e){for(var o=[],i=[],n=0;n<t.length-1;n++){var l,a,s=[];if(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[n].x,t[n+1].x)||!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[n].y,t[n+1].y)){s.push(t[n]),s.push(t[n+1]);var r=SuperMapAlgoPlot.PlottingUtil.parallel(s,e);if(l=r[0],a=r[1],0!=o.length){var u=SuperMapAlgoPlot.PlottingUtil.intersectLines(l,a,o[0],o[1]);if(u.isIntersectLines){var p=u.intersectPoint,h=SuperMapAlgoPlot.PlottingUtil.distance(l,a);SuperMapAlgoPlot.PlottingUtil.distance(p,a)>2*h?i.push(a):(i[i.length-1]=p,i.push(a))}else i.push(a)}else i.push(l),i.push(a);(o=[]).push(i[i.length-2]),o.push(i[i.length-1])}}if(t[0].x===t[t.length-1].x&&t[0].y===t[t.length-1].y&&1<i.length){var c=SuperMapAlgoPlot.PlottingUtil.intersectLines(i[0],i[1],i[i.length-2],i[i.length-1]);if(c.isIntersectLines){var y=c.intersectPoint;i[i.length-1]=y,i[0]=y}}return i},SuperMapAlgoPlot.PlottingUtil.copyFontStyle=function(t,e){void 0===t.labelAlign&&void 0!==e.labelAlign&&(t.labelAlign=e.labelAlign),!0!==t.fontSizeLimit&&(void 0!==e.fontSize&&(t.fontSize=e.fontSize),void 0!==e.fontWeight&&(t.fontWeight=e.fontWeight),void 0!==e.fontStyle&&(t.fontStyle=e.fontStyle),void 0!==e.fontSpace&&(t.fontSpace=e.fontSpace),void 0!==e.fontPercent&&(t.fontPercent=e.fontPercent)),t.strokeWidth=e.strokeWidth},SuperMapAlgoPlot.PlottingUtil.getDataFromServer=function(t,e,o,i,n,l,a,s){var r;if(void 0!==l&&(r=l),"undefined"!=typeof SuperMap&&void 0!==SuperMap.GetSymbolInfoService){var u=new SuperMap.GetSymbolInfoService(t);u.events.on({processCompleted:a,processFailed:s,scope:r});var p=new SuperMap.GetSymbolInfoParameters;p.libID=e,p.code=o,n&&SuperMapAlgoPlot.PlottingUtil.extend(p,n),i&&null!=i&&(SuperMapAlgoPlot.PlottingUtil.isArray(i)||(i=[i]),p.inputPoints=i),u.processAsync(p)}else if(void 0!==("undefined"==typeof SuperMap?"undefined":$t(SuperMap))&&void 0!==$t(SuperMap.REST)&&void 0!==$t(SuperMap.REST.GetSymbolInfoService)){var h=new SuperMap.REST.GetSymbolInfoService(t);h.events.on({processCompleted:a,processFailed:s,scope:r});var c=new SuperMap.REST.GetSymbolInfoParameters;if(c.libID=e,c.code=o,n&&SuperMapAlgoPlot.PlottingUtil.extend(c,n),i&&null!=i&&(SuperMapAlgoPlot.PlottingUtil.isArray(i)||(i=[i]),c.inputPoints=i),n&&n.credential){var y=n.credential;h.processAsync(c,y)}else h.processAsync(c)}},SuperMapAlgoPlot.PlottingUtil.innerOutlineDir=function(t){function e(t,e){function o(t){var e=Math.atan2(t.y,t.x);return e<0&&(e+=2*Math.PI),e}var i=o(e)-o(t);return i<-Math.PI&&(i+=2*Math.PI),i>Math.PI&&(i-=2*Math.PI),i}if(t.length<3)return 1;for(var o=0,i={x:0,y:0},n={x:0,y:0},l=2;l<t.length;l++)n.x=t[l].x-t[l-1].x,n.y=t[l].y-t[l-1].y,i.x=t[l-1].x-t[l-2].x,i.y=t[l-1].y-t[l-2].y,o+=e(i,n);return n.x=t[1].x-t[0].x,n.y=t[1].y-t[0].y,i.x=t[0].x-t[t.length-1].x,i.y=t[0].y-t[t.length-1].y,(o+=e(i,n))>=0?-1:1},SuperMapAlgoPlot.PlottingUtil.isNear=function(t,e){return e||(e=SuperMapAlgoPlot.PlottingUtil.TORLERANCE_STATIC),t<e&&t>-e},SuperMapAlgoPlot.PlottingUtil.equalFuzzy=function(t,e,o){return o||(o=1e-18),Math.abs(t-e)<=o},SuperMapAlgoPlot.PlottingUtil.intersectLines=function(t,e,o,i){var n={isIntersectLines:!1};if(t.x===e.x&&t.y===e.y||o.x===i.x&&o.y===i.y)return n;var l=e.x-t.x,a=e.y-t.y,s=i.x-o.x,r=i.y-o.y,u=l*r-s*a;if(SuperMapAlgoPlot.PlottingUtil.isNear(u))return n;var p=(l*(t.y-o.y)-a*(t.x-o.x))/u,h=new SuperMapAlgoPlot.Point(0,0);return h.x=p*s+o.x,h.y=p*r+o.y,n.isIntersectLines=!0,n.intersectPoint=h,n},SuperMap.Plot.PlottingUtil.limitSigDigs=function(t,e){var o=0;if(e>0){var i=new Number(t);o=parseFloat(i.toPrecision(e))}return o},SuperMap.Plot.PlottingUtil.containsPoint=function(t,e){for(var o=SuperMap.Plot.PlottingUtil.getPolygonCenterPt(t.components),i=SuperMap.Plot.PlottingUtil.distance(o,e),n=0,l=SuperMap.Plot.PlottingUtil.radian(e,t.components[0]),a=1;a<t.components.length;a++){var s=SuperMap.Plot.PlottingUtil.radian(e,t.components[a]);l>s&&(l=s,n=a)}return i<SuperMap.Plot.PlottingUtil.distance(o,t.components[n])},SuperMap.Plot.PlottingUtil.intersects=function(t,e){var o=!1;if("SuperMap.Geometry.Point"===e.CLASS_NAME)o=t.containsPoint(e);else if("SuperMap.Geometry.LineString"===e.CLASS_NAME)o=e.intersects(t);else if("SuperMap.Geometry.LinearRing"===e.CLASS_NAME)o=SuperMap.Geometry.LineString.prototype.intersects.apply(this,[e]);else for(var i=0,n=e.components.length;i<n&&!(o=e.components[i].intersects(this));++i);return o},SuperMapAlgoPlot.PlottingUtil.getEnvelopePoints=function(t){function e(t,e){if(t.length!==e.length)return!1;for(var o=0;o<t.length;o++)if(t[o].x!==e[o].x||t[o].y!==e[o].y)return!1;return!0}function o(t,e,o){for(var i=0;i<t.length;i++)if(SuperMap.Plot.PlottingUtil.containsPoint(t[i].components[0],e))return o.index=i,!0;return!1}function i(t,e,o){for(var i=t.components[0].components,n=new SuperMapAlgoPlot.Point(0,0),l=0;l<i.length-1;l++)if(SuperMapAlgoPlot.PlottingUtil.intersectLineSegs(e,o,i[l],i[l+1],n))return n;return null}function n(t,e){if(0===t.length||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(e[0].x,e[e.length-1].x,.5)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(e[0].y,e[e.length-1].y,.5))return e;for(var o=e[e.length-1],i=0;i<t.length;i++)if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[i][0].x,o.x,.5)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[i][0].y,o.y,.5)){e=e.concat(t[i]),t.splice(i,1);var l=n(t,e);if(void 0!==l&&0!==l.length)return l}else if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[i][t[i].length-1].x,o.x,.5)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[i][t[i].length-1].y,o.y,.5)){for(var a=t[i].length-1;a>=0;a--)e.push(t[i][a]);t.splice(i,1);var s=n(t,e);if(void 0!==s&&0!==s.length)return s}return e}if(SuperMapAlgoPlot.PlottingUtil.isArray(t)||(t=[t]),0===t.length)return[];if(1===t.length)return t[0];for(var l=0;l<t.length;l++)for(var a=l+1;a<t.length;)e(t[l],t[a])?t.splice(a,1):a++;for(var s=[],r=0;r<t.length;r++)s.push(new SuperMap.Geometry.Polygon([new SuperMap.Geometry.LinearRing(t[r])]));for(var u=[],p=0;p<t.length;p++){var h=[],c=[],y=-1,g=-1,f=s.slice();f.splice(p,1);for(var P={},d=0;d<t[p].length;d++)if(o(f,t[p][d],P)){if(0!==c.length){var S=i(s[P.index],t[p][d-1],t[p][d]);S&&S!==t[p][d-1]&&S!==t[p][d]&&c.push(S),h.push(c),c=[]}}else{if(0===d&&(y=h.length),d===t[p].length-1&&(g=h.length),0===c.length&&void 0!==P.index){var m=i(s[P.index],t[p][d-1],t[p][d]);m&&m!==t[p][d-1]&&m!==t[p][d]&&c.push(m)}c.push(t[p][d].clone())}if(0!==c.length&&h.push(c),y<h.length&&g<h.length&&y!==g){for(var b=0;b<h[y].length;b++)h[g].push(h[y][b]);h.splice(y,1)}u=u.concat(h)}for(var L=[];0!==u.length;){var M=u[0];u.splice(0,1);var v=n(u,M);void 0!==v&&(M=v),M.length>2&&L.push(M)}return L},SuperMapAlgoPlot.PlottingUtil.isRight=function(t,e,o){var i=e,n=o,l=e,a=t;return(n.x-i.x)*(a.y-l.y)-(a.x-l.x)*(n.y-i.y)<0},SuperMapAlgoPlot.PlottingUtil.radian=function(t,e){var o,i,n=0;return o=e.x-t.x,i=e.y-t.y,(n=Math.atan2(i,o))<0&&(n+=2*Math.PI),n},SuperMapAlgoPlot.PlottingUtil.findBisectorPoint=function(t,e,o,i){var n=SuperMapAlgoPlot.PlottingUtil.radian(e,t),l=(n+SuperMapAlgoPlot.PlottingUtil.radian(e,o))/2,a=Math.cos(l-n+Math.PI/2),s=i;SuperMapAlgoPlot.PlottingUtil.isNear(a,.15)||(s=i/a);var r=e.x+s*Math.cos(l),u=e.y+s*Math.sin(l);return new SuperMapAlgoPlot.Point(r,u)},SuperMapAlgoPlot.PlottingUtil.findPoint=function(t,e,o,i){if(t===e||Math.abs(o)<1e-18)return t;var n=SuperMapAlgoPlot.PlottingUtil.radian(t,e)+i*Math.PI/180,l=t.x+o*Math.cos(n),a=t.y+o*Math.sin(n);return new SuperMapAlgoPlot.Point(l,a)},SuperMapAlgoPlot.PlottingUtil.isSameQuadrant=function(t,e,o,i){var n=(e.x-t.x)*(i.x-o.x),l=(e.y-t.y)*(i.y-o.y);return!(Math.abs(n)<1e-18&&Math.abs(l)<1e-18)&&((n>0||Math.abs(n)<1e-18)&&(l>0||Math.abs(l)<1e-18))},SuperMapAlgoPlot.PlottingUtil.isCross=function(t,e,o,i){var n=new SuperMapAlgoPlot.Point(0,0);return!(!SuperMapAlgoPlot.PlottingUtil.intersectLineSegs(t,e,o,i,n)||n==t||n===e||n===o||n==i)},SuperMapAlgoPlot.PlottingUtil.intersectLineSegs=function(t,e,o,i,n){if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.x,e.x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.y,e.y))return n.x=t.x,n.y=t.y,!1;if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(o.x,i.x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(o.y,i.y))return n.x=o.x,n.y=o.y,!1;var l=0,a=0;if(l=t.x>e.x?t.x:e.x,a=t.x<e.x?t.x:e.x,o.x-l>1e-16&&i.x-l>1e-16||o.x-a<-1e-16&&i.x-a<-1e-16)return!1;if(l=t.y>e.y?t.y:e.y,a=t.y<e.y?t.y:e.y,o.y-l>1e-16&&i.y-l>1e-16||o.y-a<-1e-16&&i.y-a<-1e-16)return!1;var s=e.x-t.x,r=e.y-t.y,u=i.x-o.x,p=i.y-o.y,h=t.x-o.x,c=t.y-o.y,y=s*p-u*r,g=y;if(Math.abs(s)>1e-18&&Math.abs(u)>1e-18&&(g/=s*u),Math.abs(g)<1e-18)return t===o?(n.x=t.x,n.y=t.y,!SuperMapAlgoPlot.PlottingUtil.isSameQuadrant(t,e,o,i)):e===i?(n.x=e.x,n.y=e.y,!SuperMapAlgoPlot.PlottingUtil.isSameQuadrant(t,e,o,i)):t===i?(n.x=t.x,n.y=t.y,SuperMapAlgoPlot.PlottingUtil.isSameQuadrant(t,e,o,i)):e===o&&(n.x=e.x,n.y=e.y,SuperMapAlgoPlot.PlottingUtil.isSameQuadrant(t,e,o,i));var f=(s*c-r*h)/y,P=(u*c-p*h)/y;return!(f<0&&(Math.abs(f*u)>1e-16||Math.abs(f*p)>1e-16))&&(!(f>1&&(Math.abs((f-1)*u)>1e-16||Math.abs((f-1)*p)>1e-16))&&(!(P<0&&(Math.abs(P*s)>1e-16||Math.abs(P*r)>1e-16))&&(!(P>1&&(Math.abs((P-1)*s)>1e-16||Math.abs((P-1)*r)>1e-16))&&(Math.abs(f)<1e-18?(n.x=o.x,n.y=o.y,!0):Math.abs(f-1)<1e-18?(n.x=i.x,n.y=i.y,!0):Math.abs(P)<1e-18?(n.x=t.x,n.y=t.y,!0):Math.abs(P-1)<1e-18?(n.x=e.x,n.y=e.y,!0):!(f<0&&(Math.abs(f*u)>1e-16||Math.abs(f*p)>1e-16))&&(!(f>1&&(Math.abs((f-1)*u)>1e-16||Math.abs((f-1)*p)>1e-16))&&(!(P<0&&(Math.abs(P*s)>1e-16||Math.abs(P*r)>1e-16))&&(!(P>1&&(Math.abs((P-1)*s)>1e-16||Math.abs((P-1)*r)>1e-16))&&(n.x=f*u+o.x,n.y=f*p+o.y,!0))))))))},SuperMapAlgoPlot.PlottingUtil.parallel=function(t,e){var o=[],i=t.length;if(!t||null==t||t.length<2)return o;var n=!1;t.length>3&&t[0].x===t[t.length-1].x&&t[0].y===t[t.length-1].y&&(n=!0),n?(o[0]=SuperMapAlgoPlot.PlottingUtil.findBisectorPoint(t[t.length-2],t[0],t[1],e),o[t.length-1]=o[0]):(o[0]=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],e,90),o[t.length-1]=SuperMapAlgoPlot.PlottingUtil.findPoint(t[t.length-1],t[t.length-2],-e,90));for(var l=t[0],a=t[1],s=t[1],r=1;r<t.length-1;r++)if(a=t[r],t[r]!==t[r-1]&&(l=t[r-1]),t[r]!==t[r+1]){s=t[r+1];var u=SuperMapAlgoPlot.PlottingUtil.findBisectorPoint(l,a,s,e);SuperMapAlgoPlot.PlottingUtil.isCross(l,o[r-1],a,u)&&(u=o[r-1]),o[r]=u}else{for(var p=r;p<i-1;){if(t[p]!==t[p+1]){s=t[p+1];break}p++}if(p<i-1){var h=SuperMapAlgoPlot.PlottingUtil.FindBisectorPoint(l,a,s,e);for(SuperMapAlgoPlot.PlottingUtil.isCross(l,o[r-1],a,h)&&(h=o[r-1]);r<p;)o[r]=h,r++;r=p-1}}return o},SuperMapAlgoPlot.PlottingUtil.distance=function(t,e){var o=[];o.push(t),o.push(e);var i=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(o).pts;if(0===i.length){var n=o[0],l=o[1];return Math.sqrt((n.x-l.x)*(n.x-l.x)+(n.y-l.y)*(n.y-l.y))}var a=i[0],s=i[1];return Math.sqrt((a.x-s.x)*(a.x-s.x)+(a.y-s.y)*(a.y-s.y))},SuperMapAlgoPlot.PlottingUtil.projectPoint=function(t,e,o){if(e===o)return e;var i=new SuperMapAlgoPlot.Point(0,0),n=o.x-e.x,l=e.y-o.y,a=n*n,s=l*l,r=n*l,u=n*n+l*l;return i.x=(r*(e.y-t.y)+e.x*s+t.x*a)/u,i.y=(r*(e.x-t.x)+e.y*a+t.y*s)/u,i},SuperMapAlgoPlot.PlottingUtil.pointToLineDis=function(t,e,o){var i=SuperMapAlgoPlot.PlottingUtil.projectPoint(t,e,o);return SuperMapAlgoPlot.PlottingUtil.distance(t,i)},SuperMapAlgoPlot.PlottingUtil.pointToPloyLineDis=function(t,e,o){if(e===o)return SuperMapAlgoPlot.PlottingUtil.distance(t,e);var i=(e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y),n=(o.x-t.x)*(o.x-t.x)+(o.y-t.y)*(o.y-t.y),l=(e.x-o.x)*(e.x-o.x)+(e.y-o.y)*(e.y-o.y),a=(i+l-n)/(2*l);a<0?a=0:a>1&&(a=1);var s=(o.x-e.x)*a+e.x,r=(o.y-e.y)*a+e.y,u=(s-t.x)*(s-t.x)+(r-t.y)*(r-t.y);return Math.sqrt(u)},SuperMapAlgoPlot.PlottingUtil.isCounterClockwise=function(t,e,o){return(o.x-e.x)*(t.y-e.y)-(t.x-e.x)*(o.y-e.y)>0},SuperMapAlgoPlot.PlottingUtil.clearSamePts=function(t){for(var e=t.length,o=0;o<e-1;)SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[o].x,t[o+1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[o].y,t[o+1].y)?(t.splice(o,1),e--):o++;return t},SuperMapAlgoPlot.PlottingUtil.getBeizerCtrlPt=function(t){var e=[],o=t.length;if(o<3)for(var i=0;i<o;++i)e[i]=t[i].clone();else{for(var n=0,l=0;l<3*o-2;l+=3)e[l]=t[n].clone(),e[l+1]=new SuperMapAlgoPlot.Point(0,0),e[l+2]=new SuperMapAlgoPlot.Point(0,0),n++;for(var a=1;a<o-1;a++)SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(8,3,t[a-1],t[a],t[a+1],e[3*a+1],e[3*a+2]);SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.6,e[0],e[3],e[4],e[2]),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.6,e[3*o-3],e[3*o-6],e[3*o-4],e[3*o-2]),e[1]=t[0].clone(),e[3*o-1]=t[o-1].clone()}return e},SuperMapAlgoPlot.PlottingUtil.isOnLine=function(t,e,o){if(e.x===o.x&&e.y===o.y)return!1;if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(o.x,e.x))return SuperMapAlgoPlot.PlottingUtil.equalFuzzy(o.x,t.x);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(o.y,e.y))return SuperMapAlgoPlot.PlottingUtil.equalFuzzy(o.y,t.y);if(e.x===t.x&&e.y===t.y||t.x===o.x&&t.y===o.y)return!0;var i=(t.y-o.y)*(o.x-e.x)-(o.y-e.y)*(t.x-o.x);return(i/=(o.x-e.x)*(t.x-o.x))<1e-10&&i>1e-10},SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt=function(t,e){var o=t.slice();!0===e&&o.push(o[0]);for(var i=[],n=[],l=0;l<o.length-1;l++)o[l+1].x-o[0].x>-360&&o[l+1].x-o[0].x<-180&&i.push(l+1),o[l+1].x-o[0].x<360&&o[l+1].x-o[0].x>180&&n.push(l+1);if(n.length>i.length)for(var a=0;a<n.length;a++)o[n[a]].x=o[n[a]].x-360;else for(var s=0;s<i.length;s++)o[i[s]].x=o[i[s]].x+360;for(var r=SuperMapAlgoPlot.PlottingUtil.getBeizerCtrlPt(o),u=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsWithCtrlPt(r),p=0;p<u.length;p++)u[p].x>180?u[p].x=u[p].x-360:u[p].x<-180&&(u[p].x=u[p].x+360);return u},SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsWithCtrlPt=function(t){var e=t.length,o=[];if(t.length<3)for(var i=0;i<e;i++)o[i]=t[i].clone();else for(var n=0;n<e;n+=3)if(!(n+4>=e)){var l=t[n].x,a=t[n].y,s=t[n+2].x,r=t[n+2].y,u=t[n+4].x,p=t[n+4].y,h=t[n+3].x,c=t[n+3].y;if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l,s,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(a,r,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(u,h,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(p,c,1e-10))o.push(new SuperMapAlgoPlot.Point(l,a)),o.push(new SuperMapAlgoPlot.Point(u,p));else for(var y=0;y<=1;y+=.03125){var g,f,P,d,S=y*y,m=S*y;g=1-3*y+3*S-m,f=3*(y-2*S+m),P=3*(S-m),d=m;var b=new SuperMapAlgoPlot.Point(g*l+f*s+P*u+d*h,g*a+f*r+P*p+d*c);o.push(b)}}return o},SuperMapAlgoPlot.PlottingUtil.computeBeizerPoints0=function(t,e,o){var i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(e),n=[],l=[],a=[];if(t){l.push(e[0]);var s=o[0],r=o[1],u=e[0].x+i*s,p=e[0].y+i*r;l.push(new SuperMapAlgoPlot.Point(u,p)),n.push(new SuperMapAlgoPlot.Point(u,p));for(var h=1;h<e.length-1;h++){var c=o[4*h-2],y=o[4*h-1],g=e[h].x+i*c,f=e[h].y+i*y;l.push(new SuperMapAlgoPlot.Point(g,f)),n.push(new SuperMapAlgoPlot.Point(g,f)),l.push(new SuperMapAlgoPlot.Point(e[h].x,e[h].y)),c=o[4*h],y=o[4*h+1],g=e[h].x+i*c,f=e[h].y+i*y,l.push(new SuperMapAlgoPlot.Point(g,f)),n.push(new SuperMapAlgoPlot.Point(g,f))}var P=e.length-1;s=o[4*P-2],r=o[4*P-1],u=e[P].x+i*s,p=e[P].y+i*r,l.push(new SuperMapAlgoPlot.Point(u,p)),n.push(new SuperMapAlgoPlot.Point(u,p)),l.push(new SuperMapAlgoPlot.Point(e[P].x,e[P].y)),l.push(new SuperMapAlgoPlot.Point(e[P].x,e[P].y)),l.push(new SuperMapAlgoPlot.Point(e[P].x,e[P].y)),a=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsWithCtrlPt(l)}else{o=[];var d=(l=SuperMapAlgoPlot.PlottingUtil.getBeizerCtrlPt(e))[1].x-l[0].x,S=l[1].y-l[0].y,m=d/i,b=S/i;o.push(m),o.push(b),n.push(l[1]);for(var L=1;L<e.length-1;L++){var M=(l[3*L-1].x-l[3*L].x)/i,v=(l[3*L-1].y-l[3*L].y)/i;o.push(M),o.push(v),n.push(l[3*L-1]);var A=(l[3*L+1].x-l[3*L].x)/i,T=(l[3*L+1].y-l[3*L].y)/i;o.push(A),o.push(T),n.push(l[3*L+1])}m=(d=l[3*(e.length-1)-1].x-l[3*(e.length-1)].x)/i,b=(S=l[3*(e.length-1)-1].y-l[3*(e.length-1)].y)/i,o.push(m),o.push(b),n.push(l[3*(e.length-1)-1]),a=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsWithCtrlPt(l)}return{scalePoints:n,scaleValues:o,beizerPoints:a}},SuperMapAlgoPlot.PlottingUtil.computeBeizerPoints=function(t,e,o){var i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(e),n=[],l=[],a=[];if(t){l.push(new SuperMapAlgoPlot.Point(e[0].x,e[0].y)),l.push(new SuperMapAlgoPlot.Point(e[0].x,e[0].y));var s=o[0],r=o[1],u=e[0].x+i*s,p=e[0].y+i*r;l.push(new SuperMapAlgoPlot.Point(u,p)),n.push(new SuperMapAlgoPlot.Point(u,p));for(var h=1;h<e.length-1;h++){l.push(new SuperMapAlgoPlot.Point(e[h].x,e[h].y));var c=o[4*h-2],y=o[4*h-1],g=e[h].x+i*c,f=e[h].y+i*y;l.push(new SuperMapAlgoPlot.Point(g,f)),n.push(new SuperMapAlgoPlot.Point(g,f)),c=o[4*h],y=o[4*h+1],g=e[h].x+i*c,f=e[h].y+i*y,l.push(new SuperMapAlgoPlot.Point(g,f)),n.push(new SuperMapAlgoPlot.Point(g,f))}var P=e.length-1;l.push(new SuperMapAlgoPlot.Point(e[P].x,e[P].y)),s=o[4*P-2],r=o[4*P-1],u=e[P].x+i*s,p=e[P].y+i*r,l.push(new SuperMapAlgoPlot.Point(u,p)),n.push(new SuperMapAlgoPlot.Point(u,p)),l.push(new SuperMapAlgoPlot.Point(e[P].x,e[P].y)),a=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsWithCtrlPt(l)}else{o=[];var d=(l=SuperMapAlgoPlot.PlottingUtil.getBeizerCtrlPt(e))[2].x-l[0].x,S=l[2].y-l[0].y,m=d/i,b=S/i;o.push(m),o.push(b),n.push(l[2]);for(var L=1;L<e.length-1;L++){var M=(l[3*L+1].x-l[3*L].x)/i,v=(l[3*L+1].y-l[3*L].y)/i;o.push(M),o.push(v),n.push(l[3*L+1]);var A=(l[3*L+2].x-l[3*L].x)/i,T=(l[3*L+2].y-l[3*L].y)/i;o.push(A),o.push(T),n.push(l[3*L+2])}m=(d=l[3*(e.length-1)+1].x-l[3*(e.length-1)].x)/i,b=(S=l[3*(e.length-1)+1].y-l[3*(e.length-1)].y)/i,o.push(m),o.push(b),n.push(l[3*(e.length-1)+1]),a=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsWithCtrlPt(l)}return{scalePoints:n,scaleValues:o,beizerPoints:a}},SuperMapAlgoPlot.PlottingUtil.getBeizerInputPoints=function(t){var e=[],o=t.length;if(o<3)e.push(t);else for(var i=0;i<o;i+=3)e.push(t[i]);return e},SuperMapAlgoPlot.PlottingUtil.getTrianglePoints=function(t,e,o,i,n,l,a){var s=o.x,r=o.y,u=i.x,p=i.y,h=n.x,c=n.y;SuperMapAlgoPlot.PlottingUtil.getPointsByTriangle(t,e,s,r,u,p,h,c,l,a)},SuperMapAlgoPlot.PlottingUtil.getPointsByTriangle=function(t,e,o,i,n,l,a,s,r,u){var p=n+(a-o),h=l+(s-i),c=0,y=0;if(o==a)c=o,y=h;else if(i==s)c=p,y=i;else{var g=1*(s-i)/(a-o),f=i-o*g;y=g*(c=(h+p/g-f)/(g+1/g))+f}var P=Math.sqrt(1*(n-p)*(n-p)+1*(l-h)*(l-h)),d=Math.sqrt(1*(o-n)*(o-n)+1*(i-l)*(i-l)),S=Math.sqrt(1*(n-a)*(n-a)+1*(l-s)*(l-s)),m=0;p=c+(p-c)*(m=d+S?1+(S-d)*t/(S+d):1),h=y+(h-y)*m,0==P&&(P=1),r.x=n+(n-p)*d/(e*P),r.y=l+(l-h)*d/(e*P),u.x=n+(p-n)*S/(e*P),u.y=l+(h-l)*S/(e*P)},SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints=function(t,e,o,i,n){var l=e.x,a=e.y,s=o.x,r=o.y,u=i.x,p=i.y;return SuperMapAlgoPlot.PlottingUtil.getPointsByTrapezoid(t,l,a,s,r,u,p,n)},SuperMapAlgoPlot.PlottingUtil.getPointsByTrapezoid=function(t,e,o,i,n,l,a,s){var r=0,u=0,p=0,h=0;if(0==Math.abs(o-n))r=e+i-l,u=a;else if(0==Math.abs(e-i))r=l,u=o+n-a;else{var c=1*(o-n)/(e-i),y=a-c*l;u=c*(r=((n+o)/2+(e+i)/(2*c)-y)/(c+1/c))+y,r=2*r-l,u=2*u-a}var g=Math.sqrt(1*(e-i)*(e-i)+1*(o-n)*(o-n)),f=Math.sqrt(1*(e-r)*(e-r)+1*(o-u)*(o-u));return g>0?(p=e+(i-e)*f/g,h=o+(n-o)*f/g):(p=e,h=o),s.x=p+(r-p)*t,s.y=h+(u-h)*t,s},SuperMapAlgoPlot.PlottingUtil.pointIsOnPolyLine=function(t,e,o){if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.x,e.x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.y,e.y)||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.x,o.x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.y,o.y))return!0;var i=t.x-e.x,n=t.y-e.y,l=t.x-o.x,a=t.y-o.y,s=(i*l+n*a)/(Math.sqrt(i*i+n*n)*Math.sqrt(l*l+a*a));return!!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(s,-1,.1)},SuperMapAlgoPlot.PlottingUtil.pointIsOnPolyLines=function(t,e){if(!e||0===e.length)return{isOnPolyLine:!1,index:-1};for(var o=!1,i=-1,n=0;n<e.length-1;n++)if(o=SuperMapAlgoPlot.PlottingUtil.pointIsOnPolyLine(t,e[n],e[n+1])){i=n;break}return{isOnPolyLine:o,index:i}},SuperMapAlgoPlot.PlottingUtil.computePointToLineMinDis=function(t,e){for(var o=-1,i=-1,n=0;n<e.length-1;n++){var l=e[n],a=e[n+1],s=SuperMapAlgoPlot.PlottingUtil.projectPoint(t,l,a);if(SuperMapAlgoPlot.PlottingUtil.pointIsOnPolyLine(s,l,a)){var r=SuperMapAlgoPlot.PlottingUtil.distance(t,s);o<0?(o=r,i&&(i=n)):o>r&&(o=r,i=n)}}return i&&o<0&&(i=-1),{minDis:o,index:i}},SuperMapAlgoPlot.PlottingUtil.findPointInLine=function(t,e,o){if(t===e||Math.abs(o)<1e-18)return t;var i=e.x-t.x,n=e.y-t.y,l=o/Math.sqrt(i*i+n*n),a=t.x+i*l,s=t.y+n*l;return new SuperMapAlgoPlot.Point(a,s)},SuperMapAlgoPlot.PlottingUtil.operateControlPoints=function(t){var e=t,o=e.length;if(3==o){var i=new SuperMapAlgoPlot.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(1,t[0],t[1],t[2],i),e.push(i)}if(o>4&&(e.splice(4,o-4),o=e.length),SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(t[0],t[1],e[2])){var n=e[0];e[0]=e[1],e[1]=n}if(!SuperMapAlgoPlot.PlottingUtil.pointIsRightToVerticle(e[0],e[1],e[2])){var l=e[2];e[2]=e[3],e[3]=l}return e},SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine=function(t,e,o){return(e.x-t.x)*(o.y-t.y)-(o.x-t.x)*(e.y-t.y)<0},SuperMapAlgoPlot.PlottingUtil.pointIsRightToVerticle=function(t,e,o){var i=new SuperMapAlgoPlot.Point(.5*(e.x+t.x),.5*(e.y+t.y)),n=new SuperMapAlgoPlot.Point(e.x-t.x,e.y-t.y),l=new SuperMapAlgoPlot.Point(o.x-i.x,o.y-i.y);return n.x*l.x+n.y*l.y>0},SuperMapAlgoPlot.PlottingUtil.linePnt=function(t,e,o){var i=SuperMapAlgoPlot.PlottingUtil.distance(t,e);if(0==i)return t;var n=o/i;return SuperMapAlgoPlot.PlottingUtil.findPointOnLineByRatio(n,t,e)},SuperMapAlgoPlot.PlottingUtil.findPointOnLineByRatio=function(t,e,o){var i=new SuperMapAlgoPlot.Point(0,0);return i.x=e.x+(o.x-e.x)*t,i.y=e.y+(o.y-e.y)*t,i},SuperMapAlgoPlot.PlottingUtil.rotateAngle=function(t,e,o){var i=e,n=Math.cos(i),l=Math.sin(i),a=o.x-t.x,s=o.y-t.y;return o.x=a*n-s*l+t.x,o.y=a*l+s*n+t.y,o},SuperMapAlgoPlot.PlottingUtil.resize=function(t,e,o){return o.x=t.x+e*(o.x-t.x),o.y=t.y+e*(o.y-t.y),o},SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine=function(t,e){if(e<0||t.length<2)return{index:-1,pt:null};if(Math.abs(e)<1e-18)return{index:0,pt:t[0]};for(var o=0,i=0;i<t.length-1;i++)if((o+=SuperMapAlgoPlot.PlottingUtil.distance(t[i],t[i+1]))>e||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(o,e)){var n=o-e,l=t[i+1],a=t[i],s=n/SuperMapAlgoPlot.PlottingUtil.distance(l,a),r=new SuperMapAlgoPlot.Point(0,0);return r.x=l.x+(a.x-l.x)*s,r.y=l.y+(a.y-l.y)*s,{index:i,pt:r}}return{index:-1,pt:null}},SuperMapAlgoPlot.PlottingUtil.polylineDistance=function(t){if(0===t.length)return 0;for(var e=0,o=0;o<t.length-1;o++)e+=SuperMapAlgoPlot.PlottingUtil.distance(t[o],t[o+1]);return e},SuperMapAlgoPlot.PlottingUtil.rotate=function(t,e,o,i){var n=i.x-t.x,l=i.y-t.y,a=n*e-l*o+t.x,s=n*o+l*e+t.y;return new SuperMapAlgoPlot.Point(a,s)},SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale=function(t,e,o){var i=e.x,n=e.y,l=o.x,a=o.y,s=Math.sqrt(1*(i-l)*(i-l)+1*(n-a)*(n-a)),r=0,u=0;return 0==s?(r=i,u=n):(r=i+(l-i)*t/s,u=n+(a-n)*t/s),new SuperMapAlgoPlot.Point(r,u)},SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale=function(t,e,o){var i=e.x,n=e.y,l=o.x,a=o.y,s=0,r=0,u=Math.sqrt(1*(i-l)*(i-l)+1*(n-a)*(n-a));return 0===u?(s=i,r=n):(s=i+(i-l)*t/u,r=n+(n-a)*t/u),new SuperMapAlgoPlot.Point(s,r)},SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine=function(t,e,o){var i=e.x,n=e.y,l=o.x,a=o.y,s=Math.sqrt(1*(i-l)*(i-l)+1*(n-a)*(n-a)),r=0,u=0;0==s?(u=0,r=t):(r=t*(i-l)/s,u=t*(n-a)/s);var p=-u+l,h=+r+a,c=+u+l,y=-r+a;return{pntLeft:new SuperMapAlgoPlot.Point(c,y),pntRight:new SuperMapAlgoPlot.Point(p,h)}},SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment=function(t,e,o){var i,n,l=0,a=0,s=0,r=1;if(a=e.x!==t.x?(e.y-t.y)/(e.x-t.x):1.7976931348623157e308,s=o.x!==t.x?(o.y-t.y)/(o.x-t.x):1.7976931348623157e308,l=o.y!==e.y?(o.x-e.x)/(e.y-o.y):1.7976931348623157e308,(i=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)==(n=o.x>t.x&&o.y>t.y?1:o.x<t.x&&o.y>t.y?2:o.x<t.x&&o.y<t.y?3:4))(a<l&&s<l||a>l&&s>l)&&(r=0);else switch(i){case 1:(4==n&&a<l||2==n&&a>l)&&(r=0);break;case 2:(1==n&&a<l||3==n&&a>l)&&(r=0);break;case 3:(2==n&&a<l||4==n&&a>l)&&(r=0);break;case 4:(3==n&&a<l||1==n&&a>l)&&(r=0)}var u=new SuperMapAlgoPlot.Point(0,0);return SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l-1.7976931348623157e308,0)?(u.x=t.x,u.y=e.y):SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l,0)?(u.x=e.x,u.y=t.y):(u.x=(l*(e.y-t.y)+l*l*t.x+e.x)/(l*l+1),u.y=t.y+l*(u.x-t.x)),{isOnline:1===r,projectPoint:u}},SuperMapAlgoPlot.PlottingUtil.coordinateTrans=function(t,e,o){var i=SuperMapAlgoPlot.PlottingUtil.distance(new SuperMapAlgoPlot.Point(0,0),e),n=SuperMapAlgoPlot.PlottingUtil.radian(new SuperMapAlgoPlot.Point(0,0),e)+o*Math.PI/180,l=i*Math.cos(n)+t.x,a=i*Math.sin(n)+t.y;return new SuperMapAlgoPlot.Point(l,a)},SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen=function(t,e,o){var i,n,l=(o.x-e.x)*(o.x-e.x)+(o.y-e.y)*(o.y-e.y),a=Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y)),s=Math.sqrt((t.x-o.x)*(t.x-o.x)+(t.y-o.y)*(t.y-o.y));if(0==s||0==a)i=0,n=0;else if(0==l)i=a,n=0;else{var r=(a*a+s*s-l)/2/a/s,u=0;r>=1?(r=1,u=0):u=Math.sqrt(1-r*r),i=s*r,n=s*u}return{dLen1:i,dLen2:n}},SuperMapAlgoPlot.PlottingUtil.paraLine=function(t,e,o){var i=[];if(2>t.length)return i;if(o){var n=t[1].clone();n=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[0],Math.PI/2,n),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[0],n,e));for(var l=1;l<t.length-1;l++)if(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[l].x,t[l+1].x)||!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[l].y,t[l+1].y)){for(var a=SuperMapAlgoPlot.PlottingUtil.radian(t[l],t[l+1]),s=SuperMapAlgoPlot.PlottingUtil.radian(t[l],t[l-1])-a;s<0;)s+=2*Math.PI;var r=s/2,u=void 0;u=r>Math.PI/2?r-Math.PI/2:Math.PI/2-r;var p=e/Math.cos(u);n=t[l+1].clone(),n=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[l],r,n),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[l],n,p))}n=t[t.length-2].clone(),n=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[t.length-1],-1*Math.PI/2,n),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[t.length-1],n,e))}else{var h=t[1].clone();h=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[0],-Math.PI/2,h),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[0],h,e));for(var c=1;c<t.length-1;c++)if(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[c].x,t[c+1].x)||!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[c].y,t[c+1].y)){for(var y=SuperMapAlgoPlot.PlottingUtil.radian(t[c],t[c+1]),g=SuperMapAlgoPlot.PlottingUtil.radian(t[c],t[c-1])-y;g<0;)g+=2*Math.PI;var f=Math.PI-g/2,P=void 0;P=f>Math.PI/2?f-Math.PI/2:Math.PI/2-f;var d=e/Math.cos(P);h=t[c-1].clone(),h=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[c],f,h),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[c],h,d))}h=t[t.length-2].clone(),h=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[t.length-1],Math.PI/2,h),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[t.length-1],h,e))}return i},SuperMapAlgoPlot.PlottingUtil.circlePoint=function(t,e,o,i){i*=Math.PI/180;var n=t.x+e*Math.cos(i),l=t.y+o*Math.sin(i);return new SuperMapAlgoPlot.Point(n,l)},SuperMapAlgoPlot.PlottingUtil.getPolygonCenterPt=function(t){if(!t||0===t.length)return null;for(var e=0,o=0,i=0;i<t.length;i++)e+=t[i].x,o+=t[i].y;return new SuperMapAlgoPlot.Point(e/t.length,o/t.length)},SuperMapAlgoPlot.PlottingUtil.ptIsInPolygon=function(t,e){if(!t||0===t.length)return!1;for(var o=0,i=t.length,n=0;n<i;n++){var l=t[n],a=t[(n+1)%i];if(l.y!==a.y){var s=l.y<a.y?l.y:a.y,r=l.y>a.y?l.y:a.y;if(!(e.y<s||e.y>r))(e.y-l.y)*(a.x-l.x)/(a.y-l.y)+l.x>e.x&&o++}}return o%2==1},SuperMapAlgoPlot.PlottingUtil.projectPtOnPolyLine=function(t,e){if(2>e.length)return{index:-1,pt:null};for(var o=0;o<e.length-1;o++){var i=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(t,e[o],e[o+1]);if(i.isOnline)return{index:o,pt:i.projectPoint}}return{index:-1,pt:null}},SuperMapAlgoPlot.PlottingUtil.isPloyClockwise=function(t){var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),o=e.length;if(!(o<3)){var i=e[0].y*(e[o-1].x-e[1].x);e.push(e[0].clone());for(var n=1;n<o;++n)i+=e[n].y*(e[n-1].x-e[n+1].x);return i>0?0:1}},SuperMapAlgoPlot.PlottingUtil.isSamePt=function(t,e){return!(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.x,e.x)||!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.y,e.y))},SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance=function(t,e){var o=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(e,t);return{index:o.index,pts:o.pt,bfind:-1!==o.index}},SuperMapAlgoPlot.PlottingUtil.ptInBounds=function(t,e){return t.x>e.left&&t.x<e.right&&t.y<e.top&&t.y>e.bottom},SuperMapAlgoPlot.PlottingUtil.InnerAngle=function(t,e,o){if(t==e||t==o)return 0;var i=SuperMapAlgoPlot.PlottingUtil.distance(t,e),n=SuperMapAlgoPlot.PlottingUtil.distance(t,o),l=SuperMapAlgoPlot.PlottingUtil.distance(e,o),a=(i*i+n*n-l*l)/(2*i*n);return a>1&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(a,1)?a=1:a<1&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(a,-1)&&(a=-1),Math.acos(a)},SuperMapAlgoPlot.PlottingUtil.plumbLineLen=function(t,e,o){return SuperMapAlgoPlot.PlottingUtil.distance(t,e)*Math.sin(SuperMapAlgoPlot.PlottingUtil.InnerAngle(e,t,o))},SuperMapAlgoPlot.PlottingUtil.paraPolygon=function(t,e,o){var i=[],n=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),l=n.length;if(l<2)return i;var a=new SuperMapAlgoPlot.Point(0,0);if(o){if(l<3)a=n[1].clone(),SuperMapAlgoPlot.PlottingUtil.rotateAngle(n[0],Math.PI,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(n[0],a,e));else{for(var s=SuperMapAlgoPlot.PlottingUtil.radian(n[0],n[1]),r=SuperMapAlgoPlot.PlottingUtil.radian(n[0],n[n.length-1])-s;r<0;)r+=2*Math.PI;var u,p=r/2;u=p>Math.PI/2?p-Math.PI/2:Math.PI/2-p;var h=e/Math.cos(u);a=n[1].clone(),a=SuperMapAlgoPlot.PlottingUtil.rotateAngle(n[0],p,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(n[0],a,h))}for(var c=1;c<l-1;c++){for(var y=SuperMapAlgoPlot.PlottingUtil.radian(n[c],n[c+1]),g=SuperMapAlgoPlot.PlottingUtil.radian(n[c],n[c-1])-y;g<0;)g+=2*Math.PI;var f=g/2,P=void 0;P=f>Math.PI/2?f-Math.PI/2:Math.PI/2-f;var d=e/Math.cos(P);a=n[c+1].clone(),a=SuperMapAlgoPlot.PlottingUtil.rotateAngle(n[c],f,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(n[c],a,d))}if(l<3)a=n[l-2].clone(),SuperMapAlgoPlot.PlottingUtil.rotateAngle(n[l-1],0,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(n[l-1],a,e));else{for(var S=SuperMapAlgoPlot.PlottingUtil.radian(n[l-1],n[0]),m=SuperMapAlgoPlot.PlottingUtil.radian(n[l-1],n[l-2])-S;m<0;)m+=2*Math.PI;var b,L=m/2;b=L>Math.PI/2?L-Math.PI/2:Math.PI/2-L;var M=e/Math.cos(b);a=n[0].clone(),a=SuperMapAlgoPlot.PlottingUtil.rotateAngle(n[l-1],L,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(n[l-1],a,M))}}else{if(l<3){var v=n[1].clone();SuperMapAlgoPlot.PlottingUtil.rotateAngle(n[0],0,v),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(n[0],v,e))}else{for(var A=SuperMapAlgoPlot.PlottingUtil.radian(n[0],n[1]),T=SuperMapAlgoPlot.PlottingUtil.radian(n[0],n[l-1])-A;T<0;)T+=2*Math.PI;var _,O=Math.PI-T/2;_=O>Math.PI/2?O-Math.PI/2:Math.PI/2-O;var x=e/Math.cos(_);a=n[l-1].clone(),a=SuperMapAlgoPlot.PlottingUtil.rotateAngle(n[0],O,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(n[0],a,x))}for(var w=1;w<l-1;w++){for(var E=SuperMapAlgoPlot.PlottingUtil.radian(n[w],n[w+1]),C=SuperMapAlgoPlot.PlottingUtil.radian(n[w],n[w-1])-E;C<0;)C+=2*Math.PI;var I=Math.PI-C/2,R=void 0;R=I>Math.PI/2?I-Math.PI/2:Math.PI/2-I;var D=e/Math.cos(R);a=n[w-1].clone(),a=SuperMapAlgoPlot.PlottingUtil.rotateAngle(n[w],I,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(n[w],a,D))}if(l<3)a=n[l-2].clone(),SuperMapAlgoPlot.PlottingUtil.rotateAngle(n[l-1],Math.PI,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(n[l-1],a,e));else{for(var U=SuperMapAlgoPlot.PlottingUtil.radian(n[l-1],n[0]),N=SuperMapAlgoPlot.PlottingUtil.radian(n[l-1],n[l-2])-U;N<0;)N+=2*Math.PI;var B,k=Math.PI-N/2;B=k>Math.PI/2?k-Math.PI/2:Math.PI/2-k;var F=e/Math.cos(B);a=n[l-2].clone(),a=SuperMapAlgoPlot.PlottingUtil.rotateAngle(n[l-1],k,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(n[l-1],a,F))}}return i},SuperMapAlgoPlot.PlottingUtil.getOutRectangleDis=function(t){if(2>t.length)return 0;for(var e=t[0].x,o=t[0].x,i=t[0].y,n=t[0].y,l=1;l<t.length;l++)e<t[l].x&&(e=t[l].x),o>t[l].x&&(o=t[l].x),i<t[l].y&&(i=t[l].y),n>t[l].y&&(n=t[l].y);return SuperMapAlgoPlot.PlottingUtil.distance(new SuperMapAlgoPlot.Point(e,i),new SuperMapAlgoPlot.Point(o,n))},SuperMapAlgoPlot.PlottingUtil.clonePoints=function(t){var e=[];if(void 0===t||null===t)return e;if(SuperMapAlgoPlot.PlottingUtil.isArray(t)||(t=[t]),t&&null!=t)for(var o=0;o<t.length;o++)void 0!==t[o]&&null!==t[o]&&t[o].clone&&e.push(t[o].clone());return e},SuperMapAlgoPlot.PlottingUtil.extend=function(t,e){if("function"==typeof SuperMap.Util.extend)return SuperMap.Util.extend(t,e);if(t=t||{},e){for(var o in e){var i=e[o];void 0!==i&&(t[o]=i)}!("function"==typeof window.Event&&e instanceof window.Event)&&e.hasOwnProperty&&e.hasOwnProperty.call("toString")&&(t.toString=e.toString)}return t},SuperMapAlgoPlot.PlottingUtil.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},SuperMapAlgoPlot.PlottingUtil.indexOf=function(t,e){if(null==t)return-1;if("function"==typeof t.indexOf)return t.indexOf(e);for(var o=0,i=t.length;o<i;o++)if(t[o]===e)return o;return-1},SuperMapAlgoPlot.PlottingUtil.copyAttributes=function(t,e){if(t=t||{},e)for(var o in e){var i=e[o];void 0!==i&&"CLASS_NAME"!==o&&"function"!=typeof i&&(t[o]=i)}return t},SuperMapAlgoPlot.PlottingUtil.cloneObject=function(t){if(null===t||"object"!==$t(t))return t;if(t instanceof Date){var e=new Date;return e.setTime(t.getTime()),e}if(t instanceof Array)return t.slice(0);if(t instanceof Object){var o={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(o[i]=SuperMapAlgoPlot.PlottingUtil.cloneObject(t[i]));return o}throw new Error("Unable to copy obj! Its type isn't supported.")},SuperMapAlgoPlot.PlottingUtil.rad=function(t){return t*Math.PI/180},SuperMapAlgoPlot.PlottingUtil.deg=function(t){return 180*t/Math.PI},SuperMapAlgoPlot.PlottingUtil.VincentyConstants={a:6378137,b:6356752.3142,f:1/298.257223563},SuperMapAlgoPlot.PlottingUtil.distVincenty=function(t,e){var o,i,n,l=SuperMapAlgoPlot.PlottingUtil.VincentyConstants,a=l.a,s=l.b,r=l.f;"undefined"!=typeof L&&void 0!==L.LatLng&&t instanceof L.LatLng&&e instanceof L.LatLng?(o=SuperMapAlgoPlot.PlottingUtil.rad(e.lng-t.lng),i=Math.atan((1-r)*Math.tan(SuperMapAlgoPlot.PlottingUtil.rad(t.lat))),n=Math.atan((1-r)*Math.tan(SuperMapAlgoPlot.PlottingUtil.rad(e.lat)))):(o=SuperMapAlgoPlot.PlottingUtil.rad(e.lon-t.lon),i=Math.atan((1-r)*Math.tan(SuperMapAlgoPlot.PlottingUtil.rad(t.lat))),n=Math.atan((1-r)*Math.tan(SuperMapAlgoPlot.PlottingUtil.rad(e.lat))));for(var u=Math.sin(i),p=Math.cos(i),h=Math.sin(n),c=Math.cos(n),y=o,g=2*Math.PI,f=20;Math.abs(y-g)>1e-12&&--f>0;){var P=Math.sin(y),d=Math.cos(y),S=Math.sqrt(c*P*(c*P)+(p*h-u*c*d)*(p*h-u*c*d));if(0==S)return 0;var m=u*h+p*c*d,b=Math.atan2(S,m),M=Math.asin(p*c*P/S),v=Math.cos(M)*Math.cos(M),A=m-2*u*h/v,T=r/16*v*(4+r*(4-3*v));g=y,y=o+(1-T)*r*Math.sin(M)*(b+T*S*(A+T*m*(2*A*A-1)))}if(0==f)return NaN;var _=v*(a*a-s*s)/(s*s),O=_/1024*(256+_*(_*(74-47*_)-128));return(s*(1+_/16384*(4096+_*(_*(320-175*_)-768)))*(b-O*S*(A+O/4*(m*(2*A*A-1)-O/6*A*(4*S*S-3)*(4*A*A-3))))).toFixed(3)/1e3},SuperMapAlgoPlot.PlottingUtil.destinationVincenty=function(t,e,o){var i,n,l=SuperMapAlgoPlot.PlottingUtil,a=l.VincentyConstants,s=a.a,r=a.b,u=a.f;"undefined"!=typeof L&&void 0!==L.LatLng&&t instanceof L.LatLng?(i=t.lng,n=t.lat):(i=t.lon,n=t.lat);for(var p=o,h=l.rad(e),c=Math.sin(h),y=Math.cos(h),g=(1-u)*Math.tan(l.rad(n)),f=1/Math.sqrt(1+g*g),P=g*f,d=Math.atan2(g,y),S=f*c,m=1-S*S,b=m*(s*s-r*r)/(r*r),M=1+b/16384*(4096+b*(b*(320-175*b)-768)),v=b/1024*(256+b*(b*(74-47*b)-128)),A=p/(r*M),T=2*Math.PI;Math.abs(A-T)>1e-12;){var _=Math.cos(2*d+A),O=Math.sin(A),x=Math.cos(A);T=A,A=p/(r*M)+v*O*(_+v/4*(x*(2*_*_-1)-v/6*_*(4*O*O-3)*(4*_*_-3)))}var w=P*O-f*x*y,E=Math.atan2(P*x+f*O*y,(1-u)*Math.sqrt(S*S+w*w)),C=u/16*m*(4+u*(4-3*m)),I=Math.atan2(O*c,f*x-P*O*y)-(1-C)*u*S*(A+C*O*(_+C*x*(2*_*_-1)));return"undefined"!=typeof L&&void 0!==L.LatLng&&t instanceof L.LatLng?L.latLng(l.deg(E),i+l.deg(I)):new SuperMap.LonLat(i+l.deg(I),l.deg(E))},SuperMapAlgoPlot.PlottingUtil.midPoint=function(t,e){var o=new SuperMapAlgoPlot.Point(0,0);return o.x=.5*(t.x+e.x),o.y=.5*(t.y+e.y),o},SuperMapAlgoPlot.PlottingUtil.makeDottedLine=function(t,e){for(var o,i,n=[],l=e,a=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t),s=e,r=t[0].clone(),u=1,p=0,h=!0,c=!0;p<a;){var y;(i=[]).push(r),p+=l;var g=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(p,t);if(y=g.index,o=g.pts,!(h=g.bfind))break;if(u<y)for(var f=u;f<y;f++)i.push(t[f]);i.push(o),n.push(i),p+=s;var P=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(p,t);if(y=P.index,r=P.pts,u=y+1,!(c=P.bfind))break}if(!h){(i=[]).push(r);for(var d=u;d<t.length;d++)i.push(t[d]);2===i.length&&0===SuperMapAlgoPlot.PlottingUtil.distance(i[0],i[1])||n.push(i)}if(!c){var S=t[t.length-1],m=SuperMapAlgoPlot.PlottingUtil.distance(o,S);if(m*=.01,!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(m,0)){var b=SuperMapAlgoPlot.PlottingUtil.linePnt(S,o,m);(i=[]).push(b),i.push(S),n.push(i)}}return n};SuperMapAlgoPlot.Primitives=SuperMapAlgoPlot.Primitives||{};SuperMapAlgoPlot.Primitives={nSegmentCount:72,initialize:function(t){t&&t.nSegmentCount&&(this.nSegmentCount=t.nSegmentCount)},polyline:function(t){return t},parallelline:function(t){if(t&&t.length>=3){var e=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]);SuperMapAlgoPlot.PlottingUtil.isRight(t[0],t[1],t[2])&&(e=-e);for(var o=[],i=1;i<t.length;i++)o.push(t[i].clone());var n=SuperMapAlgoPlot.PlottingUtil.parallel(o,e);return t[0].x=n[0].x,t[0].y=n[0].y,[o,n]}return[]},kidney:function(t,e){if(t){var o=[];return o=e?this.getKendyShapePts(t):t,SuperMapAlgoPlot.PlottingUtil.clearSamePts(o),o}},bezier:function(t,e){if(t){var o=[];return o=e?SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t):t,SuperMapAlgoPlot.PlottingUtil.clearSamePts(o),o}},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]);var o=[];return o=e?SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t):t,SuperMapAlgoPlot.PlottingUtil.clearSamePts(o),o}},parallelogram:function(t){if(t&&t.length>=3){var e=t[0].x+(t[2].x-t[1].x),o=t[0].y+(t[2].y-t[1].y),i=new SuperMapAlgoPlot.Point(e,o),n=[];return n.push.apply(n,t),n.push(i),n.push(n[0]),n}},polygon:function(t){if(t&&t.length>2)return t},circle:function(t){if(t&&2===t.length){for(var e=t[0],o=t[1],i=[],n=Math.sqrt((o.x-e.x)*(o.x-e.x)+(o.y-e.y)*(o.y-e.y)),l=360/this.nSegmentCount,a=0;a<this.nSegmentCount;a++){var s=(a*l+1)*Math.PI/180,r=new SuperMapAlgoPlot.Point(Math.cos(s)*n+e.x,Math.sin(s)*n+e.y);i[a]=r}return i}},rectangle:function(t){if(t&&2===t.length){var e=t[0],o=t[1],i=e.clone();return[i,new SuperMapAlgoPlot.Point(o.x,e.y),o.clone(),new SuperMapAlgoPlot.Point(e.x,o.y),i]}},sector:function(t){if(t&&t.length>=3){var e=this.getArcInfo(t[0],t[1],t[2]);e.dStartAngle*=Math.PI/180,e.dEndAngle*=Math.PI/180;var o=(e.dEndAngle-e.dStartAngle)/this.nSegmentCount,i=this.getArcSpatialData(e.pntCenter,e.dRadius,e.dRadius,0,e.dStartAngle,e.dEndAngle,o);if(i.push(e.pntCenter),0!==i.length)return i}},lune:function(t){if(t&&t.length>=3){var e=this.getArcInfo(t[0],t[1],t[2]);e.dStartAngle*=Math.PI/180,e.dEndAngle*=Math.PI/180;var o=(e.dEndAngle-e.dStartAngle)/this.nSegmentCount,i=this.getArcSpatialData(e.pntCenter,e.dRadius,e.dRadius,0,e.dStartAngle,e.dEndAngle,o);if(0!==i.length)return i}},arc:function(t){if(t&&t.length>=3){var e=this.getArcInfo(t[0],t[1],t[2]);e.dStartAngle*=Math.PI/180,e.dEndAngle*=Math.PI/180;var o=(e.dEndAngle-e.dStartAngle)/this.nSegmentCount,i=this.getArcSpatialData(e.pntCenter,e.dRadius,e.dRadius,0,e.dStartAngle,e.dEndAngle,o);if(0!==i.length)return i}},ellipse:function(t,e,o,i,n){if(!0===o){if((!i||null==i)&&t&&t.length>=3&&(i=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1])),(!n||null==n)&&t&&t.length>=3){var l=SuperMapAlgoPlot.PlottingUtil.projectPoint(t[2],t[0],t[1]);n=SuperMapAlgoPlot.PlottingUtil.distance(l,t[2])}}else n=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[2]),i=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]);if(e&&null!=e?e*=Math.PI/180:e=SuperMapAlgoPlot.PlottingUtil.radian(t[0],t[1]),t&&t.length>0){var a=2*Math.PI,s=a/this.nSegmentCount,r=this.getArcSpatialData(t[0],i,n,e,0,a,s);if(!0===o){var u=Math.sin(e),p=Math.cos(e);t[2].x>t[1].x?(t[2].x=t[0].x-n*u,t[2].y=t[0].y+n*p):(t[2].x=t[0].x+n*u,t[2].y=t[0].y-n*p)}return r}},getArcSpatialData:function(t,e,o,i,n,l,a){var s=[];if(Math.abs(a)<1e-9)return s;for(;l<n;)l+=2*Math.PI;for(;l>n+2*Math.PI;)n+=2*Math.PI;var r=Math.cos(i)*e,u=Math.sin(i)*e,p=Math.cos(i)*o,h=Math.sin(i)*o,c=this.calcEllipseRadian(n,e,o),y=this.calcEllipseRadian(l,e,o);y-c<1e-5&&(y+=2*Math.PI);var g=Math.round(Math.abs((y-c)/a)+1);if(g<2)return s;for(var f=0;f<g-1;c+=a,f++){f===g-2&&(c=l);var P=t.x+r*Math.cos(c)-h*Math.sin(c),d=t.y+u*Math.cos(c)+p*Math.sin(c);s.push(new SuperMapAlgoPlot.Point(P,d))}return 0>s.length&&(s[s.length-1].x=t.x+r*Math.cos(y)-h*Math.sin(y),s[s.length-1].y=t.y+u*Math.cos(y)+p*Math.sin(y)),s},getArcCircleSpatialData:function(t,e,o,i){for(var n=[];i<o;)i+=2*Math.PI;for(;i>o+2*Math.PI;)o+=2*Math.PI;i-o<1e-10&&(i+=2*Math.PI);for(var l=(i-o)/50,a=o;a<i;a+=l){var s=t.x+e*Math.cos(a),r=t.y+e*Math.sin(a);n.push(new SuperMapAlgoPlot.Point(s,r))}var u=t.x+e*Math.cos(i),p=t.y+e*Math.sin(i);return n.push(new SuperMapAlgoPlot.Point(u,p)),n},getArcInfo:function(t,e,o){var i={};i.pntCenter=new SuperMapAlgoPlot.Point(0,0),i.dRadius=0,i.dStartAngle=0,i.dEndAngle=0;var n=e.x-t.x,l=e.y-t.y;if(Math.abs(n)<1e-9){var a={},s={};a.x=(e.x+t.x)/2,a.y=(e.y+t.y)/2,s.x=(e.x+o.x)/2,s.y=(e.y+o.y)/2;var r=0;Math.abs(o.x-e.x)>=1e-9&&(r=(o.y-e.y)/(o.x-e.x)),i.pntCenter.y=a.y,Math.abs(r)<1e-9?i.pntCenter.x=s.x:i.pntCenter.x=s.x-r*(a.y-s.y)}else{var u={},p={};u.x=(e.x+t.x)/2,u.y=(e.y+t.y)/2,p.x=(e.x+o.x)/2,p.y=(e.y+o.y)/2;var h=l/n,c=1;Math.abs(h)<1e-9?(i.pntCenter.x=u.x,Math.abs(o.x-e.x<1e-9)?i.pntCenter.y=p.y:i.pntCenter.y=-(o.x-e.x)/(o.y-e.y)*(i.pntCenter.x-p.x)+p.y):Math.abs(o.x-e.x)<1e-9?(i.pntCenter.y=p.y,i.pntCenter.x=-h*(i.pntCenter.y-u.y)+u.x):(c=(o.y-e.y)/(o.x-e.x),i.pntCenter.x=(h*c*(u.y-p.y)+c*u.x-h*p.x)/(c-h),i.pntCenter.y=(p.x-u.x+c*p.y-h*u.y)/(c-h))}var y=Math.atan2(t.y-i.pntCenter.y,t.x-i.pntCenter.x),g=Math.atan2(o.y-i.pntCenter.y,o.x-i.pntCenter.x);if(SuperMapAlgoPlot.PlottingUtil.isCounterClockwise(t,e,o)){for(;y>=2*Math.PI;)y-=2*Math.PI;for(;y<0;)y+=2*Math.PI;for(;g>2*Math.PI;)g-=2*Math.PI;for(;g<y;)g+=2*Math.PI}else{for(;g>=2*Math.PI;)g-=2*Math.PI;for(;g<0;)g+=2*Math.PI;for(;y>2*Math.PI;)y-=2*Math.PI;for(;g>y;)y+=2*Math.PI;var f=y;y=g,g=f}return i.dRadius=Math.sqrt((i.pntCenter.x-t.x)*(i.pntCenter.x-t.x)+(i.pntCenter.y-t.y)*(i.pntCenter.y-t.y)),i.dEndAngle=180*g/Math.PI,i.dStartAngle=180*y/Math.PI,i},calcEllipseRadian:function(t,e,o){var i=t,n=e*Math.sin(t),l=o*Math.cos(t),a=Math.atan2(n,l);if(t>Math.PI)for(;i>Math.PI;)i-=2*Math.PI,a+=2*Math.PI;else if(t<-Math.PI)for(;i<-Math.PI;)i+=2*Math.PI,a-=2*Math.PI;return a},getKendyShapePts:function(t){var e=[];if(2>(t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length)return e;var o=this.calcShapePoints(t);if(12!=o.length)return e;o.push(o[0]),o.push(o[1]),o.splice(0,1);for(var i=0;i<o.length-3;i+=3){var n;n=this.getBezierPtsWithScalePts(o[i],o[i+1],o[i+2],o[i+3]),e=e.concat(n)}return e},calcShapePoints:function(t){var e=[],o=[],i=t.length;if(0!==i){if(1!==i){if(2==i){var n=this.calcProtudeC3(t[0],t[1]);o.push(t[0]),o.push(t[1]),o.push(n)}else if(o.push(t[0]),o.push(t[1]),o.push(t[2]),(SuperMapAlgoPlot.PlottingUtil.isSamePt(t[0],t[2])||SuperMapAlgoPlot.PlottingUtil.isSamePt(t[1],t[2]))&&(e.push(t[0]),e.push(t[1])),SuperMapAlgoPlot.PlottingUtil.isSamePt(t[0],t[1]))return e.push(t[0]),void e.push(t[2]);o=this.reNormalizeKidneyCtrlPoints(o);var l=new SuperMapAlgoPlot.Point(0,0),a=new SuperMapAlgoPlot.Point(0,0);l.x=.5*(o[0].x+o[1].x),l.y=.5*(o[0].y+o[1].y),a.x=l.x-.1*(o[2].x-l.x),a.y=l.y-.1*(o[2].y-l.y);var s=this.GetPtsByTriangle(3,0,o[1],o[0],a);e.push(s.pr),e.push(a),e.push(s.pl);var r=this.GetPtsByTriangle(4,2,o[2],o[0],o[1]);e.push(r.pr),e.push(o[1]),e.push(r.pl);var u=this.GetPtsByTriangle(2,0,o[0],o[1],o[2]);e.push(u.pr),e.push(o[2]),e.push(u.pl);var p=this.GetPtsByTriangle(4,1,o[1],o[2],o[0]);return e.push(p.pr),e.push(o[0]),e.push(p.pl),e}e.push(t[0])}},calcProtudeC3:function(t,e){var o,i=new SuperMapAlgoPlot.Point(0,0);return i.x=.5*(t.x+e.x),i.y=.5*(t.y+e.y),o=SuperMapAlgoPlot.PlottingUtil.distance(e,t)/2.7,this.GetPointsOfNormal(o,t,i).pt3},GetPointsOfNormal:function(t,e,o){var i,n=new SuperMapAlgoPlot.Point(0,0),l=new SuperMapAlgoPlot.Point(0,0),a=new SuperMapAlgoPlot.Point(0,0);return 0==(i=SuperMapAlgoPlot.PlottingUtil.distance(e,o))?(a.y=0,a.x=t):(a.x=t*(e.x-o.x)/i,a.y=t*(e.y-o.y)/i),n.x=-a.y+o.x,n.y=a.x+o.y,l.x=a.y+o.x,l.y=-a.x+o.y,{pt3:n,pt4:l}},reNormalizeKidneyCtrlPoints:function(t){var e=[];e.push(new SuperMapAlgoPlot.Point(0,0)),e.push(new SuperMapAlgoPlot.Point(0,0)),e.push(new SuperMapAlgoPlot.Point(0,0));var o=t.length;if(o<2)return e;if(2==o)e[0]=t[0],e[1]=t[1],e[2]=this.calcProtudeC3(t[0],t[1]);else{var i,n,l,a=t[0],s=t[1],r=t[2];if(i=SuperMapAlgoPlot.PlottingUtil.distance(s,a),n=SuperMapAlgoPlot.PlottingUtil.distance(r,s),l=SuperMapAlgoPlot.PlottingUtil.distance(a,r),n>=i&&n>=l){var u=a.clone();a=r.clone(),r=u.clone()}else if(l>=i&&l>=n){var p=r.clone();r=s.clone(),s=p.clone()}if(!SuperMapAlgoPlot.PlottingUtil.isRight(r,a,s)){var h=a.clone();a=s.clone(),s=h.clone()}e[0]=a,e[1]=s,e[2]=r}return e},GetPtsByTriangle:function(t,e,o,i,n){var l=new SuperMapAlgoPlot.Point(0,0),a=0,s=0;return a=SuperMapAlgoPlot.PlottingUtil.distance(n,o),s=SuperMapAlgoPlot.PlottingUtil.distance(i,n),1==e&&(a*=2),2==e&&(s*=2),l.x=(a*i.x+s*o.x)/(a+s),l.y=(a*i.y+s*o.y)/(a+s),{pl:this.GetWhichPtOfNormal(t,o,l,n),pr:this.GetWhichPtOfNormal(t,i,l,n)}},GetWhichPtOfNormal:function(t,e,o,i){var n=0;n=SuperMapAlgoPlot.PlottingUtil.distance(i,e)/t;var l=this.GetPointsOfNormal(n,o,i);return SuperMapAlgoPlot.PlottingUtil.distance(e,l.pt4)>=(n=SuperMapAlgoPlot.PlottingUtil.distance(e,l.pt3))?l.pt3:l.pt4},getBezierPtsWithScalePts:function(t,e,o,i){var n=[],l=t.x,a=t.y,s=e.x,r=e.y,u=o.x,p=o.y,h=i.x,c=i.y;if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l,s,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(a,r,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(u,h,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(p,c,1e-10))n.push(new SuperMapAlgoPlot.Point(l,a)),n.push(new SuperMapAlgoPlot.Point(u,p));else for(var y=0;y<=1;y+=.03125){var g,f,P,d,S=y*y,m=S*y;g=1-3*y+3*S-m,f=3*(y-2*S+m),P=3*(S-m),d=m;var b=new SuperMapAlgoPlot.Point(g*l+f*s+P*u+d*h,g*a+f*r+P*p+d*c);n.push(b)}return n},getSpatialData:function(t,e,o,i){switch(null==i&&(i=!0),t){case 24:return this.polyline(e);case 390:return this.kidney(e,i);case 590:return this.bezier(e,i);case 360:return this.loopbezier(e,i);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,o,i);case 48:return this.parallelline(e);default:return e}}};SuperMapAlgoPlot.RouteNodePrimitives=SuperMapAlgoPlot.RouteNodePrimitives||{};SuperMapAlgoPlot.RouteNodePrimitives={initialize:function(){},rendezvousPoint:function(){var t=[],e=new Object;e.type=SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),e.positionPoints.push(new SuperMapAlgoPlot.Point(0,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};var o=new Object;return o.type=SuperMapAlgoPlot.SymbolType.TEXTSYMBOL,o.positionPoints=[],o.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),o.textContent="会",o.style={surroundLineFlag:!1,fontSize:14,fontSizeLimit:!0},o.style.labelAlign="cm",t.push(o),t.push(e),t},expandingPoint:function(){var t=[],e=new Object;e.type=SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),e.positionPoints.push(new SuperMapAlgoPlot.Point(0,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};var o=new Object;return o.type=SuperMapAlgoPlot.SymbolType.TEXTSYMBOL,o.positionPoints=[],o.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),o.textContent="展",o.style={surroundLineFlag:!1,fontSize:14,fontSizeLimit:!0},o.style.labelAlign="cm",t.push(o),t.push(e),t},volleyPoint:function(){var t=[],e=new Object;e.type=SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),e.positionPoints.push(new SuperMapAlgoPlot.Point(0,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};var o=new Object;return o.type=SuperMapAlgoPlot.SymbolType.TEXTSYMBOL,o.positionPoints=[],o.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),o.textContent="齐",o.style={surroundLineFlag:!1,fontSize:14,fontSizeLimit:!0},o.style.labelAlign="cm",t.push(o),t.push(e),t},standbyPoint_Outer:function(t,e){var o=[],i=new SuperMapAlgoPlot.Point(0,0),n=new SuperMapAlgoPlot.Point(0,30);t||(t=90);var l=new Object;l.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,l.positionPoints=[];for(var a=t+10;a<170+t;a+=10){var s=SuperMapAlgoPlot.PlottingUtil.findPoint(i,n,30,a);l.positionPoints.push(s)}l.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},o.push(l);var r=l.positionPoints[l.positionPoints.length-1],u=l.positionPoints[l.positionPoints.length-2],p=SuperMapAlgoPlot.PlottingUtil.findPoint(r,u,9,22.5),h=SuperMapAlgoPlot.PlottingUtil.findPoint(r,u,9,-22.5),c=new Object;c.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,c.positionPoints=[],c.positionPoints.push(p),c.positionPoints.push(r.clone()),c.positionPoints.push(h),c.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},o.push(c);var y=new Object;y.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,y.positionPoints=[];for(var g=190+t;g<350+t;g+=10){var f=SuperMapAlgoPlot.PlottingUtil.findPoint(i,n,30,g);y.positionPoints.push(f)}y.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},o.push(y);var P=y.positionPoints[y.positionPoints.length-1],d=y.positionPoints[y.positionPoints.length-2],S=SuperMapAlgoPlot.PlottingUtil.findPoint(P,d,9,22.5),m=SuperMapAlgoPlot.PlottingUtil.findPoint(P,d,9,-22.5),b=new Object;b.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,b.positionPoints=[],b.positionPoints.push(S),b.positionPoints.push(P.clone()),b.positionPoints.push(m),b.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},o.push(b);for(var L=0;L<o.length;L++)for(var M=0;M<o[L].positionPoints.length;M++){var v=e*(Math.PI/180);SuperMapAlgoPlot.PlottingUtil.rotateAngle(i,v,o[L].positionPoints[M])}return o},standbyPoint_Inner:function(){var t=[],e=new Object;e.type=SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(-20,0)),e.positionPoints.push(new SuperMapAlgoPlot.Point(20,10)),e.positionPoints.push(new SuperMapAlgoPlot.Point(20,-10)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(e);var o=new Object;o.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,o.positionPoints=[],o.positionPoints.push(new SuperMapAlgoPlot.Point(-5,0)),o.positionPoints.push(new SuperMapAlgoPlot.Point(17,0)),o.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(o);var i=new Object;return i.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,i.positionPoints=[],i.positionPoints.push(new SuperMapAlgoPlot.Point(-2,1.5)),i.positionPoints.push(new SuperMapAlgoPlot.Point(-5,0)),i.positionPoints.push(new SuperMapAlgoPlot.Point(-2,-1.5)),i.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(i),t},supplyPoint:function(){var t=[],e=new Object;e.type=SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),e.positionPoints.push(new SuperMapAlgoPlot.Point(0,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};var o=new Object;return o.type=SuperMapAlgoPlot.SymbolType.TEXTSYMBOL,o.positionPoints=[],o.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),o.textContent="补",o.style={surroundLineFlag:!1,fontSize:14,fontSizeLimit:!0},o.style.labelAlign="cm",t.push(o),t.push(e),t},takeoffPoint:function(){var t=[],e=new Object;return e.type=SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(-15,25)),e.positionPoints.push(new SuperMapAlgoPlot.Point(15,25)),e.positionPoints.push(new SuperMapAlgoPlot.Point(15,-25)),e.positionPoints.push(new SuperMapAlgoPlot.Point(0,-35)),e.positionPoints.push(new SuperMapAlgoPlot.Point(-15,-25)),e.positionPoints.push(new SuperMapAlgoPlot.Point(-15,25)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(e),t},initialPoint:function(){var t=[],e=new Object;return e.type=SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(-30,30)),e.positionPoints.push(new SuperMapAlgoPlot.Point(30,30)),e.positionPoints.push(new SuperMapAlgoPlot.Point(30,-30)),e.positionPoints.push(new SuperMapAlgoPlot.Point(-30,-30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(e),t},visualInitalPoint:function(){var t=[],e=new Object;return e.type=SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,30)),e.positionPoints.push(new SuperMapAlgoPlot.Point(30,0)),e.positionPoints.push(new SuperMapAlgoPlot.Point(0,-30)),e.positionPoints.push(new SuperMapAlgoPlot.Point(-30,0)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(e),t},lanchPoint:function(){var t=[],e=new Object;return e.type=SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,30)),e.positionPoints.push(new SuperMapAlgoPlot.Point(20,-30)),e.positionPoints.push(new SuperMapAlgoPlot.Point(-20,-30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(e),t},turningPoint:function(){var t=[],e=new Object;return e.type=SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),e.positionPoints.push(new SuperMapAlgoPlot.Point(0,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(e),t},aimingPoint:function(){var t=[],e=new Object;return e.type=SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,-30)),e.positionPoints.push(new SuperMapAlgoPlot.Point(20,30)),e.positionPoints.push(new SuperMapAlgoPlot.Point(-20,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(e),t},targetPoint:function(){var t=[],e=new Object;return e.type=SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,30)),e.positionPoints.push(new SuperMapAlgoPlot.Point(30,-30)),e.positionPoints.push(new SuperMapAlgoPlot.Point(-30,-30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(e),t},eightSpiralPoint:function(){var t=[],e=new Object;e.type=SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(30,0)),e.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};var o=new Object;return o.type=SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,o.positionPoints=[],o.positionPoints.push(new SuperMapAlgoPlot.Point(-30,0)),o.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),o.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(e),t.push(o),t},happyValleyPoint:function(){var t=[],e=new Object;e.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(-30,20)),e.positionPoints.push(new SuperMapAlgoPlot.Point(30,20)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};var o=new Object;o.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,o.positionPoints=[],o.positionPoints.push(new SuperMapAlgoPlot.Point(30,-20)),o.positionPoints.push(new SuperMapAlgoPlot.Point(-30,-20)),o.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};var i=new Object;i.type=SuperMapAlgoPlot.SymbolType.ARCSYMBOL,i.positionPoints=[],i.positionPoints.push(new SuperMapAlgoPlot.Point(-30,20)),i.positionPoints.push(new SuperMapAlgoPlot.Point(-50,0)),i.positionPoints.push(new SuperMapAlgoPlot.Point(-30,-20)),i.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};var n=new Object;return n.type=SuperMapAlgoPlot.SymbolType.ARCSYMBOL,n.positionPoints=[],n.positionPoints.push(new SuperMapAlgoPlot.Point(30,20)),n.positionPoints.push(new SuperMapAlgoPlot.Point(50,0)),n.positionPoints.push(new SuperMapAlgoPlot.Point(30,-20)),n.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(e),t.push(o),t.push(i),t.push(n),t},attackPoint:function(){var t=[],e=new Object;e.type=SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),e.positionPoints.push(new SuperMapAlgoPlot.Point(0,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};var o=new Object;return o.type=SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,o.positionPoints=[],o.positionPoints.push(new SuperMapAlgoPlot.Point(0,20)),o.positionPoints.push(new SuperMapAlgoPlot.Point(20,-20)),o.positionPoints.push(new SuperMapAlgoPlot.Point(-20,-20)),o.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(o),t.push(e),t},suppressPoint:function(){var t=[],e=new Object;e.type=SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),e.positionPoints.push(new SuperMapAlgoPlot.Point(0,30)),e.style={surroundLineFlag:!1,fontSize:14};var o=new Object;return o.type=SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,o.positionPoints=[],o.positionPoints.push(new SuperMapAlgoPlot.Point(-15,15)),o.positionPoints.push(new SuperMapAlgoPlot.Point(15,15)),o.positionPoints.push(new SuperMapAlgoPlot.Point(15,-15)),o.positionPoints.push(new SuperMapAlgoPlot.Point(-15,-15)),o.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},t.push(o),t.push(e),t},getRouteNodeCells:function(t,e,o){switch(t){case SuperMapAlgoPlot.RouteNodeType.RENDEZVOUS:return this.rendezvousPoint();case SuperMapAlgoPlot.RouteNodeType.EXPANDING:return this.expandingPoint();case SuperMapAlgoPlot.RouteNodeType.VOLLEY:return this.volleyPoint();case SuperMapAlgoPlot.RouteNodeType.STANDBY:return e?this.standbyPoint_Inner():this.standbyPoint_Outer(null,o);case SuperMapAlgoPlot.RouteNodeType.SUPPLY:return this.supplyPoint();case SuperMapAlgoPlot.RouteNodeType.TAKEOFF:return this.takeoffPoint();case SuperMapAlgoPlot.RouteNodeType.INITIAL:return this.initialPoint();case SuperMapAlgoPlot.RouteNodeType.VISUALINITAL:return this.visualInitalPoint();case SuperMapAlgoPlot.RouteNodeType.LANCH:case SuperMapAlgoPlot.RouteNodeType.WEAPONLAUNCH:return this.lanchPoint();case SuperMapAlgoPlot.RouteNodeType.TURNING:case SuperMapAlgoPlot.RouteNodeType.COMMONROUTE:return this.turningPoint();case SuperMapAlgoPlot.RouteNodeType.AIMING:return this.aimingPoint();case SuperMapAlgoPlot.RouteNodeType.TARGET:return this.targetPoint();case SuperMapAlgoPlot.RouteNodeType.ATTACK:return this.attackPoint();case SuperMapAlgoPlot.RouteNodeType.SUPPRESS:return this.suppressPoint();case SuperMapAlgoPlot.RouteNodeType.EIGHTSPIRAL:return this.eightSpiralPoint();case SuperMapAlgoPlot.RouteNodeType.HAPPYVALLEY:return this.happyValleyPoint();default:return[]}},getRouteNodeNameByType:function(t){switch(t){case SuperMapAlgoPlot.RouteNodeType.RENDEZVOUS:return"会合点";case SuperMapAlgoPlot.RouteNodeType.EXPANDING:return"展开点";case SuperMapAlgoPlot.RouteNodeType.VOLLEY:return"齐射点";case SuperMapAlgoPlot.RouteNodeType.STANDBY:return"待机点";case SuperMapAlgoPlot.RouteNodeType.SUPPLY:return"补给点";case SuperMapAlgoPlot.RouteNodeType.TAKEOFF:return"起飞点";case SuperMapAlgoPlot.RouteNodeType.INITIAL:return"初始点";case SuperMapAlgoPlot.RouteNodeType.VISUALINITAL:return"可视化初始点";case SuperMapAlgoPlot.RouteNodeType.LANCH:return"发射点";case SuperMapAlgoPlot.RouteNodeType.WEAPONLAUNCH:return"武器发射点";case SuperMapAlgoPlot.RouteNodeType.TURNING:return"转弯点";case SuperMapAlgoPlot.RouteNodeType.COMMONROUTE:return"普通航路点";case SuperMapAlgoPlot.RouteNodeType.AIMING:return"目标瞄准点";case SuperMapAlgoPlot.RouteNodeType.TARGET:return"目标点";case SuperMapAlgoPlot.RouteNodeType.ATTACK:return"攻击点";case SuperMapAlgoPlot.RouteNodeType.SUPPRESS:return"压制点";case SuperMapAlgoPlot.RouteNodeType.EIGHTSPIRAL:return"八字盘旋点";case SuperMapAlgoPlot.RouteNodeType.HAPPYVALLEY:return"跑马圈点";default:return""}}};SuperMapAlgoPlot.AddPoint_WayType={UNKNOWN:0,POLYLINE:1,CURVE:2,CURVE_WITHCONTROLPT:3,POLYLINE_CLOSE:4,CURVE_CLOSE:5};function te(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var ee=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.m_pData=null,this.CLASS_NAME="SuperMapAlgoPlot.Path2D"}var e,o,i;return e=t,i=[{key:"mtRef",value:function(t){return 0!=++t}},{key:"mtDeRef",value:function(t){return 0!=--t}}],(o=[{key:"MoveTo",value:function(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 o=new SuperMapAlgoPlot.Element(t.x,t.y,0);e.elements.push(o)}e.cStart=e.elements.length-1}},{key:"LineTo",value:function(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 o=new SuperMapAlgoPlot.Element(t.x,t.y,1);e.elements.push(o)}}},{key:"CurveTo",value:function(t,e,o){this.ensureData(),this.detach();var i=this.getDataPtr();if(i.elements[i.elements.length-1].GetX()!=t.x||i.elements[i.elements.length-1].GetY()!=t.y||t.x!=e.x||t.y!=e.y||e.x!=o.x||e.y!=o.y){i.MaybeStartNewFigure();var n=new SuperMapAlgoPlot.Element(t.x,t.y,2),l=new SuperMapAlgoPlot.Element(e.x,e.y,3),a=new SuperMapAlgoPlot.Element(o.x,o.y,3);i.elements.push(n),i.elements.push(l),i.elements.push(a)}}},{key:"CubicTo",value:function(t,e,o){this.ensureData(),this.detach();var i=this.getDataPtr();if(i.elements[i.elements.length-1].GetX()!=t.x||i.elements[i.elements.length-1].GetY()!=t.y||t.x!=e.x||t.y!=e.y||e.x!=o.x||e.y!=o.y){i.MaybeStartNewFigure();var n=new SuperMapAlgoPlot.Element(t.x,t.y,2),l=new SuperMapAlgoPlot.Element(e.x,e.y,3),a=new SuperMapAlgoPlot.Element(o.x,o.y,3);i.elements.push(n),i.elements.push(l),i.elements.push(a)}}},{key:"ToSubPathPolygons",value:function(t){var e,o,i=this.getDataPtr();if(this.IsEmpty())return!1;for(var n=[],l=this.GetElementCount(),a=0;a<l;a++){var s=i.elements[a];switch(s.GetType()){case 0:n.length>1&&t.push(n),n=[],e=s.GetX(),o=s.GetY(),n.push(new SuperMapAlgoPlot.Point(e,o));break;case 1:e=s.GetX(),o=s.GetY(),n.push(new SuperMapAlgoPlot.Point(e,o));break;case 2:if(3!=i.elements[a+1].GetType()||3!=i.elements[a+1].GetType())break;for(var r=i.elements[a-1].GetX(),u=i.elements[a-1].GetY(),p=s.GetX(),h=s.GetY(),c=i.elements[a+1].GetX(),y=i.elements[a+1].GetY(),g=i.elements[a+2].GetX(),f=i.elements[a+2].GetY(),P=0;P<=1;P+=.03125){var d=P*P,S=d*P,m=1-3*P+3*d-S,b=3*(P-2*d+S),L=3*(d-S),M=S;n.push(new SuperMapAlgoPlot.Point(m*r+b*p+L*c+M*g,m*u+b*h+L*y+M*f))}a+=2}}return n.length>1&&t.push(n),!0}},{key:"ensureData",value:function(){null==this.m_pData&&this.ensureData_helper()}},{key:"ensureData_helper",value:function(){var t=new SuperMapAlgoPlot.Path2DData,e=new SuperMapAlgoPlot.Element(0,0,0);t.elements.push(e),null==this.m_pData||this.mtDeRef(this.m_pData.ref)||(this.m_pData=null),this.m_pData=t}},{key:"detach",value:function(){1!=this.m_pData.ref&&this.detach_helper(),this.setBoundsDirty(!0)}},{key:"detach_helper",value:function(){var t=new SuperMapAlgoPlot.Path2DData;null==this.m_pData||this.mtDeRef(this.m_pData.ref)||(this.m_pData=null),this.m_pData=t}},{key:"setBoundsDirty",value:function(t){this.getDataPtr().isBoundsDirty=t}},{key:"getDataPtr",value:function(){return this.m_pData}},{key:"IsEmpty",value:function(){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()}},{key:"GetElementCount",value:function(){return null!=this.m_pData?this.m_pData.elements.length:0}}])&&te(e.prototype,o),i&&te(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function oe(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMapAlgoPlot.Path2D=ee;var ie=function(){function t(e,o,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.m_x=e,this.m_y=o,this.m_type=i,this.CLASS_NAME="SuperMapAlgoPlot.Element"}var e,o,i;return e=t,(o=[{key:"GetX",value:function(){return this.m_x}},{key:"GetY",value:function(){return this.m_y}},{key:"GetType",value:function(){return this.m_type}},{key:"GetPosition",value:function(){return SuperMapAlgoPlot.Point(this.m_x,this.m_y)}},{key:"SetPosition",value:function(t,e){this.m_x=t,this.m_y=e}},{key:"SetType",value:function(t){this.m_type=t}},{key:"IsCurveTo",value:function(){return 2==this.m_type}},{key:"IsLineTo",value:function(){return 1==this.m_type}},{key:"IsMoveTo",value:function(){return 0==this.m_type}},{key:"Equal",value:function(t){return SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.m_x,t.m_x,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.m_y,t.m_y,1e-10)&&this.m_type==t.m_type}},{key:"clone",value:function(){return new SuperMapAlgoPlot.Path2D.Element(this.m_x,this.m_y,this.m_type)}}])&&oe(e.prototype,o),i&&oe(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ne(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMapAlgoPlot.Element=ie;var le=function(){function t(e){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e){this.cStart=e.cStart,this.fillRule=e.fillRule,this.require_StartNewFigure=e.require_StartNewFigure,this.isBoundsDirty=e.isBoundsDirty,this.bounds=new SuperMap.Bounds(e.bounds.left,e.bounds.bottom,e.bounds.right,e.bounds.top),this.ref=1,this.elements=[];for(var o=0;o<e.elements.length;o++)this.elements.push(e.elements[o].clone())}else this.ref=1,this.bounds=new SuperMap.Bounds(0,0,0,0),this.elements=[];this.CLASS_NAME="SuperMapAlgoPlot.Path2DData"}var e,o,i;return e=t,(o=[{key:"IsClosed",value:function(){var t=this.elements[this.cStart],e=this.elements[this.elements.length-1];return t.GetX()==e.GetX()&&t.GetY()==e.GetY()}},{key:"Close",value:function(){this.require_StartNewFigure=!0;var t=this.elements[this.cStart],e=this.elements[this.elements.length-1];t!=e&&(t.Equal(e)?e.SetPosition(t.GetX(),t.GetY()):this.elements.push(new SuperMapAlgoPlot.Element(t.GetX(),t.GetY(),SuperMapAlgoPlot.ElementType.LineToElement)))}},{key:"MaybeStartNewFigure",value:function(){if(this.require_StartNewFigure){var t=this.elements[this.elements.length-1].clone();t.SetType(0),this.elements.push(t),this.require_StartNewFigure=!1}}}])&&ne(e.prototype,o),i&&ne(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();SuperMapAlgoPlot.Path2DData=le;SuperMapAlgoPlot.ArrowToolkit=SuperMapAlgoPlot.ArrowToolkit||{};function ae(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}SuperMapAlgoPlot.ArrowToolkit.ConstValue={MAX_ARRAY_SIZE:128,sv_AtScaleParameter:1.5,sv_AtLenDivAtWidth:1.35,sv_AtWidthDivAwWidth:.5,DUOJIANTOU_TAIL_RATE_1:8,DUOJIANTOU_TAIL_RATE_2:3,DUOJIANTOU_TAIL_RATE_3:.6},SuperMapAlgoPlot.ArrowToolkit.ArrowTailType={ARROWTAIL_NONE:0,ARROWTAIL_LINE:1,ARROWTAIL_CURVE:2,ARROWTAIL_COATTAIL:3,ARROWTAIL_COATTAIL_POLYBODY:4},SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType={ARROWHEAD_POLYLINE:0,ARROWHEAD_TRIANGLE:1,ARROWHEAD_COATTAIL:2,ARROWHEAD_TRIANGLE_SOLID:3,ARROWHEAD_COATTAIL_HOLLOW:6,ARROWHEAD_WITH_EAR:4,ARROWHEAD_WITHOUT_EAR:5},SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType={ARROWBODY_POLYLINE:0,ARROWBODY_POLYBEZIER:1,ARROWBODY_COATTAIL:5,ARROWBODY_PARALLEL:2,ARROWBODY_TRAPEZOID:3,ARROWBODY_MULTIPOLYBEZIER:4},SuperMapAlgoPlot.ArrowToolkit.parallel=function(t,e){var o={leftParallelPts:[],rightParallelPts:[]};return 1===t.length||2===t.length&&t[0].x===t[1].x&&t[0].y===t[1].y?o:(o.leftParallelPts=SuperMapAlgoPlot.PlottingUtil.parallel(t,e),o.rightParallelPts=SuperMapAlgoPlot.PlottingUtil.parallel(t,-e),o)},SuperMapAlgoPlot.ArrowToolkit.trapezoid=function(t,e,o){var i={leftParallelPts:[],rightParallelPts:[]};if(1===t.length||2===t.length&&t[0].x===t[1].x&&t[0].y===t[1].y)return i;for(var n=0;n<t.length-1;n++){t[n].x===t[n+1].x&&t[n].y===t[n+1].y&&(i.leftParallelPts.push(i.leftParallelPts[i.leftParallelPts.length-1]),i.rightParallelPts.push(i.rightParallelPts[i.rightParallelPts.length-1]));var l=t[n+1];l=SuperMapAlgoPlot.PlottingUtil.rotate(t[n],0,1,l),i.leftParallelPts.push(SuperMapAlgoPlot.PlottingUtil.findPointInLine(t[n],l,e)),l=t[n],l=SuperMapAlgoPlot.PlottingUtil.rotate(t[n+1],0,-1,l),i.leftParallelPts.push(SuperMapAlgoPlot.PlottingUtil.findPointInLine(t[n+1],l,o)),l=t[n+1],l=SuperMapAlgoPlot.PlottingUtil.rotate(t[n],0,-1,l),i.rightParallelPts.push(SuperMapAlgoPlot.PlottingUtil.findPointInLine(t[n],l,e)),l=t[n],l=SuperMapAlgoPlot.PlottingUtil.rotate(t[n+1],0,1,l),i.rightParallelPts.push(SuperMapAlgoPlot.PlottingUtil.findPointInLine(t[n+1],l,o))}return i},SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePts=function(t,e,o){var i={};switch(t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts,o){case SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_PARALLEL:case SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_TRAPEZOID:var n=e[0],l=e[1],a=e[2],s=SuperMapAlgoPlot.PlottingUtil.equalFuzzy(a,0);if(!s&&t.length>2){var r=t.length;t.splice(2,r-2)}var u=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t);i.arrowTouLen=u*n;for(var p=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(t,u-i.arrowTouLen).pt,h=[],c=i.arrowTouLen*a,y=i.arrowTouLen*l,g=t.length-1,f=0;f<g;f++)h.push(t[f]);h.push(p);var P={leftParallelPts:[],rightParallelPts:[]};P=!0===s?SuperMapAlgoPlot.ArrowToolkit.parallel(h,y):SuperMapAlgoPlot.ArrowToolkit.trapezoid(h,c,y);var d=t[t.length-1];t[t.length-1]=p,t.push(d);i.leftBodyPts=P.leftParallelPts,i.rightBodyPts=P.rightParallelPts,i.OpectrlPoints=null;break;case SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_MULTIPOLYBEZIER:var S=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t);if(0==S)return;var m=SuperMapAlgoPlot.ArrowToolkit.OperateCtrlPts(t),b=m.length;b--;var L=SuperMapAlgoPlot.ArrowToolkit.generateMultiBezier(m,b,e,S);t=[];for(var M=0;M<m.length;M++)t.push(m[M]);i.arrowTouLen=L.arrowTouLen,i.leftBodyPts=L.leftBodyPts,i.rightBodyPts=L.rightBodyPts,i.OpectrlPoints=m}return t=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(t),i.leftBodyPts=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(i.leftBodyPts),i.rightBodyPts=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(i.rightBodyPts),i.OpectrlPoints=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(i.OpectrlPoints),i},SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone=function(t){var e=!0,o=[];if(t.length<=1)return{pts:t,isEast:e};var i=!1;if(void 0!==t[t.length-1].z&&(i=!0),!i)return{pts:t,isEast:e};for(var n=0;n<t.length;n++){var l=new Cesium.PlotPoint3D(t[n].x,t[n].y,t[n].z);o.push(l)}for(var a=SuperMapAlgoPlot.PlottingUtil.clonePoints(o),s=[],r=[],u=0;u<a.length-1;u++)a[u+1].x-a[0].x>-360&&a[u+1].x-a[0].x<-180&&s.push(u+1),a[u+1].x-a[0].x<360&&a[u+1].x-a[0].x>180&&r.push(u+1);if(r.length>s.length){for(var p=0;p<r.length;p++)a[r[p]].x=a[r[p]].x-360;e=!1}else{for(var h=0;h<s.length;h++)a[s[h]].x=a[s[h]].x+360;e=!0}return{pts:a,isEast:e}},SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone=function(t){if(null===t||t.length<=1)return t;var e=!1;if(void 0!==t[0].z&&(e=!0),!e)return t;for(var o=[],i=0;i<t.length;i++){var n=new Cesium.PlotPoint3D(t[i].x,t[i].y,t[i].z);o.push(n)}for(var l=SuperMapAlgoPlot.PlottingUtil.clonePoints(o),a=0;a<l.length;a++)l[a].x>180?l[a].x=l[a].x-360:l[a].x<-180&&(l[a].x=l[a].x+360);return l},SuperMapAlgoPlot.ArrowToolkit.eastCrossZone=function(t){var e=!1;if(void 0!==t[0].z&&(e=!0),!e)return t;for(var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),i=0;i<o.length;i++)o[i].x<0&&o[i].x>-180&&(o[i].x=o[i].x+360);return o},SuperMapAlgoPlot.ArrowToolkit.westCrossZone=function(t){var e=!1;if(void 0!==t[0].z&&(e=!0),!e)return t;for(var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),i=0;i<o.length;i++)o[i].x>0&&o[i].x<180&&(o[i].x=o[i].x-360);return o},SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePts=function(t,e,o,i,n){var l=[];switch(t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts,e=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(e).pts,n){case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITH_EAR:case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITHOUT_EAR:var a=o[0],s=o[1],r=0,u=0;3==o.length&&(r=o[2]),4==o.length&&(r=o[2],u=o[3]);var p=0;if(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(r,0)&&!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(u,0)){var h=SuperMapAlgoPlot.PlottingUtil.clonePoints(t);h.splice(h.length-1,1),p=SuperMapAlgoPlot.PlottingUtil.polylineDistance(h)*r*u}var c=new SuperMapAlgoPlot.Point((e[0].x+e[1].x)/2,(e[0].y+e[1].y)/2);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(s,0)){var y=i*a,g=t[t.length-1];return g=SuperMapAlgoPlot.PlottingUtil.rotate(c,0,1,g),l.push(SuperMapAlgoPlot.PlottingUtil.findPointInLine(c,g,y)),l.push(t[t.length-1]),g=t[t.length-1],g=SuperMapAlgoPlot.PlottingUtil.rotate(c,0,-1,g),l.push(SuperMapAlgoPlot.PlottingUtil.findPointInLine(c,g,y)),t=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(t),l=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(l)}var f=i*s,P=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(f,c,t[t.length-1]);f=i*a,f+=p;var d=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(f,t[t.length-1],P),S=d.pntLeft,m=d.pntRight,b=t[t.length-1];return l.push(m),l.push(b),l.push(S),t=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(t),l=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(l)}},SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine=function(t,e,o,i){var n=[];if(2>t.length)return n;t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts;var l,a=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t),s=SuperMapAlgoPlot.PlottingUtil.equalFuzzy(e,0);switch(o){case SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYLINE:n=n.concat(t),i&&!s&&SuperMapAlgoPlot.PlottingUtil.distance(t[t.length-1],t[t.length-2])>e&&(l=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(t,a-e),n.splice(n.length-1,1),n.push(l.pt));break;case SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYBEZIER:if(2==t.length)n=n.concat(t),i&&!s&&SuperMapAlgoPlot.PlottingUtil.distance(t[t.length-1],t[t.length-2])>e&&(l=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(t,a-e),n.splice(n.length-1,1),n.push(l.pt));else{var r=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t),u=SuperMapAlgoPlot.PlottingUtil.polylineDistance(r);if(s)n=n.concat(r);else{var p=r[r.length-1];if(!s&&(e<u||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(u,e,1e-7))){for(var h=r.length-1;h>1;h--){if(!(e>SuperMapAlgoPlot.PlottingUtil.distance(p,r[h]))){var c=SuperMapAlgoPlot.PlottingUtil.findPoint(p,r[h],e,0);r.push(c),n=r;break}r.splice(h,1)}i||n.push(p)}else n=n.concat(r)}}break;case SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_COATTAIL:var y=e;if(y>a)return n;for(var g,f,P=Math.ceil(a/(1.4*y)),d=0,S=[],m=0;m<P;m++)g=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(y*d,t),f=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(y*(d+1),t),g.bfind&&f.bfind&&(S.push(g.pts),S.push(f.pts)),d=1.4*(m+1);n=S}return n=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(n)},SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePtsBySingleLine=function(t,e,o){var i=[];if(2>t.length)return i;switch(t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts,o){case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_POLYLINE:var n=t[0],l=t[1],a=SuperMapAlgoPlot.PlottingUtil.distance(n,l);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(a,e,1e-7)||a>e){var s=SuperMapAlgoPlot.PlottingUtil.findPoint(n,l,e,0),r=e*Math.tan(.125*Math.PI),u=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(r,t[0],s);i.push(u.pntLeft),i.push(t[0]),i.push(u.pntRight)}else{l=t[2];var p=SuperMapAlgoPlot.PlottingUtil.findPoint(n,l,e,0),h=e*Math.tan(.125*Math.PI),c=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(h,t[0],p);i.push(c.pntLeft),i.push(t[0]),i.push(c.pntRight)}break;case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE:break;case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE_SOLID:var y=t[0],g=t[1],f=SuperMapAlgoPlot.PlottingUtil.distance(y,g);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(f,e,1e-7)||f>e){var P=e*Math.tan(.125*Math.PI),d=SuperMapAlgoPlot.PlottingUtil.findPoint(y,g,e,0),S=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(P,t[0],d);i.push(S.pntLeft),i.push(y),i.push(S.pntRight),i.push(S.pntLeft)}else{g=t[2];var m=e*Math.tan(.125*Math.PI),b=SuperMapAlgoPlot.PlottingUtil.findPoint(y,g,e,0),L=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(m,t[0],b);i.push(L.pntLeft),i.push(y),i.push(L.pntRight),i.push(L.pntLeft)}break;case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL:var M=t[0],v=2*Math.sqrt(e*e/3),A=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(v/2,A,1e-7)||A>v/2){var T=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],v,20),_=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],v,-20),O=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],v/2,0);i.push(M),i.push(T),i.push(O),i.push(_),i.push(M)}else{M=t[2];var x=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],v,20),w=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],v,-20),E=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],v/2,0);i.push(M),i.push(x),i.push(E),i.push(w),i.push(M)}break;case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL_HOLLOW:var C=[],I=t[0],R=2*Math.sqrt(e*e/3),D=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(R/1.4,D,1e-7)||D>R/1.4){var U=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],R,20),N=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],R,-20),B=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],R/1.4,0);C.push(I),C.push(U),C.push(B),C.push(N),C.push(I);var k=new SuperMapAlgoPlot.Point((C[0].x+C[1].x)/2,(C[0].y+C[1].y)/2),F=new SuperMapAlgoPlot.Point((C[3].x+C[4].x)/2,(C[3].y+C[4].y)/2),V=new SuperMapAlgoPlot.Point((k.x+F.x)/2,(k.y+F.y)/2),j=.75*SuperMapAlgoPlot.PlottingUtil.distance(k,F)/2,Y=SuperMapAlgoPlot.PlottingUtil.findPointInLine(V,k,j),z=SuperMapAlgoPlot.PlottingUtil.findPointInLine(V,F,j);i.push(C[0]),i.push(Y),i.push(C[1]),i.push(C[2]),i.push(C[3]),i.push(z),i.push(C[4])}else{I=t[0];var G=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],R,20),W=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],R,-20),X=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],R/1.4,0);C.push(I),C.push(G),C.push(X),C.push(W),C.push(I);k=new SuperMapAlgoPlot.Point((C[0].x+C[1].x)/2,(C[0].y+C[1].y)/2),F=new SuperMapAlgoPlot.Point((C[3].x+C[4].x)/2,(C[3].y+C[4].y)/2),V=new SuperMapAlgoPlot.Point((k.x+F.x)/2,(k.y+F.y)/2),j=.75*SuperMapAlgoPlot.PlottingUtil.distance(k,F)/2,Y=SuperMapAlgoPlot.PlottingUtil.findPointInLine(V,k,j),z=SuperMapAlgoPlot.PlottingUtil.findPointInLine(V,F,j);i.push(C[0]),i.push(Y),i.push(C[1]),i.push(C[2]),i.push(C[3]),i.push(z),i.push(C[4])}}return i=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(i)},SuperMapAlgoPlot.ArrowToolkit.generateArrowTailShapePts=function(t,e,o,i){var n=e.length,l=[],a=0;t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts;for(var s=0;s<t.length-1;s++)a+=SuperMapAlgoPlot.PlottingUtil.distance(t[s],t[s+1]);var r=a*o;switch(i){case SuperMapAlgoPlot.ArrowToolkit.ArrowTailType.ARROWTAIL_NONE:break;case SuperMapAlgoPlot.ArrowToolkit.ArrowTailType.ARROWTAIL_LINE:var u=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],r,90),p=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],r,-90);l.push(u),l.push(p);break;case SuperMapAlgoPlot.ArrowToolkit.ArrowTailType.ARROWTAIL_CURVE:var h=new SuperMapAlgoPlot.Point(.5*(e[0].x+e[n-1].x),.5*(e[0].y+e[n-1].y)),c=SuperMapAlgoPlot.PlottingUtil.distance(e[0],e[n-1]),y=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(c*o,h,t[t.length-1]),g=new SuperMapAlgoPlot.Point(0,0),f=new SuperMapAlgoPlot.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(SuperMapAlgoPlot.ArrowToolkit.ConstValue.DUOJIANTOU_TAIL_RATE_1,SuperMapAlgoPlot.ArrowToolkit.ConstValue.DUOJIANTOU_TAIL_RATE_2,e[0],y,e[n-1],g,f);var P=new SuperMapAlgoPlot.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(SuperMapAlgoPlot.ArrowToolkit.ConstValue.DUOJIANTOU_TAIL_RATE_3,e[0],y,g,P);var d=new SuperMapAlgoPlot.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(SuperMapAlgoPlot.ArrowToolkit.ConstValue.DUOJIANTOU_TAIL_RATE_3,e[n-1],y,f,d);break;case SuperMapAlgoPlot.ArrowToolkit.ArrowTailType.ARROWTAIL_COATTAIL:var S=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],r,157.5),m=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],r,-157.5);l.push(S),l.push(t[0]),l.push(m);break;case SuperMapAlgoPlot.ArrowToolkit.ArrowTailType.ARROWTAIL_COATTAIL_POLYBODY:var b=new SuperMapAlgoPlot.Point(.5*(e[0].x+e[n-1].x),.5*(e[0].y+e[n-1].y)),L=SuperMapAlgoPlot.PlottingUtil.distance(e[0],e[n-1]),M=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(L*o,e[0],b);l.push(e[n-1]),l.push(M.pntLeft),l.push(e[0])}return t=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(t),l=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(l)},SuperMapAlgoPlot.ArrowToolkit.generateArrowTailShapePtsBySingleLine=function(t,e,o){var i=[];switch(t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts,o){case SuperMapAlgoPlot.ArrowToolkit.ArrowTailType.ARROWTAIL_NONE:break;case SuperMapAlgoPlot.ArrowToolkit.ArrowTailType.ARROWTAIL_LINE:var n=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],e,90),l=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],e,-90);i.push(n),i.push(l);break;case SuperMapAlgoPlot.ArrowToolkit.ArrowTailType.ARROWTAIL_COATTAIL:var a=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],e,157.5),s=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],e,-157.5);i.push(a),i.push(t[0]),i.push(s)}return i=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(i)},SuperMapAlgoPlot.ArrowToolkit.OperateCtrlPts=function(t){var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(t);if(3==e.length){var o=((e[0].x+e[1].x)/2+e[2].x)/2,i=((e[0].y+e[1].y)/2+e[2].y)/2,n=new SuperMapAlgoPlot.Point(o,i),l=e[2].clone();e[2]=n,e.push(l)}return e},SuperMapAlgoPlot.ArrowToolkit.generateMultiBezier=function(t,e,o,i){var n=0,l=[],a=[],s=[],r=[],u=[],p=[],h=o[0],c=o[1],y=(t[0].x+t[1].x)/2,g=(t[0].y+t[1].y)/2,f=Math.abs(y-t[2].x),P=Math.abs(g-t[2].y),d=0;if(f>0&&P>0){var S=1/(y-t[2].x),m=-1/(g-t[2].y),b=1*t[2].y/(g-t[2].y)-1*t[2].x/(y-t[2].x);d=Math.abs(S*t[0].x+m*t[0].y+b)/Math.sqrt(S*S+m*m)}else P<=1e-4?d=Math.abs(g-t[1].y):f<=1e-4&&(d=Math.abs(y-t[1].x));var L=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(d,t[2],new SuperMapAlgoPlot.Point(y,g)),M=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(t[1],t[2],t[0]);M?(l[1]=t[1],a[1]=t[0]):(l[1]=t[0],a[1]=t[1]),t[1]=new SuperMapAlgoPlot.Point((t[0].x+t[1].x)/2,(t[0].y+t[1].y)/2);var v=Math.sqrt((L.pntLeft.x-L.pntRight.x)*(L.pntLeft.x-L.pntRight.x)+(L.pntLeft.y-L.pntRight.y)*(L.pntLeft.y-L.pntRight.y))*SuperMapAlgoPlot.ArrowToolkit.ConstValue.sv_AtWidthDivAwWidth,A=(n=v*SuperMapAlgoPlot.ArrowToolkit.ConstValue.sv_AtLenDivAtWidth)*c;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(h,0)||(A=(n=i*h)*c);var T,_,O=SuperMapAlgoPlot.PlottingUtil.distance(t[e],t[e-1]),x=2*n;O<x&&(A=(n=O/2)*c),t.push(t[e]),T=0,_=0;var w=0,E=[];for(w=2;w<=e;w++)T+=SuperMapAlgoPlot.PlottingUtil.distance(t[w],t[w-1]);for(T-=n,w=2;w<=e-1;w++)_+=SuperMapAlgoPlot.PlottingUtil.distance(t[w],t[w-1]),E[w]=A+(v-A)*Math.pow((T-_)/T,SuperMapAlgoPlot.ArrowToolkit.ConstValue.sv_AtScaleParameter);E[e]=A;var C,I,R=new SuperMapAlgoPlot.Point(0,0),D=new SuperMapAlgoPlot.Point(0,0),U=new SuperMapAlgoPlot.Point(0,0);for(w=2;w<=e-1;w++)SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(0,3,t[w-1],t[w],t[w+1],D,U),w==e-1&&SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,t[e],t[e-1],U,R),C=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(E[w],D,t[w]),(M=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(U,D,C.pntRight))?(l[w]=new SuperMapAlgoPlot.Point(C.pntRight.x,C.pntRight.y),a[w]=new SuperMapAlgoPlot.Point(C.pntLeft.x,C.pntLeft.y)):(l[w]=new SuperMapAlgoPlot.Point(C.pntLeft.x,C.pntLeft.y),a[w]=new SuperMapAlgoPlot.Point(C.pntRight.x,C.pntRight.y));for(Math.sqrt(1*(t[e].x-R.x)*(t[e].x-R.x)+1*(t[e].y-R.y)*(t[e].y-R.y))>0&&(t[e]=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(n,t[e],R)),C=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(A,t[e+1],t[e]),(M=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(t[e],t[e+1],C.pntLeft))?(a[e]=new SuperMapAlgoPlot.Point(C.pntLeft.x,C.pntLeft.y),l[e]=new SuperMapAlgoPlot.Point(C.pntRight.x,C.pntRight.y)):(a[e]=new SuperMapAlgoPlot.Point(C.pntRight.x,C.pntRight.y),l[e]=new SuperMapAlgoPlot.Point(C.pntLeft.x,C.pntLeft.y)),w=2;w<e;w++)SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(3,3,l[w-1],l[w],l[w+1],D,U),s[w]=new SuperMapAlgoPlot.Point(D.x,D.y),r[w]=new SuperMapAlgoPlot.Point(U.x,U.y),SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(3,3,a[w-1],a[w],a[w+1],D,U),u[w]=new SuperMapAlgoPlot.Point(D.x,D.y),p[w]=new SuperMapAlgoPlot.Point(U.x,U.y),2==w&&(SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,l[1],l[2],s[2],R),r[1]=new SuperMapAlgoPlot.Point(R.x,R.y),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,a[1],a[2],u[2],R),p[1]=new SuperMapAlgoPlot.Point(R.x,R.y)),w==e-1&&(x=(O=SuperMapAlgoPlot.PlottingUtil.distance(l[e],l[e-1]))/3,(I=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(x,t[e],t[e+1])).x+=l[e].x-t[e].x,I.y+=l[e].y-t[e].y,x=(O=v-A)*Math.pow(x/T,SuperMapAlgoPlot.ArrowToolkit.ConstValue.sv_AtScaleParameter),C=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(x,l[e],I),s[e]=new SuperMapAlgoPlot.Point(C.pntLeft.x,C.pntLeft.y),x=(O=SuperMapAlgoPlot.PlottingUtil.distance(a[e],a[e-1]))/3,(I=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(x,t[e],t[e+1])).x+=a[e].x-t[e].x,I.y+=a[e].y-t[e].y,x=(O=v-A)*Math.pow(x/T,SuperMapAlgoPlot.ArrowToolkit.ConstValue.sv_AtScaleParameter),C=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(x,a[e],I),u[e]=new SuperMapAlgoPlot.Point(C.pntRight.x,C.pntRight.y));return{arrowTouLen:n,leftBodyPts:SuperMapAlgoPlot.ArrowToolkit.genArrowBody(e,l,s,r),rightBodyPts:SuperMapAlgoPlot.ArrowToolkit.genArrowBody(e,a,u,p)}},SuperMapAlgoPlot.ArrowToolkit.genArrowBody=function(t,e,o,i){var n=new SuperMapAlgoPlot.Path2D;if(!(t<2)){n.MoveTo(e[1]);for(var l=1;l<=t-1;l++)n.CubicTo(i[l],o[l+1],e[l+1]);var a=[];return n.ToSubPathPolygons(a),a[0]}};var se=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||{},this.style=null,this.libID=e.libID?e.libID:0,this.code=e.code?e.code:0,this.maxEditPts=e.maxEditPts?e.maxEditPts:SuperMapAlgoPlot.AlgoSymbolFactory.getMaxEditPts(e.libID,e.code),this.minEditPts=e.minEditPts?e.minEditPts:SuperMapAlgoPlot.AlgoSymbolFactory.getMinEditPts(e.libID,e.code),this.isEdit=!!e.isEdit&&e.isEdit,this.controlPoints=e.controlPoints?e.controlPoints:[],this.scalePoints=e.scalePoints?e.scalePoints:[],this.scaleValues=e.scaleValues?e.scaleValues:[],this.subSymbols=e.subSymbols?e.subSymbols:SuperMapAlgoPlot.AlgoSymbolFactory.getDefaultSubSymbols(e.libID,e.code),this.polylineConnectLocationPoint=!!e.polylineConnectLocationPoint&&e.polylineConnectLocationPoint,this.style=e.style?e.style:SuperMapAlgoPlot.PlottingUtil.copyAttributes(this.style,SuperMapAlgoPlot.AlgoSymbolFactory.getDefaultStyle(e.libID,e.code)),this.textContent=e.textContent?e.textContent:"",this.map=e.map?e.map:null,this.scene=e.scene?e.scene:null,this.subSymbolDefaultPixelSize=e.subSymbolDefaultPixelSize?e.subSymbolDefaultPixelSize:30,this.symScaleDefinition=e.symScaleDefinition?e.symScaleDefinition:1,this.components=[],this.symbolType=0===this.libID?this.code:2}var e,o,i;return e=t,(o=[{key:"addScalePoint",value:function(t,e){if(null!=t){void 0!==e&&null!==e||(e=this.scalePoints.length);var o=new SuperMapAlgoPlot.Point(t.x,t.y);o.isScalePoint=!0,o.tag=e,this.scalePoints.push(o)}}},{key:"setOptions",value:function(t){if(t)for(var e in this)t[e]&&(this[e]=t[e])}},{key:"getAlgorithmResult",value:function(t){t.components=this.components,t.scalePoints=this.scalePoints,t.scaleValues=this.scaleValues}},{key:"destroy",value:function(){this.minEditPts=null,this.maxEditPts=null,this.controlPoints.length=0,this.controlPoints=null,this.scalePoints.length=0,this.scalePoints=null,this.scaleValues.length=0,this.scaleValues=null,this.subSymbols.length=0,this.subSymbols=null,this.subSymbolSize=0,this.components=null,this.style=null}},{key:"init",value:function(){if(this.components.length=0,this.scalePoints.length=0,this.controlPoints.length>=2&&this.controlPoints.length<this.minEditPts&&this.calAssistantLine(),this.maxEditPts<this.controlPoints.length&&this.symbolType!==SuperMapAlgoPlot.SymbolType.ELLIPSESYMBOL){var t=this.controlPoints.shift(),e=this.controlPoints.pop();this.controlPoints=[],this.controlPoints.push(t,e)}}},{key:"finish",value:function(){}},{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(this.controlPoints);if(t=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),this.controlPoints.length>=this.minEditPts){var e={textContent:this.textContent,type:this.symbolType,surroundLineFlag:!1,positionPoints:t,style:{}};if(e.type===SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL&&e.positionPoints.push(e.positionPoints[0]),this.symbolType===SuperMapAlgoPlot.SymbolType.PARALLELLINE){if(this.controlPoints&&this.controlPoints.length>=3){var o=!1;void 0!==this.controlPoints[0].z&&(o=!0);var i=SuperMapAlgoPlot.PlottingUtil.distance(this.controlPoints[0],this.controlPoints[1]);SuperMapAlgoPlot.PlottingUtil.isRight(this.controlPoints[0],this.controlPoints[1],this.controlPoints[2])&&(i=-i);for(var n=[],l=1;l<this.controlPoints.length;l++)n.push(this.controlPoints[l].clone());var a=SuperMapAlgoPlot.PlottingUtil.parallel(n,i);if(this.controlPoints[0].x=a[0].x,this.controlPoints[0].y=a[0].y,o)for(var s=0;s<n.length;s++)a[s].z=n[s].z;this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,n),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,a)}}else this.components.push(e)}}},{key:"modifyPoint",value:function(t,e){this.computeScaleValues(t,e),this.calculateParts()}},{key:"computeScaleValues",value:function(){}},{key:"getLonLatDistanceFromPixel",value:function(t){if(null===this.map)return 0;var e,o;if(this.map&&"undefined"!=typeof L&&void 0!==L.Map&&this.map instanceof L.Map){var i=this.map.layerPointToLatLng(L.point(0,0)),n=this.map.layerPointToLatLng(L.point(t*this.symScaleDefinition,0));e=new SuperMapAlgoPlot.Point(i.lng,i.lat),o=new SuperMapAlgoPlot.Point(n.lng,n.lat)}else if(this.map&&"undefined"!=typeof SuperMap&&void 0!==SuperMap.Map&&this.map instanceof SuperMap.Map){i=this.map.getLonLatFromPixel(new SuperMap.Pixel(0,0)),n=this.map.getLonLatFromPixel(new SuperMap.Pixel(t*this.symScaleDefinition,0));e=new SuperMapAlgoPlot.Point(i.lon,i.lat),o=new SuperMapAlgoPlot.Point(n.lon,n.lat)}return SuperMapAlgoPlot.PlottingUtil.distance(e,o)}},{key:"getPixelDistanceFromLonLat",value:function(t){if(null===this.map)return 0;var e,o;if(this.map&&"undefined"!=typeof L&&void 0!==L.Map&&this.map instanceof L.Map){var i=this.map.latLngToLayerPoint(L.latLng(0,0)),n=this.map.latLngToLayerPoint(L.latLng(t,0));e=new SuperMapAlgoPlot.Point(i.x,i.y),o=new SuperMapAlgoPlot.Point(n.x,n.y)}else if(this.map&&"undefined"!=typeof SuperMap&&void 0!==SuperMap.Map&&this.map instanceof SuperMap.Map){i=this.map.getPixelFromLonLat(new SuperMap.LonLat(0,0)),n=this.map.getPixelFromLonLat(new SuperMap.LonLat(t,0));e=new SuperMapAlgoPlot.Point(i.x,i.y),o=new SuperMapAlgoPlot.Point(n.x,n.y)}return SuperMapAlgoPlot.PlottingUtil.distance(e,o)}},{key:"getPixelFromLonLat",value:function(t,e){if(this.map&&"undefined"!=typeof L&&void 0!==L.Map&&this.map instanceof L.Map){var o=this.map.latLngToLayerPoint(L.latLng(e,t));return{x:o.x,y:o.y}}if(this.map&&"undefined"!=typeof SuperMap&&void 0!==SuperMap.Map&&this.map instanceof SuperMap.Map){var i=this.map.getPixelFromLonLat(new SuperMap.LonLat(t,e));return{x:i.x,y:i.y}}}},{key:"getLonLatFromPixel",value:function(t,e){if(this.map&&"undefined"!=typeof L&&void 0!==L.Map&&this.map instanceof L.Map){var o=this.map.layerPointToLatLng(L.point(t,e));return{lon:o.lng,lat:o.lat}}if(this.map&&"undefined"!=typeof SuperMap&&void 0!==SuperMap.Map&&this.map instanceof SuperMap.Map){var i=this.map.getLonLatFromPixel(new SuperMap.Pixel(t,e));return{lon:i.lon,lat:i.lat}}}},{key:"pixelBoundsToLonLat",value:function(t){var e=this.getLonLatFromPixel(t.left,t.top),o=this.getLonLatFromPixel(t.right,t.bottom);return new SuperMap.Bounds(e.lon,o.lat,o.lon,e.lat)}},{key:"annotationContent",value:function(t,e,o,i){var n=this.textContent;if(0!==n.length){var l=n.split("\n");n="";var a=0,s={};SuperMap.Util.copyAttributes(s,this.style),s.fontSize*=this.symScaleDefinition;for(var r=0;r<l.length;r++){a++;var u=l[r],p=SuperMapAlgoPlot.PlottingUtil.getTextWidth(s,u),h=this.getPixelFromLonLat(t,e),c=this.getPixelFromLonLat(o,i),y=parseFloat(Math.abs(c.x-h.x)),g=parseFloat(Math.abs(h.y-c.y)),f=0;if(s.weight?f=parseFloat(s.fontSize)+2*s.weight+.2*parseFloat(s.fontSize)+a:this.style.strokeWidth&&(f=parseFloat(s.fontSize)+2*s.strokeWidth+.2*parseFloat(s.fontSize)+a),f>g)break;if(p>=y){var P=u.split("");u="";for(var d="",S=P.length,m=0;m<S;m++){if(d+=P[m],SuperMapAlgoPlot.PlottingUtil.getTextWidth(s,d)>=y){var b=P[m];if(P[m]="\n",a++,s.weight?f=parseFloat(s.fontSize)*a+a+2*s.weight+.2*parseFloat(s.fontSize):this.style.strokeWidth&&(f=parseFloat(s.fontSize)*a+a+2*s.strokeWidth+.2*parseFloat(s.fontSize)),!(f<g)){0===n.length?n=u:(n+="\n",n+=u);break}P[m]+=b,d=b}u+=P[m],m===S-1&&(0===n.length?n=u:(n+="\n",n+=u))}}else 0===n.length?n=u:(n+="\n",n+=u)}if(0!==n.length){var L=s.labelAlign,M=0,v=0;"l"===L[0]?M=t:"r"===L[0]?M=o:"c"===L[0]&&(M=(t+o)/2),"t"===L[1]?v=e:"b"===L[1]?v=i:"m"===L[1]&&(v=(e+i)/2);var A=new SuperMapAlgoPlot.Point(M,v),T={};T.positionPoints=[A],T.type=SuperMapAlgoPlot.SymbolType.TEXTSYMBOL,T.textContent=n,T.style={surroundLineFlag:!1,labelAlign:L},this.components.push(T)}}}},{key:"addCell",value:function(t,e,o,i){if(t&&e){var n={};n.type=t,n.textContent=i,n.positionPoints=e,null==o?n.style={surroundLineFlag:!1}:(n.style=o,null==o.surroundLineFlag&&(n.style.surroundLineFlag=!1)),this.components.push(n)}}},{key:"addText",value:function(t,e,o,i,n){if(t&&e){var l={};l.type=SuperMapAlgoPlot.SymbolType.TEXTSYMBOL,l.textContent=t,l.positionPoints=[e];var a=o/t.length/2;l.style={},l.style.surroundLineFlag=!1,l.style.labelRotation=-i,l.style.fontSize=a,void 0===n?l.style.fontColor="#000000":(l.style.fontColor=n,l.style.fontColorLimit=!0),l.style.fontSizeLimit=!0,l.style.sizeFixed=!1,l.style.labelAlign="cm",l.style.label=t,this.components.push(l)}}},{key:"getLinePts",value:function(t,e,o){var i=new Object;if(e>.5)return i.startIndex=0,i.startPt=t[0],i.endIndex=t.length-1,i.endPt=t[t.length-1],i;null==o&&(o=.5);var n=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t),l=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(n*(o-e),t),a=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(n*(o+e),t);return i.startIndex=l.index,i.startPt=l.pts,i.endIndex=a.index,i.endPt=a.pts,i}},{key:"computeDashLine",value:function(t,e,o){var i=[],n=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o);if(n<=0)return[];for(var l,a=o[0],s=1,r=0,u=!0,p=!0;r<n;){var h,c=[];c.push(a),r+=t;var y=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(r,o);if(h=y.index,l=y.pts,!(u=y.bfind))break;if(s<h)for(var g=s;g<h;g++)c.push(o[g]);c.push(l),i.push(c),r+=e;var f=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(r,o);if(h=f.index,a=f.pts,s=h+1,!(p=f.bfind))break}if(!u){var P=[];P.push(a);for(var d=s;d<o.length;d++)P.push(o[d]);2===P.length&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(SuperMapAlgoPlot.PlottingUtil.distance(P[0],P[1]),0)||i.push(P)}if(!p){var S=o[o.length-1],m=SuperMapAlgoPlot.PlottingUtil.distance(l,S);if(m*=.01,!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(m,0)){var b=SuperMapAlgoPlot.PlottingUtil.linePnt(S,l,m),L=[];L.push(b),L.push(S),i.push(L)}}return i}},{key:"addArrow",value:function(t,e){if(t.length<2)return t;var o,i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(this.controlPoints);void 0===e&&(e=(this.isEdit,.5*this.getSubSymbolScaleValue()));var n=t.slice();o=i*e;var l,a=t[t.length-1],s=o*Math.cos(.125*Math.PI);if(t.length>2){for(var r=-1,u=t.length-2;u>=0;u--)if(o<SuperMapAlgoPlot.PlottingUtil.distance(a,t[u])){r=u;break}t.splice(r+1,t.length-r),t.push(a)}if(t.length>1){SuperMapAlgoPlot.PlottingUtil.distance(t[t.length-1],t[t.length-2])>s&&(l=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(s,[t[t.length-1],t[t.length-2]])).bfind&&(t.splice(t.length-1,1),t.push(l.pts)),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,t);var p=t[t.length-1],h=a,c=o;if(void 0===p)return t;var y=SuperMapAlgoPlot.PlottingUtil.radian(p,h)*SuperMapAlgoPlot.PlottingUtil.RTOD,g=SuperMapAlgoPlot.PlottingUtil.circlePoint(h,c,c,y+157.5),f=SuperMapAlgoPlot.PlottingUtil.circlePoint(h,c,c,y+202.5),P={surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0,lineTypeLimit:!0,surroundLineLimit:!0,surroundLineType:SuperMapAlgoPlot.AlgoSurroundLineType.NONE};this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,[g,a,f],P)}else this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,n)}},{key:"addArrowWithOutLine",value:function(t,e){if(t.length<2)return t;var o,i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(this.controlPoints);void 0===e&&(e=(this.isEdit,.5*this.getSubSymbolScaleValue()));var n=t.slice();o=i*e;var l,a=t[t.length-1],s=o*Math.cos(.125*Math.PI);if(t.length>2){for(var r=-1,u=t.length-2;u>=0;u--)if(o<SuperMapAlgoPlot.PlottingUtil.distance(a,t[u])){r=u;break}t.splice(r+1,t.length-r),t.push(a)}if(t.length>1){SuperMapAlgoPlot.PlottingUtil.distance(t[t.length-1],t[t.length-2])>s&&(l=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(s,[t[t.length-1],t[t.length-2]])).bfind&&(t.splice(t.length-1,1),t.push(l.pts));var p=t[t.length-1],h=a,c=o;if(void 0===p)return t;var y=SuperMapAlgoPlot.PlottingUtil.radian(p,h)*SuperMapAlgoPlot.PlottingUtil.RTOD,g=SuperMapAlgoPlot.PlottingUtil.circlePoint(h,c,c,y+157.5),f=SuperMapAlgoPlot.PlottingUtil.circlePoint(h,c,c,y+202.5),P={surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0,lineTypeLimit:!0,surroundLineLimit:!0,surroundLineType:SuperMapAlgoPlot.AlgoSurroundLineType.NONE};this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,[g,a,f],P)}else this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,n)}},{key:"addDovetailArrow",value:function(t,e){if(t.length<2)return t;var o,i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(this.controlPoints);void 0===e&&(e=(this.isEdit,.5*this.getSubSymbolScaleValue())),o=i*e;var n=t[t.length-1];if(t.length>2){for(var l=-1,a=t.length-2;a>=0;a--)if(o<SuperMapAlgoPlot.PlottingUtil.distance(n,t[a])){l=a;break}t.splice(l+1,t.length-l),t.push(n)}this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,t);var s=t[t.length-2],r=t[t.length-1],u=o;if(void 0===s)return t;if(!(SuperMapAlgoPlot.PlottingUtil.distance(s,r)<o)){var p=SuperMapAlgoPlot.PlottingUtil.radian(s,r)*SuperMapAlgoPlot.PlottingUtil.RTOD,h=SuperMapAlgoPlot.PlottingUtil.circlePoint(r,u,u,p+157.5),c=SuperMapAlgoPlot.PlottingUtil.circlePoint(r,u,u,p+202.5),y=SuperMapAlgoPlot.PlottingUtil.circlePoint(r,.5*u,.5*u,p+180),g=[];g.push(h),g.push(t[t.length-1]),g.push(c),g.push(y);var f={surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0,lineTypeLimit:!0,surroundLineLimit:!0,surroundLineType:SuperMapAlgoPlot.AlgoSurroundLineType.NONE};this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,g,f)}}},{key:"getDefaultSubSymbolSize",value:function(){var t=0;if(this.map){var e=this.getLonLatFromPixel(0,0),o=this.getLonLatFromPixel(this.subSymbolDefaultPixelSize,0),i=new SuperMapAlgoPlot.Point(e.lon,e.lat),n=new SuperMapAlgoPlot.Point(o.lon,o.lat);t=SuperMapAlgoPlot.PlottingUtil.distance(i,n)}if(0===t){if(0!==this.subSymbolSize)return this.subSymbolSize;for(var l=0,a=0;a<this.controlPoints.length-1;a++)l+=SuperMapAlgoPlot.PlottingUtil.distance(this.controlPoints[a],this.controlPoints[a+1]);t=.3*l}return t}},{key:"getTextBounds",value:function(t,e){" "===e&&(e="_");var o=document.createElement("span");document.body.appendChild(o),o.style.width="auto",o.style.height="auto",t.fontSize&&(o.style.fontSize=new String(t.fontSize)+"px"),t.fontFamily&&(o.style.fontFamily=t.fontFamily),t.fontWeight&&(o.style.fontWeight=t.fontWeight),o.style.position="absolute",o.style.visibility="hidden",o.innerHTML=e;var i=new SuperMap.Bounds(o.clientLeft,o.clientTop+o.clientHeight-6,o.clientLeft+o.clientWidth,o.clientTop+4),n=this.pixelBoundsToLonLat(i);return document.body.removeChild(o),n}},{key:"calAssistantLine",value:function(){var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);this.symbolType===SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOL&&(t.splice(1,0,new SuperMapAlgoPlot.Point(this.controlPoints[1].x,this.controlPoints[0].y)),t.push(new SuperMapAlgoPlot.Point(this.controlPoints[0].x,this.controlPoints[1].y)),t.push(new SuperMapAlgoPlot.Point(this.controlPoints[0].x,this.controlPoints[0].y)));var e={type:24,surroundLineFlag:!1,positionPoints:t,style:{color:"#0000ff",opacity:1,weight:1,dashArray:"5, 5",strokeColor:"#0000ff",strokeOpacity:1,strokeWidth:1,strokeDashstyle:"dash",lineColorLimit:!0,lineTypeLimit:!0,lineWidthLimit:!0,surroundLineFlag:!1}};this.components.push(e)}},{key:"getSubSymbolScaleValue",value:function(t,e){var o=0;o=t&&!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t,0)?t:SuperMapAlgoPlot.PlottingUtil.polylineDistance(this.controlPoints);var i=this.getDefaultSubSymbolSize()/o;return void 0===e&&(e=.3),(i>e||i<=0)&&(i=e),i}},{key:"computeSubSymbol",value:function(t,e,o,i,n,l){if(null==t.symbolData||null==t.symbolData.innerCells)return null;void 0===n&&(n=0),void 0===l&&(l=0);for(var a=SuperMapAlgoPlot.AnalysisSymbol.analysisSymbolCells(t.symbolData,!0),s=0,r=0,u=0,p=0,h=0;h<a.length;h++){null!=a[h].polybezierClose&&(a[h].type===SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL||a[h].type===SuperMapAlgoPlot.SymbolType.POLYBEZIERCLOSESYMBOL?(a[h].type,SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL,a[h].positionPoints=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsWithCtrlPt(a[h].positionPoints),a[h].isClosed&&a[h].positionPoints[0]!==a[h].positionPoints[symbolCell.positionPoints.length-1]&&a[h].positionPoints.push(a[h].positionPoints[0])):a[h].type===SuperMapAlgoPlot.SymbolType.KIDNEY&&(a[h].positionPoints=SuperMapAlgoPlot.Primitives.getSpatialData(a[h].type,a[h].positionPoints)));for(var c=SuperMapAlgoPlot.Primitives.getSpatialData(a[h].type,a[h].positionPoints,a[h].textContent,0,a[h].isCalculate),y=0,g=c.length;y<g;y++)s<c[y].x&&(s=c[y].x),r<c[y].y&&(r=c[y].y),u>c[y].x&&(u=c[y].x),p>c[y].y&&(p=c[y].y)}var f=new SuperMapAlgoPlot.Point(s,r),P=new SuperMapAlgoPlot.Point(u,p),d=(f.y-P.y)/o,S=(f.x-P.x)/o,m=S>d?S:d,b=new SuperMapAlgoPlot.Point(.5*(f.x+P.x),.5*(f.y+P.y));b.x+=n*(f.x-P.x),b.y+=l*(f.y-P.y);for(var L=0,M=a.length;L<M;L++){for(var v=0,A=a[L].positionPoints.length;v<A;v++)a[L].positionPoints[v].x-=b.x,a[L].positionPoints[v].y-=b.y,a[L].positionPoints[v].x/=m,a[L].positionPoints[v].y/=m,SuperMapAlgoPlot.PlottingUtil.rotateAngle(new SuperMapAlgoPlot.Point(0,0),i*Math.PI/180,a[L].positionPoints[v]),a[L].positionPoints[v].x+=e.x,a[L].positionPoints[v].y+=e.y;a[L].type===SuperMapAlgoPlot.SymbolType.TEXTSYMBOL&&(a[L].style.fontSize/=10*m,a[L].style.labelRotation=-i,a[L].style.sizeFixed=!1),a[L].isCalculate=!1,a[L].style.surroundLineType=0,a[L].style.surroundLineLimit=!0,a[L].style.lineTypeLimit=!0,this.components.push(a[L])}return a}},{key:"ComputeZValue",value:function(t,e,o){var i=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(t,e,o),n=new SuperMapAlgoPlot.Point(i.projectPoint.x,i.projectPoint.y),l=SuperMapAlgoPlot.PlottingUtil.distance(e,o),a=SuperMapAlgoPlot.PlottingUtil.distance(e,t),s=SuperMapAlgoPlot.PlottingUtil.distance(o,t);if(!i.isOnline){if(a>=l)return o.z;if(s>=l)return e.z}return n.x!=e.x&&e.x!=o.x?e.z+(n.x-e.x)/(e.x-o.x)*(e.z-o.z):n.y!=e.y&&e.y!=o.y?e.z+(n.y-e.y)/(e.y-o.y)*(e.z-o.z):0==(a=SuperMapAlgoPlot.PlottingUtil.distance(e,n))?e.z:e.z-(e.z-o.z)*(a/l)}},{key:"ComputeBeizerZValueByDis",value:function(t,e,o){if(t.length<2)return!1;for(var i=[],n=0;n<t.length;n++)i.push({x:t[n].x,y:t[n].y});var l=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i);if(0==l)return!1;var a=SuperMapAlgoPlot.PlottingUtil.polylineDistance(e),s=[];s.push(i[0]);for(var r=-1,u=0,p=e[0],h=1;h<i.length;h++){s.push(i[h]);var c=SuperMapAlgoPlot.PlottingUtil.polylineDistance(s)/l,y=a*c,g=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(y,e),f=g.index,P=g.pts;if(g.bfind){for(var d=t[h-1].z,S=t[h].z,m=a*(c-u),b=0,L=++r;L<=f;L++){var M=d+(S-d)*((b+=L==r?SuperMapAlgoPlot.PlottingUtil.distance(p,e[L]):SuperMapAlgoPlot.PlottingUtil.distance(e[L-1],e[L]))/m);o.push({x:e[L].x,y:e[L].y,z:M})}r=f}u=c,p=P}for(var v=r+1;v<e.length;v++)o.push({x:e[v].x,y:e[v].y,z:t[t.length-1].z});return!0}},{key:"ComputeHeight",value:function(t,e,o,i){if(o!=i){if(0!=t.length)if(1==t.length)e.push({x:t[0].x,y:t[0].y,z:o});else if(2==t.length)e.push({x:t[0].x,y:t[0].y,z:o}),e.push({x:t[1].x,y:t[1].y,z:i});else{var n=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t);if(0!=n){var l=[];l.push(t[0]),e.push({x:t[0].x,y:t[0].y,z:o});for(var a=1;a<t.length-1;a++){l.push(t[a]);var s=o+(i-o)*SuperMapAlgoPlot.PlottingUtil.polylineDistance(l)/n;e.push({x:t[a].x,y:t[a].y,z:s})}e.push({x:t[t.length-1].x,y:t[t.length-1].y,z:i})}else for(var r=0;r<t.length;r++)e.push({x:t[r].x,y:t[r].y,z:o})}}else for(var u=0;u<t.length;u++)e.push({x:t[u].x,y:t[u].y,z:o})}}])&&ae(e.prototype,o),i&&ae(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function re(t){"@babel/helpers - typeof";return(re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ue(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function pe(t,e){return(pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function he(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=ce(t);if(e){var n=ce(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===re(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function ce(t){return(ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol=se;var ye=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pe(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=he(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=n.call(this,t)).arrowAngle=t.arrowAngle?t.arrowAngle:45,0===e.scaleValues.length&&(e.scaleValues.push(.3),e.scaleValues.push(0),e.scaleValues.push(0)),e.CLASS_NAME="SuperMapAlgoPlot.ArrowLine",e}return e=l,(o=[{key:"calculateParts",value:function(){if(this.init(),!(null==this.controlPoints||this.controlPoints.length<this.minEditPts)){var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t);var e=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t);e=SuperMapAlgoPlot.PlottingUtil.clearSamePts(e);var o=SuperMapAlgoPlot.PlottingUtil.polylineDistance(e);this.isEdit||(this.scaleValues[0]=.5*this.getSubSymbolScaleValue(o));var i,n=this.scaleValues[0]*o,l=this.arrowAngle*Math.PI/180/2,a=(i=e.length>2?SuperMapAlgoPlot.PlottingUtil.radian(e[e.length-1],e[e.length-2]):SuperMapAlgoPlot.PlottingUtil.radian(e[1],e[0]))-l,s=e[e.length-1].x+n*Math.cos(a),r=e[e.length-1].y+n*Math.sin(a),u=new SuperMapAlgoPlot.Point(s,r),p=i+l,h=e[e.length-1].x+n*Math.cos(p),c=e[e.length-1].y+n*Math.sin(p),y=new SuperMapAlgoPlot.Point(h,c),g=[];g.push(u),g.push(e[e.length-1].clone()),g.push(y);var f={surroundLineFlag:!1,fillLimit:!0,lineTypeLimit:!0},P=SuperMapAlgoPlot.PlottingUtil.radian(e[0],e[1]);a=P-l,s=e[0].x+n*Math.cos(a),r=e[0].y+n*Math.sin(a),u=new SuperMapAlgoPlot.Point(s,r),p=P+l,h=e[0].x+n*Math.cos(p),c=e[0].y+n*Math.sin(p),y=new SuperMapAlgoPlot.Point(h,c);var d=[];d.push(u),d.push(e[0].clone()),d.push(y);var S=this.scaleValues[1]===SuperMapAlgoPlot.ArrowLineType.DOUBLELINE?SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,m=this.scaleValues[2]===SuperMapAlgoPlot.ArrowLineType.DOUBLELINE?SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL;this.scaleValues[1]===SuperMapAlgoPlot.ArrowLineType.DOUBLELINE?this.addCell(S,d,f):this.scaleValues[1]===SuperMapAlgoPlot.ArrowLineType.TRIANGLESOLID&&this.addCell(S,d,f),this.scaleValues[2]===SuperMapAlgoPlot.ArrowLineType.DOUBLELINE?this.addCell(m,g,f):this.scaleValues[2]===SuperMapAlgoPlot.ArrowLineType.TRIANGLESOLID&&this.addCell(m,g,f),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,e),this.finish()}}}])&&ue(e.prototype,o),i&&ue(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function ge(t){"@babel/helpers - typeof";return(ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function fe(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Pe(t,e){return(Pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function de(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Se(t);if(e){var n=Se(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===ge(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Se(t){return(Se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.ArrowLine=ye;var me=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pe(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=de(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&e.scaleValues.push(1),e.CLASS_NAME="SuperMapAlgoPlot.RegularPolygon",e}return e=l,(o=[{key:"calculateParts",value:function(){if(this.init(),!(this.controlPoints.length<this.minEditPts)){var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints),e=this.controlPoints.length+1,o=2*Math.PI/e;if(!this.isEdit){var i=this.controlPoints[this.controlPoints.length-1],n=new SuperMapAlgoPlot.Point(this.controlPoints[this.controlPoints.length-1].x,this.controlPoints[this.controlPoints.length-1].y);SuperMapAlgoPlot.PlottingUtil.rotateAngle(this.controlPoints[0],o,n),this.scaleValues[0]=SuperMapAlgoPlot.PlottingUtil.distance(t[0],this.calculateMidPt(i,n))/SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[t.length-1])}var l=[],a=this.controlPoints[this.controlPoints.length-1].clone();l.push(a.clone()),a=SuperMapAlgoPlot.PlottingUtil.rotateAngle(this.controlPoints[0],o/2,a);var s=SuperMapAlgoPlot.PlottingUtil.findPointOnLineByRatio(this.scaleValues[0],this.controlPoints[0],a);l.push(s);for(var r=1;r<e;r++)a=SuperMapAlgoPlot.PlottingUtil.rotateAngle(this.controlPoints[0],o/2,a),l.push(a.clone()),a=SuperMapAlgoPlot.PlottingUtil.rotateAngle(this.controlPoints[0],o/2,a),s=SuperMapAlgoPlot.PlottingUtil.findPointOnLineByRatio(this.scaleValues[0],this.controlPoints[0],a),l.push(s);var u=l[1];this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,l,{surroundLineFlag:!1,fill:!1}),this.addScalePoint(u),this.finish()}}},{key:"calculateMidPt",value:function(t,e){return new SuperMapAlgoPlot.Point((t.x+e.x)/2,(t.y+e.y)/2)}},{key:"modifyPoint",value:function(t,e){if(0===t&&!0===e.isScalePoint){var o=SuperMapAlgoPlot.PlottingUtil.distance(this.controlPoints[0],this.controlPoints[this.controlPoints.length-1]),i=this.scalePoints[0],n=SuperMapAlgoPlot.PlottingUtil.projectPoint(e,this.controlPoints[0],i),l=SuperMapAlgoPlot.PlottingUtil.distance(this.controlPoints[0],n);this.scaleValues[0]=l/o}this.calculateParts()}}])&&fe(e.prototype,o),i&&fe(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function be(t){"@babel/helpers - typeof";return(be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Le(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Me(t,e){return(Me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ve(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Ae(t);if(e){var n=Ae(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===be(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Ae(t){return(Ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.RegularPolygon=me;var Te=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Me(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=ve(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&(e.scaleValues.push(.1),e.scaleValues.push(.1)),e.CLASS_NAME="SuperMapAlgoPlot.Brace",e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e=t[0],o=t[1],i=SuperMapAlgoPlot.PlottingUtil.distance(e,o);this.scaleValues.length<2&&(this.scaleValues=[],this.scaleValues.push(.1),this.scaleValues.push(.1));for(var n=this.scaleValues[0],l=this.scaleValues[1],a=new SuperMapAlgoPlot.Point(i*n,i*n),s=new SuperMapAlgoPlot.Point(i*(.5-l/2),0),r=new SuperMapAlgoPlot.Point(.5*i,-i*l),u=new SuperMapAlgoPlot.Point(i*(.5+l/2),0),p=new SuperMapAlgoPlot.Point(i*(1-n),i*n),h=[],c=180*Math.PI/180,y=270*Math.PI/180,g=3*Math.PI/180,f=c;f<=y;f+=g){var P=new SuperMapAlgoPlot.Point(a.x+i*n,a.y);P=SuperMapAlgoPlot.PlottingUtil.rotateAngle(a,f,P),h.push(P)}h.push(s),h.push(r),h.push(u),c=270*Math.PI/180,y=360*Math.PI/180;for(var d=c;d<=y;d+=g){var S=new SuperMapAlgoPlot.Point(p.x+i*n,p.y);S=SuperMapAlgoPlot.PlottingUtil.rotateAngle(p,d,S),h.push(S)}for(var m=SuperMapAlgoPlot.PlottingUtil.radian(e,o),b=[],L=0;L<h.length;L++){var M=new SuperMapAlgoPlot.Point(h[L].x+e.x,h[L].y+e.y);M=SuperMapAlgoPlot.PlottingUtil.rotateAngle(e,m,M),b.push(M)}this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,b),this.scalePoints=[];var v=new SuperMapAlgoPlot.Point(i*n,0),A=new SuperMapAlgoPlot.Point(v.x+e.x,v.y+e.y);(A=SuperMapAlgoPlot.PlottingUtil.rotateAngle(e,m,A)).isScalePoint=!0,A.tag=0,this.addScalePoint(A);var T=new SuperMapAlgoPlot.Point(r.x+e.x,r.y+e.y);SuperMapAlgoPlot.PlottingUtil.rotateAngle(e,m,T),T.isScalePoint=!0,T.tag=1,this.addScalePoint(T)}}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint){var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints),i=SuperMapAlgoPlot.PlottingUtil.distance(o[0],o[1]);if(0==t){var n=SuperMapAlgoPlot.PlottingUtil.distance(o[0],e)/i;n>0&&n<.4&&(this.scaleValues[0]=n)}else if(1==t){var l=new SuperMapAlgoPlot.Point((o[0].x+o[1].x)/2,(o[0].y+o[1].y)/2),a=SuperMapAlgoPlot.PlottingUtil.distance(e,l)/i;0<a&&.2>a&&(this.scaleValues[1]=a)}}this.calculateParts()}}])&&Le(e.prototype,o),i&&Le(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function _e(t){"@babel/helpers - typeof";return(_e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Oe(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function xe(t,e){return(xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function we(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Ee(t);if(e){var n=Ee(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===_e(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Ee(t){return(Ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.Brace=Te;var Ce=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xe(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=we(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=n.call(this,t)).CLASS_NAME="SuperMapAlgoPlot.Trapezoid",e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=2&&t.length<this.minEditPts&&this.calAssistantLine(),!(t.length<this.minEditPts)){var e=[],o=t[0],i=t[1],n=t[2],l=new SuperMapAlgoPlot.Point(0,0);this.GetPointsByTrapezoid(1,n,i,o,l),e.push(o),e.push(i),e.push(n),e.push(l);var a=SuperMapAlgoPlot.PlottingUtil.intersectLines(o,i,n,l),s=a.intersectPoint;a.isIntersectLines&&(s.x>o.x&&s.x<i.x||s.y>o.y&&s.y<i.y||s.x<o.x&&s.x>i.x||s.y<o.y&&s.y>i.y)&&(e[0]=l,e[3]=o),4==e.length&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,e)}}},{key:"GetPointsByTrapezoid",value:function(t,e,o,i,n){var l=e.x,a=e.y,s=o.x,r=o.y,u=i.x,p=i.y,h=0,c=0,y=0,g=0;if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(Math.abs(a-r),0))h=l+s-u,c=p;else if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(Math.abs(l-s),0))h=u,c=a+r-p;else{var f=1*(a-r)/(l-s),P=p-f*u;c=f*(h=((r+a)/2+(l+s)/(2*f)-P)/(f+1/f))+P,h=2*h-u,c=2*c-p}var d=Math.sqrt(1*(l-s)*(l-s)+1*(a-r)*(a-r)),S=Math.sqrt(1*(l-h)*(l-h)+1*(a-c)*(a-c));d>0?(y=l+(s-l)*S/d,g=a+(r-a)*S/d):(y=l,g=a);var m=y+(h-y)*t,b=g+(c-g)*t;n.x=m,n.y=b}}])&&Oe(e.prototype,o),i&&Oe(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Ie(t){"@babel/helpers - typeof";return(Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Re(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function De(){return(De="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Be(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:o):n.value}}).apply(this,arguments)}function Ue(t,e){return(Ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ne(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Be(t);if(e){var n=Be(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Ie(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Be(t){return(Be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.Trapezoid=Ce;var ke=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ue(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=Ne(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&e.scaleValues.push(.126),e.CLASS_NAME="SuperMapAlgoPlot.GeoTooltipBox",e}return e=l,(o=[{key:"destroy",value:function(){De(Be(l.prototype),"destroy",this).call(this)}},{key:"calculateParts",value:function(){this.init();var t=this.scaleValues[0];if(!(t<0||t>1)){if(t=(1-t)/2,this.controlPoints.length>=this.minEditPts){var e,o,i,n,l,a;this.controlPoints[2]&&(this.controlPoints[2].isFixedPos=!0),this.controlPoints[0].x<this.controlPoints[1].x?(e=this.controlPoints[0].x,i=this.controlPoints[1].x):(e=this.controlPoints[1].x,i=this.controlPoints[0].x),this.controlPoints[0].y<this.controlPoints[1].y?(n=this.controlPoints[0].y,o=this.controlPoints[1].y):(n=this.controlPoints[1].y,o=this.controlPoints[0].y),l=this.controlPoints[2].x,a=this.controlPoints[2].y;var s=0,r=(o-n)/(i-e);s=l<e?a>o?Math.abs((a-o)/(l-e))>r?2:1:a<n&&Math.abs((a-n)/(l-e))>r?4:1:l>i?a>o?Math.abs((a-o)/(l-i))>r?2:3:a<n&&Math.abs((a-n)/(l-i))>r?4:3:a>o?2:a<n?4:0,this.scalePoints=[];var u=[];switch(u.push(new SuperMapAlgoPlot.Point(e,n)),u.push(new SuperMapAlgoPlot.Point(e,o)),u.push(new SuperMapAlgoPlot.Point(i,o)),u.push(new SuperMapAlgoPlot.Point(i,n)),s){case 0:break;case 1:this.addScalePoint(new SuperMapAlgoPlot.Point(e,o-(o-n)*t)),u.splice(s,0,new SuperMapAlgoPlot.Point(e,o-(o-n)*t)),u.splice(s,0,this.controlPoints[2].clone()),u.splice(s,0,new SuperMapAlgoPlot.Point(e,n+(o-n)*t));break;case 2:this.addScalePoint(new SuperMapAlgoPlot.Point(i-(i-e)*t,o)),u.splice(s,0,new SuperMapAlgoPlot.Point(i-(i-e)*t,o)),u.splice(s,0,this.controlPoints[2].clone()),u.splice(s,0,new SuperMapAlgoPlot.Point(e+(i-e)*t,o));break;case 3:this.addScalePoint(new SuperMapAlgoPlot.Point(i,o-(o-n)*t)),u.splice(s,0,new SuperMapAlgoPlot.Point(i,n+(o-n)*t)),u.splice(s,0,this.controlPoints[2].clone()),u.splice(s,0,new SuperMapAlgoPlot.Point(i,o-(o-n)*t));break;case 4:this.addScalePoint(new SuperMapAlgoPlot.Point(i-(i-e)*t,n)),u.splice(s,0,new SuperMapAlgoPlot.Point(e+(i-e)*t,n)),u.splice(s,0,this.controlPoints[2].clone()),u.splice(s,0,new SuperMapAlgoPlot.Point(i-(i-e)*t,n))}this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,u),this.annotationContent(e,o,i,n)}this.finish()}}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint&&0==t){var o,i,n,l,a,s,r=this.scalePoints[0];this.controlPoints[0].x<this.controlPoints[1].x?(o=this.controlPoints[0].x,n=this.controlPoints[1].x):(o=this.controlPoints[1].x,n=this.controlPoints[0].x),this.controlPoints[0].y<this.controlPoints[1].y?(l=this.controlPoints[0].y,i=this.controlPoints[1].y):(l=this.controlPoints[1].y,i=this.controlPoints[0].y),a=this.controlPoints[2].x,s=this.controlPoints[2].y;var u=(i-l)/(n-o),p=.25;switch(a<o?s>i?Math.abs((s-i)/(a-o))>u?2:1:s<l&&Math.abs((s-l)/(a-o))>u?4:1:a>n?s>i?Math.abs((s-i)/(a-n))>u?2:3:s<l&&Math.abs((s-l)/(a-n))>u?4:3:s>i?2:s<l?4:0){case 1:case 3:var h=r.y+(e.y-r.y);h>i&&(h=i),h<(i+l)/2&&(h=(i+l)/2),p=1-2*(i-h)/(i-l);break;case 2:case 4:var c=r.x+(e.x-r.x);c>n&&(c=n),c<(o+n)/2&&(c=(o+n)/2),p=1-2*(n-c)/(n-o)}p<0&&(p=0),p>1&&(p=1),this.scaleValues[0]=p}this.calculateParts()}}])&&Re(e.prototype,o),i&&Re(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Fe(t){"@babel/helpers - typeof";return(Fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ve(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function je(){return(je="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ge(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:o):n.value}}).apply(this,arguments)}function Ye(t,e){return(Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ze(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Ge(t);if(e){var n=Ge(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Fe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Ge(t){return(Ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.GeoTooltipBox=ke;var We=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ye(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=ze(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&(e.scaleValues.push(0),e.scaleValues.push(0),e.scaleValues.push(0),e.scaleValues.push(0)),e.CLASS_NAME="SuperMapAlgoPlot.GeoTooltipBoxM",e}return e=l,(o=[{key:"destroy",value:function(){je(Ge(l.prototype),"destory",this).call(this)}},{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=this.minEditPts){var e,o,i,n;t[0].x<t[1].x?(e=t[0].x,i=t[1].x):(e=t[1].x,i=t[0].x),t[0].y<t[1].y?(n=t[0].y,o=t[1].y):(n=t[1].y,o=t[0].y),this.scalePoints=[];var l=[];l.push(new SuperMapAlgoPlot.Point(e,n)),l.push(new SuperMapAlgoPlot.Point(e,o)),l.push(new SuperMapAlgoPlot.Point(i,o)),l.push(new SuperMapAlgoPlot.Point(i,n)),this.isEdit||(this.scaleValues[0]=e,this.scaleValues[1]=n-.3*(o-n),this.scaleValues[2]=e+.5*(i-e),this.scaleValues[3]=n-.3*(o-n));for(var a=[],s=[],r=0;r<this.scaleValues.length/2;r++)a.push(this.getAction(this.scaleValues[2*r],this.scaleValues[2*r+1],e,o,i,n)),s.push(new SuperMapAlgoPlot.Point(this.scaleValues[2*r],this.scaleValues[2*r+1]));for(var u,p,h,c,y=s.length,g=[],f=[],P=[],d=[],S=[],m=0;m<a.length;m++)0===a[m]&&g.push(s[m]),1===a[m]&&f.push(s[m]),2===a[m]&&P.push(s[m]),3===a[m]&&d.push(s[m]),4===a[m]&&S.push(s[m]);var b=a.slice();b.sort();var L=new SuperMapAlgoPlot.Point(0,0);if(b[0]===b[b.length-1]&&0!==b[0]){var M=[];switch(b[0]){case 0:break;case 1:u=1/(2*f.length+1);for(var v=new SuperMapAlgoPlot.Point,A=0;A<2*f.length;A++)v=new SuperMapAlgoPlot.Point(e,n+(o-n)*u*(A+1)),M.unshift(v);break;case 2:p=1/(2*P.length+1);for(var T=new SuperMapAlgoPlot.Point,_=0;_<2*P.length;_++)T=new SuperMapAlgoPlot.Point(e+(i-e)*p*(_+1),o),M.unshift(T);break;case 3:h=1/(2*d.length+1);for(var O=new SuperMapAlgoPlot.Point,x=0;x<2*d.length;x++)O=new SuperMapAlgoPlot.Point(i,n+(o-n)*h*(x+1)),M.push(O);break;case 4:c=1/(2*S.length+1);for(var w=new SuperMapAlgoPlot.Point,E=0;E<2*S.length;E++)w=new SuperMapAlgoPlot.Point(e+(i-e)*c*(E+1),n),M.push(w)}for(var C=0;C<y;C++)for(var I=0;I<y;I++){var R=SuperMapAlgoPlot.PlottingUtil.intersectLineSegs(M[2*C+1],s[C],M[2*I],s[I],L);if(R&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(L.x,M[2*C+1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(L.y,M[2*C+1].y)&&(R=!1),R){var D=s[I].clone();s[I]=s[C],s[C]=D}}for(var U=0;U<y;U++)l.splice(b[0],0,M[2*U]),l.splice(b[0],0,s[U]),l.splice(b[0],0,M[2*U+1])}else{for(var N,B,k=[],F=[],V=[],j=[],Y=0;Y<a.length;Y++)switch(a[Y]){case 0:break;case 1:u=1/(2*f.length+1);for(var z=0;z<2*f.length;z++){var G=new SuperMapAlgoPlot.Point(e,n+(o-n)*u*(z+1));k.unshift(G)}for(var W=0;W<f.length;W++)for(var X=1;X<f.length;X++)(N=SuperMapAlgoPlot.PlottingUtil.intersectLineSegs(k[2*W+1],f[W],k[2*X],f[X],L))&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(L.x,k[2*W+1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(L.y,k[2*W+1].y)&&(N=!1),N&&(B=f[X].clone(),f[X]=f[W],f[W]=B);break;case 2:p=1/(2*P.length+1);for(var H=0;H<2*P.length;H++){var Z=new SuperMapAlgoPlot.Point(e+(i-e)*p*(H+1),o);F.unshift(Z)}for(var J=0;J<P.length;J++)for(var q=1;q<P.length;q++)(N=SuperMapAlgoPlot.PlottingUtil.intersectLineSegs(F[2*J+1],P[J],F[2*q],P[q],L))&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(L.x,F[2*J+1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(L.y,F[2*J+1].y)&&(N=!1),N&&(B=P[q].clone(),P[q]=P[J],P[J]=B);break;case 3:h=1/(2*d.length+1);for(var K=0;K<2*d.length;K++){var Q=new SuperMapAlgoPlot.Point(i,n+(o-n)*h*(K+1));V.push(Q)}for(var $=0;$<d.length;$++)for(var tt=1;tt<d.length;tt++)(N=SuperMapAlgoPlot.PlottingUtil.intersectLineSegs(V[2*$+1],d[$],V[2*tt],d[tt],L))&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(L.x,V[2*$+1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(L.y,V[2*$+1].y)&&(N=!1),N&&(B=d[tt].clone(),d[tt]=d[$],d[$]=B);break;case 4:c=1/(2*S.length+1);for(var et=0;et<2*S.length;et++){var ot=new SuperMapAlgoPlot.Point(e+(i-e)*c*(et+1),n);j.push(ot)}for(var it=0;it<S.length;it++)for(var nt=1;nt<S.length;nt++)(N=SuperMapAlgoPlot.PlottingUtil.intersectLineSegs(j[2*it+1],S[it],j[2*nt],S[nt],L))&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(L.x,j[2*it+1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(L.y,j[2*it+1].y)&&(N=!1),N&&(B=S[nt].clone(),S[nt]=S[it],S[it]=B)}for(var lt=0;lt<S.length;lt++)l.splice(4,0,j[2*lt]),l.splice(4,0,S[lt]),l.splice(4,0,j[2*lt+1]);for(var at=0;at<d.length;at++)l.splice(3,0,V[2*at]),l.splice(3,0,d[at]),l.splice(3,0,V[2*at+1]);for(var st=0;st<P.length;st++)l.splice(2,0,F[2*st]),l.splice(2,0,P[st]),l.splice(2,0,F[2*st+1]);for(var rt=0;rt<f.length;rt++)l.splice(1,0,k[2*rt]),l.splice(1,0,f[rt]),l.splice(1,0,k[2*rt+1])}for(var ut=0;ut<s.length;ut++)this.addScalePoint(s[ut],ut)}this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,l),this.annotationContent(e,o,i,n),this.finish()}},{key:"modifyPoint",value:function(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()}},{key:"getAction",value:function(t,e,o,i,n,l){var a=(i-l)/(n-o);return t<o?e>i?Math.abs((e-i)/(t-o))>a?2:1:e<l&&Math.abs((e-l)/(t-o))>a?4:1:t>n?e>i?Math.abs((e-i)/(t-n))>a?2:3:e<l&&Math.abs((e-l)/(t-n))>a?4:3:e>i?2:e<l?4:0}}])&&Ve(e.prototype,o),i&&Ve(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Xe(t){"@babel/helpers - typeof";return(Xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function He(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Ze(){return(Ze="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ke(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:o):n.value}}).apply(this,arguments)}function Je(t,e){return(Je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function qe(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Ke(t);if(e){var n=Ke(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Xe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Ke(t){return(Ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.GeoTooltipBoxM=We;var Qe=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Je(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=qe(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=n.call(this,t)).roundBox=!!t.roundBox&&t.roundBox,e.textBoxType=t.textBoxType?t.textBoxType:SuperMapAlgoPlot.TextBoxType.WITHTIPBOX,0===e.scaleValues.length&&(e.scaleValues.push(.126),e.scaleValues.push(0),e.scaleValues.push(0)),e.CLASS_NAME="SuperMapAlgoPlot.SymbolTextBox",e}return e=l,(o=[{key:"destroy",value:function(){this.roundBox=null,this.textBoxType=null,Ze(Ke(l.prototype),"destroy",this).call(this)}},{key:"calculateParts",value:function(){this.init();var t=this.scaleValues[0];if(!(t<0||t>1)){if(t=(1-t)/2,this.controlPoints.length>=this.minEditPts){var e,o,i,n;this.scalePoints=[];var l=[];this.controlPoints[0].x<this.controlPoints[1].x?(e=this.controlPoints[0].x,i=this.controlPoints[1].x):(e=this.controlPoints[1].x,i=this.controlPoints[0].x),this.controlPoints[0].y<this.controlPoints[1].y?(n=this.controlPoints[0].y,o=this.controlPoints[1].y):(n=this.controlPoints[1].y,o=this.controlPoints[0].y);var a=1,s=2,r=3,u=4;if(this.roundBox){var p=Math.max(e,i),h=Math.min(e,i),c=Math.max(o,n),y=Math.min(o,n),g=.1*Math.min(Math.abs(e-i),Math.abs(o-n)),f=new SuperMapAlgoPlot.Point(h+g,y+g),P=new SuperMapAlgoPlot.Point(h+g,c-g),d=new SuperMapAlgoPlot.Point(p-g,c-g),S=new SuperMapAlgoPlot.Point(p-g,y+g),m=this.calculateArc(f,g,3*Math.PI/2,Math.PI,-1,180),b=this.calculateArc(P,g,Math.PI,Math.PI/2,-1,180),L=this.calculateArc(d,g,Math.PI/2,0,-1,180),M=this.calculateArc(S,g,2*Math.PI,3*Math.PI/2,-1,180);a=m.length,s=m.length+b.length,r=m.length+b.length+L.length,u=m.length+b.length+L.length+M.length,l=m.concat(b,L,M)}else l.push(new SuperMapAlgoPlot.Point(e,n)),l.push(new SuperMapAlgoPlot.Point(e,o)),l.push(new SuperMapAlgoPlot.Point(i,o)),l.push(new SuperMapAlgoPlot.Point(i,n));this.isEdit||(this.scaleValues[1]=e+.1*(i-e),this.scaleValues[2]=n+-.3*(o-n));var v=new SuperMapAlgoPlot.Point(this.scaleValues[1],this.scaleValues[2]),A=this.getAction(this.scaleValues[1],this.scaleValues[2],e,o,i,n);if(this.textBoxType===SuperMapAlgoPlot.TextBoxType.WITHTIPBOX)switch(this.addScalePoint(v,0),A){case 0:break;case 1:this.addScalePoint(new SuperMapAlgoPlot.Point(e,o-(o-n)*t)),l.splice(a,0,new SuperMapAlgoPlot.Point(e,o-(o-n)*t)),l.splice(a,0,v),l.splice(a,0,new SuperMapAlgoPlot.Point(e,n+(o-n)*t));break;case 2:this.addScalePoint(new SuperMapAlgoPlot.Point(i-(i-e)*t,o)),l.splice(s,0,new SuperMapAlgoPlot.Point(i-(i-e)*t,o)),l.splice(s,0,v),l.splice(s,0,new SuperMapAlgoPlot.Point(e+(i-e)*t,o));break;case 3:this.addScalePoint(new SuperMapAlgoPlot.Point(i,o-(o-n)*t)),l.splice(r,0,new SuperMapAlgoPlot.Point(i,n+(o-n)*t)),l.splice(r,0,v),l.splice(r,0,new SuperMapAlgoPlot.Point(i,o-(o-n)*t));break;case 4:this.addScalePoint(new SuperMapAlgoPlot.Point(i-(i-e)*t,n)),l.splice(u,0,new SuperMapAlgoPlot.Point(e+(i-e)*t,n)),l.splice(u,0,v),l.splice(u,0,new SuperMapAlgoPlot.Point(i-(i-e)*t,n))}if(0!==l.length)if(this.textBoxType===SuperMapAlgoPlot.TextBoxType.NONEBOX){this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,l,{surroundLineFlag:!1,weight:0,lineWidthLimit:!0})}else this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,l)}else this.controlPoints.length>=2&&this.controlPoints.length<this.minEditPts&&this.addCell(SuperMapAlgoPlot.SymbolType.RECTANGLESYMBOL,this.controlPoints);this.annotationContent(e,o,i,n),this.finish()}}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint)if(0===t)this.scaleValues[1]=e.x,this.scaleValues[2]=e.y;else if(1===t){var o,i,n,l,a,s,r=this.scalePoints[0];this.controlPoints[0].x<this.controlPoints[1].x?(o=this.controlPoints[0].x,n=this.controlPoints[1].x):(o=this.controlPoints[1].x,n=this.controlPoints[0].x),this.controlPoints[0].y<this.controlPoints[1].y?(l=this.controlPoints[0].y,i=this.controlPoints[1].y):(l=this.controlPoints[1].y,i=this.controlPoints[0].y),a=this.scaleValues[1],s=this.scaleValues[2];var u=(i-l)/(n-o),p=.25;switch(a<o?s>i?Math.abs((s-i)/(a-o))>u?2:1:s<l&&Math.abs((s-l)/(a-o))>u?4:1:a>n?s>i?Math.abs((s-i)/(a-n))>u?2:3:s<l&&Math.abs((s-l)/(a-n))>u?4:3:s>i?2:s<l?4:0){case 1:case 3:var h=r.y+(e.y-r.y);h>i&&(h=i),h<(i+l)/2&&(h=(i+l)/2),p=1-2*(i-h)/(i-l);break;case 2:case 4:var c=r.x+(e.x-r.x);c>n&&(c=n),c<(o+n)/2&&(c=(o+n)/2),p=1-2*(n-c)/(n-o)}p<0&&(p=0),p>1&&(p=1),this.scaleValues[0]=p}this.calculateParts()}},{key:"calculateArc",value:function(t,e,o,i,n,l){(!n||1!=n&&-1!=n)&&(n=-1),l||(l=360);for(var a=Math.PI/l/2,s=a*n,r=Math.abs(i-o),u=[],p=o,h=0;h<r;h+=a){var c=new SuperMapAlgoPlot.Point(Math.cos(p)*e+t.x,Math.sin(p)*e+t.y);u.push(c),p=(p=(p+=s)<0?p+2*Math.PI:p)>2*Math.PI?p-2*Math.PI:p}return u}},{key:"getAction",value:function(t,e,o,i,n,l){var a=(i-l)/(n-o);return t<o?e>i?Math.abs((e-i)/(t-o))>a?2:1:e<l&&Math.abs((e-l)/(t-o))>a?4:1:t>n?e>i?Math.abs((e-i)/(t-n))>a?2:3:e<l&&Math.abs((e-l)/(t-n))>a?4:3:e>i?2:e<l?4:0}}])&&He(e.prototype,o),i&&He(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function $e(t){"@babel/helpers - typeof";return($e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function to(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function eo(t,e){return(eo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function oo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=io(t);if(e){var n=io(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===$e(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function io(t){return(io=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.SymbolTextBox=Qe;var no=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&eo(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=oo(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),void 0===(e=n.call(this,t)).scaleValues[0]&&(e.scaleValues[0]=0),void 0===e.scaleValues[1]&&(e.scaleValues[1]=360),e.CLASS_NAME="SuperMapAlgoPlot.ConcentricCircle",e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!(null==(t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t))||t.length<2)){for(;this.scaleValues[0]>360;)this.scaleValues[0]-=360;for(;this.scaleValues[0]<0;)this.scaleValues[0]+=360;for(;this.scaleValues[1]>360;)this.scaleValues[1]-=360;for(;this.scaleValues[1]<0;)this.scaleValues[1]+=360;for(;this.scaleValues[1]<=this.scaleValues[0];)this.scaleValues[1]+=360;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.scaleValues[1],this.scaleValues[0])&&(this.scaleValues[1]+=360);for(var e=[],o=0;o<t.length-1;o++){for(var i=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[o+1]),n=[],l=Math.PI/180,a=(this.scaleValues[1]-this.scaleValues[0])/72,s=this.scaleValues[0];s<this.scaleValues[1]+a/2;s+=a){var r=t[0].x+i*Math.cos(s*l),u=t[0].y+i*Math.sin(s*l);n.push(new SuperMapAlgoPlot.Point(r,u))}if(o>0){for(var p=[],h=0;h<e.length;h++)p.push(e[h]);for(var c=n.length-1;c>=0;c--)p.push(n[c]);this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,p,{surroundLineFlag:!1,lineWidthLimit:!0,weight:0,strokeWidth:0})}e.length=0;for(var y=0;y<n.length;y++)e.push(n[y]);if(this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[t[0],t[o+1]],{surroundLineFlag:!1,fillLimit:!0,fill:!1}),o<2){var g=o%2,f=t[0].x+i/2*Math.cos(this.scaleValues[g]*l),P=t[0].y+i/2*Math.sin(this.scaleValues[g]*l),d=new SuperMapAlgoPlot.Point(f,P);d.isScalePoint=!0,d.tag=o,this.addScalePoint(d)}}}}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint){for(var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints),i=180*SuperMapAlgoPlot.PlottingUtil.radian(o[0],e)/Math.PI;i>360;)i-=360;for(;i<0;)i+=360;t%2==0?this.scaleValues[0]=i:t%2==1&&(this.scaleValues[1]=i)}this.calculateParts()}}])&&to(e.prototype,o),i&&to(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function lo(t){"@babel/helpers - typeof";return(lo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ao(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function so(t,e){return(so=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ro(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=uo(t);if(e){var n=uo(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===lo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function uo(t){return(uo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.ConcentricCircle=no;var po=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&so(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=ro(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=n.call(this,t)).angleRange=[],e.defaultRadius=t.defaultRadius?t.defaultRadius:60,e.CLASS_NAME="SuperMapAlgoPlot.CombinationalCircle",e}return e=l,(o=[{key:"calculateParts",value:function(){if(this.init(),this.controlPoints=SuperMapAlgoPlot.PlottingUtil.clearSamePts(this.controlPoints),!(null==this.controlPoints||this.controlPoints.length<1)){var t=this.getCircleLonLat(this.controlPoints[0],this.defaultRadius);this.angleRange=[];for(var e=0;e<this.controlPoints.length;e++)null==this.scaleValues[e]&&(this.scaleValues[e]=t),this.angleRange.push([{Start:0,End:360}]);for(var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints),i=0;i<o.length;i++)if(0!==this.angleRange[i].length&&(0!==this.angleRange[i][0].Start||0!==this.angleRange[i][0].End))for(var n=i+1;n<o.length;n++)if(0!==this.angleRange[n].length&&(0!==this.angleRange[n][0].Start||0!==this.angleRange[n][0].End)){var l=SuperMapAlgoPlot.PlottingUtil.distance(o[i],o[n]);if(l<this.scaleValues[i]+this.scaleValues[n])if(l>Math.abs(this.scaleValues[i]-this.scaleValues[n]))for(var a=0;a<2;a++){var s,r,u;0==a?(u=i,s=SuperMapAlgoPlot.PlottingUtil.radian(o[i],o[n])*SuperMapAlgoPlot.PlottingUtil.RTOD,r=Math.acos((l*l+this.scaleValues[i]*this.scaleValues[i]-this.scaleValues[n]*this.scaleValues[n])/(2*l*this.scaleValues[i]))*SuperMapAlgoPlot.PlottingUtil.RTOD):(u=n,s=SuperMapAlgoPlot.PlottingUtil.radian(o[n],o[i])*SuperMapAlgoPlot.PlottingUtil.RTOD,r=Math.acos((l*l+this.scaleValues[n]*this.scaleValues[n]-this.scaleValues[i]*this.scaleValues[i])/(2*l*this.scaleValues[n]))*SuperMapAlgoPlot.PlottingUtil.RTOD);var p=s-r,h=s+r,c=p<0&&h>0||p>360||h>360;p=this.adjustAngle(p),h=this.adjustAngle(h);for(var y=this.angleRange[u].length-1;y>=0;y--)if(c){if(h>this.angleRange[u][y].End||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(h,this.angleRange[u][y].End)){this.angleRange[u].splice(y,1);continue}if(h>this.angleRange[u][y].Start&&(this.angleRange[u][y].Start=h),p<this.angleRange[u][y].Start||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(p,this.angleRange[u][y].Start)){this.angleRange[u].splice(y,1);continue}p<this.angleRange[u][y].End&&(this.angleRange[u][y].End=p)}else if(p<this.angleRange[u][y].Start&&h>this.angleRange[u][y].End)this.angleRange[u].splice(y,1);else if(p>this.angleRange[u][y].Start&&h<this.angleRange[u][y].End)this.angleRange[u].push({Start:this.angleRange[u][y].Start,End:p}),this.angleRange[u].push({Start:h,End:this.angleRange[u][y].End}),this.angleRange[u].splice(y,1);else{if(p>this.angleRange[u][y].End)continue;if(p>this.angleRange[u][y].Start&&(this.angleRange[u][y].End=p),h<this.angleRange[u][y].Start)continue;h<this.angleRange[u][y].End&&(this.angleRange[u][y].Start=h)}}else{if(this.scaleValues[i]<this.scaleValues[n]){this.angleRange[i][0].Start=0,this.angleRange[i][0].End=0;break}this.angleRange[n][0].Start=0,this.angleRange[n][0].End=0}}for(var g=[],f=0;f<o.length;f++)if(0!==this.angleRange[f].length&&(0!==this.angleRange[f][0].Start||0!==this.angleRange[f][0].End))for(var P=this.angleRange[f].length-1;P>=0;P--){for(var d=this.adjustAngle(this.angleRange[f][P].Start),S=this.adjustAngle(this.angleRange[f][P].End);S<d;)S+=360;if(S-d==360)this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[o[f],new SuperMapAlgoPlot.Point(o[f].x,o[f].y+this.scaleValues[f])]);else{for(var m=[],b=(S-d)/72,L=d;L<S+b/2;L+=b){var M=o[f].x+this.scaleValues[f]*Math.cos(L*SuperMapAlgoPlot.PlottingUtil.DTOR),v=o[f].y+this.scaleValues[f]*Math.sin(L*SuperMapAlgoPlot.PlottingUtil.DTOR);m.push(new SuperMapAlgoPlot.Point(M,v))}g.push(m)}}for(var A=[],T=[];0!==g.length;){var _=g[0];g.splice(0,1),void 0!==(_=this.generatePolygon(g,_))&&(A.push(_),T.push(_))}for(var O=A.length,x=O-1;x>=0;x--)for(var w=0;w<A[x].length;w++){for(var E=-1,C=-1,I=0;I<O;I++)if(parseInt(I)!==x){var R=A[I];if(SuperMapAlgoPlot.PlottingUtil.ptIsInPolygon(R,A[x][w])){E=x;A[C=parseInt(I)].push(A[C][0]),A[E].push(A[E][0]),A[C]=A[C].concat(A[E]),A.splice(E,1),O=A.length;break}}if(-1!==E&&-1!==C)break}for(var D={surroundLineFlag:!1,lineWidthLimit:!0,weight:0,strokeWidth:0,surroundLineType:0},U=0;U<A.length;U++)A[U][0]!=A[U][A[U].length-1]&&A[U].push(A[U][0]),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,A[U],D);for(var N=0;N<T.length;N++)T[N][0]!=T[N][T[N].length-1]&&T[N].push(T[N][0]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,T[N]);for(var B=0;B<o.length;B++){var k=new SuperMapAlgoPlot.Point(o[B].x+this.scaleValues[B],o[B].y);k.isScalePoint=!0,k.tag=B,this.addScalePoint(k)}}}},{key:"generatePolygon",value:function(t,e){if(0===t.length||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(e[0].x,e[e.length-1].x,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(e[0].y,e[e.length-1].y,1e-10))return e;for(var o,i=e[e.length-1],n=0;n<t.length;n++)if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[n][0].x,i.x,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[n][0].y,i.y,1e-10)){if(e=e.concat(t[n]),t.splice(n,1),void 0!==(o=this.generatePolygon(t,e))&&0!==o.length)return o}else if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[n][t[n].length-1].x,i.x,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[n][t[n].length-1].y,i.y,1e-10)){for(var l=t[n].length-1;l>=0;l--)e.push(t[n][l]);if(t.splice(n,1),void 0!==(o=this.generatePolygon(t,e))&&0!==o.length)return o}}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint){if(t<0||t>=this.controlPoints.length)return;var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints),i=SuperMapAlgoPlot.PlottingUtil.distance(o[t],e);this.scaleValues[t]=i}this.calculateParts()}},{key:"adjustAngle",value:function(t){for(;t>360;)t-=360;for(;t<0;)t+=360;return t}},{key:"getCircleLonLat",value:function(t,e){return null===this.map?2*this.getDefaultSubSymbolSize():this.map&&"undefined"!=typeof L&&void 0!==L.Map&&this.map instanceof L.Map?((o=this.map.latLngToLayerPoint(L.latLng(t.y,t.x))).x+=e,this.map.layerPointToLatLng(L.point(o.x,o.y)).lng-t.x):this.map&&"undefined"!=typeof SuperMap&&void 0!==SuperMap.Map&&this.map instanceof SuperMap.Map?((o=this.map.getPixelFromLonLat(new SuperMap.LonLat(t.x,t.y))).x+=e,this.map.getLonLatFromPixel(new SuperMap.Pixel(o.x,o.y)).lon-t.x):void 0;var o}}])&&ao(e.prototype,o),i&&ao(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function ho(t){"@babel/helpers - typeof";return(ho="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function co(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function yo(t,e){return(yo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function go(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=fo(t);if(e){var n=fo(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===ho(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function fo(t){return(fo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.CombinationalCircle=po;var Po=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yo(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=go(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=n.call(this,t)).CLASS_NAME="SuperMapAlgoPlot.FreeCurve",e}return e=l,(o=[{key:"calculateParts",value:function(){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),o=this.getLonLatFromPixel(100,100),i=Math.abs(e.lon-o.lon),n=this.reSample(this.controlPoints,i/50);n.length<3&&(n=this.controlPoints),this.controlPoints=[],this.controlPoints=this.controlPoints.concat(n)}var l=SuperMapAlgoPlot.PlottingUtil.computeBeizerPoints(this.isEdit,this.controlPoints,this.scaleValues);l.scalePoints=SuperMapAlgoPlot.PlottingUtil.clearSamePts(l.scalePoints),l.scaleValues=SuperMapAlgoPlot.PlottingUtil.clearSamePts(l.scaleValues),this.scaleValues=l.scaleValues;for(var a=0,s=l.scalePoints.length;a<s;a++){var r=l.scalePoints[a];r.isScalePoint=!0,r.tag=a,this.addScalePoint(r)}t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints)}this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,t)}}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint){if(t<0||t>2*this.controlPoints.length-1)return;var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(2>o.length)return;var i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o),n=-1;n=t%2==0?Math.floor(t/2):Math.floor((t+1)/2);var l=(e.x-o[n].x)/i,a=(e.y-o[n].y)/i;this.scaleValues[2*t]=l,this.scaleValues[2*t+1]=a}this.calculateParts()}},{key:"reSample",value:function(t,e){var o=[];if(null==t||e<0)return o;var i=t.length;if(i>2){var n=new SuperMapAlgoPlot.Point(0,0),l=0,a=0,s=0,r=2*Math.PI;n=t[0],o.push(n);for(var u=!1,p=!1,h=!1,c=1;c<i;c++)if(a=Math.sqrt((t[c].y-n.y)*(t[c].y-n.y)+(t[c].x-n.x)*(t[c].x-n.x)),SuperMapAlgoPlot.PlottingUtil.equalFuzzy(0,a))u&&(n=t[c-1],c--,o.push(n),s=0,r=2*Math.PI,u=!1,p=!1,h=!1);else{var y=(t[c].x-n.x)/a,g=(t[c].y-n.y)/a;if(l=g>0||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(0,g)?Math.acos(y):2*Math.PI-Math.acos(y),r>2*Math.PI&&l+2*Math.PI<r?(l+=2*Math.PI,s<0&&(s+=2*Math.PI)):s<0&&l-2*Math.PI>s&&(l-=2*Math.PI,r>2*Math.PI&&(r-=2*Math.PI)),l>s&&l<r||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(0,l-s)||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(0,l-r)){var f=Math.atan(e/a);p?s<l-f&&(s=l-f):(p=!0,s=l-f),h?r>l+f&&(r=l+f):(h=!0,r=l+f),u=!0}else n=t[c-1],c--,o.push(n),s=0,r=2*Math.PI,u=!1,p=!1,h=!1}return o.push(t[i-1]),o}return o}},{key:"reSampleByAngle",value:function(t,e){var o=[],i=t.length;if(null==t||i<=0||e<=0)return o;for(var n=t,l=i,a=!1;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(n[0].x,n[l-1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(n[0].y,n[l-1].y);){if((l-=1)<=0)return o;a=!0}var s,r,u=[];for(s=0;s<l;s++)u.push(0);for(u[0]=1,u[l-1]=1,r=0,s=1;s<l-1;s++)if(SuperMapAlgoPlot.PlottingUtil.distance(n[r],n[s])>1e-10&&SuperMapAlgoPlot.PlottingUtil.distance(n[r],n[s+1])>1e-10){var p=180*SuperMapAlgoPlot.PlottingUtil.InnerAngle(n[s],n[r],n[s+1])/Math.PI;p>e&&p<180-e&&(u[s]=1,r++)}var h=0;for(s=0;s<l;s++)1==u[s]&&h++;if(h>0){for(a&&h++,o=[],r=0,s=0;s<l;s++)1==u[s]&&(o[r++]=n[s]);return a&&(o[r]=o[0]),o}return o}}])&&co(e.prototype,o),i&&co(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function So(t){"@babel/helpers - typeof";return(So="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function mo(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function bo(){return(bo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=vo(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:o):n.value}}).apply(this,arguments)}function Lo(t,e){return(Lo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Mo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=vo(t);if(e){var n=vo(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===So(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function vo(t){return(vo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.FreeCurve=Po;var Ao=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lo(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=Mo(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&(e.scaleValues.push(0),e.scaleValues[1]=.1),e.CLASS_NAME="SuperMapAlgoPlot.NodeChain",e}return e=l,(o=[{key:"destroy",value:function(){bo(vo(l.prototype),"destroy",this).call(this)}},{key:"calculateParts",value:function(){if(this.init(),this.controlPoints&&null!==this.controlPoints){var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,t),this.isEdit||(this.scaleValues[1]=.25*this.getSubSymbolScaleValue());var e=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t),o=e*this.scaleValues[0],i=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(var n=0;n<t.length;n++){var l=new SuperMapAlgoPlot.Point(t[n].x,t[n].y+o);this.computeSubSymbol(this.subSymbols[0],l,2*i,0)}else this.addCircles(t,o,i);else this.addCircles(t,o,i);var a=new SuperMapAlgoPlot.Point(t[0].x,t[0].y+o);this.addScalePoint(a);var s=SuperMapAlgoPlot.PlottingUtil.circlePoint(a,i,i,90);this.addScalePoint(s)}}}},{key:"addCircles",value:function(t,e,o){for(var i={surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0},n=0;n<t.length;n++){var l=new SuperMapAlgoPlot.Point(t[n].x,t[n].y+e),a=this.getCirclePts(l,o);this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,a,i)}}},{key:"getCirclePts",value:function(t,e){for(var o=[],i=0;i<=360;i+=12){var n=SuperMapAlgoPlot.PlottingUtil.circlePoint(t,e,e,i);o.push(n)}return o}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint){var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o)).length<this.minEditPts)return;var i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o);if(0===t)this.scaleValues[0]=(e.y-o[0].y)/i;else if(1===t){var n=i*this.scaleValues[0],l=new SuperMapAlgoPlot.Point(o[0].x,o[0].y+n),a=SuperMapAlgoPlot.PlottingUtil.distance(e,l);this.scaleValues[1]=a/i}}this.calculateParts()}}])&&mo(e.prototype,o),i&&mo(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function To(t){"@babel/helpers - typeof";return(To="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _o(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Oo(){return(Oo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Eo(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:o):n.value}}).apply(this,arguments)}function xo(t,e){return(xo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function wo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Eo(t);if(e){var n=Eo(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===To(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Eo(t){return(Eo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.NodeChain=Ao;var Co=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xo(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=wo(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&e.scaleValues.push(.2),e.CLASS_NAME="SuperMapAlgoPlot.Runway",e}return e=l,(o=[{key:"destroy",value:function(){Oo(Eo(l.prototype),"destroy",this).call(this)}},{key:"calculateParts",value:function(){if(this.init(),this.controlPoints.length>=this.minEditPts){for(var t=this.controlPoints[0],e=this.controlPoints[1],o=SuperMapAlgoPlot.PlottingUtil.distance(t,e),i=this.scaleValues[0]*o,n=SuperMapAlgoPlot.PlottingUtil.parallel(this.controlPoints,i/2),l=SuperMapAlgoPlot.PlottingUtil.parallel(this.controlPoints,-i/2),a=180*SuperMapAlgoPlot.PlottingUtil.radian(t,e)/Math.PI,s=[],r=a+90;r<=a+270;r+=10){var u=SuperMapAlgoPlot.PlottingUtil.circlePoint(t,i/2,i/2,r);s.push(u)}for(var p=[],h=a-90;h<=a+90;h+=10){var c=SuperMapAlgoPlot.PlottingUtil.circlePoint(e,i/2,i/2,h);p.push(c)}var y=[];(y=(y=(y=(y=y.concat(s)).concat(l)).concat(p)).concat(n)).push(y[0]),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,y);var g=new SuperMapAlgoPlot.Point(s[0].x,s[0].y);this.addScalePoint(g)}}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint&&0==t){var o=SuperMapAlgoPlot.PlottingUtil.distance(e,this.controlPoints[0]),i=SuperMapAlgoPlot.PlottingUtil.distance(this.controlPoints[0],this.controlPoints[1]);this.scaleValues[0]=2*o/i}this.calculateParts()}}])&&_o(e.prototype,o),i&&_o(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Io(t){"@babel/helpers - typeof";return(Io="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ro(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Do(){return(Do="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Bo(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:o):n.value}}).apply(this,arguments)}function Uo(t,e){return(Uo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function No(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Bo(t);if(e){var n=Bo(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Io(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Bo(t){return(Bo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.Runway=Co;var ko=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Uo(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=No(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=n.call(this,t)).CLASS_NAME="SuperMapAlgoPlot.CurveEight",e}return e=l,(o=[{key:"destroy",value:function(){Do(Bo(l.prototype),"destroy",this).call(this)}},{key:"calculateParts",value:function(){if(this.init(),this.controlPoints&&null!==this.controlPoints&&!(this.minEditPts>this.controlPoints.length))if(2===this.controlPoints.length){var t=this.controlPoints[0].clone(),e=this.controlPoints[1].clone(),o=SuperMapAlgoPlot.PlottingUtil.distance(t,e)/2,i=180*SuperMapAlgoPlot.PlottingUtil.radian(t,e)/Math.PI,n=new SuperMapAlgoPlot.Point((t.x+e.x)/2,(t.y+e.y)/2),l=SuperMapAlgoPlot.PlottingUtil.circlePoint(n,o,o,i+90),a=SuperMapAlgoPlot.PlottingUtil.circlePoint(n,3*o,3*o,i+90);this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[l,new SuperMapAlgoPlot.Point(l.x+o,l.y)]),this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[a,new SuperMapAlgoPlot.Point(a.x+o,a.y)])}else{var s=this.controlPoints[0].clone(),r=this.controlPoints[1].clone(),u=this.controlPoints[2].clone(),p=0;p=SuperMapAlgoPlot.PlottingUtil.isRight(u,s,r)?180*SuperMapAlgoPlot.PlottingUtil.radian(r,s)/Math.PI+90:180*SuperMapAlgoPlot.PlottingUtil.radian(s,r)/Math.PI+90;var h=SuperMapAlgoPlot.PlottingUtil.distance(s,r)/2,c=new SuperMapAlgoPlot.Point((s.x+r.x)/2,(s.y+r.y)/2),y=SuperMapAlgoPlot.PlottingUtil.circlePoint(c,h,h,p),g=SuperMapAlgoPlot.PlottingUtil.plumbLineLen(u,s,r);if(g<=4*h){var f=SuperMapAlgoPlot.PlottingUtil.circlePoint(c,3*h,3*h,p);this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[y,new SuperMapAlgoPlot.Point(y.x+h,y.y)]),this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[f,new SuperMapAlgoPlot.Point(f.x+h,f.y)])}else{for(var P=SuperMapAlgoPlot.PlottingUtil.circlePoint(c,g-h,g-h,p),d=180*Math.acos(h/(g-2*h))/Math.PI,S=p-d,m=p-180+d,b=p-180-d+360,L=[],M=p+d-360;M<=S;M+=4){var v=SuperMapAlgoPlot.PlottingUtil.circlePoint(y,h,h,M);L.push(v)}var A=SuperMapAlgoPlot.PlottingUtil.circlePoint(y,h,h,S);L.push(A);for(var T=[],_=m;_<b;_+=4){var O=SuperMapAlgoPlot.PlottingUtil.circlePoint(P,h,h,_);T.push(O)}var x=SuperMapAlgoPlot.PlottingUtil.circlePoint(P,h,h,b);T.push(x);var w=[];w=w.concat(L);for(var E=T.length-1;E>=0;E--)w.push(T[E]);this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,w)}}}}])&&Ro(e.prototype,o),i&&Ro(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Fo(t){"@babel/helpers - typeof";return(Fo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Vo(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function jo(t,e){return(jo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Yo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=zo(t);if(e){var n=zo(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Fo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function zo(t){return(zo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.CurveEight=ko;var Go=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jo(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=Yo(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=n.call(this,t)).relLineText=t.relLineText?t.relLineText:0,e.showPathLine=!t.showPathLine||t.showPathLine,e.showPathLineArrow=!!t.showPathLineArrow&&t.showPathLineArrow,e.isCurve=!!t.isCurve&&t.isCurve,e.isAvoid=!!t.isAvoid&&t.isAvoid,e.textToLineDistance=t.textToLineDistance?t.textToLineDistance:0,e.fontSpace=t.fontSpace?t.fontSpace:0,e.dNowPassedDistance=t.dNowPassedDistance?t.dNowPassedDistance:2,e.isScalePoint=!1,e.oldPathTextStart=void 0,e.oldDNowPassedDistance=2,e.CLASS_NAME="SuperMapAlgoPlot.PathText",e}return e=l,(o=[{key:"calculateParts",value:function(){if(this.init(),null!==this.controlPoints&&0!==this.controlPoints.length&&!(this.controlPoints.length<this.minEditPts)){SuperMap.Util.isArray(this.textContent)||(this.textContent=[this.textContent]);var t=[];if(t=this.isCurve?SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(this.controlPoints):SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints),this.relLineText===SuperMapAlgoPlot.RelLineText.ONBOTHLINE){this.relLineText=SuperMapAlgoPlot.RelLineText.ONRIGHTLINE,this.textPathPts=this.getTextPathPts(t,!1),this.computeText(this.textPathPts,this.textContent[0],t),this.relLineText=SuperMapAlgoPlot.RelLineText.ONLEFTLINE;var e=this.showPathLine;this.showPathLine=!1,this.textPathPts=this.getTextPathPts(t,!0),this.textContent.length>1?this.computeText(this.textPathPts,this.textContent[1],t):this.computeText(this.textPathPts,this.textContent[0],t),this.relLineText=SuperMapAlgoPlot.RelLineText.ONBOTHLINE,this.showPathLine=e}else this.relLineText===SuperMapAlgoPlot.RelLineText.ONRIGHTLINE?this.textPathPts=this.getTextPathPts(t,!1):this.relLineText===SuperMapAlgoPlot.RelLineText.ONLEFTLINE?this.textPathPts=this.getTextPathPts(t,!0):this.textPathPts=t,this.computeText(this.textPathPts,this.textContent[0],t);this.finish()}}},{key:"getTextPathPts",value:function(t,e){t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t);var o=this.getLonLatDistanceFromPixel(this.textToLineDistance);if(0>=o)return SuperMapAlgoPlot.PlottingUtil.clonePoints(t);var i=SuperMapAlgoPlot.PlottingUtil.paraLine(t,o,e);return SuperMapAlgoPlot.PlottingUtil.clearSamePts(i)}},{key:"computeText",value:function(t,e,o){if(!(t.length<2)){for(var i=e.length,n=t,l=n.length,a=0,s=0;s<n.length-1;s++)a+=SuperMapAlgoPlot.PlottingUtil.distance(n[s],n[s+1]);var r={index:-1,pt:n[0]},u=0,p=0,h=180/Math.PI,c=this.getTextBounds(this.style,e),y="lm";y=this.relLineText===SuperMapAlgoPlot.RelLineText.ONLINE?"lm":this.relLineText===SuperMapAlgoPlot.RelLineText.ONLEFTLINE?"lb":"lt",this.isScalePoint||(this.dNowPassedDistance=this.oldDNowPassedDistance),this.dNowPassedDistance<=0&&(this.dNowPassedDistance=0);for(var g=[],f=0;f<i;f++){var P=this.getTextBounds(this.style,e.charAt(f));g.push(new SuperMap.Bounds(0,-c.getHeight(),P.getWidth(),0))}var d,S=!1,m=!1,b=!0,L=0,M=0,v=[];for(this.fontSpace=b?(a-2*this.dNowPassedDistance-c.getWidth())/(i+1):(a-2*this.dNowPassedDistance-c.getHeight())/(i+1),this.fontSpace<0&&(this.fontSpace=0);u<=this.dNowPassedDistance&&p<l-1;)p++,u+=SuperMapAlgoPlot.PlottingUtil.distance(n[p-1],n[p]);var A=this.oldPathTextStart;A=this.isScalePoint||!this.oldPathTextStart?SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(n,this.dNowPassedDistance):this.oldPathTextStart;var T=SuperMapAlgoPlot.PlottingUtil.radian(n[p-1],n[p])*h;T>180&&(T-=360),T<-180&&(T+=360),T>90&&T<=180?(L=-180,S=!0,m=!0):T>-180&&T<-90&&(L=180,S=!0,m=!0),b=!0,0!=L?this.relLineText===SuperMapAlgoPlot.RelLineText.ONLINE||(y=this.relLineText===SuperMapAlgoPlot.RelLineText.ONLEFTLINE?"lt":"lb"):this.relLineText===SuperMapAlgoPlot.RelLineText.ONLINE||(y=this.relLineText===SuperMapAlgoPlot.RelLineText.ONLEFTLINE?"lb":"lt");for(var _=0;_<i&&!(this.dNowPassedDistance>a);_++){0===_&&(this.oldDNowPassedDistance=this.dNowPassedDistance);var O=_;for(m&&(O=i-_-1),d=g[O],M=b?d.getWidth():d.getHeight(),S&&(this.dNowPassedDistance+=M);u<=this.dNowPassedDistance&&p<l-1;)p++,u+=SuperMapAlgoPlot.PlottingUtil.distance(n[p-1],n[p]);T=SuperMapAlgoPlot.PlottingUtil.radian(n[p-1],n[p])*h,this.dNowPassedDistance=this.dNowPassedDistance+this.fontSpace,r=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(n,this.dNowPassedDistance);for(var x=0;x<n.length-1;x++){var w=[];if(w.push(n[x]),w.push(n[x+1]),!r.pt)break;SuperMapAlgoPlot.PlottingUtil.pointIsOnPolyLines(r.pt,w).isOnPolyLine&&(T=SuperMapAlgoPlot.PlottingUtil.radian(n[x],n[x+1])*h)}var E=T+L;if(r.index<0)break;d.add(r.pt.x,r.pt.y);var C=e.charAt(O),I={};I.type=SuperMapAlgoPlot.SymbolType.TEXTSYMBOL,I.textContent=C,I.positionPoints=[r.pt],I.style={surroundLineFlag:!1,labelAlign:y,labelRotation:-E},v.push(I),S||(this.dNowPassedDistance+=M)}var R=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(n,this.dNowPassedDistance);if(this.showPathLine){if(this.relLineText===SuperMapAlgoPlot.RelLineText.ONLINE&&this.isAvoid){if(A.index>=0){for(var D=[],U=0;U<=A.index;U++)D.push(o[U]);D.push(A.pt),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,D)}if(R.index>=0){var N=[];N.push(R.pt);for(var B=R.index+1;B<o.length;B++)N.push(o[B]);this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,N)}}else this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,o);if(this.showPathLineArrow&&this.addArrow(o),A.pt){var k=SuperMapAlgoPlot.PlottingUtil.distance(n[0],A.pt),F=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(n,k);this.addScalePoint(F.pt)}}for(var V=0;V<v.length;V++)this.components.push(v[V]);this.isScalePoint=!1,this.oldPathTextStart=A}}},{key:"addArrow",value:function(t){if(t.length<2)return t;var e=SuperMapAlgoPlot.PlottingUtil.polylineDistance(this.controlPoints)*(this.isEdit,null==this.getSubSymbolScaleValue()?.05:.5*this.getSubSymbolScaleValue()),o=t[t.length-1];if(t.length>2){for(var i=-1,n=t.length-2;n>=0;n--)if(e<SuperMapAlgoPlot.PlottingUtil.distance(o,t[n])){i=n;break}t.splice(i+1,t.length-i),t.push(o)}var l=t[t.length-2],a=t[t.length-1],s=e;if(void 0===l)return t;if(!(SuperMapAlgoPlot.PlottingUtil.distance(l,a)<e)){var r=SuperMapAlgoPlot.PlottingUtil.radian(l,a)*SuperMapAlgoPlot.PlottingUtil.RTOD,u=SuperMapAlgoPlot.PlottingUtil.circlePoint(a,s,s,r+157.5),p=SuperMapAlgoPlot.PlottingUtil.circlePoint(a,s,s,r+202.5);this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,[u,t[t.length-1],p],{surroundLineFlag:!1,fillLimit:!0,lineTypeLimit:!0,fill:!0})}}},{key:"modifyPoint",value:function(t,e){if(e.isScalePoint){for(var o=0,i=0;i<this.controlPoints.length-1;i++){var n=[];n.push(this.controlPoints[i]),n.push(this.controlPoints[i+1]),SuperMapAlgoPlot.PlottingUtil.pointIsOnPolyLines(e,n).isOnPolyLine||o++}if(o===this.controlPoints.length-1)return;this.isScalePoint=!0;var l=SuperMapAlgoPlot.PlottingUtil.distance(this.textPathPts[0],e);this.dNowPassedDistance=l}this.calculateParts()}}])&&Vo(e.prototype,o),i&&Vo(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Wo(t){"@babel/helpers - typeof";return(Wo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Xo(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Ho(){return(Ho="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=qo(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:o):n.value}}).apply(this,arguments)}function Zo(t,e){return(Zo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Jo(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=qo(t);if(e){var n=qo(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Wo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function qo(t){return(qo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.PathText=Go;var Ko=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zo(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=Jo(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=n.call(this,t)).islocationCircle=!!t.islocationCircle&&t.islocationCircle,e.textBoxType=t.textBoxType?t.textBoxType:SuperMapAlgoPlot.TextBoxType.RECTBOX,0===e.scaleValues.length&&(e.scaleValues.push(.126),e.scaleValues.push(0),e.scaleValues.push(0),e.scaleValues.push(4)),e.CLASS_NAME="SuperMapAlgoPlot.LineMarking",e}return e=l,(o=[{key:"destroy",value:function(){this.islocationCircle=null,this.textBoxType=null,Ho(qo(l.prototype),"destroy",this).call(this)}},{key:"calculateParts",value:function(){this.init(),this.controlPoints=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints),this.controlPoints=SuperMapAlgoPlot.PlottingUtil.clearSamePts(this.controlPoints);var t=this.scaleValues[0];if(!(t<0||t>1)){if(t=(1-t)/2,this.controlPoints.length>=this.minEditPts){var e,o,i,n;this.scalePoints=[];var l=[];this.controlPoints[0].x<this.controlPoints[1].x?(e=this.controlPoints[0].x,i=this.controlPoints[1].x):(e=this.controlPoints[1].x,i=this.controlPoints[0].x),this.controlPoints[0].y<this.controlPoints[1].y?(n=this.controlPoints[0].y,o=this.controlPoints[1].y):(n=this.controlPoints[1].y,o=this.controlPoints[0].y),l.push(new SuperMapAlgoPlot.Point(e,n)),l.push(new SuperMapAlgoPlot.Point(e,o)),l.push(new SuperMapAlgoPlot.Point(i,o)),l.push(new SuperMapAlgoPlot.Point(i,n)),!1===this.isEdit&&(this.scaleValues[1]=e+.1*(i-e),this.scaleValues[2]=n+-.3*(o-n));var a=this.getAction(this.scaleValues[1],this.scaleValues[2],e,o,i,n),s=new SuperMapAlgoPlot.Point(this.scaleValues[1],this.scaleValues[2]);if(this.textBoxType===SuperMapAlgoPlot.TextBoxType.RECTBOX||this.textBoxType===SuperMapAlgoPlot.TextBoxType.LINEBOX){var r=[];switch(a){case 0:this.addScalePoint(s);break;case 1:this.addScalePoint(s),r.push(new SuperMapAlgoPlot.Point(e,o-(o-n)*t)),r.push(s);break;case 2:this.addScalePoint(s),r.push(new SuperMapAlgoPlot.Point(i-(i-e)*t,o)),r.push(s);break;case 3:this.addScalePoint(s),r.push(new SuperMapAlgoPlot.Point(i,o-(o-n)*t)),r.push(s);break;case 4:this.addScalePoint(s),r.push(new SuperMapAlgoPlot.Point(i-(i-e)*t,n)),r.push(s)}this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,r)}if(0!==l.length&&this.textBoxType===SuperMapAlgoPlot.TextBoxType.RECTBOX)this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,l);else if(0!==l.length&&this.textBoxType===SuperMapAlgoPlot.TextBoxType.LINEBOX){var u=[];switch(a){case 0:break;case 1:u=(u=u.concat(l[0])).concat(l[1]);break;case 2:u=(u=u.concat(l[1])).concat(l[2]);break;case 3:u=(u=u.concat(l[2])).concat(l[3]);break;case 4:u=(u=u.concat(l[3])).concat(l[0])}0!==u.length?this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,u):this.addCell(SuperMapAlgoPlot.SymbolType.RECTANGLESYMBOL,this.controlPoints)}this.islocationCircle&&this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[s,new SuperMapAlgoPlot.Point(s.x-.05,s.y-.05)]),this.annotationContent(e,o,i,n)}else this.controlPoints.length>=2&&this.controlPoints.length<this.minEditPts&&this.addCell(SuperMapAlgoPlot.SymbolType.RECTANGLESYMBOL,this.controlPoints);this.finish()}}},{key:"modifyPoint",value:function(t,e){!0===e.isScalePoint&&(this.scaleValues[1]=e.x,this.scaleValues[2]=e.y),this.calculateParts()}},{key:"getAction",value:function(t,e,o,i,n,l){var a=(i-l)/(n-o);return t<o?e>i?Math.abs((e-i)/(t-o))>a?2:1:e<l&&Math.abs((e-l)/(t-o))>a?4:1:t>n?e>i?Math.abs((e-i)/(t-n))>a?2:3:e<l&&Math.abs((e-l)/(t-n))>a?4:3:e>i?2:e<l?4:0}}])&&Xo(e.prototype,o),i&&Xo(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Qo(t){"@babel/helpers - typeof";return(Qo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $o(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function ti(){return(ti="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ii(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:o):n.value}}).apply(this,arguments)}function ei(t,e){return(ei=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function oi(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=ii(t);if(e){var n=ii(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Qo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function ii(t){return(ii=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.LineMarking=Ko;var ni=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ei(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=oi(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=n.call(this,t)).subSectionCount=t.subSectionCount?t.subSectionCount:10,e.CLASS_NAME="SuperMapAlgoPlot.LineRelation",e}return e=l,(o=[{key:"destroy",value:function(){this.subSectionCount=null,ti(ii(l.prototype),"destroy",this).call(this)}},{key:"calculateParts",value:function(){this.init();for(var t=0;t<this.controlPoints.length;t++)this.controlPoints[t].tag=t;var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);null!==e&&e.length>=this.minEditPts&&this.computeLine(e)}},{key:"computeLine",value:function(t){this.components.length=0;var e=t[0],o=t[t.length-1];this.subSectionCount<=1&&(this.subSectionCount=10);var i=SuperMapAlgoPlot.PlottingUtil.distance(e,o)/(2*this.subSectionCount-1);if(this.lineRelationType===SuperMapAlgoPlot.LineRelationType.SOLID)this.addCell(24,t,{surroundLineFlag:!1});else if(this.lineRelationType===SuperMapAlgoPlot.LineRelationType.DASH)for(var n=0;n<this.subSectionCount;n++){var l=SuperMapAlgoPlot.PlottingUtil.findPoint(e,o,2*n*i,0),a=SuperMapAlgoPlot.PlottingUtil.findPoint(e,o,(2*n+1)*i,0);this.addCell(24,[l,a],{surroundLineFlag:!1})}else if(this.lineRelationType===SuperMapAlgoPlot.LineRelationType.ARROW)for(var s=0;s<this.subSectionCount;s++){var r=SuperMapAlgoPlot.PlottingUtil.findPoint(e,o,2*s*i,0),u=SuperMapAlgoPlot.PlottingUtil.findPoint(e,o,(2*s+1)*i,0),p=SuperMapAlgoPlot.PlottingUtil.findPoint(u,r,i,60),h=SuperMapAlgoPlot.PlottingUtil.findPoint(u,r,i,-60);this.addCell(24,[p,u,h],{surroundLineFlag:!1})}}}])&&$o(e.prototype,o),i&&$o(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function li(t){"@babel/helpers - typeof";return(li="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ai(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function si(){return(si="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=pi(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:o):n.value}}).apply(this,arguments)}function ri(t,e){return(ri=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ui(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=pi(t);if(e){var n=pi(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===li(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function pi(t){return(pi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.LineRelation=ni;var hi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ri(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=ui(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),void 0===(e=n.call(this,t)).scaleValues[0]&&(e.scaleValues[0]=0),void 0===e.scaleValues[1]&&(e.scaleValues[1]=0),e.CLASS_NAME="SuperMapAlgoPlot.PolygonRegion",e}return e=l,(o=[{key:"destroy",value:function(){si(pi(l.prototype),"destroy",this).call(this)}},{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(null!=(t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t))&&t.length>=this.minEditPts){if(this.addCell(32,t,{surroundLineFlag:!1}),this.textContent&&null!=this.textContent&&this.textContent.length>0){var e=[];this.scaleValues[1]>t.length&&(this.scaleValues[1]=0);var o={labelRotation:0,surroundLineFlag:!1,labelAlign:"lt"};if(0===this.scaleValues[1])e=[SuperMapAlgoPlot.PlottingUtil.getPolygonCenterPt(t)];else{var i=null,n=null;this.scaleValues[1]===t.length?(i=t[t.length-1],n=t[0]):(i=t[this.scaleValues[1]-1],n=t[this.scaleValues[1]]),o.labelRotation=-SuperMapAlgoPlot.PlottingUtil.radian(i,n)/Math.PI*180;var l=this.scaleValues[0]*SuperMapAlgoPlot.PlottingUtil.distance(i,n);e=[SuperMapAlgoPlot.PlottingUtil.findPoint(i,n,l,0)]}this.addCell(34,e,o,this.textContent);var a=new SuperMapAlgoPlot.Point(e[0].x,e[0].y);a.isScalePoint=!0,a.tag=0,this.scalePoints=[],this.addScalePoint(a)}}else this.controlPoints.length>=2&&this.controlPoints.length<this.minEditPts&&this.calAssistantLine()}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint){for(var o=0,i=SuperMapAlgoPlot.PlottingUtil.distance(e,this.controlPoints[0]),n=1;n<this.controlPoints.length;n++){var l=SuperMapAlgoPlot.PlottingUtil.distance(e,this.controlPoints[n]);l<i&&(i=l,o=n)}var a=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);(a=SuperMapAlgoPlot.PlottingUtil.clearSamePts(a)).push(a[0].clone());var s=SuperMapAlgoPlot.PlottingUtil.computePointToLineMinDis(e,a);if(-1===s.minDis)this.scaleValues[1]=o+1,this.offsetX=0,this.offsetY=0;else{var r=SuperMapAlgoPlot.PlottingUtil.projectPoint(e,a[s.index],a[s.index+1]),u=SuperMapAlgoPlot.PlottingUtil.distance(e,r),p=SuperMapAlgoPlot.PlottingUtil.getPolygonCenterPt(this.controlPoints),h=SuperMapAlgoPlot.PlottingUtil.distance(e,p);if(h<u&&h<i)this.scaleValues[1]=0,this.scaleValues[0]=0;else if(i<u&&i<h)this.scaleValues[1]=o+1,this.scaleValues[0]=0;else if(u<i&&u<h){this.scaleValues[1]=s.index+1;var c=null,y=null;this.scaleValues[1]===this.controlPoints.length?(c=this.controlPoints[this.controlPoints.length-1],y=this.controlPoints[0]):(c=this.controlPoints[this.scaleValues[1]-1],y=this.controlPoints[this.scaleValues[1]]);var g=SuperMapAlgoPlot.PlottingUtil.distance(r,c),f=SuperMapAlgoPlot.PlottingUtil.distance(c,y);this.scaleValues[0]=g/f}}}this.calculateParts()}},{key:"parseSymbolData",value:function(){si(pi(l.prototype),"parseSymbolData",this).call(this),this.symbolData&&(this.scaleValues[1]=this.symbolData.annotationPosition)}},{key:"setSymbolData",value:function(){si(pi(l.prototype),"setSymbolData",this).call(this),this.symbolData&&(this.symbolData.annotationPosition=this.scaleValues[1])}}])&&ai(e.prototype,o),i&&ai(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function ci(t){"@babel/helpers - typeof";return(ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yi(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function gi(t,e){return(gi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function fi(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Pi(t);if(e){var n=Pi(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===ci(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Pi(t){return(Pi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.PolygonRegion=hi;var di=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&gi(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=fi(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&e.scaleValues.push(.05),e.CLASS_NAME="SuperMapAlgoPlot.Wire",e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){this.isEdit||(this.scaleValues[0]=2*this.getSubSymbolScaleValue());var e=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t);e=SuperMapAlgoPlot.PlottingUtil.clearSamePts(e);var o=SuperMapAlgoPlot.PlottingUtil.polylineDistance(e);this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,e);for(var i=o*this.scaleValues[0],n=o*this.scaleValues[0]/2,l=SuperMapAlgoPlot.PlottingUtil.clonePoints(e),a=parseInt((o-n)/i),s=0;s<=a&&!(n+i*s>o);s++){var r=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(l,n+i*s);if(-1!==r.index){var u=new SuperMapAlgoPlot.Point(r.pt.x,r.pt.y),p=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(i/2,e[r.index],u);this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[p.pntLeft,p.pntRight])}}this.finish()}}}])&&yi(e.prototype,o),i&&yi(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Si(t){"@babel/helpers - typeof";return(Si="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function mi(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function bi(t,e){return(bi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Li(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Mi(t);if(e){var n=Mi(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Si(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Mi(t){return(Mi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.Wire=di;var vi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bi(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=Li(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&(e.scaleValues.push(15),e.scaleValues.push(7.5),e.scaleValues.push(0),e.scaleValues.push(15),e.scaleValues.push(7.5),e.scaleValues.push(0)),e.CLASS_NAME="SuperMapAlgoPlot.LinearArrow",e}return e=l,(o=[{key:"calculateParts",value:function(){if(this.init(),!(null==this.controlPoints||this.controlPoints.length<this.minEditPts)){var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){if(this.scalePoints=[],this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,t),!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.scaleValues[0],0)&&!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.scaleValues[1],0)){var e=this.scaleValues[0]*(this.style.weight||this.style.strokeWidth),o=this.scaleValues[1]*(this.style.weight||this.style.strokeWidth),i=this.getLonLatDistanceFromPixel(e),n=this.getLonLatDistanceFromPixel(o),l=SuperMapAlgoPlot.PlottingUtil.findPointInLine(t[0],t[1],i),a=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(n,t[1],l),s=[];if(s.push(a.pntLeft),s.push(t[0]),s.push(a.pntRight),this.addScalePoint(a.pntLeft,0),SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.scaleValues[2],0))this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,s,{fillLimit:!0,fill:!0}),this.addScalePoint(l,1);else if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.scaleValues[2],1))this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,s),this.addScalePoint(t[0],1);else{var r=i*this.scaleValues[2],u=SuperMapAlgoPlot.PlottingUtil.findPointInLine(l,t[0],r);s.push(u),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,s,{fillLimit:!0,fill:!0}),this.addScalePoint(u,1)}}if(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.scaleValues[3],0)&&!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.scaleValues[4],0)){var p=this.scaleValues[3]*(this.style.weight||this.style.strokeWidth),h=this.scaleValues[4]*(this.style.weight||this.style.strokeWidth),c=this.getLonLatDistanceFromPixel(p),y=this.getLonLatDistanceFromPixel(h),g=SuperMapAlgoPlot.PlottingUtil.findPointInLine(t[1],t[0],c),f=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(y,t[0],g),P=[];if(P.push(f.pntLeft),P.push(t[1]),P.push(f.pntRight),this.addScalePoint(f.pntLeft,2),SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.scaleValues[5],0))this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,P,{fillLimit:!0,fill:!0}),this.addScalePoint(g,3);else if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.scaleValues[5],1))this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,P),this.addScalePoint(t[1],3);else{var d=c*this.scaleValues[5],S=SuperMapAlgoPlot.PlottingUtil.findPointInLine(g,t[1],d);P.push(S),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,P,{fillLimit:!0,fill:!0}),this.addScalePoint(S,3)}}this.finish()}}}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint){var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o),0===t){var i=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,o[0],o[1]);if(i.isOnline){var n=this.scaleValues[0]*(this.style.weight||this.style.strokeWidth),l=this.getLonLatDistanceFromPixel(n),a=l*this.scaleValues[2],s=SuperMapAlgoPlot.PlottingUtil.findPointInLine(o[0],o[1],l),r=SuperMapAlgoPlot.PlottingUtil.findPointInLine(s,o[0],a);l=SuperMapAlgoPlot.PlottingUtil.distance(o[0],i.projectPoint),n=this.getPixelDistanceFromLonLat(l),this.scaleValues[0]=n/(this.style.weight||this.style.strokeWidth);var u=SuperMapAlgoPlot.PlottingUtil.distance(e,i.projectPoint),p=this.getPixelDistanceFromLonLat(u);this.scaleValues[1]=p/(this.style.weight||this.style.strokeWidth),a=SuperMapAlgoPlot.PlottingUtil.distance(r,i.projectPoint),this.scaleValues[2]=a/l}}else if(1===t){var h=this.scaleValues[0]*(this.style.weight||this.style.strokeWidth),c=this.getLonLatDistanceFromPixel(h),y=SuperMapAlgoPlot.PlottingUtil.findPointInLine(o[0],o[1],c),g=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,y,o[0]);if(g.isOnline){var f=SuperMapAlgoPlot.PlottingUtil.distance(y,g.projectPoint);this.scaleValues[2]=f/c,this.scaleValues[2]<0?this.scaleValues[2]=0:this.scaleValues[2]>1&&(this.scaleValues[2]=1)}}else if(2===t){var P=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,o[0],o[1]);if(P.isOnline){var d=this.scaleValues[3]*(this.style.weight||this.style.strokeWidth),S=this.getLonLatDistanceFromPixel(d),m=S*this.scaleValues[5],b=SuperMapAlgoPlot.PlottingUtil.findPointInLine(o[1],o[0],S),L=SuperMapAlgoPlot.PlottingUtil.findPointInLine(b,o[1],m);S=SuperMapAlgoPlot.PlottingUtil.distance(o[1],P.projectPoint),d=this.getPixelDistanceFromLonLat(S),this.scaleValues[3]=d/(this.style.weight||this.style.strokeWidth);var M=SuperMapAlgoPlot.PlottingUtil.distance(e,P.projectPoint),v=this.getPixelDistanceFromLonLat(M);this.scaleValues[4]=v/(this.style.weight||this.style.strokeWidth),m=SuperMapAlgoPlot.PlottingUtil.distance(L,P.projectPoint),this.scaleValues[5]=m/S}}else if(3===t){var A=this.scaleValues[3]*(this.style.weight||this.style.strokeWidth),T=this.getLonLatDistanceFromPixel(A),_=SuperMapAlgoPlot.PlottingUtil.findPointInLine(o[1],o[0],T),O=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,_,o[1]);if(O.isOnline){var x=SuperMapAlgoPlot.PlottingUtil.distance(_,O.projectPoint);this.scaleValues[5]=x/T,this.scaleValues[5]<0?this.scaleValues[5]=0:this.scaleValues[5]>1&&(this.scaleValues[5]=1)}}}this.calculateParts()}}])&&mi(e.prototype,o),i&&mi(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Ai(t){"@babel/helpers - typeof";return(Ai="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ti(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function _i(t,e){return(_i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Oi(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=xi(t);if(e){var n=xi(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Ai(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function xi(t){return(xi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.LinearArrow=vi;var wi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_i(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=Oi(l);function l(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),n.call(this,t)}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e=[];if(this.m_bIsAnimation)t.length<3?(e.push(t[0]),e.push(t[1])):e=e.concat(t);else if(this.isEdit||(this.scaleValues=[]),this.scalePoints=[],t.length<3)e.push(t[0]),e.push(t[1]);else{var o=SuperMapAlgoPlot.PlottingUtil.computeBeizerPoints(this.isEdit,t,this.scaleValues);this.scaleValues=o.scaleValues;for(var i=0;i<o.scalePoints.length;i++)this.addScalePoint(o.scalePoints[i]);e=o.beizerPoints}SuperMapAlgoPlot.PlottingUtil.clearSamePts(e),e.length<=0||(this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,e),this.finish())}}},{key:"computeScaleValues",value:function(t,e){if(!0===e.isScalePoint){if(t<0||t>2*this.controlPoints.length-1)return;var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o),this.minEditPts>o.length)return;var i=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(o);i=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i);var n=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o),l=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(n,0)||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l,0))return;var a=-1;a=t%2==0?Math.floor(t/2):Math.floor((t+1)/2);var s=(e.x-o[a].x)/n,r=(e.y-o[a].y)/n;this.scaleValues[2*t]=s,this.scaleValues[2*t+1]=r}}}])&&Ti(e.prototype,o),i&&Ti(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Ei(t){"@babel/helpers - typeof";return(Ei="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ci(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Ii(){return(Ii="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ui(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:o):n.value}}).apply(this,arguments)}function Ri(t,e){return(Ri=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Di(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Ui(t);if(e){var n=Ui(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Ei(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Ui(t){return(Ui=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.Polybezier=wi;var Ni=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ri(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=Di(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=n.call(this,t)).CLASS_NAME="SuperMapAlgoPlot.NewPie",e}return e=l,(o=[{key:"destroy",value:function(){Ii(Ui(l.prototype),"destroy",this).call(this)}},{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=this.minEditPts){var e=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]),o=SuperMapAlgoPlot.PlottingUtil.radian(t[0],t[2]),i=SuperMapAlgoPlot.PlottingUtil.radian(t[0],t[1]),n=[];n.push(t[0]),(n=n.concat(SuperMapAlgoPlot.Primitives.getArcCircleSpatialData(t[0],e,o,i))).push(t[0]),0!==n.length&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,n)}}}])&&Ci(e.prototype,o),i&&Ci(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Bi(t){"@babel/helpers - typeof";return(Bi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ki(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Fi(){return(Fi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Yi(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:o):n.value}}).apply(this,arguments)}function Vi(t,e){return(Vi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ji(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Yi(t);if(e){var n=Yi(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Bi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Yi(t){return(Yi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.NewPie=Ni;var zi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vi(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=ji(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=n.call(this,t)).CLASS_NAME="SuperMapAlgoPlot.NewArc",e}return e=l,(o=[{key:"destroy",value:function(){Fi(Yi(l.prototype),"destroy",this).call(this)}},{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=this.minEditPts){var e=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]),o=SuperMapAlgoPlot.PlottingUtil.radian(t[0],t[2]),i=SuperMapAlgoPlot.PlottingUtil.radian(t[0],t[1]),n=SuperMapAlgoPlot.Primitives.getArcCircleSpatialData(t[0],e,o,i);0!==n.length&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,n)}}}])&&ki(e.prototype,o),i&&ki(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Gi(t){"@babel/helpers - typeof";return(Gi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Wi(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Xi(){return(Xi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ji(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:o):n.value}}).apply(this,arguments)}function Hi(t,e){return(Hi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Zi(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Ji(t);if(e){var n=Ji(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Gi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Ji(t){return(Ji=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.NewArc=zi;var qi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Hi(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=Zi(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=n.call(this,t)).CLASS_NAME="SuperMapAlgoPlot.NewChord",e}return e=l,(o=[{key:"destroy",value:function(){Xi(Ji(l.prototype),"destroy",this).call(this)}},{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=this.minEditPts){var e=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]),o=SuperMapAlgoPlot.PlottingUtil.radian(t[0],t[2]),i=SuperMapAlgoPlot.PlottingUtil.radian(t[0],t[1]),n=[];n.push(t[1]),(n=n.concat(SuperMapAlgoPlot.Primitives.getArcCircleSpatialData(t[0],e,o,i))).push(t[1]),0!==n.length&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,n)}}}])&&Wi(e.prototype,o),i&&Wi(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Ki(t){"@babel/helpers - typeof";return(Ki="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Qi(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function $i(t,e){return($i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function tn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=en(t);if(e){var n=en(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Ki(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function en(t){return(en=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.NewChord=qi;var on=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$i(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=tn(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&(e.scaleValues.push(.1),e.scaleValues.push(.2),e.scaleValues.push(0),e.scaleValues.push(.3),e.scaleValues.push(.08)),e.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1001",e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints),e=(t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length;if(e>=this.minEditPts){this.scalePoints=[];var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),i=!1;void 0!==o[0].z&&(i=!0);var n=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePts(t,this.scaleValues,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_PARALLEL),l=n.arrowTouLen,a=n.leftBodyPts,s=n.rightBodyPts,r=[];r.push(a[a.length-1]),r.push(s[s.length-1]);var u=[];u.push(this.scaleValues[3]),u.push(this.scaleValues[4]),u.push(this.scaleValues[0]),u.push(this.scaleValues[1]);var p=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePts(t,r,u,l,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITHOUT_EAR),h=[];if(i){for(var c=[],y=[],g=[],f=0;f<e-1;f++)y.push({x:a[f].x,y:a[f].y,z:o[f].z}),g.push({x:s[f].x,y:s[f].y,z:o[f].z});var P={x:o[e-2].x,y:o[e-2].y,z:o[e-2].z},d={x:o[e-1].x,y:o[e-1].y,z:o[e-1].z},S=this.ComputeZValue(a[e-1],d,P);y.push({x:a[e-1].x,y:a[e-1].y,z:S});var m=this.ComputeZValue(s[e-1],d,P);g.push({x:s[e-1].x,y:s[e-1].y,z:m});for(var b=0;b<p.length;b++){var L=this.ComputeZValue(p[b],d,P);c.push({x:p[b].x,y:p[b].y,z:L})}h=(h=h.concat(y)).concat(c);for(var M=g.length-1;M>=0;M--)h.push(g[M]);var v=new SuperMapAlgoPlot.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2),A=new SuperMapAlgoPlot.Point(v.x,v.y);A.isScalePoint=!0,A.tag=0,this.addScalePoint(A);var T=new SuperMapAlgoPlot.Point(a[a.length-1].x,a[a.length-1].y);T.isScalePoint=!0,T.tag=1,this.addScalePoint(T);var _=new SuperMapAlgoPlot.Point(p[0].x,p[0].y);_.isScalePoint=!0,_.tag=2,this.addScalePoint(_);for(var O=0;O<this.scalePoints.length;O++){var x=new SuperMapAlgoPlot.Point(this.scalePoints[O].x,this.scalePoints[O].y);this.scalePoints[O].z=this.ComputeZValue(x,d,P)}}else{h=(h=h.concat(a)).concat(p);for(var w=s.length-1;w>=0;w--)h.push(s[w]);var E=new SuperMapAlgoPlot.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2),C=new SuperMapAlgoPlot.Point(E.x,E.y);C.isScalePoint=!0,C.tag=0,this.addScalePoint(C);var I=new SuperMapAlgoPlot.Point(a[a.length-1].x,a[a.length-1].y);I.isScalePoint=!0,I.tag=1,this.addScalePoint(I);var R=new SuperMapAlgoPlot.Point(p[0].x,p[0].y);R.isScalePoint=!0,R.tag=2,this.addScalePoint(R)}this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,h,{surroundLineFlag:!1,lineWidthLimit:!0,strokeWidth:0,weight:0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,h)}}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint){var o=new SuperMapAlgoPlot.Point(this.scalePoints[0].x,this.scalePoints[0].y),i=new SuperMapAlgoPlot.Point(this.scalePoints[1].x,this.scalePoints[1].y),n=new SuperMapAlgoPlot.Point(this.scalePoints[2].x,this.scalePoints[2].y),l=this.scaleValues[0],a=SuperMapAlgoPlot.PlottingUtil.polylineDistance(this.controlPoints),s=a*l;if(0==t){var r=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,this.controlPoints[this.controlPoints.length-2],this.controlPoints[this.controlPoints.length-1]),u=r.projectPoint;if(r.isOnline){var p=SuperMapAlgoPlot.PlottingUtil.distance(u,this.controlPoints[this.controlPoints.length-1]);this.scaleValues[0]=p/a}}else if(1==t){var h=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,i,n).projectPoint,c=SuperMapAlgoPlot.PlottingUtil.distance(h,o);this.scaleValues[1]=c/s}else if(2==t){var y=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,this.controlPoints[1],n).projectPoint,g=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(y,o,this.controlPoints[1]),f=g.projectPoint,P=SuperMapAlgoPlot.PlottingUtil.distance(f,o);!0===g.inOnline?this.scaleValues[4]=-P/s:this.scaleValues[4]=P/s}}this.calculateParts()}}])&&Qi(e.prototype,o),i&&Qi(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function nn(t){"@babel/helpers - typeof";return(nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ln(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function an(t,e){return(an=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function sn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=rn(t);if(e){var n=rn(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===nn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function rn(t){return(rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol1001=on;var un=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&an(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=sn(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=n.call(this,t)).MIN_GEOPT_COUNT=2,e.MAX_GEOPT_COUNT=1024,e.SV1_defaultATLenDivABLen=0,e.SV2_defaultAYPosScale=.65,e.SV_AJCtrl=.6,e.SV_ArrowWoCtrl=.6,e.SV2_DefaultAJWidDiviedByATLen=.148,e.SV3_DefaultAEWidDividedByATLen=.4,e.SV4_DefaultAELenDividedByATLen=.3,e.SV_ATScaleParameter=1.25,e.SV_ATLenDividedByATWid=1.35,e.SV_ATWidDividedByArrowWeiWid=.5,e.AB_VERTEX_COUNT=4,e.MIN_PTCOUNT_PERARROW=3,e.ATL_DIV_AWW=.7,e.ATL_DIV_ABL=.12,e.ATL_DIV_ABL_1=.18,e.DEFAULT_ARROW_TAIL_POS=.12,e.DUOJIANTOU_TAIL_RATE_1=8,e.DUOJIANTOU_TAIL_RATE_2=3,e.DUOJIANTOU_TAIL_RATE_3=.6,e.AB_CTRLPT_RATE1=0,e.AB_CTRLPT_RATE2=3,e.AB_CTRLPT_RATE3=.5,e.MIN_SCALEVALUE=.1,e.MAX_SCALEVALUE=1,e.m_scalePoints=null,e.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1002",e}return e=l,(o=[{key:"calculateParts",value:function(){this.init(),this.m_scalePoints=[];var t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=2&&t.length<this.minEditPts&&this.calAssistantLine(),!(t.length<this.minEditPts)){var e=this.operateCtrlPts(t),o=e.length,i=Math.floor(o/this.MIN_PTCOUNT_PERARROW),n=this.scaleValues.length;if(n<2*i-1){0==n&&(this.scaleValues.push(this.SV1_defaultATLenDivABLen),n++);for(var l=2*i-1-n,a=0;a<l;a+=2)this.scaleValues.splice(n/2+1,0,this.SV1_defaultATLenDivABLen),this.scaleValues.splice(this.scaleValues.length,0,this.SV2_defaultAYPosScale)}else if(n>2*i-1){for(var s=0;s<i;s++)this.scaleValues.push(this.SV1_defaultATLenDivABLen);for(var r=0;r<i-1;r++)this.scaleValues.push(this.SV2_defaultAYPosScale)}var u=this.arrowMeshs(e);SuperMapAlgoPlot.PlottingUtil.clearSamePts(u.shapePts);var p=!1;if(void 0!==t[0].z&&(p=!0),p){var h=this.operateCtrlPts3D(t),c=u.arrLeftPts2D,y=u.arrRightPts2D,g=u.arrHeadPts2D;if(i!=c.length&&i!=y.length&&i!=g.length)return!1;for(var f=[],P=0;P<i;P++){for(var d=[],S=3*P;S<3*(P+1)&&S<h.length;S++)d.push(h[S]);f.push(d)}for(var m=[],b=[],L=[],M=0;M<i;M++)if(!(2>f[M].length)){for(var v=c[M][c[M].length-1],A=y[M][0],T=new SuperMapAlgoPlot.Point(.5*(v.x+A.x),.5*(v.y+A.y)),_=f[M][f[M].length-1],O=f[M][f[M].length-2],x=this.ComputeZValue(T,_,O),w={x:T.x,y:T.y,z:x},E=[],C=[],I=0;I<f[M].length-1;I++)if(0==M)C.push(f[M][I]);else{var R={x:f[M][I].x,y:f[M][I].y,z:.5*(f[M][I].z+f[M-1][I].z)};C.push(R)}C.push(w),this.ComputeBeizerZValueByDis(C,c[M],E),m.push(E),E=[];var D=[];D.push(w);for(var U=f[M].length-2;U>=0;U--)if(M==i-1)D.push(f[M][U]);else{var N={x:f[M][U].x,y:f[M][U].y,z:.5*(f[M][U].z+f[M+1][U].z)};D.push(N)}this.ComputeBeizerZValueByDis(D,y[M],E),b.push(E),E=[];for(var B=g[M],k=0;k<B.length;k++){var F=this.ComputeZValue(B[k],_,O);E.push({x:B[k].x,y:B[k].y,z:F})}L.push(E)}for(var V=[],j=0;j<i;j++)V=(V=(V=V.concat(m[j])).concat(L[j])).concat(b[j]);return SuperMapAlgoPlot.PlottingUtil.clearSamePts(V),u.shapePts.length>0&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,V,{surroundLineFlag:!1}),this.scalePoints=this.scalePoints.concat(this.m_scalePoints),!0}u.shapePts.length>0&&(this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,u.shapePts,{surroundLineFlag:!1,lineWidthLimit:!0,strokeWidth:0,weight:0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,u.shapePts,{surroundLineFlag:!1})),this.scalePoints=[];for(var Y=0;Y<this.m_scalePoints.length;Y++)this.m_scalePoints[Y].isScalePoint=!0,this.m_scalePoints[Y].tag=Y,this.addScalePoint(this.m_scalePoints[Y])}}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint){var o=this.operateCtrlPts(this.controlPoints),i=o.length,n=Math.floor(i/this.MIN_PTCOUNT_PERARROW),l=0;if(t<n){var a=[],s=t*this.MIN_PTCOUNT_PERARROW;a[0]=o[s],a[1]=o[s+1],a[2]=o[s+2];var r=SuperMapAlgoPlot.PlottingUtil.polylineDistance(a),u=new SuperMapAlgoPlot.Point(0,0),p=new SuperMapAlgoPlot.Point(0,0),h=new SuperMapAlgoPlot.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(this.AB_CTRLPT_RATE1,this.AB_CTRLPT_RATE2,a[0],a[1],a[2],u,p),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(this.AB_CTRLPT_RATE3,a[2],a[1],p,h),l=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(a[2],h,e).dLen1/(this.SV4_DefaultAELenDividedByATLen+1)/r}else{var c=[],y=[],g=(t-n)*this.MIN_PTCOUNT_PERARROW;c[0]=o[g],c[1]=o[g+1],c[2]=o[g+2];var f=(t-n+1)*this.MIN_PTCOUNT_PERARROW;y[0]=o[f],y[1]=o[f+1],y[2]=o[f+2];var P=new SuperMapAlgoPlot.Point(0,0),d=new SuperMapAlgoPlot.Point(0,0),S=new SuperMapAlgoPlot.Point(0,0);P.x=.5*(c[2].x+y[2].x),d.x=.5*(c[1].x+y[1].x),S.x=.5*(c[0].x+y[0].x),P.y=.5*(c[2].y+y[2].y),d.y=.5*(c[1].y+y[1].y),S.y=.5*(c[0].y+y[0].y);var m=SuperMapAlgoPlot.PlottingUtil.distance(P,d),b=SuperMapAlgoPlot.PlottingUtil.distance(S,d),L=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(P,d,e),M=L.dLen1;l=M<m?M/(m+b):((M=(L=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(d,S,e)).dLen1)+m)/(m+b)}l>this.MAX_SCALEVALUE?l=this.MAX_SCALEVALUE:l<this.MIN_SCALEVALUE&&(l=this.MIN_SCALEVALUE),this.scaleValues[t]=l}this.calculateParts()}},{key:"arrowMeshs",value:function(t){var e=[],o=[],i=[];t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts;var n=new SuperMapAlgoPlot.Path2D,l=t.length,a=Math.floor(l/this.MIN_PTCOUNT_PERARROW),s=this.generateAWWidth(a,t),r=[],u=[],p=0,h=0,c=0,y=[];for(h=0,c=0;h<a;h++,c+=this.MIN_PTCOUNT_PERARROW){y[0]=t[c],y[1]=t[c+1],y[2]=t[c+2],p=this.scaleValues[h];var g=this.generateArrowBodyPts(y,s[h],p);p=g.dATLenDivABLen,r[h]=g.arrowBodyPts,u.push(p)}var f=[],P=0,d=0,S=0,m=[],b=[];for(h=0;h<a-1;h++,d+=this.MIN_PTCOUNT_PERARROW){S=d+this.MIN_PTCOUNT_PERARROW,m[0]=t[d],m[1]=t[d+1],m[2]=t[d+2],b[0]=t[S],b[1]=t[S+1],b[2]=t[S+2],P=this.scaleValues[a+h];var L=this.generateAYPts(m,r[h],b,r[h+1],P);f.push(L.arrowLeftYaoPts),f.push(L.arrowRightYaoPts)}var M=[],v=r[0],A=[],T=0,_=[];n.MoveTo(v[0]),n.CurveTo(v[1],v[2],v[3]),n.CurveTo(v[4],v[5],v[6]),n.ToSubPathPolygons(A),e.push(A[0]),T=A[0].length;for(var O=7;O<10;O++)n.LineTo(v[O]);for(A=[],n.ToSubPathPolygons(A);T<A[0].length;T++)_.push(A[0][T]);for(i.push(_),M.push(v[0]),M.push(t[0]),h=1,c=this.MIN_PTCOUNT_PERARROW;h<a;h++,c+=this.MIN_PTCOUNT_PERARROW){var x=r[h],w=h+h-2,E=f[w];for(n.LineTo(E[0]),n.CurveTo(E[1],E[2],E[3]),A=[],_=[],n.ToSubPathPolygons(A);T<A[0].length;T++)_.push(A[0][T]);o.push(_);var C=f[w+1];for(n.CurveTo(C[1],C[2],C[3]),A=[],_=[],n.ToSubPathPolygons(A);T<A[0].length;T++)_.push(A[0][T]);e.push(_);for(var I=7;I<10;I++)n.LineTo(x[I]);for(A=[],_=[],n.ToSubPathPolygons(A);T<A[0].length;T++)_.push(A[0][T]);i.push(_),M.push(t[c].clone())}var R=r[a-1];for(n.LineTo(R[10]),n.CurveTo(R[11],R[12],R[13]),n.CurveTo(R[14],R[15],R[16]),A=[],_=[],n.ToSubPathPolygons(A);T<A[0].length;T++)_.push(A[0][T]);o.push(_),M.push(R[16]);var D=[];return n.ToSubPathPolygons(D),{shapePts:D[0],arrLeftPts2D:e,arrRightPts2D:o,arrHeadPts2D:i}}},{key:"operateCtrlPts",value:function(t){t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts;var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),o=e.length,i=Math.floor(o/this.MIN_PTCOUNT_PERARROW),n=o%this.MIN_PTCOUNT_PERARROW,l=new SuperMapAlgoPlot.Point;if(2==n&&(l.x=.5*(e[o-2].x+e[o-1].x),l.y=.5*(e[o-2].y+e[o-1].y),l.x==e[o-1].x&&l.y==e[o-1].y||(e.push(e[o-1].clone()),e[o-1]=l,o++,i++)),o>3)for(var a=i-1,s=0,r=a;s<a;r--,s++)for(var u=r*this.MIN_PTCOUNT_PERARROW,p=0;p<u;p+=this.MIN_PTCOUNT_PERARROW){if(!SuperMapAlgoPlot.PlottingUtil.isRight(e[p+3],e[p+1],e[p+2])){var h=e[p];e[p]=e[p+3],e[p+3]=h,h=e[p+1],e[p+1]=e[p+4],e[p+4]=h,h=e[p+2],e[p+2]=e[p+5],e[p+5]=h}}return e=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(t,e)}},{key:"operateCtrlPts3D",value:function(t){var e=t,o=e.length,i=Math.floor(o/this.MIN_PTCOUNT_PERARROW),n={x:0,y:0,z:0};if(2==o%3&&(n.x=.5*(e[o-2].x+e[o-1].x),n.y=.5*(e[o-2].y+e[o-1].y),n.z=.5*(e[o-2].z+e[o-1].z),n.x==e[o-1].x&&n.y==e[o-1].y&&n.z==e[o-1].z||(e.push(e[o-1]),e[o-1]=n,o++,i++)),o>3)for(var l=i-1,a=0,s=l;a<l;s--,a++)for(var r=3*s,u=0;u<r;u+=3){if(!SuperMapAlgoPlot.PlottingUtil.isRight(e[u+3],e[u+1],e[u+2])){var p=e[u];e[u]=e[u+3],e[u+3]=p,p=e[u+1],e[u+1]=e[u+4],e[u+4]=p,p=e[u+2],e[u+2]=e[u+5],e[u+5]=p}}return e}},{key:"generateAWWidth",value:function(t,e){var o=[];if(t>0)if(1==t)o.push(0);else{var i=SuperMapAlgoPlot.PlottingUtil.distance(e[0],e[this.MIN_PTCOUNT_PERARROW]);o.push(i);for(var n=1,l=this.MIN_PTCOUNT_PERARROW;n<t-1;n++,l+=this.MIN_PTCOUNT_PERARROW){i=.5*(SuperMapAlgoPlot.PlottingUtil.distance(e[l-this.MIN_PTCOUNT_PERARROW],e[l])+SuperMapAlgoPlot.PlottingUtil.distance(e[l],e[l+this.MIN_PTCOUNT_PERARROW])),o.push(i)}i=SuperMapAlgoPlot.PlottingUtil.distance(e[l-this.MIN_PTCOUNT_PERARROW],e[l]),o.push(i)}return o}},{key:"generateArrowBodyPts",value:function(t,e,o){var i=[],n=[],l=[],a=[],s=[],r=[],u=[],p=t.length-1;if(p<2)return{dATLenDivABLen:o=0,arrowBodyPts:i};var h=o,c=this.SV2_DefaultAJWidDiviedByATLen,y=this.SV3_DefaultAEWidDividedByATLen,g=this.SV4_DefaultAELenDividedByATLen,f=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),P=SuperMapAlgoPlot.PlottingUtil.polylineDistance(f),d=0==e?P*this.ATL_DIV_ABL_1:(P+e)*this.ATL_DIV_ABL,S=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(d,f[1],f[0]);n[1]=S.pntLeft.clone(),l[1]=S.pntRight.clone();var m=0;m=SuperMapAlgoPlot.PlottingUtil.equalFuzzy(h,0,1e-14)?d*this.ATL_DIV_AWW:P*h;var b=SuperMapAlgoPlot.PlottingUtil.distance(f[1],f[2]);m+m>b&&(m=.5*b);var L=m*c;f.push(f[p].clone());var M,v=0;M=P-m;var A=[],T=0;for(T=2;T<=p;T++)v+=SuperMapAlgoPlot.PlottingUtil.distance(f[T-1],f[T-2]),SuperMapAlgoPlot.PlottingUtil.equalFuzzy(M,0,1e-14)?A[T]=0:SuperMapAlgoPlot.PlottingUtil.equalFuzzy(M-v,0,1e-14)?A[T]=L:A[T]=L+(d-L)*Math.pow((M-v)/M,this.SV_ATScaleParameter);A[p+1]=L;var _=new SuperMapAlgoPlot.Point(0,0),O=new SuperMapAlgoPlot.Point(0,0),x=new SuperMapAlgoPlot.Point(0,0);for(T=2;T<=p;T++){SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(this.AB_CTRLPT_RATE1,this.AB_CTRLPT_RATE2,f[T-2],f[T-1],f[T],O,x),p==T&&SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(this.AB_CTRLPT_RATE3,f[p],f[p-1],x,_);var w=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(A[T],O,f[T-1]);l[T]=w.pntLeft,n[T]=w.pntRight}var E,C,I=_.clone();if(SuperMapAlgoPlot.PlottingUtil.distance(f[p],I)>0){var R=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(m,f[p],_);f[p]=R.clone()}for(S=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(L,f[p+1],f[p]),n[p+1]=S.pntLeft,l[p+1]=S.pntRight,T=2;T<=p;T++)SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(this.AB_CTRLPT_RATE2,this.AB_CTRLPT_RATE2,n[T-1],n[T],n[T+1],O,x),a[T]=O.clone(),s[T]=x.clone(),SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(this.AB_CTRLPT_RATE2,this.AB_CTRLPT_RATE2,l[T-1],l[T],l[T+1],O,x),r[T]=O.clone(),u[T]=x.clone();SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(this.AB_CTRLPT_RATE3,n[1],n[2],a[2],_),s[1]=_.clone(),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(this.AB_CTRLPT_RATE3,l[1],l[2],r[2],_),u[1]=_.clone();C=SuperMapAlgoPlot.PlottingUtil.distance(n[p+1],n[p])*(1/3),(E=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(C,f[p],f[p+1])).x+=n[p+1].x-f[p].x,E.y+=n[p+1].y-f[p].y,C=(d-L)*Math.pow(C/M,this.SV_ATScaleParameter+.3),S=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(C,n[p+1],E),a[p+1]=S.pntLeft.clone(),C=SuperMapAlgoPlot.PlottingUtil.distance(l[p+1],l[p])*(1/3),(E=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(C,f[p],f[p+1])).x+=l[p+1].x-f[p].x,E.y+=l[p+1].y-f[p].y,C=(d-L)*Math.pow(C/M,this.SV_ATScaleParameter+.3),S=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(C,l[p+1],E),r[p+1]=S.pntRight.clone();var D=[],U=m*g,N=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(U,f[p],f[p+1]);this.m_scalePoints.push(N.clone()),U=m*y,S=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(U,f[p+1],N),D.push(S.pntRight),D.push(f[p+1]),D.push(S.pntLeft);var B=[];for(B.push(n[p+1]),T=p;T>=1;T--)B.push(a[T+1]),B.push(s[T]),B.push(n[T]);var k=[];for(T=1;T<=p;T++)k.push(l[T]),k.push(u[T]),k.push(r[T+1]);k.push(l[p+1]),i.push.apply(i,k),i.push.apply(i,D),i.push.apply(i,B),o=m/P;var F=[];for(T=B.length-1;T>=0;T--)F.push(B[T]);return{dATLenDivABLen:o,arrowBodyPts:i}}},{key:"generateAYPts",value:function(t,e,o,i,n){var l=new SuperMapAlgoPlot.Point(.5*(t[2].x+o[2].x),.5*(t[2].y+o[2].y)),a=new SuperMapAlgoPlot.Point(.5*(t[1].x+o[1].x),.5*(t[1].y+o[1].y)),s=new SuperMapAlgoPlot.Point(.5*(t[0].x+o[0].x),.5*(t[0].y+o[0].y)),r=SuperMapAlgoPlot.PlottingUtil.distance(l,a),u=SuperMapAlgoPlot.PlottingUtil.distance(s,a),p=n*(r+u),h=new SuperMapAlgoPlot.Point(0,0),c=new SuperMapAlgoPlot.Point(0,0),y=new SuperMapAlgoPlot.Point(0,0);if(p>r){p=r+u-p,h=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(p,s,a);var g=SuperMapAlgoPlot.PlottingUtil.distance(t[1],t[0]),f=SuperMapAlgoPlot.PlottingUtil.distance(o[1],o[0]);g=g*p/u,c=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(g,t[0],t[1]),f=f*p/u,y=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(f,o[0],o[1])}else{h=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(p,l,a);var P=SuperMapAlgoPlot.PlottingUtil.distance(t[1],t[2]),d=SuperMapAlgoPlot.PlottingUtil.distance(o[1],o[2]);P=P*p/r,c=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(P,t[2],t[1]),d=d*p/r,y=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(d,o[2],o[1])}this.m_scalePoints.push(h.clone());var S=this.SV_ArrowWoCtrl*SuperMapAlgoPlot.PlottingUtil.distance(h,c),m=this.SV_ArrowWoCtrl*SuperMapAlgoPlot.PlottingUtil.distance(h,y),b=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(S,h,c),L=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(m,h,y),M=e[11].clone(),v=e[10].clone(),A=i[5].clone(),T=i[6].clone(),_=SuperMapAlgoPlot.PlottingUtil.intersectLines(v,M,h,c),O=SuperMapAlgoPlot.PlottingUtil.distance(_.intersectPoint,v),x=SuperMapAlgoPlot.PlottingUtil.distance(v,h);O=O>x?this.SV_AJCtrl*x:this.SV_AJCtrl*O;var w=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(O,v,M);M=w.clone(),e[11]=w.clone(),_=SuperMapAlgoPlot.PlottingUtil.intersectLines(T,A,h,y),O=(O=SuperMapAlgoPlot.PlottingUtil.distance(_.intersectPoint,T))>(x=SuperMapAlgoPlot.PlottingUtil.distance(T,h))?this.SV_AJCtrl*x:this.SV_AJCtrl*O,A=(w=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(O,T,A)).clone(),i[5]=w.clone();var E=[];E.push(v),E.push(M),E.push(b),E.push(h);var C=[];return C.push(h),C.push(L),C.push(A),C.push(T),{arrowLeftYaoPts:E,arrowRightYaoPts:C}}}])&&ln(e.prototype,o),i&&ln(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function pn(t){"@babel/helpers - typeof";return(pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function hn(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function cn(t,e){return(cn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function yn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=gn(t);if(e){var n=gn(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===pn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function gn(t){return(gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol1002=un;var fn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cn(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=yn(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&(e.scaleValues.push(.3),e.scaleValues.push(.28),e.scaleValues.push(.433333),e.scaleValues.push(.53),e.scaleValues.push(0)),e.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1003",e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints),e=(t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length;if(e>=this.minEditPts){if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.controlPoints[0].x,this.controlPoints[1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.controlPoints[0].y,this.controlPoints[1].y))return;var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),i=!1;void 0!==o[0].z&&(i=!0);var n=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePts(t,this.scaleValues,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_TRAPEZOID),l=n.arrowTouLen,a=n.leftBodyPts,s=n.rightBodyPts,r=[];r.push(a[a.length-1]),r.push(s[s.length-1]);var u=[];u.push(this.scaleValues[3]),u.push(this.scaleValues[4]),u.push(0),u.push(0);var p=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePts(t,r,u,l,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITHOUT_EAR),h=[];h=(h=h.concat(a)).concat(p);for(var c=s.length-1;c>=0;c--)h.push(s[c]);if(h.push(a[0]),i){for(var y=[],g={x:o[1].x,y:o[1].y,z:o[1].z},f={x:o[0].x,y:o[0].y,z:o[0].z},P=0;P<h.length;P++){var d=this.ComputeZValue(h[P],g,f);y.push({x:h[P].x,y:h[P].y,z:d})}var S=new SuperMapAlgoPlot.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2),m=new SuperMapAlgoPlot.Point(S.x,S.y);m.isScalePoint=!0,m.tag=0,this.addScalePoint(m);var b=new SuperMapAlgoPlot.Point(a[a.length-1].x,a[a.length-1].y);b.isScalePoint=!0,b.tag=1,this.addScalePoint(b);var L=new SuperMapAlgoPlot.Point(p[0].x,p[0].y);L.isScalePoint=!0,L.tag=2,this.addScalePoint(L);for(var M={x:o[e-1].x,y:o[e-1].y,z:o[e-1].z},v={x:o[e-2].x,y:o[e-2].y,z:o[e-2].z},A=[],T=0;T<this.scalePoints.length;T++){var _={x:this.scalePoints[T].x,y:this.scalePoints[T].y},O=this.ComputeZValue(_,M,v);A.push({x:_.x,y:_.y,z:O})}this.scalePoints=A,this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,y)}else{var x=new SuperMapAlgoPlot.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2),w=new SuperMapAlgoPlot.Point(x.x,x.y);w.isScalePoint=!0,w.tag=0,this.addScalePoint(w);var E=new SuperMapAlgoPlot.Point(a[a.length-1].x,a[a.length-1].y);E.isScalePoint=!0,E.tag=1,this.addScalePoint(E);var C=new SuperMapAlgoPlot.Point(p[0].x,p[0].y);C.isScalePoint=!0,C.tag=2,this.addScalePoint(C),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,h)}}}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint){var o=new SuperMapAlgoPlot.Point(this.scalePoints[0].x,this.scalePoints[0].y),i=new SuperMapAlgoPlot.Point(this.scalePoints[1].x,this.scalePoints[1].y),n=new SuperMapAlgoPlot.Point(this.scalePoints[2].x,this.scalePoints[2].y),l=this.scaleValues[0];this.controlPoints=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(this.controlPoints).pts;var a=SuperMapAlgoPlot.PlottingUtil.polylineDistance(this.controlPoints),s=a*l;if(0==t){var r=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,this.controlPoints[0],this.controlPoints[1]),u=r.projectPoint;if(r.isOnline){var p=SuperMapAlgoPlot.PlottingUtil.distance(u,this.controlPoints[1]);this.scaleValues[0]=p/a}}else if(1==t){var h=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,i,n).projectPoint,c=SuperMapAlgoPlot.PlottingUtil.distance(h,o),y=s*this.scaleValues[1];this.scaleValues[1]=c/s,this.scaleValues[2]=(s*this.scaleValues[2]+c-y)/s}else if(2==t){var g=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,this.controlPoints[1],n).projectPoint,f=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(g,o,this.controlPoints[1]),P=f.projectPoint,d=SuperMapAlgoPlot.PlottingUtil.distance(P,o);!0===f.inOnline?this.scaleValues[4]=-d/s:this.scaleValues[4]=d/s}}this.calculateParts()}}])&&hn(e.prototype,o),i&&hn(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Pn(t){"@babel/helpers - typeof";return(Pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function dn(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Sn(t,e){return(Sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function mn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=bn(t);if(e){var n=bn(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Pn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function bn(t){return(bn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol1003=fn;var Ln=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Sn(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=mn(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=n.call(this,t)).MAX_ARRAY_SIZE=128,e.sv1_DefaultAtLenDivAbLen=.2,e.sv2_DefaultAjWidthDivAtLen=.148,e.sv3_DefaultAeWidthDivAtLen=.4,e.sv4_DefaultAeLenDivAtLen=.312,e.sv_AtScaleParameter=1.5,e.sv_AtLenDivAtWidth=1.35,e.sv_AtWidthDivAwWidth=.5,e.sv_defaultAwLenDivAbLen=.15,0===e.scaleValues.length&&(e.scaleValues.push(e.sv1_DefaultAtLenDivAbLen),e.scaleValues.push(e.sv2_DefaultAjWidthDivAtLen),e.scaleValues.push(e.sv3_DefaultAeWidthDivAtLen),e.scaleValues.push(e.sv4_DefaultAeLenDivAtLen)),e.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1004",e}return e=l,(o=[{key:"calculateParts",value:function(){this.init(),this.applyUse()}},{key:"applyUse",value:function(){var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=2&&t.length<this.minEditPts&&this.calAssistantLine(),!(t.length<this.minEditPts)){var e=this.arrowMeshs(t);SuperMapAlgoPlot.PlottingUtil.clearSamePts(e.shapePts);var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),i=o.length,n=!1;if(void 0!==o[0].z&&(n=!0),n){for(var l=e.leftBodyPts,a=e.rightBodyPts,s=e.arrowHeadPts,r=e.shapePts,u=[],p=0;p<r.length;p++)u.push({x:r[p].x,y:r[p].y,z:0});if(0==r.length)return!1;var h=this.updateScalePoints(t),c=[],y={x:(o[0].x+o[1].x)/2,y:(o[0].y+o[1].y)/2},g={x:(l[l.length-1].x+a[0].x)/2,y:(l[l.length-1].y+a[0].y)/2},f=this.ComputeZValue(g,o[i-1],o[i-2]),P=0,d=0;l[0].x==o[0].x&&l[0].y==o[0].y?(P=o[0].z,d=o[1].z):(P=o[1].z,d=o[0].z),c.push({x:y.x,y:y.y,z:P});for(var S=2;S<i-1;S++)c.push(o[S]);c.push({x:g.x,y:g.y,z:f});var m=[];this.ComputeBeizerZValueByDis(c,l,m),(c=[]).push({x:g.x,y:g.y,z:f});for(var b=i-2;b>=2;b--)c.push(o[b]);c.push({x:y.x,y:y.y,z:d});var L=[];this.ComputeBeizerZValueByDis(c,a,L);for(var M=[],v=0;v<s.length;v++){var A=this.ComputeZValue(s[v],o[i-1],o[i-2]);M.push({x:s[v].x,y:s[v].y,z:A})}if(m.length>0&&L.length>0&&M.length>0){u=(u=(u=(u=[]).concat(m)).concat(M)).concat(L),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,u,{surroundLineFlag:!1});for(var T=[],_=0;_<h.length;_++){var O=this.ComputeZValue(h[_],o[i-1],o[i-2]),x=new SuperMapAlgoPlot.Point(h[_].x,h[_].y);x.z=O,T.push(x)}3!=h.length?this.scalePoints=[]:this.scalePoints=this.scalePoints.concat(T)}}else{if(0==e.shapePts.length)return;if(this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.shapePts,{surroundLineFlag:!1,lineWidthLimit:!0,strokeWidth:0,weight:0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,e.shapePts,{surroundLineFlag:!1}),h=this.updateScalePoints(t),this.scalePoints=[],3!=h.length)h=[];else for(var w=0;w<h.length;w++)h[w].isScalePoint=!0,h[w].tag=w,this.addScalePoint(h[w])}}}},{key:"computeScaleValues",value:function(t,e){if(!0===e.isScalePoint){var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o),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 i=o.length;if(i<=2)return;var n,l,a,s,r=this.operateCtrlPts(o);i=r.length,i--;var u=this.calcScaleValueCount(o.length);if(this.scaleValues.length<u){var p=this.calcDefaultScaleValues(i);n=p[0],l=p[1],a=p[2],s=p[3]}else n=this.scaleValues[0],l=this.scaleValues[1],a=this.scaleValues[2],s=this.scaleValues[3];for(var h=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o),c=[],y=0;y<this.scalePoints.length;y++)c.push(this.scalePoints[y].clone());if(0==c.length)return;c[t]=e.clone();var g,f,P=i-1;g=i<=3?new SuperMapAlgoPlot.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2):r[P-1].clone();var d,S,m,b,L,M,v=new SuperMapAlgoPlot.Point(0,0),A=new SuperMapAlgoPlot.Point(0,0),T=new SuperMapAlgoPlot.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(0,3,g,r[P],r[P+1],A,T),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,r[i],r[i-1],T,v),f=v.clone();var _=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(r[i],f,c[2]);d=_.dLen1,_.dLen2,0==d&&(d=.1),S=d,n=(d/=s+1)/h,1==t?(b=(_=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(r[i],f,c[1])).dLen1,a=(L=_.dLen2)/d,s=(b-d)/d):0==t?(d=(_=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(r[i],f,c[0])).dLen1,l=(m=_.dLen2)/d,(M=SuperMapAlgoPlot.PlottingUtil.distance(r[i],r[i-1]))<2*d&&(d=.5*M),b=(_=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(r[i],f,c[1])).dLen1,a=(L=_.dLen2)/d,(s=(S-d)/d)<.1&&(a=L/(d=S/(1+(s=.1))),l=m/d),n=d/h):2==t&&(n=d/h),m=d*l,(M=SuperMapAlgoPlot.PlottingUtil.distance(r[i],r[i-1]))<2*d&&(m=(d=.5*M)*l,n=d/h),this.scaleValues[0]=n,this.scaleValues[1]=l,this.scaleValues[2]=a,this.scaleValues[3]=s}}},{key:"arrowMeshs",value:function(t){var e=[],o=[],i=[],n=[],l=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),a=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePts(l,this.scaleValues,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_MULTIPOLYBEZIER),s=a.arrowTouLen,r=a.leftBodyPts,u=a.rightBodyPts;if(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(s,0)){var p=[];p.push(r[r.length-1]),p.push(u[u.length-1]);var h=[];h.push(this.scaleValues[2]),h.push(this.scaleValues[3]),h.push(0),h.push(0);for(var c=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePts(l,p,h,s,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITH_EAR),y=0;y<r.length;y++)e.push(r[y]),o.push(r[y]);for(var g=0;g<c.length;g++)e.push(c[g]),n.push(c[g]);for(var f=u.length-1;f>=0;f--)e.push(u[f]),i.push(u[f])}return{shapePts:e,leftBodyPts:o,rightBodyPts:i,arrowHeadPts:n}}},{key:"updateScalePoints",value:function(t){var e=t.length,o=[];if(!(e<3)){var i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t);if(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(i,0)){var n=this.operateCtrlPts(t);e=n.length,e--;for(var l=[],a=0;a<this.scaleValues.length;a++)l.push(this.scaleValues[a]);var s=this.genArrowBodyPts(i,n,l),r=s.ArrowBodyCenterPts,u=this.genAtPts(e,r,l,s.ArrowTouLen),p=this.calc3rdScalePt(e,r,l,s.ArrowTouLen);return o.push(new SuperMapAlgoPlot.Point(s.LeftBodyPtsTemp[e].x,s.LeftBodyPtsTemp[e].y)),o.push(new SuperMapAlgoPlot.Point(u[2].x,u[2].y)),o.push(new SuperMapAlgoPlot.Point(p.x,p.y)),o}}}},{key:"operateCtrlPts",value:function(t){var e=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts,o=SuperMapAlgoPlot.PlottingUtil.clonePoints(e);if(3===o.length){var i=((o[0].x+o[1].x)/2+o[2].x)/2,n=((o[0].y+o[1].y)/2+o[2].y)/2,l=new SuperMapAlgoPlot.Point(i,n),a=o[2];o[2]=l,o.push(a)}return o}},{key:"genArrowBodyPts",value:function(t,e,o){var i,n,l,a=[],s=[],r=[],u=[],p=[],h=[],c=e.length;if(c--,o.length<this.calcScaleValueCount(c)){var y=this.calcDefaultScaleValues(c);n=y[0],l=y[1]}else n=o[0],l=o[1];var g=SuperMapAlgoPlot.PlottingUtil.clonePoints(e),f=(g[0].x+g[1].x)/2,P=(g[0].y+g[1].y)/2,d=Math.abs(f-g[2].x),S=Math.abs(P-g[2].y),m=0;if(d>0&&S>0){var b=1/(f-g[2].x),L=-1/(P-g[2].y),M=1*g[2].y/(P-g[2].y)-1*g[2].x/(f-g[2].x);m=Math.abs(b*g[0].x+L*g[0].y+M)/Math.sqrt(b*b+L*L)}else S<=1e-4?m=Math.abs(P-g[1].y):d<=1e-4&&(m=Math.abs(f-g[1].x));var v=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(m,g[2],new SuperMapAlgoPlot.Point(f,P)),A=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(g[1],g[2],g[0]);A?(a[1]=g[1],s[1]=g[0]):(a[1]=g[0],s[1]=g[1]),g[1]=new SuperMapAlgoPlot.Point((g[0].x+g[1].x)/2,(g[0].y+g[1].y)/2);var T=Math.sqrt((v.pntLeft.x-v.pntRight.x)*(v.pntLeft.x-v.pntRight.x)+(v.pntLeft.y-v.pntRight.y)*(v.pntLeft.y-v.pntRight.y))*this.sv_AtWidthDivAwWidth,_=(i=T*this.sv_AtLenDivAtWidth)*l;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(n,0)||(_=(i=t*n)*l);var O,x,w=SuperMapAlgoPlot.PlottingUtil.distance(g[c],g[c-1]),E=2*i;w<E&&(_=(i=w/2)*l),g.push(g[c].clone()),O=0,x=0;var C=0,I=[];for(C=2;C<=c;C++)O+=SuperMapAlgoPlot.PlottingUtil.distance(g[C],g[C-1]);for(O-=i,C=2;C<=c-1;C++)x+=SuperMapAlgoPlot.PlottingUtil.distance(g[C],g[C-1]),I[C]=_+(T-_)*Math.pow((O-x)/O,this.sv_AtScaleParameter);I[c]=_;var R,D,U=new SuperMapAlgoPlot.Point(0,0),N=new SuperMapAlgoPlot.Point(0,0),B=new SuperMapAlgoPlot.Point(0,0);for(C=2;C<=c-1;C++)SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(0,3,g[C-1],g[C],g[C+1],N,B),C==c-1&&SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,g[c],g[c-1],B,U),R=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(I[C],N,g[C]),(A=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(B,N,R.pntRight))?(a[C]=new SuperMapAlgoPlot.Point(R.pntRight.x,R.pntRight.y),s[C]=new SuperMapAlgoPlot.Point(R.pntLeft.x,R.pntLeft.y)):(a[C]=new SuperMapAlgoPlot.Point(R.pntLeft.x,R.pntLeft.y),s[C]=new SuperMapAlgoPlot.Point(R.pntRight.x,R.pntRight.y));for(Math.sqrt(1*(g[c].x-U.x)*(g[c].x-U.x)+1*(g[c].y-U.y)*(g[c].y-U.y))>0&&(g[c]=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(i,g[c],U)),R=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(_,g[c+1],g[c]),(A=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(g[c],g[c+1],R.pntLeft))?(s[c]=new SuperMapAlgoPlot.Point(R.pntLeft.x,R.pntLeft.y),a[c]=new SuperMapAlgoPlot.Point(R.pntRight.x,R.pntRight.y)):(s[c]=new SuperMapAlgoPlot.Point(R.pntRight.x,R.pntRight.y),a[c]=new SuperMapAlgoPlot.Point(R.pntLeft.x,R.pntLeft.y)),C=2;C<c;C++)SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(3,3,a[C-1],a[C],a[C+1],N,B),r[C]=new SuperMapAlgoPlot.Point(N.x,N.y),u[C]=new SuperMapAlgoPlot.Point(B.x,B.y),SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(3,3,s[C-1],s[C],s[C+1],N,B),p[C]=new SuperMapAlgoPlot.Point(N.x,N.y),h[C]=new SuperMapAlgoPlot.Point(B.x,B.y),2==C&&(SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,a[1],a[2],r[2],U),u[C]=new SuperMapAlgoPlot.Point(U.x,U.y),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,s[1],s[2],p[2],U),h[C]=new SuperMapAlgoPlot.Point(U.x,U.y)),C==c-1&&(E=(w=SuperMapAlgoPlot.PlottingUtil.distance(a[c],a[c-1]))/3,(D=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(E,g[c],g[c+1])).x+=a[c].x-g[c].x,D.y+=a[c].y-g[c].y,E=(w=T-_)*Math.pow(E/O,this.sv_AtScaleParameter),R=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(E,a[c],D),r[c]=new SuperMapAlgoPlot.Point(R.pntLeft.x,R.pntLeft.y),E=(w=SuperMapAlgoPlot.PlottingUtil.distance(s[c],s[c-1]))/3,(D=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(E,g[c],g[c+1])).x+=s[c].x-g[c].x,D.y+=s[c].y-g[c].y,E=(w=T-_)*Math.pow(E/O,this.sv_AtScaleParameter),R=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(E,s[c],D),p[c]=new SuperMapAlgoPlot.Point(R.pntRight.x,R.pntRight.y));return{ArrowBodyCenterPts:SuperMapAlgoPlot.PlottingUtil.clonePoints(g),LeftBodyPtsTemp:a,RightBodyPtsTemp:s,LeftBodyPtsLeftCtrlPts:r,LeftBodyPtsRightCtrlPts:u,RightBodyPtsLeftCtrlPts:p,RightBodyPtsRightCtrlPts:h,ArrowTouLen:i}}},{key:"calcScaleValueCount",value:function(){return 4}},{key:"calcDefaultScaleValues",value:function(){var t=[];return t.push(this.sv1_DefaultAtLenDivAbLen),t.push(this.sv2_DefaultAjWidthDivAtLen),t.push(this.sv3_DefaultAeWidthDivAtLen),t.push(this.sv4_DefaultAeLenDivAtLen),t}},{key:"genAtPts",value:function(t,e,o,i){var n=o[2],l=[],a=i*o[3],s=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(a,e[t],e[t+1]);a=i*n;var r=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(a,e[t+1],s);return l.push(new SuperMapAlgoPlot.Point(r.pntLeft.x,r.pntLeft.y)),l.push(e[t+1]),l.push(new SuperMapAlgoPlot.Point(r.pntRight.x,r.pntRight.y)),l}},{key:"calc3rdScalePt",value:function(t,e,o,i){var n=i*o[3];return SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(n,e[t],e[t+1])}}])&&dn(e.prototype,o),i&&dn(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Mn(t){"@babel/helpers - typeof";return(Mn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function vn(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function An(t,e){return(An=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Tn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=_n(t);if(e){var n=_n(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Mn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function _n(t){return(_n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol1004=Ln;var On=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&An(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=Tn(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&e.scaleValues.push(.1),e.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1005",e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){this.scaleValues[0]=this.getSubSymbolScaleValue();var e=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t)*this.scaleValues[0],o=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,e,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYBEZIER,!1),i=[];if(t.length>2)for(var n=0;n<o.length;n++){if(o[n].x===t[t.length-2].x||o[n].y===t[t.length-2].y){i.push(o[n]),i.push(o[o.length-1]);break}i.push(o[n])}var l=o[o.length-1],a=o[o.length-2],s=SuperMapAlgoPlot.PlottingUtil.distance(l,a),r=[];r.push(o[o.length-1]),r.push(o[o.length-2]),r.push(t[t.length-2]),!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(s,e,1e-7)&&s<=e?this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,i):this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,o);var u=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePtsBySingleLine(r,e,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_POLYLINE);u.length>0&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,u,{surroundLineLimit:!0,lineTypeLimit:!0})}}}])&&vn(e.prototype,o),i&&vn(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function xn(t){"@babel/helpers - typeof";return(xn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function wn(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function En(t,e){return(En=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Cn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=In(t);if(e){var n=In(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===xn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function In(t){return(In=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol1005=On;var Rn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&En(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=Cn(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=n.call(this,t)).QIANJI_RATE1=9,e.QIANJI_RATE2=20,e.QIANJI_RATE4=5,e.QIANJI_RATE3=1/3,e.QIANJI_TAIL_RATE1=8,e.QIANJI_TAIL_RATE2=3,e.QIANJI_TAIL_RATE3=.6,e.SV1_Default=.25,e.SV1_MinValue=0,e.SV1_MaxValue=.5,e.DEFAULT_ARROW_TAIL_POS=.4,e.SCALE_VALUE_COUNT=1,e.MIN_LEN_LeftToRightCenter=1e-7,e.SCALE_AT=1/3,e.SCALE_ATAJ=1/7,e.SCALE_ATAE=1/3,e.SCALE_AW=2/3,e.SCALE_ATAJctrlDefSide=.8,e.SCALE_ATAJctrlSameSide=2/3,e.SCALE_MM_LEFT=.25,e.SCALE_MM_RIGHT=.75,e.BEZIER_K1=1/3,e.QIANJI_OPERATE_RATE1=1,0===e.scaleValues.length&&e.scaleValues.push(e.SV1_Default),e.m_dMaxDis=0,e.m_bIsAnimation=!1,e.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1006",e}return e=l,(o=[{key:"calculateParts",value:function(){this.init(),this.m_scalePoints=[];var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=2&&t.length<this.minEditPts&&this.calAssistantLine(),!(t.length<this.minEditPts)){var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),o=e.length,i=!1;void 0!==e[0].z&&(i=!0);var n=this.arrowMeshs(t);if(i){for(var l=[],a=0;a<o;a++)l.push(e[a]);var s=n.LeftArowLeftBody,r=n.LeftArowHead,u=n.LeftArowRightBody,p=n.RightArowLeftBody,h=n.RightArowHead,c=n.RightArowRightBody;if(0==s.length)return!1;var y=[],g=[],f=[];if(3==l.length)s[0].x==l[0].x&&s[0].y==l[0].y?(g.push(l[0]),g.push(l[2]),f.push(l[1]),f.push(l[2])):(g.push(l[1]),g.push(l[2]),f.push(l[0]),f.push(l[2]));else{if(4!=l.length)return!1;s[0].x==l[0].x&&s[0].y==l[0].y?(g.push(l[0]),f.push(l[1])):(g.push(l[1]),f.push(l[0])),r[1].x==l[2].x&&r[1].y==l[2].y?(g.push(l[2]),f.push(l[3])):(g.push(l[3]),f.push(l[2]))}var P=new SuperMapAlgoPlot.Point;P=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(s[s.length-1],{x:g[0].x,y:g[0].y},{x:g[1].x,y:g[1].y}).projectPoint;var d=this.ComputeZValue(P,g[1],g[0]),S=[];this.ComputeHeight(s,S,g[0].z,d),y=y.concat(S);for(var m=0;m<r.length;m++){P=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(r[m],{x:g[0].x,y:g[0].y},{x:g[1].x,y:g[1].y}).projectPoint;var b=this.ComputeZValue(P,g[1],g[0]);y.push({x:r[m].x,y:r[m].y,z:b})}P=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(u[0],{x:g[0].x,y:g[0].y},{x:g[1].x,y:g[1].y}).projectPoint,this.ComputeZValue(P,g[1],g[0]),P=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(u[u.length-1],{x:g[0].x,y:g[0].y},{x:g[1].x,y:g[1].y}).projectPoint;var L=this.ComputeZValue(P,g[1],g[0]);P=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(p[0],{x:f[0].x,y:f[0].y},{x:f[1].x,y:f[1].y}).projectPoint;var M=(this.ComputeZValue(P,f[1],f[0])+L)/2,v=[];this.ComputeHeight(u,v,d,M),y=y.concat(v),P=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(p[p.length-1],{x:f[0].x,y:f[0].y},{x:f[1].x,y:f[1].y}).projectPoint;var A=this.ComputeZValue(P,f[1],f[0]),T=[];this.ComputeHeight(p,T,M,A),y=y.concat(T);for(var _=0;_<h.length;_++){P=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(h[_],{x:f[0].x,y:f[0].y},{x:f[1].x,y:f[1].y}).projectPoint;var O=this.ComputeZValue(P,f[1],f[0]);y.push({x:h[_].x,y:h[_].y,z:O})}P=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(c[0],{x:f[0].x,y:f[0].y},{x:f[1].x,y:f[1].y}).projectPoint;var x=this.ComputeZValue(P,f[1],f[0]),w=[];this.ComputeHeight(c,w,x,f[0].z),(y=y.concat(w)).length>0&&this.addCell(SuperMapAlgoPlot.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:M});for(var E=0;E<this.m_scalePoints.length;E++)this.m_scalePoints[E].isScalePoint=!0,this.m_scalePoints[E].tag=E,this.addScalePoint(this.m_scalePoints[E]);return!0}var C=n.shapePts;C.length>0&&(this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,C,{surroundLineFlag:!1,lineWidthLimit:!0,strokeWidth:0,weight:0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,C,{surroundLineFlag:!1})),this.scalePoints=[];for(var I=0;I<this.m_scalePoints.length;I++)this.m_scalePoints[I].isScalePoint=!0,this.m_scalePoints[I].tag=I,this.addScalePoint(this.m_scalePoints[I])}}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint){var o,i=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(this.controlPoints).pts,n=SuperMapAlgoPlot.PlottingUtil.operateControlPoints(i),l=new SuperMapAlgoPlot.Point((n[0].x+n[1].x)/2,(n[0].y+n[1].y)/2),a=new SuperMapAlgoPlot.Point((n[2].x+n[3].x)/2,(n[2].y+n[3].y)/2),s=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,l,a);if(s.isOnline){var r=SuperMapAlgoPlot.PlottingUtil.distance(s.projectPoint,l),u=SuperMapAlgoPlot.PlottingUtil.distance(l,a);(o=SuperMapAlgoPlot.PlottingUtil.equalFuzzy(r,0)?this.SV1_MinValue:r/u)>this.SV1_MaxValue&&(o=this.SV1_MaxValue)}else o=SuperMapAlgoPlot.PlottingUtil.distance(s.projectPoint,l)<SuperMapAlgoPlot.PlottingUtil.distance(s.projectPoint,a)?this.SV1_MinValue:this.SV1_MaxValue;this.scaleValues=[],this.scaleValues.push(o)}this.calculateParts()}},{key:"arrowMeshs",value:function(t){var e=new SuperMapAlgoPlot.Path2D;t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts;var o=[];this.m_bIsAnimation&&4==t.length?o=SuperMapAlgoPlot.PlottingUtil.clonePoints(t):(o=SuperMapAlgoPlot.PlottingUtil.operateControlPoints(t),void 0!==t[0].z&&(o[o.length-1].z=o[o.length-2].z));var i=this.scaleValues[0],n=SuperMapAlgoPlot.PlottingUtil.distance(o[0],o[3]),l=SuperMapAlgoPlot.PlottingUtil.distance(o[1],o[2]),a=o[1].clone(),s=.5*(o[0].x+o[3].x),r=.5*(o[0].y+o[3].y),u=new SuperMapAlgoPlot.Point(s,r),p=.5*(o[1].x+o[2].x),h=.5*(o[1].y+o[2].y),c=new SuperMapAlgoPlot.Point(p,h),y=SuperMapAlgoPlot.PlottingUtil.distance(u,c);y<this.MIN_LEN_LeftToRightCenter&&(y=this.MIN_LEN_LeftToRightCenter),u.x=s+n*(s-p)/(y*this.QIANJI_RATE1),u.y=r+n*(r-h)/(y*this.QIANJI_RATE1),c.x=p+l*(p-s)/(y*this.QIANJI_RATE1),c.y=h+l*(h-r)/(y*this.QIANJI_RATE1);var g=new SuperMapAlgoPlot.Point(0,0),f=new SuperMapAlgoPlot.Point(0,0);g.x=s+n*(s-p)/(y*this.QIANJI_RATE2),g.y=r+n*(r-h)/(y*this.QIANJI_RATE2),f.x=p+l*(p-s)/(y*this.QIANJI_RATE2),f.y=h+l*(h-r)/(y*this.QIANJI_RATE2);var P=new SuperMapAlgoPlot.Point((o[0].x+o[1].x)/2,(o[0].y+o[1].y)/2),d=new SuperMapAlgoPlot.Point((o[2].x+o[3].x)/2,(o[2].y+o[3].y)/2),S=o[3].x-(o[3].x-u.x)*this.SCALE_AT,m=o[3].y-(o[3].y-u.y)*this.SCALE_AT,b=o[2].x-(o[2].x-c.x)*this.SCALE_AT,L=o[2].y-(o[2].y-c.y)*this.SCALE_AT,M=new SuperMapAlgoPlot.Point(0,0),v=new SuperMapAlgoPlot.Point(0,0),A=new SuperMapAlgoPlot.Point(0,0),T=new SuperMapAlgoPlot.Point(0,0);v.x=S-(m-o[3].y)*this.SCALE_ATAJ,v.y=m+(S-o[3].x)*this.SCALE_ATAJ,M.x=S+(m-o[3].y)*this.SCALE_ATAJ,M.y=m-(S-o[3].x)*this.SCALE_ATAJ,T.x=b-(L-o[2].y)*this.SCALE_ATAJ,T.y=L+(b-o[2].x)*this.SCALE_ATAJ,A.x=b+(L-o[2].y)*this.SCALE_ATAJ,A.y=L-(b-o[2].x)*this.SCALE_ATAJ;var _=new SuperMapAlgoPlot.Point(0,0),O=new SuperMapAlgoPlot.Point(0,0),x=new SuperMapAlgoPlot.Point(0,0),w=new SuperMapAlgoPlot.Point(0,0);_.x=3*M.x-2*S-(o[3].x-S)*this.SCALE_ATAE,_.y=3*M.y-2*m-(o[3].y-m)*this.SCALE_ATAE,O.x=3*v.x-2*S-(o[3].x-S)*this.SCALE_ATAE,O.y=3*v.y-2*m-(o[3].y-m)*this.SCALE_ATAE,x.x=3*A.x-2*b-(o[2].x-b)*this.SCALE_ATAE,x.y=3*A.y-2*L-(o[2].y-L)*this.SCALE_ATAE,w.x=3*T.x-2*b-(o[2].x-b)*this.SCALE_ATAE,w.y=3*T.y-2*L-(o[2].y-L)*this.SCALE_ATAE,u.x=s+n*(s-p)/(y*this.QIANJI_RATE4),u.y=r+n*(r-h)/(y*this.QIANJI_RATE4),c.x=p+l*(p-s)/(y*this.QIANJI_RATE4),c.y=h+l*(h-r)/(y*this.QIANJI_RATE4);var E=new SuperMapAlgoPlot.Point(0,0);E.x=o[0].x+(u.x-o[0].x)*this.SCALE_AW,E.y=o[0].y+(u.y-o[0].y)*this.SCALE_AW;var C=new SuperMapAlgoPlot.Point(0,0);C.x=o[1].x+(c.x-o[1].x)*this.SCALE_AW,C.y=o[1].y+(c.y-o[1].y)*this.SCALE_AW;var I=new SuperMapAlgoPlot.Point(0,0);I.x=M.x+(u.x-M.x)*this.SCALE_ATAJctrlSameSide,I.y=M.y+(u.y-M.y)*this.SCALE_ATAJctrlSameSide;var R=new SuperMapAlgoPlot.Point(0,0);R.x=T.x+(c.x-T.x)*this.SCALE_ATAJctrlSameSide,R.y=T.y+(c.y-T.y)*this.SCALE_ATAJctrlSameSide;var D=new SuperMapAlgoPlot.Point(0,0);D.x=v.x+(g.x-v.x)*this.SCALE_ATAJctrlDefSide,D.y=v.y+(g.y-v.y)*this.SCALE_ATAJctrlDefSide;var U=new SuperMapAlgoPlot.Point(0,0);U.x=A.x+(f.x-A.x)*this.SCALE_ATAJctrlDefSide,U.y=A.y+(f.y-A.y)*this.SCALE_ATAJctrlDefSide;var N=new SuperMapAlgoPlot.Point(0,0);N.x=P.x+(d.x-P.x)*i,N.y=P.y+(d.y-P.y)*i,this.m_scalePoints.push(new SuperMapAlgoPlot.Point(N.x,N.y));var B=new SuperMapAlgoPlot.Point(0,0),k=new SuperMapAlgoPlot.Point(0,0);B.x=o[0].x+(o[3].x-o[0].x)*i,B.y=o[0].y+(o[3].y-o[0].y)*i,k.x=o[1].x+(o[2].x-o[1].x)*i,k.y=o[1].y+(o[2].y-o[1].y)*i,B.x=B.x+(N.x-B.x)*this.QIANJI_RATE3,B.y=B.y+(N.y-B.y)*this.QIANJI_RATE3,k.x=k.x+(N.x-k.x)*this.QIANJI_RATE3,k.y=k.y+(N.y-k.y)*this.QIANJI_RATE3;var F=[];F.push(o[0].clone()),F.push(E.clone()),F.push(I.clone()),F.push(M.clone()),e.MoveTo(F[0]),e.CurveTo(F[1],F[2],F[3]);var V,j,Y=[],z=[],G=[],W=[],X=[],H=[];for(e.ToSubPathPolygons(H),V=H[0],j=H[0].length,e.LineTo(_),e.LineTo(o[3]),e.LineTo(O),(F=[]).push(v),F.push(D),F.push(B),F.push(N),e.LineTo(F[0]),H=[],e.ToSubPathPolygons(H);j<H[0].length;j++)Y.push(H[0][j]);for(j=H[0].length,e.CurveTo(F[1],F[2],F[3]),H=[],e.ToSubPathPolygons(H);j<H[0].length;j++)z.push(H[0][j]);for(j=H[0].length,(F=[]).push(k),F.push(U),F.push(A),e.CurveTo(F[0],F[1],F[2]),H=[],e.ToSubPathPolygons(H);j<H[0].length;j++)G.push(H[0][j]);for(j=H[0].length,e.LineTo(x),e.LineTo(o[2]),e.LineTo(w),(F=[]).push(T),F.push(R),F.push(C),F.push(a),e.LineTo(F[0]),H=[],e.ToSubPathPolygons(H);j<H[0].length;j++)W.push(H[0][j]);for(j=H[0].length,e.CurveTo(F[1],F[2],F[3]),H=[],e.ToSubPathPolygons(H);j<H[0].length;j++)X.push(H[0][j]);return H=[],e.ToSubPathPolygons(H),{shapePts:SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(H[0]),LeftArowLeftBody:SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(V),LeftArowHead:SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(Y),LeftArowRightBody:SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(z),RightArowLeftBody:SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(G),RightArowHead:SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(W),RightArowRightBody:SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(X)}}}])&&wn(e.prototype,o),i&&wn(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Dn(t){"@babel/helpers - typeof";return(Dn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Un(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Nn(t,e){return(Nn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Bn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=kn(t);if(e){var n=kn(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Dn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function kn(t){return(kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol1006=Rn;var Fn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Nn(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=Bn(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&e.scaleValues.push(.1),e.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1007",e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e=!1;void 0!==t[0].z&&(e=!0),this.scaleValues[0]=this.getSubSymbolScaleValue();var o=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t)*this.scaleValues[0],i=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,o,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYLINE,!0),n=[];n.push(t[t.length-1]),n.push(i[i.length-1]),n.push(t[t.length-2]);var l=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePtsBySingleLine(n,o,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE_SOLID);if(e){for(var a=t.length,s=[],r=[],u=0;u<a;++u)s.push({x:i[u].x,y:i[u].y,z:t[u].z});var p={x:t[a-1].x,y:t[a-1].y,z:t[a-1].z},h={x:t[a-2].x,y:t[a-2].y,z:t[a-2].z},c=this.ComputeZValue(i[a-1],p,h);s[a-1].z=c;for(var y=0;y<l.length;++y){var g=this.ComputeZValue(l[y],p,h);r.push({x:l[y].x,y:l[y].y,z:g})}this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,s);r.length>0&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,r,{surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0,surroundLineLimit:!0,lineTypeLimit:!0})}else{this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,i);l.length>0&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,l,{surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0,lineTypeLimit:!0,surroundLineLimit:!0})}}}}])&&Un(e.prototype,o),i&&Un(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Vn(t){"@babel/helpers - typeof";return(Vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function jn(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Yn(t,e){return(Yn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function zn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Gn(t);if(e){var n=Gn(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Vn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Gn(t){return(Gn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol1007=Fn;var Wn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yn(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=zn(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&e.scaleValues.push(.1),e.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1008",e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){this.scaleValues[0]=this.getSubSymbolScaleValue();var e=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t)*this.scaleValues[0],o=Math.sqrt(e*e/3),i=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,o,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYBEZIER,!0),n=[];n.push(t[t.length-1]),n.push(i[i.length-1]),n.push(t[t.length-2]);var l=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePtsBySingleLine(n,e,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL);i.push(t[t.length-1]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,i);l.length>0&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,l,{surroundLineFlag:!1,fillLimit:!0,fill:!0,lineTypeLimit:!0,surroundLineLimit:!0})}}}])&&jn(e.prototype,o),i&&jn(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Xn(t){"@babel/helpers - typeof";return(Xn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Hn(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Zn(t,e){return(Zn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Jn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=qn(t);if(e){var n=qn(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Xn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function qn(t){return(qn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol1008=Wn;var Kn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zn(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=Jn(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&e.scaleValues.push(.1),e.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1009",e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e=!1;void 0!==t[0].z&&(e=!0),this.scaleValues[0]=this.getSubSymbolScaleValue();var o=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t)*this.scaleValues[0],i=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,0,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYLINE,!1),n=[];n.push(i[i.length-1]),n.push(i[i.length-2]),n.push(t[t.length-2]);var l=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePtsBySingleLine(n,o,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_POLYLINE),a=[];a.push(i[0]),a.push(i[1]);var s=SuperMapAlgoPlot.ArrowToolkit.generateArrowTailShapePtsBySingleLine(a,o,SuperMapAlgoPlot.ArrowToolkit.ArrowTailType.ARROWTAIL_COATTAIL);if(e){for(var r=t.length,u=[],p=[],h=[],c=0;c<r;++c)u.push({x:t[c].x,y:t[c].y,z:t[c].z});var y,g={x:t[r-1].x,y:t[r-1].y,z:t[r-1].z},f={x:t[r-2].x,y:t[r-2].y,z:t[r-2].z};y=this.ComputeZValue(i[r-1],g,f),u.push({x:i[r-1].x,y:i[r-1].y,z:y});for(var P=0;P<l.length;++P)y=this.ComputeZValue(l[P],g,f),p.push({x:l[P].x,y:l[P].y,z:y});for(var d={x:t[1].x,y:t[1].y,z:t[1].z},S={x:t[0].x,y:t[0].y,z:t[0].z},m=0;m<s.length;++m)y=this.ComputeZValue(s[m],d,S),h.push({x:s[m].x,y:s[m].y,z:y});this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,u,{surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,p,{surroundLineLimit:!0,lineTypeLimit:!0}),0!==h.length&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,h)}else{this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,i,{surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,l,{surroundLineLimit:!0,lineTypeLimit:!0}),0!==s.length&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,s)}}}}])&&Hn(e.prototype,o),i&&Hn(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Qn(t){"@babel/helpers - typeof";return(Qn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $n(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function tl(t,e){return(tl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function el(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=ol(t);if(e){var n=ol(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Qn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function ol(t){return(ol=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol1009=Kn;var il=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tl(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=el(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&(e.scaleValues.push(0),e.scaleValues.push(.148),e.scaleValues.push(.4),e.scaleValues.push(.312),e.scaleValues.push(.2)),e.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1010",e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=2&&t.length<this.minEditPts&&this.calAssistantLine(),!(t.length<this.minEditPts)){var e=this.arrowMeshs(t);if(SuperMapAlgoPlot.PlottingUtil.clearSamePts(e.shapePts),0!==e.shapePts.length){this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,e.shapePts,{surroundLineFlag:!1}),this.scalePoints=[];for(var o=0;o<e.m_scalePoints.length;o++)this.addScalePoint(e.m_scalePoints[o])}}}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint){var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);this.scaleValues.length<4&&(this.scaleValues.push(0),this.scaleValues.push(.148),this.scaleValues.push(.4),this.scaleValues.push(.312),this.scaleValues.push(.2));var i,n,l,a,s=o.length;if(s<=2)return;this.scaleValues.length<4?(i=0,n=.148,l=.4,a=.312):(i=this.scaleValues[0],n=this.scaleValues[1],l=this.scaleValues[2],a=this.scaleValues[3]);var r=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o),u=this.operateCtrlPts(o);s=u.length,s--;for(var p=[],h=0;h<this.scalePoints.length;h++)p.push(this.scalePoints[h].clone());if(0===(p=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(p).pts).length)return;if(p[t]=e.clone(),3===t){var c=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePts(o,this.scaleValues,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_MULTIPOLYBEZIER),y=new SuperMapAlgoPlot.Point(.5*(c.leftBodyPts[0].x+c.rightBodyPts[0].x),.5*(c.leftBodyPts[0].y+c.rightBodyPts[0].y)),g=SuperMapAlgoPlot.PlottingUtil.distance(c.leftBodyPts[0],c.rightBodyPts[0]);this.scaleValues[4]=SuperMapAlgoPlot.PlottingUtil.distance(y,e)/g}else{var f,P,d=s-1;f=s<=3?new SuperMapAlgoPlot.Point((u[0].x+u[1].x)/2,(u[0].y+u[1].y)/2):u[d-1].clone();var S,m,b,L,M,v,A=new SuperMapAlgoPlot.Point(0,0),T=new SuperMapAlgoPlot.Point(0,0),_=new SuperMapAlgoPlot.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(0,3,f,u[d],u[d+1],T,_),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,u[s],u[s-1],_,A),P=A.clone();var O=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(u[s],P,p[2]);S=O.dLen1,O.dLen2,0===S&&(S=.1),m=S,i=(S/=a+1)/r,1===t?(L=(O=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(u[s],P,p[1])).dLen1,l=(M=O.dLen2)/S,a=(L-S)/S):0===t?(S=(O=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(u[s],P,p[0])).dLen1,n=(b=O.dLen2)/S,(v=SuperMapAlgoPlot.PlottingUtil.distance(u[s],u[s-1]))<2*S&&(S=.5*v),L=(O=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(u[s],P,p[1])).dLen1,l=(M=O.dLen2)/S,(a=(m-S)/S)<.1&&(l=M/(S=m/(1+(a=.1))),n=b/S),i=S/r):2===t&&(i=S/r),b=S*n,(v=SuperMapAlgoPlot.PlottingUtil.distance(u[s],u[s-1]))<2*S&&(b=(S=.5*v)*n,i=S/r),this.scaleValues[0]=i,this.scaleValues[1]=n,this.scaleValues[2]=l,this.scaleValues[3]=a}}this.calculateParts()}},{key:"arrowMeshs",value:function(t){var e=[],o=[],i=[],n=[],l=[],a=[],s=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),r=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePts(s,this.scaleValues,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_MULTIPOLYBEZIER),u=r.arrowTouLen,p=r.leftBodyPts,h=r.rightBodyPts;if(s=r.OpectrlPoints,!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(u,0)){var c=[];c.push(p[p.length-1]),c.push(h[h.length-1]);var y=[];y.push(this.scaleValues[2]),y.push(this.scaleValues[3]),y.push(0),y.push(0);var g=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePts(s,c,y,u,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITH_EAR),f=[];f.push(p[0]),f.push(h[0]);for(var P,d=SuperMapAlgoPlot.ArrowToolkit.generateArrowTailShapePts(t,f,this.scaleValues[4],SuperMapAlgoPlot.ArrowToolkit.ArrowTailType.ARROWTAIL_COATTAIL_POLYBODY),S=0;S<p.length;S++)e.push(p[S]),o.push(p[S]);for(var m=0;m<g.length;m++)e.push(g[m]),n.push(g[m]);for(var b=h.length-1;b>=0;b--)e.push(h[b]),i.push(h[b]);for(var L=1;L<d.length;L++)e.push(d[L]),l.push(d[L]);var M=s.length;M-=2;var v=u*this.scaleValues[3];P=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(v,s[M],s[M+1]);var A=new SuperMapAlgoPlot.Point(o[o.length-1].x,o[o.length-1].y);A.isScalePoint=!0,A.tag=0,a.push(A),(A=new SuperMapAlgoPlot.Point(n[0].x,n[0].y)).isScalePoint=!0,A.tag=1,a.push(A),(A=new SuperMapAlgoPlot.Point(P.x,P.y)).isScalePoint=!0,A.tag=2,a.push(A),(A=new SuperMapAlgoPlot.Point(d[1].x,d[1].y)).isScalePoint=!0,A.tag=3,a.push(A)}return{shapePts:e,leftBodyPts:o,rightBodyPts:i,arrowHeadPts:n,arrowTailPts:l,m_scalePoints:a}}},{key:"operateCtrlPts",value:function(t){var e=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts,o=SuperMapAlgoPlot.PlottingUtil.clonePoints(e);if(3===o.length){var i=((o[0].x+o[1].x)/2+o[2].x)/2,n=((o[0].y+o[1].y)/2+o[2].y)/2,l=new SuperMapAlgoPlot.Point(i,n),a=o[2];o[2]=l,o.push(a)}return o}}])&&$n(e.prototype,o),i&&$n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function nl(t){"@babel/helpers - typeof";return(nl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ll(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function al(t,e){return(al=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function sl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=rl(t);if(e){var n=rl(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===nl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function rl(t){return(rl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol1010=il;var ul=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&al(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol1004);var e,o,i,n=sl(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=n.call(this,t)).sv1_DefaultAtLenDivAbLen=0,e.sv2_DefaultAjWidthDivAtLen=.148,e.sv3_DefaultAeWidthDivAtLen=.4,e.sv4_DefaultAeLenDivAtLen=.312,e.sv_arrowTailWidth=.05,5!==e.scaleValues.length&&(e.scaleValues=[],e.scaleValues.push(e.sv1_DefaultAtLenDivAbLen),e.scaleValues.push(e.sv2_DefaultAjWidthDivAtLen),e.scaleValues.push(e.sv3_DefaultAeWidthDivAtLen),e.scaleValues.push(e.sv4_DefaultAeLenDivAtLen),e.scaleValues.push(e.sv_arrowTailWidth)),e.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1011",e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<2)){var e=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t);if(0!==e){var o=e*this.scaleValues[4],i=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(o,t[1],t[0]);void 0!==t[0].z&&(i.pntLeft.z=t[0].z,i.pntRight.z=t[0].z),this.controlPoints=[],this.controlPoints.push(i.pntLeft),this.controlPoints.push(i.pntRight);for(var n=1;n<t.length;n++)this.controlPoints.push(t[n].clone());for(var l=[],a=0;a<this.scaleValues.length;a++)l.push(this.scaleValues[a]);this.scaleValues=[];for(var s=0;s<l.length-1;s++)this.scaleValues.push(l[s]);SuperMapAlgoPlot.AlgoSymbol1004.prototype.calculateParts.apply(this,arguments);var r=i.pntRight.clone();r.isScalePoint=!0,r.tag=3,this.addScalePoint(r),this.controlPoints=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),this.scaleValues=[];for(var u=0;u<l.length;u++)this.scaleValues.push(l[u])}}}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint){var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(o.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 i,n=o[0].clone(),l=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o),a=l*this.scaleValues[4],s=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(a,o[1],o[0]);(o=[]).push(s.pntLeft),o.push(s.pntRight);for(var r=1;r<this.controlPoints.length;r++)o.push(this.controlPoints[r].clone());var u,p,h,c,y,g=o.length,f=this.operateCtrlPts(o);g=f.length,g--;var P=this.calcScaleValueCount(o.length);if(P++,this.scaleValues.length<P){var d=this.calcDefaultScaleValues(g);u=d[0],p=d[1],h=d[2],c=d[3],y=this.sv_arrowTailWidth}else u=this.scaleValues[0],p=this.scaleValues[1],h=this.scaleValues[2],c=this.scaleValues[3],y=this.scaleValues[4];i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o);for(var S=[],m=0;m<this.scalePoints.length;m++)S.push(this.scalePoints[m].clone());if(0===S.length)return;S[t]=e.clone();var b,L,M=g-1;b=g<=3?new SuperMapAlgoPlot.Point((f[0].x+f[1].x)/2,(f[0].y+f[1].y)/2):f[M-1].clone();var v,A,T,_,O,x,w=new SuperMapAlgoPlot.Point(0,0),E=new SuperMapAlgoPlot.Point(0,0),C=new SuperMapAlgoPlot.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(0,3,b,f[M],f[M+1],E,C),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,f[g],f[g-1],C,w),L=w.clone();var I=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(f[g],L,S[2]);if(v=I.dLen1,I.dLen2,0===v&&(v=.1),A=v,u=(v/=c+1)/i,1===t)_=(I=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(f[g],L,S[1])).dLen1,h=(O=I.dLen2)/v,c=(_-v)/v;else if(0===t)v=(I=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(f[g],L,S[0])).dLen1,p=(T=I.dLen2)/v,(x=SuperMapAlgoPlot.PlottingUtil.distance(f[g],f[g-1]))<2*v&&(v=.5*x),_=(I=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(f[g],L,S[1])).dLen1,h=(O=I.dLen2)/v,(c=(A-v)/v)<.1&&(h=O/(v=A/(1+(c=.1))),p=T/v),u=v/i;else if(2===t)u=v/i;else{y=SuperMapAlgoPlot.PlottingUtil.distance(e,n)/l}T=v*p,(x=SuperMapAlgoPlot.PlottingUtil.distance(f[g],f[g-1]))<2*v&&(T=(v=.5*x)*p,u=v/i),this.scaleValues[0]=u,this.scaleValues[1]=p,this.scaleValues[2]=h,this.scaleValues[3]=c,this.scaleValues[4]=y}this.calculateParts()}},{key:"arrowMeshs",value:function(t){var e=[],o=[],i=[],n=[],l=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),a=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePts(l,this.scaleValues,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_MULTIPOLYBEZIER),s=a.arrowTouLen,r=a.leftBodyPts,u=a.rightBodyPts;if(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(s,0)){var p=[];p.push(r[r.length-1]),p.push(u[u.length-1]);var h=[];h.push(this.scaleValues[2]),h.push(this.scaleValues[3]),h.push(0),h.push(0);for(var c=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePts(l,p,h,s,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITH_EAR),y=0;y<r.length;y++)e.push(r[y]),o.push(r[y]);for(var g=0;g<c.length;g++)e.push(c[g]),n.push(c[g]);for(var f=u.length-1;f>=0;f--)e.push(u[f]),i.push(u[f])}return{shapePts:e,leftBodyPts:o,rightBodyPts:i,arrowHeadPts:n}}},{key:"updateScalePoints",value:function(t){var e=t.length,o=[];if(!(e<3)){var i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t);if(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(i,0)){var n=this.operateCtrlPts(t);e=n.length,e--;for(var l=[],a=0;a<this.scaleValues.length;a++)l.push(this.scaleValues[a]);var s=this.genArrowBodyPts(i,n,l),r=s.ArrowBodyCenterPts,u=this.genAtPts(e,r,l,s.ArrowTouLen),p=this.calc3rdScalePt(e,r,l,s.ArrowTouLen);return o.push(new SuperMapAlgoPlot.Point(s.LeftBodyPtsTemp[e].x,s.LeftBodyPtsTemp[e].y)),o.push(new SuperMapAlgoPlot.Point(u[2].x,u[2].y)),o.push(new SuperMapAlgoPlot.Point(p.x,p.y)),o}}}},{key:"operateCtrlPts",value:function(t){var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(t);if(3===e.length){var o=((e[0].x+e[1].x)/2+e[2].x)/2,i=((e[0].y+e[1].y)/2+e[2].y)/2,n=new SuperMapAlgoPlot.Point(o,i),l=e[2];e[2]=n,e.push(l)}return e}},{key:"genArrowBodyPts",value:function(t,e,o){var i,n,l,a=[],s=[],r=[],u=[],p=[],h=[],c=e.length;if(c--,o.length<this.calcScaleValueCount(c)){var y=this.calcDefaultScaleValues(c);n=y[0],l=y[1]}else n=o[0],l=o[1];var g=SuperMapAlgoPlot.PlottingUtil.clonePoints(e),f=(g[0].x+g[1].x)/2,P=(g[0].y+g[1].y)/2,d=Math.abs(f-g[2].x),S=Math.abs(P-g[2].y),m=0;if(d>0&&S>0){var b=1/(f-g[2].x),L=-1/(P-g[2].y),M=1*g[2].y/(P-g[2].y)-1*g[2].x/(f-g[2].x);m=Math.abs(b*g[0].x+L*g[0].y+M)/Math.sqrt(b*b+L*L)}else S<=1e-4?m=Math.abs(P-g[1].y):d<=1e-4&&(m=Math.abs(f-g[1].x));var v=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(m,g[2],new SuperMapAlgoPlot.Point(f,P)),A=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(g[1],g[2],g[0]);A?(a[1]=g[1],s[1]=g[0]):(a[1]=g[0],s[1]=g[1]),g[1]=new SuperMapAlgoPlot.Point((g[0].x+g[1].x)/2,(g[0].y+g[1].y)/2);var T=Math.sqrt((v.pntLeft.x-v.pntRight.x)*(v.pntLeft.x-v.pntRight.x)+(v.pntLeft.y-v.pntRight.y)*(v.pntLeft.y-v.pntRight.y))*this.sv_AtWidthDivAwWidth,_=(i=T*this.sv_AtLenDivAtWidth)*l;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(n,0)||(_=(i=t*n)*l);var O,x,w=SuperMapAlgoPlot.PlottingUtil.distance(g[c],g[c-1]),E=2*i;w<E&&(_=(i=w/2)*l),g.push(g[c].clone()),O=0,x=0;var C=0,I=[];for(C=2;C<=c;C++)O+=SuperMapAlgoPlot.PlottingUtil.distance(g[C],g[C-1]);for(O-=i,C=2;C<=c-1;C++)x+=SuperMapAlgoPlot.PlottingUtil.distance(g[C],g[C-1]),I[C]=_+(T-_)*Math.pow((O-x)/O,this.sv_AtScaleParameter);I[c]=_;var R,D,U=new SuperMapAlgoPlot.Point(0,0),N=new SuperMapAlgoPlot.Point(0,0),B=new SuperMapAlgoPlot.Point(0,0);for(C=2;C<=c-1;C++)SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(0,3,g[C-1],g[C],g[C+1],N,B),C===c-1&&SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,g[c],g[c-1],B,U),R=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(I[C],N,g[C]),(A=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(B,N,R.pntRight))?(a[C]=new SuperMapAlgoPlot.Point(R.pntRight.x,R.pntRight.y),s[C]=new SuperMapAlgoPlot.Point(R.pntLeft.x,R.pntLeft.y)):(a[C]=new SuperMapAlgoPlot.Point(R.pntLeft.x,R.pntLeft.y),s[C]=new SuperMapAlgoPlot.Point(R.pntRight.x,R.pntRight.y));for(Math.sqrt(1*(g[c].x-U.x)*(g[c].x-U.x)+1*(g[c].y-U.y)*(g[c].y-U.y))>0&&(g[c]=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(i,g[c],U)),R=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(_,g[c+1],g[c]),(A=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(g[c],g[c+1],R.pntLeft))?(s[c]=new SuperMapAlgoPlot.Point(R.pntLeft.x,R.pntLeft.y),a[c]=new SuperMapAlgoPlot.Point(R.pntRight.x,R.pntRight.y)):(s[c]=new SuperMapAlgoPlot.Point(R.pntRight.x,R.pntRight.y),a[c]=new SuperMapAlgoPlot.Point(R.pntLeft.x,R.pntLeft.y)),C=2;C<c;C++)SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(3,3,a[C-1],a[C],a[C+1],N,B),r[C]=new SuperMapAlgoPlot.Point(N.x,N.y),u[C]=new SuperMapAlgoPlot.Point(B.x,B.y),SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(3,3,s[C-1],s[C],s[C+1],N,B),p[C]=new SuperMapAlgoPlot.Point(N.x,N.y),h[C]=new SuperMapAlgoPlot.Point(B.x,B.y),2===C&&(SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,a[1],a[2],r[2],U),u[C]=new SuperMapAlgoPlot.Point(U.x,U.y),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,s[1],s[2],p[2],U),h[C]=new SuperMapAlgoPlot.Point(U.x,U.y)),C===c-1&&(E=(w=SuperMapAlgoPlot.PlottingUtil.distance(a[c],a[c-1]))/3,(D=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(E,g[c],g[c+1])).x+=a[c].x-g[c].x,D.y+=a[c].y-g[c].y,E=(w=T-_)*Math.pow(E/O,this.sv_AtScaleParameter),R=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(E,a[c],D),r[c]=new SuperMapAlgoPlot.Point(R.pntLeft.x,R.pntLeft.y),E=(w=SuperMapAlgoPlot.PlottingUtil.distance(s[c],s[c-1]))/3,(D=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(E,g[c],g[c+1])).x+=s[c].x-g[c].x,D.y+=s[c].y-g[c].y,E=(w=T-_)*Math.pow(E/O,this.sv_AtScaleParameter),R=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(E,s[c],D),p[c]=new SuperMapAlgoPlot.Point(R.pntRight.x,R.pntRight.y));return{ArrowBodyCenterPts:SuperMapAlgoPlot.PlottingUtil.clonePoints(g),LeftBodyPtsTemp:a,RightBodyPtsTemp:s,LeftBodyPtsLeftCtrlPts:r,LeftBodyPtsRightCtrlPts:u,RightBodyPtsLeftCtrlPts:p,RightBodyPtsRightCtrlPts:h,ArrowTouLen:i}}},{key:"calcScaleValueCount",value:function(){return 4}},{key:"calcDefaultScaleValues",value:function(){var t=[];return t.push(this.sv1_DefaultAtLenDivAbLen),t.push(this.sv2_DefaultAjWidthDivAtLen),t.push(this.sv3_DefaultAeWidthDivAtLen),t.push(this.sv4_DefaultAeLenDivAtLen),t}},{key:"genAtPts",value:function(t,e,o,i){var n=o[2],l=[],a=i*o[3],s=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(a,e[t],e[t+1]);a=i*n;var r=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(a,e[t+1],s);return l.push(new SuperMapAlgoPlot.Point(r.pntLeft.x,r.pntLeft.y)),l.push(e[t+1]),l.push(new SuperMapAlgoPlot.Point(r.pntRight.x,r.pntRight.y)),l}},{key:"calc3rdScalePt",value:function(t,e,o,i){var n=i*o[3];return SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(n,e[t],e[t+1])}}])&&ll(e.prototype,o),i&&ll(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function pl(t){"@babel/helpers - typeof";return(pl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function hl(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function cl(t,e){return(cl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function yl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=gl(t);if(e){var n=gl(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===pl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function gl(t){return(gl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol1011=ul;var fl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cl(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol1005);var e,o,i,n=yl(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=n.call(this,t)).subSymbolDefaultPixelSize=15,e.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1012",e}return e=l,o&&hl(e.prototype,o),i&&hl(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}();function Pl(t){"@babel/helpers - typeof";return(Pl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function dl(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Sl(t,e){return(Sl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ml(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=bl(t);if(e){var n=bl(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Pl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function bl(t){return(bl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol1012=fl;var Ll=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Sl(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol1007);var e,o,i,n=ml(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=n.call(this,t)).subSymbolDefaultPixelSize=15,e.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1013",e}return e=l,o&&dl(e.prototype,o),i&&dl(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}();function Ml(t){"@babel/helpers - typeof";return(Ml="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function vl(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Al(t,e){return(Al=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Tl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=_l(t);if(e){var n=_l(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Ml(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function _l(t){return(_l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol1013=Ll;var Ol=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Al(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol1008);var e,o,i,n=Tl(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=n.call(this,t)).subSymbolDefaultPixelSize=15,e.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1014",e}return e=l,o&&vl(e.prototype,o),i&&vl(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}();function xl(t){"@babel/helpers - typeof";return(xl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function wl(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function El(t,e){return(El=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Cl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Il(t);if(e){var n=Il(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===xl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Il(t){return(Il=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol1014=Ol;var Rl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&El(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol1009);var e,o,i,n=Cl(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=n.call(this,t)).subSymbolDefaultPixelSize=15,e.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1015",e}return e=l,o&&wl(e.prototype,o),i&&wl(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}();function Dl(t){"@babel/helpers - typeof";return(Dl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ul(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Nl(t,e){return(Nl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Bl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=kl(t);if(e){var n=kl(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Dl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function kl(t){return(kl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol1015=Rl;var Fl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Nl(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=Bl(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&e.scaleValues.push(.1),e.arrowHeadType=t.arrowHeadType?t.arrowHeadType:0,e.arrowBodyType=t.arrowBodyType?t.arrowBodyType:0,e.arrowTailType=t.arrowTailType?t.arrowTailType:0,e.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1016",e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e={surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fillStyle:0,lineTypeLimit:!0,surroundLineLimit:!0};this.scaleValues[0]=this.getSubSymbolScaleValue();var o,i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t)*this.scaleValues[0],n=2*Math.sqrt(i*i/3)/1.4,l=Math.sqrt(i*i/3),a=!1;this.arrowBodyType===SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_COATTAIL?o=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,i,this.arrowBodyType,a):this.arrowHeadType===SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE||this.arrowHeadType===SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE_SOLID?(a=!0,o=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,i,this.arrowBodyType,a)):this.arrowHeadType===SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_POLYLINE?o=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,i,this.arrowBodyType,a):this.arrowHeadType===SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL_HOLLOW?(a=!0,o=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,n,this.arrowBodyType,a)):this.arrowHeadType===SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL?(a=!0,o=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,l,this.arrowBodyType,a)):o=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine(t,0,this.arrowBodyType,a);var s=[];this.arrowBodyType===SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_COATTAIL?(s.push(t[t.length-1]),s.push(t[t.length-2]),s.push(t[t.length-2])):a?(s.push(t[t.length-1]),s.push(o[o.length-1]),s.push(t[t.length-2])):(s.push(o[o.length-1]),s.push(o[o.length-2]),s.push(t[t.length-2]));var r,u=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePtsBySingleLine(s,i,this.arrowHeadType);if(o.length>1)if(this.arrowBodyType!==SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_COATTAIL)this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,o);else for(var p=0,h=o.length-1;p<h;p+=2){var c=SuperMapAlgoPlot.PlottingUtil.distance(o[p+1],o[p]),y=180*SuperMapAlgoPlot.PlottingUtil.radian(o[p+1],o[p])/Math.PI,g=SuperMapAlgoPlot.PlottingUtil.circlePoint(o[p+1],.3*c,.3*c,y+30),f=SuperMapAlgoPlot.PlottingUtil.circlePoint(o[p+1],.3*c,.3*c,y+330),P=SuperMapAlgoPlot.PlottingUtil.circlePoint(o[p],.3*c,.3*c,y+30),d=SuperMapAlgoPlot.PlottingUtil.circlePoint(o[p],.3*c,.3*c,y+330),S=[];S.push(g,o[p+1],f,d,o[p],P),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,S,e)}r=this.arrowBodyType===SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYBEZIER?SuperMapAlgoPlot.ArrowToolkit.generateArrowTailShapePtsBySingleLine([o[0],o[1]],i,this.arrowTailType):SuperMapAlgoPlot.ArrowToolkit.generateArrowTailShapePtsBySingleLine([t[0],t[1]],i,this.arrowTailType);var m=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL;this.arrowHeadType!==SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL&&this.arrowHeadType!==SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE_SOLID&&this.arrowHeadType!==SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE&&this.arrowHeadType!==SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL_HOLLOW||(m=SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL),u.length>1&&this.addCell(m,u,e),r.length>1&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,r)}}}])&&Ul(e.prototype,o),i&&Ul(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Vl(t){"@babel/helpers - typeof";return(Vl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function jl(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Yl(t,e){return(Yl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function zl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Gl(t);if(e){var n=Gl(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Vl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Gl(t){return(Gl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol1016=Fl;var Wl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yl(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=zl(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&(e.scaleValues.push(.1),e.scaleValues.push(.2),e.scaleValues.push(0),e.scaleValues.push(.3),e.scaleValues.push(.3)),e.CLASS_NAME="SuperMap.Geometry.AlgoSymbol1017",e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=this.minEditPts){this.scalePoints=[];var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(t);this.isEdit||(this.scaleValues[0]=1.5*this.getSubSymbolScaleValue());var o=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePts(e,this.scaleValues,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_PARALLEL),i=o.arrowTouLen,n=o.leftBodyPts,l=o.rightBodyPts,a=[];a.push(n[n.length-1]),a.push(l[l.length-1]);var s=[];s.push(this.scaleValues[3]),s.push(this.scaleValues[4]),s.push(this.scaleValues[0]),s.push(this.scaleValues[1]);var r=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePts(e,a,s,i,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITHOUT_EAR),u=[];u=(u=u.concat(n)).concat(r);for(var p=l.length-1;p>=0;p--)u.push(l[p]);u.push(u[0]),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,u,{lineWidthLimit:!0,strokeWidth:0,weight:0,surroundLineFlag:!1});for(var h=SuperMapAlgoPlot.PlottingUtil.clonePoints(n),c=[],y=l.length-1;y>=0;y--)c.push(l[y]);c=c.concat(h),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,c);var g=SuperMapAlgoPlot.PlottingUtil.clonePoints(r);g.push(l[l.length-1]),g.splice(0,0,n[n.length-1]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,g,{lineTypeLimit:!0});var f=new SuperMapAlgoPlot.Point((a[0].x+a[1].x)/2,(a[0].y+a[1].y)/2),P=new SuperMapAlgoPlot.Point(f.x,f.y);P.isScalePoint=!0,P.tag=0,this.scalePoints.push(P);var d=new SuperMapAlgoPlot.Point(n[n.length-1].x,n[n.length-1].y);d.isScalePoint=!0,d.tag=1,this.scalePoints.push(d);var S=new SuperMapAlgoPlot.Point(r[0].x,r[0].y);S.isScalePoint=!0,S.tag=2,this.scalePoints.push(S),this.finish()}}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint){var o=new SuperMapAlgoPlot.Point(this.scalePoints[0].x,this.scalePoints[0].y),i=new SuperMapAlgoPlot.Point(this.scalePoints[1].x,this.scalePoints[1].y),n=new SuperMapAlgoPlot.Point(this.scalePoints[2].x,this.scalePoints[2].y),l=this.scaleValues[0],a=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);a=SuperMapAlgoPlot.PlottingUtil.clearSamePts(a);var s=SuperMapAlgoPlot.PlottingUtil.polylineDistance(a),r=s*l;if(0==t){var u=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,a[a.length-2],a[a.length-1]),p=u.projectPoint;if(u.isOnline){var h=SuperMapAlgoPlot.PlottingUtil.distance(p,a[a.length-1]);this.scaleValues[0]=h/s}}else if(1==t){var c=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,i,n).projectPoint,y=SuperMapAlgoPlot.PlottingUtil.distance(c,o);this.scaleValues[1]=y/r}else if(2==t){var g=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,a[1],n).projectPoint,f=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(g,o,a[1]),P=f.projectPoint,d=SuperMapAlgoPlot.PlottingUtil.distance(P,o);!1===f.isOnline&&(this.scaleValues[4]=d/r)}}this.calculateParts()}}])&&jl(e.prototype,o),i&&jl(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Xl(t){"@babel/helpers - typeof";return(Xl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Hl(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Zl(t,e){return(Zl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Jl(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=ql(t);if(e){var n=ql(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Xl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function ql(t){return(ql=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol1017=Wl;var Kl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zl(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=Jl(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=n.call(this,t)).MAX_ARRAY_SIZE=128,e.sv1_DefaultAtLenDivAbLen=0,e.sv2_DefaultAjWidthDivAtLen=.148,e.sv3_DefaultAeWidthDivAtLen=.4,e.sv4_DefaultAeLenDivAtLen=.312,e.sv_AtScaleParameter=1.5,e.sv_AtLenDivAtWidth=1.35,e.sv_AtWidthDivAwWidth=.5,e.sv_defaultAwLenDivAbLen=.15,0===e.scaleValues.length&&(e.scaleValues.push(e.sv1_DefaultAtLenDivAbLen),e.scaleValues.push(e.sv2_DefaultAjWidthDivAtLen),e.scaleValues.push(e.sv3_DefaultAeWidthDivAtLen),e.scaleValues.push(e.sv4_DefaultAeLenDivAtLen)),e.CLASS_NAME="SuperMap.Geometry.AlgoSymbol1018",e}return e=l,(o=[{key:"calculateParts",value:function(){this.init(),this.applyUse()}},{key:"applyUse",value:function(){var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=2&&t.length<this.minEditPts&&this.calAssistantLine(),!(t.length<3)){var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),o=this.arrowMeshs(e),i=SuperMapAlgoPlot.PlottingUtil.clonePoints(o.shapePts);(i=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i)).push(i[0]);var n=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o.leftBodyPts),l=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o.rightBodyPts),a=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o.arrowHeadPts);if(0!=o.shapePts.length){var s=SuperMapAlgoPlot.PlottingUtil.polylineDistance(n),r=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.4*s,n),u=[],p=[],h=[];if(r.bfind)for(var c=0;c<=r.index;c++)u.push(n[c]);var y=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.45*s,n),g=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.8*s,n);if(y.bfind&&g.bfind)for(var f=y.index;f<=g.index;f++)p.push(n[f]);var P=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.85*s,n);if(P.bfind)for(var d=P.index;d<n.length;d++)h.push(n[d]);var S=SuperMapAlgoPlot.PlottingUtil.polylineDistance(l),m=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.15*S,l),b=[],L=[],M=[];if(m.bfind)for(var v=0;v<=m.index;v++)b.push(l[v]);var A=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.2*S,l),T=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.55*S,l);if(A.bfind&&T.bfind)for(var _=A.index;_<=T.index;_++)L.push(l[_]);var O=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.6*S,l);if(O.bfind)for(var x=O.index;x<l.length;x++)M.push(l[x]);var w=SuperMapAlgoPlot.PlottingUtil.clonePoints(a);w.splice(0,0,n[n.length-1]),w.push(l[0]),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,i,{lineWidthLimit:!0,strokeWidth:0,weight:0,surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,u,{surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,p,{surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,h,{surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,b,{surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,L,{surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,M,{surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,w,{surroundLineFlag:!1,lineTypeLimit:!0});var E=this.updateScalePoints(e);if(this.scalePoints=[],3!=E.length)E=[];else for(var C=0;C<E.length;C++)E[C].isScalePoint=!0,E[C].tag=C,this.scalePoints.push(E[C]);this.finish()}else this.finish()}}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint){var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o),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 i=o.length;if(i<=2)return;var n,l,a,s,r=this.operateCtrlPts(o);i=r.length,i--;var u=this.calcScaleValueCount(o.length);if(this.scaleValues.length<u){var p=this.calcDefaultScaleValues(i);n=p[0],l=p[1],a=p[2],s=p[3]}else n=this.scaleValues[0],l=this.scaleValues[1],a=this.scaleValues[2],s=this.scaleValues[3];for(var h=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o),c=[],y=0;y<this.scalePoints.length;y++)c.push(this.scalePoints[y].clone());if(0==c.length)return;c[t]=e.clone();var g,f,P=i-1;g=i<=3?new SuperMapAlgoPlot.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2):r[P-1].clone();var d,S,m,b,L,M,v=new SuperMapAlgoPlot.Point(0,0),A=new SuperMapAlgoPlot.Point(0,0),T=new SuperMapAlgoPlot.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(0,3,g,r[P],r[P+1],A,T),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,r[i],r[i-1],T,v),f=v.clone();var _=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(r[i],f,c[2]);d=_.dLen1,_.dLen2,0==d&&(d=.1),S=d,n=(d/=s+1)/h,1==t?(b=(_=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(r[i],f,c[1])).dLen1,a=(L=_.dLen2)/d,s=(b-d)/d):0==t?(d=(_=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(r[i],f,c[0])).dLen1,l=(m=_.dLen2)/d,(M=SuperMapAlgoPlot.PlottingUtil.distance(r[i],r[i-1]))<2*d&&(d=.5*M),b=(_=SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen(r[i],f,c[1])).dLen1,a=(L=_.dLen2)/d,(s=(S-d)/d)<.1&&(a=L/(d=S/(1+(s=.1))),l=m/d),n=d/h):2==t&&(n=d/h),m=d*l,(M=SuperMapAlgoPlot.PlottingUtil.distance(r[i],r[i-1]))<2*d&&(m=(d=.5*M)*l,n=d/h),this.scaleValues[0]=n,this.scaleValues[1]=l,this.scaleValues[2]=a,this.scaleValues[3]=s}this.calculateParts()}},{key:"arrowMeshs",value:function(t){var e=[],o=[],i=[],n=[],l=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),a=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePts(l,this.scaleValues,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_MULTIPOLYBEZIER),s=a.arrowTouLen,r=a.leftBodyPts,u=a.rightBodyPts;if(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(s,0)){var p=[];p.push(r[r.length-1]),p.push(u[u.length-1]);var h=[];h.push(this.scaleValues[2]),h.push(this.scaleValues[3]),h.push(0),h.push(0);for(var c=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePts(l,p,h,s,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITH_EAR),y=0;y<r.length;y++)e.push(r[y]),o.push(r[y]);for(var g=0;g<c.length;g++)e.push(c[g]),n.push(c[g]);for(var f=u.length-1;f>=0;f--)e.push(u[f]),i.push(u[f])}return{shapePts:e,leftBodyPts:o,rightBodyPts:i,arrowHeadPts:n}}},{key:"updateScalePoints",value:function(t){var e=t.length,o=[];if(!(e<3)){var i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t);if(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(i,0)){var n=this.operateCtrlPts(t);e=n.length,e--;for(var l=[],a=0;a<this.scaleValues.length;a++)l.push(this.scaleValues[a]);var s=this.genArrowBodyPts(i,n,l),r=s.ArrowBodyCenterPts,u=this.genAtPts(e,r,l,s.ArrowTouLen),p=this.calc3rdScalePt(e,r,l,s.ArrowTouLen);return o.push(new SuperMapAlgoPlot.Point(s.LeftBodyPtsTemp[e].x,s.LeftBodyPtsTemp[e].y)),o.push(new SuperMapAlgoPlot.Point(u[2].x,u[2].y)),o.push(new SuperMapAlgoPlot.Point(p.x,p.y)),o}}}},{key:"operateCtrlPts",value:function(t){var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(t);if(3===e.length){var o=((e[0].x+e[1].x)/2+e[2].x)/2,i=((e[0].y+e[1].y)/2+e[2].y)/2,n=new SuperMapAlgoPlot.Point(o,i),l=e[2];e[2]=n,e.push(l)}return e}},{key:"genArrowBodyPts",value:function(t,e,o){var i,n,l,a=[],s=[],r=[],u=[],p=[],h=[],c=e.length;if(c--,o.length<this.calcScaleValueCount(c)){var y=this.calcDefaultScaleValues(c);n=y[0],l=y[1]}else n=o[0],l=o[1];var g=SuperMapAlgoPlot.PlottingUtil.clonePoints(e),f=(g[0].x+g[1].x)/2,P=(g[0].y+g[1].y)/2,d=Math.abs(f-g[2].x),S=Math.abs(P-g[2].y),m=0;if(d>0&&S>0){var b=1/(f-g[2].x),L=-1/(P-g[2].y),M=1*g[2].y/(P-g[2].y)-1*g[2].x/(f-g[2].x);m=Math.abs(b*g[0].x+L*g[0].y+M)/Math.sqrt(b*b+L*L)}else S<=1e-4?m=Math.abs(P-g[1].y):d<=1e-4&&(m=Math.abs(f-g[1].x));var v=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(m,g[2],new SuperMapAlgoPlot.Point(f,P)),A=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(g[1],g[2],g[0]);A?(a[1]=g[1],s[1]=g[0]):(a[1]=g[0],s[1]=g[1]),g[1]=new SuperMapAlgoPlot.Point((g[0].x+g[1].x)/2,(g[0].y+g[1].y)/2);var T=Math.sqrt((v.pntLeft.x-v.pntRight.x)*(v.pntLeft.x-v.pntRight.x)+(v.pntLeft.y-v.pntRight.y)*(v.pntLeft.y-v.pntRight.y))*this.sv_AtWidthDivAwWidth,_=(i=T*this.sv_AtLenDivAtWidth)*l;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(n,0)||(_=(i=t*n)*l);var O,x,w=SuperMapAlgoPlot.PlottingUtil.distance(g[c],g[c-1]),E=2*i;w<E&&(_=(i=w/2)*l),g.push(g[c].clone()),O=0,x=0;var C=0,I=[];for(C=2;C<=c;C++)O+=SuperMapAlgoPlot.PlottingUtil.distance(g[C],g[C-1]);for(O-=i,C=2;C<=c-1;C++)x+=SuperMapAlgoPlot.PlottingUtil.distance(g[C],g[C-1]),I[C]=_+(T-_)*Math.pow((O-x)/O,this.sv_AtScaleParameter);I[c]=_;var R,D,U=new SuperMapAlgoPlot.Point(0,0),N=new SuperMapAlgoPlot.Point(0,0),B=new SuperMapAlgoPlot.Point(0,0);for(C=2;C<=c-1;C++)SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(0,3,g[C-1],g[C],g[C+1],N,B),C==c-1&&SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,g[c],g[c-1],B,U),R=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(I[C],N,g[C]),(A=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(B,N,R.pntRight))?(a[C]=new SuperMapAlgoPlot.Point(R.pntRight.x,R.pntRight.y),s[C]=new SuperMapAlgoPlot.Point(R.pntLeft.x,R.pntLeft.y)):(a[C]=new SuperMapAlgoPlot.Point(R.pntLeft.x,R.pntLeft.y),s[C]=new SuperMapAlgoPlot.Point(R.pntRight.x,R.pntRight.y));for(Math.sqrt(1*(g[c].x-U.x)*(g[c].x-U.x)+1*(g[c].y-U.y)*(g[c].y-U.y))>0&&(g[c]=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(i,g[c],U)),R=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(_,g[c+1],g[c]),(A=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(g[c],g[c+1],R.pntLeft))?(s[c]=new SuperMapAlgoPlot.Point(R.pntLeft.x,R.pntLeft.y),a[c]=new SuperMapAlgoPlot.Point(R.pntRight.x,R.pntRight.y)):(s[c]=new SuperMapAlgoPlot.Point(R.pntRight.x,R.pntRight.y),a[c]=new SuperMapAlgoPlot.Point(R.pntLeft.x,R.pntLeft.y)),C=2;C<c;C++)SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(3,3,a[C-1],a[C],a[C+1],N,B),r[C]=new SuperMapAlgoPlot.Point(N.x,N.y),u[C]=new SuperMapAlgoPlot.Point(B.x,B.y),SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(3,3,s[C-1],s[C],s[C+1],N,B),p[C]=new SuperMapAlgoPlot.Point(N.x,N.y),h[C]=new SuperMapAlgoPlot.Point(B.x,B.y),2==C&&(SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,a[1],a[2],r[2],U),u[C]=new SuperMapAlgoPlot.Point(U.x,U.y),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.5,s[1],s[2],p[2],U),h[C]=new SuperMapAlgoPlot.Point(U.x,U.y)),C==c-1&&(E=(w=SuperMapAlgoPlot.PlottingUtil.distance(a[c],a[c-1]))/3,(D=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(E,g[c],g[c+1])).x+=a[c].x-g[c].x,D.y+=a[c].y-g[c].y,E=(w=T-_)*Math.pow(E/O,this.sv_AtScaleParameter),R=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(E,a[c],D),r[c]=new SuperMapAlgoPlot.Point(R.pntLeft.x,R.pntLeft.y),E=(w=SuperMapAlgoPlot.PlottingUtil.distance(s[c],s[c-1]))/3,(D=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(E,g[c],g[c+1])).x+=s[c].x-g[c].x,D.y+=s[c].y-g[c].y,E=(w=T-_)*Math.pow(E/O,this.sv_AtScaleParameter),R=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(E,s[c],D),p[c]=new SuperMapAlgoPlot.Point(R.pntRight.x,R.pntRight.y));return{ArrowBodyCenterPts:SuperMapAlgoPlot.PlottingUtil.clonePoints(g),LeftBodyPtsTemp:a,RightBodyPtsTemp:s,LeftBodyPtsLeftCtrlPts:r,LeftBodyPtsRightCtrlPts:u,RightBodyPtsLeftCtrlPts:p,RightBodyPtsRightCtrlPts:h,ArrowTouLen:i}}},{key:"calcScaleValueCount",value:function(){return 4}},{key:"calcDefaultScaleValues",value:function(){var t=[];return t.push(this.sv1_DefaultAtLenDivAbLen),t.push(this.sv2_DefaultAjWidthDivAtLen),t.push(this.sv3_DefaultAeWidthDivAtLen),t.push(this.sv4_DefaultAeLenDivAtLen),t}},{key:"genAtPts",value:function(t,e,o,i){var n=o[2],l=[],a=i*o[3],s=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(a,e[t],e[t+1]);a=i*n;var r=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(a,e[t+1],s);return l.push(new SuperMapAlgoPlot.Point(r.pntLeft.x,r.pntLeft.y)),l.push(e[t+1]),l.push(new SuperMapAlgoPlot.Point(r.pntRight.x,r.pntRight.y)),l}},{key:"calc3rdScalePt",value:function(t,e,o,i){var n=i*o[3];return SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(n,e[t],e[t+1])}}])&&Hl(e.prototype,o),i&&Hl(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Ql(t){"@babel/helpers - typeof";return(Ql="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $l(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function ta(t,e){return(ta=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ea(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=oa(t);if(e){var n=oa(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Ql(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function oa(t){return(oa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol1018=Kl;var ia=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ta(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=ea(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&(e.scaleValues.push(.5),e.scaleValues.push(.222222),e.scaleValues.push(.5),e.scaleValues.push(.5),e.scaleValues.push(.5)),e.CLASS_NAME="SuperMap.Geometry.AlgoSymbol1019",e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts,0==this.scaleValues.length&&(this.scaleValues=[],this.scaleValues.push(.5),this.scaleValues.push(.222222),this.scaleValues.push(.5),this.scaleValues.push(.5),this.scaleValues.push(.5));var e=t[0].clone(),o=t[1].clone(),i=SuperMapAlgoPlot.PlottingUtil.distance(e,o),n=this.scaleValues[0],l=new SuperMapAlgoPlot.Point(0,-i*n),a=new SuperMapAlgoPlot.Point(0,i*n),s=this.scaleValues[1],r=this.scaleValues[3],u=new SuperMapAlgoPlot.Point(i*(1-r),-i*s),p=new SuperMapAlgoPlot.Point(i*(1-r),i*s),h=this.scaleValues[2],c=this.scaleValues[4],y=new SuperMapAlgoPlot.Point(i*(1-c),-i*h),g=new SuperMapAlgoPlot.Point(i*(1-c),i*h),f=new SuperMapAlgoPlot.Point(i,0),P=SuperMapAlgoPlot.PlottingUtil.radian(e,o),d=[];d.push(l),d.push(u),d.push(y),d.push(f),d.push(g),d.push(p),d.push(a),d.push(l);for(var S=[],m=0;m<d.length;m++){var b=SuperMapAlgoPlot.PlottingUtil.coordinateTrans(e,d[m],P*SuperMapAlgoPlot.PlottingUtil.RTOD);S.push(b)}for(var L=[],M=S.length-1;M>=0;--M)L.push(S[M]);this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,L,{lineWidthLimit:!0,strokeWidth:0,weight:0,surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[L[2],L[1],L[7],L[6]],{surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[L[6],L[5],L[4],L[3],L[2]],{lineTypeLimit:!0,surroundLineFlag:!1}),this.scalePoints=[];var v=S[0].clone();v.isScalePoint=!0,v.tag=0,this.scalePoints.push(v);var A=S[1].clone();A.isScalePoint=!0,A.tag=1,this.scalePoints.push(A);var T=S[2].clone();T.isScalePoint=!0,T.tag=2,this.scalePoints.push(T),this.scalePoints=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(this.scalePoints),this.finish()}}},{key:"modifyPoint",value:function(t,e){if(e.isScalePoint&&(t>=0||t<3)){var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o),o=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(o).pts;var i=SuperMapAlgoPlot.PlottingUtil.distance(o[0],o[1]),n=o[0].clone(),l=o[1].clone(),a=e.clone();if(0==t){var s=SuperMapAlgoPlot.PlottingUtil.distance(a,n)/i;this.scaleValues[0]=s}else if(1==t){var r=SuperMapAlgoPlot.PlottingUtil.projectPoint(a,n,l),u=SuperMapAlgoPlot.PlottingUtil.distance(r,a)/i;this.scaleValues[1]=u;var p=SuperMapAlgoPlot.PlottingUtil.distance(r,l)/i;this.scaleValues[3]=p}else if(2==t){var h=SuperMapAlgoPlot.PlottingUtil.projectPoint(a,n,l),c=SuperMapAlgoPlot.PlottingUtil.distance(h,a)/i;this.scaleValues[2]=c;var y=SuperMapAlgoPlot.PlottingUtil.distance(h,l)/i;this.scaleValues[4]=y}}this.calculateParts()}}])&&$l(e.prototype,o),i&&$l(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function na(t){"@babel/helpers - typeof";return(na="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function la(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function aa(t,e){return(aa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function sa(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=ra(t);if(e){var n=ra(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===na(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function ra(t){return(ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol1019=ia;var ua=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&aa(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=sa(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&(e.scaleValues.push(.5),e.scaleValues.push(.222222),e.scaleValues.push(.5),e.scaleValues.push(.5),e.scaleValues.push(.5)),e.CLASS_NAME="SuperMap.Geometry.AlgoSymbol1020",e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts,0==this.scaleValues.length&&(this.scaleValues=[],this.scaleValues.push(.5),this.scaleValues.push(.222222),this.scaleValues.push(.5),this.scaleValues.push(.5),this.scaleValues.push(.5));var e=t[0].clone(),o=t[1].clone(),i=SuperMapAlgoPlot.PlottingUtil.distance(e,o),n=this.scaleValues[0],l=new SuperMapAlgoPlot.Point(0,-i*n),a=new SuperMapAlgoPlot.Point(0,i*n),s=this.scaleValues[1],r=this.scaleValues[3],u=new SuperMapAlgoPlot.Point(i*(1-r),-i*s),p=new SuperMapAlgoPlot.Point(i*(1-r),i*s),h=this.scaleValues[2],c=this.scaleValues[4],y=new SuperMapAlgoPlot.Point(i*(1-c),-i*h),g=new SuperMapAlgoPlot.Point(i*(1-c),i*h),f=new SuperMapAlgoPlot.Point(i,0),P=SuperMapAlgoPlot.PlottingUtil.radian(e,o),d=SuperMapAlgoPlot.PlottingUtil.distance(l,u),S=SuperMapAlgoPlot.PlottingUtil.findPointInLine(l,u,.3*d),m=SuperMapAlgoPlot.PlottingUtil.findPointInLine(l,u,.4*d),b=SuperMapAlgoPlot.PlottingUtil.distance(p,a),L=SuperMapAlgoPlot.PlottingUtil.findPointInLine(p,a,.6*b),M=SuperMapAlgoPlot.PlottingUtil.findPointInLine(p,a,.7*b),v=[];v.push(l),v.push(S),v.push(m),v.push(u),v.push(y),v.push(f),v.push(g),v.push(p),v.push(L),v.push(M),v.push(a);for(var A=[],T=0;T<v.length;T++){var _=SuperMapAlgoPlot.PlottingUtil.coordinateTrans(e,v[T],P*SuperMapAlgoPlot.PlottingUtil.RTOD);A.push(_)}for(var O=[],x=A.length-1;x>=0;--x)O.push(A[x]);var w=SuperMapAlgoPlot.PlottingUtil.clonePoints(O);w.push(w[0]),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,w,{lineWidthLimit:!0,strokeWidth:0,weight:0,surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[O[0],O[1]]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[O[2],O[3]]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[O[3],O[4],O[5],O[6],O[7]],{lineTypeLimit:!0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[O[7],O[8]]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[O[9],O[10]]),this.scalePoints=[];var E=A[0].clone();E.isScalePoint=!0,E.tag=0,this.scalePoints.push(E);var C=A[3].clone();C.isScalePoint=!0,C.tag=1,this.scalePoints.push(C);var I=A[4].clone();I.isScalePoint=!0,I.tag=2,this.scalePoints.push(I),this.scalePoints=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(this.scalePoints),this.finish()}}},{key:"modifyPoint",value:function(t,e){if(e.isScalePoint&&(t>=0||t<3)){var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o),o=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(o).pts;var i=SuperMapAlgoPlot.PlottingUtil.distance(o[0],o[1]),n=o[0].clone(),l=o[1].clone(),a=e.clone();if(0==t){var s=SuperMapAlgoPlot.PlottingUtil.distance(a,n)/i;this.scaleValues[0]=s}else if(1==t){var r=SuperMapAlgoPlot.PlottingUtil.projectPoint(a,n,l),u=SuperMapAlgoPlot.PlottingUtil.distance(r,a)/i;this.scaleValues[1]=u;var p=SuperMapAlgoPlot.PlottingUtil.distance(r,l)/i;this.scaleValues[3]=p}else if(2==t){var h=SuperMapAlgoPlot.PlottingUtil.projectPoint(a,n,l),c=SuperMapAlgoPlot.PlottingUtil.distance(h,a)/i;this.scaleValues[2]=c;var y=SuperMapAlgoPlot.PlottingUtil.distance(h,l)/i;this.scaleValues[4]=y}}this.calculateParts()}}])&&la(e.prototype,o),i&&la(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function pa(t){"@babel/helpers - typeof";return(pa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ha(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function ca(t,e){return(ca=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ya(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=ga(t);if(e){var n=ga(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===pa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function ga(t){return(ga=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol1020=ua;var fa=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ca(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=ya(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&e.scaleValues.push(.25),e.CLASS_NAME="SuperMap.Geometry.AlgoSymbol1021",e.QIANJI_RATE1=9,e.QIANJI_RATE2=20,e.QIANJI_RATE4=5,e.QIANJI_RATE3=1/3,e.QIANJI_TAIL_RATE1=8,e.QIANJI_TAIL_RATE2=3,e.QIANJI_TAIL_RATE3=.6,e.SV1_Default=.25,e.SV1_MinValue=0,e.SV1_MaxValue=.5,e.DEFAULT_ARROW_TAIL_POS=.4,e.SCALE_VALUE_COUNT=1,e.MIN_LEN_LeftToRightCenter=1e-7,e.SCALE_AT=1/3,e.SCALE_ATAJ=1/7,e.SCALE_ATAE=1/3,e.SCALE_AW=2/3,e.SCALE_ATAJctrlDefSide=.8,e.SCALE_ATAJctrlSameSide=2/3,e.SCALE_MM_LEFT=.25,e.SCALE_MM_RIGHT=.75,e.BEZIER_K1=1/3,e.QIANJI_OPERATE_RATE1=1,e.m_dMaxDis=0,e.m_bIsAnimation=!1,e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t),this.components.length=0,this.m_scalePoints=[],(t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts).length>=2&&t.length<this.minEditPts&&this.calAssistantLine(),!(t.length<3)){var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),o=this.arrowMeshs(e);o.LeftArowHead.unshift(o.LeftArowLeftBody[0][o.LeftArowLeftBody[0].length-1]),o.RightArowHead.unshift(o.RightArowLeftBody[o.RightArowLeftBody.length-1]),o.LeftArowLeftBody[0].push(o.LeftArowHead[0]),o.RightArowLeftBody.push(o.RightArowHead[0]),o.shapePts.push(o.shapePts[0]);var i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o.LeftArowLeftBody[0]),n=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.4*i,o.LeftArowLeftBody[0]),l=[],a=[];if(n.bfind)for(var s=0;s<=n.index;s++)l.push(o.LeftArowLeftBody[0][s]);var r=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.5*i,o.LeftArowLeftBody[0]);if(r.bfind)for(var u=r.index;u<o.LeftArowLeftBody[0].length-1;u++)a.push(o.LeftArowLeftBody[0][u]);var p=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o.RightArowLeftBody),h=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.4*p,o.RightArowLeftBody),c=[],y=[];if(h.bfind)for(var g=0;g<=h.index;g++)c.push(o.RightArowLeftBody[g]);var f=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.5*p,o.RightArowLeftBody);if(f.bfind)for(var P=f.index;P<o.RightArowLeftBody.length-1;P++)y.push(o.RightArowLeftBody[P]);var d=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o.RightArowRightBody),S=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.4*d,o.RightArowRightBody),m=[],b=[];if(S.bfind)for(var L=0;L<=S.index;L++)m.push(o.RightArowRightBody[L]);var M=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.5*d,o.RightArowRightBody);if(M.bfind)for(var v=M.index;v<o.RightArowRightBody.length-1;v++)b.push(o.RightArowRightBody[v]);o.shapePts.length>0&&(this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,o.shapePts,{strokeWidth:0,weight:0,lineWidthLimit:!0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,l),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,a),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,o.LeftArowHead,{lineTypeLimit:!0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,o.LeftArowRightBody),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,c),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,y),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,o.RightArowHead,{lineTypeLimit:!0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,m),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,b)),this.scalePoints=[];for(var A=0;A<this.m_scalePoints.length;A++)this.m_scalePoints[A].isScalePoint=!0,this.m_scalePoints[A].tag=A,this.scalePoints.push(this.m_scalePoints[A]);this.scalePoints=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(this.scalePoints),this.finish()}}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint){var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o),o=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(o).pts;var i,n=SuperMapAlgoPlot.PlottingUtil.operateControlPoints(o),l=new SuperMapAlgoPlot.Point((n[0].x+n[1].x)/2,(n[0].y+n[1].y)/2),a=new SuperMapAlgoPlot.Point((n[2].x+n[3].x)/2,(n[2].y+n[3].y)/2),s=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,l,a);if(s.isOnline){var r=SuperMapAlgoPlot.PlottingUtil.distance(s.projectPoint,l),u=SuperMapAlgoPlot.PlottingUtil.distance(l,a);(i=SuperMapAlgoPlot.PlottingUtil.equalFuzzy(r,0)?this.SV1_MinValue:r/u)>this.SV1_MaxValue&&(i=this.SV1_MaxValue)}else i=SuperMapAlgoPlot.PlottingUtil.distance(s.projectPoint,l)<SuperMapAlgoPlot.PlottingUtil.distance(s.projectPoint,a)?this.SV1_MinValue:this.SV1_MaxValue;this.scaleValues=[],this.scaleValues.push(i)}this.calculateParts()}},{key:"arrowMeshs",value:function(t){var e=new SuperMapAlgoPlot.Path2D,o=[];o=this.m_bIsAnimation&&4===t.length?SuperMapAlgoPlot.PlottingUtil.clonePoints(t):SuperMapAlgoPlot.PlottingUtil.operateControlPoints(t);var i=this.scaleValues[0],n=SuperMapAlgoPlot.PlottingUtil.distance(o[0],o[3]),l=SuperMapAlgoPlot.PlottingUtil.distance(o[1],o[2]),a=o[1].clone(),s=.5*(o[0].x+o[3].x),r=.5*(o[0].y+o[3].y),u=new SuperMapAlgoPlot.Point(s,r),p=.5*(o[1].x+o[2].x),h=.5*(o[1].y+o[2].y),c=new SuperMapAlgoPlot.Point(p,h),y=SuperMapAlgoPlot.PlottingUtil.distance(u,c);y<this.MIN_LEN_LeftToRightCenter&&(y=this.MIN_LEN_LeftToRightCenter),u.x=s+n*(s-p)/(y*this.QIANJI_RATE1),u.y=r+n*(r-h)/(y*this.QIANJI_RATE1),c.x=p+l*(p-s)/(y*this.QIANJI_RATE1),c.y=h+l*(h-r)/(y*this.QIANJI_RATE1);var g=new SuperMapAlgoPlot.Point(0,0),f=new SuperMapAlgoPlot.Point(0,0);g.x=s+n*(s-p)/(y*this.QIANJI_RATE2),g.y=r+n*(r-h)/(y*this.QIANJI_RATE2),f.x=p+l*(p-s)/(y*this.QIANJI_RATE2),f.y=h+l*(h-r)/(y*this.QIANJI_RATE2);var P=new SuperMapAlgoPlot.Point((o[0].x+o[1].x)/2,(o[0].y+o[1].y)/2),d=new SuperMapAlgoPlot.Point((o[2].x+o[3].x)/2,(o[2].y+o[3].y)/2),S=o[3].x-(o[3].x-u.x)*this.SCALE_AT,m=o[3].y-(o[3].y-u.y)*this.SCALE_AT,b=o[2].x-(o[2].x-c.x)*this.SCALE_AT,L=o[2].y-(o[2].y-c.y)*this.SCALE_AT,M=new SuperMapAlgoPlot.Point(0,0),v=new SuperMapAlgoPlot.Point(0,0),A=new SuperMapAlgoPlot.Point(0,0),T=new SuperMapAlgoPlot.Point(0,0);v.x=S-(m-o[3].y)*this.SCALE_ATAJ,v.y=m+(S-o[3].x)*this.SCALE_ATAJ,M.x=S+(m-o[3].y)*this.SCALE_ATAJ,M.y=m-(S-o[3].x)*this.SCALE_ATAJ,T.x=b-(L-o[2].y)*this.SCALE_ATAJ,T.y=L+(b-o[2].x)*this.SCALE_ATAJ,A.x=b+(L-o[2].y)*this.SCALE_ATAJ,A.y=L-(b-o[2].x)*this.SCALE_ATAJ;var _=new SuperMapAlgoPlot.Point(0,0),O=new SuperMapAlgoPlot.Point(0,0),x=new SuperMapAlgoPlot.Point(0,0),w=new SuperMapAlgoPlot.Point(0,0);_.x=3*M.x-2*S-(o[3].x-S)*this.SCALE_ATAE,_.y=3*M.y-2*m-(o[3].y-m)*this.SCALE_ATAE,O.x=3*v.x-2*S-(o[3].x-S)*this.SCALE_ATAE,O.y=3*v.y-2*m-(o[3].y-m)*this.SCALE_ATAE,x.x=3*A.x-2*b-(o[2].x-b)*this.SCALE_ATAE,x.y=3*A.y-2*L-(o[2].y-L)*this.SCALE_ATAE,w.x=3*T.x-2*b-(o[2].x-b)*this.SCALE_ATAE,w.y=3*T.y-2*L-(o[2].y-L)*this.SCALE_ATAE,u.x=s+n*(s-p)/(y*this.QIANJI_RATE4),u.y=r+n*(r-h)/(y*this.QIANJI_RATE4),c.x=p+l*(p-s)/(y*this.QIANJI_RATE4),c.y=h+l*(h-r)/(y*this.QIANJI_RATE4);var E=new SuperMapAlgoPlot.Point(0,0);E.x=o[0].x+(u.x-o[0].x)*this.SCALE_AW,E.y=o[0].y+(u.y-o[0].y)*this.SCALE_AW;var C=new SuperMapAlgoPlot.Point(0,0);C.x=o[1].x+(c.x-o[1].x)*this.SCALE_AW,C.y=o[1].y+(c.y-o[1].y)*this.SCALE_AW;var I=new SuperMapAlgoPlot.Point(0,0);I.x=M.x+(u.x-M.x)*this.SCALE_ATAJctrlSameSide,I.y=M.y+(u.y-M.y)*this.SCALE_ATAJctrlSameSide;var R=new SuperMapAlgoPlot.Point(0,0);R.x=T.x+(c.x-T.x)*this.SCALE_ATAJctrlSameSide,R.y=T.y+(c.y-T.y)*this.SCALE_ATAJctrlSameSide;var D=new SuperMapAlgoPlot.Point(0,0);D.x=v.x+(g.x-v.x)*this.SCALE_ATAJctrlDefSide,D.y=v.y+(g.y-v.y)*this.SCALE_ATAJctrlDefSide;var U=new SuperMapAlgoPlot.Point(0,0);U.x=A.x+(f.x-A.x)*this.SCALE_ATAJctrlDefSide,U.y=A.y+(f.y-A.y)*this.SCALE_ATAJctrlDefSide;var N=new SuperMapAlgoPlot.Point(0,0);N.x=P.x+(d.x-P.x)*i,N.y=P.y+(d.y-P.y)*i,this.m_scalePoints.push(new SuperMapAlgoPlot.Point(N.x,N.y));var B=new SuperMapAlgoPlot.Point(0,0),k=new SuperMapAlgoPlot.Point(0,0);B.x=o[0].x+(o[3].x-o[0].x)*i,B.y=o[0].y+(o[3].y-o[0].y)*i,k.x=o[1].x+(o[2].x-o[1].x)*i,k.y=o[1].y+(o[2].y-o[1].y)*i,B.x=B.x+(N.x-B.x)*this.QIANJI_RATE3,B.y=B.y+(N.y-B.y)*this.QIANJI_RATE3,k.x=k.x+(N.x-k.x)*this.QIANJI_RATE3,k.y=k.y+(N.y-k.y)*this.QIANJI_RATE3;var F=[];F.push(o[0].clone()),F.push(E.clone()),F.push(I.clone()),F.push(M.clone()),e.MoveTo(F[0]),e.CurveTo(F[1],F[2],F[3]);var V,j=[],Y=[],z=[],G=[],W=[],X=[],H=[];for(e.ToSubPathPolygons(H),j.push(H[0]),V=H[0].length,e.LineTo(_),e.LineTo(o[3]),e.LineTo(O),(F=[]).push(v),F.push(D),F.push(B),F.push(N),e.LineTo(F[0]),H=[],e.ToSubPathPolygons(H);V<H[0].length;V++)Y.push(H[0][V]);for(V=H[0].length,e.CurveTo(F[1],F[2],F[3]),H=[],e.ToSubPathPolygons(H);V<H[0].length;V++)z.push(H[0][V]);for(V=H[0].length,(F=[]).push(k),F.push(U),F.push(A),e.CurveTo(F[0],F[1],F[2]),H=[],e.ToSubPathPolygons(H);V<H[0].length;V++)G.push(H[0][V]);for(V=H[0].length,e.LineTo(x),e.LineTo(o[2]),e.LineTo(w),(F=[]).push(T),F.push(R),F.push(C),F.push(a),e.LineTo(F[0]),H=[],e.ToSubPathPolygons(H);V<H[0].length;V++)W.push(H[0][V]);for(V=H[0].length,e.CurveTo(F[1],F[2],F[3]),H=[],e.ToSubPathPolygons(H);V<H[0].length;V++)X.push(H[0][V]);return H=[],e.ToSubPathPolygons(H),{shapePts:H[0],LeftArowLeftBody:j,LeftArowHead:Y,LeftArowRightBody:z,ArowMidBody:[],RightArowLeftBody:G,RightArowHead:W,RightArowRightBody:X}}}])&&ha(e.prototype,o),i&&ha(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Pa(t){"@babel/helpers - typeof";return(Pa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function da(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Sa(t,e){return(Sa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ma(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=ba(t);if(e){var n=ba(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Pa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function ba(t){return(ba=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol1021=fa;var La=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Sa(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=ma(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&e.scaleValues.push(.05),e.CLASS_NAME="SuperMap.Geometry.AlgoSymbol1022",e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts;var e=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t),o=e*this.scaleValues[0],i=SuperMapAlgoPlot.PlottingUtil.paraLine(t,o,!0),n=SuperMapAlgoPlot.PlottingUtil.paraLine(t,o,!1),l=SuperMapAlgoPlot.PlottingUtil.findPointInLine(i[0],i[1],.6*e),a=SuperMapAlgoPlot.PlottingUtil.findPointInLine(i[0],i[1],.5*e),s=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(.1*e,i[0],a).pntLeft;this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,[s,l,i[1]],{surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0,lineTypeLimit:!0,surroundLineLimit:!0});var r=SuperMapAlgoPlot.PlottingUtil.findPointInLine(n[0],n[1],.4*e),u=SuperMapAlgoPlot.PlottingUtil.findPointInLine(n[0],n[1],.5*e),p=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(.1*e,n[0],u).pntRight;this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,[p,r,n[0]],{surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0,lineTypeLimit:!0,surroundLineLimit:!0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,i),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[n[1],n[0]]),this.leftPoint=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(i),this.addScalePoint(i[0],0),this.finish()}}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint){var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o),o=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(o).pts;var i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o);if(0===t){var n=SuperMapAlgoPlot.PlottingUtil.distance(o[0],e)/i;this.scaleValues[0]=n}}this.calculateParts()}}])&&da(e.prototype,o),i&&da(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Ma(t){"@babel/helpers - typeof";return(Ma="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function va(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Aa(){return(Aa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,o){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Oa(t)););return t}(t,e);if(i){var n=Object.getOwnPropertyDescriptor(i,e);return n.get?n.get.call(arguments.length<3?t:o):n.value}}).apply(this,arguments)}function Ta(t,e){return(Ta=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function _a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Oa(t);if(e){var n=Oa(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Ma(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Oa(t){return(Oa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol1022=La;var xa=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ta(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol1004);var e,o,i,n=_a(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0!==(e=n.call(this,t)).scaleValues.length&&(e.scaleValues=[],e.scaleValues.push(.2),e.scaleValues.push(.2),e.scaleValues.push(.4),e.scaleValues.push(.4),e.scaleValues.push(.1),e.scaleValues.push(.2),e.scaleValues.push(.1),e.scaleValues.push(.2),e.scaleValues.push(1),e.scaleValues.push(1)),e.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol315",e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=2&&t.length<this.minEditPts&&this.calAssistantLine(),!(t.length<this.minEditPts)){for(var e=0,o=0;o<t.length-1;o++)e+=SuperMapAlgoPlot.PlottingUtil.distance(t[o],t[o+1]);SuperMapAlgoPlot.AlgoSymbol1004.prototype.applyUse.apply(this,arguments),this.scaleValues.length<9&&(this.scaleValues=[],this.scaleValues.push(.2),this.scaleValues.push(.2),this.scaleValues.push(.4),this.scaleValues.push(.4),this.scaleValues.push(.1),this.scaleValues.push(.2),this.scaleValues.push(.1),this.scaleValues.push(.2),this.scaleValues.push(1),this.scaleValues.push(1));var i,n=e*this.scaleValues[4],l=e*this.scaleValues[5],a=SuperMapAlgoPlot.PlottingUtil.distance(t[1],t[0]),s=SuperMapAlgoPlot.PlottingUtil.linePnt(t[1],t[0],a+l);i=(this.scaleValues[8],SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(n,t[1],s));var r,u=e*this.scaleValues[6],p=e*this.scaleValues[7],h=SuperMapAlgoPlot.PlottingUtil.linePnt(t[0],t[1],a+p);r=(this.scaleValues[9],SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(u,t[0],h));var c=[];c.push(new SuperMapAlgoPlot.Point(i.pntLeft.x,i.pntLeft.y)),c.push(new SuperMapAlgoPlot.Point(t[0].x,t[0].y)),c.push(new SuperMapAlgoPlot.Point(t[1].x,t[1].y)),c.push(new SuperMapAlgoPlot.Point(r.pntRight.x,r.pntRight.y));var y=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(c);y=SuperMapAlgoPlot.PlottingUtil.clearSamePts(y),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,y),this.addScalePoint(i.pntLeft,3),this.addScalePoint(r.pntRight,4)}}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint){var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o);var i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o),n=SuperMapAlgoPlot.PlottingUtil.projectPoint(e,o[0],o[1]);if(t<=2&&(SuperMapAlgoPlot.AlgoSymbol1004.prototype.modifyPoint.apply(this,arguments),Aa(Oa(l.prototype),"modifyPoint",this).call(this,t,e)),3===t){var a=SuperMapAlgoPlot.PlottingUtil.distance(e,n)/i,s=SuperMapAlgoPlot.PlottingUtil.distance(n,o[0])/i;this.scaleValues[4]=a,this.scaleValues[5]=s,SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(o[0],o[1],e)?this.scaleValues[8]=1:this.scaleValues[8]=0}if(4===t){var r=SuperMapAlgoPlot.PlottingUtil.distance(e,n)/i,u=SuperMapAlgoPlot.PlottingUtil.distance(n,o[1])/i;this.scaleValues[6]=r,this.scaleValues[7]=u,SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(o[0],o[1],e)?this.scaleValues[9]=1:this.scaleValues[9]=0}}this.calculateParts()}}])&&va(e.prototype,o),i&&va(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function wa(t){"@babel/helpers - typeof";return(wa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ea(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Ca(t,e){return(Ca=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ia(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Ra(t);if(e){var n=Ra(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===wa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Ra(t){return(Ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol315=xa;var Da=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ca(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=Ia(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&(e.scaleValues.push(.05),e.scaleValues.push(0),e.scaleValues.push(.185)),e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t);e=SuperMapAlgoPlot.PlottingUtil.clearSamePts(e),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,e);for(var o=0,i=0,n=e.length-1;i<n;i++)o+=SuperMapAlgoPlot.PlottingUtil.distance(e[i],e[i+1]);for(var l=0,a=0,s=t.length-1;a<s;a++)l+=SuperMapAlgoPlot.PlottingUtil.distance(t[a],t[a+1]);this.isEdit||(this.scaleValues[0]=.5*this.getSubSymbolScaleValue());for(var r=this.scaleValues[0]*l,u=this.scaleValues[1],p=this.scaleValues[2]*l,h=.3*p,c=p;c<o;c+=p){var y=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(c,e);if(-1===y.index)return void this.finish();var g=c+h,f=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(g,e);if(-1===f.index)return void this.finish();var P=[],d=[];P.push(y.pts);var S=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(r,e[y.index],y.pts);0===u?P.push(new SuperMapAlgoPlot.Point(S.pntLeft.x,S.pntLeft.y)):P.push(new SuperMapAlgoPlot.Point(S.pntRight.x,S.pntRight.y)),d.push(f.pts);var m=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(r,e[f.index],f.pts);if(0===u?d.push(new SuperMapAlgoPlot.Point(m.pntLeft.x,m.pntLeft.y)):d.push(new SuperMapAlgoPlot.Point(m.pntRight.x,m.pntRight.y)),p===c){this.scalePoints=[];var b=new SuperMapAlgoPlot.Point(P[1].x,P[1].y);b.isScalePoint=!0,b.tag=0,this.scalePoints.push(b),(b=new SuperMapAlgoPlot.Point(P[0].x,P[0].y)).isScalePoint=!0,b.tag=1,this.scalePoints.push(b)}this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,P),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,d)}this.finish()}}},{key:"computeScaleValues",value:function(t,e){if(!0===e.isScalePoint){var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o)).length<this.minEditPts)return;for(var i=0,n=0,l=o.length-1;n<l;n++)i+=SuperMapAlgoPlot.PlottingUtil.distance(o[n],o[n+1]);var a=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(o),s=new SuperMapAlgoPlot.Point(e.x,e.y);if(0===t){var r=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(a,i*this.scaleValues[2]);if(-1===r.index)return;var u=SuperMapAlgoPlot.PlottingUtil.distance(r.pt,s)/i,p=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(a[0],a[1],e);this.scaleValues[1]=p?1:0,this.scaleValues[0]=u}else if(1===t){for(var h=0,c=-1,y=[],g=0,f=a.length-1;g<f;g++){var P=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,a[g],a[g+1]);if(P.isOnline){var d=SuperMapAlgoPlot.PlottingUtil.distance(P.projectPoint,this.controlPoints[1]);0==h?(h=d,c=g,y=e):d<h&&(h=d,c=g,y=e)}}if(-1==c)return;for(var S=0,m=0,b=c-1;m<b;m++)S+=SuperMapAlgoPlot.PlottingUtil.distance(a[m],a[m+1]);var L=(S+=SuperMapAlgoPlot.PlottingUtil.distance(y,a[c]))/i;L>.7&&(L=.7),this.scaleValues[2]=L}}}}])&&Ea(e.prototype,o),i&&Ea(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Ua(t){"@babel/helpers - typeof";return(Ua="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Na(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Ba(t,e){return(Ba=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ka(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Fa(t);if(e){var n=Fa(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Ua(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Fa(t){return(Fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol15200=Da;var Va=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ba(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=ka(l);function l(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),n.call(this,t)}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){if(2==t.length){var e=new SuperMapAlgoPlot.Point(t[1].x,t[1].y);SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[0],Math.PI/3,e),t.push(e)}for(var o=t[0].x,i=t[0].x,n=0;n<t.length;n++)o>t[n].x&&(o=t[n].x),i<t[n].x&&(i=t[n].x);var l=(i-o)/50;this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,t);var a=SuperMapAlgoPlot.PlottingUtil.getPolygonCenterPt(t),s={surroundLineFlag:!1,lineWidthLimit:!0,strokeWidth:1,weight:1,lineTypeLimit:!0,surroundLineLimit:!0},r=10*l;t.push(t[0]);for(var u=!0,p=a.x,h=a.x;u;){u=!1;for(var c,y,g,f,P,d=[],S=new SuperMapAlgoPlot.Point(p,a.y),m=SuperMapAlgoPlot.PlottingUtil.circlePoint(S,10,10,45),b=0;b<t.length-1;b++){var L=SuperMapAlgoPlot.PlottingUtil.intersectLines(S,m,t[b],t[b+1]);L.isIntersectLines&&(y=L.intersectPoint,(g=[]).push(t[b]),g.push(t[b+1]),(c=SuperMapAlgoPlot.PlottingUtil.pointIsOnPolyLines(y,g)).isOnPolyLine&&d.push(y))}if(1<d.length){this.sortPts2D(d);for(var M=0;M<d.length-1;M++)P=new SuperMapAlgoPlot.Point((d[M].x+d[M+1].x)/2,(d[M].y+d[M+1].y)/2),SuperMapAlgoPlot.PlottingUtil.ptIsInPolygon(t,P)&&((f=[]).push(d[M]),f.push(d[M+1]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,f,s,!0))}d.length>0&&(u=!0),d=[];for(var v=new SuperMapAlgoPlot.Point(h,a.y),A=SuperMapAlgoPlot.PlottingUtil.circlePoint(v,5,5,45),T=0;T<t.length-1;T++)(c=SuperMapAlgoPlot.PlottingUtil.intersectLines(v,A,t[T],t[T+1])).isIntersectLines&&(y=c.intersectPoint,(g=[]).push(t[T]),g.push(t[T+1]),(c=SuperMapAlgoPlot.PlottingUtil.pointIsOnPolyLines(y,g)).isOnPolyLine&&d.push(y));if(1<d.length){this.sortPts2D(d);for(var _=0;_<d.length-1;_++)P=new SuperMapAlgoPlot.Point((d[_].x+d[_+1].x)/2,(d[_].y+d[_+1].y)/2),SuperMapAlgoPlot.PlottingUtil.ptIsInPolygon(t,P)&&((f=[]).push(d[_]),f.push(d[_+1]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,f,s,!0))}d.length>0&&(u=!0),p-=r,h+=r}this.finish()}}},{key:"sortPts2D",value:function(t){for(var e=new SuperMapAlgoPlot.Point(0,0),o=0;o<t.length;o++)for(var i=0;i<t.length-1-o;i++)SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[i].x,t[i+1].x)?t[i].y>t[i+1].y&&(e=t[i],t[i]=t[i+1],t[i+1]=e):t[i].x>t[i+1].x&&(e=t[i],t[i]=t[i+1],t[i+1]=e);return t}}])&&Na(e.prototype,o),i&&Na(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function ja(t){"@babel/helpers - typeof";return(ja="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ya(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function za(t,e){return(za=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ga(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Wa(t);if(e){var n=Wa(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===ja(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Wa(t){return(Wa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol25701=Va;var Xa=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&za(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=Ga(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&(e.scaleValues.push(.1),e.scaleValues.push(.1)),e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){for(var e=0,o=0;o<t.length-1;o++)e+=SuperMapAlgoPlot.PlottingUtil.distance(t[o],t[o+1]);var i,n,l=this.scaleValues[0]*e,a=t[0],s=t[1],r=180*SuperMapAlgoPlot.PlottingUtil.radian(a,s)/Math.PI;i=SuperMapAlgoPlot.PlottingUtil.paraLine(t,l,!0),n=SuperMapAlgoPlot.PlottingUtil.paraLine(t,l,!1);var u=.15*e,p=SuperMapAlgoPlot.PlottingUtil.circlePoint(i[0],u,u,r+165),h=SuperMapAlgoPlot.PlottingUtil.circlePoint(n[0],u,u,r-165),c=SuperMapAlgoPlot.PlottingUtil.circlePoint(i[i.length-1],u,u,r+15),y=SuperMapAlgoPlot.PlottingUtil.circlePoint(n[n.length-1],u,u,r-15),g=[];g.push(p),g.push(i[0]),g.push(i[i.length-1]),g.push(c),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,g);var f=[];f.push(h),f.push(n[0]),f.push(n[n.length-1]),f.push(y),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,f);var P=new SuperMapAlgoPlot.Point(i[0].x,i[0].y);P.isScalePoint=!0,P.tag=0,this.scalePoints.push(P),this.finish()}}},{key:"computeScaleValues",value:function(t,e){if(!0===e.isScalePoint){var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o);for(var i=0,n=0;n<o.length-1;n++)i+=SuperMapAlgoPlot.PlottingUtil.distance(o[n],o[n+1]);if(0==t){var l=o[0],a=o[1],s=SuperMapAlgoPlot.PlottingUtil.projectPoint(e,l,a),r=SuperMapAlgoPlot.PlottingUtil.distance(e,s);this.scaleValues[0]=r/i}}}}])&&Ya(e.prototype,o),i&&Ya(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Ha(t){"@babel/helpers - typeof";return(Ha="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Za(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Ja(t,e){return(Ja=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function qa(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Ka(t);if(e){var n=Ka(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Ha(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Ka(t){return(Ka=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol320=Xa;var Qa=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ja(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=qa(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&(e.scaleValues.push(.02),e.scaleValues.push(.1),e.scaleValues.push(0)),e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t),o=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t);o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o);var i=this.getSubSymbolScaleValue();this.isEdit||(this.scaleValues[0]=.5*i);var n=this.scaleValues[0]*e,l=SuperMapAlgoPlot.PlottingUtil.paraLine(o,.5*n,!0),a=SuperMapAlgoPlot.PlottingUtil.paraLine(o,.5*n,!1);l=SuperMapAlgoPlot.PlottingUtil.clearSamePts(l),a=SuperMapAlgoPlot.PlottingUtil.clearSamePts(a),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,l),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,a);for(var s=e*this.scaleValues[1],r=.5*n,u=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o),p=r,h=0;p<u;p+=s,h++){var c=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(l,p);if(-1!==c.index){var y=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(n,l[c.index+1],c.pt),g=[];g.push(y.pntRight),g.push(c.pt),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,g);var f=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(a,p);if(-1!==f.index){var P=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(n,a[f.index+1],f.pt);(g=[]).push(f.pt),g.push(P.pntLeft),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,g),0===h?this.addScalePoint(y.pntRight,0):1===h&&this.addScalePoint(c.pt,1)}}}this.finish()}}},{key:"computeScaleValues",value:function(t,e){if(!0===e.isScalePoint){var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o);for(var i=0,n=0;n<o.length-1;n++)i+=SuperMapAlgoPlot.PlottingUtil.distance(o[n],o[n+1]);var l,a=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(o);if(a=SuperMapAlgoPlot.PlottingUtil.clearSamePts(a),0==t){l=.5*(i*this.scaleValues[0]);var s=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(a,l);if(-1===s.index)return;var r=SuperMapAlgoPlot.PlottingUtil.distance(e,s.pt);this.scaleValues[0]=r/i}else if(1===t){l=.5*(i*this.scaleValues[0]);var u=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(a,l);if(-1===u.index)return;var p=SuperMapAlgoPlot.PlottingUtil.projectPtOnPolyLine(e,a);if(-1==p.index)return;for(var h=SuperMapAlgoPlot.PlottingUtil.distance(u.pt,a[u.index+1]),c=u.index+1;c<p.index;c++)h+=SuperMapAlgoPlot.PlottingUtil.distance(a[c],a[c+1]);h+=SuperMapAlgoPlot.PlottingUtil.distance(a[p.index],p.pt),this.scaleValues[1]=h/i}}}}])&&Za(e.prototype,o),i&&Za(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function $a(t){"@babel/helpers - typeof";return($a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ts(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function es(t,e){return(es=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function os(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=is(t);if(e){var n=is(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===$a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function is(t){return(is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol321=Qa;var ns=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&es(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=os(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&(e.scaleValues.push(.025),e.scaleValues.push(.085)),e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){this.isEdit||(this.scaleValues[0]=.5*this.getSubSymbolScaleValue()),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,t),SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[0].x,t[t.length-1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t[0].y,t[t.length-1].y)||t.push(t[0]);for(var e=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t),o=this.scaleValues[0]*e,i=-1*SuperMapAlgoPlot.PlottingUtil.innerOutlineDir(t),n=this.scaleValues[1]*e,l=.3*n,a=n;a<e;a+=n){var s=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(t,a);if(-1===s.index)return void this.finish();var r=a+l,u=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(t,r);if(-1===u.index)return void this.finish();var p=[],h=[];p.push(s.pt);var c=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(o,t[s.index],s.pt);1===i?p.push(new SuperMapAlgoPlot.Point(c.pntLeft.x,c.pntLeft.y)):p.push(new SuperMapAlgoPlot.Point(c.pntRight.x,c.pntRight.y)),h.push(u.pt);var y=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(o,t[u.index],u.pt);if(1===i?h.push(new SuperMapAlgoPlot.Point(y.pntLeft.x,y.pntLeft.y)):h.push(new SuperMapAlgoPlot.Point(y.pntRight.x,y.pntRight.y)),n===a){this.scalePoints=[];var g=new SuperMapAlgoPlot.Point(p[1].x,p[1].y);g.isScalePoint=!0,g.tag=0,this.scalePoints.push(g),(g=new SuperMapAlgoPlot.Point(p[0].x,p[0].y)).isScalePoint=!0,g.tag=1,this.scalePoints.push(g)}this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,p),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,h)}this.finish()}}},{key:"computeScaleValues",value:function(t,e){if(!0===e.isScalePoint){var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o)).length<this.minEditPts)return;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(o[0].x,o[o.length-1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(o[0].y,o[o.length-1].y)||o.push(o[0]);var i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o),n=new SuperMapAlgoPlot.Point(e.x,e.y);if(0===t){var l=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(o,i*this.scaleValues[1]);if(-1===l.index)return;var a=SuperMapAlgoPlot.PlottingUtil.distance(l.pt,n)/i;this.scaleValues[0]=a}else if(1===t){for(var s=0,r=-1,u=null,p=0,h=o.length-1;p<h;p++){var c=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,o[p],o[p+1]);if(c.isOnline)if(null==u)r=p,u=c.projectPoint,s=SuperMapAlgoPlot.PlottingUtil.distance(e,u);else{var y=SuperMapAlgoPlot.PlottingUtil.distance(e,u);y<s&&(r=p,u=c.projectPoint,s=y)}}if(-1==r)return;for(var g=0,f=0,P=r-1;f<P;f++)g+=SuperMapAlgoPlot.PlottingUtil.distance(o[f],o[f+1]);var d=(g+=SuperMapAlgoPlot.PlottingUtil.distance(o[r],u))/i;d>.3&&(d=.3),this.scaleValues[1]=d}}}}])&&ts(e.prototype,o),i&&ts(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function ls(t){"@babel/helpers - typeof";return(ls="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function as(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function ss(t,e){return(ss=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function rs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=us(t);if(e){var n=us(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===ls(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function us(t){return(us=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol322=ns;var ps=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ss(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=rs(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&e.scaleValues.push(.05),e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t);e=SuperMapAlgoPlot.PlottingUtil.clearSamePts(e);SuperMapAlgoPlot.PlottingUtil.polylineDistance(e);0===this.scaleValues.length&&(this.scaleValues[0]=.05),this.isEdit||(this.scaleValues[0]=2*this.getSubSymbolScaleValue());var o=this.getLinePts(e,this.scaleValues[0]),i=new SuperMapAlgoPlot.Point((o.startPt.x+o.endPt.x)/2,(o.startPt.y+o.endPt.y)/2),n=SuperMapAlgoPlot.PlottingUtil.radian(o.startPt,o.endPt)*SuperMapAlgoPlot.PlottingUtil.RTOD,l=SuperMapAlgoPlot.PlottingUtil.distance(o.startPt,o.endPt);this.addSubSymbols(i,l,n);for(var a=[],s=0;s<=o.startIndex;s++)a.push(e[s]);a.push(o.startPt);for(var r=.1*l,u=SuperMapAlgoPlot.PlottingUtil.makeDottedLine(a,r),p=0;p<u.length;p++)this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,u[p]);if(o.endIndex<=e.length){var h=[];h.push(o.endPt);for(var c=o.endIndex+1;c<=e.length-1;c++)h.push(e[c]);var y=SuperMapAlgoPlot.PlottingUtil.makeDottedLine(h,r);for(p=0;p<y.length;p++)this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,y[p])}this.finish()}}},{key:"addSubSymbols",value:function(t,e,o){var i=.1*e,n=new SuperMapAlgoPlot.Point(-i,i),l=new SuperMapAlgoPlot.Point(i,-i),a=[];a.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,n,o)),a.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,l,o)),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,a);var s=new SuperMapAlgoPlot.Point(-i,-i),r=new SuperMapAlgoPlot.Point(i,i),u=[];u.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,s,o)),u.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,r,o)),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,u);var p=new SuperMapAlgoPlot.Point(-4*i,i),h=new SuperMapAlgoPlot.Point(-2*i,-i),c=[];c.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,p,o)),c.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,h,o)),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,c);var y=new SuperMapAlgoPlot.Point(-4*i,-i),g=new SuperMapAlgoPlot.Point(-2*i,i),f=[];f.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,y,o)),f.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,g,o)),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,f);var P=new SuperMapAlgoPlot.Point(2*i,i),d=new SuperMapAlgoPlot.Point(4*i,-i),S=[];S.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,P,o)),S.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,d,o)),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,S);var m=new SuperMapAlgoPlot.Point(2*i,-i),b=new SuperMapAlgoPlot.Point(4*i,i),L=[];L.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,m,o)),L.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,b,o)),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,L)}},{key:"computeScaleValues",value:function(t,e){}}])&&as(e.prototype,o),i&&as(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function hs(t){"@babel/helpers - typeof";return(hs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function cs(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function ys(t,e){return(ys=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function gs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=fs(t);if(e){var n=fs(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===hs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function fs(t){return(fs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol326=ps;var Ps=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ys(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=gs(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&(e.scaleValues.push(.05),e.scaleValues.push(.02)),e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t);e=SuperMapAlgoPlot.PlottingUtil.clearSamePts(e);var o=SuperMapAlgoPlot.PlottingUtil.polylineDistance(e);if(0===this.scaleValues.length?(this.scaleValues[0]=.05,this.scaleValues[1]=.02):1===this.scaleValues.length&&(this.scaleValues[1]=.5*this.getSubSymbolScaleValue()),!this.isEdit){var i=this.getDefaultSubSymbolSize()/o;(i>.3||i<=0)&&(i=.3),this.scaleValues[0]=i,this.scaleValues[1]=.5*this.getSubSymbolScaleValue()}var n=this.getLinePts(e,this.scaleValues[0]),l=new SuperMapAlgoPlot.Point((n.startPt.x+n.endPt.x)/2,(n.startPt.y+n.endPt.y)/2),a=SuperMapAlgoPlot.PlottingUtil.radian(n.startPt,n.endPt)*SuperMapAlgoPlot.PlottingUtil.RTOD,s=SuperMapAlgoPlot.PlottingUtil.distance(n.startPt,n.endPt);this.addSubSymbols(l,s,a);for(var r=[],u=[],p=0;p<=n.startIndex;p++)r.push(e[p]);if(r.push(n.startPt),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,r),n.endIndex<=e.length){u.push(n.endPt);for(var h=n.endIndex+1;h<=e.length-1;h++)u.push(e[h]);this.addArrow(u,this.scaleValues[1])}var c=o*this.scaleValues[0]*.5,y=SuperMapAlgoPlot.PlottingUtil.circlePoint(l,c,c,a+90);this.addScalePoint(y,0),this.finish()}}},{key:"addSubSymbols",value:function(t,e,o){this.subSymbols.length>0&&this.computeSubSymbol(this.subSymbols[0],t,e,o-180)}},{key:"computeScaleValues",value:function(t,e){if(0===t&&!0===e.isScalePoint){var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o)).length<this.minEditPts)return;var i=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(o);i=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i);var n=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i),l=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(.5*n,i),a=2*SuperMapAlgoPlot.PlottingUtil.distance(l.pts,e)/n;this.scaleValues[0]=a<=.5?a:.5}}}])&&cs(e.prototype,o),i&&cs(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function ds(t){"@babel/helpers - typeof";return(ds="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ss(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function ms(t,e){return(ms=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function bs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Ls(t);if(e){var n=Ls(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===ds(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Ls(t){return(Ls=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol21501=Ps;var Ms=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ms(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol21501);var e,o,i,n=bs(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&(e.scaleValues.push(.05),e.scaleValues.push(.02)),e}return e=l,(o=[{key:"addSubSymbols",value:function(t,e,o){var i=new SuperMapAlgoPlot.Point(-.5*e,.25*e),n=new SuperMapAlgoPlot.Point(-.5*e,-.25*e),l=[];l.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,i,o)),l.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,n,o)),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,l);var a=new SuperMapAlgoPlot.Point(-.5*e,.125*e),s=new SuperMapAlgoPlot.Point(.25*e,.125*e),r=new SuperMapAlgoPlot.Point(.5*e,0),u=new SuperMapAlgoPlot.Point(.25*e,-.125*e),p=new SuperMapAlgoPlot.Point(-.5*e,-.125*e),h=[];h.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,a,o)),h.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,s,o)),h.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,r,o)),h.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,u,o)),h.push(SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,p,o)),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,h)}}])&&Ss(e.prototype,o),i&&Ss(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function vs(t){"@babel/helpers - typeof";return(vs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function As(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Ts(t,e){return(Ts=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function _s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Os(t);if(e){var n=Os(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===vs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Os(t){return(Os=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol327=Ms;var xs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ts(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=_s(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&(e.scaleValues[0]=.05,e.scaleValues[1]=.05),e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){0===this.scaleValues.length?(this.scaleValues[0]=.05,this.scaleValues[1]=.05):1===this.scaleValues.length&&(this.scaleValues[1]=.5*this.getSubSymbolScaleValue()),this.isEdit||(this.scaleValues[0]=this.getSubSymbolScaleValue(),this.scaleValues[1]=.5*this.getSubSymbolScaleValue());var e=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t),o=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t);o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o);var i=e*this.scaleValues[0],n=this.getLinePts(o,this.scaleValues[1],5/14),l=this.getLinePts(o,this.scaleValues[1],9/14),a=new SuperMapAlgoPlot.Point((n.startPt.x+n.endPt.x)/2,(n.startPt.y+n.endPt.y)/2),s=180*SuperMapAlgoPlot.PlottingUtil.radian(n.startPt,n.endPt)/Math.PI;this.createSubSymbol1(a,i,s);var r=new SuperMapAlgoPlot.Point((l.startPt.x+l.endPt.x)/2,(l.startPt.y+l.endPt.y)/2),u=180*SuperMapAlgoPlot.PlottingUtil.radian(l.startPt,l.endPt)/Math.PI;this.createSubSymbol2(r,i,u);var p=SuperMapAlgoPlot.PlottingUtil.circlePoint(r,.5*i,.5*i,u+90);this.addScalePoint(p);for(var h=[],c=[],y=[],g=0;g<=n.startIndex;g++)h.push(o[g]);if(h.push(n.startPt),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,h),n.endIndex<=l.startIndex){c.push(n.endPt);for(var f=n.endIndex+1;f<=l.startIndex;f++)c.push(o[f]);c.push(l.startPt),2===o.length&&SuperMapAlgoPlot.PlottingUtil.distance(o[0],n.endPt)<=SuperMapAlgoPlot.PlottingUtil.distance(o[0],l.startPt)&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,c),o.length>2&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,c)}y.push(l.endPt);for(var P=l.endIndex+1;P<o.length;P++)y.push(o[P]);this.addArrow(y,this.scaleValues[1]),this.finish()}}},{key:"createSubSymbol1",value:function(t,e,o){var i=this.getSubSymbolPts(e);this.createSubSymbol(t,e,o,i)}},{key:"createSubSymbol2",value:function(t,e,o){var i=this.getSubSymbolPts(e);this.createSubSymbol(t,e,o,i)}},{key:"createSubSymbol",value:function(t,e,o,i){for(var n=[],l=0;l<i.length;l++){var a=SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,i[l],o);n.push(a)}this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,n,{lineTypeLimit:!0,surroundLineLimit:!0})}},{key:"getSubSymbolPts",value:function(t){var e=t/4,o=[];return o.push(new SuperMapAlgoPlot.Point(-2*e,0)),o.push(new SuperMapAlgoPlot.Point(0,-e)),o.push(new SuperMapAlgoPlot.Point(2*e,0)),o.push(new SuperMapAlgoPlot.Point(0,e)),o}},{key:"computeScaleValues",value:function(t,e){if(!0===e.isScalePoint){if(0!==t&&1!==t)return;var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o)).length<this.minEditPts)return;var i=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(o);i=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i);var n=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i),l=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(9*n/14,i),a=2*SuperMapAlgoPlot.PlottingUtil.distance(l.pts,e)/n;a<=.3&&(this.scaleValues[0]=a)}}}])&&As(e.prototype,o),i&&As(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function ws(t){"@babel/helpers - typeof";return(ws="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Es(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Cs(t,e){return(Cs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Is(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Rs(t);if(e){var n=Rs(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===ws(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Rs(t){return(Rs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol3010102=xs;var Ds=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Cs(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol3010102);var e,o,i,n=Is(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&(e.scaleValues[0]=.05,e.scaleValues[1]=.05),e}return e=l,(o=[{key:"createSubSymbol1",value:function(t,e,o){for(var i=this.getSubSymbolPts(e),n=0;n<i.length;n++)this.createSubSymbol(t,e,o,i[n])}},{key:"createSubSymbol2",value:function(t,e,o){for(var i=this.getSubSymbolPts(e),n=0;n<i.length;n++)this.createSubSymbol(t,e,o,i[n])}},{key:"createSubSymbol",value:function(t,e,o,i){for(var n=[],l=0;l<i.length;l++){var a=SuperMapAlgoPlot.PlottingUtil.coordinateTrans(t,i[l],o);n.push(a)}var s=SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL;2===i.length&&(s=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL),this.addCell(s,n)}},{key:"getSubSymbolPts",value:function(t){var e=[],o=t/2,i=[];i.push(new SuperMapAlgoPlot.Point(-2*o,0)),i.push(new SuperMapAlgoPlot.Point(0,-o)),i.push(new SuperMapAlgoPlot.Point(2*o,0)),i.push(new SuperMapAlgoPlot.Point(0,o)),e.push(i);var n=[];return n.push(new SuperMapAlgoPlot.Point(-o,o)),n.push(new SuperMapAlgoPlot.Point(o,o)),e.push(n),e}}])&&Es(e.prototype,o),i&&Es(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Us(t){"@babel/helpers - typeof";return(Us="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ns(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Bs(t,e){return(Bs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ks(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Fs(t);if(e){var n=Fs(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Us(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Fs(t){return(Fs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol328=Ds;var Vs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bs(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=ks(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&e.scaleValues.push(.05),e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){var e=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t);this.isEdit||(this.scaleValues[0]=.25*this.getSubSymbolScaleValue());var o=[];o=3>=t.length?SuperMapAlgoPlot.Primitives.getSpatialData(SuperMapAlgoPlot.SymbolType.KIDNEY,t):SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t,!0),o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,o);for(var i=0;i<4;i++){var n=Math.floor(i*o.length/4),l=new SuperMapAlgoPlot.Point(o[n].x,o[n].y),a=new SuperMapAlgoPlot.Point(o[n+1].x,o[n+1].y),s=new SuperMapAlgoPlot.Point((l.x+a.x)/2,(l.y+a.y)/2),r=SuperMapAlgoPlot.PlottingUtil.radian(a,s)*SuperMapAlgoPlot.PlottingUtil.RTOD,u=this.scaleValues[0]*e/2,p=SuperMapAlgoPlot.PlottingUtil.circlePoint(s,u,u,r),h=SuperMapAlgoPlot.PlottingUtil.circlePoint(s,4*u,4*u,r+270),c=SuperMapAlgoPlot.PlottingUtil.circlePoint(s,u,u,r+180);this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[p,h,c])}this.finish()}}}])&&Ns(e.prototype,o),i&&Ns(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function js(t){"@babel/helpers - typeof";return(js="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ys(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function zs(t,e){return(zs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Gs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Ws(t);if(e){var n=Ws(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===js(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Ws(t){return(Ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}SuperMapAlgoPlot.AlgoSymbol330=Vs;var Xs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zs(t,e)}(l,SuperMapAlgoPlot.AlgoSymbol);var e,o,i,n=Gs(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),0===(e=n.call(this,t)).scaleValues.length&&e.scaleValues.push(.05),e}return e=l,(o=[{key:"calculateParts",value:function(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length<this.minEditPts)){SuperMapAlgoPlot.PlottingUtil.polylineDistance(t);this.isEdit||(this.scaleValues[0]=.25*this.getSubSymbolScaleValue());var e=[];e=3>=t.length?SuperMapAlgoPlot.Primitives.getSpatialData(SuperMapAlgoPlot.SymbolType.KIDNEY,t):SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t,!0),e=SuperMapAlgoPlot.PlottingUtil.clearSamePts(e);var o=20*this.getSubSymbolScaleValue(),i=.1*this.getSubSymbolScaleValue(),n=SuperMapAlgoPlot.PlottingUtil.polylineDistance(e);o>.05*n?i=.01*(o=.05*n):o<.005*n&&(o=.005*n);for(var l=SuperMapAlgoPlot.PlottingUtil.makeDottedLine(e,o),a=0;a<l.length;a++)if(this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,l[a]),a>0){var s=l[a-1][l[a-1].length-1],r=l[a][0],u=SuperMapAlgoPlot.PlottingUtil.midPoint(s,r);this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[u,new SuperMapAlgoPlot.Point(u.x+i,u.y)],{lineTypeLimit:!0,surroundLineLimit:!0,fillLimit:!0,fillColorLimit:!1,fill:!0})}this.finish()}}}])&&Ys(e.prototype,o),i&&Ys(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();SuperMapAlgoPlot.AlgoSymbol329=Xs;SuperMapAlgoPlot.BasicAlgoSymbolFactory=SuperMapAlgoPlot.BasicAlgoSymbolFactory||{};SuperMapAlgoPlot.BasicAlgoSymbolFactory.getAlgoSymbol=function(t,e,o){if(0===t)switch(e){case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOL:return new SuperMapAlgoPlot.GeoTooltipBox(o);case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOLM:return new SuperMapAlgoPlot.GeoTooltipBoxM(o);case SuperMapAlgoPlot.SymbolType.PATHTEXT:return new SuperMapAlgoPlot.PathText(o);case SuperMapAlgoPlot.SymbolType.ARROWLINE:return new SuperMapAlgoPlot.ArrowLine(o);case SuperMapAlgoPlot.SymbolType.CURVEEIGHT:return new SuperMapAlgoPlot.CurveEight(o);case SuperMapAlgoPlot.SymbolType.RUNWAY:return new SuperMapAlgoPlot.Runway(o);case SuperMapAlgoPlot.SymbolType.CONCENTRICCIRCLE:return new SuperMapAlgoPlot.ConcentricCircle(o);case SuperMapAlgoPlot.SymbolType.COMBINATIONALCIRCLE:return new SuperMapAlgoPlot.CombinationalCircle(o);case SuperMapAlgoPlot.SymbolType.FREECURVE:return new SuperMapAlgoPlot.FreeCurve(o);case SuperMapAlgoPlot.SymbolType.REGULARPOLYGON:return new SuperMapAlgoPlot.RegularPolygon(o);case SuperMapAlgoPlot.SymbolType.BRACESYMBOL:return new SuperMapAlgoPlot.Brace(o);case SuperMapAlgoPlot.SymbolType.TRAPEZOIDSYMBOL:return new SuperMapAlgoPlot.Trapezoid(o);case SuperMapAlgoPlot.SymbolType.SYMBOLTEXTBOX:return new SuperMapAlgoPlot.SymbolTextBox(o);case SuperMapAlgoPlot.SymbolType.NODECHAIN:return new SuperMapAlgoPlot.NodeChain(o);case SuperMapAlgoPlot.SymbolType.LINERELATION:return new SuperMapAlgoPlot.LineRelation(o);case SuperMapAlgoPlot.SymbolType.LINEMARKING:return new SuperMapAlgoPlot.LineMarking(o);case SuperMapAlgoPlot.SymbolType.POLYGONREGION:return new SuperMapAlgoPlot.PolygonRegion(o);case SuperMapAlgoPlot.SymbolType.WIRE:return new SuperMapAlgoPlot.Wire(o);case SuperMapAlgoPlot.SymbolType.LINEARARROW:return new SuperMapAlgoPlot.LinearArrow(o);case SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL:return new SuperMapAlgoPlot.Polybezier(o);case SuperMapAlgoPlot.SymbolType.NEWPIESYMBOL:return new SuperMapAlgoPlot.NewPie(o);case SuperMapAlgoPlot.SymbolType.NEWARCSYMBOL:return new SuperMapAlgoPlot.NewArc(o);case SuperMapAlgoPlot.SymbolType.NEWCHORDSYMBOL:return new SuperMapAlgoPlot.NewChord(o);default:return new SuperMapAlgoPlot.AlgoSymbol(o)}else if(22===t)switch(e){case 1001:return new SuperMapAlgoPlot.AlgoSymbol1001(o);case 1002:return new SuperMapAlgoPlot.AlgoSymbol1002(o);case 1003:return new SuperMapAlgoPlot.AlgoSymbol1003(o);case 1004:return new SuperMapAlgoPlot.AlgoSymbol1004(o);case 1005:return new SuperMapAlgoPlot.AlgoSymbol1005(o);case 1006:return new SuperMapAlgoPlot.AlgoSymbol1006(o);case 1007:return new SuperMapAlgoPlot.AlgoSymbol1007(o);case 1008:return new SuperMapAlgoPlot.AlgoSymbol1008(o);case 1009:return new SuperMapAlgoPlot.AlgoSymbol1009(o);case 1010:return new SuperMapAlgoPlot.AlgoSymbol1010(o);case 1011:return new SuperMapAlgoPlot.AlgoSymbol1011(o);case 1012:return new SuperMapAlgoPlot.AlgoSymbol1012(o);case 1013:return new SuperMapAlgoPlot.AlgoSymbol1013(o);case 1014:return new SuperMapAlgoPlot.AlgoSymbol1014(o);case 1015:return new SuperMapAlgoPlot.AlgoSymbol1015(o);case 1016:return new SuperMapAlgoPlot.AlgoSymbol1016(o);case 1017:return new SuperMapAlgoPlot.AlgoSymbol1017(o);case 1018:return new SuperMapAlgoPlot.AlgoSymbol1018(o);case 1019:return new SuperMapAlgoPlot.AlgoSymbol1019(o);case 1020:return new SuperMapAlgoPlot.AlgoSymbol1020(o);case 1021:return new SuperMapAlgoPlot.AlgoSymbol1021(o);case 1022:return new SuperMapAlgoPlot.AlgoSymbol1022(o);default:return null}else{if(421!==t)return null;switch(e){case 311:return new SuperMapAlgoPlot.AlgoSymbol1004(o);case 315:return new SuperMapAlgoPlot.AlgoSymbol315(o);case 317:return new SuperMapAlgoPlot.AlgoSymbol1006(o);case 318:return new SuperMapAlgoPlot.AlgoSymbol1002(o);case 319:return new SuperMapAlgoPlot.AlgoSymbol15200(o);case 320:return new SuperMapAlgoPlot.AlgoSymbol320(o);case 321:return new SuperMapAlgoPlot.AlgoSymbol321(o);case 322:return new SuperMapAlgoPlot.AlgoSymbol322(o);case 323:return new SuperMapAlgoPlot.AlgoSymbol25701(o);case 324:return new SuperMapAlgoPlot.AlgoSymbol3010106(o);case 325:return new SuperMapAlgoPlot.AlgoSymbol15200(o);case 326:return new SuperMapAlgoPlot.AlgoSymbol326(o);case 327:return new SuperMapAlgoPlot.AlgoSymbol327(o);case 328:return new SuperMapAlgoPlot.AlgoSymbol328(o);case 329:return new SuperMapAlgoPlot.AlgoSymbol329(o);case 330:return new SuperMapAlgoPlot.AlgoSymbol330(o);case 331:return new SuperMapAlgoPlot.AlgoSymbol29101(o);default:return null}}},SuperMapAlgoPlot.BasicAlgoSymbolFactory.getSymbolWayType=function(t,e){if(0===t)switch(e){case SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:case SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;case SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL:case SuperMapAlgoPlot.SymbolType.POLYBEZIERCLOSESYMBOL:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}else if(22===t)switch(e){case 1005:case 1008:case 1012:case 1014:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;case 1007:case 1009:case 1013:case 1015:case 1017:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}},SuperMapAlgoPlot.BasicAlgoSymbolFactory.isAccessServer=function(t,e){if(0===t||22===t)return!1;if(421!==t)return!0;switch(e){case 311:case 317:case 318:case 315:case 319:case 320:case 321:case 322:case 323:case 324:case 325:case 326:case 327:case 328:case 329:case 330:case 331:return!1;default:return!0}},SuperMapAlgoPlot.BasicAlgoSymbolFactory.getDefaultSubSymbols=function(){return[]},SuperMapAlgoPlot.BasicAlgoSymbolFactory.getMinEditPts=function(t,e){if(0===t)switch(e){case SuperMapAlgoPlot.SymbolType.TEXTSYMBOL:case SuperMapAlgoPlot.SymbolType.COMBINATIONALCIRCLE:return 1;case SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL:case SuperMapAlgoPlot.SymbolType.RECTANGLESYMBOL:case SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:case SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL:case SuperMapAlgoPlot.SymbolType.KIDNEY:case SuperMapAlgoPlot.SymbolType.ARROWLINE:case SuperMapAlgoPlot.SymbolType.BRACESYMBOL:case SuperMapAlgoPlot.SymbolType.CURVEEIGHT:case SuperMapAlgoPlot.SymbolType.FREECURVE:case SuperMapAlgoPlot.SymbolType.LINEMARKING:case SuperMapAlgoPlot.SymbolType.LINERELATION:case SuperMapAlgoPlot.SymbolType.NODECHAIN:case SuperMapAlgoPlot.SymbolType.PATHTEXT:case SuperMapAlgoPlot.SymbolType.REGULARPOLYGON:case SuperMapAlgoPlot.SymbolType.RUNWAY:case SuperMapAlgoPlot.SymbolType.SYMBOLTEXTBOX:case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOLM:case SuperMapAlgoPlot.SymbolType.CONCENTRICCIRCLE:case SuperMapAlgoPlot.SymbolType.WIRE:case SuperMapAlgoPlot.SymbolType.LINEARARROW:return 2;case SuperMapAlgoPlot.SymbolType.ARCSYMBOL:case SuperMapAlgoPlot.SymbolType.CHORDSYMBOL:case SuperMapAlgoPlot.SymbolType.PIESYMBOL:case SuperMapAlgoPlot.SymbolType.ELLIPSESYMBOL:case SuperMapAlgoPlot.SymbolType.PARALLELOGRAM:case SuperMapAlgoPlot.SymbolType.PARALLELLINE:case SuperMapAlgoPlot.SymbolType.POLYBEZIERCLOSESYMBOL:case SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL:case SuperMapAlgoPlot.SymbolType.POLYGONREGION:case SuperMapAlgoPlot.SymbolType.TRAPEZOIDSYMBOL:case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOL:case SuperMapAlgoPlot.SymbolType.NEWARCSYMBOL:case SuperMapAlgoPlot.SymbolType.NEWPIESYMBOL:case SuperMapAlgoPlot.SymbolType.NEWCHORDSYMBOL:return 3}else if(22===t)switch(e){case 1001:case 1003:case 1005:case 1007:case 1008:case 1009:case 1011:case 1012:case 1013:case 1014:case 1015:case 1016:case 1017:case 1019:case 1020:case 1022:return 2;case 1002:case 1004:case 1006:case 1010:case 1018:case 1021:return 3}else if(421===t)switch(e){case 319:case 320:case 321:case 324:case 325:case 326:case 327:case 328:case 329:case 330:case 331:return 2;case 311:case 315:case 317:case 318:case 322:case 323:return 3}},SuperMapAlgoPlot.BasicAlgoSymbolFactory.getMaxEditPts=function(t,e){if(0===t)switch(e){case SuperMapAlgoPlot.SymbolType.TEXTSYMBOL:return 1;case SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL:case SuperMapAlgoPlot.SymbolType.RECTANGLESYMBOL:case SuperMapAlgoPlot.SymbolType.BRACESYMBOL:case SuperMapAlgoPlot.SymbolType.LINEMARKING:case SuperMapAlgoPlot.SymbolType.LINERELATION:case SuperMapAlgoPlot.SymbolType.RUNWAY:case SuperMapAlgoPlot.SymbolType.SYMBOLTEXTBOX:case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOLM:case SuperMapAlgoPlot.SymbolType.LINEARARROW:return 2;case SuperMapAlgoPlot.SymbolType.ARCSYMBOL:case SuperMapAlgoPlot.SymbolType.CHORDSYMBOL:case SuperMapAlgoPlot.SymbolType.PIESYMBOL:case SuperMapAlgoPlot.SymbolType.ELLIPSESYMBOL:case SuperMapAlgoPlot.SymbolType.PARALLELOGRAM:case SuperMapAlgoPlot.SymbolType.KIDNEY:case SuperMapAlgoPlot.SymbolType.CURVEEIGHT:case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOL:case SuperMapAlgoPlot.SymbolType.TRAPEZOIDSYMBOL:case SuperMapAlgoPlot.SymbolType.NEWARCSYMBOL:case SuperMapAlgoPlot.SymbolType.NEWPIESYMBOL:case SuperMapAlgoPlot.SymbolType.NEWCHORDSYMBOL:return 3;case SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:case SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL:case SuperMapAlgoPlot.SymbolType.PARALLELLINE:case SuperMapAlgoPlot.SymbolType.POLYBEZIERCLOSESYMBOL:case SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL:case SuperMapAlgoPlot.SymbolType.ARROWLINE:case SuperMapAlgoPlot.SymbolType.COMBINATIONALCIRCLE:case SuperMapAlgoPlot.SymbolType.FREECURVE:case SuperMapAlgoPlot.SymbolType.NODECHAIN:case SuperMapAlgoPlot.SymbolType.PATHTEXT:case SuperMapAlgoPlot.SymbolType.POLYGONREGION:case SuperMapAlgoPlot.SymbolType.REGULARPOLYGON:case SuperMapAlgoPlot.SymbolType.WIRE:case SuperMapAlgoPlot.SymbolType.CONCENTRICCIRCLE:return 9999}else if(22===t)switch(e){case 1003:case 1019:case 1020:case 1022:return 2;case 1006:case 1021:return 4;case 1001:case 1002:case 1004:case 1005:case 1007:case 1008:case 1009:case 1010:case 1011:case 1012:case 1013:case 1014:case 1015:case 1016:case 1017:case 1018:return 99999}else if(421===t)switch(e){case 320:return 2;case 329:case 330:case 331:return 3;case 317:return 4;case 323:return 1e3;case 311:case 315:case 318:case 319:case 321:case 322:case 324:case 325:case 326:case 327:case 328:return 99999}},SuperMapAlgoPlot.BasicAlgoSymbolFactory.getDefaultStyle=function(t,e){var o={};if(421===t)switch(e){case 320:case 321:o.color=o.strokeColor="#000000";break;case 322:o.color=o.strokeColor="#bc744d"}return o},SuperMapAlgoPlot.BasicAlgoSymbolFactory.zoomInCalSymbol=function(){if(22!==libID)return!1;switch(code){case 1012:case 1013:case 1014:case 1015:return!0;default:return!1}},SuperMapAlgoPlot.BasicAlgoSymbolFactory.zoomCalSymbol=function(){return!1},SuperMapAlgoPlot.BasicAlgoSymbolFactory.getSymbolName=function(t,e){var o="";if(0===t)switch(e){case SuperMapAlgoPlot.SymbolType.TEXTSYMBOL:o="文本";break;case SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL:o="圆";break;case SuperMapAlgoPlot.SymbolType.RECTANGLESYMBOL:o="矩形";break;case SuperMapAlgoPlot.SymbolType.ARCSYMBOL:o="弧线";break;case SuperMapAlgoPlot.SymbolType.CHORDSYMBOL:o="弓形";break;case SuperMapAlgoPlot.SymbolType.PIESYMBOL:o="扇形";break;case SuperMapAlgoPlot.SymbolType.ELLIPSESYMBOL:o="椭圆";break;case SuperMapAlgoPlot.SymbolType.PARALLELOGRAM:o="平行四边形";break;case SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL:o="多边形";break;case SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:o="折线";break;case SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL:o="贝赛尔曲线";break;case SuperMapAlgoPlot.SymbolType.POLYBEZIERCLOSESYMBOL:o="闭合贝塞尔曲线";break;case SuperMapAlgoPlot.SymbolType.PARALLELLINE:o="平行线";break;case SuperMapAlgoPlot.SymbolType.KIDNEY:o="集结地";break;case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOL:o="注记指示框";break;case SuperMapAlgoPlot.SymbolType.ARROWLINE:o="箭头线";break;case SuperMapAlgoPlot.SymbolType.COMBINATIONALCIRCLE:o="组合圆";break;case SuperMapAlgoPlot.SymbolType.CONCENTRICCIRCLE:o="同心圆";break;case SuperMapAlgoPlot.SymbolType.CURVEEIGHT:o="八字形";break;case SuperMapAlgoPlot.SymbolType.FREECURVE:o="自由线";break;case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOLM:o="多角标注框";break;case SuperMapAlgoPlot.SymbolType.LINEMARKING:o="线型标注";break;case SuperMapAlgoPlot.SymbolType.LINERELATION:o="对象间连线";break;case SuperMapAlgoPlot.SymbolType.NODECHAIN:o="节点链";break;case SuperMapAlgoPlot.SymbolType.PATHTEXT:o="沿线注记";break;case SuperMapAlgoPlot.SymbolType.POLYGONREGION:o="多边形区域管理";break;case SuperMapAlgoPlot.SymbolType.RUNWAY:o="跑道线";break;case SuperMapAlgoPlot.SymbolType.SYMBOLTEXTBOX:o="标注框";break;case SuperMapAlgoPlot.SymbolType.REGULARPOLYGON:o="正多边形";break;case SuperMapAlgoPlot.SymbolType.BRACESYMBOL:o="大括号";break;case SuperMapAlgoPlot.SymbolType.TRAPEZOIDSYMBOL:o="梯形";break;case SuperMapAlgoPlot.SymbolType.WIRE:o="铁丝网";break;case SuperMapAlgoPlot.SymbolType.LINEARARROW:o="直线箭头";break;case SuperMapAlgoPlot.SymbolType.NEWPIESYMBOL:o="扇形";break;case SuperMapAlgoPlot.SymbolType.NEWARCSYMBOL:o="弧线";break;case SuperMapAlgoPlot.SymbolType.NEWCHORDSYMBOL:o="弓形"}return o};SuperMapAlgoPlot.AlgoSymbolFactory=SuperMapAlgoPlot.AlgoSymbolFactory||{};SuperMapAlgoPlot.AlgoSymbolFactory.getAlgoSymbol=function(t){var e=t.libID,o=t.code;return 0!==e&&22!==e&&421!==e||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?100===e&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.getAlgoSymbol(e,o,t):123===e&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.getAlgoSymbol(e,o,t):999===e&&void 0!==SuperMapAlgoPlot.YJAlgoSymbolFactory?SuperMapAlgoPlot.YJAlgoSymbolFactory.getAlgoSymbol(e,o,t):null:SuperMapAlgoPlot.BasicAlgoSymbolFactory.getAlgoSymbol(e,o,t)},SuperMapAlgoPlot.AlgoSymbolFactory.getSymbolWayType=function(t,e){if(0===t)switch(e){case SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:case SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;case SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL:case SuperMapAlgoPlot.SymbolType.POLYBEZIERCLOSESYMBOL:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}if(22===t)switch(e){case 1005:case 1008:case 1012:case 1014:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;case 1007:case 1009:case 1013:case 1015:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}if(100===t)switch(e){case 15200:case 15201:case 16203:case 17703:case 17704:case 21400:case 21401:case 21500:case 21501:case 21502:case 21503:case 21504:case 21600:case 21900:case 22e3:case 22103:case 23800:case 24700:case 25201:case 25400:case 25601:case 25801:case 25901:case 26500:case 26501:case 26502:case 26503:case 26600:case 28900:case 29e3:case 29003:case 29903:case 3e4:case 30001:case 30002:case 30100:case 30102:case 30200:case 30201:case 30800:case 31803:case 33400:case 34900:case 34901:case 34902:case 35e3:case 36400:case 44200:case 3010102:case 3010103:case 3010104:case 3010105:case 3010106:case 3010107:case 3010108:case 3010301:case 3010302:case 3010303:case 3010304:case 16500:case 17400:case 17401:case 17500:case 17501:case 23400:case 23500:case 23600:case 23700:case 27300:case 28200:case 28300:case 28400:case 37600:case 37601:case 37700:case 39e3:case 40100:case 40101:case 42400:case 2350001:case 3032e3:case 4010800:case 4010801:case 4011100:case 4011101:case 4022100:case 4022101:case 4022102:case 39101:case 44300:case 22200:case 27701:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;case 12500:case 12502:case 16100:case 20300:case 25501:case 25502:case 25503:case 32900:case 34700:case 35200:case 36401:case 41200:case 41201:case 41202:case 42700:case 44400:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}if(123===t)switch(e){case 21003:case 21207:case 2120701:case 2121503:case 21218:case 30008:case 3000801:case 3000802:case 3000803:case 3000804:case 3000805:case 3000806:case 3000807:case 3000808:case 3000809:case 30009:case 5021803:case 5022001:case 5022002:case 40301:case 4030101:case 4030102:case 4030103:case 4030104:case 40303:case 4030301:case 4030302:case 4030303:case 50101:case 5010101:case 50102:case 5010201:case 5010202:case 5010203:case 5010204:case 50103:case 5010301:case 5010302:case 5010303:case 5010304:case 50107:case 5010701:case 50210:case 50220:case 50221:case 50225:case 5030102:case 50303:case 5030301:case 50309:case 50320:case 5032001:case 5032002:case 5032003:case 50321:case 5032101:case 5032102:case 50322:case 5032201:case 50330:case 5033001:case 5034203:case 5035201:case 5035204:case 60205:case 90105:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;case 20915:case 2091502:case 2092101:case 2120702:case 21216:case 2121601:case 2121602:case 21605:case 30010:case 30011:case 3001101:case 3001102:case 3001103:case 3001104:case 3001105:case 30012:case 30020:case 3002001:case 3002002:case 3002005:case 30025:case 3002501:case 30026:case 40104:case 40302:case 4030201:case 4030202:case 4030203:case 4030204:case 50227:case 5035205:case 60301:case 6030101:case 6030102:case 6030103:case 6030104:case 6030105:case 6030106:case 6030107:case 70202:case 7020201:case 7020202:case 90107:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}},SuperMapAlgoPlot.AlgoSymbolFactory.isAccessServer=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?100===t&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.isAccessServer(t,e):123===t&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.isAccessServer(t,e):999!==t||void 0===SuperMapAlgoPlot.YJAlgoSymbolFactory||SuperMapAlgoPlot.YJAlgoSymbolFactory.isAccessServer(t,e):SuperMapAlgoPlot.BasicAlgoSymbolFactory.isAccessServer(t,e)},SuperMapAlgoPlot.AlgoSymbolFactory.getDefaultSubSymbols=function(t,e){return 100===t&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.getDefaultSubSymbols(t,e):123===t&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.getDefaultSubSymbols(t,e):999===t&&void 0!==SuperMapAlgoPlot.YJAlgoSymbolFactory?SuperMapAlgoPlot.YJAlgoSymbolFactory.getDefaultSubSymbols(t,e):[]},SuperMapAlgoPlot.AlgoSymbolFactory.getMinEditPts=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?100===t&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.getMinEditPts(t,e):123===t&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.getMinEditPts(t,e):999===t&&void 0!==SuperMapAlgoPlot.YJAlgoSymbolFactory?SuperMapAlgoPlot.YJAlgoSymbolFactory.getMinEditPts(t,e):0:SuperMapAlgoPlot.BasicAlgoSymbolFactory.getMinEditPts(t,e)},SuperMapAlgoPlot.AlgoSymbolFactory.getMaxEditPts=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?100===t&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.getMaxEditPts(t,e):123===t&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.getMaxEditPts(t,e):999===t&&void 0!==SuperMapAlgoPlot.YJAlgoSymbolFactory?SuperMapAlgoPlot.YJAlgoSymbolFactory.getMaxEditPts(t,e):0:SuperMapAlgoPlot.BasicAlgoSymbolFactory.getMaxEditPts(t,e)},SuperMapAlgoPlot.AlgoSymbolFactory.getDefaultStyle=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?100===t&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.getDefaultStyle(t,e):123===t&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.getDefaultStyle(t,e):999===t&&void 0!==SuperMapAlgoPlot.YJAlgoSymbolFactory?SuperMapAlgoPlot.YJAlgoSymbolFactory.getDefaultStyle(t,e):{}:SuperMapAlgoPlot.BasicAlgoSymbolFactory.getDefaultStyle(t,e)},SuperMapAlgoPlot.AlgoSymbolFactory.getSymbolName=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?"":SuperMapAlgoPlot.BasicAlgoSymbolFactory.getSymbolName(t,e)},SuperMapAlgoPlot.AlgoSymbolFactory.canPolylineConnect=function(t,e){if(100!==t)return!1;switch(e){case 16500:case 17400:case 17401:case 17500:case 17501:case 23400:case 23500:case 23600:case 23700:case 27300:case 28200:case 28300:case 28400:case 37600:case 37601:case 37700:case 39e3:case 40100:case 40101:case 42200:case 42400:case 2350001:case 2730101:case 3032e3:case 4010800:case 4010801:case 4011100:case 4011101:case 4022100:case 4022101:case 4022102:return!0;default:return!1}},SuperMapAlgoPlot.AlgoSymbolFactory.zoomInCalSymbol=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?100===t&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.zoomInCalSymbol(t,e):123===t&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.zoomInCalSymbol(t,e):999===t&&void 0!==SuperMapAlgoPlot.YJAlgoSymbolFactory?SuperMapAlgoPlot.YJAlgoSymbolFactory.zoomInCalSymbol(t,e):0:SuperMapAlgoPlot.BasicAlgoSymbolFactory.zoomInCalSymbol(t,e)},SuperMapAlgoPlot.AlgoSymbolFactory.zoomCalSymbol=function(t,e){if((0===t||22===t||421===t)&&void 0!==SuperMapAlgoPlot.BasicAlgoSymbolFactory)return SuperMapAlgoPlot.BasicAlgoSymbolFactory.zoomCalSymbol(t,e);if(100===t)switch(e){case 28e3:case 28100:case 28200:case 28201:case 32300:return!0;default:return!1}else{if(123!==t||void 0===SuperMapAlgoPlot.WJAlgoSymbolFactory)return!1;switch(e){case 50312:case 50313:case 50314:case 50348:return!0;default:return!1}}},SuperMapAlgoPlot.AlgoSymbolFactory.calSurroundLineDir=function(t,e){if(22===t)switch(e){case 1018:case 1020:case 1021:return!1}return SuperMapAlgoPlot.AlgoSymbolFactory.getAlgoWayType(t,e)===SuperMapAlgoPlot.AddPoint_WayType.POLYLINE_CLOSE||SuperMapAlgoPlot.AlgoSymbolFactory.getAlgoWayType(t,e)===SuperMapAlgoPlot.AddPoint_WayType.CURVE_CLOSE},SuperMapAlgoPlot.AlgoSymbolFactory.getAlgoWayType=function(t,e){if(100===t)switch(e){case 24:case 40304:case 1e3:case 1007:case 1009:case 1016:case 12502:case 20300:case 26400:case 41100:case 50308:case 2092101:case 60301:case 6030101:case 6030102:case 6030103:case 6030104:case 6030105:case 6030106:case 6030107:case 1013:case 1015:case 520100:case 520200:case 21216:case 2121601:case 2121602:case 30020:case 3002001:case 3002002:case 3002005:case 30025:case 3002501:case 30026:case 3002601:case 30027:case 3002701:case 3002702:case 3002703:case 3002704:case 3002705:case 40104:case 36401:case 34700:case 32900:case 6020404:case 30013:case 3001302:case 30014:case 1001:case 1017:case 16e3:case 16001:case 25202:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;case 32:case 3020901:case 25501:case 25502:case 25503:case 25601:case 25701:case 2570201:case 2570301:case 2570401:case 2570501:case 25801:case 25901:case 44400:case 41200:case 41201:case 41202:case 30010:case 30011:case 30012:case 3001101:case 3001102:case 3001103:case 3001104:case 3001105:case 5035205:case 16100:case 35304:case 35200:case 50225:case 5020801:case 42700:case 25500:case 25600:case 25700:case 25800:case 25900:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE_CLOSE;case 40301:case 4030301:case 4030302:case 4030303:case 5010301:case 5010303:case 5010304:case 1005:case 1008:case 15200:case 15201:case 21400:case 21401:case 21500:case 21501:case 21502:case 21503:case 21504:case 21900:case 21600:case 26500:case 26501:case 26502:case 26503:case 26600:case 3000801:case 3000802:case 3000803:case 3000804:case 3000805:case 3000806:case 3000807:case 3000808:case 3000809:case 5034203:case 50355:case 5035501:case 60205:case 1012:case 1014:case 3010102:case 3010103:case 3010104:case 3010105:case 3010106:case 3010107:case 3010108:case 3010301:case 3010302:case 3010303:case 3010304:case 50102:case 4021101:case 510100:case 520300:case 530100:case 530200:case 16203:case 22e3:case 22103:case 25201:case 24700:case 25400:case 44200:case 31803:case 30800:case 30201:case 30200:case 5022002:case 3002004:case 5030301:case 50328:case 5033001:case 5022001:case 4021102:case 29003:case 30009:case 5035201:case 520500:case 23800:case 36400:case 35e3:case 33400:case 30100:case 30102:case 30002:case 30001:case 3e4:case 29903:case 5021803:case 50321:case 5032003:case 4020303:case 4020400:case 4020401:case 4020402:case 34902:case 34901:case 34900:case 12501:case 15800:case 15801:case 15802:case 15803:case 15804:case 15805:case 15806:case 15900:case 2091503:case 28900:case 16201:case 39600:case 38600:case 36700:case 26601:case 16200:case 17700:case 90213:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;case 50342:case 5034201:case 5034202:case 610100:case 29103:case 28300:case 28200:case 17400:case 17401:case 17402:case 17500:case 17501:case 22200:case 23400:case 23500:case 2350001:case 23600:case 23700:case 27300:case 2730101:case 27701:case 28400:case 44300:case 42400:case 42200:case 40100:case 40101:case 39101:case 39e3:case 37700:case 37601:case 37600:case 5020802:case 50223:case 5022301:case 50226:case 21221:case 2122101:case 50108:case 3032e3:case 4011100:case 4011101:case 4022101:case 4022102:case 4022100:case 16500:case 80203:case 8020301:return SuperMapAlgoPlot.AddPoint_WayType.CURVE_CLOSE;case 17703:case 17704:case 39801:case 39802:case 39800:case 40900:case 4e4:return SuperMapAlgoPlot.AddPoint_WayType.CURVE_WITHCONTROLPT;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN};SuperMap.MD5=SuperMap.MD5||{};SuperMap.MD5.md5=function(t){function e(t,e){return t<<e|t>>>32-e}function o(t,e){var o,i,n,l,a;return n=2147483648&t,l=2147483648&e,a=(1073741823&t)+(1073741823&e),(o=1073741824&t)&(i=1073741824&e)?2147483648^a^n^l:o|i?1073741824&a?3221225472^a^n^l:1073741824^a^n^l:a^n^l}function i(t,i,n,l,a,s,r){return o(e(t=o(t,o(o(function(t,e,o){return t&e|~t&o}(i,n,l),a),r)),s),i)}function n(t,i,n,l,a,s,r){return o(e(t=o(t,o(o(function(t,e,o){return t&o|e&~o}(i,n,l),a),r)),s),i)}function l(t,i,n,l,a,s,r){return o(e(t=o(t,o(o(function(t,e,o){return t^e^o}(i,n,l),a),r)),s),i)}function a(t,i,n,l,a,s,r){return o(e(t=o(t,o(o(function(t,e,o){return e^(t|~o)}(i,n,l),a),r)),s),i)}function s(t){var e,o="",i="";for(e=0;e<=3;e++)o+=(i="0"+(t>>>8*e&255).toString(16)).substr(i.length-2,2);return o}var r,u,p,h,c,y,g,f,P,d=Array();for(d=function(t){for(var e,o=t.length,i=o+8,n=16*((i-i%64)/64+1),l=Array(n-1),a=0,s=0;s<o;)a=s%4*8,l[e=(s-s%4)/4]=l[e]|t.charCodeAt(s)<<a,s++;return a=s%4*8,l[e=(s-s%4)/4]=l[e]|128<<a,l[n-2]=o<<3,l[n-1]=o>>>29,l}(t=function(t){t=t.replace("/\r\n/g","\n");for(var e="",o=0;o<t.length;o++){var i=t.charCodeAt(o);i<128?e+=String.fromCharCode(i):i>127&&i<2048?(e+=String.fromCharCode(i>>6|192),e+=String.fromCharCode(63&i|128)):(e+=String.fromCharCode(i>>12|224),e+=String.fromCharCode(i>>6&63|128),e+=String.fromCharCode(63&i|128))}return e}(t)),y=1732584193,g=4023233417,f=2562383102,P=271733878,r=0;r<d.length;r+=16)u=y,p=g,h=f,c=P,g=a(g=a(g=a(g=a(g=l(g=l(g=l(g=l(g=n(g=n(g=n(g=n(g=i(g=i(g=i(g=i(g,f=i(f,P=i(P,y=i(y,g,f,P,d[r+0],7,3614090360),g,f,d[r+1],12,3905402710),y,g,d[r+2],17,606105819),P,y,d[r+3],22,3250441966),f=i(f,P=i(P,y=i(y,g,f,P,d[r+4],7,4118548399),g,f,d[r+5],12,1200080426),y,g,d[r+6],17,2821735955),P,y,d[r+7],22,4249261313),f=i(f,P=i(P,y=i(y,g,f,P,d[r+8],7,1770035416),g,f,d[r+9],12,2336552879),y,g,d[r+10],17,4294925233),P,y,d[r+11],22,2304563134),f=i(f,P=i(P,y=i(y,g,f,P,d[r+12],7,1804603682),g,f,d[r+13],12,4254626195),y,g,d[r+14],17,2792965006),P,y,d[r+15],22,1236535329),f=n(f,P=n(P,y=n(y,g,f,P,d[r+1],5,4129170786),g,f,d[r+6],9,3225465664),y,g,d[r+11],14,643717713),P,y,d[r+0],20,3921069994),f=n(f,P=n(P,y=n(y,g,f,P,d[r+5],5,3593408605),g,f,d[r+10],9,38016083),y,g,d[r+15],14,3634488961),P,y,d[r+4],20,3889429448),f=n(f,P=n(P,y=n(y,g,f,P,d[r+9],5,568446438),g,f,d[r+14],9,3275163606),y,g,d[r+3],14,4107603335),P,y,d[r+8],20,1163531501),f=n(f,P=n(P,y=n(y,g,f,P,d[r+13],5,2850285829),g,f,d[r+2],9,4243563512),y,g,d[r+7],14,1735328473),P,y,d[r+12],20,2368359562),f=l(f,P=l(P,y=l(y,g,f,P,d[r+5],4,4294588738),g,f,d[r+8],11,2272392833),y,g,d[r+11],16,1839030562),P,y,d[r+14],23,4259657740),f=l(f,P=l(P,y=l(y,g,f,P,d[r+1],4,2763975236),g,f,d[r+4],11,1272893353),y,g,d[r+7],16,4139469664),P,y,d[r+10],23,3200236656),f=l(f,P=l(P,y=l(y,g,f,P,d[r+13],4,681279174),g,f,d[r+0],11,3936430074),y,g,d[r+3],16,3572445317),P,y,d[r+6],23,76029189),f=l(f,P=l(P,y=l(y,g,f,P,d[r+9],4,3654602809),g,f,d[r+12],11,3873151461),y,g,d[r+15],16,530742520),P,y,d[r+2],23,3299628645),f=a(f,P=a(P,y=a(y,g,f,P,d[r+0],6,4096336452),g,f,d[r+7],10,1126891415),y,g,d[r+14],15,2878612391),P,y,d[r+5],21,4237533241),f=a(f,P=a(P,y=a(y,g,f,P,d[r+12],6,1700485571),g,f,d[r+3],10,2399980690),y,g,d[r+10],15,4293915773),P,y,d[r+1],21,2240044497),f=a(f,P=a(P,y=a(y,g,f,P,d[r+8],6,1873313359),g,f,d[r+15],10,4264355552),y,g,d[r+6],15,2734768916),P,y,d[r+13],21,1309151649),f=a(f,P=a(P,y=a(y,g,f,P,d[r+4],6,4149444226),g,f,d[r+11],10,3174756917),y,g,d[r+2],15,718787259),P,y,d[r+9],21,3951481745),y=o(y,u),g=o(g,p),f=o(f,h),P=o(P,c);return(s(y)+s(g)+s(f)+s(P)).toLowerCase()},L.supermap.plotting=L.supermap.plotting||{};var Hs=L.Path.extend({options:{text:"",labelAlign:"cm",labelRotation:0,fontColor:"#000000",fontSize:14,fontOpacity:1,fontFamily:"微软雅黑",fontWeight:"normal",fontStyle:"",fontSpace:0,fontPercent:100,fontStroke:!1,fontStrokeColor:"#ff0000",fontStrokeWidth:2,fontBackground:!1,fontBackgroundColor:"#ff0000",fontShadow:!1,fontShadowColor:"#ff0000",fontShadowOffsetX:0,fontShadowOffsetY:0,interactive:!0},_textNode:null,_backgroundTextNode:null,_shadowTextNode:null,_tspanNodeObj:null,initialize:function(t,e){L.setOptions(this,e),this._latlng=L.latLng(t[0]),this._text=this.options.text,this._tspanNodeObj={}},onAdd:function(){L.Path.prototype.onAdd.call(this)},onRemove:function(){this._removeNode(),L.Path.prototype.onRemove.call(this)},_removeNode:function(){this._textNode&&this._textNode.parentNode&&(L.DomUtil.remove(this._textNode),this.removeInteractiveTarget(this._textNode),delete this._textNode,this._textNode=null),this._backgroundTextNode&&this._backgroundTextNode.parentNode&&(this._renderer._rootGroup.removeChild(this._backgroundTextNode),delete this._backgroundTextNode,this._backgroundTextNode=null),this._shadowTextNode&&this._shadowTextNode.parentNode&&(this._renderer._rootGroup.removeChild(this._shadowTextNode),delete this._shadowTextNode,this._shadowTextNode=null),this._tspanNodeObj={},this._textNode&&(L.DomUtil.remove(this._textNode),this.removeInteractiveTarget(this._textNode),delete this._textNode,this._textNode=null),this._backgroundTextNode&&(delete this._backgroundTextNode,this._backgroundTextNode=null),this._shadowTextNode&&(delete this._shadowTextNode,this._shadowTextNode=null)},setLatLngs:function(t){return this._latlng=L.latLng(t[0]),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLngs:function(){return[this._latlng]},setText:function(t){return this.options.text=this._text=t,this.redraw()},getText:function(){return this._text},setStyle:function(t){var e=t&&t.text||this._text;return L.Path.prototype.setStyle.call(this,t),this.setText(e),this},getBounds:function(){return this._updateBounds(),this._bounds},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},getPxBounds:function(t){this._point=this._map.latLngToLayerPoint(this._latlng);var e=1;this.options.fontPercent&&100!==this.options.fontPercent&&(e=this.options.fontPercent/100);var o=0,i=0,n=this.options.text.split("\n"),l=n.length;if(this._renderer instanceof L.Canvas){var a=[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=a,this.options.fontSize=parseFloat(this.options.fontSize);var s=L.Canvas.LABEL_FACTOR[this.options.labelAlign[1]];null==s&&(s=-.5);var r=this._renderer._ctx.measureText("Mg").height||this._renderer._ctx.measureText("xx").width;i=r*s*(l-1)+r*l;for(var u=0;u<l;u++)if(this.options.fontSpace&&0!=this.options.fontSpace||this.options.fontPercent&&100!=this.options.fontPercent){var p=(this._renderer._ctx.measureText(n[u]).width+this.options.fontSpace*(n[u].length-1))*e;o<p&&(o=p)}else{var h=this._renderer._ctx.measureText(n[u]).width;o<h&&(o=h)}}else if(this._renderer instanceof L.SVG){var c=L.SVG.LABEL_VFACTOR[this.options.labelAlign[1]];null==c&&(c=-.5);var y=this.options.fontSize;i=y*c*(l-1)+y*l;for(var g=0;g<l;g++){var f=SuperMap.Plot.PlottingUtil.getTextWidth(this.options,n[g]);o<f&&(o=f)}}else{this.options.fontSize=parseFloat(this.options.fontSize);var P=this.options.fontSize;i=P*(l-1)+P*l;for(var d=0;d<l;d++){var S=SuperMap.Plot.PlottingUtil.getTextWidth(this.options,n[d]);o<S&&(o=S)}}this.options.fontSize<6&&(o=0);var m=0,b=0,M=0,v=0,A=this.options.labelAlign||"cm";for(var T in"lt"===A?(m=this._point.x,b="微软雅黑"==this.options.fontFamily||"Microsoft YaHei"==this.options.fontFamily?this._point.y:this._point.y-this.options.fontSize/2,M=this._point.x+o,v=this._point.y+i):"ct"===A?(m=this._point.x-o/2,b="微软雅黑"==this.options.fontFamily||"Microsoft YaHei"==this.options.fontFamily?this._point.y:this._point.y-this.options.fontSize/2,M=this._point.x+o/2,v=this._point.y+i):"rt"===A?(m=this._point.x-o,b="微软雅黑"==this.options.fontFamily||"Microsoft YaHei"==this.options.fontFamily?this._point.y:this._point.y-this.options.fontSize/2,M=this._point.x,v=this._point.y+i):"lb"===A?(m=this._point.x,b=this._point.y-i,M=this._point.x+o,v="微软雅黑"==this.options.fontFamily||"Microsoft YaHei"==this.options.fontFamily?this._point.y:this._point.y+this.options.fontSize/2):"cb"===A?(m=this._point.x-o/2,b=this._point.y-i,M=this._point.x+o/2,v=this._point.y,v="微软雅黑"==this.options.fontFamily||"Microsoft YaHei"==this.options.fontFamily?this._point.y:this._point.y+this.options.fontSize/2):"rb"===A?(m=this._point.x-o,b=this._point.y-i,M=this._point.x,v="微软雅黑"==this.options.fontFamily||"Microsoft YaHei"==this.options.fontFamily?this._point.y:this._point.y+this.options.fontSize/2):"lm"===A?(m=this._point.x,b=this._point.y-i/2,M=this._point.x+o,v=this._point.y+i/2):"cm"===A?(m=this._point.x-o/2,b=this._point.y-i/2,M=this._point.x+o/2,v=this._point.y+i/2):"rm"===A&&(m=this._point.x-o,b=this._point.y-i/2,M=this._point.x,v=this._point.y+i/2),t&&this.options.fontShadow&&(0!==this.options.fontShadowOffsetX||0!==this.options.fontShadowOffsetY)&&(this.options.fontShadowOffsetX>0?M+=this.options.fontShadowOffsetX:m+=this.options.fontShadowOffsetX,this.options.fontShadowOffsetY>0?v+=this.options.fontShadowOffsetY:b+=this.options.fontShadowOffsetY),this._eventParents)if(this._eventParents[T].symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL&&0===this.options.fontPercent&&0===this.options.fontPercent){var _=M-m,O=(_+this.options.fontSpace*(this.options.text.length-1))*this.options.fontPercent/100-_;switch(A){case"lt":case"lm":case"lb":M+=O;break;case"rt":case"rm":case"rb":m-=O;break;case"ct":case"cm":case"cb":m-=O/2,M+=O/2}}var x=new L.Bounds;if(this.options.labelRotation&&0!==this.options.labelRotation){var w=[];w.push(L.point(m,b)),w.push(L.point(m,v)),w.push(L.point(M,b)),w.push(L.point(M,v));for(var E=this.options.labelRotation*(Math.PI/180),C=0;C<w.length;C++)SuperMap.Plot.PlottingUtil.rotateAngle(this._point,E,w[C]),x.extend(w[C])}else x=L.bounds(L.point(m,b),L.point(M,v));return x},_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 Hs(t,e)},L.supermap.plotting.Text=Hs;var Zs=L.Path.extend({options:{externalGraphic:"",graphicWidth:0,graphicHeight:0,graphicOpacity:1,graphicXOffset:void 0,graphicYOffset:void 0,rotation:0,graphicTitle:"",interactive:!0},_imageNode:null,initialize:function(t,e){L.setOptions(this,e),this._latlng=L.latLng(t[0])},onAdd:function(){L.Path.prototype.onAdd.call(this),this._updatePath()},onRemove:function(){this._imageNode&&this._imageNode.parentNode&&(this._renderer._rootGroup.removeChild(this._imageNode),delete this._imageNode,this._imageNode=null),this._imageNode&&(delete this._imageNode,this._imageNode=null),L.Path.prototype.onRemove.call(this)},setLatLngs:function(t){return this._latlng=L.latLng(t[0]),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLngs:function(){return[this._latlng]},getBounds:function(){return this._updateBounds(),this._bounds},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},getPxBounds:function(){this._point=this._map.latLngToLayerPoint(this._latlng),null==this.options.graphicXOffset&&(this.options.graphicXOffset=0),null==this.options.graphicYOffset&&(this.options.graphicYOffset=0);var t=-.5*this.options.graphicWidth+this.options.graphicXOffset,e=-.5*this.options.graphicHeight+this.options.graphicYOffset,o=this._point.x+t,i=this._point.y+e,n=o+this.options.graphicWidth,l=i+this.options.graphicHeight,a=new L.Bounds;if(this.options.rotation&&0!==this.options.rotation){var s=[];s.push(L.point(o,i)),s.push(L.point(o,l)),s.push(L.point(n,i)),s.push(L.point(n,l));for(var r=this.options.rotation*(Math.PI/180),u=0;u<s.length;u++)SuperMap.Plot.PlottingUtil.rotateAngle(this._point,r,s[u]),a.extend(s[u])}else a=L.bounds(L.point(o,i),L.point(n,l));return a},_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 Zs(t,e)},L.supermap.plotting.PointImage=Zs;var Js=L.Class.extend({feature:null,canvas:null,anchor:null,size:null,fromZoom:null,latLng:null,bounds:null,options:{extent:0},initialize:function(t,e){this.feature=t,e=e||{},L.Util.setOptions(this,e),this.canvasEle=document.createElement("canvas"),this.canvasEle.width=0,this.canvasEle.height=0,this._ctx=this.canvasEle.getContext("2d")},_latlngToLayerPoint:function(t,e){null==e&&(e=this.fromZoom);for(var o=this.feature._map.getZoomScale(e,this.feature._map.getZoom()),i=this.latLng,n=[],l=0;l<t.length;l++){var a=i.lat+o*(t[l].lat-i.lat),s=i.lng+o*(t[l].lng-i.lng),r=this.feature._map.latLngToLayerPoint(L.latLng(a,s));r.x=r.x-this.leftTopPixel.x+this.feature.style.weight,r.y=r.y-this.leftTopPixel.y+this.feature.style.weight,n.push(r)}return n},_scaleBounds:function(t){if(this.fromZoom!==this.feature._map.getZoom()){var e=this.feature._map.getZoomScale(this.fromZoom,this.feature._map.getZoom()),o=this.latLng,i=o.lat+e*(t.getNorth()-o.lat),n=o.lat+e*(t.getSouth()-o.lat),l=o.lng+e*(t.getWest()-o.lng),a=o.lng+e*(t.getEast()-o.lng);return L.latLngBounds(L.latLng(i,l),L.latLng(n,a))}return L.latLngBounds(L.latLng(t.getNorth(),t.getWest()),L.latLng(t.getSouth(),t.getEast()))},_drawPolyline:function(t,e){var o=this._latlngToLayerPoint(t.getLatLngs(),t.fromZoom),i=t.options;e.beginPath(),e.globalAlpha=i.opacity,this._addDashArray(t),e.setLineDash&&e.setLineDash(t.options&&t.options._dashArray||[]),e.moveTo(o[0].x,o[0].y);for(var n=1,l=o.length;n<l;n++)e.lineTo(o[n].x,o[n].y);i.fill&&(e.globalCompositeOperation=!0===Boolean(this.feature.surroundLineType)?"destination-over":"source-over"),e.strokeStyle=SuperMap.Plot.PlottingUtil.colorRGBA(i.color,i.opacity),e.lineWidth=i.weight,e.stroke()},_drawRectangle:function(t,e){var o=this._latlngToLayerPoint(t.getLatLngs()[0],t.fromZoom),i=t.options;e.beginPath(),e.globalAlpha=!0===i.fill?i.fillOpacity:i.opacity,this._addDashArray(t),e.setLineDash&&e.setLineDash(t.options&&t.options._dashArray||[]),e.moveTo(o[0].x,o[0].y);for(var n=1,l=o.length;n<l;n++){var a=o[n].x,s=o[n].y;e.lineTo(a,s)}e.closePath(),i.fill&&(e.globalCompositeOperation=!0===Boolean(this.feature.surroundLineType)?"destination-over":"source-over",!0===i.fillLimit&&!0!==i.fillColorLimit?e.fillStyle=SuperMap.Plot.PlottingUtil.colorRGBA(i.color,i.opacity):e.fillStyle=SuperMap.Plot.PlottingUtil.colorRGBA(i.fillColor,i.fillOpacity),e.fill()),e.strokeStyle=SuperMap.Plot.PlottingUtil.colorRGBA(i.color,i.opacity),e.lineWidth=i.weight,e.stroke()},_drawPolygon:function(t,e){var o=this._latlngToLayerPoint(t.getLatLngs()[0],t.fromZoom),i=t.options;e.beginPath(),e.globalAlpha=!0===i.fill?i.fillOpacity:i.opacity,this._addDashArray(t),e.setLineDash&&e.setLineDash(t.options&&t.options._dashArray||[]),e.moveTo(o[0].x,o[0].y);for(var n=1,l=o.length;n<l;n++){var a=o[n].x,s=o[n].y;e.lineTo(a,s)}e.closePath(),i.fill&&(e.globalCompositeOperation=!0===Boolean(this.feature.surroundLineType)?"destination-over":"source-over",!0===i.fillLimit&&!0!==i.fillColorLimit?e.fillStyle=SuperMap.Plot.PlottingUtil.colorRGBA(i.color,i.opacity):e.fillStyle=SuperMap.Plot.PlottingUtil.colorRGBA(i.fillColor,i.fillOpacity),e.fill(i.fillRule||"evenodd")),e.strokeStyle=SuperMap.Plot.PlottingUtil.colorRGBA(i.color,i.opacity),e.lineWidth=i.weight,e.stroke()},_drawText:function(t,e){var o=this._latlngToLayerPoint(t.getLatLngs(),t.fromZoom)[0],i=t.options,n=(i=SuperMap.Util.extend({fontColor:"#000000",labelAlign:"cm"},i)).fontSize.toLocaleString()+"px",l=[i.fontStyle?i.fontStyle:"normal","normal",i.fontWeight?i.fontWeight:"normal",i.fontSize?n:"1em",i.fontFamily?i.fontFamily:"sans-serif"].join(" ");e.globalAlpha=i.fontOpacity,e.fillStyle=SuperMap.Plot.PlottingUtil.colorRGBA(i.fontColor,i.fontOpacity),e.font=l,e.fillText&&(e.textAlign=L.Canvas.LABEL_ALIGN[i.labelAlign[0]]||"center"),e.textBaseline=L.Canvas.LABEL_ALIGN[i.labelAlign[1]]||"middle";var a=L.Canvas.LABEL_FACTOR[i.labelAlign[1]];null==a&&(a=-.5);var s=e.measureText("Mg").height||e.measureText("xx").width,r=i.text.split("\n"),u=r.length;o.y+=s*a*(u-1);for(var p=0;p<u;p++)e.save(),e.translate(o.x,o.y),0!=i.labelRotation&&e.rotate(i.labelRotation*Math.PI/180),e.fillText(r[p],0,s*p),e.restore()},_drawImage:function(t,e){var o=this._latlngToLayerPoint(t.getLatLngs(),t.fromZoom)[0],i=t.options,n=null;if(!Object.prototype.hasOwnProperty.call(L.supermap.plotting.getControl().imageManager,t.options.externalGraphic)){n=new Image,SuperMap.Browser.name;t.options.graphicTitle&&(n.title=t.options.graphicTitle),n.src=t.options.externalGraphic,L.supermap.plotting.getControl().imageManager[t.options.externalGraphic]=n}return{point:o,style:i,path:t.options.externalGraphic}},_addDashArray:function(t){if(t.options.dashArray){var e,o=t.options.dashArray.split(","),i=[];for(e=0;e<o.length;e++)i.push(number(o[e]));t.options._dashArray=i}}});L.supermap.plotting.symbolStyle=function(t){return new Js(t)};var qs=Js.extend({components:null,position:null,offsetX:null,offsetY:null,initialize:function(t,e,o,i,n,l,a){this.feature=t,this.components=e,this.latLng=o,this.position=i,this.offsetX=n,this.offsetY=l,a=a||{},L.Util.setOptions(this,a),this.canvasEle=document.createElement("canvas"),this.canvasEle.width=0,this.canvasEle.height=0,this._ctx=this.canvasEle.getContext("2d")},setComponents:function(t,e,o,i,n){delete this.bounds,this.bounds=null,this.components=t,this.latLng=e,this.position=o,this.offsetX=i,this.offsetY=n,this.render()},render:function(){this._computeImageSize(),this.canvasEle.width=this.size[0],this.canvasEle.height=this.size[1],this._ctx.clearRect(0,0,this.canvasEle.width,this.canvasEle.height),this.canvas=this._ctx.canvas,this._drawFeatures()},clear:function(){this._ctx.clearRect(0,0,this.canvasEle.width,this.canvasEle.height)},getCacheInfo:function(){var t=document.createElement("canvas"),e=t.getContext("2d");return t.width=this.canvas.width,t.height=this.canvas.height,e.clearRect(0,0,t.width,t.height),e.drawImage(this.canvas,0,0),{canvas:e.canvas,_ctx:e,position:this.position,offsetX:this.offsetX,offsetY:this.offsetY,anchor:L.point(this.anchor.x,this.anchor.y),size:[this.size[0],this.size[1]]}},_computeImageSize:function(){if(null==this.bounds){this.bounds=L.latLngBounds();for(var t=0;t<this.components.length;t++)this.bounds.extend(this.components[t].getBounds?this.components[t].getBounds():this.components[t].getLatLng())}var e=new L.Bounds;e.extend(this.feature._map.latLngToLayerPoint(this.bounds.getNorthEast())),e.extend(this.feature._map.latLngToLayerPoint(this.bounds.getNorthWest())),e.extend(this.feature._map.latLngToLayerPoint(this.bounds.getSouthEast())),e.extend(this.feature._map.latLngToLayerPoint(this.bounds.getSouthWest())),this.leftTopPixel=L.point(e.min.x,e.min.y);var o=e.getSize(),i=this.feature.style.weight;o.x+=2*i,o.y+=2*i,this.anchor=this._latlngToLayerPoint([this.latLng])[0],this.size=[o.x,o.y]},_latlngToLayerPoint:function(t){for(var e=[],o=0;o<t.length;o++){var i=this.feature._map.latLngToLayerPoint(L.latLng(t[o].lat,t[o].lng));i.x=i.x-this.leftTopPixel.x+this.feature.style.weight,i.y=i.y-this.leftTopPixel.y+this.feature.style.weight,e.push(i)}return e},_drawFeatures:function(){for(var t in this._ctx.translate(0,0),this.components){var e=this.components[t];Hs&&e instanceof Hs?this._drawText(e,this._ctx):L.Rectangle&&e instanceof L.Rectangle?this._drawRectangle(e,this._ctx):L.Polygon&&e instanceof L.Polygon?this._drawPolygon(e,this._ctx):L.Polyline&&e instanceof L.Polyline&&this._drawPolyline(e,this._ctx)}}});L.supermap.plotting.componentStyle=function(t){return new qs(t)};var Ks=L.Marker.extend({options:{nHandle:0,tag:0}});L.supermap.plotting.editMarker=function(t,e){return new Ks(t,e)};var Qs=L.Evented.extend({dragging:null,uuid:null,libID:null,code:null,textDisplay:!0,minEditPts:1,maxEditPts:1,symbolType:null,symbolName:null,bubbleHeight:320,bubbleWidth:320,description:"",mediaList:null,isSelected:!1,enableEdit:!0,note:"",extendProperty:null,custom:null,symbolData:null,dRotate:null,dScale:null,textContent:null,annotationPosition:4,subSymbols:null,fromZoom:null,style:null,isLocked:!1,anchorPoint:null,avoidRegions:null,ownerGroup:null,geoSymbolTexts:null,isEdit:!1,components:null,maxScale:null,minScale:null,options:{},_defaultStyle:{display:"display",color:"#ff0000",lineSymbolID:0,opacity:"1.00",weight:2,lineCap:"square",lineJoin:"square",surroundLineColor:"#ffff00",surroundLineColorOpacity:"1.00",surroundLineWidth:4,fillSymbolID:1,fillColor:"#ff0000",fillOpacity:"0.31",fillBackColor:"#ff0000",fillBackOpacity:"1.00",fillGradientMode:"NONE",fontColor:"#000000",fontFamily:"Microsoft YaHei",fontSize:"12",fontStroke:!1,fontStrokeColor:"#ff0000",fontStrokeWidth:"2px",fontBackground:!1,fontBackgroundColor:"#ff0000",fontShadow:!1,fontShadowColor:"#ff0000",fontShadowOffsetX:0,fontShadowOffsetY:0,fontSpace:0,fontPercent:100,sizeFixed:!0,labelAlign:"lt",labelRotation:-0,labelXOffset:0,labelYOffset:0,fillAngle:0,fillCenterOffsetX:0,fillCenterOffsetY:0},initialize:function(t,e,o,i){this.components=[],this.libID=t,this.code=e,this.extendProperty=new SuperMap.Plot.ExtendProperty,this.avoidRegions=[],this.subSymbols=[],this.geoSymbolTexts=[],this.dRotate=0,this.dScale=1,this.textContent="",this.associatedUuid="",this.bubbleHeight=320,this.bubbleWidth=320,this.description="",this.mediaList=[],i&&i.symbolData&&(this._removeRedundancySymbolData(i.symbolData),this.symbolData=SuperMap.Plot.PlottingUtil.cloneObject(i.symbolData),SuperMap.Plot.AnalysisSymbol.parseSymbolData(this,this.symbolData,!0),SuperMap.Util.applyDefaults(this.style,this._defaultStyle),delete i.symbolData),this._mergeDefaultStyle(),SuperMap.Util.extend(this,i),null===this.uuid&&(this.uuid=SuperMap.Plot.PlottingUtil.generateUuid()),null===this.style&&(this.style=SuperMap.Plot.PlottingUtil.cloneObject(this._defaultStyle));for(var n=0;n<this.avoidRegions.length;n++)this.avoidRegions[n].associatedUuid=this.uuid},onAdd:function(t){this.layer=t,this._renderer=t instanceof fu?t.getRenderer(this.symbolType):t._renderer,this._map=t._map,this.redraw(),this.isEdit=!0,ir&&(this.dragging||(this.dragging=new ir(this))),null===this.fromZoom&&(this.fromZoom=this._map.getZoom()),this.layer instanceof bu&&(null!==this.layer.firstZoom&&void 0!==this.layer.firstZoom||1!==this.layer.getFeatures().length||(this.layer.firstZoom=this._map.getZoom()))},_clearComponents:function(){for(var t=0;t<this.components.length;t++)this.components[t].removeEventParent(this),this.components[t]instanceof Qs?this.components[t]._clearComponents():(null!=this.components[t]._renderer&&this.components[t].onRemove(),delete this.components[t]);this.components.length=0,this._map&&this.layer&&this._map.getRenderer(this.layer)instanceof L.SVG&&this._removeGradientNodeInSVG()},_removeGradientNodeInSVG:function(){if(this.uuid&&this.layer._renderer._container.defs){var t=document.getElementById("linearGradient_"+this.uuid);null!==t&&this.layer._renderer._container.defs.removeChild(t),null!==(t=document.getElementById("radialGradient_"+this.uuid))&&this.layer._renderer._container.defs.removeChild(t),null!==(t=document.getElementById("patternFill_"+this.uuid))&&this.layer._renderer._container.defs.removeChild(t)}},_addComponents:function(t){if(!0===this.movingTarget)t._map=this._map,this.components.push(t);else{if(t._map=this._map,t._renderer=this._renderer,t.addEventParent(this),t instanceof Qs)t.onAdd(this.layer);else{var e=SuperMap.Util.indexOf(this.layer.features,this);if(-1==e&&null!=this.route&&(e=SuperMap.Util.indexOf(this.layer.features,this.route)),-1==e&&null!=this.ownerGroup&&(e=SuperMap.Util.indexOf(this.layer.features,this.ownerGroup)),0===this.layer.features.length||e===this.layer.features.length-1)t.onAdd();else{for(var o=null,i=e+1;i<this.layer.features.length;i++)if(null!=(o=this.layer.features[i])&&o.components.length>0){if(o.components[0]instanceof Qs&&o.components[0].components.length>0){o=o.components[0];break}if(!(o.components[0]instanceof Qs))break;o=null}null!=o&&o.components.length>0?o.components[0]instanceof Qs&&o.components[0].components.length>0?t.onBefore(o.components[0].components[0]):t.onBefore(o.components[0]):t.onAdd()}}this.components.push(t)}},_project:function(){var t=this;t._pxBounds=new L.Bounds,t.components.map(function(e){return e instanceof Qs&&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 o=SuperMap.Plot.PlottingUtil.cloneObject(this.style);return L.supermap.plotting.PlottingObject.createSymbol(this.libID,this.code,null,{symbolData:e,serverUrl:this.serverUrl},o)},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(var e in this.ownerGroup.subObjects)this.ownerGroup.subObjects[e].redraw();this.symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL&&this.isSelected&&"none"!==this.style.display&&this.fire(SuperMap.Plot.Event.reseteditmarkersvalues),this.layer.fire("propertychanged",{feature:this,property:t})},setScale:function(){},setRotate:function(){},setTextPosition:function(){},convertGraphicObjects:function(){},setTextContent:function(t){this.textContent=t,this.redraw(),this.symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL&&this.isSelected&&(this.fire(SuperMap.Plot.Event.reseteditmarkersvalues),this.layer.fire("propertychanged",{feature:this,property:t}))},getLocked:function(){return this.isLocked},setLocked:function(t){if(this.isLocked!==t){if(this.isLocked=t,this.symbolType===SuperMap.Plot.SymbolType.GROUPOBJECT)for(var e=0;e<this.components.length;e++)this.components[e].isLocked=t;this.fire(SuperMap.Plot.Event.reseteditmarkers)}},getScale:function(){return this.dScale},getScaleValues:function(){return this.scaleValues},setScaleValues:function(t){t&&null!==t&&(L.Util.isArray(t)||(t=[t]),this.scaleValues=t,this._calculateParts(),this.fire(SuperMap.Plot.Event.reseteditmarkers))},getRotate:function(){return this.dRotate},getSubSymbols:function(){return 0===this.libID&&this.code===SuperMap.Plot.SymbolType.NODECHAIN&&0===this.subSymbols.length?this.subSymbols.push(new SuperMap.Plot.SubSymbol(-1,-1)):(100!==this.libID||25200!==this.code&&3020901!==this.code&&23400!==this.code&&30800!==this.code&&30001!==this.code&&26400!==this.code||0!==this.subSymbols.length)&&(123!==this.libID||5030101!==this.code&&5020801!==this.code&&50208!==this.code&&50331!==this.code||0!==this.subSymbols.length)||this.subSymbols.push(new SuperMap.Plot.SubSymbol(-1,-1)),this.subSymbols},getTextPosition:function(){return this.annotationPosition},getTextContent:function(){return this.textContent},getBubbleHeight:function(){return this.bubbleHeight},setBubbleHeight:function(t){this.bubbleHeight=t},getBubbleWidth:function(){return this.bubbleWidth},setBubbleWidth:function(t){this.bubbleWidth=t},getDescription:function(){return this.description},setDescription:function(t){this.description=t},getMediaList:function(){return this.mediaList},setMediaList:function(t){this.mediaList=t},clearMediaList:function(){this.mediaList=[]},getExtendProperty:function(){return this.extendProperty},addAvoidRegion:function(t){t.symbolType===SuperMap.Plot.SymbolType.AVOIDREGION&&(this.avoidRegions.push(t),t.associatedUuid=this.uuid,this.redraw())},removeAvoidRegions:function(t){void 0===t&&(t=this.avoidRegions.slice()),SuperMap.Util.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var o=t[e];if(o.symbolType===SuperMap.Plot.SymbolType.AVOIDREGION)for(var i=0;i<this.avoidRegions.length;i++)if(this.avoidRegions[i]===o){this.avoidRegions.splice(i,1);break}}this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},getSymbolData:function(){return SuperMap.Plot.AnalysisSymbol.setSymbolData(this,this.symbolData,!0),this.symbolData},redraw:function(){var t=L.supermap.plotting.getControl().getPlotMapManager().getLayerScale();null!=this.graphic&&null!=this.graphic.layer&&!0===this.graphic.layer.getVisibility()?this.graphic.redraw():null!=this.layer&&(this._clearComponents(),"function"!=typeof this.layer.getVisibility?(this._redrawComponents(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)):this.layer.getVisibility()&&(null==this.childLayer||"function"!=typeof this.childLayer.getVisibility||this.childLayer.getVisibility())&&("function"!=typeof this.layer.getMinVisibleScale&&"function"!=typeof this.layer.getMaxVisibleScale||"function"==typeof this.layer.getMinVisibleScale&&"function"!=typeof this.layer.getMaxVisibleScale&&(t>=this.layer.getMinVisibleScale()||0===this.layer.getMinVisibleScale())||"function"!=typeof this.layer.getMinVisibleScale&&"function"==typeof this.layer.getMaxVisibleScale&&(0===this.layer.getMaxVisibleScale()||t<=this.layer.getMaxVisibleScale())||"function"==typeof this.layer.getMinVisibleScale&&"function"==typeof this.layer.getMaxVisibleScale&&0===this.layer.getMaxVisibleScale()&&t>=this.layer.getMinVisibleScale()||"function"==typeof this.layer.getMinVisibleScale&&"function"==typeof this.layer.getMaxVisibleScale&&0===this.layer.getMinVisibleScale()&&t<=this.layer.getMaxVisibleScale()||"function"==typeof this.layer.getMinVisibleScale&&"function"==typeof this.layer.getMaxVisibleScale&&(0===this.layer.getMinVisibleScale()&&0===this.layer.getMaxVisibleScale()||t>=this.layer.getMinVisibleScale()&&t<=this.layer.getMaxVisibleScale()))&&(this._redrawComponents(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},_redrawComponents:function(){"none"===this.style.display||null!=this.layer&&"function"==typeof this.layer.getVisibility&&!1===this.layer.getVisibility()?this.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL&&this.symbolType!==SuperMap.Plot.SymbolType.AlgoSymbol&&0!==this.libID||this._updateSymbolTexts():(this._calculateParts(),this._calculateAvoidRegions())},_calculateAvoidRegions:function(){if(0!==this.avoidRegions.length){for(var t=this.components.slice(),e=0;e<this.components.length;e++)this.components[e].removeEventParent(this),this.components[e]instanceof Qs||(this.components[e].onRemove(),delete this.components[e]);this.components.length=0;for(var o=0;o<this.avoidRegions.length;o++)if(0!==this.avoidRegions[o].getLatLngs().length){var i=this.avoidRegions[o];t=this._layersWithoutAvoidRegion(i,t)}for(var n=0;n<t.length;n++)this._addComponents(t[n])}},_layersWithoutAvoidRegion:function(t,e){for(var o=[],i=0;i<e.length;i++){var n=e[i];if(n instanceof Qs)o=o.concat(this._layersWithoutAvoidRegion(t,n.components)),n._clearComponents();else{if(1===t._relationToLayer(n))continue;if(n instanceof Hs||0!==t._relationToLayer(n))o.push(n);else if(n instanceof L.Polygon){var l={};l=SuperMap.Util.copyAttributes(l,n.options);var a=L.Util.latLngsToSuperMapPoints(n.getLatLngs()[0][0]),s=L.Util.latLngsToSuperMapPoints(n.getLatLngs()[0][n.getLatLngs()[0].length-1]);SuperMap.Plot.PlottingUtil.isSamePt(a[0],s[0])||n.getLatLngs()[0].push(n.getLatLngs()[0][0]),a=L.Util.latLngsToSuperMapPoints(n.getLatLngs()[0][0]),s=L.Util.latLngsToSuperMapPoints(n.getLatLngs()[0][n.getLatLngs()[0].length-1]),SuperMap.Plot.PlottingUtil.isSamePt(a[0],s[0])||n.getLatLngs()[0].push(n.getLatLngs()[0][0]);for(var r=0;r<n.getLatLngs().length;r++)for(var u=t._getWithoutPts(n.getLatLngs()[r],!0),p=0;p<u.length;p++){var h=L.polyline(L.Util.superMapPointsToLatLngs(u[p]),l);o.push(h)}}else if(n instanceof L.Polyline){var c={};c=SuperMap.Util.copyAttributes(c,n.options);for(var y=t._getWithoutPts(n.getLatLngs(),!1),g=0;g<y.length;g++){c.fill=!1;var f=L.polyline(L.Util.superMapPointsToLatLngs(y[g]),c);o.push(f)}}}}return o},_isDot:function(){return this.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL||this.symbolType===SuperMap.Plot.SymbolType.GROUPOBJECT||this.symbolType===SuperMap.Plot.SymbolType.FLAGGROUP||this.symbolType===SuperMap.Plot.SymbolType.ROUTENODE||this.symbolType===SuperMap.Plot.SymbolType.AIRDEPLOYMENT||this.symbolType===SuperMap.Plot.SymbolType.NAVYDEPLOYMENT||this.symbolType===SuperMap.Plot.SymbolType.PICTURE},_resizeOffset:function(t,e,o){var i=L.latLng(0,0);switch(e){case 1:i.lng=t.lng-o.getWest(),i.lat=t.lat-o.getNorth();break;case 3:i.lng=t.lng-o.getEast(),i.lat=t.lat-o.getNorth();break;case 6:i.lng=t.lng-o.getWest(),i.lat=t.lat-o.getSouth();break;case 8:i.lng=t.lng-o.getEast(),i.lat=t.lat-o.getSouth();break;case 2:i.lng=0,i.lat=t.lat-o.getNorth();break;case 4:i.lng=t.lng-o.getWest(),i.lat=0;break;case 5:i.lng=t.lng-o.getEast(),i.lat=0;break;case 7:i.lng=0,i.lat=t.lat-o.getSouth()}return i},_resizeBounds:function(t,e,o){var i=o.getWest(),n=o.getEast(),l=o.getNorth(),a=o.getSouth();switch(e){case 1:l=t.lat,i=t.lng;break;case 3:l=t.lat,n=t.lng;break;case 6:i=t.lng,a=t.lat;break;case 8:n=t.lng,a=t.lat;break;case 2:l=t.lat;break;case 4:i=t.lng;break;case 5:n=t.lng;break;case 7:a=t.lat}var s=new L.LatLngBounds;return s._southWest=L.latLng(a,i),s._northEast=L.latLng(l,n),s},_getHandleCount:function(){switch(this.symbolType){case SuperMap.Plot.SymbolType.ELLIPSESYMBOL:case SuperMap.Plot.SymbolType.CIRCLESYMBOL:case SuperMap.Plot.SymbolType.NEWARCSYMBOL:case SuperMap.Plot.SymbolType.NEWCHORDSYMBOL:case SuperMap.Plot.SymbolType.NEWPIESYMBOL:case SuperMap.Plot.SymbolType.ARCSYMBOL:case SuperMap.Plot.SymbolType.CHORDSYMBOL:case SuperMap.Plot.SymbolType.PIESYMBOL:case SuperMap.Plot.SymbolType.AVOIDREGION:case SuperMap.Plot.SymbolType.LINERELATION:case SuperMap.Plot.SymbolType.SYMBOLTEXT:case SuperMap.Plot.SymbolType.SYMBOLTEXT1:return this.getLatLngs().length+9;default:return 9}},_getHandlePointsByBounds:function(t){if(void 0!==t&&null!==t||(t=this.getBounds()),null!==t){var e=this._map.latLngToLayerPoint(L.latLng(t.getNorth(),t.getEast()));e.x+=5,e.y-=5;var o=this._map.latLngToLayerPoint(L.latLng(t.getNorth(),t.getWest()));o.x-=5,o.y-=5;var i=this._map.latLngToLayerPoint(L.latLng(t.getSouth(),t.getEast()));i.x+=5,i.y+=5;var n=this._map.latLngToLayerPoint(L.latLng(t.getSouth(),t.getWest()));n.x-=5,n.y+=5;for(var l=L.point((e.x+o.x)/2,e.y),a=L.point(e.x,(e.y+i.y)/2),s=L.point((i.x+n.x)/2,i.y),r=L.point(o.x,(o.y+n.y)/2),u=this._map.layerPointToLatLng(e),p=this._map.layerPointToLatLng(o),h=this._map.layerPointToLatLng(i),c=this._map.layerPointToLatLng(n),y=this._map.layerPointToLatLng(a),g=this._map.layerPointToLatLng(s),f=this._map.layerPointToLatLng(r),P=this._map.layerPointToLatLng(l),d=[p.clone(),P.clone(),u.clone(),f.clone(),y.clone(),c.clone(),g.clone(),h.clone()],S=1,m=0;m<d.length;m++)d[m].nHandle=S++;return d}},_getHandleAndRotatePoints:function(){var t={handlePoints:[],rotatePoints:[]},e=this.getBounds();if(!e.isValid())return t;if(this._getHandleCount()>9){if(this.symbolType===SuperMap.Plot.SymbolType.REGULARPOLYGON)t.handlePoints.push(this.getLatLngs()[0].clone()),t.handlePoints.push(this.getLatLngs()[this.getLatLngs().length-1].clone());else if(t.handlePoints=L.Util.cloneLatLngs(this.getLatLngs()),3801===this.code||4401===this.code||3701===this.code){var o=this.components[0]._latlngs;o.length>1?t.handlePoints[2]=o[1]:t.handlePoints[2]=o[0][1]}}else 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;var n=15;if(L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&(n=20),this.symbolType!==SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL&&this.symbolType!==SuperMap.Plot.SymbolType.LINERELATION&&this.symbolType!==SuperMap.Plot.SymbolType.SYMBOLTEXT&&this.symbolType!==SuperMap.Plot.SymbolType.SYMBOLTEXT1&&this.symbolType!==SuperMap.Plot.SymbolType.SYMBOLTEXTBOX&&this.symbolType!==SuperMap.Plot.SymbolType.LINEMARKING&&this.symbolType!==SuperMap.Plot.SymbolType.ANNOFRAMESYMBOLM&&this.symbolType!==SuperMap.Plot.SymbolType.ROUTENODE&&this.symbolType!==SuperMap.Plot.SymbolType.LITERATESIGN&&this.symbolType!==SuperMap.Plot.SymbolType.SATELLITE&&this.symbolType!==SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS&&this.symbolType!==SuperMap.Plot.SymbolType.AVOIDREGION&&this.symbolType!==SuperMap.Plot.SymbolType.NAVYDEPLOYMENT&&this.symbolType!==SuperMap.Plot.SymbolType.RECTANGLESYMBOL&&this.symbolType!==SuperMap.Plot.SymbolType.AIRDEPLOYMENT){var l=this._map.latLngToLayerPoint(L.latLng(e.getNorth(),e.getEast())),a=L.point(l.x+n,l.y-n),s=this._map.layerPointToLatLng(a);s.isRotatePoint=!0,t.rotatePoints=[s]}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(var t=0;t<this.symbolData.extendProperty.length;t++){var e=this.symbolData.extendProperty[t];this.extendProperty.addProperty(e.key,e.value)}if(Object.prototype.hasOwnProperty.call(this.symbolData,"subSymbols")&&this.symbolData.subSymbols&&0!==this.symbolData.subSymbols.length){this.subSymbols=[];for(var o=0;o<this.symbolData.subSymbols.length;o++){var i=this.symbolData.subSymbols[o].libID;void 0===i&&(i=this.libID);var n=this.symbolData.subSymbols[o].code;if(void 0!==n){var l={};void 0!==this.symbolData.subSymbols[o]&&(l.symbolData=this.symbolData.subSymbols[o].symbolData),void 0!==this.symbolData.subSymbols[o].textContent&&(l.textContent=this.symbolData.subSymbols[o].textContent),void 0!==this.symbolData.subSymbols[o].totalNum&&(l.totalNum=this.symbolData.subSymbols[o].totalNum),this.subSymbols.push(new SuperMap.Plot.SubSymbol(i,n,l))}}}if(this.symbolData.avoidRegions&&0!==this.symbolData.avoidRegions.length)for(var a=0;a<this.symbolData.avoidRegions.length;a++){var s={libID:0,code:SuperMap.Plot.SymbolType.AVOIDREGION,map:this._map,symbolData:this.symbolData.avoidRegions[a][0]},r=L.supermap.plotting.avoidRegion(0,SuperMap.Plot.SymbolType.AVOIDREGION,[],s);r.style=SuperMap.Plot.AnalysisSymbol.getStyle(this.symbolData.avoidRegions[a][1],!0),this.avoidRegions.push(r)}}},_setSymbolData:function(t){if(void 0===t&&(t=!0),null===this.symbolData&&(this.symbolData={}),Object.prototype.hasOwnProperty.call(this.symbolData,"type")||(this.symbolData.type="GRAPHICOBJECT"),Object.prototype.hasOwnProperty.call(this.symbolData,"rotate2D")?this.symbolData.rotate2D.x=this.dRotate:this.symbolData.rotate2D={x:this.dRotate,y:0,z:0},Object.prototype.hasOwnProperty.call(this.symbolData,"scale2D")?this.symbolData.scale2D.x=this.dScale:this.symbolData.scale2D={x:this.dScale,y:0,z:0},this.symbolData.libID=this.libID,this.symbolData.code=this.code,this.symbolData.isEdit=!0,this.symbolData.uuid=this.uuid,this.symbolData.symbolType=this.symbolType,this.symbolData.symbolName=this.symbolName,this.symbolData.associatedUuid=this.associatedUuid,this.symbolData.annotationPosition=this.annotationPosition,this.symbolData.textContent=this.textContent,this.symbolData.isLocked=this.isLocked,this.symbolData.note=this.note,this.symbolData.custom=this.custom,this.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL&&this.symbolType!==SuperMap.Plot.SymbolType.GROUPOBJECT){this.symbolData.subSymbols=[];for(var e=0;e<this.getSubSymbols().length;e++){var o=this.getSubSymbols()[e];t?this.symbolData.subSymbols.push({libID:o.libID,code:o.code,symbolData:o.symbolData,textContent:o.textContent,totalNum:o.totalNum}):this.symbolData.subSymbols.push({libID:o.libID,code:o.code,textContent:o.textContent,totalNum:o.totalNum})}}this.symbolData.extendProperty=[];for(var i=this.getExtendProperty().getPropertyCount(),n=0;n<i;n++){var l=this.getExtendProperty().getPropertyByIndex(n);this.symbolData.extendProperty.push({key:l.key,value:l.value})}this.symbolData.avoidRegions=[];for(var a=0;a<this.avoidRegions.length;a++){var s={};SuperMap.Plot.AnalysisSymbol.setStyle(this.avoidRegions[a].style,s,!0),this.symbolData.avoidRegions.push([this.avoidRegions[a].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 o=t.dotSymbolSize/e;this.symbolSize.w=o*this.symbolSizeInLib.w,this.symbolSize.h=o*this.symbolSizeInLib.h}}-1!==t.dotTextSpace&&(this.space=t.dotTextSpace),-1!==t.flagTextSize&&(this.flagTextSize=t.flagTextSize)}this.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&(null!=t.maxScale&&(this.maxScale=t.maxScale),null!=t.minScale&&(this.minScale=t.minScale)),-1!==t.scaleByMap&&(this.scaleByMap=t.scaleByMap)}},_removeRedundancySymbolData:function(t){null!==t&&(Object.prototype.hasOwnProperty.call(t,"center")&&delete t.center,Object.prototype.hasOwnProperty.call(t,"id")&&delete t.id,Object.prototype.hasOwnProperty.call(t,"parts")&&delete t.parts,Object.prototype.hasOwnProperty.call(t,"points")&&delete t.points,Object.prototype.hasOwnProperty.call(t,"position")&&delete t.position,Object.prototype.hasOwnProperty.call(t,"prjCoordSys")&&delete t.prjCoordSys,Object.prototype.hasOwnProperty.call(t,"rotationX")&&delete t.rotationX,Object.prototype.hasOwnProperty.call(t,"rotationY")&&delete t.rotationY,Object.prototype.hasOwnProperty.call(t,"rotationZ")&&delete t.rotationZ,Object.prototype.hasOwnProperty.call(t,"scaleX")&&delete t.scaleX,Object.prototype.hasOwnProperty.call(t,"scaleY")&&delete t.scaleY,Object.prototype.hasOwnProperty.call(t,"scaleZ")&&delete t.scaleZ)},destroy:function(){this.layer.removeFeatures(this)},updateByGeoJson:function(t){t.isEdit=!0,SuperMap.Plot.AnalysisSymbol.parseSymbolData(this,t,!0),this.redraw(),this.isSelected&&"none"!==this.style.display&&(this.fire(SuperMap.Plot.Event.reseteditmarkersvalues),this._map.getPlotEditControl().fire(SuperMap.Plot.Event.updateFeature,{feature:this}))},toGeoJsonStr:function(){return this.getSymbolData(),SuperMap.Plot.PlottingUtil.toJSON(this.symbolData)}});L.supermap.plotting.PlottingObject=Qs,Qs.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,o,i,n,l){i||(i={}),i.custom=l;var a=null;if(i&&i.symbolData&&i.symbolData.textStyle2D&&void 0===i.symbolData.textStyle2D.sizeFixed&&(i.symbolData.textStyle2D.sizeFixed=!0),null==o||SuperMap.Util.isArray(o)||(o=[o]),0===t)switch(e){case SuperMap.Plot.SymbolType.ARCREGION:a=L.supermap.plotting.arcRegion(t,e,o,i);break;case SuperMap.Plot.SymbolType.MISSILEROUTE:a=L.supermap.plotting.missileRoute(t,e,o,i);break;case SuperMap.Plot.SymbolType.NAVYROUTE:a=L.supermap.plotting.navyRoute(t,e,o,i);break;case SuperMap.Plot.SymbolType.AIRROUTE:a=L.supermap.plotting.airRoute(t,e,o,i);break;case SuperMap.Plot.SymbolType.LITERATESIGN:a=L.supermap.plotting.literateSign(t,e,o,i);break;case SuperMap.Plot.SymbolType.ROUTENODE:a=L.supermap.plotting.routeNode(t,e,o,i);break;case SuperMap.Plot.SymbolType.PATHTEXT:a=L.supermap.plotting.pathText(t,e,o,i);break;case SuperMap.Plot.SymbolType.FREECURVE:a=L.supermap.plotting.freeCurve(t,e,o,i);break;case SuperMap.Plot.SymbolType.LINERELATION:a=L.supermap.plotting.lineRelation(t,e,o,i);break;case SuperMap.Plot.SymbolType.GROUPOBJECT:a=L.supermap.plotting.groupObject(t,e,o,i);break;case SuperMap.Plot.SymbolType.INTERFERENCEBEAM:a=L.supermap.plotting.interferenceBeam(t,e,o,i);break;case SuperMap.Plot.SymbolType.SATELLITE:a=L.supermap.plotting.satellite(t,e,o,i);break;case SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS:a=L.supermap.plotting.satelliteTimeWindows(t,e,o,i);break;case SuperMap.Plot.SymbolType.SYMBOLTEXT:a=L.supermap.plotting.symbolText(t,e,o,i);break;case SuperMap.Plot.SymbolType.SYMBOLTEXT1:a=L.supermap.plotting.symbolText1(t,e,o,i);break;case SuperMap.Plot.SymbolType.FLAGGROUP:a=L.supermap.plotting.flagGroup(t,e,o,i);break;case SuperMap.Plot.SymbolType.NAVYDEPLOYMENT:a=L.supermap.plotting.navyDeployment(t,e,o,i);break;case SuperMap.Plot.SymbolType.AIRDEPLOYMENT:a=L.supermap.plotting.airDeployment(t,e,o,i);break;case SuperMap.Plot.SymbolType.AVOIDREGION:return L.supermap.plotting.avoidRegion(t,e,o,i);case SuperMap.Plot.SymbolType.PICTURE:a=L.supermap.plotting.picture(t,e,o,i);break;default:a=L.supermap.plotting.algoSymbol(t,e,o,i)}else a=i.symbolData&&i.symbolData.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL?L.supermap.plotting.dotSymbol(t,e,o,i):L.supermap.plotting.algoSymbol(t,e,o,i);var s=L.supermap.plotting.getControl().getDefaultStyle();return SuperMap.Plot.AnalysisSymbol.mergeDefaultStyleToFeature(a,s,!0),n&&SuperMap.Util.extend(a.style,n),null!=o&&o.length>0&&(o.length>a.maxEditPts&&(o=o.slice(0,a.maxEditPts)),a.latLngs=L.Util.cloneLatLngs(o)),a};var $s=Qs.extend({subObjects:[],initialize:function(t,e,o,i){this.subObjects=[],this.symbolName="组合对象",this.libID=0,this.code=SuperMap.Plot.SymbolType.GROUPOBJECT,this.symbolType=SuperMap.Plot.SymbolType.GROUPOBJECT,Qs.prototype.initialize.call(this,t,e,o,i)},_addComponents:function(t){Qs.prototype._addComponents.call(this,t),t.layer=this.layer,t.isEdit=!0,ir&&(t.dragging||(t.dragging=new ir(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),Qs.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 o in this.subObjects)this.subObjects[o].move(t,e);this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},redraw:function(){if("none"===this.style.display||null!=this.layer&&"function"==typeof this.layer.getVisibility&&!1===this.layer.getVisibility())this._clearComponents();else if(0!==this.subObjects.length&&0===this.components.length)for(var t=0,e=this.subObjects.length;t<e;t++)void 0!==this.subObjects[t].layer&&this.subObjects[t].layer.removeFeatures(this.subObjects[t]),this.subObjects[t].ownerGroup=this,this.subObjects[t].enableEdit=!0,this._addComponents(this.subObjects[t])},setRotate:function(t){null===this.anchorPoint&&(this.anchorPoint=this.getBounds().getCenter()),this._rotate(t,this.anchorPoint),this.dRotate=t,this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},setScale:function(t){null===this.anchorPoint&&(this.anchorPoint=this.getBounds().getCenter()),this._resize(t/this.dScale,this.anchorPoint),this.dScale=t,this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},_unGroupObject:function(){var t=null;if(0!==this.subObjects.length){t=this.subObjects.slice(),this._clearComponents();for(var e=0,o=t.length;e<o;e++)this.layer.addFeatures(t[e]),t[e].ownerGroup=null}return t},removeComponents:function(t){SuperMap.Util.isArray(t)||(t=[t]);for(var e=[],o=0;o<t.length;o++){this.subObjects.splice(SuperMap.Util.indexOf(this.subObjects,t[o]),1);var i=SuperMap.Util.indexOf(this.components,t[o]);-1!==i&&(this.components[i]._clearComponents(),this.components.splice(i,1)),e.push(t[o])}for(var n=0;n<e.length;n++)e[n].addTo(this._map),e[n].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&&(Qs.prototype._parseSymbolData.call(this),this.symbolData&&this.symbolData.subFeatures)){for(var t=[],e=0;e<this.symbolData.subFeatures.length;e++){var o=this.symbolData.subFeatures[e];o.uuid=SuperMap.Plot.PlottingUtil.generateUuid();var i=L.supermap.plotting.PlottingObject.createSymbol(o.libID,o.code,null,{symbolData:o});t.push(i)}this.subObjects=t}},_setSymbolData:function(){if(Qs.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 o=0;o<this.components.length;o++)this.components[o]._rotate(t,e)},_resize:function(t,e){for(var o=0;o<this.components.length;o++)this.components[o]instanceof $s?this.components[o]._resize(t,e):0!==this.components[o].avoidRegions.length?(this.components[o]._resize(t,this.anchorPoint),this.components[o].redraw()):this.components[o]._resize(t,this.anchorPoint)},destroy:function(){Qs.prototype.destroy.call(this),this.subObjects=[]}});L.supermap.plotting.groupObject=function(t,e,o,i){return new $s(t,e,o,i)},L.supermap.plotting.GroupObject=$s;var tr={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},er={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"};function or(t,e){var o=t.x-e.x,i=t.y-e.y;return Math.sqrt(o*o+i*i)}var ir=L.Handler.extend({statics:{DRAGGING_CLS:"leaflet-plottingObject-draggable"},initialize:function(t){this._plottingObject=t,this._startPoint=null,this._dragStartPoint=null,this._mapDraggingWasEnabled=!1,this.moveIcon=L.divIcon({className:"leaflet-supermap-plot-move-icon-path",iconSize:[30,30]}),this.moveMarker=null},addHooks:function(){if(L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()){var t=this._plottingObject.getBounds();this.moveMarker=L.marker(t.getCenter(),{icon:this.moveIcon}),this._addToMapAndBindMarker(this.moveMarker),this._plottingObject.on("reseteditmarkersvalues",this._onResetEditMarkersValues,this)}else this._plottingObject.on("mousedown",this._onDragStart,this),this._plottingObject.options.className=this._plottingObject.options.className?this._plottingObject.options.className+" "+ir.DRAGGING_CLS:ir.DRAGGING_CLS,this._plottingObject._plottingObject&&L.DomUtil.addClass(this._plottingObject._plottingObject,ir.DRAGGING_CLS);this._mapDraggingWasEnabled=this._plottingObject._map.dragging.enabled(),this._plottingObject._map.dragging.disable()},removeHooks:function(){L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()?(this._unbindMarkerEvents(this.moveMarker),this._plottingObject._map.removeLayer(this.moveMarker),this._plottingObject.off("reseteditmarkersvalues",this._onResetEditMarkersValues,this)):(this._plottingObject.off("mousedown",this._onDragStart,this),this._plottingObject.options.className=this._plottingObject.options.className.replace(new RegExp("\\s+"+ir.DRAGGING_CLS),""),this._plottingObject._plottingObject&&L.DomUtil.removeClass(this._plottingObject._plottingObject,ir.DRAGGING_CLS)),this._mapDraggingWasEnabled&&this._plottingObject._map.dragging.enable()},moved:function(){return this._plottingObject._dragMoved},_onDragStart:function(t){var e=t.originalEvent._simulated?"touchstart":t.originalEvent.type;this._startPoint=t.latlng.clone(),this._dragStartPoint=t.latlng.clone(),L.DomEvent.stop(t.originalEvent),L.DomEvent.on(document,er[e],this._onDrag,this).on(document,tr[e],this._onDragEnd,this),this._plottingObject._dragMoved=!1},_onDrag:function(t){var e=t.touches&&t.touches.length>=1?t.touches[0]:t,o=this._plottingObject._map.mouseEventToLatLng(e);if("touchmove"===t.type&&!this._plottingObject._dragMoved){var i=this._plottingObject._map.latLngToLayerPoint(this._dragStartPoint),n=this._plottingObject._map.mouseEventToContainerPoint(e);if(i.distanceTo(n)<=this._plottingObject._map.options.tapTolerance)return}var l=o.lat,a=o.lng,s=l-this._startPoint.lat,r=a-this._startPoint.lng;(s||r)&&(this._plottingObject._dragMoved||(this._plottingObject._dragMoved=!0,this._plottingObject.fire("dragstart",t)),this._startPoint.lat=l,this._startPoint.lng=a,this._plottingObject.fire("predrag",t),t.dLat=s,t.dLng=r,this._plottingObject.fire("drag",t))},_onDragEnd:function(t){var e=this._plottingObject._map.mouseEventToLatLng(t),o=this.moved();if(o&&L.DomEvent.stop(t),L.DomEvent.off(document,"mousemove touchmove",this._onDrag,this),L.DomEvent.off(document,"mouseup touchend",this._onDragEnd,this),o){this._plottingObject.fire("dragend",{distance:or(this._dragStartPoint,e)});var i=this._plottingObject._containsPoint;this._plottingObject._containsPoint=L.Util.falseFn,L.Util.requestAnimFrame(function(){this._plottingObject._containsPoint=i},this)}this._startPoint=null,this._dragStartPoint=null,this._plottingObject._dragMoved=!1,o&&(this._plottingObject.moveend=!0)},_dragStart:function(t){this._startPoint=t.target._latlng.clone(),this._dragStartPoint=t.target._latlng.clone(),this._plottingObject._dragMoved=!1},_drag:function(t){var e=t.target._latlng,o=e.lat,i=e.lng,n=o-this._startPoint.lat,l=i-this._startPoint.lng;(n||l)&&(this._plottingObject._dragMoved||(this._plottingObject._dragMoved=!0,this._plottingObject.fire("dragstart",t)),this._startPoint.lat=o,this._startPoint.lng=i,this._plottingObject.fire("predrag",t),t.dLat=n,t.dLng=l,this._plottingObject.fire("drag",t))},_dragEnd:function(t){var e=t.target._latlng,o=this.moved();if(o){this._plottingObject.fire("dragend",{distance:or(this._dragStartPoint,e)});var i=this._plottingObject._containsPoint;this._plottingObject._containsPoint=L.Util.falseFn,L.Util.requestAnimFrame(function(){this._plottingObject._containsPoint=i},this)}this._startPoint=null,this._dragStartPoint=null,this._plottingObject._dragMoved=!1,o&&(this._plottingObject.moveend=!0)},_addToMapAndBindMarker:function(t){t.addTo(this._plottingObject._map),t.on("dragstart",this._dragStart,this),t.on("drag",this._drag,this),t.on("dragend",this._dragEnd,this),t.dragging.enable()},_unbindMarkerEvents:function(t){null!=t&&(t.off("dragstart",this._dragStart,this),t.off("drag",this._drag,this),t.off("dragend",this._dragEnd,this),t.dragging.disable())},_onResetEditMarkersValues:function(){var t=this._plottingObject.getBounds();this.moveMarker._latlng=t.getCenter(),this.moveMarker.update()}}),nr=Qs.extend({surroundLineType:null,scaleByMap:null,latLngs:[],initialize:function(t,e,o,i){this.geoSymbolTexts=[],this.subAssociatedUuids=[],this.latLngs=o||[],Qs.prototype.initialize.call(this,t,e,o,i),null===this.surroundLineType&&(this.surroundLineType=SuperMap.Plot.AlgoSurroundLineType.NONE)},destroy:function(){Qs.prototype.destroy.call(this),this.surroundLineType=null,this.scaleByMap=null,this.latLngs=[]},setLatLngs:function(t){return this.latLngs=t,this.redraw()},getLatLngs:function(){return this.latLngs},addLatLng:function(t){if(this.latLngs[this.latLngs.length-1].lat!==t.lat||this.latLngs[this.latLngs.length-1].lng!==t.lng)return this.latLngs.push(t),this.redraw()},setScaleByMap:function(t){this.scaleByMap=t,this.redraw()},getScaleByMap:function(){return this.scaleByMap},getSurroundLineType:function(){return this.surroundLineType},setSurroundLineType:function(){},_resizeLatLngs:function(t,e,o,i){if(this.symbolType!==SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS){var n=this._resizeBounds(t,e,o);if(!(SuperMap.Plot.PlottingUtil.equalFuzzy(n.getWest(),n.getEast())&&SuperMap.Plot.PlottingUtil.equalFuzzy(n.getNorth(),n.getSouth())||SuperMap.Plot.PlottingUtil.equalFuzzy(o.getWest(),o.getEast())&&SuperMap.Plot.PlottingUtil.equalFuzzy(o.getNorth(),o.getSouth()))){var l=SuperMap.Plot.PlottingUtil.equalFuzzy(o.getWest(),o.getEast())?0:(n.getEast()-n.getWest())/(o.getEast()-o.getWest()),a=SuperMap.Plot.PlottingUtil.equalFuzzy(o.getNorth(),o.getSouth())?0:(n.getNorth()-n.getSouth())/(o.getNorth()-o.getSouth()),s=L.latLng((o.getNorth()+o.getSouth())/2,(o.getWest()+o.getEast())/2),r=L.latLng((n.getNorth()+n.getSouth())/2,(n.getWest()+n.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+(i[0].lng-s.lng)*l,this.latLngs[0].lat=r.lat+(i[0].lat-s.lat)*a,this.latLngs[1].lng=r.lng+(i[1].lng-s.lng)*l,this.latLngs[1].lat=r.lat+(i[1].lat-s.lat)*a;else if(this.symbolType===SuperMap.Plot.SymbolType.CONCENTRICCIRCLE)if(2===e||4===e||5===e||7===e){1===l&&(l=0),1===a&&(a=0);for(var u=Math.sqrt(l*l+a*a),p=L.Util.latLngsToSuperMapPoints(i),h=1;h<p.length;h++)p[h]=SuperMap.Plot.PlottingUtil.findPointInLine(p[0],p[h],SuperMap.Plot.PlottingUtil.distance(p[0],p[h])*u);this.latLngs=L.Util.superMapPointsToLatLngs(p)}else{for(var c=Math.sqrt(l*l+a*a)/Math.sqrt(2),y=L.Util.latLngsToSuperMapPoints(i),g=1;g<y.length;g++)y[g]=SuperMap.Plot.PlottingUtil.findPointInLine(y[0],y[g],SuperMap.Plot.PlottingUtil.distance(y[0],y[g])*c);this.latLngs=L.Util.superMapPointsToLatLngs(y)}else for(var f=0;f<i.length;f++)this.latLngs[f].lng=r.lng+(i[f].lng-s.lng)*l,this.latLngs[f].lat=r.lat+(i[f].lat-s.lat)*a}}},_getLatLng:function(t,e,o){var i=0,n=0;switch(t){case 1:i=e.getWest()+o.lng,n=e.getNorth()+o.lat;break;case 3:i=e.getEast()+o.lng,n=e.getNorth()+o.lat;break;case 6:i=e.getWest()+o.lng,n=e.getSouth()+o.lat;break;case 8:i=e.getEast()+o.lng,n=e.getSouth()+o.lat;break;case 2:i=(e.getEast()+e.getWest())/2,n=e.getNorth()+o.lat;break;case 4:i=e.getWest()+o.lng,n=(e.getNorth()+e.getSouth())/2;break;case 5:i=e.getEast()+o.lng,n=(e.getNorth()+e.getSouth())/2;break;case 7:i=(e.getEast()+e.getWest())/2,n=e.getSouth()+o.lat}return L.latLng(n,i)},_setSymbolData:function(t){if(Qs.prototype._setSymbolData.call(this,t),this.symbolData){SuperMap.Plot.AnalysisSymbol.setStyle(this.style,this.symbolData,!0),this.symbolData.scaleByMap=this.scaleByMap,this.symbolData.surroundLineType=this.surroundLineType,this.symbolData.algoMaxEditPts=this.maxEditPts,this.symbolData.algoMinEditPts=this.minEditPts,Object.prototype.hasOwnProperty.call(this.symbolData,"localePoints")||(this.symbolData.localePoints=[]);for(var e=this.getLatLngs().length,o=0;o<e;o++)this.symbolData.localePoints.length>o?(this.symbolData.localePoints[o].x=this.getLatLngs()[o].lng,this.symbolData.localePoints[o].y=this.getLatLngs()[o].lat):this.symbolData.localePoints.push({x:this.getLatLngs()[o].lng,y:this.getLatLngs()[o].lat,z:0})}},_parseSymbolData:function(){if(Qs.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=[],o="";null!==this._map&&this._map instanceof L.Map&&(o=this._map.options.crs.code);for(var i=0;i<t.length;i++)if(0!==this.surroundLineType||!0!==t[i].surroundLineFlag){L.Util.isMercatorProjection(o)&&(t[i].positionPoints=L.Util.conventProjectPts(L.Util.superMapPointsToLatLngs(t[i].positionPoints)));var n={type:t[i].type,positionPoints:SuperMap.Plot.PlottingUtil.clonePoints(t[i].positionPoints),style:SuperMap.Util.cloneObject(t[i].style),angle:t[i].angle,isCalculate:t[i].isCalculate,textContent:t[i].textContent};1===this.symbolType?n.positionPoints=SuperMap.Plot.Primitives.getSpatialData(n.type,n.positionPoints,n.angle,!1):n.positionPoints=SuperMap.Plot.Primitives.getSpatialData(n.type,n.positionPoints,n.angle,n.isCalculate),e.push(n)}0!==e.length&&this._addSurroundLineCells(e);for(var l=0;l<e.length;l++)L.Util.isMercatorProjection(o)?e[l].positionPoints=L.Util.unConventProjectPts(e[l].positionPoints):e[l].positionPoints=L.Util.superMapPointsToLatLngs(e[l].positionPoints),this._createAndDrawLayer(e[l].type,e[l].positionPoints,e[l].style,e[l].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,o,i,n){var l=this._createLayer(t,e,i,n);2e3===t&&this._addComponents(l),null==o&&(o={}),this._isPolylineType(t)&&(o.fillLimit=!0,o.fill=!1);var a={};if(a=SuperMap.Util.copyAttributes(a,o),this._copyStyleForCell(a,this.style,l),34===t&&!1===o.sizeFixed){var s=this._map.latLngToLayerPoint(e[0]),r=this._map.latLngToLayerPoint(L.latLng(e[0].lat+a.fontSize,e[0].lng));a.fontSize=Math.abs(r.y-s.y)}else if(this.scaleByMap){var u=1;if("function"==typeof this.layer.getSymZoomScale&&(u=this.layer.getSymZoomScale()),null!=this.minScale&&u<this.minScale?u=this.minScale:null!=this.maxScale&&u>this.maxScale&&(u=this.maxScale),null!=a.fontSize&&(a.fontSize=a.fontSize*u),null!=a.fontSpace&&(a.fontSpace=a.fontSpace*u),null!=a.weight&&(a.weight=a.weight*u),null!=a.dashArray){for(var p=a.dashArray.split(","),h=0;h<p.length;h++)p[h]=parseInt(p[h])*u;a.dashArray=p.join()}a.surroundLineWidth&&(a.surroundLineWidth=this.style.surroundLineWidth*u)}return L.setOptions(l,a),2e3===t?l.redraw():this._addComponents(l),l},_createLayer:function(t,e,o,i){var n=null;switch(t){case 24:case 44:case 48:case 290:case 400:case 590:n=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:n=L.polygon(e,{smoothFactor:0});break;case 26:n=L.rectangle(e);break;case 34:n=L.supermap.plotting.text(e,{text:o});break;case 2e3:n=L.circle(e[0],i)}return n},_addSurroundLineCells:function(t){if(this.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL){if(this.symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL)return null;if(this._map){var e=[],o=[],i={},n={},l={},a={},s=this.surroundLineType===SuperMap.Plot.AlgoSurroundLineType.OUT?1:-1,r=1;this.scaleByMap&&("function"==typeof this.layer.getSymZoomScale&&(r=this.layer.getSymZoomScale()),null!=this.minScale&&r<this.minScale&&(r=this.minScale),null!=this.maxScale&&r>this.maxScale&&(r=this.maxScale));for(var u=0,p=t.length;u<p;u++)if((!t[u].style.lineWidthLimit||0!==t[u].style.weight)&&((i=SuperMap.Util.cloneObject(t[u].style)).surroundLineFlag=!0,i.fill=!1,i.fillLimit=!0,i.fillColorLimit=!0,!0!==t[u].style.surroundLineLimit?t[u].style.surroundLineType=this.surroundLineType:void 0===t[u].style.surroundLineType&&(t[u].style.surroundLineType=SuperMap.Plot.AlgoSurroundLineType.NONE),t[u].style.surroundLineType!==SuperMap.Plot.AlgoSurroundLineType.NONE&&t[u].type!==SuperMap.Plot.SymbolType.TEXTSYMBOL&&0!==t[u].positionPoints.length)){if(t[u].style.surroundLineType===SuperMap.Plot.AlgoSurroundLineType.INNER||t[u].style.surroundLineType===SuperMap.Plot.AlgoSurroundLineType.OUT){var h=this.style.surroundLineWidth/2+this.style.weight/2;!0===t[u].style.surroundLineLimit&&!0===t[u].style.lineWidthLimit?h=t[u].style.surroundLineWidth/2+t[u].style.weight/2:!0===t[u].style.surroundLineLimit&&!0!==t[u].style.lineWidthLimit?h=t[u].style.surroundLineWidth/2+this.style.weight/2:!0!==t[u].style.surroundLineLimit&&!0===t[u].style.lineWidthLimit&&(h=this.style.surroundLineWidth/2+t[u].style.weight/2);var c=this._map.layerPointToLatLng(L.point(0,0)),y=this._map.layerPointToLatLng(L.point(h*r,0)),g=new SuperMap.Geometry.Point(c.lng,c.lat),f=new SuperMap.Geometry.Point(y.lng,y.lat),P=SuperMap.Plot.PlottingUtil.distance(g,f),d=1;(SuperMapAlgoPlot.AlgoSymbolFactory.calSurroundLineDir(this.libID,this.code)||32===t[u].type||29===t[u].type||31===t[u].type||26===t[u].type||44===t[u].type)&&(d=SuperMap.Plot.PlottingUtil.innerOutlineDir(t[u].positionPoints));var S=d*s*P;if(this._isPolylineType(t[u].type)||t[u].positionPoints.push(t[u].positionPoints[0]),0===(e=SuperMap.Plot.PlottingUtil.getSurroundLinePts(t[u].positionPoints,S)).length)continue;n={type:t[u].type,positionPoints:e,style:i},t.splice(++u,0,n),++p}if(t[u].style.surroundLineType===SuperMap.Plot.AlgoSurroundLineType.ALL){if(0===(e=SuperMap.Plot.PlottingUtil.clonePoints(t[u].positionPoints)).length)continue;if(n={type:t[u].type,positionPoints:e,style:i},t.splice(++u,0,n),++p,0===(o=SuperMap.Plot.PlottingUtil.clonePoints(t[u].positionPoints)).length)continue;delete(a=SuperMap.Util.copyAttributes(a,this.style)).fillSymbolID,a.surroundLineFlag=!1,a.fill=!1,a.fillLimit=!0,a.fillColorLimit=!0,l={type:t[u].type,positionPoints:o,style:a},t.splice(++u,0,l),++p}}}}},_updateSymbolTexts:function(){for(var t=0;t<this.geoSymbolTexts.length;t++){var e=this.geoSymbolTexts[t];if(null===e||void 0===e)return;null==e.layer||null!=e.layer.getVisibility&&!0!==e.layer.getVisibility()||(e.fromZoom=this.fromZoom,e.redraw())}},_updateCanvasFills:function(){for(var t=0,e=this.components.length;t<e;t++)!1!==this.components[t].options.fillLimit&&!1!==Boolean(this.components[t].options.fillLimit)||(!0!==this.components[t].options.fill||"LINEAR"!==this.style.fillGradientMode&&"RADIAL"!==this.style.fillGradientMode?this.components[t].options.fillSymbolID>=2&&new SuperMap.Plot.CalculateCanvasGradient(this,this.components[t].getBounds()).createFillMode(this.components[t].options):this._computeGradientInCanvas(this.components[t],this.components[t].options,this.style))},_rotate:function(t,e){for(var o in this.components)this.components[o]instanceof nr?this.components[o]._rotate(t,e):(this.components[o]instanceof Zs&&(this.components[o].options.rotation+=-t),this.components[o]instanceof Hs&&(this.components[o].options.labelRotation?(this.components[o].options.labelRotation+=-t,this.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&0===this.components[o].options.labelRotation&&(this.components[o].options.labelRotation=360)):this.components[o].options.labelRotation=-t),L.Util.rotateLatLngs(this.components[o].getLatLngs(),e,t),this.components[o].setLatLngs(this.components[o].getLatLngs()));L.Util.rotateLatLngs(this.getLatLngs(),e,t)},_move:function(t,e){if(null!=this.graphic&&null!=this.graphic.layer&&!0===this.graphic.layer.getVisibility())L.Util.moveLatLngs(this.getLatLngs(),t,e),this.graphic.update();else if(null!=this.layer&&(null==this.layer.getVisibility||!0===this.layer.getVisibility())){for(var o=0,i=this.components.length;o<i;o++)L.Util.moveLatLngs(this.components[o].getLatLngs(),t,e),this.components[o].setLatLngs(this.components[o].getLatLngs());this._renderer instanceof L.Canvas&&this._updateCanvasFills(),L.Util.moveLatLngs(this.getLatLngs(),t,e),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)}},_resize:function(t,e){for(var o in isNaN(t)&&(t=1),this.symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL&&(this.style.fontSize*=t),this.components)this.components[o]instanceof nr?this.components[o]._resize(t,e):(this.components[o]instanceof Zs&&(this.components[o].options.graphicWidth*=t,this.components[o].options.graphicHeight*=t),this.components[o]instanceof Hs&&(this.components[o].options.fontSize*=t),L.Util.resizeLatLngs(this.components[o].getLatLngs(),e,t),this.components[o].setLatLngs(this.components[o].getLatLngs()));L.Util.resizeLatLngs(this.getLatLngs(),e,t)},_computeGradientInCanvas:function(t,e){t.getBounds().isValid()&&(e.fillColor=new SuperMap.Plot.CalculateCanvasGradient(this,t.getBounds()).createGradient())},_computeGradientInSVG:function(t){t.fillColor="url(#"+new SuperMap.Plot.CalculateSVGGradient(this).createGradient()+")"},_dashArray:function(t,e){return 1===t?[2*e,2*e].join():2===t?[0,2*e].join():3===t?[2*e,2*e,0,2*e].join():4===t?[2*e,2*e,0,2*e,0,2*e].join():null},_lineSymbolID:function(t,e){return t===[2*e,2*e].join()?1:t===[0,2*e].join()?2:t===[2*e,2*e,0,2*e].join()?3:t===[2*e,2*e,0,2*e,0,2*e].join()?4:0},_copyStyleForFeature:function(t,e){if(!0===e.surroundLineLimit&&(t.surroundLineColor=e.surroundLineColor,t.surroundLineColorOpacity=e.surroundLineColorOpacity,t.surroundLineWidth=e.surroundLineWidth),e.lineWidthLimit&&(t.weight=e.weight),e.lineColorLimit&&(t.color=e.color,t.opacity=e.opacity),e.lineTypeLimit)if(null===e.dashArray||void 0===e.dashArray)t.lineSymbolID=0;else{var o=e.weight;t.lineSymbolID=this._lineSymbolID(e.dashArray,o)}e.fillLimit&&(void 0===e.fill||!1===e.fill?t.fillSymbolID=1:t.fillSymbolID=0,e.fillColorLimit?null===e.fillColor||void 0===e.fillColor?(t.fillColor=e.color,t.fillOpacity=e.opacity):(t.fillColor=e.fillColor,t.fillOpacity=e.opacity):(t.fillColor=e.color,t.fillOpacity=e.opacity),t.fillGradientMode=e.fillGradientMode),e.fontSizeLimit&&(t.fontSize=e.fontSize),e.fontColorLimit&&(t.fontColor=e.fontColor),void 0!==e.labelAlign&&(t.labelAlign=e.labelAlign),void 0!==e.labelRotation&&(t.labelRotation=e.labelRotation),(e.fontSizeLimit||e.fontColorLimit)&&(t.fontWeight=e.fontWeight,t.fontStyle=e.fontStyle,t.fontStroke=e.fontStroke,t.fontStrokeColor=e.fontStrokeColor,t.fontStrokeWidth=e.fontStrokeWidth,t.fontBackground=e.fontBackground,t.fontBackgroundColor=e.fontBackgroundColor,t.fontShadow=e.fontShadow,t.fontShadowColor=e.fontShadowColor,t.fontShadowOffsetX=e.fontShadowOffsetX,t.fontShadowOffsetY=e.fontShadowOffsetY,t.fontSpace=e.fontSpace,t.fontPercent=e.fontPercent,t.fontFamily=e.fontFamily,t.fontOpacity=e.fontOpacity),t.graphicWidth<0&&(t.graphicWidth=Math.abs(t.graphicWidth)),t.graphicHeight<0&&(t.graphicHeight=Math.abs(t.graphicHeight)),t.fontSize<0&&(t.fontSize=Math.abs(t.fontSize))},_copyStyleForCell:function(t,e,o){if(e.display&&"none"===e.display)t.display=e.display;else{if(!0===t.surroundLineFlag){var i=e.weight;!0===t.lineWidthLimit&&(i=t.weight),!0!==t.surroundLineLimit?(t.color=e.surroundLineColor,t.opacity=e.surroundLineColorOpacity,t.weight=e.surroundLineWidth):(t.color=t.surroundLineColor,t.opacity=t.surroundLineColorOpacity,t.weight=t.surroundLineWidth),this.surroundLineType===SuperMap.Plot.AlgoSurroundLineType.ALL&&(t.weight=2*t.weight+i),t.dashArray=null,t.lineCap||void 0===e.lineCap||(t.lineCap=e.lineCap),t.lineJoin||void 0===e.lineJoin||(t.lineJoin=e.lineJoin)}else{if(t.lineWidthLimit||(t.weight=e.weight),t.lineColorLimit||(t.color=e.color,t.opacity=e.opacity),!t.lineTypeLimit){if(void 0!==e.lineSymbolID){e.lineSymbolID=parseInt(e.lineSymbolID);var n=e.weight;e.dashArray=this._dashArray(e.lineSymbolID,n)}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){var l=t.weight;t.dashArray=this._dashArray(parseInt(t.lineSymbolID),l),delete t.lineSymbolID}}if(t.fillLimit||o instanceof Hs)1===t.fillSymbolID?t.fill=!1:0===t.fillSymbolID&&(t.fill=!0),t.fillColorLimit||(t.fillColor=t.color,t.fillOpacity=t.opacity);else if("LINEAR"===e.fillGradientMode||"RADIAL"===e.fillGradientMode)t.fillOpacity=1,this._map.getRenderer(this.layer)instanceof L.Canvas?this._computeGradientInCanvas(o,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,o.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=nr;var lr=nr.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,o,i){if(this.scaleByMap=!0,this.scalePoints=[],this.scaleValues=[],this.symbolType=0===t?e:SuperMap.Plot.SymbolType.ALGOSYMBOL,nr.prototype.initialize.call(this,t,e,o,i),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(var n in this.radius)this.scaleValues[n]=this.radius[n];delete this.radius}}else 0===this.libID&&this.symbolType===SuperMap.Plot.SymbolType.CONCENTRICCIRCLE?(null!==this.startAngle&&void 0!==this.startAngle&&(this.scaleValues[0]=this.startAngle,delete this.startAngle),null!==this.endAngle&&void 0!==this.endAngle&&(this.scaleValues[1]=this.endAngle,delete this.endAngle)):0===this.libID&&this.symbolType===SuperMap.Plot.SymbolType.POLYGONREGION&&(this.annotationPosition>this.getLatLngs()?this.scaleValues[1]=0:null==this.scaleValues[1]&&(this.scaleValues[1]=this.annotationPosition));SuperMap.Plot.AlgoSymbolFactory.isAccessServer(this.libID,this.code)||(this.minEditPts=SuperMap.Plot.AlgoSymbolFactory.getMinEditPts(this.libID,this.code),this.maxEditPts=SuperMap.Plot.AlgoSymbolFactory.getMaxEditPts(this.libID,this.code),0===this.subSymbols.length&&(this.subSymbols=SuperMap.Plot.AlgoSymbolFactory.getDefaultSubSymbols(this.libID,this.code)),null!==this.style&&!1===this.isEdit&&(this.style=SuperMap.Plot.PlottingUtil.copyAttributes(this.style,SuperMap.Plot.AlgoSymbolFactory.getDefaultStyle(this.libID,this.code))),this.controlPoints=L.Util.latLngsToSuperMapPoints(this.latLngs),this.superMapAlgoSymbol=SuperMap.Plot.AlgoSymbolFactory.getAlgoSymbol(this),this.scaleValues=this.superMapAlgoSymbol.scaleValues,0!==this.libID||this.symbolType!==SuperMap.Plot.SymbolType.SYMBOLTEXTBOX&&this.symbolType!==SuperMap.Plot.SymbolType.LINEMARKING||(this.textBoxType=this.superMapAlgoSymbol.textBoxType),100===this.libID&&26400===this.code&&(this.arrowHeadType=this.superMapAlgoSymbol.arrowHeadType),delete this.controlPoints),this._setBasicSymbolName(),!0===this._isSupportAddAnnotation()&&(this.style.sizeFixed=!1)},onAdd:function(t){this.superMapAlgoSymbol&&(this.superMapAlgoSymbol.map=t._map),nr.prototype.onAdd.call(this,t)},getTextContent:function(){return this.textContent},getArrowHeadType:function(){return this.arrowHeadType},setArrowHeadType:function(t){1016!==this.code&&26400!==this.code||this.arrowHeadType===t||(this.arrowHeadType=t,this.redraw()),this.layer.fire("propertychanged",{feature:this,property:t})},getArrowTailType:function(){return this.arrowTailType},setArrowTailType:function(t){1016===this.code&&this.arrowTailType!==t&&(this.arrowTailType=t,this.redraw()),this.layer.fire("propertychanged",{feature:this,property:t})},getArrowBodyType:function(){return this.arrowBodyType},setArrowBodyType:function(t){1016===this.code&&this.arrowBodyType!==t&&(this.arrowBodyType=t,this.redraw()),this.layer.fire("propertychanged",{feature:this,property:t})},setRotate:function(t){this.dRotate+=t,0!==this.textContent.length&&(void 0===this.style.labelRotation?this.style.labelRotation=-t:this.style.labelRotation+=-t),null===this.anchorPoint&&this.symbolType!==SuperMap.Plot.SymbolType.TEXTSYMBOL&&this.symbolType!==SuperMap.Plot.SymbolType.CONCENTRICCIRCLE?this.anchorPoint=this.getBounds().getCenter():null===this.anchorPoint&&(this.anchorPoint=L.latLng(this.latLngs[0].lat,this.latLngs[0].lng)),this._rotate(t,this.anchorPoint);for(var e=0,o=this.avoidRegions.length;e<o;e++)L.Util.rotateLatLngs(this.avoidRegions[e].getLatLngs(),this.anchorPoint,t)},getScaleByMap:function(){return this.scaleByMap},setScaleByMap:function(t){this.scaleByMap=t,this.redraw(),this._map&&this._map.getPlotEditControl()&&this._map.getPlotEditControl().fire(SuperMap.Plot.Event.featuresmodified,{features:[this]})},setSurroundLineType:function(t){this.surroundLineType=t,this.redraw(),this._map&&this._map.getPlotEditControl()&&this._map.getPlotEditControl().fire(SuperMap.Plot.Event.featuresmodified,{features:[this]})},setSubSymbol:function(t,e,o){if(null!==o&&void 0!==o||(o=this.libID),e<this.subSymbols.length)this.subSymbols[e].libID=o,this.subSymbols[e].code=t;else{if(this.subSymbols.length!==e)return;this.subSymbols.push(new SuperMap.Plot.SubSymbol(o,t))}if(this.superMapAlgoSymbol){var i=new SuperMap.GetSymbolInfoParameters;i.libID=this.subSymbols[e].libID,i.code=this.subSymbols[e].code,L.supermap.symbolInfoService(this.serverUrl).getSymbolInfo(i,function(t){this.subSymbols[e].symbolData=t.result,this.redraw()},this)}else{var n=new SuperMap.GetSymbolInfoParameters;n.libID=this.libID,n.code=this.code,n.inputPoints=L.Util.latLngsToSuperMapPoints(this.getLatLngs()),n.subSymbols=this.subSymbols,L.supermap.symbolInfoService(this.serverUrl).getSymbolInfo(n,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(nr.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 o=0;o<this.symbolData.innerCells.length;o++)for(var i=0;i<this.symbolData.innerCells[o].positionPoints.length;i++)this.symbolData.innerCells[o].positionPoints[i].x+=e,this.symbolData.innerCells[o].positionPoints[i].y+=t;if(null!==this.symbolData&&this.symbolData.innerCells)for(var n=0;n<this.symbolData.scalePoints.length;n++)this.symbolData.scalePoints[n].x+=e,this.symbolData.scalePoints[n].y+=t}for(var l=0,a=this.avoidRegions.length;l<a;l++)L.Util.moveLatLngs(this.avoidRegions[l].getLatLngs(),t,e);this._updateSymbolTexts()},_parseSymbolData:function(){if(nr.prototype._parseSymbolData.call(this),null!==this.symbolData){if(void 0!==this.symbolData.subSymbolScaleValue&&null!==this.symbolData.subSymbolScaleValue&&(this.subSymbolScaleValue=this.symbolData.subSymbolScaleValue),void 0!==this.symbolData.strokeWidth&&null!==this.symbolData.strokeWidth&&(this.strokeWidth=this.symbolData.strokeWidth),void 0!==this.symbolData.constantSize&&null!==this.symbolData.constantSize&&(this.constantSize=this.symbolData.constantSize),void 0!==this.symbolData.baseScale&&null!==this.symbolData.baseScale&&(this.baseScale=this.symbolData.baseScale),this.symbolData.scaleValues&&0!==this.symbolData.scaleValues.length){this.scaleValues=[];for(var t=0;t<this.symbolData.scaleValues.length;t++)this.scaleValues.push(this.symbolData.scaleValues[t])}Object.prototype.hasOwnProperty.call(this.symbolData,"arrowTailType")&&(this.arrowTailType=this.symbolData.arrowTailType),Object.prototype.hasOwnProperty.call(this.symbolData,"arrowBodyType")&&(this.arrowBodyType=this.symbolData.arrowBodyType),Object.prototype.hasOwnProperty.call(this.symbolData,"arrowHeadType")&&(this.arrowHeadType=this.symbolData.arrowHeadType)}},_setSymbolData:function(t){if(nr.prototype._setSymbolData.call(this,t),null!==this.symbolData&&this.superMapAlgoSymbol){if(this.symbolData.subSymbolScaleValue=this.subSymbolScaleValue,this.symbolData.baseScale=this.baseScale,this.symbolData.strokeWidth=this.strokeWidth,this.symbolData.constantSize=this.constantSize,null!==this.annotationPosition&&void 0!==this.annotationPosition&&(this.symbolData.annotationPosition=this.annotationPosition),Object.prototype.hasOwnProperty.call(this.symbolData,"scaleValues")&&null!==this.symbolData.scaleValues)for(var e=0;e<this.scaleValues.length;e++)this.symbolData.scaleValues.length>e?this.symbolData.scaleValues[e]=this.scaleValues[e]:this.symbolData.scaleValues.push(this.scaleValues[e]);else this.symbolData.scaleValues=[],this.symbolData.scaleValues=this.scaleValues;1016===this.code&&(this.symbolData.arrowTailType=this.arrowTailType,this.symbolData.arrowBodyType=this.arrowBodyType,this.symbolData.arrowHeadType=this.arrowHeadType)}},_calculateParts:function(){"none"===this.style.display||null!=this.layer&&"function"==typeof this.layer.getVisibility&&!1===this.layer.getVisibility()||(this.textContent&&""!==this.textContent&&"???"!==this.textContent||this.symbolType!==SuperMap.Plot.SymbolType.TEXTSYMBOL||(this.textContent="请输入文本"),0!==this.textContent.length&&this.dRotate!==this.style.labelRotation&&(this.style.labelRotation=-this.dRotate),this.superMapAlgoSymbol&&0!==this.getLatLngs().length?(this.superMapCalculateParts(),this._setBasicSymbolText()):!this.superMapAlgoSymbol&&this.getLatLngs().length>=this.minEditPts&&(this._calAccessServerSymbol(),this._setBasicSymbolText()),"function"==typeof this.layer.getSymZoomScale&&(this.prevScale=this.layer.getSymZoomScale()))},_calAccessServerSymbol:function(){for(var t=SuperMap.Plot.AnalysisSymbol.analysisSymbolCells(this.symbolData,!0),e=0;e<t.length;e++)t[e].type===SuperMap.Plot.SymbolType.TEXTSYMBOL&&(t[e].style.fontSize*=2);this._transSymbolCellsToLayers(t),this._analysisAlgoBasicInfo(!1),0!==this.symbolData.subSymbols.length&&this.subSymbols.length!==this.symbolData.subSymbols.length&&this._analysisAlgoBasicInfo(!0)},_analysisAlgoBasicInfo:function(t){if(this.symbolData.scaleValues&&0!==this.symbolData.scaleValues.length){this.scaleValues=[];for(var e=0;e<this.symbolData.scaleValues.length;e++)this.scaleValues.push(this.symbolData.scaleValues[e])}if(t&&this.symbolData.subSymbols){this.subSymbols=[];for(var o=0;o<this.symbolData.subSymbols.length;o++)this.subSymbols.push(new SuperMap.Plot.SubSymbol(this.symbolData.libID,this.symbolData.subSymbols[o]))}if(this.symbolData.scalePoints&&0!==this.symbolData.scalePoints.length){this.scalePoints=[];for(var i=0;i<this.symbolData.scalePoints.length;i++)this.scalePoints.push(L.latLng(this.symbolData.scalePoints[i].y,this.symbolData.scalePoints[i].x))}},_modifyPoint:function(t,e){(e=new SuperMapAlgoPlot.Point(e.lng,e.lat)).isScalePoint=!0,this._clearComponents(),this.superMapModifyPoint(t,e),this._calculateAvoidRegions()},_reView:function(){if(this.fromZoom!==this._map.getZoom()){var t=this.getBounds();if(!0===this.isEdit&&t.isValid()&&!0===this.scaleByMap){var e=1;if("function"==typeof this.layer.getSymZoomScale&&!0===this.layer.enableSymScale)e=this.layer.getSymZoomScale();else{var o=this._map.getZoomScale(this._map.getZoom(),this.fromZoom);this.dScale*=o,e=this.dScale}if(34!==this.symbolType&&!0!==this._isSupportAddAnnotation()||!1!==this.style.sizeFixed){if(34!==this.symbolType&&!1===this._isSupportAddAnnotation()){for(var i in this.components)if(this.components[i]instanceof Hs&&null!=this.prevScale)this.components[i].options.fontSize=this.components[i].options.fontSize/this.prevScale*e;else if(this.components[i].options&&this.components[i].options.weight&&(this.components[i].options.weight=this.style.weight*e,null!=this.components[i].options.dashArray)){for(var n=this.components[i].options.dashArray.split(","),l=0;l<n.length;l++)n[l]=parseInt(n[l])/this.prevScale*e;this.components[i].options.dashArray=n.join(),this.components[i].setStyle(this.components[i].options)}}else for(var a in this.components)if(this.components[a].options.weight=this.style.weight*e,null!=this.components[a].options.dashArray){for(var s=this.components[a].options.dashArray.split(","),r=0;r<s.length;r++)s[r]=parseInt(s[r])/this.prevScale*e;this.components[a].options.dashArray=s.join(),this.components[a].setStyle(this.components[a].options)}}else for(var i in this.components)if(this.components[i]instanceof Hs)this.components[i].options.fontSize=this.style.fontSize*e;else if(this.components[i].options&&this.components[i].options.weight&&(this.components[i].options.weight=this.style.weight*e,null!=this.components[i].options.dashArray)){for(var u=this.components[i].options.dashArray.split(","),p=0;p<u.length;p++)u[p]=parseInt(u[p])/this.prevScale*e;this.components[i].options.dashArray=u.join(),this.components[i].setStyle(this.components[i].options)}22!==this.libID||1012!==this.code&&1013!==this.code&&1014!==this.code&&1015!==this.code||this.dScale>=1&&this.redraw(),this.layer._map.getRenderer(this.layer)instanceof L.Canvas&&this._updateCanvasFills(),this._updateSymbolTexts(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues),this.prevScale=e}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 o in this.components)this.components[o].options.labelRotation=this.style.labelRotation,this.components[o].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 i=new SuperMap.GetSymbolInfoParameters;i.libID=this.libID,i.code=this.code,i.inputPoints=L.Util.latLngsToSuperMapPoints(this.getLatLngs()),i.scaleValues=this.scaleValues,i.subSymbols=this.subSymbols,L.supermap.symbolInfoService(this.serverUrl).getSymbolInfo(i,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){nr.prototype._resize.call(this,t,e);var o=new SuperMapAlgoPlot.Point(e.lng,e.lat);if(this.superMapAlgoSymbol){for(var i=0;i<this.superMapAlgoSymbol.controlPoints.length;i++)SuperMap.Plot.PlottingUtil.resize(o,t,this.superMapAlgoSymbol.controlPoints[i]);for(var n=0;n<this.superMapAlgoSymbol.scalePoints.length;n++)SuperMap.Plot.PlottingUtil.resize(o,t,this.superMapAlgoSymbol.scalePoints[n])}else{for(var l=0;l<this.symbolData.innerCells.length;l++)for(var a=0;a<this.symbolData.innerCells[l].positionPoints.length;a++){var s=new SuperMapAlgoPlot.Point(this.symbolData.innerCells[l].positionPoints[a].x,this.symbolData.innerCells[l].positionPoints[a].y);SuperMap.Plot.PlottingUtil.resize(o,t,s),this.symbolData.innerCells[l].positionPoints[a].x=s.x,this.symbolData.innerCells[l].positionPoints[a].y=s.y}for(var r=0;r<this.symbolData.scalePoints.length;r++){var u=new SuperMapAlgoPlot.Point(this.symbolData.scalePoints[r].x,this.symbolData.scalePoints[r].y);SuperMap.Plot.PlottingUtil.resize(o,t,u),this.symbolData.scalePoints[r].x=u.x,this.symbolData.scalePoints[r].y=u.y}}},_setBasicSymbolName:function(){if(null==this.symbolName)if(0===this.libID)this.symbolName=SuperMap.Plot.AlgoSymbolFactory.getSymbolName(this.libID,this.code);else{var t=L.supermap.plotting.getControl(this._map,this.serverUrl).getSymbolLibManager();this.symbolName=t.getSymbolName(this.libID,this.code)}},_isSupportAddAnnotation:function(){return 0===this.libID&&this.code===SuperMap.Plot.SymbolType.CIRCLESYMBOL||this.code===SuperMap.Plot.SymbolType.RECTANGLESYMBOL||this.code===SuperMap.Plot.SymbolType.ARCSYMBOL||this.code===SuperMap.Plot.SymbolType.CHORDSYMBOL||this.code===SuperMap.Plot.SymbolType.PIESYMBOL||this.code===SuperMap.Plot.SymbolType.ELLIPSESYMBOL||this.code===SuperMap.Plot.SymbolType.PARALLELOGRAM||this.code===SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL||this.code===SuperMap.Plot.SymbolType.POLYLINESYMBOL||this.code===SuperMap.Plot.SymbolType.POLYBEZIERSYMBOL||this.code===SuperMap.Plot.SymbolType.POLYBEZIERCLOSESYMBOL||this.code===SuperMap.Plot.SymbolType.PARALLELLINE||this.code===SuperMap.Plot.SymbolType.KIDNEY||this.code===SuperMap.Plot.SymbolType.REGULARPOLYGON||this.code===SuperMap.Plot.SymbolType.RUNWAY||this.code===SuperMap.Plot.SymbolType.CURVEEIGHT||this.code===SuperMap.Plot.SymbolType.BRACESYMBOL||this.code===SuperMap.Plot.SymbolType.ARROWLINE||this.code===SuperMap.Plot.SymbolType.CONCENTRICCIRCLE||this.code===SuperMap.Plot.SymbolType.COMBINATIONALCIRCLE||this.code===SuperMap.Plot.SymbolType.FREECURVE||this.code===SuperMap.Plot.SymbolType.NODECHAIN||this.code===SuperMap.Plot.SymbolType.TRAPEZOIDSYMBOL},_setBasicSymbolText:function(){if(!1!==this.textDisplay&&!0===this._isSupportAddAnnotation()){this.textContent=SuperMap.Plot.PlottingUtil.trim(this.textContent);var t=this.getBounds();if(this.textContent&&null!==this.textContent&&0!==this.textContent.length&&null!==t&&t.isValid()){var e=L.latLng((t.getSouth()+t.getNorth())/2,(t.getEast()+t.getWest())/2),o={surroundLineFlag:!1,labelAlign:"cm"};this._createAndDrawLayer(34,[e],o,this.textContent)}}},superMapCalculateParts:function(){this.toSuperMapAlgorithms(),this.superMapAlgoSymbol.calculateParts(),this.fromSuperMapAlgorithms()},superMapModifyPoint:function(t,e){this.toSuperMapAlgorithms(),this.superMapAlgoSymbol.modifyPoint(t,e),this.fromSuperMapAlgorithms()},toSuperMapAlgorithms:function(){this.superMapAlgoSymbol.isEdit=this.isEdit,this.superMapAlgoSymbol.controlPoints=L.Util.latLngsToSuperMapPoints(this.getLatLngs()),this.superMapAlgoSymbol.subSymbols=this.subSymbols,this.superMapAlgoSymbol.scaleValues=this.scaleValues,this.superMapAlgoSymbol.scalePoints=L.Util.latLngsToSuperMapPoints(this.scalePoints),this.superMapAlgoSymbol.polylineConnectLocationPoint=this.polylineConnectLocationPoint,this.superMapAlgoSymbol.textContent=this.textContent,this.superMapAlgoSymbol.style=this.style,"function"==typeof this.layer.getSymZoomScale&&(this.superMapAlgoSymbol.symScaleDefinition=this.layer.getSymZoomScale()),22===this.libID&&1016===this.code&&(this.superMapAlgoSymbol.arrowHeadType=this.arrowHeadType,this.superMapAlgoSymbol.arrowBodyType=this.arrowBodyType,this.superMapAlgoSymbol.arrowTailType=this.arrowTailType),100===this.libID&&26400===this.code&&(this.superMapAlgoSymbol.arrowHeadType=this.arrowHeadType),0===this.libID&&this.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXTBOX&&(this.superMapAlgoSymbol.textBoxType=this.textBoxType,this.superMapAlgoSymbol.roundBox=this.roundBox),0===this.libID&&this.symbolType===SuperMap.Plot.SymbolType.LINEMARKING&&(this.superMapAlgoSymbol.textBoxType=this.textBoxType,this.superMapAlgoSymbol.islocationCircle=this.islocationCircle)},fromSuperMapAlgorithms:function(){this._transSymbolCellsToLayers(this.superMapAlgoSymbol.components),this.scalePoints=L.Util.superMapPointsToLatLngs(this.superMapAlgoSymbol.scalePoints),this.scaleValues=this.superMapAlgoSymbol.scaleValues,this.subSymbols.length!==this.superMapAlgoSymbol.subSymbols.length&&(this.subSymbols=this.superMapAlgoSymbol.subSymbols),(this.latLngs.length!==this.superMapAlgoSymbol.controlPoints.length||100===this.libID&&13700===this.code)&&(this.latLngs=L.Util.superMapPointsToLatLngs(this.superMapAlgoSymbol.controlPoints))},convertGraphicObjects:function(){return 22!==this.libID||1023!==this.code&&1001!==this.code&&1003!==this.code&&1004!==this.code&&1017!==this.code?null:this.convertCells(this)},convertCells:function(t){var e=[],o={},i=SuperMap.Util.cloneObject(this.style);o.uuid=t.uuid,o.serverUrl=t.serverUrl,o.serviceParams=t.options.serviceParams,o.custom=t.custom;var n={},l=t.options;if(t instanceof L.Polygon)this._copyStyleForFeature(i,l),(n=L.supermap.plotting.PlottingObject.createSymbol(0,32,t._latlngs[0],o,i,t.custom)).surroundLineType=l.surroundLineType;else if(t instanceof L.Polyline)this._copyStyleForFeature(i,l),(n=L.supermap.plotting.PlottingObject.createSymbol(0,24,t._latlngs,o,i,t.custom)).surroundLineType=l.surroundLineType;else if(t instanceof L.supermap.plotting.Text)this._copyStyleForFeature(i,l),(n=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.TEXTSYMBOL,t._latlng,o,i,t.custom)).textContent=t._text,n.dRotate=-t.options.labelRotation;else if(t instanceof L.supermap.plotting.PlottingObject){for(var a=0;a<t.components.length;a++){var s=t.components[a];if(!0!==s.options.surroundLineFlag)for(var r=this.convertCells(s),u=0;u<r.length;u++)e.push(r[u])}return e}return e.push(n),e},setTextBoxType:function(t){this.textBoxType!==t&&(this.textBoxType=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getTextBoxType:function(){return this.textBoxType},setRoundBox:function(t){this.roundBox!==t&&(this.roundBox=t,this.textBoxType!==SuperMap.Plot.TextBoxType.NONEBOX&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},getRoundBox:function(){return this.roundBox},setLocationCircle:function(t){this.islocationCircle!==t&&(this.islocationCircle=t,this.textBoxType!==SuperMap.Plot.TextBoxType.NONEBOX&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},getLocationCircle:function(){return this.islocationCircle},canPolylineConnectLocationPoint:function(){return SuperMap.Plot.AlgoSymbolFactory.canPolylineConnect(this.libID,this.code)},getPolylineConnectLocationPoint:function(){return this.polylineConnectLocationPoint},setPolylineConnectLocationPoint:function(t){this.polylineConnectLocationPoint!==t&&SuperMap.Plot.AlgoSymbolFactory.canPolylineConnect(this.libID,this.code)&&(this.polylineConnectLocationPoint=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getStartArrowType:function(){return this.scaleValues[1]},setStartArrowType:function(t){this.scaleValues[1]!==t&&(this.scaleValues[1]=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getEndArrowType:function(){return this.scaleValues[2]},setEndArrowType:function(t){this.scaleValues[2]!==t&&(this.scaleValues[2]=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},setFontAlign:function(t){this.style.labelAlign!==t&&(this.style.labelAlign=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getTextPosition:function(){if(this.symbolType===SuperMap.Plot.SymbolType.POLYGONREGION)return this.scaleValues[1]},setTextPosition:function(t){this.symbolType===SuperMap.Plot.SymbolType.POLYGONREGION&&this.scaleValues[1]!==t&&(this.scaleValues[1]=t,0!==this.textContent.length&&this.redraw())}});L.supermap.plotting.algoSymbol=function(t,e,o,i){return new lr(t,e,o,i)},L.supermap.plotting.AlgoSymbol=lr;var ar=lr.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,o,i){this.libID=0,this.code=SuperMap.Plot.SymbolType.LINERELATION,this.symbolType=SuperMap.Plot.SymbolType.LINERELATION,this.symbolName="连接线",lr.prototype.initialize.call(this,t,e,o,i)},onAdd:function(t){lr.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 Hr&&(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 Hr&&(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 o=this._map.getFeatureByUuid(t),i=this._map.getFeatureByUuid(e);null!==o&&null!==i&&o instanceof Hr&&i instanceof Hr&&(this.startAssociatedUuid=t,this.endAssociatedUuid=e,this.setJoinLineToDotSymbol(this.startAssociatedUuid),this.setJoinLineToDotSymbol(this.endAssociatedUuid),this.symbolName="连接线:"+o.symbolName+"_"+i.symbolName,this.redraw())},destroy:function(){this.startFeature=null,this.endFeature=null,lr.prototype.destroy.call(this)},_calculateParts:function(){var t=!1,e=!1,o=null,i=this._map.getFeatureByUuid(this.startAssociatedUuid);if(null!==i&&i instanceof Hr){var n=L.Util.latLngsToSuperMapPoints(i.latLngs);null!==n&&0<n.length&&(o=n[0]);for(var l=0;l<i.joinLines.length;l++)if(this===i.joinLines[l]){t=!0;break}t||i.joinLines.push(this)}var a=null,s=this._map.getFeatureByUuid(this.endAssociatedUuid);if(null!==s&&s instanceof Hr){var r=L.Util.latLngsToSuperMapPoints(s.latLngs);null!==r&&0<r.length&&(a=r[0]);for(l=0;l<s.joinLines.length;l++)if(this===s.joinLines[l]){e=!0;break}e||s.joinLines.push(this)}if(e&&t&&(this.symbolName="连接线:"+i.symbolName+"_"+s.symbolName),this.superMapAlgoSymbol.controlPoints=L.Util.latLngsToSuperMapPoints(this.latLngs),this.superMapAlgoSymbol.lineRelationType=this.lineRelationType,null!==o&&(0===this.superMapAlgoSymbol.controlPoints.length?this.superMapAlgoSymbol.controlPoints.push(o):this.superMapAlgoSymbol.controlPoints[0]=o),null!==a){if(0===this.superMapAlgoSymbol.controlPoints.length)return;1===this.superMapAlgoSymbol.controlPoints.length?this.superMapAlgoSymbol.controlPoints.push(a):this.superMapAlgoSymbol.controlPoints[this.superMapAlgoSymbol.controlPoints.length-1]=a}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 o in this.getLatLngs())this.getLatLngs()[o].lat+=t,this.getLatLngs()[o].lng+=e;for(var i=0,n=this.avoidRegions.length;i<n;i++)this.avoidRegions[i].move(t,e);this.redraw()}},_modifyPoint:function(t,e){if(0===t){var o=this.getFeatureByPoint(e);null!==o?this.setStartFeature(o.uuid):this.setStartFeature(null)}else if(this.getLatLngs().length-1===t){var i=this.getFeatureByPoint(e);null!==i?this.setEndFeature(i.uuid):this.setEndFeature(null)}this.redraw()},getFeatureByPoint:function(t){var e=this._map.latLngToLayerPoint(t),o=this.layer.features;for(var i in o){if(o[i]instanceof Hr)if(this._map.latLngToLayerPoint(o[i].getLatLngs()[0]).distanceTo(e)<15)return o[i]}return null},setJoinLineToDotSymbol:function(t){var e=this._map.getFeatureByUuid(t);if(null!=e&&e instanceof Hr){for(var o=!1,i=0;i<e.joinLines.length;i++)if(this===e.joinLines[i]){o=!0;break}o||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 Hr)for(var o=0,i=e.joinLines.length;o<i;o++)if(this===e.joinLines[o]){e.joinLines.splice(o,1);break}}},_parseSymbolData:function(){lr.prototype._parseSymbolData.call(this),this.symbolData&&(Object.prototype.hasOwnProperty.call(this.symbolData,"startAssociatedUuid")&&(this.startAssociatedUuid=this.symbolData.startAssociatedUuid),Object.prototype.hasOwnProperty.call(this.symbolData,"endAssociatedUuid")&&(this.endAssociatedUuid=this.symbolData.endAssociatedUuid),Object.prototype.hasOwnProperty.call(this.symbolData,"lineRelationType")&&(this.lineRelationType=this.symbolData.lineRelationType))},_setSymbolData:function(){lr.prototype._setSymbolData.call(this),this.symbolData&&(this.symbolData.endAssociatedUuid=this.endAssociatedUuid,this.symbolData.lineRelationType=this.lineRelationType,this.symbolData.startAssociatedUuid=this.startAssociatedUuid)}});function sr(t){"@babel/helpers - typeof";return(sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rr(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function ur(t,e){return(ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function pr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=hr(t);if(e){var n=hr(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===sr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function hr(t){return(hr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}L.supermap.plotting.lineRelation=function(t,e,o,i){return new ar(t,e,o,i)},L.supermap.plotting.LineRelation=ar;var cr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ur(t,e)}(s,L.Evented);var o,n,l,a=pr(s);function s(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(e=a.call(this)).goAnimations=[],e.curPlayGroup=0,e}return o=s,(n=[{key:"preView",value:function(){if(0!==this.goAnimations.length)for(var t=this.getAllGroups(),e=0;e<t.length;e++)for(var o=t[e],i=0;i<o.length;i++)o[i].play()}},{key:"play",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(0!==this.goAnimations.length){void 0!==t&&(this.curPlayGroup=this.getAnimationGroupByName(t).index),this.isPlay()&&this.curPlayGroup--;var e=this.getAllGroups();this.curPlayGroup>e.length-1&&(this.curPlayGroup=0);for(var o=e[this.curPlayGroup],i=0;i<o.length;i++){o[i].play()}this.curPlayGroup++}}},{key:"stop",value:function(){if(0!==this.goAnimations.length){for(var t=0;t<this.goAnimations.length;t++)this.goAnimations[t].stop();this.curPlayGroup=0}}},{key:"pause",value:function(){if(0!==this.goAnimations.length){for(var t=!1,o=0;o<this.goAnimations.length;o++)this.goAnimations[o].animationState===e.PLAYING?(t=!0,this.goAnimations[o].pause()):this.goAnimations[o].stop();t&&this.curPlayGroup>0&&this.curPlayGroup--}}},{key:"reset",value:function(){if(0!==this.goAnimations.length){for(var t=0;t<this.goAnimations.length;t++)this.goAnimations[t].reset();this.curPlayGroup=0}}},{key:"isPlay",value:function(){for(var t=!1,o=0;o<this.goAnimations.length;o++)this.goAnimations[o].animationState===e.PLAYING&&(t=!0);return t}},{key:"isPause",value:function(){for(var t=!1,o=0;o<this.goAnimations.length;o++)this.goAnimations[o].animationState===e.PAUSE&&(t=!0);return t}},{key:"getAnimationTimeLength",value:function(t,e){for(var o=!1,n=0,l=0,a=t-1;a>=0;a--){var s=e[a],r=s.startTime+s.duration;if(r>l&&(l=r),s.animationPlayType===i.PLAYAFTERLASTONE){o=!0;for(var u=a-1;u>=0;u--){var p=e[u],h=p.startTime+p.duration;h>n&&(n=h)}}}return{isExist:o,length1:n,length2:l}}},{key:"getAllGroups",value:function(){for(var t=[],e=0;e<this.goAnimations.length;e++){var o=this.goAnimations[e];if(o.animationPlayType===i.PLAYFROMNOW||0===e){var n=[];n.push(o),t.push(n)}else t[t.length-1].push(o)}return t}},{key:"getAnimationGroup",value:function(t){for(var e=null,o=0,i=this.getAllGroups(),n=0;n<i.length;n++)for(var l=i[n],a=0;a<l.length;a++)if(l[a].name===t.name){e=l,o=a;break}return{index:o,group:e}}},{key:"getAnimationGroupByName",value:function(t){for(var e=null,o=0,i=this.getAllGroups(),n=0;n<i.length;n++)for(var l=i[n],a=0;a<l.length;a++)if(l[a].name===t){e=l,o=n;break}return{index:o,group:e}}},{key:"changeAnimationTime",value:function(t){if(null===t)return!1;var e=this.getAnimationGroup(t).group,o=(this.getAnimationGroup(t).index,e.indexOf(t));if(t.animationPlayType===i.PLAYFROMNOW)t.startTime=t.delayTime;else if(t.animationPlayType===i.PLAYSAMELASTONE||t.animationPlayType===i.UNKNOWN){(n=this.getAnimationTimeLength(o,e)).isExist?t.startTime=n.length1+t.delayTime:t.startTime=t.delayTime}else if(t.animationPlayType===i.PLAYAFTERLASTONE){var n=this.getAnimationTimeLength(o,e);t.startTime=n.length2+t.delayTime}}},{key:"moveAnimation",value:function(t,e){if(!(e<0||e>this.goAnimations.length)){var o=this.goAnimations.indexOf(t);if(o!==e){this.goAnimations=this.move(o,e);for(var i=0;i<this.goAnimations.length;i++){t=this.goAnimations[i];this.changeAnimationTime(t)}}}}},{key:"move",value:function(t,e){var o=[].concat(this.goAnimations);return o.splice(e,0,o.splice(t,1)[0]),o}},{key:"getAnimationDelayTime",value:function(t){if(null===t)return!1;var e=0,o=this.getAnimationGroup(t).group,n=(this.getAnimationGroup(t).index,o.indexOf(t));if(t.animationPlayType===i.PLAYFROMNOW||0===n)e=t.startTime;else if(t.animationPlayType===i.PLAYAFTERLASTONE){var l=this.getAnimationTimeLength(n,o);e=t.startTime-l.length2}else if(t.animationPlayType===i.PLAYSAMELASTONE||t.animationPlayType===i.UNKNOW){for(var a=-1,s=n;s>=0;s--){if(o[s].animationPlayType===i.PLAYAFTERLASTONE){a=s;break}}if(-1===a)e=t.startTime;else{l=this.getAnimationTimeLength(a,o);e=t.startTime-l.length2}}return e}}])&&rr(o.prototype,n),l&&rr(o,l),Object.defineProperty(o,"prototype",{writable:!1}),s}();SuperMapAlgoPlot.GOAnimationManagerBase=cr;var yr=L.Evented.extend({startTime:0,duration:5,repeat:!1,name:null,animationState:SuperMap.Plot.GOAnimationState.UNKNOWN,goFeature:null,animationGOFeature:null,innerStartTime:0,lastExecute:!1,pauseTime:0,ratio:0,symbolTexts:[],animationPlayType:SuperMap.Plot.AnimationPlayType.UNKNOWN,groupName:null,delayTime:0,playSpeed:1,playPastRatio:0,initialize:function(t){SuperMap.Util.extend(this,t)},destroy:function(){this.showAnimationFeature(!1),this.removeAnimationFeature(),this.goFeature=null,this.animationGOFeature=null,this.name=null,this.animationState=SuperMap.Plot.GOAnimationState.UNKNOWN;for(var t=0;t<this.symbolTexts.length;t++)this.symbolTexts[t]=null;this.symbolTexts=[]},setGOFeature:function(t){if(void 0===t||null===t||null===t.layer)return!1;var e=L.supermap.plotting.getControl().getGOAnimationManager();if(null===e.map)return!1;if(this.goFeature=t,this.animationGOFeature=this.cloneGOFeature(t),null===this.animationGOFeature)return!1;var o=e.getAnimationLayer(t.layer.name);if(o.setSymScaleDefinition(t.layer.getSymScaleDefinition()),o.addFeatures(this.animationGOFeature),this.getGOAnimationType()===SuperMap.Plot.GOAnimationType.ANIMATION_WAY&&0!==t.geoSymbolTexts.length)for(var i=0;i<t.geoSymbolTexts.length;i++){var n=t.geoSymbolTexts[i];if(null!==n){var l=n.getSymbolData();l.associatedUuid=this.animationGOFeature.uuid;var a={symbolData:l,map:n.map,serverUrl:n.serverUrl},s=L.supermap.plotting.PlottingObject.createSymbol(n.libID,n.code,null,a,null);this.symbolTexts.push(s),e.getAnimationLayer(t.layer.name).addFeatures(s)}}return this.showAnimationFeature(!1),!0},getGOFeature:function(){return this.goFeature},setStartTime:function(t){t<0&&(t=0),this.delayTime=t;for(var e=L.supermap.plotting.getControl().getGOAnimationManager(),o=e.getAnimationGroup(this).group,i=o.indexOf(this);i<o.length;i++){var n=o[i];e.changeAnimationTime(n)}e.fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})},getStartTime:function(){return L.supermap.plotting.getControl().getGOAnimationManager().getAnimationDelayTime()},getDuration:function(){return duration},setDuration:function(t){this.duration=t;for(var e=L.supermap.plotting.getControl().getGOAnimationManager(),o=e.getAnimationGroup(this).group,i=o.indexOf(this);i<o.length;i++){var n=o[i];e.changeAnimationTime(n)}e.fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})},getAnimationPlayType:function(){return this.animationPlayType},setAnimationPlayType:function(t){this.animationPlayType=t;for(var e=L.supermap.plotting.getControl().getGOAnimationManager(),o=e.getAnimationGroup(this).group,i=o.indexOf(this);i<o.length;i++){var n=o[i];e.changeAnimationTime(n)}e.fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})},play:function(){var t=new Date;if(this.playSpeedTime=t.getTime()/1e3,this.playTime=t.getTime()/1e3,this.animationState===SuperMap.Plot.GOAnimationState.PAUSE){var e=t.getTime()/1e3-this.pauseTime;this.innerStartTime+=e}else{this.innerStartTime=t.getTime()/1e3;var o=L.supermap.plotting.getControl().getGOAnimationManager();this.goFeature.isSelected&&o.map.getPlotEditControl()&&o.map.getPlotEditControl().unselectFeatures(this.goFeature),this.showAnimationFeature(!0),o.isPause()||(this.playPastRatio=0)}this.lastExecute=!1,this.animationState=SuperMap.Plot.GOAnimationState.PLAYING},stop:function(){this.animationState=SuperMap.Plot.GOAnimationState.STOP},pause:function(){this.animationState=SuperMap.Plot.GOAnimationState.PAUSE;var t=new Date;this.pauseTime=t.getTime()/1e3},reset:function(){this.animationState=SuperMap.Plot.GOAnimationState.RESET,this.showAnimationFeature(!1)},execute:function(){return!1},canExecute:function(){if(this.animationState!==SuperMap.Plot.GOAnimationState.PLAYING)return!1;var t=(new Date).getTime()/1e3;if(this.innerStartTime+this.startTime>t)return!1;var e=this.getRatioByTime();return!(e>1&&this.lastExecute||e<0)},getRatioByTime:function(){if(this.animationState!==SuperMap.Plot.GOAnimationState.PLAYING)return 0;var t=L.supermap.plotting.getControl().getGOAnimationManager(),e=this.computePlayRatio();return e>=1&&!this.lastExecute&&(this.repeat?(e=0,this.lastExecute=!1,this.animationState=SuperMap.Plot.GOAnimationState.PLAYING,t.fire(SuperMap.Plot.Event.animationbegin,{result:this.name}),this.innerStartTime=(new Date).getTime()/1e3,this.playTime=(new Date).getTime()/1e3):(e=1,this.lastExecute=!0,this.animationState=SuperMap.Plot.GOAnimationState.STOP,t.fire(SuperMap.Plot.Event.animationend,{result:this.name})),this.playSpeedTime=(new Date).getTime()/1e3,this.playPastRatio=0),e<0&&(e=0,this.playSpeedTime=(new Date).getTime()/1e3,this.playPastRatio=0),this.ratio=e,e},getPlaySpeed:function(){return this.playSpeed},setPlaySpeed:function(t){t!==this.playSpeed&&(this.setPlayRatioState(),this.playSpeed=t,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()}))},setFastForWardTime:function(t){if(!(t<0)){var e=t/this.duration;e>1&&(e=1),this.playPastRatio+=e,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})}},setRewindTime:function(t){if(!(t<0)){var e=-t/this.duration;e>0&&(e=0),this.playPastRatio+=e,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})}},setPlayRatioState:function(){this.playSpeedTime=(new Date).getTime()/1e3,this.playPastRatio=this.ratio},computePlayRatio:function(){var t=0,e=(new Date).getTime()/1e3,o=this.duration/this.playSpeed;return t=this.playTime===this.playSpeedTime?(e-this.innerStartTime-this.startTime)/o:(e-this.playSpeedTime)/o,t+=this.playPastRatio,this.innerStartTime+this.startTime>=e||t<0?0:t},showAnimationFeature:function(t){if(null!==this.animationGOFeature&&null!==this.animationGOFeature.style&&(this.resetAnimationFeature(t),this.animationGOFeature.redraw()),null!==this.goFeature&&null!==this.goFeature.style){if(t){this.goFeature.style.display="none";for(var e=0;e<this.goFeature.geoSymbolTexts.length;e++)this.goFeature.geoSymbolTexts[e].style.display="none"}else{this.goFeature.style.display="display";for(var o=0;o<this.goFeature.geoSymbolTexts.length;o++)this.goFeature.geoSymbolTexts[o].style.display="display"}this.goFeature.redraw();for(var i=0;i<this.goFeature.geoSymbolTexts.length;i++)this.goFeature.geoSymbolTexts[i].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(var e=0;e<this.symbolTexts.length;e++)this.symbolTexts[e].style.display="display",this.symbolTexts[e].redraw()}else{this.animationGOFeature.style.display="none";for(var o=0;o<this.symbolTexts.length;o++)this.symbolTexts[o].style.display="none",this.symbolTexts[o].redraw();this.getGOAnimationType()!==SuperMap.Plot.GOAnimationType.ANIMATION_BROKENLINE_EXP&&this.getGOAnimationType()!==SuperMap.Plot.GOAnimationType.ANIMATION_CURVE_EXP||null!==this.pathFeature&&(this.pathFeature.options.opacity=0,this.pathFeature.redraw())}},cloneGOFeature:function(t){var e=null,o=L.supermap.plotting.getControl().getGOAnimationManager().goAnimations;if(null!==o)for(var i=0;i<o.length;i++){var n=o[i];if(n.goFeature===t){e=n.animationGOFeature;break}}return null===e&&((e=t.clone()).enableEdit=!1),e},removeAnimationFeature:function(){if(null!==this.animationGOFeature){var t=L.supermap.plotting.getControl().getGOAnimationManager().goAnimations,e=!1;if(null!==t)for(var o=0;o<t.length;o++){var i=t[o];if(i!==this&&i.animationGOFeature===this.animationGOFeature){e=!0;break}}if(!e){this.animationGOFeature.layer.removeFeatures(this.animationGOFeature);for(;0<this.symbolTexts.length;)symbolTexts[0].layer.removeFeatures(symbolTexts[0])}}},getJSONData:function(){var t={};return t.goFeatureUuid=this.goFeature.uuid,t.name=this.name,t.startTime=this.startTime,t.duration=this.duration,t.repeat=this.repeat,t.playtype=this.animationPlayType,t.type=this.getGOAnimationType(),t},fromJSONData:function(t){this.startTime=t.startTime,this.duration=t.duration,this.repeat=t.repeat,this.animationPlayType=t.playtype}});L.supermap.plotting.GOAnimation=yr;var gr=yr.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){yr.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),o=this._executeLineWidthAnimation(t),i=this._executeSurroundLineColorAnimation(t),n=this._executeSurroundLineWidthAnimation(t);return e||o||i||n},_executeLineColorAnimation:function(t){if(!this.lineColorAnimation)return!1;var e=SuperMap.Plot.PlottingUtil.colorStringToRGB(this.startLineColor),o=SuperMap.Plot.PlottingUtil.colorStringToRGB(this.endLineColor),i=parseInt(e.red+(o.red-e.red)*t),n=parseInt(e.green+(o.green-e.green)*t),l=parseInt(e.blue+(o.blue-e.blue)*t);return this.animationGOFeature.setStyle({color:SuperMap.Plot.PlottingUtil.colorRGBToString({red:i,green:n,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),o=SuperMap.Plot.PlottingUtil.colorStringToRGB(this.endSurroundLineColor),i=parseInt(e.red+(o.red-e.red)*t),n=parseInt(e.green+(o.green-e.green)*t),l=parseInt(e.blue+(o.blue-e.blue)*t);return this.animationGOFeature.setStyle({surroundLineColor:SuperMap.Plot.PlottingUtil.colorRGBToString({red:i,green:n,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=yr.prototype.getJSONData.call(this);return t.lineColorAnimation=this.lineColorAnimation,this.startLineColor&&(t.startLineColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(this.startLineColor)),this.endLineColor&&(t.endLineColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(this.endLineColor)),t.lineWidthAnimation=this.lineWidthAnimation,t.startLineWidth=this.startLineWidth,t.endLineWidth=this.endLineWidth,t.surroundLineColorAnimation=this.surroundLineColorAnimation,this.startSurroundLineColor&&(t.startSurroundLineColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(this.startSurroundLineColor)),this.endSurroundLineColor&&(t.endSurroundLineColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(this.endSurroundLineColor)),t.surroundLineWidthAnimation=this.surroundLineWidthAnimation,t.startSurroundLineWidth=this.startSurroundLineWidth,t.endSurroundLineWidth=this.endSurroundLineWidth,t},fromJSONData:function(t){yr.prototype.fromJSONData.call(this,t),this.lineColorAnimation=t.lineColorAnimation,null!=t.startLineColor.red?this.startLineColor=SuperMapAlgoPlot.PlottingUtil.colorRGBToString(t.startLineColor):this.startLineColor=t.startLineColor,null!=t.endLineColor.red?this.endLineColor=SuperMapAlgoPlot.PlottingUtil.colorRGBToString(t.endLineColor):this.endLineColor=t.endLineColor,this.lineWidthAnimation=t.lineWidthAnimation,this.startLineWidth=t.startLineWidth,this.endLineWidth=t.endLineWidth,this.surroundLineColorAnimation=t.surroundLineColorAnimation,null!=t.startSurroundLineColor.red?this.startSurroundLineColor=SuperMapAlgoPlot.PlottingUtil.colorRGBToString(t.startSurroundLineColor):this.startSurroundLineColor=t.startSurroundLineColor,null!=t.endSurroundLineColor.red?this.endSurroundLineColor=SuperMapAlgoPlot.PlottingUtil.colorRGBToString(t.endSurroundLineColor):this.endSurroundLineColor=t.endSurroundLineColor,this.surroundLineWidthAnimation=t.surroundLineWidthAnimation,this.startSurroundLineWidth=t.startSurroundLineWidth,this.endSurroundLineWidth=t.endSurroundLineWidth}});L.supermap.plotting.GOAnimationAttribute=gr;var fr=yr.extend({blinkInterval:500,blinkStyle:SuperMap.Plot.BlinkAnimationBlinkStyle.Blink_Frequency,blinkNumber:0,replaceStyle:SuperMap.Plot.BlinkAnimationReplaceStyle.Replace_NoColor,startColor:"#0000ff",endColor:"#ff0000",getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_BLINK},execute:function(){if(!this.canExecute())return"none"===this.goFeature.style.display&&"none"===this.animationGOFeature.style.display&&(this.animationGOFeature.style.display="display",!0);var t=(new Date).getTime()/1e3,e=this.blinkInterval/1e3;return this.blinkStyle===SuperMap.Plot.BlinkAnimationBlinkStyle.Blink_Number&&(e=this.blinkInterval=this.duration/this.blinkNumber),(t-this.innerStartTime)%e<=e/2?this.replaceStyle===SuperMap.Plot.BlinkAnimationReplaceStyle.Replace_Color?(this.animationGOFeature.style.color=this.startColor,this.animationGOFeature.style.display="display"):this.lastExecute?this.animationGOFeature.style.display="display":this.animationGOFeature.style.display="none":(this.animationGOFeature.style.display="display",this.replaceStyle===SuperMap.Plot.BlinkAnimationReplaceStyle.Replace_Color&&(this.animationGOFeature.style.color=this.endColor)),this.animationGOFeature.redraw(),!0},getJSONData:function(){var t=yr.prototype.getJSONData.call(this);return t.blinkStyle=this.blinkStyle,t.blinkInterval=this.blinkInterval,t.blinkNumber=this.blinkNumber,t.replaceStyle=this.replaceStyle,this.startColor&&(t.startColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(this.startColor)),this.endColor&&(t.endColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(this.endColor)),t},fromJSONData:function(t){yr.prototype.fromJSONData.call(this,t),this.blinkStyle=t.blinkStyle,this.blinkInterval=t.blinkInterval,this.blinkNumber=t.blinkNumber,this.replaceStyle=t.replaceStyle,null!=t.startColor.red?this.startColor=SuperMapAlgoPlot.PlottingUtil.colorRGBToString(t.startColor):this.startColor=t.startColor,null!=t.endColor.red?this.endColor=SuperMapAlgoPlot.PlottingUtil.colorRGBToString(t.endColor):this.endColor=t.endColor,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animatitonpropertyconfig,{jsonData:t})}});L.supermap.plotting.GOAnimationBlink=fr;var Pr=yr.extend({startScale:0,endScale:1,timeSpace:50,lastDrawTime:0,lineLength:0,controlPoints:[],initialize:function(t){yr.prototype.initialize.call(this,t),this.controlPoints=[],this.lineLength=0},getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_GROW},setStartScale:function(t){this.startScale=t,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})},getStartScale:function(){return this.startScale},setEndScale:function(t){this.endScale=t,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})},getEndScale:function(){return this.endscale},_execute_1004:function(t){if(0===this.lineLength){this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs());var e=new SuperMap.Geometry.Point((this.controlPoints[0].x+this.controlPoints[1].x)/2,(this.controlPoints[0].y+this.controlPoints[1].y)/2);this.lineLength+=SuperMap.Plot.PlottingUtil.distance(e,this.controlPoints[2]);for(var o=3;o<this.controlPoints.length;o++)this.lineLength+=SuperMap.Plot.PlottingUtil.distance(this.controlPoints[o-1],this.controlPoints[o])}if(0===t)return this._executeAndRatioIsZero(),!0;var i=[],n=[];e=new SuperMap.Geometry.Point((this.controlPoints[0].x+this.controlPoints[1].x)/2,(this.controlPoints[0].y+this.controlPoints[1].y)/2),n.push(e);for(var l=2;l<this.controlPoints.length;l++)n.push(this.controlPoints[l].clone());i.push(this.controlPoints[0]),i.push(this.controlPoints[1]);for(var a=this._findPos(this.lineLength*t,n),s=1;s<=a.pos;s++)i.push(n[s]);return i.push(a.pts),this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs(i)),!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 o=this.controlPoints;if(4!=o.length)return!1;var i=o[0],n=o[1],l=o[2],a=o[3],s=SuperMap.Plot.PlottingUtil.distance(i,a),r=SuperMap.Plot.PlottingUtil.distance(n,l),u=SuperMap.Plot.PlottingUtil.linePnt(i,a,s*t),p=SuperMap.Plot.PlottingUtil.linePnt(n,l,r*t),h=[];return h.push(i),h.push(n),h.push(p),h.push(u),null!==this.animationGOFeature.superMapAlgoSymbol&&Object.prototype.hasOwnProperty.call(this.animationGOFeature.superMapAlgoSymbol,"m_bIsAnimation")&&(this.animationGOFeature.superMapAlgoSymbol.m_bIsAnimation=!0),this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs(h)),this.animationGOFeature.superMapAlgoSymbol.m_bIsAnimation=!1,!0},_execute_1002:function(t){if(0===this.lineLength&&(this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs()),this.lineLength=SuperMap.Plot.PlottingUtil.polylineDistance(this.controlPoints)),0===t)return this._executeAndRatioIsZero(),!0;for(var e=[],o=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints),i=this._findPos(this.lineLength*t,o),n=0;n<=i.pos;n++)e.push(o[n]);e.push(i.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=[],o=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints),i=this._findPos(this.lineLength*t,o),n=0;n<=i.pos;n++)e.push(o[n]);return e.push(i.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),o=Math.abs(this.controlPoints[0].x-this.controlPoints[1].x)/2*t,i=Math.abs(this.controlPoints[0].y-this.controlPoints[1].y)/2*t,n=new SuperMap.Geometry.Point(e.x-o,e.y+i),l=new SuperMap.Geometry.Point(e.x+o,e.y-i);return this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs([n,l])),!0},_execute_Circle:function(t){0===this.controlPoints.length&&(this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs()));var e=this.controlPoints[0].clone(),o=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+o,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=[],o=this.controlPoints.length,i=SuperMap.Plot.PlottingUtil.getPolygonCenterPt(this.controlPoints);if(null===i)return this._executeAndRatioIsZero(),!0;for(var n=0;n<o;n++){var l=SuperMap.Plot.PlottingUtil.distance(i,this.controlPoints[n]),a=l*t;if(a>l)return!1;var s=SuperMap.Plot.PlottingUtil.linePnt(i,this.controlPoints[n],a);e.push(s)}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,o=SuperMap.Plot.PlottingUtil.distance(this.controlPoints[0],this.controlPoints[this.controlPoints.length-1])*t,i=new SuperMap.Geometry.Point(this.controlPoints[0].x+o,this.controlPoints[0].y),n=2*Math.PI/(e+1),l=Math.PI/2+this.animationGOFeature.dRotate,a=i;SuperMap.Plot.PlottingUtil.rotateAngle(this.controlPoints[0],l,a);var s=[];s.push(this.controlPoints[0].clone()),s.push(a);for(var r=a.clone(),u=1;u<e-1;u++)SuperMap.Plot.PlottingUtil.rotateAngle(this.controlPoints[0],n,r),s.push(r.clone());return this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs(s)),!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]),o=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(o.y,o.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,o=SuperMap.Plot.PlottingUtil.getPolygonCenterPt(this.controlPoints);if(null===o)return this._executeAndRatioIsZero(),!0;for(var i=[],n=0;n<e;n++){var l=SuperMap.Plot.PlottingUtil.distance(o,this.controlPoints[n])*t,a=SuperMap.Plot.PlottingUtil.linePnt(o,this.controlPoints[n],l);i.push(a)}return this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs(i)),!0},_execute_ParallelLine:function(t){if(0===this.lineLength){this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs());for(var e=2;e<this.controlPoints.length;e++)this.lineLength+=SuperMap.Plot.PlottingUtil.distance(this.controlPoints[e-1],this.controlPoints[e])}for(var o=[],i=[],n=1;n<this.controlPoints.length;n++)i.push(this.controlPoints[n].clone());var l=this._findPos(this.lineLength*t,i);o.push(this.controlPoints[0].clone());for(var a=0;a<=l.pos;a++)o.push(i[a]);return o.push(l.pts),this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs(o)),!0},_execute_Polybezier:function(t){if(0===this.lineLength){this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs());var e=SuperMapAlgoPlot.PlottingUtil.computeBeizerPoints(this.goFeature.isEdit,this.controlPoints,this.goFeature.scaleValues).beizerPoints;this.lineLength+=SuperMap.Plot.PlottingUtil.polylineDistance(e)}var o=[];e=SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(this.controlPoints,[]);for(var i=this._findPos(this.lineLength*t,e),n=0;n<=i.pos;n++)o.push(e[n].clone());return o.push(i.pts),this.animationGOFeature.superMapAlgoSymbol.m_bIsAnimation=!0,this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs(o)),this.animationGOFeature.superMapAlgoSymbol.m_bIsAnimation=!1,!0},_execute_CurveEight:function(t){0===this.controlPoints.length&&(this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs()));for(var e=SuperMap.Plot.PlottingUtil.getPolygonCenterPt(this.controlPoints),o=[],i=0;i<this.controlPoints.length;i++){var n=SuperMap.Plot.PlottingUtil.distance(e,this.controlPoints[i])*t,l=SuperMap.Plot.PlottingUtil.linePnt(e,this.controlPoints[i],n);o.push(l)}return this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs(o)),!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=[],o=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if(this.goFeature.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXTBOX||this.goFeature.symbolType===SuperMap.Plot.SymbolType.LINEMARKING){var i=[];i.push(this.controlPoints[0]),i.push(new SuperMap.Geometry.Point(this.goFeature.scaleValues[1],this.goFeature.scaleValues[2]));var n=SuperMap.Plot.PlottingUtil.polylineDistance(i),l=this._findPos(n*t,i);this.animationGOFeature.scaleValues[1]=l.pts.x,this.animationGOFeature.scaleValues[2]=l.pts.y}else for(var a=this.goFeature.scaleValues.length/2,s=0;s<a;s++){var r=[];r.push(this.controlPoints[0]),r.push(new SuperMap.Geometry.Point(this.goFeature.scaleValues[2*s],this.goFeature.scaleValues[2*s+1]));var u=SuperMap.Plot.PlottingUtil.polylineDistance(r),p=this._findPos(u*t,r);this.animationGOFeature.scaleValues[2*s]=p.pts.x,this.animationGOFeature.scaleValues[2*s+1]=p.pts.y}for(var h=this._findPos(this.lineLength*t,o),c=0;c<=h.pos;c++)e.push(o[c]);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){yr.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 lr))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,o=this.animationGOFeature.code,i=this.animationGOFeature.libID;if(0===i)switch(o){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===i)switch(o){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===i)switch(o){case 25200:e=this._execute_1004(t);break;default:e=this._execute_Generalization(t)}else if(421===i)switch(o){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===i)switch(o){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 o,i=0,n=0;for(o=1;o<e.length&&!(i+(n=SuperMap.Plot.PlottingUtil.distance(e[o-1],e[o]))>=t);o++)i+=n;var l,a=new Object;return l=o<e.length?SuperMap.Plot.PlottingUtil.findPoint(e[o-1],e[o],t-i,0):e[o-1].clone(),a.pos=o-1,a.pts=l,a},getJSONData:function(){var t=yr.prototype.getJSONData.call(this);return t.startScale=this.startScale,t.endScale=this.endScale,t},fromJSONData:function(t){yr.prototype.fromJSONData.call(this,t),this.startScale=t.startScale,this.endScale=t.endScale,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animatitonpropertyconfig,{jsonData:t})}});L.supermap.plotting.GOAnimationGrow=Pr;var dr=yr.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]),yr.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),o=this.animationGOFeature.dRotate;return this.animationGOFeature._rotate(e-o,this.animationGOFeature.getLatLngs()[0]),!0},_getCurrentAngle:function(t,e,o){var i=0,n=e-t,l=parseInt(Math.abs(n/360));if(t!==e)if(this.rotateDirection===SuperMap.Plot.RotateDirection.AntiClockWise)n<0&&(n+=360*(2*l+1)),i=t+n*o;else{var a=0;i=t+(360-(n=0===(a=n<0?n+360*(l+1):n-360*l)?360*l:360-a+360*l)*o)}return i},getJSONData:function(){var t=yr.prototype.getJSONData.call(this);return t.rotateDirection=this.rotateDirection,t.startAngle=this.startAngle,t.endAngle=this.endAngle,t},fromJSONData:function(t){yr.prototype.fromJSONData.call(this,t),this.rotateDirection=t.rotateDirection,this.startAngle=t.startAngle,this.endAngle=t.endAngle}});L.supermap.plotting.GOAnimationRotate=dr;var Sr=yr.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]),yr.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 o=this.goFeature.initialScale.x*(t+this.ratio*(e-t));return this.animationGOFeature._resize(o/this.lastScale,this.animationGOFeature.getLatLngs()[0]),!0},getJSONData:function(){var t=yr.prototype.getJSONData.call(this);return t.startScale=this.startScale,t.endScale=this.endScale,t},fromJSONData:function(t){yr.prototype.fromJSONData.call(this,t),this.startScale=t.startScale,this.endScale=t.endScale,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animatitonpropertyconfig,{jsonData:t})}});L.supermap.plotting.GOAnimationScale=Sr;var mr=yr.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=yr.prototype.getJSONData.call(this);return t.showEffect=this.showEffect,t.finalDisplay=this.finalDisplay,t},fromJSONData:function(t){yr.prototype.fromJSONData.call(this,t),this.showEffect=t.showEffect,this.finalDisplay=t.finalDisplay,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animatitonpropertyconfig,{jsonData:t})}});L.supermap.plotting.GOAnimationShow=mr;var br=yr.extend({showPath:!1,tangentDirection:!1,pathWidth:1,pathColor:"#FF0000",currentPt:null,pathType:SuperMap.Plot.WayPathType.POLYLINE,wayPoints:null,shapePoints:null,pathFeature:null,pathLength:0,path:null,destroy:function(){null!==this.pathFeature&&(L.supermap.plotting.getControl().getGOAnimationManager().map.removeLayer(this.pathFeature),this.pathFeature=null);yr.prototype.destroy.call(this)},getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_WAY},setShowPath:function(t){this.showPath=t,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})},setPath:function(t){this.path=t},setTangentDirection:function(t){this.tangentDirection=t,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})},resetAnimationFeature:function(t){yr.prototype.resetAnimationFeature.call(this,t);var e=this.goFeature.dRotate,o=this.animationGOFeature.dRotate;this.animationGOFeature._rotate(e-o,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,o=new Object,i=this._findPos(e,this.shapePoints,o);this.currentPt=i.clone();var n=this.animationGOFeature.getLatLngs()[0],l=i.y-n.lat,a=i.x-n.lng;if(this.animationGOFeature.move(l,a),this.tangentDirection){null==this.prevAngle&&(this.prevAngle=0);var s=o.angle;1===t&&(s=0),this.animationGOFeature._rotate(s-this.prevAngle,this.animationGOFeature.getLatLngs()[0]),this.prevAngle=s}return!0},setWayPoints:function(t){(!t||!SuperMap.Util.isArray(t)||2>t.length)&&(t=[this.goFeature.getLatLngs()[0],this.goFeature.getLatLngs()[0]]),this.wayPoints=[],this.wayPoints=L.Util.cloneLatLngs(t);var e=L.supermap.plotting.getControl().getGOAnimationManager();null!==this.pathFeature&&(e.map.removeLayer(this.pathFeature),this.pathFeature=null),e.fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})},getWayPoints:function(){return this.wayPoints},getCurrentPt:function(){return this.currentPt},setPathColor:function(t){t&&(this.pathColor=t,this.pathFeature&&null!==this.pathFeature&&(this.pathFeature.options.color=this.pathColor,this.pathFeature.setStyle(this.pathFeature.options),L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})))},getPathColor:function(){return this.pathColor},setPathWidth:function(t){t&&(this.pathWidth=t,this.pathFeature&&null!==this.pathWidth&&(this.pathFeature.options.weight=this.pathWidth,this.pathFeature.setStyle(this.pathFeature.options),L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})))},getPathWidth:function(){return this.pathWidth},setPathType:function(t){if(void 0!==t&&null!==t&&this.pathType!==t){this.pathType=t;var e=L.supermap.plotting.getControl().getGOAnimationManager();null!==this.pathFeature&&(e.map.removeLayer(this.pathFeature),this.pathFeature.destroy(),this.pathFeature=null),e.fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})}},getPathType:function(){return this.pathType},_makePath:function(){((null===this.wayPoints||2>this.wayPoints.length)&&(this.wayPoints=[this.goFeature.getLatLngs()[0],this.goFeature.getLatLngs()[0]]),null===this.pathFeature)&&(this.pathType===SuperMap.Plot.WayPathType.POLYLINE?this.shapePoints=L.Util.latLngsToSuperMapPoints(this.wayPoints):this.shapePoints=SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(L.Util.latLngsToSuperMapPoints(this.wayPoints)),this.pathFeature=L.polyline(L.Util.superMapPointsToLatLngs(this.shapePoints),SuperMap.Plot.PlottingUtil.cloneObject(this.animationGOFeature.style)),L.supermap.plotting.getControl().getGOAnimationManager().map.addLayer(this.pathFeature));this.pathLength=0;for(var t=1;t<this.shapePoints.length;t++)this.pathLength+=SuperMap.Plot.PlottingUtil.distance(this.shapePoints[t-1],this.shapePoints[t]);return this.pathFeature},_findPos:function(t,e,o){var i,n=0,l=0;for(i=1;i<e.length&&!(n+(l=SuperMap.Plot.PlottingUtil.distance(e[i-1],e[i]))>=t);i++)n+=l;var a=SuperMap.Plot.PlottingUtil.findPoint(e[i-1],e[i],t-n,0);return this.tangentDirection&&(o.angle=SuperMap.Plot.PlottingUtil.radian(a,e[i])/Math.PI*180),a},getJSONData:function(){var t=yr.prototype.getJSONData.call(this);t.showPath=this.showPath,t.tangentDirection=this.tangentDirection,t.pathType=this.pathType,t.pathWidth=this.pathWidth,this.pathColor&&(t.pathColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(this.pathColor)),t.wayPoints=[];for(var e=0;e<this.wayPoints.length;e++)t.wayPoints.push({x:this.wayPoints[e].lng,y:this.wayPoints[e].lat});return t},fromJSONData:function(t){yr.prototype.fromJSONData.call(this,t),this.showPath=t.showPath,this.tangentDirection=t.tangentDirection,this.pathType=t.pathType,this.pathWidth=t.pathWidth,null!=t.pathColor.red?this.pathColor=SuperMapAlgoPlot.PlottingUtil.colorRGBToString(t.pathColor):this.pathColor=t.pathColor;for(var e=[],o=0;o<t.wayPoints.length;o++)e.push(L.latLng(t.wayPoints[o].y,t.wayPoints[o].x));this.setWayPoints(e),L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animatitonpropertyconfig,{jsonData:t})}});L.supermap.plotting.GOAnimationWay=br;var Lr=br.extend({geoGraphicObject:null,duration:5,animationPlayType:SuperMap.Plot.AnimationPlayType.PLAYFROMNOW,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_WAY_EXP},setPath:function(t){if(t instanceof AlgoSymbol){for(var e=[],o=0;o<value.components.length;o++){var i=value.components[o];e=e.concat(i.shapePts)}this.setWayPoints(e)}}});L.supermap.plotting.AnimationWay=Lr;var Mr=br.extend({pathType:SuperMap.Plot.WayPathType.CURVE,duration:5,animationPlayType:SuperMap.Plot.AnimationPlayType.PLAYFROMNOW,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_CURVE_EXP}});L.supermap.plotting.AnimationCurve=Mr;var vr=br.extend({pathType:SuperMap.Plot.WayPathType.POLYLINE,duration:5,animationPlayType:SuperMap.Plot.AnimationPlayType.PLAYFROMNOW,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_BROKENLINE_EXP}});L.supermap.plotting.AnimationBrokenline=vr;var Ar=Pr.extend({startScale:0,endScale:1,duration:2,animationPlayType:SuperMap.Plot.AnimationPlayType.PLAYFROMNOW,initialize:function(t){Pr.prototype.initialize.call(this,t)},getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_GROW_EXP},resetAnimationFeature:function(t){Pr.prototype.resetAnimationFeature.call(this,t),this.startScale=0,this.endScale=1}});L.supermap.plotting.AnimationGrow=Ar;var Tr=Pr.extend({startScale:1,endScale:0,duration:1,animationPlayType:SuperMap.Plot.AnimationPlayType.PLAYFROMNOW,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_REDUCE_EXP},resetAnimationFeature:function(t){Pr.prototype.resetAnimationFeature.call(this,t),this.startScale=1,this.endScale=0}});L.supermap.plotting.AnimationReduce=Tr;var _r=mr.extend({showEffect:!0,finalDisplay:!0,duration:3,animationPlayType:SuperMap.Plot.AnimationPlayType.PLAYFROMNOW,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_MOVEIN_EXP}});L.supermap.plotting.AnimationMoveIn=_r;var Or=mr.extend({showEffect:!0,finalDisplay:!1,duration:1,animationPlayType:SuperMap.Plot.AnimationPlayType.PLAYFROMNOW,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_MOVEOUT_EXP}});L.supermap.plotting.AnimationMoveOut=Or;var xr=Sr.extend({startScale:0,endScale:1,duration:2,animationPlayType:SuperMap.Plot.AnimationPlayType.PLAYFROMNOW,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_ZOOMIN_EXP}});L.supermap.plotting.AnimationZoomIn=xr;var wr=Sr.extend({startScale:1,endScale:0,duration:2,animationPlayType:SuperMap.Plot.AnimationPlayType.PLAYFROMNOW,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_ZOOMOUT_EXP}});L.supermap.plotting.AnimationZoomOut=wr;var Er=mr.extend({showEffect:!1,finalDisplay:!0,duration:1,animationPlayType:SuperMap.Plot.AnimationPlayType.PLAYFROMNOW,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_SHOW_EXP}});L.supermap.plotting.AnimationShow=Er;var Cr=mr.extend({showEffect:!1,finalDisplay:!1,duration:1,animationPlayType:SuperMap.Plot.AnimationPlayType.PLAYFROMNOW,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_HIDE_EXP}});L.supermap.plotting.AnimationHide=Cr;var Ir=fr.extend({bVisible:!1,duration:2,animationPlayType:SuperMap.Plot.AnimationPlayType.PLAYFROMNOW,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_BLINK_EXP},getVisible:function(){return this.bVisible},setVisible:function(t){this.bVisible=t},getJSONData:function(){var t=fr.prototype.getJSONData.call(this);return t.bVisible=this.bVisible,t},fromJSONData:function(t){fr.prototype.fromJSONData.call(this,t),this.bVisible=t.bVisible}});function Rr(t){"@babel/helpers - typeof";return(Rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Dr(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Ur(t,e){return(Ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Nr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var o,i=Br(t);if(e){var n=Br(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return function(t,e){if(e&&("object"===Rr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,o)}}function Br(t){return(Br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}L.supermap.plotting.AnimationBlink=Ir;var kr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ur(t,e)}(l,cr);var e,o,i,n=Nr(l);function l(t,e,o){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(i=n.call(this,o)).serverUrl=null,i.map=null,i.goAnimationLayers=[],i.initialize(t,e,o),i.options={serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},i}return e=l,(o=[{key:"initialize",value:function(t,e,o){null===this.goAnimations&&(this.goAnimations=[]),t&&null!==t&&null===this.map&&this.setMap(t),e&&null===this.serverUrl&&(this.serverUrl=e),o&&SuperMap.Util.extend(this.options,o)}},{key:"destroy",value:function(){l.prototype.goAnimations=null;for(var t=0;t<this.goAnimationLayers.length;t++)this.map.removeLayer(this.goAnimationLayers[t]),this.goAnimationLayers[t].destroy();this.goAnimationLayers=[],this.map=null,this.serverUrl=null}},{key:"setMap",value:function(t){if(null===t)return!1;this.map=t}},{key:"getAnimationLayer",value:function(t){for(var e=0;e<this.goAnimationLayers.length;e++)if(this.goAnimationLayers[e].name===t+"_animation")return this.goAnimationLayers[e];var o=L.supermap.plotting.animationLayer(t+"_animation",{displayInLayerSwitcher:!1});return this.map.addLayer(o),this.goAnimationLayers.push(o),o}},{key:"createGOAnimation",value:function(t,e,o){var i,n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:SuperMap.Plot.AnimationPlayType.UNKNOWN,a=this.createGOAnimationByType(t,e);if(null===a)return null;if(o._eventParents)for(var s in o._eventParents)i=o._eventParents[s];return o instanceof L.supermap.plotting.Route||i instanceof L.supermap.plotting.Route?null:a.setGOFeature(o)?(this.goAnimations.push(a),l!==SuperMap.Plot.AnimationPlayType.UNKNOWN&&a.setAnimationPlayType(l),n&&this.fire(SuperMap.Plot.Event.animationcreated,{goAnimation:a}),a):null}},{key:"findGOAnimationByName",value:function(t){if(null===this.goAnimations||null===t||""===t)return null;for(var e=null,o=0;o<this.goAnimations.length;o++)if(this.goAnimations[o].name===t){e=this.goAnimations[o];break}return e}},{key:"findGOAnimationsByFeature",value:function(t){var e=[];if(null===this.goAnimations||"undefined"===t||null===t)return e;for(var o=0;o<this.goAnimations.length;o++)this.goAnimations[o].getGOFeature()===t&&e.push(this.goAnimations[o]);return e}},{key:"findGOAnimationsByUuid",value:function(t){if(null===this.goAnimations||"undefined"===t||null===t)return[];var e=this.map.getFeatureByUuid(t);return this.findGOAnimationsByFeature(e)}},{key:"removeGOAnimationByName",value:function(t){if(null===this.goAnimations||null===t||""===t)return!1;var e=this.findGOAnimationByName(t);return this.removeGOAnimation(e)}},{key:"removeGOAnimation",value: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();var o=this.getAnimationGroup(t).group,i=this.getAnimationGroup(t).index;this.goAnimations.splice(e,1),t.destroy(),o.splice(i,1);for(var n=i;n<o.length;n++){var l=o[n];this.changeAnimationTime(l)}break}return this.fire(SuperMap.Plot.Event.animationdeleted,{result:t}),!0}},{key:"removeAllGOAnimation",value:function(){if(null!==this.goAnimations){for(var t=0;t<this.goAnimations.length;t++)this.removeGOAnimation(this.goAnimations[t]);this.goAnimations=[]}}},{key:"execute",value:function(){if(0===this.goAnimations.length)return!1;for(var t=0;t<this.goAnimations.length;t++)this.goAnimations[t].execute();if(this.hasGrowAnimation())for(var e=0;e<this.goAnimations.length;e++)this.redrawFeature(this.goAnimations[e].animationGOFeature);return 0!==this.goAnimations.length||void 0}},{key:"hasGrowAnimation",value: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}},{key:"redrawFeature",value:function(t){if(!(t.grow&&t instanceof lr))return!0;var e=new SuperMap.GetSymbolInfoParameters;e.libID=t.libID,e.code=t.code,e.surroundLineType=t.surroundLineType,e.inputPoints=L.Util.latLngsToSuperMapPoints(t.getLatLngs()),e.subSymbols=t.subSymbols,e.scaleValues=t.scaleValues,L.supermap.symbolInfoService(t.serverUrl,this.options.serviceParams).getSymbolInfo(e,function(e){t.symbolData.innerCells=e.result.innerCells,t.redraw()},this)}},{key:"createGOAnimationByType",value:function(t,e){if(null===e||""===e||null===this.map)return null;if(null!==this.findGOAnimationByName(e))return null;var o=null;switch(t){case SuperMap.Plot.GOAnimationType.ANIMATION_WAY:o=new br;break;case SuperMap.Plot.GOAnimationType.ANIMATION_BLINK:o=new fr;break;case SuperMap.Plot.GOAnimationType.ANIMATION_ATTRIBUTE:o=new gr;break;case SuperMap.Plot.GOAnimationType.ANIMATION_SHOW:o=new mr;break;case SuperMap.Plot.GOAnimationType.ANIMATION_ROTATE:o=new dr;break;case SuperMap.Plot.GOAnimationType.ANIMATION_SCALE:o=new Sr;break;case SuperMap.Plot.GOAnimationType.ANIMATION_GROW:o=new Pr;break;case SuperMap.Plot.GOAnimationType.ANIMATION_GROW_EXP:o=new Ar;break;case SuperMap.Plot.GOAnimationType.ANIMATION_REDUCE_EXP:o=new Tr;break;case SuperMap.Plot.GOAnimationType.ANIMATION_SHOW_EXP:o=new Er;break;case SuperMap.Plot.GOAnimationType.ANIMATION_HIDE_EXP:o=new Cr;break;case SuperMap.Plot.GOAnimationType.ANIMATION_MOVEIN_EXP:o=new _r;break;case SuperMap.Plot.GOAnimationType.ANIMATION_MOVEOUT_EXP:o=new Or;break;case SuperMap.Plot.GOAnimationType.ANIMATION_ZOOMIN_EXP:o=new xr;break;case SuperMap.Plot.GOAnimationType.ANIMATION_ZOOMOUT_EXP:o=new wr;break;case SuperMap.Plot.GOAnimationType.ANIMATION_BLINK_EXP:o=new Ir;break;case SuperMap.Plot.GOAnimationType.ANIMATION_WAY_EXP:o=new Lr;break;case SuperMap.Plot.GOAnimationType.ANIMATION_BROKENLINE_EXP:o=new vr;break;case SuperMap.Plot.GOAnimationType.ANIMATION_CURVE_EXP:o=new Mr;break;default:return null}return null!==o&&(o.name=e),o}},{key:"getJSONData",value:function(){for(var t={animations:[]},e=0;e<this.goAnimations.length;e++)t.animations.push(this.goAnimations[e].getJSONData());return t}},{key:"fromJSONData",value:function(t){if(Object.prototype.hasOwnProperty.call(t,"ANIMATIONSJSON"))for(var e=0;e<t.AnimationGroups.length;e++)for(var o=0;o<t.AnimationGroups[e].Animations.length;o++){var i=t.AnimationGroups[e].Animations[o],n=i.goLayerUuid||i.goFeatureUuid,l=this.map.getFeatureByUuid(n),a=i.name,s=i.type;if(l&&a&&-1!==s)null!==(u=this.createGOAnimation(s,a,l))&&u.fromJSONData(i)}else for(var r=0;r<t.animations.length;r++){var u,p=t.animations[r],h=p.goFeatureUuid||p.goLayerUuid,c=this.map.getFeatureByUuid(h),y=p.name,g=p.type;if(c&&y&&-1!==g)null!==(u=this.createGOAnimation(g,y,c))&&u.fromJSONData(p)}}},{key:"saveEvoFile",value:function(){}},{key:"openEvoFileOnServer",value:function(){}}])&&Dr(e.prototype,o),i&&Dr(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();L.supermap.plotting.goAnimationManager=function(t,e,o){return new kr(t,e,o)};var Fr=L.Evented.extend({map:null,serverUrl:null,smlInfo:null,smlFileName:null,options:{serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},initialize:function(t,e,o){o&&SuperMap.Util.extend(this.options,o),t&&null!==t&&null===this.map&&(Fr.prototype.map=t),e&&null===this.serverUrl&&(Fr.prototype.serverUrl=e),null===this.smlInfo&&(Fr.prototype.smlInfo=new SuperMap.Plot.SMLInfoStruct),null===this.smlFileName&&(Fr.prototype.smlFileName="situationMap")},destroy:function(){Fr.prototype.map=null,Fr.prototype.smlInfo.destroy(),Fr.prototype.smlInfo=null,Fr.prototype.smlFileName=null,Fr.prototype.serverUrl=null},getSitDataLayers:function(){return this.map.getPlottingLayers()},getSmlData:function(){var t=this.map.getPlottingLayers(),e=new SuperMap.Plot.SitDataStruct;e.smlInfo=this.smlInfo;var o=new SuperMap.Plot.MapInfoStruct;o.zoom=this.map.getZoom(),o.centerX=this.map.getCenter().lng,o.centerY=this.map.getCenter().lat,e.mapInfo=o,e.layerDatas=[];for(var i=0;i<t.length;i++){var n=t[i].features,l=new SuperMap.Plot.LayerDataStruct;l.layerName=t[i].name,l.spatialAnalystUrl=t[i].spatialAnalystUrl,this.map instanceof L.Map?this.map.getRenderer(t[i])instanceof L.Canvas&&(l.useCanvas=!0):(l.useCanvas=t[i].useCanvas,l.useCanvas2=t[i].useCanvas2),l.isEditable=t[i].getEditable(),l.isLocked=t[i].getLocked(),l.visibility=t[i].getVisibility(),l.features=n,e.layerDatas.push(l)}return SuperMap.Plot.PlottingUtil.toJSON(e)},openSmlData:function(t){if(this.smlInfo.fromJSON(t.smlInfo),t.mapInfo){var e=new SuperMap.Plot.MapInfoStruct;e.fromJSON(t.mapInfo),null!==e.zoom&&null!==e.centerX&&null!==e.centerY&&this.map.setView(L.latLng(e.centerY,e.centerX),e.zoom,{reset:!0})}var o,i=t.layerDatas;this.map.clearPlottingLayers();for(var n=0,l=i.length;n<l;n++)(o=L.supermap.plotting.plottingLayer(i[n].layerName,this.serverUrl,{renderer:L.canvas(),serviceParams:this.options.serviceParams})).spatialAnalystUrl=i[n].spatialAnalystUrl,this.map.addLayer(o),this._load(i[n],o),void 0!==i[n].isEditable&&null!==i[n].isEditable&&o.setEditable(i[n].isEditable),void 0!==i[n].isLocked&&null!==i[n].isLocked&&o.setLocked(i[n].isLocked),void 0!==i[n].visibility&&null!==i[n].visibility&&o.setVisibility(i[n].visibility),void 0!==i[n].minVisibleScale&&null!==i[n].minVisibleScale&&o.setMinVisibleScale(i[n].minVisibleScale),void 0!==i[n].maxVisibleScale&&null!==i[n].maxVisibleScale&&o.setMaxVisibleScale(i[n].maxVisibleScale),void 0!==i[n].symScaleDefinition&&null!==i[n].symScaleDefinition&&o.setSymScaleDefinition(i[n].symScaleDefinition)},addSmlData:function(t,e){this.smlInfo.fromJSON(t.smlInfo);for(var o=t.layerDatas,i=null,n=0;n<o.length;n++)if(null!==o[n].layerName){var l=this.map.getLayersByName(o[n].layerName);0!==l.length?i=l[0]:e&&((i=L.supermap.plotting.plottingLayer(o[n].layerName,this.serverUrl,{serviceParams:this.options.serviceParams})).spatialAnalystUrl=o[n].spatialAnalystUrl,this.map.addLayer(i)),null!==i&&this._load(o[n],i)}},addSmlDataToLayer:function(t,e){this.smlInfo.fromJSON(t.smlInfo);var o=t.layerDatas,i=null,n=this.map.getLayersByName(e);0!==n.length?i=n[0]:(i=L.supermap.plotting.plottingLayer(e,this.serverUrl,{serviceParams:this.options.serviceParams}),this.map.addLayer(i));for(var l=0;l<o.length;l++)this._load(o[l],i)},openSmlFile:function(t,e){var o=this.serverUrl+"smlInfos/",i=document.getElementById(t).value.split("\\"),n=i[i.length-1];o+=n;var l=this;""!==n&&$.ajaxFileUpload({url:o,secureuri:!1,fileElementId:t,dataType:"json",timeout:36e5,success:function(){l.openSmlFileOnServer(n,e)},error:function(){e({success:!1,message:"打开本地态势图文件失败"})}})},addSmlFile:function(t,e,o){var i=this.serverUrl+"smlInfos/",n=document.getElementById(t).value.split("\\"),l=n[n.length-1];i+=l;var a=this;""!==l&&$.ajaxFileUpload({url:i,secureuri:!1,fileElementId:t,dataType:"json",timeout:36e5,success:function(){a.addSmlFileOnServer(l,e,o)},error:function(){o({success:!1,message:"叠加本地态势图文件失败"})}})},uploadSmlFile:function(t,e){var o=this.serverUrl+"smlInfos/",i=document.getElementById(t).value.split("\\"),n=i[i.length-1];o+=n,""!==n&&$.ajaxFileUpload({url:o,secureuri:!1,fileElementId:t,dataType:"json",timeout:36e5,success:function(){e({success:!0,message:"上传态势图文件成功"})},error:function(){e({success:!1,message:"上传态势图文件失败"})}})},addSmlFileToLayer:function(t,e,o){var i=this.serverUrl+"smlInfos/",n=document.getElementById(t).value.split("\\"),l=n[n.length-1];i+=l;var a=this;""!==l&&$.ajaxFileUpload({url:i,secureuri:!1,fileElementId:t,dataType:"json",timeout:36e5,success:function(){a.addSmlFileToLayerOnServer(l,e,o)},error:function(){o({success:!1,message:"打开本地文件失败"})}})},addSmlFileOnServer:function(t,e,o){var i=new SuperMap.EditSmlFileParameters;i.method="GET",i.smlFileName=t,L.supermap.smlFileService(this.serverUrl,this.options.serviceParams).editSMLFile(i,function(t){if(t.result.succeed){var i=t.result;this.smlInfo.fromJSON(i.smlInfo);for(var n=i.layerDatas,l=null,a=0;a<n.length;a++){var s=[];n[a].layerName&&(s=this.map.getLayersByName(n[a].layerName)),0!==s.length?l=s[0]:e&&((l=L.supermap.plotting.plottingLayer(n[a].layerName,this.serverUrl,{serviceParams:this.options.serviceParams})).spatialAnalystUrl=n[a].spatialAnalystUrl,this.map.addLayer(l)),null!==l&&this._load(n[a],l)}null!==l&&"function"==typeof o?o({success:!0,smlFileName:this.smlFileName,sitDataLayers:this.map.getPlottingLayers()}):"function"==typeof o&&o({success:!1,message:"态势图文件不存在与当前态势图同名的图层"})}else"function"==typeof o&&o({success:!1,message:"从服务器上获取态势图文件失败"})},this)},addSmlFileToLayerOnServer:function(t,e,o){var i=new SuperMap.EditSmlFileParameters;i.method="GET",i.smlFileName=t,L.supermap.smlFileService(this.serverUrl,this.options.serviceParams).editSMLFile(i,function(t){if(t.result.succeed){var i=t.result;this.smlInfo.fromJSON(i.smlInfo);var n=i.layerDatas,l=null,a=this.map.getLayersByName(e);0!==a.length?l=a[0]:(l=L.supermap.plotting.plottingLayer(e,this.serverUrl,{serviceParams:this.options.serviceParams}),this.map.addLayer(l));for(var s=0;s<n.length;s++)this._load(n[s],l);"function"==typeof o&&o({success:!0,smlFileName:this.smlFileName,sitDataLayers:this.map.getPlottingLayers()})}else"function"==typeof o&&o({success:!1,message:"从服务器上获取态势图失败"})},this)},downloadSmlFileURL:function(t){return"smlFileDownload/".concat(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 o=this.map.getPlottingLayers();this._save(t,o,!1,e)},getSMLInfo:function(t,e){var o=new SuperMap.EditSmlFileParameters;o.method="GET",o.smlFileName=t,L.supermap.smlFileService(this.serverUrl,this.options.serviceParams).editSMLFile(o,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,o){var i=t*e,n=e,l=new SuperMap.GetSMLInfosParameters;l.start=i,l.count=n,L.supermap.smlFileService(this.serverUrl,this.options.serviceParams).getSMLInfos(l,function(t){t.result.succeed&&"function"==typeof o?o({success:!0,smlInfoList:t.result}):"function"==typeof o&&o({success:!1})},this)},_getCompletedInit:function(t,e){if(this.smlFileName=e,this.smlInfo.fromJSON(t.smlInfo),t.mapInfo){var o=new SuperMap.Plot.MapInfoStruct;o.fromJSON(t.mapInfo),null!==o.zoom&&null!==o.centerX&&null!==o.centerY&&this.map.setView(L.latLng(o.centerY,o.centerX),o.zoom,{reset:!0})}var i,n=t.layerDatas;this.map.clearPlottingLayers();for(var l=0,a=n.length;l<a;l++)(i=L.supermap.plotting.plottingLayer(n[l].layerName,this.serverUrl,{renderer:L.canvas(),serviceParams:this.options.serviceParams})).spatialAnalystUrl=n[l].spatialAnalystUrl,this.map.addLayer(i),this._load(n[l],i),void 0!==n[l].isEditable&&null!==n[l].isEditable&&i.setEditable(n[l].isEditable),void 0!==n[l].isLocked&&null!==n[l].isLocked&&i.setLocked(n[l].isLocked),void 0!==n[l].visibility&&null!==n[l].visibility&&i.setVisibility(n[l].visibility),void 0!==n[l].minVisibleScale&&null!==n[l].minVisibleScale&&i.setMinVisibleScale(n[l].minVisibleScale),void 0!==n[l].maxVisibleScale&&null!==n[l].maxVisibleScale&&i.setMaxVisibleScale(n[l].maxVisibleScale),void 0!==n[l].symScaleDefinition&&null!==n[l].symScaleDefinition&&i.setSymScaleDefinition(n[l].symScaleDefinition)},openSmlFileOnServer:function(t,e){var o=new SuperMap.EditSmlFileParameters;o.method="GET",o.smlFileName=t,L.supermap.smlFileService(this.serverUrl,this.options.serviceParams).editSMLFile(o,function(o){o.result.succeed?(this._getCompletedInit(o.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 o=new SuperMap.EditSmlFileParameters;o.method="DELETE",o.smlFileName=t,L.supermap.smlFileService(this.serverUrl,this.options.serviceParams).editSMLFile(o,function(t){t.result.succeed&&"function"==typeof e?e({success:!0}):"function"==typeof e&&e({success:!1})},this)},_save:function(t,e,o,i){var n=new SuperMap.Plot.SitDataStruct;n.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,n.mapInfo=l,n.layerDatas=[];for(var a=0;a<e.length;a++){var s=e[a].features,r=new SuperMap.Plot.LayerDataStruct;r.layerName=e[a].name,r.spatialAnalystUrl=e[a].spatialAnalystUrl,this.map instanceof L.Map?this.map.getRenderer(e[a])instanceof L.Canvas&&(r.useCanvas=!0):(r.useCanvas=e[a].useCanvas,r.useCanvas2=e[a].useCanvas2),r.minVisibleScale=e[a].getMinVisibleScale(),r.maxVisibleScale=e[a].getMaxVisibleScale(),r.symScaleDefinition=e[a].getSymScaleDefinition(),r.isEditable=e[a].getEditable(),r.isLocked=e[a].getLocked(),r.visibility=e[a].getVisibility(),r.features=s,n.layerDatas.push(r)}var u=new SuperMap.EditSmlFileParameters;u.method="POST",u.sitData=n,u.smlFileName=t,u.isCover=o,L.supermap.smlFileService(this.serverUrl,this.options.serviceParams).editSMLFile(u,function(t){t.result.succeed&&"function"==typeof i?i({success:!0}):"function"==typeof i&&i({success:!1})},this)},_load:function(t,e){var o=this;e.spatialAnalystUrl=t.spatialAnalystUrl;for(var i=0,n=t.features.length;i<n;i++){var l,a,s,r=t.features[i];if(null!==r)!function(){r.resolution?l=o.map.getZoom():r.fromZoom&&(l=r.fromZoom),!1===r.scaleByMap&&(l=o.map.getZoom()),Object.prototype.hasOwnProperty.call(r,"isEdit")||(r.isEdit=!0);var t=r.uuid;if(r.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&null==r.innerCells){var i={};if(i.symbolRank=r.symbolRank,i.surroundLineType=r.surroundLineType,a=!1,0===i.surroundLineType&&0===i.symbolRank||(a=!0),s=e._getSymbolDataFromCache(r.libID,r.code),a||null===s){var n=new SuperMap.GetSymbolInfoParameters({libID:r.libID,code:r.code,symbolRank:i.symbolRank,surroundLineType:i.surroundLineType,inputPoints:r.localePoints,subSymbols:r.subSymbols});L.supermap.symbolInfoService(o.serverUrl,o.options.serviceParams).getSymbolInfo(n,function(o){o.result.libID&&o.result.code&&(o.result.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL||a||e._cacheSymbolData(o.result),s=SuperMap.Util.cloneObject(o.result),SuperMap.Plot.AnalysisSymbol.mergeSymbolDataAndServerData(r,s),e.createSymbol(r.libID,r.code,void 0,t,{},{serverUrl:this.serverUrl,symbolData:r,fromZoom:l,map:this.map,serviceParams:this.options.serviceParams,isGeoJSONData:!0}))},o)}else SuperMap.Plot.AnalysisSymbol.mergeSymbolDataAndServerData(r,s),e.createSymbol(r.libID,r.code,void 0,t,{},{serverUrl:o.serverUrl,symbolData:r,fromZoom:l,map:o.map,isGeoJSONData:!0})}else e.createSymbol(r.libID,r.code,void 0,t,{},{serverUrl:o.serverUrl,symbolData:r,fromZoom:l,map:o.map})}()}}});L.supermap.plotting.sitDataManager=function(t,e,o){return new Fr(t,e,o)};var Vr=L.Evented.extend({url:null,libID:null,symbolLibData:null,cachedSymbolList:null,needCacheList:null,symbolNames:null,options:{serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},initialize:function(t){this.cachedSymbolList={},this.needCacheList=[],t&&SuperMap.Util.extend(this.options,t),t&&t.url&&t.libID?(this.url=t.url,this.libID=t.libID):t&&t.symbolLibData&&(this.symbolLibData=t.symbolLibData,this.libID=this.symbolLibData.libID,this.initNeedCacheList())},destroy:function(){this.url=null,this.libID=null,this.symbolLibData=null},initializeAsync:function(){var t=new SuperMap.GetLibInfoParameter;t.libID=this.libID,L.supermap.symbolLibService(this.url,this.options.serviceParams).getLibInfo(t,function(t){t.result.succeed?(this.symbolLibData=t.result,this.libID=this.symbolLibData.libID,this.initNeedCacheList(),this.fire(SuperMap.Plot.Event.initializecompleted,{success:!0})):(this.libID=-1,this.fire(SuperMap.Plot.Event.initializecompleted,{success:!1}))},this)},getSymbolLibName:function(){return null===this.symbolLibData?null:this.symbolLibData.symbolLibName},getSymbolName:function(t){return null===this.symbolLibData?"":(null===this.symbolNames&&(this.symbolNames={},this.getSymbolNameFromList(this.symbolLibData.rootSymbolLibNode)),this.symbolNames[t])},getSymbolNameFromList:function(t){for(var e=0;e<t.childNodeCount;e++)"SYMBOL_GROUP"===t.childNodes[e].symbolNodeType?this.getSymbolNameFromList(t.childNodes[e]):"SYMBOL_NODE"===t.childNodes[e].symbolNodeType&&(this.symbolNames[t.childNodes[e].symbolCode]=t.childNodes[e].symbolName);return""},initNeedCacheList:function(){if(null===this.symbolLibData)return!1;this.initNeedCacheListForNode(this.symbolLibData.rootSymbolLibNode)},initNeedCacheListForNode:function(t){for(var e=0;e<t.childNodeCount;e++)"SYMBOL_GROUP"===t.childNodes[e].symbolNodeType?this.initNeedCacheListForNode(t.childNodes[e]):"SYMBOL_NODE"===t.childNodes[e].symbolNodeType&&"SYMBOL_DOT"===t.childNodes[e].symbolType&&this.needCacheList.push(t.childNodes[e].symbolCode)},cachedSymbols:function(){if(0!==this.needCacheList.length){var t=Math.floor(1e3*Math.random()),e=new SuperMap.GetSymbolInfoParameters;e.libID=this.libID,e.code=this.needCacheList[0],e.dynamicToken=t,L.supermap.symbolInfoService(this.url,this.options.serviceParams).getSymbolInfo(e,function e(o){if(o.result.succeed){if(o.result.dynamicToken&&o.result.dynamicToken===SuperMap.MD5.md5(t.toString()))delete o.result.dynamicToken,this.cacheSymbolData(o.result);else{var i=SuperMap.Util.indexOf(this.needCacheList,o.result.code);-1!==i&&this.needCacheList.splice(i,1)}if(0===this.needCacheList.length)this.fire(SuperMap.Plot.Event.cachecompleted,{success:!0});else{var n=new SuperMap.GetSymbolInfoParameters;n.libID=this.libID,n.code=this.needCacheList[0],n.dynamicToken=t,L.supermap.symbolInfoService(this.url,this.options.serviceParams).getSymbolInfo(n,e,this)}}},this),this.cachedSymbolOK=!0}else this.fire(SuperMap.Plot.Event.cachecompleted,{success:!0})},getSymbolLibID:function(){return this.libID},getSymbolData:function(t){var e=null;return Object.prototype.hasOwnProperty.call(this.cachedSymbolList,t)&&(e=SuperMap.Plot.PlottingUtil.cloneObject(this.cachedSymbolList[t])),e},cacheSymbolData:function(t){var e=SuperMap.Util.indexOf(this.needCacheList,t.code);-1!==e&&(this.cachedSymbolList[t.code]=SuperMap.Plot.PlottingUtil.cloneObject(t),this.needCacheList.splice(e,1))},getSymbolCount:function(){return null===this.symbolLibData?null:this.symbolLibData.symbolCount},querySymbolbyKey:function(t){return this.querySymbol(t,this.getRootSymbolInfo(),this.getRootSymbolIconUrl())},getClassFication:function(){return null===this.symbolLibData?null:this.symbolLibData.classFication},getCreateTime:function(){return null===this.symbolLibData?null:this.symbolLibData.createTime},getCreator:function(){return null===this.symbolLibData?null:this.symbolLibData.creator},getModifyTime:function(){return null===this.symbolLibData?null:this.symbolLibData.modifyTime},getRootSymbolIconUrl:function(){return null===this.symbolLibData?null:this.symbolLibData.rootSymbolIconUrl},getVersion:function(){return null===this.symbolLibData?null:this.symbolLibData.version},getRootSymbolInfo:function(){return null===this.symbolLibData?null:this.symbolLibData.rootSymbolLibNode},querySymbol:function(t,e,o){var i=[];if("SYMBOL_GROUP"===e.symbolNodeType)for(var n=0;n<e.childNodes.length;n++)for(var l=o+"/"+e.symbolName,a=this.querySymbol(t,e.childNodes[n],l),s=0;s<a.length;s++)i.push(a[s]);else t===e.symbolCode.toString()?(e.icon=o+"/"+e.symbolCode+".png",i.push(e)):-1!==e.symbolName.indexOf(t)&&(e.icon=o+"/"+e.symbolCode+".png",i.push(e));return i}});L.supermap.plotting.symbolLib=function(t){return new Vr(t)};var jr=L.Evented.extend({url:null,libIDs:null,symbolLibs:null,symbolLibJsons:null,isInializeOK:!1,options:{serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},initialize:function(t,e){jr.prototype.url=t,null===this.libIDs&&(jr.prototype.libIDs=[]),null===this.symbolLibs&&(jr.prototype.symbolLibs=[]),null===this.symbolLibJsons&&(jr.prototype.symbolLibJsons=[]),e&&SuperMap.Util.extend(this.options,e)},destroy:function(){jr.prototype.url=null,jr.prototype.libIDs=null,jr.prototype.symbolLibs=null,jr.prototype.symbolLibJsons=null,jr.prototype.isInializeOK=!1,jr.prototype.isInitialize=!1},initializeAsync:function(){this.isInitializeOK()?this.fire(SuperMap.Plot.Event.initializecompleted,{success:!0,libIDs:this.libIDs}):this.isInitialize||(jr.prototype.isInitialize=!0,L.supermap.symbolLibService(this.url,this.options.serviceParams).getLibIDs(function(t){if(void 0!==t.result&&t.result.succeed){if(null!==this.libIDs&&0!==this.libIDs.length)for(var e=0;e<this.libIDs.length;e++){for(var o=!1,i=0;i<t.result.length;i++)if(jr.prototype.libIDs[e]===t.result[i]){o=!0;break}!1===o&&jr.prototype.libIDs.slice(e,1)}else jr.prototype.libIDs=t.result;this.initializeSymbolLib()}else jr.prototype.libIDs=[]},this))},initializeSymbolLib:function(){for(var t=this.libIDs.slice(),e=0,o=this.libIDs.length;e<o;e++){var i=new SuperMap.GetLibInfoParameter;i.libID=this.libIDs[e],L.supermap.symbolLibService(this.url,this.options.serviceParams).getLibInfo(i,function(e){if(e.result.succeed){var o=SuperMap.Util.indexOf(t,e.result.libID);-1!==o&&(t.splice(o,1),jr.prototype.symbolLibJsons.push(e.result),jr.prototype.symbolLibs.push(new Vr({symbolLibData:e.result})),this.symbolLibs[this.symbolLibs.length-1].url=this.url),0===t.length&&(jr.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,o=this.getSymbolLibByLibId(e);if(null===o)for(var i in o=new Vr({libID:e}),this.symbolLibs.push(o),t)i!==e&&(o.cachedSymbolList[i]=SuperMap.Plot.PlottingUtil.cloneObject(t[i]))},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 o=this.getSymbolLibByLibId(t);return null===o?"":o.getSymbolName(e)},findSymbolByName:function(t){for(var e=[],o=0;o<this.libIDs.length;o++)for(var i=this.getSymbolLibByLibId(this.libIDs[o]).querySymbolbyKey(t),n=0;n<i.length;n++)e.push(i[n]);return e},findSymbolByCode:function(t){for(var e=[],o=0;o<this.libIDs.length;o++)for(var i=this.getSymbolLibByLibId(this.libIDs[o]).querySymbolbyKey(t.toString()),n=0;n<i.length;n++)e.push(i[n]);return e}});L.supermap.plotting.symbolLibManager=function(t,e){return new jr(t,e)};var Yr=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:function(){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 o=t.transInfos;if(t.transType===SuperMap.Plot.TransactionType.CREATE)for(var i=0,n=o.length;i<n;i++){var l=this.map.getLayer(o[i].layerId);e?l.removeFeatures(o[i].feature):l.addFeatures(o[i].feature)}else if(t.transType===SuperMap.Plot.TransactionType.EDIT)for(var a=0;a<o.length;a++){var s=this.map.getLayer(o[a].layerId),r=null;if(r=s?this.map.getFeatureByUuid(o[a].uuid):L.supermap.plotting.getControl(this.map).getFeatureByUuid(o[a].uuid),null!==s||null!==r){var u=o[a].redoParams;if(e&&(u=o[a].undoParams),"setFontAlign"===o[a].functionName)u.length>0&&r.setFontAlign(u[0]);else if("setLatLngs"===o[a].functionName)u.length>0&&r.setLatLngs(u[0]);else if("modifyPoint"===o[a].functionName)u.length>0&&r._modifyPoint(u[0],u[1]);else if("setTextContent"===o[a].functionName)u.length>0&&r.setTextContent(u[0]);else if("setRadiusText"===o[a].functionName)2===u.length&&r.setRadiusText(u[0],u[1]);else if("setType"===o[a].functionName&&r instanceof L.supermap.plotting.RouteNode)u.length>0&&r.setType(u[0]);else if("setStrokeColor"===o[a].functionName&&r.geometry instanceof SuperMap.Geometry.GroupObject)u.length>0&&r.setStyle(u[0]);else if("addAvoidRegion"===o[a].functionName)u.length>0&&(u[0]&&u[0].layer&&u[0].layer.removeFeatures(u[0]),e?r.removeAvoidRegions(u[0]):r.addAvoidRegion(u[0]));else if("removeAvoidRegions"===o[a].functionName){if(u.length>0){for(var p=0;p<u[0].length;p++)u[0][p]&&u[0][p].layer&&u[0][p].layer.removeFeatures(u[0][p]);if(e)for(var h=0;h<u[0].length;h++)r.addAvoidRegion(u[0][h]);else r.removeAvoidRegions(u[0])}}else if("createGroupObject"===o[a].functionName||"createFlags"===o[a].functionName){var c=null;e?s&&o[a].undoParams.length>0&&(c=s.unGroupObject(o[a].undoParams[0])):"createGroupObject"===o[a].functionName?c=s.createGroupObject(o[a].redoParams[0]):"createFlags"===o[a].functionName&&(c=s.createFlags(o[a].redoParams[0])),null!==c&&s._map.getPlotEditControl().selectFeatures(c)}else"updateSymbolText"===o[a].functionName?u.length>0&&r.updateSymbolText(u[0],u[1]):o[a].functionName&&null!==u&&r[o[a].functionName](u[0],u[1]);if(o[a].propertyName){var y=o[a].undoValue;e||(y=o[a].redoValue),Object.prototype.hasOwnProperty.call(r,o[a].propertyName)?r[o[a].propertyName]=y:null!==r&&(r.style[o[a].propertyName]=y)}r&&r.layer&&(r.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL||8!==r.textPosition||"fontColor"!==o[a].propertyName&&"fontFamily"!==o[a].propertyName||r._calculateParts(),r.redraw(),r.fire(SuperMap.Plot.Event.reseteditmarkersvalues))}}else if(t.transType===SuperMap.Plot.TransactionType.REMOVE)for(var g=0;g<o.length;g++)e?this.map.getLayer(o[g].layerId).addFeatures(o[g].feature):this.map.getLayer(o[g].layerId).removeFeatures(o[g].feature)}});L.supermap.plotting.transactionManager=function(t){return new Yr(t)};var zr=L.Evented.extend({name:"undefined",map:null,serverUrl:null,symScaleDefinition:null,activePlottingLayer:null,activeChildPlotLayer:null,plottingLayers:[],_uuids:[],initialize:function(t,e,o){o&&SuperMap.Util.extend(this.options,o),null!=t&&(zr.prototype.map=t),null!=o.symScaleDefinition&&(zr.prototype.symScaleDefinition=o.symScaleDefinition),null!=e&&(zr.prototype.serverUrl=e),this.plottingLayers=[],this.activePlottingLayer=null,this.activeChildPlotLayer=null},destroy:function(){zr.prototype.map=null,zr.prototype.symScaleDefinition=null,zr.prototype.serverUrl=null,zr.prototype.name=null},getPlottingLayers:function(){return this.plottingLayers},getSymScaleDefinition:function(){if(null!=this.map)return null==zr.prototype.symScaleDefinition&&(zr.prototype.symScaleDefinition=this.getLayerScale()),zr.prototype.symScaleDefinition},setSymScaleDefinition:function(t){zr.prototype.symScaleDefinition=t},setActivePlottingLayer:function(t){if(null!==t){if(t instanceof bu&&t.getVisibility()&&t.getEditable()&&(this.map._plotDrawControl&&null!==this.map._plotDrawControl&&this.map._plotDrawControl.setDrawingLayer(t),this.activePlottingLayer=t,null!=this.activeChildPlotLayer&&this.activeChildPlotLayer.getParent()!==this.activePlottingLayer))for(var e=0;e<this.activePlottingLayer.getChildPlotLayers().length;e++){var o=this.activePlottingLayer.getChildPlotLayers()[e];o.getVisibility()&&(this.activeChildPlotLayer=o)}this.fire("plottinglayeractive",{layer:t})}else this.activePlottingLayer=null},getActivePlottingLayer:function(){return this.activePlottingLayer},setActiveChildPlotLayer:function(t){null!==t?t.getVisibility()&&null!==t.getParent()&&t.getParent().getVisibility()&&t.getParent().getEditable()&&(this.activePlottingLayer!==this.activeChildPlotLayer.getParent()&&(t.getParent().setEditable(!0),this.map._plotDrawControl&&null!==this.map._plotDrawControl&&this.map._plotDrawControl.setDrawingLayer(t.getParent()),this.activePlottingLayer=t.getParent()),this.activeChildPlotLayer=t,this.fire("childplotlayeractive",{layer:t})):this.activeChildPlotLayer=null},getActiveChildPlotLayer:function(){return this.activeChildPlotLayer},saveTo:function(){var t={};return t.name=this.name,t.path="",t.plotLayers=[],t.symScaleDefinition=this.symScaleDefinition,this._savePlotLayers(t),t.animations=SuperMap.Plot.PlottingUtil.toJSON(L.supermap.plotting.getControl().getGOAnimationManager().getJSONData()),JSON.stringify(t)},loadFrom:function(t){this.removeAllPlottingLayers(),zr.prototype.symScaleDefinition=t.symScaleDefinition,zr.prototype.name=t.name,this._uuids.length=0;for(var e=0,o=t.plotLayers.length;e<o;e++)for(var i=0;i<t.plotLayers[e].childPlotLayers.length;i++)for(var n=0;n<t.plotLayers[e].childPlotLayers[i].plotSymbols.length;n++)null!=t.plotLayers[e].childPlotLayers[i].plotSymbols[n].graphicObject?this._uuids.push(t.plotLayers[e].childPlotLayers[i].plotSymbols[n].graphicObject.uuid):this._uuids.push(t.plotLayers[e].childPlotLayers[i].plotSymbols[n].graphicCompound.uuid);this._loadPlotLayers(t.plotLayers,function(){null!=t.animations&&L.supermap.plotting.getControl().getGOAnimationManager().fromJSONData(JSON.parse(t.animations))})},addPlottingLayer:function(t){for(var e=!0;e;){e=!1;for(var o=0;o<this.plottingLayers.length;o++)if(this.plottingLayers[o].name===t.name){t.name+="#1",e=!0;break}}this.plottingLayers.push(t),this.fire("plottinglayeradded",{plottingLayer:t})},removePlottingLayer:function(t){var e=SuperMap.Util.indexOf(this.plottingLayers,t);-1!==e&&this.plottingLayers.splice(e,1),this.activePlottingLayer===t&&(this.activePlottingLayer=null,this.activeChildPlotLayer=null),this.fire("plottinglayerremoved",{plottingLayer:t})},removeAllPlottingLayers:function(){for(;this.plottingLayers.length>0;)this.map.removeLayer(this.plottingLayers[0]);this.plottingLayers.length=0},getLayerScale:function(t){var e=0;if(null===this.map)return 0;var o=this.map._layers;for(var i in o)if(o[i]instanceof L.TileLayer){e=o[i].getScale(t);break}return e},_savePlotLayers:function(t){for(var e=0;e<map.getPlottingLayers().length;e++){var o={},i=map.getPlottingLayers()[e];o.caption=i.caption,o.name=i.name,o.description="",o.editable=i.getEditable(),o.visible=i.getVisibility(),o.selectable=i.getSelected(),o.symScaleDefinition=i.getSymScaleDefinition(),o.minVisibleScale=i.getMinVisibleScale(),o.maxVisibleScale=i.getMaxVisibleScale(),o.childPlotLayers=[],this._saveChildPlotLayer(o,i),t.plotLayers.push(o)}},_saveChildPlotLayer:function(t,e){for(var o=0;o<e.getChildPlotLayers().length;o++){var i={},n=e.getChildPlotLayers()[o];i.name=n.name,i.caption=n.caption,i.visibility=n.visibility,i.plotSymbols=[],this._savePlotSymbols(i,n),t.childPlotLayers.push(i)}},_savePlotSymbols:function(t,e){for(var o=0;o<e.getFeatures().length;o++){var i=e.getFeatures()[o],n={};if(n.bubbleHeight=i.getBubbleHeight(),n.bubbleWidth=i.getBubbleWidth(),n.description=i.getDescription(),n.mediaList=i.getMediaList(),n.name=i.symbolName,n.renderOrder=2,n.visible="none"!==i.style.display,i instanceof $s||i instanceof qr)n.graphicCompound=JSON.parse(i.toGeoJsonStr());else if(n.graphicObject=JSON.parse(i.toGeoJsonStr()),null!=i.joinLines){for(var l=[],a=0;a<i.joinLines.length;a++)if(i.joinLines[a].startAssociatedUuid===i.uuid){var s={caption:"joinLines"};s.uuid=i.joinLines[a].uuid,s.visible="none"!==i.joinLines[a].style.display,s.lineRelation=JSON.parse(i.joinLines[a].toGeoJsonStr()),l.push(s)}n.lineRelations=l}t.plotSymbols.push(n)}},_loadPlotLayers:function(t,e){for(var o=0,i=t.length;o<i;o++){var n=t[o],l=L.supermap.plotting.plottingLayer(n.name,this.serverUrl);l.removeChildPlotLayer(l.getChildPlotLayers()[0]),l.caption=n.caption,void 0===n.visibility?l.setVisibility(n.visible):l.setVisibility(n.visibility),l.setSelected(n.selectable),l.setEditable(n.editable),l.setMaxVisibleScale(n.maxVisibleScale),l.setMinVisibleScale(n.minVisibleScale),l.setSymScaleDefinition(n.symScaleDefinition,!0),this.activePlottingLayer=l,this.map.addLayer(l),this._loadChildLayers(n.childPlotLayers,l,e)}},_loadChildLayers:function(t,e,o){for(var i=0;i<t.length;i++){var n=t[i],l=L.supermap.plotting.childPlotLayer(n.name);l.caption=n.caption,void 0===n.visibility?l.setVisibility(n.visible):l.setVisibility(n.visibility),e.addChildPlotLayer(l),this._loadSymbols(n.plotSymbols,l,e,o)}},_loadSymbols:function(t,e,o,i){for(var n=[],l=0;l<t.length;l++){var a=t[l];if(null!=a.graphicObject){a.graphicObject.bubbleHeight=a.bubbleHeight,a.graphicObject.bubbleWidth=a.bubbleWidth,a.graphicObject.description=a.description,a.graphicObject.mediaList=a.mediaList,null!=a.name&&(a.graphicObject.symbolName=a.name),null!=a.visible&&(a.graphicObject.visible=a.visible);var s=SuperMap.Plot.PlottingUtil.toJSON(a.graphicObject);if(o.geoJsonToFeature1(s,e,function(t){var e=L.supermap.plotting.getControl().getPlotMapManager();if(0!==e._uuids.length){for(var o=0;o<e._uuids.length;o++)if(e._uuids[o]===t.feature.uuid){e._uuids.splice(o,1);break}0===e._uuids.length&&"function"==typeof i&&i()}}),null!=a.lineRelations&&0!=a.lineRelations.length)for(var r=0;r<a.lineRelations.length;r++){var u=a.lineRelations[r];u.lineRelation.visible=u.visible,n.push(u.lineRelation)}}else{a.graphicCompound.bubbleHeight=a.bubbleHeight,a.graphicCompound.bubbleWidth=a.bubbleWidth,a.graphicCompound.description=a.description,a.graphicCompound.mediaList=a.mediaList,null!=a.name&&(a.graphicCompound.symbolName=a.name),null!=a.visible&&(a.graphicCompound.visible=a.visible);s=SuperMap.Plot.PlottingUtil.toJSON(a.graphicCompound);o.geoJsonToFeature1(s,e,function(t){var e=L.supermap.plotting.getControl().getPlotMapManager();if(0!==e._uuids.length){for(var o=0;o<e._uuids.length;o++)if(e._uuids[o]===t.feature.uuid){e._uuids.splice(o,1);break}0===e._uuids.length&&"function"==typeof i&&i()}})}}for(var p=0;p<n.length;p++)o.geoJsonToFeature1(SuperMap.Plot.PlottingUtil.toJSON(n[p]),e)}});L.supermap.plotting.plotMapManager=function(t,e,o){return new zr(t,e,o)};var Gr=null,Wr=L.Evented.extend({serverUrl:null,map:null,defaultStyle:null,sitDataManager:null,symbolLibManager:null,clientID:null,dpi:96,animationManager:null,transManager:null,imageManager:null,plotMapManager:null,touchMode:null,options:{serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},initialize:function(t,e,o){null!=t&&(Wr.prototype.map=t),null!=e&&(Wr.prototype.serverUrl=e),o&&o.serviceParams&&SuperMap.Util.extend(this.options,o),this.defaultStyle=new SuperMap.Plot.DefaultStyle,this.sitDataManager=new Fr(this.map,this.serverUrl,this.options),this.symbolLibManager=new jr(this.serverUrl,this.options),this.animationManager=new kr(this.map,this.serverUrl,this.options),this.transManager=new Yr(this.map),this.plotMapManager=new zr(this.map,this.serverUrl,this.options),this.imageManager={},this.touchMode=!1},destroy:function(){Wr.prototype.serverUrl=null,Wr.prototype.map=null,this.defaultStyle&&(this.defaultStyle.destroy(),this.defaultStyle=null),this.sitDataManager&&(this.sitDataManager.destroy(),this.sitDataManager=null),this.symbolLibManager&&(this.symbolLibManager.destroy(),this.symbolLibManager=null),this.clientID=null,null!==this.animationManager&&(this.animationManager.destroy(),this.animationManager=null),this.plotMapManager&&(this.plotMapManager.destroy(),this.plotMapManager=null),Gr=null},getDefaultStyle:function(){return this.defaultStyle},getSitDataManager:function(){return this.sitDataManager},getPlotMapManager:function(){return this.plotMapManager},getSymbolLibManager:function(){return this.symbolLibManager},getGOAnimationManager:function(){return this.animationManager},getClientID:function(){return this.clientID},setClientID:function(t){this.clientID=t},getTouchMode:function(){return this.touchMode},setTouchMode:function(t){this.touchMode=t},getDPI:function(){return this.dpi},setDPI:function(t){this.dpi=t},getTransManager:function(){return this.transManager},setMap:function(t){Wr.prototype.map=t,null===this.sitDataManager.map&&(Fr.prototype.map=t),null===this.animationManager.map&&this.animationManager.setMap(t),null===this.transManager.map&&(this.transManager.map=t),null===this.plotMapManager.map&&(zr.prototype.map=t)},setPlotUrl:function(t){Wr.prototype.serverUrl=t,null===this.sitDataManager.serverUrl&&(Fr.prototype.serverUrl=t),null===this.symbolLibManager.url&&(jr.prototype.url=t),null===this.animationManager.serverUrl&&(kr.prototype.serverUrl=t),null===this.plotMapManager.serverUrl&&(zr.prototype.serverUrl=t)},setOptions:function(t){t=t||{},L.setOptions(this,t),L.setOptions(this.sitDataManager,t),L.setOptions(this.symbolLibManager,t),L.setOptions(this.animationManager,t),L.setOptions(this.plotMapManager,t)},getFeatureByUuid:function(t){if(null!==this.map){for(var e=this.map.getPlottingLayers(),o=0,i=e.length;o<i;o++){var n=e[o].getFeatureByUuid(t);if(null!==n)return n}return null}return null}});L.supermap.plotting.getControl=function(t,e,o){return null===Gr&&(Gr=new Wr(t,e,o)),t&&null!==t&&null===Gr.map&&Gr.setMap(t),e&&null!==e&&null===Gr.serverUrl&&Gr.setPlotUrl(e),null!=o&&Gr.setOptions(o),Gr};var Xr=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 o=this.map.getPlottingLayers(),i=0;i<o.length;i++){var n=o[i];for(var l in n.features){var a=n.features[l];a instanceof Qs&&a.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&(t.lng===a.getLatLngs()[0].lng&&t.lat===a.getLatLngs()[0].lat&&e.push(a))}}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 o=this.map.getPlottingLayers(),i=0;i<o.length;i++){var n=o[i];for(var l in n.features){var a=n.features[l];if(a instanceof Qs){var s=a.getBounds().getCenter();if(null===s)return;this._ptIsInPolygon(t,s)&&e.push(a)}}}return e}},_ptIsInPolygon:function(t,e){if(!t||null===t||0===t.length)return!1;for(var o=0,i=t.length,n=0;n<i;n++){var l=t[n],a=t[(n+1)%i];if(l.lat!==a.lat){var s=l.lat<a.lat?l.lat:a.lat,r=l.lat>a.lat?l.lat:a.lat;if(!(e.lat<s||e.lat>r))(e.lat-l.lat)*(a.lng-l.lng)/(a.lat-l.lat)+l.lng>e.lng&&o++}}return o%2==1},getGObjectsInCircle:function(t,e){if(t&&e){for(var o=[],i=this.map.getPlottingLayers(),n=0;n<i.length;n++){var l=i[n];for(var a in l.features){var s=l.features[a];if(s instanceof Qs){var r=s.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))&&o.push(s)}}}return o}},getGObjectsInRect:function(t,e){if(t&&e){for(var o=[],i=this.map.getPlottingLayers(),n=0;n<i.length;n++){var l=i[n];for(var a in l.features){var s=l.features[a];if(s instanceof Qs){var r=s.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&&o.push(s):r.lng<t.lng&&r.lng>e.lng&&r.lat<t.lat&&r.lat>e.lat&&o.push(s)}}}return o}}});L.supermap.plotting.query=function(t){return new Xr(t)};var Hr=nr.extend({symbolSizeInLib:null,dRotate:0,initialScale:null,symbolSize:null,positionOffset:!1,positionOffsetType:null,positionOffsetX:null,positionOffsetY:null,symbolRank:null,negativeImage:null,horizontalMirror:null,verticalMirror:null,middleMarkBounds:null,flagTextSize:60,space:7,deployments:null,joinLines:null,trajectory:null,detectionRange:null,limitWidthHeight:!0,symbolTexts:null,symbolTextComponents:null,bloodVolumes:null,bloodVolumeComponents:null,pictureFrames:null,pictureFrameComponents:null,antoRotation:null,initialize:function(t,e,o,i){if(this.autoRotation=!1,this.symbolType=SuperMap.Plot.SymbolType.DOTSYMBOL,this.minEditPts=1,this.maxEditPts=1,this.joinLines=[],this.deployments=[],this.symbolTexts=[],this.bloodVolumes=[],this.pictureFrames=[],this.symbolTextComponents=[],this.bloodVolumeComponents=[],this.pictureFrameComponents=[],this.minScale=1,this.maxScale=5,this.symbolSizeInLib=new SuperMap.Size(0,0),this.symbolSizeInLib=new SuperMap.Size(0,0),this.symbolSize=new SuperMap.Size(0,0),null===this.initialScale&&(this.initialScale={}),nr.prototype.initialize.call(this,t,e,o,i),null===this.positionOffsetType&&(this.positionOffsetType=SuperMap.Plot.PositionOffsetType.LINE),null===this.positionOffsetX&&(this.positionOffsetX=0),null===this.positionOffsetY&&(this.positionOffsetY=0),void 0===this.actualScale&&(this.actualScale=this.dScale),null!=this.maxScale&&this.dScale>this.maxScale?this.dScale=this.maxScale:null!=this.minScale&&this.dScale<this.minScale&&(this.dScale=this.minScale),(this.symbolSize==={}||0===this.symbolSize.w&&0===this.symbolSize.h)&&(this.symbolSize.w=this.symbolSizeInLib.w,this.symbolSize.h=this.symbolSizeInLib.h),!this.initialScale.x){var n=this.symbolSizeInLib.w,l=this.symbolSize.w;this.symbolSizeInLib.w<this.symbolSizeInLib.h&&(n=this.symbolSizeInLib.h,l=this.symbolSize.h),this.initialScale.x=l/n,isNaN(this.initialScale.x)||this.initialScale.x===1/0||(!0===this.limitWidthHeight?(this.symbolSize.w=this.initialScale.x*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale.x*this.symbolSizeInLib.h):(this.symbolSize.w=this.initialScale.x*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale.y*this.symbolSizeInLib.h),void 0===this.fontSize&&(void 0===this.style.fontSize&&(this.style.fontSize=12),this.fontSize=this.style.fontSize/this.initialScale.x))}},destroy:function(){if(this.symbolRank=null,this.negativeImage=null,this.horizontalMirror=null,this.verticalMirror=null,this.annotationIndex=-1,this.textPosition=null,this.symbolSizeInLib=null,this.symbolSize=null,this.middleMarkBounds=null,this.positionOffsetX=null,this.positionOffsetY=null,this.trajectory=null,this.detectionRange=null,null!==this.joinLines&&void 0!==this.joinLines)for(var t=0;t<this.joinLines.length;t++)null!==this.joinLines[t]&&(this.joinLines[t].startAssociatedUuid===this.uuid&&(this.joinLines[t].removeJoinLineFromDotSymbol(),this.joinLines[t].startAssociatedUuid=null),this.joinLines[t].endAssociatedUuid===this.uuid&&(this.joinLines[t].removeJoinLineFromDotSymbol(),this.joinLines[t].endAssociatedUuid=null));this.joinLines=null,this.deployments=null,nr.prototype.destroy.call(this)},_reView:function(){if(this.fromZoom!==this._map.getZoom()){if(this.scaleByMap&&!1!==this.scaleByMap){var t=1;if("function"==typeof this.layer.getSymZoomScale&&(t=this.layer.getSymZoomScale()),null!=this.maxScale&&t>this.maxScale&&(t=this.maxScale),null!=this.minScale&&t<this.minScale&&(t=this.minScale),0!==this.textContent.length&&8===this.annotationPosition){var e;!0===this.limitWidthHeight?e=this.middleMarkBounds.scale(t*this.initialScale.x,this.anchorPoint):this._widthHeightLimitScale();var o=96*e.getWidth()/25.4/10,i=96*e.getHeight()/25.4/10;this.components[this._annotationId].options.graphicWidth=o,this.components[this._annotationId].options.graphicHeight=i}for(var n in this.components)if(n===this._annotationId&&this.components[n]instanceof Hs)this.components[n].options.fontSize=this.style.fontSize*t;else if(n!==this._annotationId&&this.components[n]instanceof Hs)this.components[n].options.fontSize=this.components[n].options.fontSize/this.prevScale*t;else if(n!==this._annotationId&&!0!==this.components[n].isLeadLine&&(this.components[n].options.weight=this.style.weight*t,null!=this.components[n].options.dashArray)){for(var l=this.components[n].options.dashArray.split(","),a=0;a<l.length;a++)l[a]=parseInt(l[a])/this.prevScale*t;this.components[n].options.dashArray=l.join(),this.components[n].setStyle(this.components[n].options)}for(var s=0;s<this.geoSymbolTexts.length;s++){var r=this.geoSymbolTexts[s];null!==r&&r._calculateParts()}if("function"==typeof this.layer.getSymZoomScale&&(t!==this.layer.getSymZoomScale()||this.prevScale!==this.layer.getSymZoomScale(this.fromZoom))){var u=this.prevScale*this._map.getZoomScale(this._map.getZoom(),this.fromZoom);this._resizeCells(t*(1/u),this.getLatLngs()[0])}this._renderer instanceof L.Canvas&&"function"==typeof this.layer.getSymZoomScale&&t!==this.layer.getSymZoomScale()&&!0===this.positionOffset&&(this._clearComponents(),this._calculateParts()),this.prevScale=t,this._calculateLabel(),this._calculateBloodVolume(),this._calculatePictureFrame()}else{for(var p=0;p<this.geoSymbolTexts.length;p++)this.geoSymbolTexts[p].fromZoom=this._map.getZoom();var h=this._map.getZoomScale(this.fromZoom,this._map.getZoom()),c=this.getLatLngs()[0];this._resizeCells(h,c)}this.fromZoom=this._map.getZoom(),this.layer._map.getRenderer(this.layer)instanceof L.Canvas&&this._updateCanvasFills(),this._updateSymbolTexts();var y="";null!==this._map&&this._map instanceof L.Map&&(y=this._map.options.crs.code,L.Util.isMercatorProjection(y)&&this.redraw()),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues),this.isSelected&&this._map.getPlotEditControl()&&this._map.getPlotEditControl().fire(SuperMap.Plot.Event.featuresmodified,{features:[this]})}},setLatLngs:function(t){this.latLngs=t,this.redraw();for(var e=0;e<this.deployments.length;e++){var o=this.deployments[e];null!==o&&null!=o.layer&&(o.symbolType!==SuperMap.Plot.SymbolType.NAVYDEPLOYMENT&&o.symbolType!==SuperMap.Plot.SymbolType.AIRDEPLOYMENT||(o.style.display=this.style.display,o.redraw()))}this._updateJoinLines(),this._updateSymbolTexts()},getSpace:function(){return this.space},setSpace:function(t){this.space!==t&&(this.space=t,0!==this.textContent.length&&(null!=this.graphic&&null!=this.graphic.layer&&!0===this.graphic.layer.getVisibility()?this.graphic.redraw():null==this.layer||null!=this.layer.getVisibility&&!0!==this.layer.getVisibility()||this._handleAnnotation()))},setRotate:function(t){if(!isNaN(t)){var e=t-this.dRotate;this.dRotate=t;for(var o=0,i=this.avoidRegions.length;o<i;o++)L.Util.rotateLatLngs(this.avoidRegions[o].getLatLngs(),this.getLatLngs()[0],e);this.redraw(),this._updateSymbolTexts()}},getScale:function(){return!0===this.limitWidthHeight?this.initialScale.x:this.initialScale={x:this.symbolSize.w/this.symbolSizeInLib.w,y:this.symbolSize.h/this.symbolSizeInLib.h}},setScale:function(t,e){isNaN(t)||(!0===this.limitWidthHeight?(this.initialScale.x=t,this.symbolSize.w=this.initialScale.x*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale.x*this.symbolSizeInLib.h):(this.symbolSize.w=t*this.symbolSizeInLib.w,this.symbolSize.h=e*this.symbolSizeInLib.h),this.style.fontSize=this.fontSize*this.initialScale.x,this.prevFontSize=this.style.fontSize,this.redraw(),this._updateSymbolTexts())},setPositionOffset:function(t){this.positionOffset!==t&&(this.positionOffset=t,!1===this.positionOffset&&(this.positionOffsetX=0,this.positionOffsetY=0),this.redraw())},getPositionOffset:function(){return this.positionOffset},setPositionOffsetType:function(t){this.positionOffsetType!==t&&(this.positionOffsetType=t,this.positionOffset&&this.redraw())},getPositionOffsetType:function(){return this.positionOffsetType},setTextContent:function(t){this.textContent=t,null!=this.graphic&&null!=this.graphic.layer&&!0===this.graphic.layer.getVisibility()?this.graphic.redraw():null==this.layer||null!=this.layer.getVisibility&&!0!==this.layer.getVisibility()||this._handleAnnotation(),this.layer.fire("propertychanged",{feature:this,property:t})},middleMarkExist:function(){return this.symbolData.middleMarkExist},setTextPosition:function(t){8===t&&!1===this.symbolData.middleMarkExist||this.annotationPosition!==t&&(this.annotationPosition=t,null!=this.graphic&&null!=this.graphic.layer&&!0===this.graphic.layer.getVisibility()?this.graphic.redraw():null==this.layer||null!=this.layer.getVisibility&&!0!==this.layer.getVisibility()||this._handleAnnotation(),this.layer.fire("propertychanged",{feature:this,property:this.annotationPosition}))},getSymbolSize:function(){return this.symbolSize},setSymbolSize:function(t,e,o){if(0===this.symbolSizeInLib.w||0===this.symbolSizeInLib.h)this.initialScale.x=1;else{null===this.symbolSize&&(this.symbolSize=new SuperMap.Size(0,0)),null==this.layer&&(this.layer=zr.prototype.getActivePlottingLayer());var i=t/this.symbolSizeInLib.w,n=e/this.symbolSizeInLib.h;!0===this.limitWidthHeight?(this.initialScale.x!==i?this.initialScale.x=i:this.initialScale.x!==n&&(this.initialScale.x=n),this.symbolSize.w=this.initialScale.x*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale.x*this.symbolSizeInLib.h):(this.initialScale.x=i,this.initialScale.y=n,this.symbolSize.w=this.initialScale.x*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale.y*this.symbolSizeInLib.h)}null==o&&(o=!0),o&&this._map&&this.redraw()},setSurroundLineType:function(t){if(this.surroundLineType!==t){var e=new SuperMap.GetSymbolInfoParameters;e.libID=this.libID,e.code=this.code,e.symbolRank=this.symbolRank,e.surroundLineType=t,L.supermap.symbolInfoService(this.serverUrl).getSymbolInfo(e,function(t){this.symbolData.innerCells=t.result.innerCells,this.surroundLineType=t.result.surroundLineType,this.redraw(),this._map&&this._map.getPlotEditControl()&&this._map.getPlotEditControl().fire(SuperMap.Plot.Event.featuresmodified,{features:[this]})},this)}},getSymbolRanks:function(){return this.symbolData.symbolRanks},getSymbolRank:function(){return this.symbolRank},setSymbolRank:function(t){if(this.symbolRank!==t){var e=new SuperMap.GetSymbolInfoParameters;e.libID=this.libID,e.code=this.code,e.symbolRank=t,e.surroundLineType=this.surroundLineType,L.supermap.symbolInfoService(this.serverUrl).getSymbolInfo(e,function(t){this.symbolData.innerCells=t.result.innerCells,this.symbolRank=t.result.symbolRank,this.redraw(),this._map&&this._map.getPlotEditControl()&&this._map.getPlotEditControl().fire(SuperMap.Plot.Event.featuresmodified,{features:[this]})},this)}},getNegativeImage:function(){return this.negativeImage},setNegativeImage:function(t){this.negativeImage!==t&&(this.negativeImage=t,this.redraw(),this.layer.fire("propertychanged",{feature:this,property:this.negativeImage}))},getHorizontalMirror:function(){return this.horizontalMirror},setHorizontalMirror:function(t){this.horizontalMirror!==t&&(this.horizontalMirror=t,this.redraw())},getVerticalMirror:function(){return this.verticalMirror},setVerticalMirror:function(t){this.verticalMirror!==t&&(this.verticalMirror=t,this.redraw())},setWidthHeightLimit:function(t){this.limitWidthHeight!==t&&(t.constructor===Boolean&&(this.limitWidthHeight=t),!1===this.limitWidthHeight?(this.initialScale.x=this.symbolSize.w/this.symbolSizeInLib.w,this.initialScale.y=this.symbolSize.h/this.symbolSizeInLib.h):!0===this.limitWidthHeight&&(this.initialScale.x=this.initialScale.x<this.initialScale.y?this.initialScale.y:this.initialScale.x,this.redraw()))},getWidthHeightLimit:function(){return this.limitWidthHeight},getBloodVolumes:function(){return this.bloodVolumes},getSymbolTexts:function(){return this.symbolTexts},getPictureFrames:function(){return this.pictureFrames},move:function(t,e){if(Object.prototype.hasOwnProperty.call(this,"_eventParents")&&null!==this._eventParents)for(var o in this._eventParents){var i=this._eventParents[o];if(i.symbolType===SuperMap.Plot.SymbolType.FLAGGROUP&&!1===i.isSelected)return void this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)}if(this.positionOffset){var n=this._map.latLngToLayerPoint(L.latLng(this.getLatLngs()[0].lat+t,this.getLatLngs()[0].lng+e)),l=this._map.latLngToLayerPoint(this.getLatLngs()[0]);this.positionOffsetX+=(n.x-l.x)/this.dScale,this.positionOffsetY+=(n.y-l.y)/this.dScale,this.redraw()}else nr.prototype._move.call(this,t,e);if(this._updateJoinLines(),null!==this.deployments&&0<this.deployments.length)for(var a=0;a<this.deployments.length;a++){var s=this.deployments[a];if(null!==s&&(s.symbolType===SuperMap.Plot.SymbolType.NAVYDEPLOYMENT||s.symbolType===SuperMap.Plot.SymbolType.AIRDEPLOYMENT)){for(var r in s.components)s.components[r].symbolType===SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL&&(s.components[r].latLngs[2]=this.latLngs[0],s.components[r].redraw());for(var u in s.subObjects)s.subObjects[u].redraw()}}for(var p=0,h=this.avoidRegions.length;p<h;p++)L.Util.moveLatLngs(this.avoidRegions[p].getLatLngs(),t,e);var c="";null!==this._map&&this._map instanceof L.Map&&(c=this._map.options.crs.code,L.Util.isMercatorProjection(c)&&this.redraw()),this._updateSymbolTexts(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},getBounds:function(){var t=new L.LatLngBounds;for(var e in this.components){var o=this.components[e];o.isLeadLine||o.isAnnotation||o.isSymbolText||o.isBloodVolume||o.isPictureFrame||t.extend(o.getBounds?o.getBounds():o.getLatLng())}return t},getBoundsWithText:function(){var t=new L.LatLngBounds;for(var e in this.components){var o=this.components[e];o.isLeadLine||t.extend(o.getBounds?o.getBounds():o.getLatLng())}return t},_calculateParts:function(){if(!(this.getLatLngs().length<this.minEditPts))if("none"===this.style.display||null!=this.layer&&"function"==typeof this.layer.getVisibility&&!1===this.layer.getVisibility())this._updateSymbolTexts();else{var t=1;"function"==typeof this.layer.getSymZoomScale&&(t=this.layer.getSymZoomScale()),null!=this.minScale&&t<this.minScale&&(t=this.minScale),null!=this.maxScale&&t>this.maxScale&&(t=this.maxScale);var e=SuperMap.Plot.AnalysisSymbol.analysisSymbolCells(this.symbolData,!0),o=this._map.latLngToLayerPoint(this.getLatLngs()[0]);if(!0===this.positionOffset&&(o.x+=this.positionOffsetX,o.y+=this.positionOffsetY),!0===this.limitWidthHeight)var i=this.initialScale.x*t;for(var n=0,l=e.length;n<l;n++){var a=e[n];if(0!==this.surroundLineType||!0!==a.surroundLineFlag){if(this.negativeImage||this.horizontalMirror){var s=new SuperMap.Plot.Point(this.anchorPoint.x,100),r=this.anchorPoint;this._computeNegativeImage(a,s,r)}if(this.verticalMirror){var u=this.anchorPoint,p=new SuperMap.Plot.Point(100,this.anchorPoint.y);this._computeNegativeImage(a,u,p)}a.type===SuperMap.Plot.SymbolType.TEXTSYMBOL&&(a.style.fontSize=this.initialScale.x*(a.style.fontSize/10),a.style.labelRotation+=-this.dRotate),null!=a.polybezierClose&&(a.type===SuperMap.Plot.SymbolType.POLYBEZIERSYMBOL||a.type===SuperMap.Plot.SymbolType.POLYBEZIERCLOSESYMBOL?(a.type,SuperMap.Plot.SymbolType.POLYBEZIERSYMBOL,a.positionPoints=SuperMap.Plot.PlottingUtil.generateBeizerPointsWithCtrlPt(a.positionPoints),a.isClosed&&a.positionPoints[0]!==a.positionPoints[a.positionPoints.length-1]&&a.positionPoints.push(a.positionPoints[0])):a.type===SuperMap.Plot.SymbolType.KIDNEY&&(a.positionPoints=SuperMap.Plot.Primitives.getSpatialData(a.type,a.positionPoints)));for(var h=0,c=a.positionPoints.length;h<c;h++){a.positionPoints[h].x-=this.symbolData.anchorPoint.x,a.positionPoints[h].y-=this.symbolData.anchorPoint.y,!0===this.limitWidthHeight?(a.positionPoints[h].x=a.positionPoints[h].x*i,a.positionPoints[h].y=a.positionPoints[h].y*i):(a.positionPoints[h].x=a.positionPoints[h].x*this.symbolSize.w/this.symbolSizeInLib.w,a.positionPoints[h].y=a.positionPoints[h].y*this.symbolSize.h/this.symbolSizeInLib.h);var y=this.dRotate*(Math.PI/180);SuperMap.Plot.PlottingUtil.rotateAngle({x:0,y:0},y,a.positionPoints[h]),a.positionPoints[h]=this._transitionPoint(a.positionPoints[h],o)}a.positionPoints=L.Util.latLngsToSuperMapPoints(a.positionPoints)}}this._transSymbolCellsToLayers(e),this.scaleByMap||this._resizeCells(1/t,this.getLatLngs()[0]),this._calculateBloodVolume(),this._calculatePictureFrame(),this._generateLeadLine(),this._annotationId=-1,this.isNotRedrawText||void 0!==this.isNotRedrawText||this._handleAnnotation(),this._calculateLabel(),this._updateSymbolTexts(),this._bounds=this.getBounds(),this.prevScale=t}},_calculateBloodVolume:function(t,e){for(var o=0;o<this.components.length;)!0===this.components[o].isBloodVolume?(null!=this.components[o]._renderer&&(this.components[o].removeEventParent(this),this.components[o].onRemove()),delete this.components[o],this.components.splice(o,1)):o++;if(this.bloodVolumeComponents.length=0,!(this.getLatLngs().length<this.minEditPts)&&null!=this.bloodVolumes&&0!==this.bloodVolumes.length){null==t&&(t=this.getBounds()),null==e&&(e=this.getLatLngs()[0]);var i=this._map.latLngToLayerPoint(e),n=1;"function"==typeof this.layer.getSymZoomScale&&(n=this.layer.getSymZoomScale()),null!=this.minScale&&n<this.minScale&&(n=this.minScale),null!=this.maxScale&&n>this.maxScale&&(n=this.maxScale);for(var l=0;l<this.bloodVolumes.length;l++){var a=[],s=null;if(null!=this.bloodVolumes[l].width)s=Math.abs(this._map.layerPointToLatLng(L.point(i.x+this.bloodVolumes[l].width,i.y)).lng-e.lng);else{var r=Math.abs(this._map.layerPointToLatLng(L.point(i.x+40,i.y)).lng-e.lng);(s=Math.abs(t.getEast()-t.getWest()))<r&&(s=r)}var u,p,h=null;if(null!=this.bloodVolumes[l].height)h=Math.abs(this._map.layerPointToLatLng(L.point(i.x,i.y+this.bloodVolumes[l].height)).lat-e.lat);else{h=Math.abs(this._map.layerPointToLatLng(L.point(i.x,i.y+8)).lat-e.lat)}if(s*=n,h*=n,this.bloodVolumes[l].position===SuperMap.Plot.Position.TOP){var c=L.latLng(t.getNorth(),t.getCenter().lng),y=this._map.latLngToLayerPoint(c);y.x+=this.bloodVolumes[l].offsetX*n,y.y+=this.bloodVolumes[l].offsetY*n,c=this._map.layerPointToLatLng(y),u=L.latLng(c.lat+h,c.lng-.5*s),p=L.latLng(c.lat,c.lng+.5*s)}else if(this.bloodVolumes[l].position===SuperMap.Plot.Position.BOTTOM){var g=L.latLng(t.getSouth(),t.getCenter().lng),f=this._map.latLngToLayerPoint(g);f.x+=this.bloodVolumes[l].offsetX*n,f.y+=this.bloodVolumes[l].offsetY*n,g=this._map.layerPointToLatLng(f),u=L.latLng(g.lat,g.lng-.5*s),p=L.latLng(g.lat-h,g.lng+.5*s)}else if(this.bloodVolumes[l].position===SuperMap.Plot.Position.LEFT){var P=L.latLng(t.getCenter().lat,t.getWest()),d=this._map.latLngToLayerPoint(P);d.x+=this.bloodVolumes[l].offsetX*n,d.y+=this.bloodVolumes[l].offsetY*n,P=this._map.layerPointToLatLng(d),u=L.latLng(P.lat+.5*s,P.lng-h),p=L.latLng(P.lat-.5*s,P.lng)}else if(this.bloodVolumes[l].position===SuperMap.Plot.Position.RIGHT){var S=L.latLng(t.getCenter().lat,t.getEast()),m=this._map.latLngToLayerPoint(S);m.x+=this.bloodVolumes[l].offsetX*n,m.y+=this.bloodVolumes[l].offsetY*n,S=this._map.layerPointToLatLng(m),u=L.latLng(S.lat+.5*s,S.lng),p=L.latLng(S.lat-.5*s,S.lng+h)}var b=this.bloodVolumes[l].style.color;null==b&&(b="#808080");var M=this.bloodVolumes[l].style.weight;null==M&&(M=4);var v=this.bloodVolumes[l].style.opacity;null==v&&(v=1);var A=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[u,p],{fillLimit:!0,fillSymbolID:1,lineWidthLimit:!0,weight:M,lineColorLimit:!0,color:b,opacity:v});A.isBloodVolume=!0,A.fromZoom=this._map.getZoom(),a.push(A);var T=this.bloodVolumes[l].style.remainingVolumeColor;null==T&&(T="#00ff00");var _=this.bloodVolumes[l].style.remainingVolumeOpacity;null==_&&(_=.8);var O=this.bloodVolumes[l].style.consumeVolumeColor;null==O&&(O="#000000");var x=this.bloodVolumes[l].style.consumeVolumeOpacity;null==x&&(x=.8);var w=this.components[this.components.length-1].getBounds();if(this.bloodVolumes[l].position===SuperMap.Plot.Position.TOP||this.bloodVolumes[l].position===SuperMap.Plot.Position.BOTTOM){if(!SuperMap.Plot.PlottingUtil.equalFuzzy(0,this.bloodVolumes[l].volume)){var E=w.getNorthWest(),C=L.latLng(w.getSouthEast().lat,E.lng+this.bloodVolumes[l].volume*s),I=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[E,C],{fillLimit:!0,fillSymbolID:0,fillColorLimit:!0,fillColor:T,fillOpacity:_,lineColorLimit:!0,opacity:0});I.isBloodVolume=!0,I.fromZoom=this._map.getZoom(),a.push(I)}if(!SuperMap.Plot.PlottingUtil.equalFuzzy(1,this.bloodVolumes[l].volume)){var R=w.getSouthEast(),D=L.latLng(w.getNorthWest().lat,w.getNorthWest().lng+this.bloodVolumes[l].volume*s),U=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[R,D],{fillLimit:!0,fillSymbolID:0,fillColorLimit:!0,fillColor:O,fillOpacity:x,lineColorLimit:!0,opacity:0});U.isBloodVolume=!0,U.fromZoom=this._map.getZoom(),a.push(U)}}else if(this.bloodVolumes[l].position===SuperMap.Plot.Position.LEFT||this.bloodVolumes[l].position===SuperMap.Plot.Position.RIGHT){if(!SuperMap.Plot.PlottingUtil.equalFuzzy(0,this.bloodVolumes[l].volume)){var N=w.getSouthWest(),B=L.latLng(N.lat+this.bloodVolumes[l].volume*s,w.getNorthEast().lng),k=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[N,B],{fillLimit:!0,fillSymbolID:0,fillColorLimit:!0,fillColor:T,fillOpacity:_,lineColorLimit:!0,opacity:0});k.isBloodVolume=!0,k.fromZoom=this._map.getZoom(),a.push(k)}if(!SuperMap.Plot.PlottingUtil.equalFuzzy(1,this.bloodVolumes[l].volume)){var F=w.getNorthEast(),V=L.latLng(w.getSouthWest().lat+this.bloodVolumes[l].volume*s,w.getSouthWest().lng),j=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[F,V],{fillLimit:!0,fillSymbolID:0,fillColorLimit:!0,fillColor:O,fillOpacity:x,lineColorLimit:!0,opacity:0});j.isBloodVolume=!0,j.fromZoom=this._map.getZoom(),a.push(j)}}this.bloodVolumeComponents.push(a)}}},_calculatePictureFrame:function(t){for(var e=0;e<this.components.length;)!0===this.components[e].isPictureFrame?(null!=this.components[e]._renderer&&(this.components[e].removeEventParent(this),this.components[e].onRemove()),delete this.components[e],this.components.splice(e,1)):e++;if(this.pictureFrameComponents.length=0,!(this.getLatLngs().length<this.minEditPts)&&null!=this.pictureFrames&&0!==this.pictureFrames.length){null==t&&(t=this.getBounds());for(var o=0;o<this.pictureFrames.length;o++){var i=[],n=void 0,l=0,a=0;if(this.pictureFrames[o].position===SuperMap.Plot.Position.TOP){var s=L.latLng(t.getNorth(),t.getCenter().lng),r=this._map.latLngToLayerPoint(s);r.x+=this.pictureFrames[o].offsetX,r.y+=this.pictureFrames[o].offsetY,n=this._map.layerPointToLatLng(r),l=-.5*this.pictureFrames[o].width,a=-this.pictureFrames[o].height}else if(this.pictureFrames[o].position===SuperMap.Plot.Position.BOTTOM){var u=L.latLng(t.getSouth(),t.getCenter().lng),p=this._map.latLngToLayerPoint(u);p.x+=this.pictureFrames[o].offsetX,p.y+=this.pictureFrames[o].offsetY,n=this._map.layerPointToLatLng(p),l=-.5*this.pictureFrames[o].width}else if(this.pictureFrames[o].position===SuperMap.Plot.Position.LEFT){var h=L.latLng(t.getCenter().lat,t.getWest()),c=this._map.latLngToLayerPoint(h);c.x+=this.pictureFrames[o].offsetX,c.y+=this.pictureFrames[o].offsetY,n=this._map.layerPointToLatLng(c),l=-this.pictureFrames[o].width,a=-.5*this.pictureFrames[o].height}else if(this.pictureFrames[o].position===SuperMap.Plot.Position.RIGHT){var y=L.latLng(t.getCenter().lat,t.getEast()),g=this._map.latLngToLayerPoint(y);g.x+=this.pictureFrames[o].offsetX,g.y+=this.pictureFrames[o].offsetY,n=this._map.layerPointToLatLng(g),a=-.5*this.pictureFrames[o].height}var f={externalGraphic:this.pictureFrames[o].path,graphicWidth:this.pictureFrames[o].width,graphicHeight:this.pictureFrames[o].height,graphicXOffset:l,graphicYOffset:a},P=L.supermap.plotting.pointImage([n],f);P.isPictureFrame=!0,P.fromZoom=this._map.getZoom(),this._addComponents(P),i.push(P),this.pictureFrameComponents.push(i)}}},_generateLeadLine:function(){if(this.positionOffset)if(this.positionOffsetType===SuperMap.Plot.PositionOffsetType.LINE){var t=this._map.latLngToLayerPoint(this.getLatLngs()[0]),e=L.point(t.x+this.positionOffsetX*this.dScale,t.y+this.positionOffsetY*this.dScale),o=this._map.layerPointToLatLng(e),i=[this.getLatLngs()[0].clone(),o];this._createAndDrawLayer(24,i,{surroundLineFlag:!1,lineTypeLimit:!0}).isLeadLine=!0}else{var n,l,a=this._map.latLngToLayerPoint(this.getLatLngs()[0]),s=L.point(a.x+this.positionOffsetX*this.dScale,a.y+this.positionOffsetY*this.dScale),r=this._map.layerPointToLatLng(s),u=new SuperMap.Geometry.Point(this.getLatLngs()[0].lng,this.getLatLngs()[0].lat),p=new SuperMap.Geometry.Point(r.lng,r.lat),h=180*SuperMap.Plot.PlottingUtil.radian(u,p)/Math.PI;if(h>45&&h<135||h>225&&h<315){var c=L.point(s.x-this.style.weight/2,s.y),y=L.point(s.x+this.style.weight/2,s.y);n=this._map.layerPointToLatLng(c),l=this._map.layerPointToLatLng(y)}else{var g=L.point(s.x,s.y-this.style.weight/2),f=L.point(s.x,s.y+this.style.weight/2);n=this._map.layerPointToLatLng(g),l=this._map.layerPointToLatLng(f)}var P=[this.getLatLngs()[0],n,l];this._createAndDrawLayer(32,P,{surroundLineFlag:!1,lineWidthLimit:!0,weight:0,fillLimit:!0,fill:!0}).isLeadLine=!0}},_handleAnnotation:function(t){if(null!=this._annotationId&&-1!==this._annotationId&&(null!=this.components[this._annotationId]._renderer&&(this.components[this._annotationId].removeEventParent(this),this.components[this._annotationId].onRemove()),delete this.components[this._annotationId],this.components.splice(this._annotationId,1),this._annotationId=-1),!1!==this.textDisplay&&(this.textContent=SuperMap.Plot.PlottingUtil.trim(this.textContent),null==t&&(t=this.getBounds()),t.isValid()&&this.textContent&&null!==this.textContent&&0!==this.textContent.length&&null!==t&&t.isValid())){var e={};SuperMap.Plot.PlottingUtil.cloneObject(this.style);var o=1;this.scaleByMap&&"function"==typeof this.layer.getSymZoomScale&&(o=this.layer.getSymZoomScale(),null!=this.minScale&&o<this.minScale?o=this.minScale:null!=this.maxScale&&o>this.maxScale&&(o=this.maxScale));var i=this.space*o,n=null;if(0===this.annotationPosition){e.labelAlign="rb";var l=L.latLng(t.getNorth(),t.getWest()),a=this._map.latLngToLayerPoint(l);a.x-=i,n=this._map.layerPointToLatLng(a)}else if(1===this.annotationPosition){e.labelAlign="rt";var s=L.latLng(t.getSouth(),t.getWest()),r=this._map.latLngToLayerPoint(s);r.x-=i,n=this._map.layerPointToLatLng(r)}else if(2===this.annotationPosition){e.labelAlign="lb";var u=L.latLng(t.getNorth(),t.getEast()),p=this._map.latLngToLayerPoint(u);p.x+=i,n=this._map.layerPointToLatLng(p)}else if(3===this.annotationPosition){e.labelAlign="lt";var h=L.latLng(t.getSouth(),t.getEast()),c=this._map.latLngToLayerPoint(h);c.x+=i,n=this._map.layerPointToLatLng(c)}else if(4===this.annotationPosition){e.labelAlign="cb";var y=L.latLng(t.getNorth(),(t.getWest()+t.getEast())/2),g=this._map.latLngToLayerPoint(y);g.y-=i,n=this._map.layerPointToLatLng(g)}else if(5===this.annotationPosition){e.labelAlign="ct";var f=L.latLng(t.getSouth(),(t.getWest()+t.getEast())/2),P=this._map.latLngToLayerPoint(f);P.y+=i,n=this._map.layerPointToLatLng(P)}else if(6===this.annotationPosition){e.labelAlign="rm";var d=L.latLng((t.getSouth()+t.getNorth())/2,t.getWest()),S=this._map.latLngToLayerPoint(d);S.x-=i,n=this._map.layerPointToLatLng(S)}else if(7===this.annotationPosition){e.labelAlign="lm";var m=L.latLng((t.getSouth()+t.getNorth())/2,t.getEast()),b=this._map.latLngToLayerPoint(m);b.x+=i,n=this._map.layerPointToLatLng(b)}else if(8===this.annotationPosition&&this.symbolData.middleMarkExist){var M;M=!0===this.limitWidthHeight?this.middleMarkBounds.scale(this.initialScale.x*o,this.anchorPoint):this._widthHeightLimitScale();var v=new SuperMap.Geometry.Point((M.left+M.right)/2,(M.top+M.bottom)/2);if(this.negativeImage||this.horizontalMirror){var A=SuperMap.Plot.PlottingUtil.projectPoint(v,new SuperMap.Geometry.Point(this.anchorPoint.x,100),new SuperMap.Geometry.Point(this.anchorPoint.x,this.anchorPoint.y));SuperMap.Plot.PlottingUtil.rotateAngle(A,Math.PI,v)}if(this.verticalMirror){A=SuperMap.Plot.PlottingUtil.projectPoint(v,new SuperMap.Geometry.Point(this.anchorPoint.x,this.anchorPoint.y),new SuperMap.Geometry.Point(100,this.anchorPoint.y));SuperMap.Plot.PlottingUtil.rotateAngle(A,Math.PI,v)}v.x-=this.anchorPoint.x,v.y-=this.anchorPoint.y;var T=this.dRotate*(Math.PI/180);SuperMap.Plot.PlottingUtil.rotateAngle(new SuperMap.Geometry.Point(0,0),T,v);var _=this._map.latLngToLayerPoint(this.getLatLngs()[0]);!0===this.positionOffset&&(_.x+=this.positionOffsetX,_.y+=this.positionOffsetY);var O=96*M.getWidth()/25.4/10,x=96*M.getHeight()/25.4/10;e.graphicWidth=O,e.graphicHeight=x,n=this._transitionPoint(v,_)}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 w={externalGraphic:e.externalGraphic,graphicWidth:e.graphicWidth,graphicHeight:e.graphicHeight,rotation:-this.dRotate},E=L.supermap.plotting.pointImage([n],w);this._annotationId=this.components.length,E.fromZoom=this._map.getZoom(),this._addComponents(E)}else if(8!==this.annotationPosition){e.fontSize=this.style.fontSize*o,e.fontSizeLimit=!1,e.labelRotation=0,this._annotationId=this.components.length;var C=this._createAndDrawLayer(34,[n],e,this.textContent);C.isAnnotation=!0,C.fromZoom=this._map.getZoom()}}},_calculateLabel:function(t,e){for(var o=0;o<this.components.length;)!0===this.components[o].isSymbolText?(null!=this.components[o]._renderer&&(this.components[o].removeEventParent(this),this.components[o].onRemove()),delete this.components[o],this.components.splice(o,1)):o++;if(this.symbolTextComponents.length=0,null!=this.symbolTexts&&0!==this.symbolTexts.length){var i={surroundLineFlag:!1,lineColorLimit:!0,fillColorLimit:!0,lineWidthLimit:!0,lineTypeLimit:!0,fontColorLimit:!0,fontSizeLimit:!0,fillLimit:!0};if(null==t&&(t=this.getBounds()),t&&t.isValid()){null==e&&(e=this.latLngs[0]);var n=1;"function"==typeof this.layer.getSymZoomScale&&(n=this.layer.getSymZoomScale()),null!=this.minScale&&n<this.minScale&&(n=this.minScale),null!=this.maxScale&&n>this.maxScale&&(n=this.maxScale);for(var l=0;l<this.symbolTexts.length;l++){var a=[];if(null!=this.symbolTexts[l].textContent&&0!==this.symbolTexts[l].textContent.length&&(null==this.symbolTexts[l].style||"none"!==this.symbolTexts[l].style.display)){var s=this.symbolTexts[l];this._mergeStyleToSymbolText(s),s.textPosition=null==s.textPosition?0:s.textPosition;var r=s.textContent.split("\n"),u=r.length,p=0,h=0;if(s.border){var c=SuperMap.Plot.PlottingUtil.cloneObject(s.style);c.fontSize*=n,p=SuperMap.Plot.PlottingUtil.getTextWidth(c,r[0])+s.paddingX*n*2;for(var y=1;y<u;y++){var g=SuperMap.Plot.PlottingUtil.getTextWidth(c,r[y])+s.paddingX*n*2;g>p&&(p=g)}h=parseInt(s.style.fontSize*n*u)+s.paddingY*n*2}var f=void 0,P=void 0,d=L.point(0,0),S=L.point(0,0);switch(s.textPosition){case SuperMap.Plot.AnnoPosition.LEFTTOP:s.style.labelAlign="rb",f=L.latLng(t.getNorth(),t.getWest()),(P=this._map.latLngToLayerPoint(f)).x+=s.offsetX*n,P.y+=s.offsetY*n,!0===s.border&&(d.x=P.x,d.y=P.y,S.x=P.x-p,S.y=P.y-h);break;case SuperMap.Plot.AnnoPosition.LEFTBOTTOM:s.style.labelAlign="rt",f=L.latLng(t.getSouth(),t.getWest()),(P=this._map.latLngToLayerPoint(f)).x+=s.offsetX*n,P.y+=s.offsetY*n,!0===s.border&&(d.x=P.x,d.y=P.y,S.x=P.x-p,S.y=P.y+h);break;case SuperMap.Plot.AnnoPosition.RIGHTTOP:s.style.labelAlign="lb",f=L.latLng(t.getNorth(),t.getEast()),(P=this._map.latLngToLayerPoint(f)).x+=s.offsetX*n,P.y+=s.offsetY*n,!0===s.border&&(d.x=P.x,d.y=P.y,S.x=P.x+p,S.y=P.y-h);break;case SuperMap.Plot.AnnoPosition.RIGHTBOTTOM:s.style.labelAlign="lt",f=L.latLng(t.getSouth(),t.getEast()),(P=this._map.latLngToLayerPoint(f)).x+=s.offsetX*n,P.y+=s.offsetY*n,!0===s.border&&(d.x=P.x,d.y=P.y,S.x=P.x+p,S.y=P.y+h);break;case SuperMap.Plot.AnnoPosition.TOP:s.style.labelAlign="cb",f=L.latLng(t.getNorth(),(t.getWest()+t.getEast())/2),(P=this._map.latLngToLayerPoint(f)).x+=s.offsetX*n,P.y+=s.offsetY*n,!0===s.border&&(d.x=P.x-p/2,d.y=P.y,S.x=P.x+p/2,S.y=P.y-h);break;case SuperMap.Plot.AnnoPosition.BOTTOM:s.style.labelAlign="ct",f=L.latLng(t.getSouth(),(t.getWest()+t.getEast())/2),(P=this._map.latLngToLayerPoint(f)).x+=s.offsetX*n,P.y+=s.offsetY*n,!0===s.border&&(d.x=P.x-p/2,d.y=P.y,S.x=P.x+p/2,S.y=P.y+h);break;case SuperMap.Plot.AnnoPosition.LEFT:s.style.labelAlign="rm",f=L.latLng((t.getSouth()+t.getNorth())/2,t.getWest()),(P=this._map.latLngToLayerPoint(f)).x+=s.offsetX*n,P.y+=s.offsetY*n,!0===s.border&&(d.x=P.x,d.y=P.y+h/2,S.x=P.x-p,S.y=P.y-h/2);break;case SuperMap.Plot.AnnoPosition.RIGHT:s.style.labelAlign="lm",f=L.latLng((t.getSouth()+t.getNorth())/2,t.getEast()),(P=this._map.latLngToLayerPoint(f)).x+=s.offsetX*n,P.y+=s.offsetY*n,!0===s.border&&(d.x=P.x,d.y=P.y+h/2,S.x=P.x+p,S.y=P.y-h/2);break;case SuperMap.Plot.AnnoPosition.ANCHOR:s.style.labelAlign="lm",f=L.latLng(e.lat,e.lng),(P=this._map.latLngToLayerPoint(f)).x+=s.offsetX*n,P.y+=s.offsetY*n,s.offsetX>0?(s.style.labelAlign="lm",!0===s.border&&(d.x=P.x,d.y=P.y+h/2,S.x=P.x+p,S.y=P.y-h/2)):(s.style.labelAlign="rm",!0===s.border&&(d.x=P.x,d.y=P.y+h/2,S.x=P.x-p,S.y=P.y-h/2))}var m=this._map.layerPointToLatLng(P);if(!0===s.showRelationLine&&(0!==s.offsetX||0!==s.offsetY)){var b=s.lineStyle;null==s.lineStyle&&(b=SuperMap.Util.copyAttributes(b,this.style)),b.lineColorLimit=!0,b.lineTypeLimit=!0,b.lineWidthLimit=!0;var M=this._createAndDrawLayer(SuperMap.Plot.SymbolType.POLYLINESYMBOL,[m,f],b);M.isSymbolText=!0,M.fromZoom=this._map.getZoom(),a.push(M)}var v=SuperMap.Util.copyAttributes(i,s.style);if(s.border){var A=this._map.layerPointToLatLng(d),T=this._map.layerPointToLatLng(S),_=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[A,T],SuperMap.Util.cloneObject(v));_.isSymbolText=!0,_.fromZoom=this._map.getZoom(),a.push(_);var O=d.x<S.x?d.x:S.x,x=d.y<S.y?d.y:S.y,w=this._map.layerPointToLatLng(L.point(O+s.paddingX,x+h/2)),E=SuperMap.Util.cloneObject(v);E.labelAlign="lm";var C=this._createAndDrawLayer(SuperMap.Plot.SymbolType.TEXTSYMBOL,[w],E,s.textContent);C.isSymbolText=!0,C.fromZoom=this._map.getZoom(),a.push(C)}else{var I=this._createAndDrawLayer(SuperMap.Plot.SymbolType.TEXTSYMBOL,[m],SuperMap.Util.cloneObject(v),s.textContent);I.isSymbolText=!0,I.fromZoom=this._map.getZoom(),a.push(I)}this.symbolTextComponents.push(a)}}}}},_getTextGraphic:function(t,e){var o=SuperMap.Plot.PlottingUtil.cloneObject(e);o.fontPercent=100,o.fontSpace=0,void 0!==this.flagTextSize?o.fontSize=this.flagTextSize:o.fontSize=60,o.labelAlign="cm";var i=document.createElement("canvas"),n=SuperMap.Plot.PlottingUtil.getTextWidth(o,t);i.width=n+20,i.height=parseFloat(o.fontSize)+10,document.body.appendChild(i);var l=i.getContext("2d");l.fillStyle=o.fontColor,l.globalAlpha=o.fontOpacity||1;var a=[o.fontStyle?o.fontStyle:"normal","normal",o.fontWeight?o.fontWeight:"normal",o.fontSize?new String(o.fontSize)+"px":"1em",o.fontFamily?o.fontFamily:"sans-serif"].join(" ");if(l.fillText)l.font=a,l.textAlign="center",l.textBaseline="middle",l.fillText(t,i.width/2,i.height/2);else if(l.mozDrawText){l.mozTextStyle=a;var s=-.5;L.PlotCanvas.LABEL_FACTOR[e.labelAlign[0]],null==s&&(s=-.5);var r=-.5;L.PlotCanvas.LABEL_FACTOR[e.labelAlign[1]],null==r&&(r=-.5);var u=[0,0],p=l.mozMeasureText("xx");u[1]+=p*(1+r*numRows);var h=u[0]+s*l.mozMeasureText(t),c=u[1]+p;l.translate(h,c),l.mozDrawText(t),l.translate(-h,-c)}var y=i.toDataURL("image/png","image/octet-stream");return document.body.removeChild(i),y},_transitionPoint:function(t,e){var o=e.x+t.x*(96/254),i=e.y-t.y*(96/254);return this._map.layerPointToLatLng(L.point(o,i))},_widthHeightLimitScale:function(){var t=this.initialScale.x,e=this.initialScale.y,o=this.anchorPoint.x,i=this.anchorPoint.y,n=(this.middleMarkBounds.left-o)*t+o,l=(this.middleMarkBounds.bottom-i)*e+i,a=(this.middleMarkBounds.right-o)*t+o,s=(this.middleMarkBounds.top-i)*e+i;return new SuperMap.Bounds(n,l,a,s)},_updateJoinLines:function(){if(null!==this.joinLines&&0<this.joinLines.length)for(var t=0;t<this.joinLines.length;t++){var e=this.joinLines[t];null!==e&&null!=e.layer&&(e instanceof ar&&e.redraw())}},_mergeStyleToSymbolText:function(t){if(null!==this.components)for(var e in null!==t.style&&void 0!==t.style||(t.style={}),this.style)Object.prototype.hasOwnProperty.call(t.style,e)||(t.style[e]=this.style[e])},_resizeCells:function(t,e){for(var o in this.components)L.Util.resizeLatLngs(this.components[o].getLatLngs(),e,t),this.components[o].setLatLngs(this.components[o].getLatLngs());this._renderer instanceof L.Canvas&&this._updateCanvasFills()},_rotate:function(t,e){nr.prototype._rotate.call(this,t,e),this.dRotate+=t},_resize:function(t,e){nr.prototype._resize.call(this,t,e),!0===this.limitWidthHeight?(this.initialScale.x*=t,this.symbolSize.w=this.initialScale.x*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale.x*this.symbolSizeInLib.h):(this.symbolSize.w=this.initialScale.x*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale.y*this.symbolSizeInLib.h),this.style.fontSize=this.fontSize*this.initialScale.x,this.prevFontSize=this.style.fontSize},_computeNegativeImage:function(t,e,o){for(var i=0;i<t.positionPoints.length;i++){var n=t.positionPoints[i];if(!SuperMap.Plot.PlottingUtil.isOnLine(n,e,o)){var l=SuperMap.Plot.PlottingUtil.pointProjectToSegment(n,e,o).projectPoint;n=SuperMap.Plot.PlottingUtil.rotateAngle(l,Math.PI,n)}t.positionPoints[i].x=n.x,t.positionPoints[i].y=n.y}},_setSymbolData:function(t){if(nr.prototype._setSymbolData.call(this,t),this.symbolData){Object.prototype.hasOwnProperty.call(this.symbolData,"type")||(this.symbolData.type="GRAPHICOBJECT"),this.symbolData.symbolRank=this.symbolRank,this.symbolData.negativeImage=this.negativeImage,this.symbolData.horizontalMirror=this.horizontalMirror,this.symbolData.verticalMirror=this.verticalMirror,this.symbolData.space=this.space,this.symbolData.flagTextSize=this.flagTextSize,this.symbolData.maxScale=this.maxScale,this.symbolData.minScale=this.minScale,this.symbolData.textDisplay=this.textDisplay,this.symbolData.initialScale=this.initialScale,this.symbolData.actualScale=this.actualScale,void 0!==this.fontSize&&(this.symbolData.fontSize=this.fontSize),void 0!==this.strokeWidth&&(this.symbolData.strokeWidth=this.strokeWidth);var e=25.4*this.symbolSize.w*10/96,o=25.4*this.symbolSize.h*10/96;this.symbolData.symbolSize={x:e,y:o};var i=25.4*this.symbolSizeInLib.w*10/96,n=25.4*this.symbolSizeInLib.h*10/96;this.symbolData.symbolSizeInLib={x:i,y:n},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 o=t.dotSymbolSize/e;this.symbolSize.w=o*this.symbolSizeInLib.w,this.symbolSize.h=o*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 i=this.symbolSize.w/this.dScale/this.symbolSizeInLib.w,n=this.symbolSize.h/this.dScale/this.symbolSizeInLib.h;this.initialScale!==i?this.initialScale=i:this.initialScale!==n&&(this.initialScale=n),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,a=this.symbolSize.w;this.symbolSizeInLib.w<this.symbolSizeInLib.h&&(l=this.symbolSizeInLib.h,a=this.symbolSize.h),this.initialScale=a/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,this.horizontalMirror=this.symbolData.horizontalMirror,this.verticalMirror=this.symbolData.verticalMirror},_parseSymbolData:function(){if(nr.prototype._parseSymbolData.call(this),null!==this.symbolData){if(void 0!==this.symbolData.symbolSizeInLib?(this.symbolSizeInLib.w=Math.round(96*this.symbolData.symbolSizeInLib.x/25.4/10),this.symbolSizeInLib.h=Math.round(96*this.symbolData.symbolSizeInLib.y/25.4/10)):this.symbolData.innerCells&&(this.symbolSizeInLib.w=Math.round(96*this.symbolData.symbolSize.x/25.4/10),this.symbolSizeInLib.h=Math.round(96*this.symbolData.symbolSize.y/25.4/10)),this.symbolRank=this.symbolData.symbolRank,this.negativeImage=this.symbolData.negativeImage,this.horizontalMirror=this.symbolData.horizontalMirror,this.verticalMirror=this.symbolData.verticalMirror,void 0!==this.symbolData.anchorPoint&&(this.anchorPoint=new SuperMap.Geometry.Point(this.symbolData.anchorPoint.x,this.symbolData.anchorPoint.y)),void 0!==this.symbolData.middleMarkBounds&&null!==this.symbolData.middleMarkBounds&&(this.middleMarkBounds=new SuperMap.Bounds(this.symbolData.middleMarkBounds.leftBottom.x,this.symbolData.middleMarkBounds.leftBottom.y,this.symbolData.middleMarkBounds.rightTop.x,this.symbolData.middleMarkBounds.rightTop.y)),void 0!==this.symbolData.actualScale&&null!==this.symbolData.actualScale&&(this.actualScale=this.symbolData.actualScale),void 0!==this.symbolData.fontSize&&null!==this.symbolData.fontSize&&(this.fontSize=this.symbolData.fontSize),void 0!==this.symbolData.strokeWidth&&void 0!==this.symbolData.strokeWidth&&(this.strokeWidth=this.symbolData.strokeWidth),void 0!==this.symbolData.space&&null!==this.symbolData.space&&(this.space=this.symbolData.space),void 0!==this.symbolData.flagTextSize&&null!==this.symbolData.flagTextSize&&(this.flagTextSize=this.symbolData.flagTextSize),void 0!==this.symbolData.maxScale&&null!==this.symbolData.maxScale&&(this.maxScale=this.symbolData.maxScale),void 0!==this.symbolData.minScale&&null!==this.symbolData.minScale&&(this.minScale=this.symbolData.minScale),void 0!==this.symbolData.textDisplay&&null!==this.symbolData.textDisplay&&(this.textDisplay=this.symbolData.textDisplay),void 0!==this.symbolData.initialScale&&null!==this.symbolData.initialScale){this.initialScale=this.symbolData.initialScale;var t=this.initialScale*this.symbolSizeInLib.w*this.dScale,e=this.initialScale*this.symbolSizeInLib.h*this.dScale;this.symbolSize=new SuperMap.Size(t,e),this.symbolSize.w=t,this.symbolSize.h=e}else if(!1!==this.isEdit){var o=96*this.symbolData.symbolSize.x/25.4/10,i=96*this.symbolData.symbolSize.y/25.4/10;this.setSymbolSize(o,i)}void 0!==this.symbolData.positionOffset&&null!==this.symbolData.positionOffset&&(this.positionOffset=this.symbolData.positionOffset),void 0!==this.symbolData.positionOffsetType&&null!==this.symbolData.positionOffsetType&&(this.positionOffsetType=this.symbolData.positionOffsetType),void 0!==this.symbolData.positionOffsetX&&null!==this.symbolData.positionOffsetX&&(this.positionOffsetX=this.symbolData.positionOffsetX),void 0!==this.symbolData.positionOffsetY&&null!==this.symbolData.positionOffsetY&&(this.positionOffsetY=this.symbolData.positionOffsetY)}}});L.supermap.plotting.dotSymbol=function(t,e,o,i){return new Hr(t,e,o,i)},L.supermap.plotting.DotSymbol=Hr;var Zr=nr.extend({path:null,symbolTexts:null,symbolTextComponents:null,bloodVolumes:null,bloodVolumeComponents:null,trajectory:null,antoRotation:null,getPath:function(){return this.path},setPath:function(t,e,o){this.path!==t&&(this.path=t,this.style.graphicWidth=e,this.style.graphicHeight=o,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getBloodVolumes:function(){return this.bloodVolumes},getSymbolTexts:function(){return this.symbolTexts},setScale:function(t){isNaN(t)||(this.style.graphicHeight*=t/this.dScale,this.style.graphicWidth*=t/this.dScale,this.dScale=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},setRotate:function(t){isNaN(t)||(this.dRotate=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},initialize:function(t,e,o,i){this.code=SuperMap.Plot.SymbolType.PICTURE,this.libID=0,this.symbolType=SuperMap.Plot.SymbolType.PICTURE,this.symbolName="图片",this.minEditPts=1,this.maxEditPts=1,this.symbolTexts=[],this.bloodVolumes=[],this.symbolTextComponents=[],this.bloodVolumeComponents=[],this.autoRotation=!1,nr.prototype.initialize.call(this,t,e,o,i),null===this.path&&(this.path="../img/marker.png")},_calculateParts:function(){if(!(this.getLatLngs().length<this.minEditPts||"none"===this.style.display||null!=this.layer&&"function"==typeof this.layer.getVisibility&&!1===this.layer.getVisibility())){var t={surroundLineFlag:!1};this.style.externalGraphic=t.externalGraphic=this.style.externalGraphic?this.style.externalGraphic:this.path,this.style.graphicOpacity=t.graphicOpacity=this.style.graphicOpacity?this.style.graphicOpacity:1,this.style.graphicWidth=t.graphicWidth=this.style.graphicWidth?this.style.graphicWidth:32,this.style.graphicHeight=t.graphicHeight=this.style.graphicHeight?this.style.graphicHeight:32,t.rotation=-this.dRotate,this.style.graphicXOffset=t.graphicXOffset=this.style.graphicXOffset?this.style.graphicXOffset:0,this.style.graphicYOffset=t.graphicYOffset=this.style.graphicYOffset?this.style.graphicYOffset:0;var e={externalGraphic:t.externalGraphic,graphicWidth:t.graphicWidth,graphicHeight:t.graphicHeight,rotation:-this.dRotate,graphicXOffset:t.graphicXOffset,graphicYOffset:t.graphicYOffset,graphicOpacity:t.graphicOpacity},o=L.supermap.plotting.pointImage(L.Util.cloneLatLngs(this.getLatLngs()),e);this._addComponents(o),this._bounds=this.getBounds(),this._calculateLabel(),this._calculateBloodVolume()}},getBounds:function(){if(this.getLatLngs().length>0){var t=this._map.latLngToLayerPoint(this.getLatLngs()[0]),e=.5*this.style.graphicWidth-this.style.graphicXOffset,o=.5*this.style.graphicHeight-this.style.graphicYOffset,i=L.point(t.x-e,t.y-o),n=L.point(i.x+this.style.graphicWidth,i.y+this.style.graphicHeight),l=this._map.layerPointToLatLng(i),a=this._map.layerPointToLatLng(n),s=new L.latLngBounds;if(0!==this.dRotate){var r=[];r.push(new SuperMap.Geometry.Point(l.lng,l.lat)),r.push(new SuperMap.Geometry.Point(a.lng,l.lat)),r.push(new SuperMap.Geometry.Point(a.lng,a.lat)),r.push(new SuperMap.Geometry.Point(l.lng,a.lat));for(var u=null,p=null,h=null,c=null,y=this.dRotate*(Math.PI/180),g=0;g<r.length;g++)SuperMap.Plot.PlottingUtil.rotateAngle(new SuperMap.Geometry.Point(this.getLatLngs()[0].lng,this.getLatLngs()[0].lat),y,r[g]),null==u?u=r[g].x:u>r[g].x&&(u=r[g].x),null==p?p=r[g].x:p<r[g].x&&(p=r[g].x),null==h?h=r[g].y:h>r[g].y&&(h=r[g].y),null==c?c=r[g].y:c<r[g].y&&(c=r[g].y);s=L.latLngBounds(L.latLng(h,p),L.latLng(c,u))}else s=L.latLngBounds(l,a)}return s},_calculateLabel:function(t,e){for(var o=0;o<this.components.length;)!0===this.components[o].isSymbolText?(null!=this.components[o]._renderer&&(this.components[o].removeEventParent(this),this.components[o].onRemove()),delete this.components[o],this.components.splice(o,1)):o++;if(this.symbolTextComponents.length=0,null!=this.symbolTexts&&0!==this.symbolTexts.length){var i={surroundLineFlag:!1,lineColorLimit:!0,fillColorLimit:!0,lineWidthLimit:!0,lineTypeLimit:!0,fontColorLimit:!0,fontSizeLimit:!0,fillLimit:!0};if(null==t&&(t=this.getBounds()),t&&t.isValid()){null==e&&(e=this.latLngs[0]);for(var n=0;n<this.symbolTexts.length;n++){var l=[];if(null!=this.symbolTexts[n].textContent&&0!==this.symbolTexts[n].textContent.length&&(null==this.symbolTexts[n].style||"none"!==this.symbolTexts[n].style.display)){var a=this.symbolTexts[n];this._mergeStyleToSymbolText(a),a.textPosition=null==a.textPosition?0:a.textPosition;var s=a.textContent.split("\n"),r=s.length,u=0,p=0;if(a.border){u=SuperMap.Plot.PlottingUtil.getTextWidth(a.style,s[0])+2*a.paddingX;for(var h=1;h<r;h++){var c=SuperMap.Plot.PlottingUtil.getTextWidth(a.style,s[h])+2*a.paddingX;c>u&&(u=c)}p=parseInt(a.style.fontSize*r)+2*a.paddingY}var y=void 0,g=void 0,f=L.point(0,0),P=L.point(0,0);switch(a.textPosition){case SuperMap.Plot.AnnoPosition.LEFTTOP:a.style.labelAlign="rb",y=L.latLng(t.getNorth(),t.getWest()),(g=this._map.latLngToLayerPoint(y)).x+=a.offsetX,g.y+=a.offsetY,!0===a.border&&(f.x=g.x,f.y=g.y,P.x=g.x-u,P.y=g.y-p);break;case SuperMap.Plot.AnnoPosition.LEFTBOTTOM:a.style.labelAlign="rt",y=L.latLng(t.getSouth(),t.getWest()),(g=this._map.latLngToLayerPoint(y)).x+=a.offsetX,g.y+=a.offsetY,!0===a.border&&(f.x=g.x,f.y=g.y,P.x=g.x-u,P.y=g.y+p);break;case SuperMap.Plot.AnnoPosition.RIGHTTOP:a.style.labelAlign="lb",y=L.latLng(t.getNorth(),t.getEast()),(g=this._map.latLngToLayerPoint(y)).x+=a.offsetX,g.y+=a.offsetY,!0===a.border&&(f.x=g.x,f.y=g.y,P.x=g.x+u,P.y=g.y-p);break;case SuperMap.Plot.AnnoPosition.RIGHTBOTTOM:a.style.labelAlign="lt",y=L.latLng(t.getSouth(),t.getEast()),(g=this._map.latLngToLayerPoint(y)).x+=a.offsetX,g.y+=a.offsetY,!0===a.border&&(f.x=g.x,f.y=g.y,P.x=g.x+u,P.y=g.y+p);break;case SuperMap.Plot.AnnoPosition.TOP:a.style.labelAlign="cb",y=L.latLng(t.getNorth(),(t.getWest()+t.getEast())/2),(g=this._map.latLngToLayerPoint(y)).x+=a.offsetX,g.y+=a.offsetY,!0===a.border&&(f.x=g.x-u/2,f.y=g.y,P.x=g.x+u/2,P.y=g.y-p);break;case SuperMap.Plot.AnnoPosition.BOTTOM:a.style.labelAlign="ct",y=L.latLng(t.getSouth(),(t.getWest()+t.getEast())/2),(g=this._map.latLngToLayerPoint(y)).x+=a.offsetX,g.y+=a.offsetY,!0===a.border&&(f.x=g.x-u/2,f.y=g.y,P.x=g.x+u/2,P.y=g.y+p);break;case SuperMap.Plot.AnnoPosition.LEFT:a.style.labelAlign="rm",y=L.latLng((t.getSouth()+t.getNorth())/2,t.getWest()),(g=this._map.latLngToLayerPoint(y)).x+=a.offsetX,g.y+=a.offsetY,!0===a.border&&(f.x=g.x,f.y=g.y+p/2,P.x=g.x-u,P.y=g.y-p/2);break;case SuperMap.Plot.AnnoPosition.RIGHT:a.style.labelAlign="lm",y=L.latLng((t.getSouth()+t.getNorth())/2,t.getEast()),(g=this._map.latLngToLayerPoint(y)).x+=a.offsetX,g.y+=a.offsetY,!0===a.border&&(f.x=g.x,f.y=g.y+p/2,P.x=g.x+u,P.y=g.y-p/2);break;case SuperMap.Plot.AnnoPosition.ANCHOR:a.style.labelAlign="lm",y=L.latLng(e.lat,e.lng),(g=this._map.latLngToLayerPoint(y)).x+=a.offsetX,g.y+=a.offsetY,a.offsetX>0?(a.style.labelAlign="lm",!0===a.border&&(f.x=g.x,f.y=g.y+p/2,P.x=g.x+u,P.y=g.y-p/2)):(a.style.labelAlign="rm",!0===a.border&&(f.x=g.x,f.y=g.y+p/2,P.x=g.x-u,P.y=g.y-p/2))}var d=this._map.layerPointToLatLng(g);if(!0===a.showRelationLine&&(0!==a.offsetX||0!==a.offsetY)){var S=a.lineStyle;null==a.lineStyle&&(S=SuperMap.Util.copyAttributes(S,this.style)),S.lineColorLimit=!0,S.lineTypeLimit=!0,S.lineWidthLimit=!0;var m=this._createAndDrawLayer(SuperMap.Plot.SymbolType.POLYLINESYMBOL,[d,y],S);m.isSymbolText=!0,m.fromZoom=this._map.getZoom(),l.push(m)}var b=SuperMap.Util.copyAttributes(i,a.style);if(a.border){var M=this._map.layerPointToLatLng(f),v=this._map.layerPointToLatLng(P),A=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[M,v],SuperMap.Util.cloneObject(b));A.isSymbolText=!0,A.fromZoom=this._map.getZoom(),l.push(A);var T=f.x<P.x?f.x:P.x,_=f.y<P.y?f.y:P.y,O=this._map.layerPointToLatLng(L.point(T+a.paddingX,_+p/2)),x=SuperMap.Util.cloneObject(b);x.labelAlign="lm";var w=this._createAndDrawLayer(SuperMap.Plot.SymbolType.TEXTSYMBOL,[O],x,a.textContent);w.isSymbolText=!0,w.fromZoom=this._map.getZoom(),l.push(w)}else{var E=this._createAndDrawLayer(SuperMap.Plot.SymbolType.TEXTSYMBOL,[d],SuperMap.Util.cloneObject(b),a.textContent);E.isSymbolText=!0,E.fromZoom=this._map.getZoom(),l.push(E)}this.symbolTextComponents.push(l)}}}}},_calculateBloodVolume:function(t,e){for(var o=0;o<this.components.length;)!0===this.components[o].isBloodVolume?(null!=this.components[o]._renderer&&(this.components[o].removeEventParent(this),this.components[o].onRemove()),delete this.components[o],this.components.splice(o,1)):o++;if(this.bloodVolumeComponents.length=0,!(this.getLatLngs().length<this.minEditPts)&&null!=this.bloodVolumes&&0!==this.bloodVolumes.length){null==t&&(t=this.getBounds()),null==e&&(e=this.getLatLngs()[0]);for(var i=this._map.latLngToLayerPoint(e),n=0;n<this.bloodVolumes.length;n++){var l=[],a=null;if(null!=this.bloodVolumes[n].width)a=Math.abs(this._map.layerPointToLatLng(L.point(i.x+this.bloodVolumes[n].width,i.y)).lng-e.lng);else{var s=Math.abs(this._map.layerPointToLatLng(L.point(i.x+40,i.y)).lng-e.lng);(a=Math.abs(t.getEast()-t.getWest()))<s&&(a=s)}var r,u,p=null;if(null!=this.bloodVolumes[n].height)p=Math.abs(this._map.layerPointToLatLng(L.point(i.x,i.y+this.bloodVolumes[n].height)).lat-e.lat);else{p=Math.abs(this._map.layerPointToLatLng(L.point(i.x,i.y+8)).lat-e.lat)}if(this.bloodVolumes[n].position===SuperMap.Plot.Position.TOP){var h=L.latLng(t.getNorth(),t.getCenter().lng),c=this._map.latLngToLayerPoint(h);c.x+=this.bloodVolumes[n].offsetX,c.y+=this.bloodVolumes[n].offsetY,h=this._map.layerPointToLatLng(c),r=L.latLng(h.lat+p,h.lng-.5*a),u=L.latLng(h.lat,h.lng+.5*a)}else if(this.bloodVolumes[n].position===SuperMap.Plot.Position.BOTTOM){var y=L.latLng(t.getSouth(),t.getCenter().lng),g=this._map.latLngToLayerPoint(y);g.x+=this.bloodVolumes[n].offsetX,g.y+=this.bloodVolumes[n].offsetY,y=this._map.layerPointToLatLng(g),r=L.latLng(y.lat,y.lng-.5*a),u=L.latLng(y.lat-p,y.lng+.5*a)}else if(this.bloodVolumes[n].position===SuperMap.Plot.Position.LEFT){var f=L.latLng(t.getCenter().lat,t.getWest()),P=this._map.latLngToLayerPoint(f);P.x+=this.bloodVolumes[n].offsetX,P.y+=this.bloodVolumes[n].offsetY,f=this._map.layerPointToLatLng(P),r=L.latLng(f.lat+.5*a,f.lng-p),u=L.latLng(f.lat-.5*a,f.lng)}else if(this.bloodVolumes[n].position===SuperMap.Plot.Position.RIGHT){var d=L.latLng(t.getCenter().lat,t.getEast()),S=this._map.latLngToLayerPoint(d);S.x+=this.bloodVolumes[n].offsetX,S.y+=this.bloodVolumes[n].offsetY,d=this._map.layerPointToLatLng(S),r=L.latLng(d.lat+.5*a,d.lng),u=L.latLng(d.lat-.5*a,d.lng+p)}var m=this.bloodVolumes[n].style.color;null==m&&(m="#808080");var b=this.bloodVolumes[n].style.weight;null==b&&(b=4);var M=this.bloodVolumes[n].style.opacity;null==M&&(M=1);var v=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[r,u],{fillLimit:!0,fillSymbolID:1,lineWidthLimit:!0,weight:b,lineColorLimit:!0,color:m,opacity:M});v.isBloodVolume=!0,v.fromZoom=this._map.getZoom(),l.push(v);var A=this.bloodVolumes[n].style.remainingVolumeColor;null==A&&(A="#00ff00");var T=this.bloodVolumes[n].style.remainingVolumeOpacity;null==T&&(T=.8);var _=this.bloodVolumes[n].style.consumeVolumeColor;null==_&&(_="#000000");var O=this.bloodVolumes[n].style.consumeVolumeOpacity;null==O&&(O=.8);var x=this.components[this.components.length-1].getBounds();if(this.bloodVolumes[n].position===SuperMap.Plot.Position.TOP||this.bloodVolumes[n].position===SuperMap.Plot.Position.BOTTOM){if(!SuperMap.Plot.PlottingUtil.equalFuzzy(0,this.bloodVolumes[n].volume)){var w=x.getNorthWest(),E=L.latLng(x.getSouthEast().lat,w.lng+this.bloodVolumes[n].volume*a),C=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[w,E],{fillLimit:!0,fillSymbolID:0,fillColorLimit:!0,fillColor:A,fillOpacity:T,lineColorLimit:!0,opacity:0});C.isBloodVolume=!0,C.fromZoom=this._map.getZoom(),l.push(C)}if(!SuperMap.Plot.PlottingUtil.equalFuzzy(1,this.bloodVolumes[n].volume)){var I=x.getSouthEast(),R=L.latLng(x.getNorthWest().lat,x.getNorthWest().lng+this.bloodVolumes[n].volume*a),D=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[I,R],{fillLimit:!0,fillSymbolID:0,fillColorLimit:!0,fillColor:_,fillOpacity:O,lineColorLimit:!0,opacity:0});D.isBloodVolume=!0,D.fromZoom=this._map.getZoom(),l.push(D)}}else if(this.bloodVolumes[n].position===SuperMap.Plot.Position.LEFT){if(!SuperMap.Plot.PlottingUtil.equalFuzzy(0,this.bloodVolumes[n].volume)){var U=x.getSouthWest(),N=L.latLng(U.lat+this.bloodVolumes[n].volume*a,x.getNorthEast().lng),B=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[U,N],{fillLimit:!0,fillSymbolID:0,fillColorLimit:!0,fillColor:A,fillOpacity:T,lineColorLimit:!0,opacity:0});B.isBloodVolume=!0,B.fromZoom=this._map.getZoom(),l.push(B)}if(!SuperMap.Plot.PlottingUtil.equalFuzzy(1,this.bloodVolumes[n].volume)){var k=x.getNorthEast(),F=L.latLng(x.getSouthWest().lat+this.bloodVolumes[n].volume*a,x.getSouthWest().lng),V=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[k,F],{fillLimit:!0,fillSymbolID:0,fillColorLimit:!0,fillColor:_,fillOpacity:O,lineColorLimit:!0,opacity:0});V.isBloodVolume=!0,V.fromZoom=this._map.getZoom(),l.push(V)}}else if(this.bloodVolumes[n].position===SuperMap.Plot.Position.RIGHT){if(!SuperMap.Plot.PlottingUtil.equalFuzzy(0,this.bloodVolumes[n].volume)){var j=x.getNorthEast(),Y=L.latLng(j.lat-this.bloodVolumes[n].volume*a,x.getSouthWest().lng),z=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[j,Y],{fillLimit:!0,fillSymbolID:0,fillColorLimit:!0,fillColor:A,fillOpacity:T,lineColorLimit:!0,opacity:0});z.isBloodVolume=!0,z.fromZoom=this._map.getZoom(),l.push(z)}if(!SuperMap.Plot.PlottingUtil.equalFuzzy(1,this.bloodVolumes[n].volume)){var G=x.getSouthWest(),W=L.latLng(x.getNorthEast().lat-this.bloodVolumes[n].volume*a,x.getNorthEast().lng),X=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[G,W],{fillLimit:!0,fillSymbolID:0,fillColorLimit:!0,fillColor:_,fillOpacity:O,lineColorLimit:!0,opacity:0});X.isBloodVolume=!0,X.fromZoom=this._map.getZoom(),l.push(X)}}this.bloodVolumeComponents.push(l)}}},move:function(t,e){nr.prototype._move.call(this,t,e)},_mergeStyleToSymbolText:function(t){if(null!==this.components)for(var e in null!==t.style&&void 0!==t.style||(t.style={}),this.style)Object.prototype.hasOwnProperty.call(t.style,e)||(t.style[e]=this.style[e])},_reView:function(){this.fromZoom!==this._map.getZoom()&&(this._calculateLabel(),this._calculateBloodVolume(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)),this.fromZoom=this._map.getZoom()}});L.supermap.plotting.picture=function(t,e,o,i){return new Zr(t,e,o,i)},L.supermap.plotting.Picture=Zr;var Jr=lr.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,o,i){this.scalePoints=[],this.scaleValues=[],nr.prototype.initialize.call(this,t,e,o,i),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!==i.constantSize&&null!==i.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,lr.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 o=e[0][0].clone();o.isScalePoint=!0,o.tag=0;var i=e[e.length-1][e[e.length-1].length-1].clone();i.isScalePoint=!0,i.tag=1,this.scalePoints.push(o),this.scalePoints.push(i),e[0].splice(0,0,this.centerPoint.clone()),e[e.length-1].push(this.centerPoint.clone()),this.latLngs.length>2&&this.latLngs.splice(1,this.latLngs.length-1)}for(var n=0;n<e.length;n++)this.scaleByMap=!1,this._createAndDrawLayer(SuperMap.Plot.SymbolType.POLYLINESYMBOL,e[n],{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 o=null;if(!0===e){var i=this.getBounds().getCenter();this.scaleByMap=!1,this._createAndDrawLayer(34,[i],{surroundLineFlag:!1,labelAlign:"cm"},this.textContent),o=i.clone()}else{var n=this.textPosition+t,l=this.textPosition-t,a=this.getArcPts(l,n),s=SuperMap.Plot.RelLineText.ONLEFTLINE;SuperMap.Plot.PlottingUtil.isPloyClockwise(a[0])&&(s=SuperMap.Plot.RelLineText.ONRIGHTLINE);for(var r=SuperMap.Plot.PlottingUtil.clonePoints(a[0]),u=[],p=r.length-1;p>=0;p--)u.push(r[p]);this.scaleByMap=!1,this._addComponents(L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.PATHTEXT,u,{textContent:this.textContent,showPathLine:!1,isCurve:!1,relLineText:s,scaleByMap:!1},this.style)),o=a[0][Math.ceil(a[0].length/2)].clone()}o.isScalePoint=!0,o.tag=2,this.scalePoints.push(o)}},_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),o=new SuperMap.Geometry.Point(this.centerPoint.lng,this.centerPoint.lat),i=SuperMap.Plot.PlottingUtil.distance(o,e),n=[];if(n.push(this.centerPoint),n.push(L.latLng(e.y,e.x)),SuperMap.Plot.RadiusLineType.NONE!==this.radiusLineType&&this._createAndDrawLayer(SuperMap.Plot.SymbolType.POLYLINESYMBOL,n,{surroundLineFlag:!1}),this.radiusLineType===SuperMap.Plot.RadiusLineType.ARROW){var l;if(null===this.map)l=0;else{var a=this._map.layerPointToLatLng(L.point(0,0)),s=this._map.layerPointToLatLng(L.point(this.subSymbolDefaultPixelSize,0));l=SuperMap.Plot.PlottingUtil.distance(new SuperMap.Geometry.Point(a.lng,a.lat),new SuperMap.Geometry.Point(s.lng,s.lat))}var r=SuperMap.Plot.PlottingUtil.findPoint(e,o,l,12.5),u=SuperMap.Plot.PlottingUtil.findPoint(e,o,l,-12.5),p=[];p.push(L.latLng(e.y,e.x)),p.push(L.latLng(r.y,r.x)),p.push(L.latLng(u.y,u.x)),this.scaleByMap=!1,this._createAndDrawLayer(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,p,{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(o,e,.2*i,0),c=SuperMap.Plot.PlottingUtil.findPoint(o,e,.8*i,0),y=SuperMap.Plot.PlottingUtil.findPoint(h,e,.02*i,90),g=SuperMap.Plot.PlottingUtil.findPoint(c,e,.02*i,90),f=L.latLng(y.y,y.x),P=L.latLng(g.y,g.x),d=SuperMap.Plot.RelLineText.ONLEFTLINE,S=[];y.x<g.x?(S.push(f),S.push(P)):(S.push(P),S.push(f),d=SuperMap.Plot.RelLineText.ONRIGHTLINE),this._addComponents(L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.PATHTEXT,S,{textContent:this.radiusText[0],showPathLine:!1,relLineText:d,scaleByMap:!1},this.style))}if(2===this.radiusText.length){var m=SuperMap.Plot.RelLineText.ONRIGHTLINE,b=SuperMap.Plot.PlottingUtil.findPoint(h,e,.02*i,270),M=SuperMap.Plot.PlottingUtil.findPoint(c,e,.02*i,270),v=L.latLng(b.y,b.x),A=L.latLng(M.y,M.x),T=[];b.x<M.x?(T.push(v),T.push(A)):(T.push(A),T.push(v),m=SuperMap.Plot.RelLineText.ONLEFTLINE),this._addComponents(L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.PATHTEXT,T,{textContent:this.radiusText[1],showPathLine:!1,relLineText:m,scaleByMap:!1},this.style))}var _=L.latLng(e.y,e.x);_.isScalePoint=!0,_.tag=this.scalePoints.length,this.scalePoints.push(_)}},_parseSymbolData:function(){lr.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=[],lr.prototype._setSymbolData.call(this),this.symbolData&&(this.symbolData.centerPoint||(this.symbolData.centerPoint={}),this.symbolData.centerPoint.x=this.centerPoint.lng,this.symbolData.centerPoint.y=this.centerPoint.lat,this.symbolData.endAngle=this.endAngle,this.symbolData.radius=this.radius,this.symbolData.radiusPosAngle=this.radiusPosAngle,this.symbolData.startAngle=this.startAngle,this.symbolData.textPosition=this.textPosition,this.symbolData.radiusLineType=this.radiusLineType,this.symbolData.radiusText=this.radiusText)},_reView:function(){void 0!==this.prevStrokeWidth&&this.prevStrokeWidth!==this.feature.style.strokeWidth&&(this.strokeWidth=this.style.strokeWidth),this.fromZoom!==this._map.getZoom()&&(!0===this.isEdit&&this.redraw(),this.fromZoom=this._map.getZoom())},_modifyPoint:function(t,e){if(!0===e.isScalePoint){if(0===t)this.radius=SuperMap.Plot.PlottingUtil.distVincenty(this.centerPoint,e),this.startAngle=180*SuperMap.Plot.PlottingUtil.radian(new SuperMap.Geometry.Point(this.latLngs[0].lng,this.latLngs[0].lat),new SuperMap.Geometry.Point(e.lng,e.lat))/Math.PI;else if(1===t)this.radius=SuperMap.Plot.PlottingUtil.distVincenty(this.centerPoint,e),this.endAngle=180*SuperMap.Plot.PlottingUtil.radian(new SuperMap.Geometry.Point(this.latLngs[0].lng,this.latLngs[0].lat),new SuperMap.Geometry.Point(e.lng,e.lat))/Math.PI;else if(2===t&&0!==this.textContent.length){var 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;(o>this.startAngle&&o<this.endAngle||o+360>this.startAngle&&o+360<this.endAngle)&&(this.textPosition=o)}else if(3===t||2===t&&0===this.textContent.length){var i=180*SuperMap.Plot.PlottingUtil.radian(new SuperMap.Geometry.Point(this.latLngs[0].lng,this.latLngs[0].lat),new SuperMap.Geometry.Point(e.lng,e.lat))/Math.PI;this.startAngle%360==this.endAngle%360?this.radiusPosAngle=i:(i>this.startAngle&&i<this.endAngle||i+360>this.startAngle&&i+360<this.endAngle)&&(this.radiusPosAngle=i)}}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,o,i){var n=!1;1===this.latLngs.length&&(n=!0,this.latLngs.push(this.scalePoints[0])),lr.prototype._resizeLatLngs.call(this,t,e,o,i),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]),n&&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,o=this.avoidRegions.length;e<o;e++)L.Util.rotateLatLngs(this.avoidRegions[e].getLatLngs(),this.centerPoint,t);this.redraw()},move:function(t,e){for(var o=0,i=this.avoidRegions.length;o<i;o++)L.Util.moveLatLngs(this.avoidRegions[o].getLatLngs(),t,e);L.Util.moveLatLngs([this.centerPoint],t,e),this.latLngs=[],this.redraw()},getArcPts:function(t,e){for(var o=[],i=[],n=t;n<=e;n+=5){var l=SuperMap.Plot.PlottingUtil.destinationVincenty(this.centerPoint,360-n+90,1e3*this.radius);i.length>2&&Math.abs(l.lng-i[i.length-1].lng)>180&&(o.push(i.slice()),i.length=0),i.push(l)}if(n-e>0&&n-e<5){var a=SuperMap.Plot.PlottingUtil.destinationVincenty(this.centerPoint,360-e+90,1e3*this.radius);i.push(a)}return o.push(i.slice()),o}});L.supermap.plotting.arcRegion=function(t,e,o,i){return new Jr(t,e,o,i)};var qr=$s.extend({ratio:null,scalePoints:null,scaleValues:null,initialize:function(t,e,o,i){$s.prototype.initialize.call(this,t,e,o,i),this.libID=0,this.code=SuperMap.Plot.SymbolType.FLAGGROUP,this.symbolType=SuperMap.Plot.SymbolType.FLAGGROUP,this.symbolName="多旗",i.subObjects&&(this.subObjects=i.subObjects),null===this.ratio&&(this.ratio=.8),this.scaleByMap=!0,this.minScale=1,this.maxScale=5},destroy:function(){$s.prototype.destroy.call(this),this.ratio=[]},setRotate:function(t){isNaN(t)||(this.dRotate+=t,this.redraw())},redraw:function(){if("none"===this.style.display||null!=this.layer&&"function"==typeof this.layer.getVisibility&&!1===this.layer.getVisibility())this._clearComponents();else{if(L.Util.isArray(this.ratio)||(this.ratio=[this.ratio]),0===this.components.length&&0!==this.subObjects.length)for(var 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 o=L.latLng(this.components[0].getLatLngs()[0].lat,this.components[0].getLatLngs()[0].lng),i=this._map.latLngToLayerPoint(o);!0===this.components[0].positionOffset&&(i.x+=this.components[0].positionOffsetX,i.y+=this.components[0].positionOffsetY),o=this._map.layerPointToLatLng(i),this.anchorPoint=o.clone();var n=new L.latLng(o);n.tag=0,this.scalePoints.push(n);for(var l=1,a=this.components.length;l<a;l++){for(;this.ratio.length<l;)this.ratio.push(this.ratio[this.ratio.length-1]);var s=this.ratio[l-1],r=this.components[l-1],u=this._calculateFlagTop(r),p=L.Util.cloneLatLngs(r.getLatLngs())[0],h=this._map.latLngToLayerPoint(p);!0===r.positionOffset&&(h.x+=r.positionOffsetX,h.y+=r.positionOffsetY),p=this._map.layerPointToLatLng(h),u=this._pointRotate(this.dRotate,p,u);var c=this._findPointOnLineByRatio(s,p,u);this.components[l].dRotate=this.dRotate,this.components[l].setLatLngs([c]);var y=new L.latLng(c);y.tag=l,this.scalePoints.push(y)}}}},_pointRotate:function(t,e,o){t*=Math.PI/180;var i=Math.sqrt(Math.pow(e.lng-o.lng,2)+Math.pow(e.lat-o.lat,2)),n=t+Math.atan2(o.lat-e.lat,o.lng-e.lng);return o.lng=e.lng+i*Math.cos(n),o.lat=e.lat+i*Math.sin(n),o},_findPointOnLineByRatio:function(t,e,o){var i=new L.latLng(0,0);return i.lng=e.lng+(o.lng-e.lng)*t,i.lat=e.lat+(o.lat-e.lat)*t,i},_calculateFlagTop:function(t){var e=t.dRotate;t.dRotate=0,0===t.dRotate&&(t.isNotRedrawText=!0,t.redraw(),delete t.isNotRedrawText);var o=t.getBounds();return t.dRotate=e,t.redraw(),t.initialScale.x>=0?t.negativeImage?new L.latLng(o.getNorth(),o.getEast()):new L.latLng(o.getNorth(),o.getWest()):t.negativeImage?new L.latLng(o.getSouth(),o.getWest()):new L.latLng(o.getSouth(),o.getEast())},_projectPoint:function(t,e,o){if(e===o)return e;var i=new L.latLng(0,0),n=o.lng-e.lng,l=e.lat-o.lat,a=n*n,s=l*l,r=n*l,u=n*n+l*l;return i.lng=(r*(e.lat-t.lat)+e.lng*s+t.lng*a)/u,i.lat=(r*(e.lng-t.lng)+e.lat*a+t.lat*s)/u,i},_modifyPoint:function(t,e){if(0===t)this.subObjects[0].setLatLngs([e]);else{var o=this.subObjects[t-1].latLngs[0],i=this._calculateFlagTop(this.subObjects[t-1]);i=this._pointRotate(this.dRotate,this.subObjects[0].latLngs[0],i);var n=Math.sqrt(Math.pow(o.lng-i.lng,2)+Math.pow(o.lat-i.lat,2)),l=this._projectPoint(e,o,i),a=Math.sqrt(Math.pow(o.lng-l.lng,2)+Math.pow(o.lat-l.lat,2));this.ratio[t-1]=a/n}this.redraw()},_reView:function(){for(var t in this.components)this.components[t].scaleByMap=this.scaleByMap,this.components[t].minScale=this.minScale,this.components[t].maxScale=this.maxScale,this.components[t]._reView();this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},_parseSymbolData:function(){$s.prototype._parseSymbolData.call(this),this.symbolData&&(this.ratio=this.symbolData.ratio)},_setSymbolData:function(){$s.prototype._setSymbolData.call(this),this.symbolData&&(this.symbolData.ratio=this.ratio)}});L.supermap.plotting.flagGroup=function(t,e,o,i){return new qr(t,e,o,i)},L.supermap.plotting.FlagGroup=qr;var Kr=$s.extend({colNum:null,space:null,initialize:function(t,e,o,i){$s.prototype.initialize.call(this,t,e,o,i),this.libID=0,this.code=SuperMap.Plot.SymbolType.NAVYDEPLOYMENT,this.symbolType=SuperMap.Plot.SymbolType.NAVYDEPLOYMENT,this.symbolName="海军兵力部署",null===this.colNum&&(this.colNum=1),null===this.space&&(this.space=10),this.scaleByMap=!0},destroy:function(){this.space=null,this.colNum=null,$s.prototype.destroy.call(this)},redraw:function(){"none"===this.style.display||null!=this.layer&&"function"==typeof this.layer.getVisibility&&!1===this.layer.getVisibility()?this._clearComponents():this._redrawComponents()},_calculateParts:function(){var t=this._map.getFeatureByUuid(this.associatedUuid);if(null!==t&&t.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&0!==t.latLngs.length){for(var e=!1,o=0;o<t.deployments.length;o++)if(this===t.deployments[o]){e=!0;break}e||t.deployments.push(this),null==this.minScale&&(this.minScale=t.minScale),null==this.maxScale&&(this.maxScale=t.maxScale);var i=1;if("function"==typeof this.layer.getSymZoomScale&&(i=this.layer.getSymZoomScale()),null!=this.minScale&&i<this.minScale?i=this.minScale:null!=this.maxScale&&i>this.maxScale&&(i=this.maxScale),0!==this.subObjects.length&&0===this.components.length)for(var n=0,l=this.subObjects.length;n<l;n++)this.subObjects[n].ownerGroup=this,this.subObjects[n].enableEdit=!0,this._addComponents(this.subObjects[n]);this.subObjects=[];var a=L.Util.cloneLatLngs(t.latLngs[0]),s=this._map.latLngToLayerPoint(L.latLng(a[0].lat,a[0].lng)),r=this._transitionPoint(new SuperMap.Geometry.Point(this.space*i,0),s),u=Math.abs(r.lng-a[0].lng),p=new SuperMap.Geometry.Point(0,0),h=this._transitionPoint(p,s),c=new SuperMap.Geometry.Point(100*i,100*i),y=this._transitionPoint(c,s),g=new L.LatLngBounds(L.latLng(h.lat,h.lng),L.latLng(y.lat,y.lng)),f=Math.ceil(this._getSubSymbolCount(this.subSymbols.length-1)/this.colNum),P=Math.abs(g.getNorth()-g.getSouth())*f+u*(f+1),d=L.latLng(a[0].lat+P/2,a[0].lng-5*u);this._clearComponents();for(var S=0;S<this.subSymbols.length;S++)for(var m=0;m<this.subSymbols[S].totalNum;m++){var b=this._getSubSymbolCount(S-1)+m+1,M=Math.ceil(b/f),v=b-f*(M-1);if(1!==M&&1===v){var A=this.bounds;d.lng=A.getWest()}this.subSymbols[S].symbolData.textContent=this.subSymbols[S].textContent;for(var T=d.lng,_=d.lat-v*(Math.abs(g.getNorth()-g.getSouth())+u),O=0,x=0,w=0,E=0,C=0;C<this.subSymbols[S].symbolData.innerCells.length;C++)for(var I=0;I<this.subSymbols[S].symbolData.innerCells[C].positionPoints.length;I++)O<=this.subSymbols[S].symbolData.innerCells[C].positionPoints[I].x*i&&(O=this.subSymbols[S].symbolData.innerCells[C].positionPoints[I].x*i),x>=this.subSymbols[S].symbolData.innerCells[C].positionPoints[I].x*i&&(x=this.subSymbols[S].symbolData.innerCells[C].positionPoints[I].x*i),w<=this.subSymbols[S].symbolData.innerCells[C].positionPoints[I].y*i&&(w=this.subSymbols[S].symbolData.innerCells[C].positionPoints[I].y*i),E>=this.subSymbols[S].symbolData.innerCells[C].positionPoints[I].y*i&&(E=this.subSymbols[S].symbolData.innerCells[C].positionPoints[I].y*i);var R=L.latLng(_,T),D=this._map.latLngToLayerPoint(L.latLng(_,T)),U=new SuperMap.Geometry.Point(O,(w+E)/2),N=new SuperMap.Geometry.Point(U.x,U.y),B=new SuperMap.Geometry.Point(this.subSymbols[S].symbolData.anchorPoint.x,this.subSymbols[S].symbolData.anchorPoint.y),k=this._transitionPoint(N,D),F=this._transitionPoint(B,D);R.lat+=F.lat-k.lat,R.lng+=F.lng-k.lng;var V=this.subSymbols[S].symbolData.libID,j=this.subSymbols[S].symbolData.code;this.subSymbols[S].symbolData.annotationPosition=6;var Y=SuperMap.Util.cloneObject(this.subSymbols[S].symbolData),z=L.supermap.plotting.PlottingObject.createSymbol(V,j,R,{serverUrl:this.serverUrl,symbolData:Y,scaleByMap:this.scaleByMap,minScale:this.minScale,maxScale:this.maxScale,space:0});z.enableEdit=!0,z.ownerGroup=this,this._addComponents(z),this.bounds=new L.LatLngBounds,this.bounds.extend(z.getBoundsWithText()),this.subObjects.push(z)}if(this.bounds=new L.LatLngBounds,this.bounds=this._calculateBounds(),null!==this.textContent&&0!==this.textContent.length){var G=L.latLng(a[0].lat+P/2+u,a[0].lng-5*u),W=L.supermap.plotting.PlottingObject.createSymbol(0,34,[G],{textContent:this.textContent,serverUrl:this.serverUrl,scaleByMap:this.scaleByMap,minScale:this.minScale,maxScale:this.maxScale});W.style.labelAlign="rb",W.style.scaleByMap=!0,W.enableEdit=!0,W.ownerGroup=this,this._addComponents(W),this.bounds.extend(W.getBounds()),this.subObjects.push(W)}var X=new L.LatLngBounds(L.latLng(this.bounds.getSouth()-u,this.bounds.getWest()-u),L.latLng(this.bounds.getNorth()+u,this.bounds.getEast()+u)),H=[];H.push(L.latLng(X.getNorth(),X.getWest())),H.push(L.latLng(X.getSouth(),X.getEast()));var Z=L.latLng(a[0].lat,a[0].lng);Z.isFixedPos=!0,H.push(Z);var J=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL,H,{serverUrl:this.serverUrl,scaleByMap:this.scaleByMap,minScale:this.minScale,maxScale:this.maxScale});for(var q in J.enableEdit=!0,J.ownerGroup=this,this.subObjects.splice(0,0,J),this._addComponents(J),this.subObjects)this.subObjects[q].ownerGroup=this,this.subObjects[q].enableEdit=!0,this._addComponents(this.subObjects[q])}},_reView:function(){this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},move:function(t,e){for(var o in this.subObjects)this.subObjects[o].move(t,e);this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},_resize:function(t,e){for(var o in this.subObjects)this.subObjects[o]._resize(t,e)},_transitionPoint:function(t,e){var o=e.x+t.x*(96/254),i=e.y-t.y*(96/254);return this._map.layerPointToLatLng(L.point(o,i))},_getSubSymbolCount:function(t){var e=0;if(t<0)return e;t>this.subSymbols.length-1&&(t=this.subSymbols.length-1);for(var o=0;o<=t;o++)e+=this.subSymbols[t].totalNum;return e},_calculateBounds:function(){for(var t in this.bounds=new L.LatLngBounds,this.components)0!==t&&this.components[t].symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&this.bounds.extend(this.components[t].getBoundsWithText());return this.bounds},setTextContent:function(t){if(this.textContent!==t){this.textContent=t;for(var e=0;e<this.subObjects.length;e++)this.subObjects[e].symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL&&(this.subObjects[e].textContent=this.textContent,this.subObjects[e].redraw())}}});L.supermap.plotting.navyDeployment=function(t,e,o,i){return new Kr(t,e,o,i)},L.supermap.plotting.NavyDeployment=Kr;var Qr=Kr.extend({isShowTooltip:!0,getShowTooltip:function(){return this.isShowTooltip},setShowTooltip:function(t){if(this.isShowTooltip!==t)if(this.isShowTooltip=t,this.isShowTooltip&&0!==this.components.length){var e=this._map.getFeatureByUuid(this.associatedUuid),o=L.Util.cloneLatLngs(e.latLngs[0]),i=this._map.latLngToLayerPoint(L.latLng(o[0].lat,o[0].lng)),n=this._transitionPoint(new SuperMap.Geometry.Point(this.space,0),i),l=Math.abs(n.lng-o[0].lng),a=new L.LatLngBounds(L.latLng(this.bounds.getSouth()-l,this.bounds.getWest()-l),L.latLng(this.bounds.getNorth()+l,this.bounds.getEast()+l)),s=[];s.push(L.latLng(a.getNorth(),a.getWest())),s.push(L.latLng(a.getSouth(),a.getEast()));var r=L.latLng(o[0].lat,o[0].lng);r.isFixedPos=!0,s.push(r);var u=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL,s,{serverUrl:this.serverUrl});this._addComponents(u)}else for(var p in this.components)if(320===this.components[p].symbolType){this.subObjects.splice(SuperMap.Util.indexOf(this.subObjects,this.components[p]),1);var h=SuperMap.Util.indexOf(this.components,this.components[p]);if(-1!==h){this.components[h]._clearComponents(),this.components.splice(h,1);break}}},initialize:function(t,e,o,i){Kr.prototype.initialize.call(this,t,e,o,i),this.libID=0,this.code=SuperMap.Plot.SymbolType.AIRDEPLOYMENT,this.symbolType=SuperMap.Plot.SymbolType.AIRDEPLOYMENT,this.symbolName="空军兵力部署",null===this.isShowTooltip&&(this.isShowTooltip=!0),this.scaleByMap=!0},destroy:function(){this.isShowTooltip=null,Kr.prototype.destroy.call(this)},_calculateParts:function(){var t=this._map.getFeatureByUuid(this.associatedUuid);if(null!==t&&t.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&0!==t.latLngs.length){for(var e=!1,o=0;o<t.deployments.length;o++)if(this===t.deployments[o]){e=!0;break}e||t.deployments.push(this),null==this.minScale&&(this.minScale=t.minScale),null==this.maxScale&&(this.maxScale=t.maxScale);var i=1;if("function"==typeof this.layer.getSymZoomScale&&(i=this.layer.getSymZoomScale()),null!=this.minScale&&i<this.minScale?i=this.minScale:null!=this.maxScale&&i>this.maxScale&&(i=this.maxScale),0!==this.subObjects.length&&0===this.components.length)for(var n=0,l=this.subObjects.length;n<l;n++)this.subObjects[n].enableEdit=!0,this.subObjects[n].ownerGroup=this,this._addComponents(this.subObjects[n]);this.subObjects=[];var a=L.Util.cloneLatLngs(t.latLngs[0]),s=this._map.latLngToLayerPoint(L.latLng(a[0].lat,a[0].lng)),r=this._transitionPoint(new SuperMap.Geometry.Point(this.space*i,0),s),u=Math.abs(r.lng-a[0].lng),p=new SuperMap.Geometry.Point(0,0),h=this._transitionPoint(p,s),c=new SuperMap.Geometry.Point(100*i,100*i),y=this._transitionPoint(c,s),g=new L.LatLngBounds(L.latLng(h.lat,h.lng),L.latLng(y.lat,y.lng)),f=Math.ceil(this._getSubSymbolCount(this.subSymbols.length-1)/this.colNum),P=Math.abs(g.getWest()-g.getEast())*this.colNum+u*(this.colNum-1),d=L.latLng(a[0].lat-u,a[0].lng-.5*P+.5*Math.abs(g.getEast()-g.getWest()));!0===this.isShowTooltip&&(d.lat-=4*u),this._setSubSymbolText();for(var S=[],m=0;m<this.subSymbols.length;m++)for(var b=0;b<this.subSymbols[m].totalNum;b++)S.push(this.subSymbols[m]);this._clearComponents();for(var M=0,v=0;v<f;v++){for(b=0;b<this.colNum&&!(M>=S.length);b++){var A=S[M];if(void 0!==A.symbolData&&null!==A.symbolData){for(var T=A.symbolData.libID,_=A.symbolData.code,O=d.lng+b*(u+Math.abs(g.getEast()-g.getWest())),x=d.lat-(2*u+Math.abs(g.getNorth()-g.getSouth())/2),w=0,E=0,C=0,I=0,R=0;R<A.symbolData.innerCells.length;R++)for(var D=0;D<A.symbolData.innerCells[R].positionPoints.length;D++)w<=A.symbolData.innerCells[R].positionPoints[D].x*i&&(w=A.symbolData.innerCells[R].positionPoints[D].x*i),E>=A.symbolData.innerCells[R].positionPoints[D].x*i&&(E=A.symbolData.innerCells[R].positionPoints[D].x*i),C<=A.symbolData.innerCells[R].positionPoints[D].y*i&&(C=A.symbolData.innerCells[R].positionPoints[D].y*i),I>=A.symbolData.innerCells[R].positionPoints[D].y*i&&(I=A.symbolData.innerCells[R].positionPoints[D].y*i);var U=L.latLng(x,O),N=this._map.latLngToLayerPoint(L.latLng(x,O)),B=new SuperMap.Geometry.Point((w+E)/2,C),k=new SuperMap.Geometry.Point(B.x,B.y),F=new SuperMap.Geometry.Point(S[M].symbolData.anchorPoint.x,S[M].symbolData.anchorPoint.y),V=this._transitionPoint(k,N),j=this._transitionPoint(F,N);U.lat+=j.lat-V.lat,U.lng+=j.lng-V.lng,A.symbolData.annotationPosition=5;var Y=SuperMap.Util.cloneObject(A.symbolData),z=L.supermap.plotting.PlottingObject.createSymbol(T,_,U,{symbolData:Y,scaleByMap:this.scaleByMap,minScale:this.minScale,maxScale:this.maxScale,space:0});z.enableEdit=!0,z.ownerGroup=this,this._addComponents(z),this.subObjects.push(z),M++}}this.bounds=this._calculateBounds(),d.lat=this.bounds.getSouth()}if(this.isShowTooltip){this.bounds=new L.LatLngBounds,this.bounds=this._calculateBounds();var G=new L.LatLngBounds(L.latLng(this.bounds.getSouth()-u,this.bounds.getWest()-u),L.latLng(this.bounds.getNorth()+5*u,this.bounds.getEast()+u)),W=[];W.push(L.latLng(G.getNorth(),G.getWest())),W.push(L.latLng(G.getSouth(),G.getEast()));var X=L.latLng(a[0].lat,a[0].lng);X.isFixedPos=!0,W.push(X);var H=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL,W,{serverUrl:this.serverUrl,scaleByMap:this.scaleByMap,minScale:this.minScale,maxScale:this.maxScale});for(var Z in H.enableEdit=!0,H.ownerGroup=this,this.subObjects.splice(0,0,H),this._addComponents(H),this._clearComponents(),this.subObjects)this.subObjects[Z].enableEdit=!0,this.subObjects[Z].ownerGroup=this,this._addComponents(this.subObjects[Z])}}},_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(){Kr.prototype._parseSymbolData.call(this),this.symbolData&&(this.isShowTooltip=this.symbolData.isShowTooltip)},_setSymbolData:function(){Kr.prototype._setSymbolData.call(this),this.symbolData&&(this.symbolData.isShowTooltip=this.isShowTooltip)}});L.supermap.plotting.airDeployment=function(t,e,o,i){return new Qr(t,e,o,i)},L.supermap.plotting.AirDeployment=Qr;var $r=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,o,i){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="避让区域",i.style&&(this.style=SuperMap.Plot.PlottingUtil.cloneObject(i.style)),i&&i.symbolData&&this._parseSymbolData(i.symbolData),L.Util.isArray(o)||(o=[o]),o.length>0&&(this.latLngs=L.Util.isArray(o)?o:[o]),SuperMap.Util.extend(this,i),void 0!==this.uuid&&null!==this.uuid||(this.uuid=SuperMap.Plot.PlottingUtil.generateUuid())},destroy:function(){this.libID=null,this.code=null,this.symbolType=null,this.symbolName=null,this.uuid=null,this.associatedUuid=null,this.minEditPts=null,this.maxEditPts=null,this.latLngs=null,this.components=null},onAdd:function(t){this.layer=t,this._renderer=t._renderer,this._map=t._map,this.redraw(),ir&&(this.dragging||(this.dragging=new ir(this)))},_clearComponents:function(){for(var t=0;t<this.components.length;t++)this.components[t].removeEventParent(this),this.components[t].onRemove(),delete this.components[t];this.components.length=0},_addComponents:function(t){t._map=this._map,t._renderer=this._renderer,t.addEventParent(this),t.onAdd(),this.components.push(t)},_project:function(){var t=this;t._pxBounds=L.bounds(L.point(0,0),L.point(0,0)),t.components.map(function(e){return t._pxBounds.extend(e._pxBounds.min),t._pxBounds.extend(e._pxBounds.max),e})},getBounds:function(){var t=this;return t._bounds=new L.LatLngBounds,t.components.map(function(e){return t._bounds.extend(e.getBounds()),e}),t._bounds},setLatLngs:function(t){return this.latLngs=t,this.redraw()},getLatLngs:function(){return this.latLngs},addLatLng:function(t){if(this.latLngs[this.latLngs.length-1].lat!==t.lat||this.latLngs[this.latLngs.length-1].lng!==t.lng)return this.latLngs.push(t),this.redraw()},redraw:function(){if(this._clearComponents(),this.getLatLngs().length>=this.minEditPts){var 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){var e=new L.Polyline(this.getLatLngs(),{smoothFactor:.05});this._addComponents(e),e.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 o=SuperMap.Number.limitSigDigs,i=o(t.x,14),n=o(t.y,14);function l(t,e,o,i,n){return(i-e)/(n-o)*(t-n)+i}for(var a,s,r,u,p,h,c,y=e.length-1,g=0,f=0;f<y;++f)if(r=o((a=e[f]).x,14),u=o(a.y,14),p=o((s=e[f+1]).x,14),u!==(h=o(s.y,14))){if((c=o(l(n,r,u,p,h),14))===i&&(u<h&&n>=u&&n<=h||u>h&&n<=u&&n>=h)){g=-1;break}c<=i||r!==p&&(c<Math.min(r,p)||c>Math.max(r,p))||(u<h&&n>=u&&n<h||u>h&&n<u&&n>=h)&&++g}else if(n===u&&(r<=p&&i>=r&&i<=p||r>=p&&i<=r&&i>=p)){g=-1;break}return-1===g?1:!!(1&g)},_relationToLayer:function(t){var e=2,o=[];if(t instanceof L.Polygon)(o=L.Util.latLngsToSuperMapPoints(t.getLatLngs()[0])).push(o[0].clone());else if(t instanceof L.Polyline)o=L.Util.latLngsToSuperMapPoints(t.getLatLngs());else if(t instanceof Hs){var i=t.getBounds();o.push(new SuperMap.Geometry.Point(i.left,i.top)),o.push(new SuperMap.Geometry.Point(i.left,i.bottom)),o.push(new SuperMap.Geometry.Point(i.right,i.bottom)),o.push(new SuperMap.Geometry.Point(i.top,i.right))}if(0===o.length)e=2;else{var n=this._containsPoint(o[0]);n&&(e=1);for(var l=1;l<o.length;l++)if(n!==this._containsPoint(o[l])){e=0;break}if(2===e){var a=L.Util.latLngsToSuperMapPoints(this.getLatLngs());a.push(a[0].clone());for(var s=0;s<o.length-1;s++){for(var r=0;r<a.length-1;r++)if(SuperMap.Plot.PlottingUtil.isCross(o[s],o[s+1],a[r],a[r+1])){e=0;break}if(0===e)break}}}return e},_getWithoutPts:function(t,e){var o=L.Util.latLngsToSuperMapPoints(t);!0===e&&o[0].x!==o[o.length-1].x&&o[0].y!==o[o.length-1].y&&o.push(o[0]);for(var i=[],n=[],l=0;l<o.length;l++)if(this._containsPoint(o[l])||n.push(o[l].clone()),l<=o.length-2)for(var a=this._intersectSegs(o[l],o[l+1]),s=0;s<a.length;s++)n.push(a[s].clone()),n.length>1&&(i.push(n),n=[]);0!==n.length&&i.push(n);var r=i.length;if(!0===e&&r>1&&SuperMap.Plot.PlottingUtil.equalFuzzy(i[0][0].x,i[r-1][i[r-1].length-1].x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(i[0][0].y,i[r-1][i[r-1].length-1].y)){for(var u=0;u<i[0].length;u++)i[r-1].push(i[0][u]);i.splice(0,1)}return i},_intersectSegs:function(t,e){var o=L.Util.latLngsToSuperMapPoints(this.getLatLngs());o.push(o[0].clone()),o[0].x!==o[o.length-1].x&&o[0].y!==o[o.length-1].y&&o.push(o[0]);for(var i=[],n=0;n<o.length-1;n++){var l=new SuperMap.Geometry.Point;SuperMap.Plot.PlottingUtil.intersectLineSegs(t,e,o[n],o[n+1],l)&&i.push(l)}for(var a=[];i.length>0;)if(1===i.length)a.push(i[0]),i.splice(0,1);else{for(var s=0,r=SuperMap.Plot.PlottingUtil.distance(t,i[0]),u=1;u<i.length;u++)SuperMap.Plot.PlottingUtil.distance(t,i[u])<r&&(r=SuperMap.Plot.PlottingUtil.distance(t,i[u]),s=u);a.push(i[s]),i.splice(s,1)}return a}});L.supermap.plotting.avoidRegion=function(t,e,o,i){return new $r(t,e,o,i)},L.supermap.plotting.AvoidRegion=$r;var tu=nr.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,o,i){this.symbolName="标牌文字",this.symbolType=SuperMap.Plot.SymbolType.LITERATESIGN,nr.prototype.initialize.call(this,t,e,o,i)},destroy:function(){this.space=null,this.inner=null,this.textAnchor=null,nr.prototype.destroy.call(this)},_calculateParts:function(){if(null!==this.startRouteNode&&null!==this.towardNode&&null!==this.towardNode.textContent&&0!==this.towardNode.textContent.length){for(var t=this.route._getNodeByUuid(this.towardNode.routeNodeId),e=new SuperMap.Geometry.Point(this.startRouteNode.x,this.startRouteNode.y),o=new SuperMap.Geometry.Point(t.x,t.y),i=L.latLng((e.y+o.y)/2,(e.x+o.x)/2),n=SuperMap.Plot.PlottingUtil.getTextCount(this.towardNode.textContent[0]),l=1;l<this.towardNode.textContent.length;l++){var a=SuperMap.Plot.PlottingUtil.getTextCount(this.towardNode.textContent[l]);n<a&&(n=a)}if(null===this.towardNode.offsetX||null===this.towardNode.offsetY){var s=this.space+(this.dScale*this.style.fontSize+1)*n/2,r=this._innerOutlineDir(),u=this._map.layerPointToLatLng(L.point(0,0)),p=this._map.layerPointToLatLng(L.point(s,0)),h=new SuperMap.Geometry.Point(u.lng,u.lat),c=new SuperMap.Geometry.Point(p.lng,p.lat),y=r*SuperMap.Plot.PlottingUtil.distance(h,c);!0===this.inner&&(y=-y);var g=SuperMap.Plot.PlottingUtil.parallel([e,o],y);this.latLngs=[];var f=L.latLng((g[0].y+g[1].y)/2,(g[0].x+g[1].x)/2);this.latLngs.push(f);var P=this._map.latLngToLayerPoint(i),d=this._map.latLngToLayerPoint(f);this.towardNode.offsetX=d.x-P.x,this.towardNode.offsetY=d.y-P.y}else{var S=this._map.latLngToLayerPoint(i),m=L.point(S.x+this.towardNode.offsetX,S.y+this.towardNode.offsetY),b=this._map.layerPointToLatLng(m);0===this.latLngs.length?this.latLngs.push(b):this.latLngs[0]=b}var M=180*SuperMap.Plot.PlottingUtil.radian(e,o)/Math.PI,v=this._getTextContentsCells(n),A="";null!==this._map&&this._map instanceof L.Map&&(A=this._map.options.crs.code);for(var T=0;T<v.length;T++){var _=v[T];L.Util.isMercatorProjection(A)&&(_.positionPoints=L.Util.conventProjectPts(L.Util.superMapPointsToLatLngs(_.positionPoints))),_.positionPoints=SuperMap.Plot.Primitives.getSpatialData(_.type,_.positionPoints,_.angle);for(var O=[],x=0;x<_.positionPoints.length;x++)O.push(SuperMap.Plot.PlottingUtil.coordinateTrans(new SuperMap.Geometry.Point(this.latLngs[0].lng,this.latLngs[0].lat),_.positionPoints[x],M));var w=null;if(L.Util.isMercatorProjection(A)){for(var E=[],C=0,I=(w=L.Util.unConventProjectPts(O)).length;C<I;C++)E.push(SuperMap.Plot.PlottingUtil.coordinateTrans(new SuperMap.Geometry.Point(this.latLngs[0].lng,this.latLngs[0].lat),L.Util.latLngsToSuperMapPoints(w[C])[0],0));w=L.Util.superMapPointsToLatLngs(E)}else w=L.Util.superMapPointsToLatLngs(O);_.type===SuperMap.Plot.SymbolType.TEXTSYMBOL?0!==_.textContent.length&&(_.style.labelRotation=90-M,this._createAndDrawLayer(SuperMap.Plot.SymbolType.TEXTSYMBOL,w,_.style,_.textContent)):this._createAndDrawLayer(_.type,w,_.style,_.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 o in this.components)L.Util.moveLatLngs(this.components[o].getLatLngs(),t,e),this.components[o].setLatLngs(this.components[o].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),o=this._map.latLngToLayerPoint(e),i=this._map.latLngToLayerPoint(this.latLngs[0]);this.towardNode.offsetX=i.x-o.x,this.towardNode.offsetY=i.y-o.y},_getTextContentsCells:function(t){var e=this.towardNode.textContent,o=this.dScale*this.style.fontSize+1,i=this._map.layerPointToLatLng(L.point(0,0)),n=this._map.layerPointToLatLng(L.point(o,0)),l=SuperMap.Plot.PlottingUtil.distance({x:i.lng,y:i.lat},{x:n.lng,y:n.lat}),a=l,s=l*t,r=e.length+2,u=[],p=r*a*.5,h=new Object;h.type=SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,h.positionPoints=[],h.positionPoints.push(new SuperMap.Geometry.Point(p,0)),h.positionPoints.push(new SuperMap.Geometry.Point(-2*a+p,.5*s)),h.positionPoints.push(new SuperMap.Geometry.Point(-r*a+p,.5*s)),h.positionPoints.push(new SuperMap.Geometry.Point(-r*a+p,-.5*s)),h.positionPoints.push(new SuperMap.Geometry.Point(-2*a+p,-.5*s)),h.style={surroundLineFlag:!1,fontSize:12},u.push(h);for(var c=1;c<=e.length;c++){var y=new Object;y.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,y.positionPoints=[],y.positionPoints.push(new SuperMap.Geometry.Point(-(c+1)*a+p,.5*s)),y.positionPoints.push(new SuperMap.Geometry.Point(-(c+1)*a+p,-.5*s)),y.style={surroundLineFlag:!1,fontSize:12},u.push(y);var g=new Object;g.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,g.positionPoints=[],g.positionPoints.push(new SuperMap.Geometry.Point(-(.5+c+1)*a+p,0)),g.textContent=e[c-1],g.style={surroundLineFlag:!1,fontSize:12,fontFamily:"Microsoft YaHei"},g.style.labelAlign="cm",u.push(g)}var f=new SuperMap.Geometry.Point(-1.4*a+p,0),P=new Object;P.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,P.positionPoints=[],P.positionPoints.push(f),P.textContent=this.towardNode.index.toString(),P.style={surroundLineFlag:!1,fontSize:12,fontSizeLimit:!0,fontFamily:"Microsoft YaHei"},P.style.labelAlign="cm",u.push(P);var d=new Object;return d.type=SuperMap.Plot.SymbolType.CIRCLESYMBOL,d.positionPoints=[],d.positionPoints.push(f),d.positionPoints.push(new SuperMap.Geometry.Point(f.x,.4*a)),d.style={surroundLineFlag:!1,fontSize:12},u.push(d),u}});L.supermap.plotting.literateSign=function(t,e,o,i){return new tu(t,e,o,i)},L.supermap.plotting.LiterateSign=tu;var eu=lr.extend({relLineText:0,showPathLine:!0,showPathLineArrow:!1,isCurve:!1,isAvoid:!1,textToLineDistance:0,fontSpace:0,getRelLineText:function(){return this.relLineText},setRelLineText:function(t){this.relLineText!==t&&(this.relLineText=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},setFontSpace:function(t){this.fontSpace!==t&&(this.fontSpace=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getShowPathLine:function(){return this.showPathLine},setShowPathLine:function(t){this.showPathLine!==t&&(this.showPathLine=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getShowPathLineArrow:function(){return this.showPathLineArrow},setShowPathLineArrow:function(t){this.showPathLineArrow!==t&&(this.showPathLineArrow=t,this.showPathLine&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},getIsCurveLine:function(){return this.isCurve},setCurveLine:function(t){this.isCurve!==t&&(this.isCurve=t,this.showPathLine&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},getIsAvoidLine:function(){return this.isAvoid},setAvoidLine:function(t){this.isAvoid!==t&&(this.isAvoid=t,this.relLineText===SuperMap.Plot.RelLineText.ONLINE&&this.showPathLine&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},getSpace:function(){return this.textToLineDistance},setSpace:function(t){this.textToLineDistance!==t&&(this.textToLineDistance=t,this.relLineText!==SuperMap.Plot.RelLineText.ONLINE&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},initialize:function(t,e,o,i){this.code=SuperMap.Plot.SymbolType.PATHTEXT,this.libID=0,this.symbolType=SuperMap.Plot.SymbolType.PATHTEXT,this.symbolName="沿线注记",this.minEditPts=2,this.maxEditPts=9999,i.scaleByMap=!1,lr.prototype.initialize.call(this,t,e,o,i)},_reView:function(){this.fromZoom!==this._map.getZoom()&&(this.redraw(),this.fromZoom=this._map.getZoom())},toSuperMapAlgorithms:function(){lr.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,o,i){return new eu(t,e,o,i)},L.supermap.plotting.PathText=eu;var ou=nr.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(var o=0;o<this.route.routeNodes.length;o++)this.route.routeNodes[o].routeNodeId===this.routeNode.id&&(this.route.routeNodes[o].x=this.routeNode.x,this.route.routeNodes[o].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 n=this.route._getFeatureStartWith(this.routeNode),l=0;l<n.length;l++)n[l]instanceof tu||(n[l].latLngs[0]=L.latLng(t,e)),n[l].redraw();for(var a=this.route._getFeatureEndWith(this.routeNode),s=0;s<a.length;s++)a[s]instanceof tu||(a[s].latLngs[1]=L.latLng(t,e)),a[s].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,o,i){nr.prototype.initialize.call(this,t,e,o,i),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,nr.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 o=SuperMap.Plot.RouteNodePrimitives.getRouteNodeCells(this.routeNode.type);this._transformSymbolCellsToGeometrys(o)}if(this.routeNode.style=this.style,null!==this.routeNode.name&&""!==this.routeNode.name){var i=this.getBounds(),n=L.latLng(i.getNorth(),i.getEast()),l=this.routeNode.style;l.labelAlign="lb",this._createAndDrawLayer(SuperMap.Plot.SymbolType.TEXTSYMBOL,[n],l,this.routeNode.name).isNameLayer=!0}}},_transformSymbolCellsToGeometrys:function(t){for(var e=this._map.latLngToLayerPoint(this.latLngs[0]),o=0;o<t.length;o++){var i=t[o];i.type===SuperMap.Plot.SymbolType.TEXTSYMBOL&&(i.style.fontSize=this.dScale*i.style.fontSize,i.style.labelRotation+=-this.dRotate);for(var n=0;n<i.positionPoints.length;n++){i.positionPoints[n].x=i.positionPoints[n].x*this.dScale,i.positionPoints[n].y=i.positionPoints[n].y*this.dScale;var l=this.dRotate*(Math.PI/180);SuperMap.Plot.PlottingUtil.rotateAngle({x:this.anchorPoint.lng,y:this.anchorPoint.lat},l,i.positionPoints[n]),i.positionPoints[n]=this._transitionPoint(i.positionPoints[n],e)}i.positionPoints=L.Util.latLngsToSuperMapPoints(i.positionPoints)}this._transSymbolCellsToLayers(t)},_transitionPoint:function(t,e){var o=e.x+t.x*(96/254),i=e.y-t.y*(96/254);return this._map.layerPointToLatLng(L.point(o,i))},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 o=this.components[e];o.isNameLayer||t.extend(o.getBounds?o.getBounds():o.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,o,i){return new ou(t,e,o,i)},L.supermap.plotting.RouteNode=ou;var iu=Qs.extend({routeNodes:[],nextRouteNodeType:SuperMap.Plot.RouteNodeType.TURNING,arrRoutePts:[],initialize:function(t,e,o,i){this.scaleByMap=!1,this.minEditPts=1,this.maxEditPts=9999,this.routeNodes=[],this.arrRoutePts=[],this.prevRouteNode=[],this.prevLiterateSign=[],Qs.prototype.initialize.call(this,t,e,o,i)},destroy:function(){this.routeNodes=null,this.arrRoutePts=null,Qs.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 lr){var o=SuperMap.Util.copyAttributes(this.components[e].style,t);this.components[e].setStyle(o)}},unhighlight:function(){for(var t in this.components)if(this.components[t]instanceof lr){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,o,i){void 0===o&&(o=2),void 0===t&&(t={color:"#ff0000"}),void 0===e&&(e={color:"#0000ff"}),void 0===i&&(i=300);for(var n=[],l=0;l<o;l++)n.push(t),n.push(e);!0===this.highlightFlag&&this.highlightStyle&&null!==this.highlightStyle?n.push(this.highlightStyle):n.push(this.lineStyle);for(var a=this,s=n.length,r=0;r<s;r++)setTimeout(function(){for(var t in a.components)if(a.components[t]instanceof lr){var e=SuperMap.Util.copyAttributes(a.components[t].style,n[0]);a.components[t].setStyle(e)}n.splice(0,1)},i*r)},applyTextStyle:function(t){var e;for(var o in this.components)(this.components[o]instanceof tu||this.components[o]instanceof eu)&&(this.components[o].setStyle(SuperMap.Util.copyAttributes(this.components[o].style,t)),e=this.components[o].style);for(var i=0;i<this.routeNodes.length;i++)for(var n=0;n<this.routeNodes[i].towardNodes.length;n++)this.routeNodes[i].towardNodes[n].style=SuperMap.Util.copyAttributes(this.routeNodes[i].towardNodes[n].style,e)},applyLineStyle:function(t){for(var e in this.components)this.components[e]instanceof tu||this.components[e]instanceof eu||this.components[e]instanceof ou||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 ou&&this.components[e].setStyle(SuperMap.Util.copyAttributes(this.components[e].style,t));for(var o=0;o<this.routeNodes.length;o++)this.routeNodes[o].style=SuperMap.Util.copyAttributes(this.routeNodes[o].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(var o=0;o<this.routeNodes.length;o++)for(var i=0;i<this.routeNodes[o].towardNodes.length;i++)if(this.routeNodes[o].towardNodes[i].routeNodeId!==t.id);else{this.routeNodes[o].towardNodes.splice(i,1);for(var n=0;n<t.towardNodes.length;n++)t.towardNodes[n].routeNodeId!==this.routeNodes[o].id&&this.routeNodes[o].towardNodes.push(t.towardNodes[n])}for(var l=0;l<this.routeNodes.length;l++)this.routeNodes[l].id===t.id&&this.routeNodes.splice(l,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 o=SuperMap.Util.cloneObject(this.highlightStyle);this.highlightStyle&&SuperMap.Util.copyAttributes(o,this.highlightStyle),this.highlight(o)}}else{var i=this._getNodeFeature(t);if(null!==i){i.routeNode=t,i.redraw();for(var n=this._getFeatureStartWith(t),l=0;l<n.length;l++)n[l].latLngs[0]=L.latLng(t.y,t.x),n[l].redraw();for(var a=this._getFeatureEndWith(t),s=0;s<a.length;s++)a[s].latLngs[1]=L.latLng(t.y,t.x),a[s].redraw();return}}},insertRouteNode:function(t,e,o,i,n,l,a,s){if(void 0===i&&(i=!0),this.arrRoutePts=[],i&&o)for(var r=0;r<e.towardNodes.length;r++)e.towardNodes[r].routeNodeId===o.id&&e.towardNodes.splice(r,1);if(null===this._getNodeByUuid(t.id)&&this.routeNodes.push(t),e){for(var u=!1,p=0;p<e.towardNodes.length;p++)e.towardNodes[p].routeNodeId===t.id&&(u=!0);if(!1===u){var h=new SuperMap.Plot.TowardNode;h.routeNodeId=t.id,void 0!==n&&(h.textContent=n),void 0!==l&&(h.relLineText=l),e.towardNodes.push(h)}}if(o){for(var c=!1,y=0;y<t.towardNodes.length;y++)t.towardNodes[y].routeNodeId===o.id&&(c=!0);if(!1===c){var g=new SuperMap.Plot.TowardNode;g.routeNodeId=o.id,void 0!==a&&(g.textContent=a),void 0!==s&&(g.relLineText=s),t.towardNodes.push(g)}}this.redraw()},addRouteNode:function(t,e,o,i){if(null===this._getNodeByUuid(t.id)&&(this.arrRoutePts=[],this.routeNodes.push(t)),e){for(var n=!1,l=0;l<e.towardNodes.length;l++)e.towardNodes[l].routeNodeId===t.id&&(n=!0);if(!1===n){var a=new SuperMap.Plot.TowardNode;a.routeNodeId=t.id,void 0!==o&&(a.textContent=o),void 0!==i&&(a.relLineText=i),e.towardNodes.push(a)}}this.redraw()},_addRouteNodeByNode:function(t,e,o){if(null===this._getNodeByUuid(t.id))return null;var i=new SuperMap.Plot.RouteNode;if(i.x=t.x,i.y=t.y,i.name="",i.type=this.nextRouteNodeType,!0===e){var n=new SuperMap.Plot.TowardNode;n.routeNodeId=t.id,i.towardNodes.push(n)}else if(!0===o){var l=new SuperMap.Plot.TowardNode;l.routeNodeId=i.id,t.towardNodes.push(l)}return this.routeNodes.push(i),this.redraw(),this._getNodeFeature(i)},_addRouteNodeByPosWithoutLast:function(t,e){for(var o=0;o<this.routeNodes.length;o++){var i=this.routeNodes[o];if(null!==i&&(i.towardNodes&&null!==i.towardNodes))for(var n=0;n<i.towardNodes.length;n++){var l=this._getNodeByUuid(i.towardNodes[n].routeNodeId);if(null!==l){var a=SuperMap.Plot.PlottingUtil.computePointToLineMinDis({x:t.lng,y:t.lat},[{x:i.x,y:i.y},{x:l.x,y:l.y}]);if(-1!==a.index&&a.minDis<e){var s=new SuperMap.Plot.RouteNode;s.x=t.lng,s.y=t.lat,s.type=this.nextRouteNodeType,s.name="",s.towardNodes.push(i.towardNodes[n]),i.towardNodes.splice(n,1);var r=new SuperMap.Plot.TowardNode;return r.routeNodeId=s.id,i.towardNodes.push(r),this.arrRoutePts=[],this.routeNodes.push(s),this.redraw(),this._getNodeFeature(s)}}}}return null},_addRouteNodeByPos:function(t,e){for(var o=[],i=0;i<this.routeNodes.length;i++){var n=this.routeNodes[i];if(null!==n&&(n.towardNodes&&null!==n.towardNodes)){0===n.towardNodes.length&&o.push(n);for(var l=0;l<n.towardNodes.length;l++){var a=this._getNodeByUuid(n.towardNodes[l].routeNodeId);if(null!==a){var s=SuperMap.Plot.PlottingUtil.computePointToLineMinDis({x:t.lng,y:t.lat},[{x:n.x,y:n.y},{x:a.x,y:a.y}]);if(-1!==s.index&&s.minDis<e){var r=new SuperMap.Plot.RouteNode;r.x=t.lng,r.y=t.lat,r.type=this.nextRouteNodeType,r.name=(this.routeNodes.length+1).toString(),r.towardNodes.push(n.towardNodes[l]),n.towardNodes.splice(l,1);var u=new SuperMap.Plot.TowardNode;return u.routeNodeId=r.id,n.towardNodes.push(u),this.arrRoutePts=[],this.routeNodes.push(r),void this.redraw()}}}}}var p=new SuperMap.Plot.RouteNode;if(p.x=t.lng,p.y=t.lat,0!==this.routeNodes.length?p.type=this.nextRouteNodeType:p.type=SuperMap.Plot.RouteNodeType.AIMING,p.name=(this.routeNodes.length+1).toString(),0!==o.length){var h=new SuperMap.Plot.TowardNode;h.routeNodeId=p.id,o[0].towardNodes.push(h)}this.routeNodes.push(p),this.redraw()},setNextRouteNodeType:function(t){this.nextRouteNodeType=t},_getNodeFeature:function(t){for(var e in this.components)if(this.components[e]instanceof ou&&this.components[e].routeNode.id===t.id)return this.components[e];return null},_getFeatureStartWith:function(t){var e=[];for(var o in this.components)this.components[o]._startRouteNode&&this.components[o]._startRouteNode===t.id&&e.push(this.components[o]);return e},_getFeatureEndWith:function(t){var e=[];for(var o in this.components)this.components[o]._endRouteNode&&this.components[o]._endRouteNode===t.id&&e.push(this.components[o]);return e},_selectNodeLayer:function(t){for(var e in L.Util.isArray(t)||(t=[t]),this.components)if((this.components[e]instanceof ou||this.components[e]instanceof tu)&&this.components[e].getBounds().contains(t))return this.components[e];return null},redraw:function(){if(this._initRoute(),this.arrRoutePts&&0!==this.arrRoutePts.length)for(var t=0;t<this.arrRoutePts.length;t++){var e=this.arrRoutePts[t];if(!(e.length<2)){var o=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.POLYLINESYMBOL,e,{enableEdit:!1,scaleByMap:!1},this.style);o.route=this,this._addComponents(o)}}for(var i=0;i<this.routeNodes.length;i++){var n=this.routeNodes[i];if(null!==n&&(n.towardNodes&&null!==n.towardNodes)){for(var l=0;l<n.towardNodes.length;l++){var a=this._getNodeByUuid(n.towardNodes[l].routeNodeId);if(null!==a){var s=[];if(s.push(L.latLng(n.y,n.x)),s.push(L.latLng(a.y,a.x)),0===this.arrRoutePts.length){var r=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.POLYLINESYMBOL,s,{enableEdit:!1,scaleByMap:!1},this.style);this._addComponents(r),r._startRouteNode=n.id,r._endRouteNode=a.id}var u=n.towardNodes[l].textContent;if(null!==u){var p=n.towardNodes[l].relLineText;void 0!==p&&null!==p||(p=SuperMap.Plot.RelLineText.ONLEFTLINE);var h=SuperMap.Util.copyAttributes(SuperMap.Plot.PlottingUtil.cloneObject(this.style),n.towardNodes[l].style),c=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.PATHTEXT,s,{relLineText:p,showPathLine:!1,textContent:u,enableEdit:!1,scaleByMap:!1},h);this._addComponents(c),c._startRouteNode=n.id,c._endRouteNode=a.id}}}this._createRouteNode(n)}}this._finishRoute()},_initRoute:function(){this.prevRouteNode.length=0,this.prevLiterateSign.length=0;for(var t=0;t<this.components.length;t++)this.components[t]instanceof ou?this.prevRouteNode.push(this.components[t]):this.components[t]instanceof tu?this.prevLiterateSign.push(this.components[t]):this.components[t]._clearComponents();this.components.length=0},_finishRoute:function(){for(var t=0;t<this.prevRouteNode.length;t++)this.prevRouteNode[t]._clearComponents();for(var e=0;e<this.prevLiterateSign.length;e++)this.prevLiterateSign[e]._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 o=SuperMap.Util.copyAttributes(SuperMap.Plot.PlottingUtil.cloneObject(this.style),t.style),i=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.ROUTENODE,[L.latLng(t.y,t.x)],{routeNode:t,route:this},o);this._addComponents(i)}},_addComponents:function(t){$s.prototype._addComponents.call(this,t)},_clearComponents:function(){$s.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(Qs.prototype._parseSymbolData.call(this),this.symbolData){this.routeNodes=this.symbolData.routeNodes,this.routeNodes=[];for(var t=0;t<this.symbolData.routeNodes.length;t++){var e=new SuperMap.Plot.RouteNode;null===this.symbolData.routeNodes[t].id&&void 0===this.symbolData.routeNodes[t].id||(e.id=this.symbolData.routeNodes[t].id),e.type=this.symbolData.routeNodes[t].type,e.name=this.symbolData.routeNodes[t].name,e.rotate=this.symbolData.routeNodes[t].rotate,Object.prototype.hasOwnProperty.call(this.symbolData.routeNodes[t],"positionPoint")?(e.x=this.symbolData.routeNodes[t].positionPoint.x,e.y=this.symbolData.routeNodes[t].positionPoint.y):(e.x=this.symbolData.routeNodes[t].x,e.y=this.symbolData.routeNodes[t].y),e.towardNodes=[];for(var o=0;o<this.symbolData.routeNodes[t].towardNodes.length;o++){var i=new SuperMap.Plot.TowardNode;i.routeNodeId=this.symbolData.routeNodes[t].towardNodes[o].routeNodeId,i.relLineText=this.symbolData.routeNodes[t].towardNodes[o].relLineText,i.textContent=this.symbolData.routeNodes[t].towardNodes[o].textContent,i.offsetX=this.symbolData.routeNodes[t].towardNodes[o].offsetX,i.offsetY=this.symbolData.routeNodes[t].towardNodes[o].offsetY,i.style=this.symbolData.routeNodes[t].towardNodes[o].style,e.towardNodes.push(i)}e.style=this.symbolData.routeNodes[t].style,this.routeNodes.push(e)}this.arrRoutePts=[];for(var n=0;n<this.symbolData.arrRoutePts.length;n++){for(var l=[],a=0;a<this.symbolData.arrRoutePts[n].length;a++)Object.prototype.hasOwnProperty.call(this.symbolData.arrRoutePts[n][a],"x")&&Object.prototype.hasOwnProperty.call(this.symbolData.arrRoutePts[n][a],"y")?l.push(L.latLng(this.symbolData.arrRoutePts[n][a].y,this.symbolData.arrRoutePts[n][a].x)):l.push(L.latLng(this.symbolData.arrRoutePts[n][a].lat,this.symbolData.arrRoutePts[n][a].lng));this.arrRoutePts.push(l)}this.lineStyle=this.symbolData.lineStyle}},_setSymbolData:function(){Qs.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=iu;var nu=iu.extend({space:null,inner:null,initialize:function(t,e,o,i){iu.prototype.initialize.call(this,t,e,o,i),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,iu.prototype.destroy.call(this)},redraw:function(){if(this._initRoute(),void 0!==this.arrRoutePts&&null!==this.arrRoutePts)for(var t=0;t<this.arrRoutePts.length;t++){var e=this.arrRoutePts[t];if(SuperMap.Util.isArray(e)&&!(e.length<2)){var o=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.POLYLINESYMBOL,e,{serverUrl:this.serverUrl,enableEdit:!1,scaleByMap:!1});this._addComponents(o)}}for(var i=0;i<this.routeNodes.length;i++){var n=this.routeNodes[i];if(null!==n&&(n.towardNodes&&null!==n.towardNodes)){for(var l=0;l<n.towardNodes.length;l++)if(n.towardNodes[l]instanceof SuperMap.Plot.TowardNode){var a=this._getNodeByUuid(n.towardNodes[l].routeNodeId);if(null!==a){if(0===this.arrRoutePts.length){var s=[];s.push(L.latLng(n.y,n.x)),s.push(L.latLng(a.y,a.x));var r=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.POLYLINESYMBOL,s,{enableEdit:!1,scaleByMap:!1});this._addComponents(r),r._startRouteNode=n.id,r._endRouteNode=a.id}this._createLiterateSign(n,n.towardNodes[l])}}this._createRouteNode(n)}}this._finishRoute()},_createLiterateSign:function(t,e){for(var o=0;o<this.prevLiterateSign.length;){if(this.prevLiterateSign[o]._startRouteNode===t.id&&this.prevLiterateSign[o]._endRouteNode===e.routeNodeId)return this.prevLiterateSign[o].startRouteNode=t,this.prevLiterateSign[o].towardNode=e,this.prevLiterateSign[o].redraw(),this.components.push(this.prevLiterateSign[o]),void this.prevLiterateSign.splice(o,1);o++}if(null!==e.textContent&&0!==e.textContent.length){var i=SuperMap.Util.copyAttributes(SuperMap.Plot.PlottingUtil.cloneObject(this.style),e.style),n=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.LITERATESIGN,null,{startRouteNode:t,towardNode:e,route:this,inner:this.inner,space:this.space,scaleByMap:!1},i);this._addComponents(n),n._startRouteNode=t.id,n._endRouteNode=e.routeNodeId}}});L.supermap.plotting.airRoute=function(t,e,o,i){return new nu(t,e,o,i)},L.supermap.plotting.AirRoute=nu;var lu=iu.extend({initialize:function(t,e,o,i){this.libID=0,this.code=SuperMap.Plot.SymbolType.MISSILEROUTE,this.symbolType=SuperMap.Plot.SymbolType.MISSILEROUTE,this.symbolName="导弹航线",iu.prototype.initialize.call(this,t,e,o,i)}});L.supermap.plotting.missileRoute=function(t,e,o,i){return new lu(t,e,o,i)},L.supermap.plotting.MissileRoute=lu;var au=iu.extend({initialize:function(t,e,o,i){this.libID=0,this.code=SuperMap.Plot.SymbolType.NAVYROUTE,this.symbolType=SuperMap.Plot.SymbolType.NAVYROUTE,this.symbolName="海军航线",iu.prototype.initialize.call(this,t,e,o,i)}});L.supermap.plotting.navyRoute=function(t,e,o,i){return new au(t,e,o,i)},L.supermap.plotting.NavyRoute=au;var su=lr.extend({initialize:function(t,e,o,i){this.code=SuperMap.Plot.SymbolType.FREECURVE,this.libID=0,this.symbolType=SuperMap.Plot.SymbolType.FREECURVE,this.symbolName="自由曲线",this.minEditPts=2,this.maxEditPts=9999,lr.prototype.initialize.call(this,t,e,o,i)},destroy:function(){lr.prototype.destroy.apply(this,arguments)},_calculateParts:function(){null!==this.getLatLngs()&&this.getLatLngs().length>=this.minEditPts&&this._createAndDrawLayer(24,this.latLngs,this.style,"")},move:function(t,e){L.Util.moveLatLngs(this.getLatLngs(),t,e);for(var o=0,i=this.avoidRegions.length;o<i;o++)this.avoidRegions[o].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 o=0,i=this.avoidRegions.length;o<i;o++)this.avoidRegions[o].rotate(this.dRotate,this.anchorPoint)}});L.supermap.plotting.freeCurve=function(t,e,o,i){return new su(t,e,o,i)},L.supermap.plotting.FreeCurve=su;var ru=nr.extend({initialize:function(t,e,o,i){nr.prototype.initialize.call(this,t,e,o,i),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(){nr.prototype.destroy.apply(this,arguments)},_calculateParts:function(){null!==this.getLatLngs()&&this.getLatLngs().length>=this.minEditPts&&(this.scaleByMap=!0,this._createAndDrawLayer(32,this.latLngs,this.style,""))},move:function(t,e){L.Util.moveLatLngs(this.getLatLngs(),t,e);for(var o=0,i=this.avoidRegions.length;o<i;o++)this.avoidRegions[o].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 o=0,i=this.avoidRegions.length;o<i;o++)this.avoidRegions[o].rotate(this.dRotate,this.anchorPoint)},_reView:function(){}});L.supermap.plotting.interferenceBeam=function(t,e,o,i){return new ru(t,e,o,i)},L.supermap.plotting.InterferenceBeam=ru;var uu=nr.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,o,i){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=[]),nr.prototype.initialize.call(this,t,e,o,i),this.scaleByMap=!0},_calculateParts:function(){if(null!==this.orbitPoints&&this.visible){if(null===this.latLngs||0===this.latLngs.length)this.latLngs=L.Util.superMapPointsToLatLngs(this.orbitPoints);else for(var t=0,e=this.latLngs.length;t<e;t++)this.orbitPoints[t].x=this.latLngs[t].lng,this.orbitPoints[t].y=this.latLngs[t].lat;this.scaleByMap=!0,this._createAndDrawLayer(24,L.Util.cloneLatLngs(this.latLngs),this.style,"")}0===this.scaleValues.length&&this.scaleValues.push(.5);var o=L.Util.latLngsToSuperMapPoints(this.latLngs),i=SuperMap.Plot.PlottingUtil.polylineDistance(o),n=SuperMap.Plot.PlottingUtil.findPointInPolyLine(o,i*this.scaleValues[0]).pt.clone(),l=Math.floor(this.orbitPoints.length/2),a=new SuperMap.Geometry.Point(this.orbitPoints[l].x,this.orbitPoints[l].y),s=SuperMap.Plot.PlottingUtil.radian(a,new SuperMap.Geometry.Point(this.orbitPoints[l-1].x,this.orbitPoints[l-1].y));this.subSymbols[0].symbolData.dRotate=180*s/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},u=SuperMap.Plot.PlottingUtil.cloneObject(this.style),p=L.supermap.plotting.PlottingObject.createSymbol(this.subSymbols[0].libID,this.subSymbols[0].code,[new L.latLng(n.y,n.x)],r,u);p.minScale=this.minScale,p.maxScale=this.maxScale,this._addComponents(p),p.isEdit=!0,this.scalePoints=[];var h=new L.latLng(n.y,n.x);h.isScalePoint=!0,h.tag=0,this.scalePoints.push(h)},move:function(t,e){L.Util.moveLatLngs(this.getLatLngs(),t,e);for(var o=0,i=this.orbitPoints.length;o<i;o++)this.orbitPoints[o].x+=e,this.orbitPoints[o].y+=t;for(var n=0,l=this.timeWindows.length;n<l;n++){var a=this.timeWindows[n];null!==a&&a.redraw()}if(0!==this.avoidRegions.length)for(var s=0,r=this.avoidRegions.length;s<r;s++)L.Util.moveLatLngs(this.avoidRegions[s].getLatLngs(),t,e);if(!1===this.visible)for(var u=0;u<this.components.length;u++)this.components[u].symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&this.components[u].move(t,e);else this.redraw()},_resizeLatLngs:function(t,e,o,i){nr.prototype._resizeLatLngs.call(this,t,e,o,i);for(var n=0,l=this.orbitPoints.length;n<l;n++)this.orbitPoints[n].x=this.latLngs[n].lng,this.orbitPoints[n].y=this.latLngs[n].lat;for(var a=0,s=this.timeWindows.length;a<s;a++){var r=this.timeWindows[a];null!==r&&r.redraw()}},setRotate:function(t){this.dRotate=t,null===this.anchorPoint&&(this.anchorPoint=this.getBounds().getCenter());for(var e=0,o=this.avoidRegions.length;e<o;e++)this.avoidRegions[e].rotate(t,this.anchorPoint);nr.prototype._rotate.call(this,t,this.anchorPoint);for(var i=0,n=this.orbitPoints.length;i<n;i++)this.orbitPoints[i].x=this.latLngs[i].lng,this.orbitPoints[i].y=this.latLngs[i].lat;for(var l=0;l<this.timeWindows.length;l++){var a=this.timeWindows[l];null!==a&&a.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 o=L.Util.latLngsToSuperMapPoints(this.getLatLngs()),i=L.Util.latLngsToSuperMapPoints(e),n=SuperMap.Plot.PlottingUtil.clonePoints(o);if((n=SuperMap.Plot.PlottingUtil.clearSamePts(n)).length<this.minEditPts)return;var l=SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(n);l=SuperMap.Plot.PlottingUtil.clearSamePts(l);for(var a,s=SuperMap.Plot.PlottingUtil.polylineDistance(l),r=SuperMap.Plot.PlottingUtil.distance(l[0],i[0]),u=0;u<l.length;u++)r>SuperMap.Plot.PlottingUtil.distance(l[u],i[0])&&(r=SuperMap.Plot.PlottingUtil.distance(l[u],i[0]),a=u);var p=0;0===a&&(a=1);for(var h=0;h<a;h++)p+=SuperMap.Plot.PlottingUtil.distance(l[h],l[h+1]);this.scaleValues[0]=p/s}this.redraw()}});L.supermap.plotting.satellite=function(t,e,o,i){return new uu(t,e,o,i)},L.supermap.plotting.Satellite=uu;var pu=nr.extend({timeWindows:[],initialize:function(t,e,o,i){this.libID=0,this.code=SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS,this.symbolType=SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS,this.symbolName="卫星时间窗",nr.prototype.initialize.call(this,t,e,o,i),this.scaleValues||(this.scaleValues=[]),this.scaleByMap=!0},_calculateParts:function(){if(this.associatedUuid){var t=this._map.getFeatureByUuid(this.associatedUuid);if(null===t||null===t.orbitPoints)return}for(var e=!1,o=0;o<t.timeWindows.length;o++)if(this===t.timeWindows[o]){e=!0;break}if(e||t.timeWindows.push(this),this.type)for(var i=0;i<this.timeWindows.length;i++)this.timeWindows[i].type=this.type;if(this.scalePoints=[],null!==this.timeWindows)for(var n=t.orbitPoints,l=0;l<this.timeWindows.length;l++){var a,s;if("number"===this.timeWindows[l].type){for(var r=0,u=n.length;r<u;r++)if(this.timeWindows[l].startOrbitPoint===n[r].number&&(a=r),this.timeWindows[l].endOrbitPoint===n[r].number){s=r;break}}else if("Time"===this.timeWindows[l].type)for(var p=0;p<n.length;p++)if(this.timeWindows[l].startOrbitPoint===n[p].time&&(a=p),this.timeWindows[l].endOrbitPoint===n[p].time){s=p;break}for(var h=[],c=a;c<=s;c++)h.push(new L.latLng(n[c].y,n[c].x));h.length>1&&(this.scaleByMap=!0,this._createAndDrawLayer(24,h,{surroundLineFlag:!1,lineWidthLimit:!0,weight:4*t.style.weight+this.style.weight}),h[0].isScalePoint=!0,h[0].tag=2*l,this.scalePoints.push(h[0]),h[h.length-1].isScalePoint=!0,h[h.length-1].tag=2*l+1,this.scalePoints.push(h[h.length-1]))}},calculateBounds:function(){this.bounds=null;var t=new L.Bounds,e=this.components;if(e)for(var o=0;o<e.length;o++)t.extend(e[o].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 o=this._map.getFeatureByUuid(this.associatedUuid);if(!o)return;var i=o.getLatLngs(),n=o.orbitPoints,l=L.Util.latLngsToSuperMapPoints(e),a=L.Util.latLngsToSuperMapPoints(i);if(t%2==0){var s;t/=2,s=this.timeWindows[t].endOrbitPoint-this.timeWindows[t].startOrbitPoint;for(var r=SuperMap.Plot.PlottingUtil.distance(l[0],a[0]),u=0,p=0;p<i.length-s;p++)r>=SuperMap.Plot.PlottingUtil.distance(l[0],a[p])&&(r=SuperMap.Plot.PlottingUtil.distance(l[0],a[p]),u=p);for(var h=0;h<this.timeWindows.length;h++)"number"===this.timeWindows[h].type?(this.timeWindows[t].startOrbitPoint=u+n[0].number,this.timeWindows[t].endOrbitPoint=u+s+n[0].number):"Time"===this.timeWindows[h].type&&(this.timeWindows[t].startOrbitPoint=u+n[0].time,this.timeWindows[t].endOrbitPoint=u+s+n[0].time)}else{t=(t-1)/2;for(var c=SuperMap.Plot.PlottingUtil.distance(l[0],a[a.length-1]),y=0;y<i.length;y++)c>=SuperMap.Plot.PlottingUtil.distance(l[0],a[y])&&(c=SuperMap.Plot.PlottingUtil.distance(l[0],a[y]),u=y);for(var g=0;g<this.timeWindows.length;g++)"number"===this.timeWindows[g].type?(this.timeWindows[t].endOrbitPoint=u+n[0].number,this.timeWindows[t].endOrbitPoint<=this.timeWindows[t].startOrbitPoint&&(this.timeWindows[t].endOrbitPoint=this.timeWindows[t].startOrbitPoint+1)):"Time"===this.timeWindows[g].type&&(this.timeWindows[t].endOrbitPoint=u+n[0].time,this.timeWindows[t].endOrbitPoint<=this.timeWindows[t].startOrbitPoint&&(this.timeWindows[t].endOrbitPoint=this.timeWindows[t].startOrbitPoint+1))}}this.redraw()}});L.supermap.plotting.satelliteTimeWindows=function(t,e,o,i){return new pu(t,e,o,i)},L.supermap.plotting.SatelliteTimeWindows=pu;var hu=nr.extend({symbolTexts:[],addFrame:!1,getFrame:function(){return this.addFrame},setFrame:function(t){this.addFrame!==t&&(this.addFrame=t,this.redraw())},updateSymbolText:function(t,e){this.symbolTexts.length>e&&(this.symbolTexts[e]=t,this.redraw())},removeSymbolTextsFromDotSymbol:function(t){if(t&&"string"==typeof t){var e=this._map.getFeatureByUuid(t);if(e)for(var o=0,i=e.geoSymbolTexts.length;o<i;o++)if(this===e.geoSymbolTexts[o]){e.geoSymbolTexts.splice(o,1);break}}},initialize:function(t,e,o,i){this.libID=0,this.code=SuperMap.Plot.SymbolType.SYMBOLTEXT,this.symbolType=SuperMap.Plot.SymbolType.SYMBOLTEXT,this.symbolName="对象标注",nr.prototype.initialize.call(this,t,e,o,i),this.scaleByMap=!0,this.style.sizeFixed=!1},_calculateParts:function(){if(!("none"===this.style.display||null!=this.layer&&"function"==typeof this.layer.getVisibility&&!1===this.layer.getVisibility()||this.symbolTexts.length<=0)){var t=this._map.getFeatureByUuid(this.associatedUuid);if(null!=t&&"none"!==t.style.display){this.latLngs=[];for(var e=[],o=this.symbolTexts,i=!1,n=t.geoSymbolTexts,l=0,a=n.length;l<a;l++)if(this===n[l]){i=!0;break}i||n.push(this),null==this.minScale&&(this.minScale=t.minScale),null==this.maxScale&&(this.maxScale=t.maxScale);var s=1;"function"==typeof this.layer.getSymZoomScale&&(s=this.layer.getSymZoomScale()),null!=this.minScale&&s<this.minScale?s=this.minScale:null!=this.maxScale&&s>this.maxScale&&(s=this.maxScale);var r={surroundLineFlag:!1,lineColorLimit:!0,fillColorLimit:!0,lineWidthLimit:!0,lineTypeLimit:!0,fontColorLimit:!0,fontSizeLimit:!0,fillLimit:!0},u=t.getBounds();if((null==u||!u.isValid())&&null!=t.graphic&&null!=t.graphic.layer&&null!=t.graphic.getImage()){t.graphic._project();var p=t.graphic._pxBounds;null!=p&&p.isValid()&&(u.extend(this._map.layerPointToLatLng(p.min)),u.extend(this._map.layerPointToLatLng(p.max)))}if(u&&u.isValid()){for(var h=0,c=o.length;h<c;h++){this._mergeStyleToSymbolText(o[h]);var y=o[h].textContent;if(null!==y&&0!==y.length){var g=this.addFrame||o[h].border;o[h].textPosition=void 0===o[h].textPosition?0:o[h].textPosition;var f,P,d,S=0,m=0;if(g)(r=SuperMap.Plot.PlottingUtil.cloneObject(o[h].style)).fontSize*=s,S=SuperMap.Plot.PlottingUtil.getTextWidth(r,o[h].textContent)+o[h].paddingX*s*2,m=parseInt(r.fontSize)+o[h].paddingY*s*2;var b=L.point(0,0),M=L.point(0,0);switch(o[h].textPosition){case SuperMap.Plot.AnnoPosition.LEFTTOP:o[h].style.labelAlign="rb",f=L.latLng(u.getNorth(),u.getWest()),(P=this._map.latLngToLayerPoint(f)).x+=o[h].offsetX*s,P.y+=o[h].offsetY*s,!0===g&&(b.x=P.x,b.y=P.y,M.x=P.x-S,M.y=P.y-m);break;case SuperMap.Plot.AnnoPosition.LEFTBOTTOM:o[h].style.labelAlign="rt",f=L.latLng(u.getSouth(),u.getWest()),(P=this._map.latLngToLayerPoint(f)).x+=o[h].offsetX*s,P.y+=o[h].offsetY*s,!0===g&&(b.x=P.x,b.y=P.y,M.x=P.x-S,M.y=P.y+m);break;case SuperMap.Plot.AnnoPosition.RIGHTTOP:o[h].style.labelAlign="lb",f=L.latLng(u.getNorth(),u.getEast()),(P=this._map.latLngToLayerPoint(f)).x+=o[h].offsetX*s,P.y+=o[h].offsetY*s,!0===g&&(b.x=P.x,b.y=P.y,M.x=P.x+S,M.y=P.y-m);break;case SuperMap.Plot.AnnoPosition.RIGHTBOTTOM:o[h].style.labelAlign="lt",f=L.latLng(u.getSouth(),u.getEast()),(P=this._map.latLngToLayerPoint(f)).x+=o[h].offsetX*s,P.y+=o[h].offsetY*s,!0===g&&(b.x=P.x,b.y=P.y,M.x=P.x+S,M.y=P.y+m);break;case SuperMap.Plot.AnnoPosition.TOP:o[h].style.labelAlign="cb",f=L.latLng(u.getNorth(),(u.getWest()+u.getEast())/2),(P=this._map.latLngToLayerPoint(f)).x+=o[h].offsetX*s,P.y+=o[h].offsetY*s,!0===g&&(b.x=P.x-S/2,b.y=P.y,M.x=P.x+S/2,M.y=P.y-m);break;case SuperMap.Plot.AnnoPosition.BOTTOM:o[h].style.labelAlign="ct",f=L.latLng(u.getSouth(),(u.getWest()+u.getEast())/2),(P=this._map.latLngToLayerPoint(f)).x+=o[h].offsetX*s,P.y+=o[h].offsetY*s,!0===g&&(b.x=P.x-S/2,b.y=P.y,M.x=P.x+S/2,M.y=P.y+m);break;case SuperMap.Plot.AnnoPosition.LEFT:o[h].style.labelAlign="rm",f=L.latLng((u.getSouth()+u.getNorth())/2,u.getWest()),(P=this._map.latLngToLayerPoint(f)).x+=o[h].offsetX*s,P.y+=o[h].offsetY*s,!0===g&&(b.x=P.x,b.y=P.y+m/2,M.x=P.x-S,M.y=P.y-m/2);break;case SuperMap.Plot.AnnoPosition.RIGHT:o[h].style.labelAlign="lm",f=L.latLng((u.getSouth()+u.getNorth())/2,u.getEast()),(P=this._map.latLngToLayerPoint(f)).x+=o[h].offsetX*s,P.y+=o[h].offsetY*s,!0===g&&(b.x=P.x,b.y=P.y+m/2,M.x=P.x+S,M.y=P.y-m/2);break;case SuperMap.Plot.AnnoPosition.ANCHOR:o[h].style.labelAlign="lm",f=t.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL?t.latLngs[0]:u.getCenter(),(P=this._map.latLngToLayerPoint(f)).x+=o[h].offsetX*s,P.y+=o[h].offsetY*s,o[h].offsetX>0?(o[h].style.labelAlign="lm",!0===g&&(b.x=P.x,b.y=P.y+m/2,M.x=P.x+S,M.y=P.y-m/2)):(o[h].style.labelAlign="rm",!0===g&&(b.x=P.x,b.y=P.y+m/2,M.x=P.x-S,M.y=P.y-m/2))}var v=this._map.layerPointToLatLng(P);if(0!==o[h].offsetX||0!==o[h].offsetY){var A={};A.positionPoints=[v,f],A.style={},A.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,e.push(A)}var T=SuperMap.Util.copyAttributes(r,this.symbolTexts[h].style);if(g){var _=this._map.layerPointToLatLng(b),O=this._map.layerPointToLatLng(M),x={};x.positionPoints=[_,O],x.style=SuperMap.Util.cloneObject(T),x.type=SuperMap.Plot.SymbolType.RECTANGLESYMBOL,e.push(x),d=L.latLng((O.lat-_.lat)/2+_.lat,(_.lng-O.lng)/2+O.lng)}else d=v;var w={};w.positionPoints=d,w.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,w.style=SuperMap.Util.cloneObject(T),w.textContent=o[h].textContent,g&&(w.style.labelAlign="cm"),e.push(w),this.latLngs.push(v)}}for(var E,C=0;C<e.length;C++)E=L.Util.isArray(e[C].positionPoints)?e[C].positionPoints:[e[C].positionPoints],this._createAndDrawLayer(e[C].type,E,e[C].style,e[C].textContent)}}}},_calculatePositionPoints:function(){this.latLngs=[];var t=this.symbolTexts;if(t.length>0){var e=this._map.getFeatureByUuid(this.associatedUuid);if(null===e||void 0===e)return;var o=e.getBounds();if((null==o||!o.isValid())&&null!=e.graphic&&null!=e.graphic.layer&&null!=e.graphic.getImage()){e.graphic._project();var i=e.graphic._pxBounds;null!=i&&i.isValid()&&(o.extend(this._map.layerPointToLatLng(i.min)),o.extend(this._map.layerPointToLatLng(i.max)))}if(!o||!o.isValid())return;for(var n=0,l=t.length;n<l;n++){var a=t[n].textContent;if(null!==a&&0!==a.length){var s;switch(t[n].textPosition=void 0===t[n].textPosition?0:t[n].textPosition,t[n].textPosition){case SuperMap.Plot.AnnoPosition.LEFTTOP:s=L.latLng(o.getNorth(),o.getWest());break;case SuperMap.Plot.AnnoPosition.LEFTBOTTOM:s=L.latLng(o.getSouth(),o.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHTTOP:s=L.latLng(o.getNorth(),o.getEast());break;case SuperMap.Plot.AnnoPosition.RIGHTBOTTOM:s=L.latLng(o.getSouth(),o.getEast());break;case SuperMap.Plot.AnnoPosition.TOP:s=L.latLng(o.getNorth(),(o.getWest()+o.getEast())/2);break;case SuperMap.Plot.AnnoPosition.BOTTOM:s=L.latLng(o.getSouth(),(o.getWest()+o.getEast())/2);break;case SuperMap.Plot.AnnoPosition.LEFT:s=L.latLng((o.getSouth()+o.getNorth())/2,o.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHT:s=L.latLng((o.getSouth()+o.getNorth())/2,o.getEast());break;case SuperMap.Plot.AnnoPosition.ANCHOR:t[n].style.labelAlign="lm",s=e.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL?e.latLngs[0]:o.getCenter()}var r=this._map.latLngToLayerPoint(s);r.x+=t[n].offsetX,r.y+=t[n].offsetY,this.latLngs.push(this._map.layerPointToLatLng(r))}}}},destroy:function(){this.frame=!1,this.symbolTexts=null,nr.prototype.destroy.call(this)},_mergeStyleToSymbolText:function(t){if(null!==this.components)for(var e in null!==t.style&&void 0!==t.style||(t.style={}),this.style)Object.prototype.hasOwnProperty.call(t.style,e)||(t.style[e]=this.style[e])},_modifyPoint:function(t,e){this._calculateOffset(t,e),this.redraw()},_calculateOffset:function(t,e){if(t<this.symbolTexts.length){var o=this.symbolTexts[t].textPosition,i=this._map.latLngToLayerPoint(e),n=this._map.getFeatureByUuid(this.associatedUuid);if(null===n||void 0===n)return;var l=n.getBounds();if((null==l||!l.isValid())&&null!=n.graphic&&null!=n.graphic.layer&&null!=n.graphic.getImage()){n.graphic._project();var a=n.graphic._pxBounds;null!=a&&a.isValid()&&(l.extend(this._map.layerPointToLatLng(a.min)),l.extend(this._map.layerPointToLatLng(a.max)))}if(!l||!l.isValid())return;var s,r,u=1;"function"==typeof this.layer.getSymZoomScale&&(u=this.layer.getSymZoomScale()),null!=this.minScale&&u<this.minScale?u=this.minScale:null!=this.maxScale&&u>this.maxScale&&(u=this.maxScale),0===o?(s=L.latLng(l.getNorth(),l.getWest()),r=this._map.latLngToLayerPoint(s),this.symbolTexts[t].offsetX=(i.x-r.x)/u,this.symbolTexts[t].offsetY=(i.y-r.y)/u):1===o?(s=L.latLng(l.getSouth(),l.getWest()),r=this._map.latLngToLayerPoint(s),this.symbolTexts[t].offsetX=(i.x-r.x)/u,this.symbolTexts[t].offsetY=(i.y-r.y)/u):2===o?(s=L.latLng(l.getNorth(),l.getEast()),r=this._map.latLngToLayerPoint(s),this.symbolTexts[t].offsetX=(i.x-r.x)/u,this.symbolTexts[t].offsetY=(i.y-r.y)/u):3===o?(s=L.latLng(l.getSouth(),l.getEast()),r=this._map.latLngToLayerPoint(s),this.symbolTexts[t].offsetX=(i.x-r.x)/u,this.symbolTexts[t].offsetY=(i.y-r.y)/u):4===o?(s=L.latLng(l.getNorth(),(l.getWest()+l.getEast())/2),r=this._map.latLngToLayerPoint(s),this.symbolTexts[t].offsetX=(i.x-r.x)/u,this.symbolTexts[t].offsetY=(i.y-r.y)/u):5===o?(s=L.latLng(l.getSouth(),(l.getWest()+l.getEast())/2),r=this._map.latLngToLayerPoint(s),this.symbolTexts[t].offsetX=(i.x-r.x)/u,this.symbolTexts[t].offsetY=(i.y-r.y)/u):6===o?(s=L.latLng((l.getNorth()+l.getSouth())/2,l.getWest()),r=this._map.latLngToLayerPoint(s),this.symbolTexts[t].offsetX=(i.x-r.x)/u,this.symbolTexts[t].offsetY=(i.y-r.y)/u):7===o?(s=L.latLng((l.getNorth()+l.getSouth())/2,l.getEast()),r=this._map.latLngToLayerPoint(s),this.symbolTexts[t].offsetX=(i.x-r.x)/u,this.symbolTexts[t].offsetY=(i.y-r.y)/u):o===SuperMap.Plot.AnnoPosition.ANCHOR&&(s=n.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL?n.latLngs[0]:l.getCenter(),r=this._map.latLngToLayerPoint(s),this.symbolTexts[t].offsetX=(i.x-r.x)/u,this.symbolTexts[t].offsetY=(i.y-r.y)/u)}},_reView:function(){this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},move:function(){},_parseSymbolData:function(){if(nr.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 o=new SuperMap.Plot.GeoSymbolText;o.textContent=this.symbolData.symbolTexts[t].textContent,o.textPosition=this.symbolData.symbolTexts[t].textPosition,o.style=this.symbolData.symbolTexts[t].style,o.offsetX=this.symbolData.symbolTexts[t].offsetX,o.offsetY=this.symbolData.symbolTexts[t].offsetY,this.symbolTexts.push(o)}}},_setSymbolData:function(){nr.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,o=this.symbolTexts.length;e<o;e++)SuperMap.Util.copyAttributes(this.symbolTexts[e].style,t);this.redraw()}else{SuperMap.Util.extend(this.style,t);for(var i=0;i<this.symbolTexts.length;i++)SuperMap.Util.copyAttributes(this.symbolTexts[i].style,t);for(var n in this.components)delete t.labelAlign,SuperMap.Util.copyAttributes(this.components[n].options,t),this._copyStyleForCell(this.components[n].options,this.style,this.components[n]),this.components[n].setStyle(this.components[n].options)}}});L.supermap.plotting.symbolText=function(t,e,o,i){return new hu(t,e,o,i)},L.supermap.plotting.SymbolText=hu;var cu=nr.extend({space:null,offsetX:null,offsetY:null,initialize:function(t,e,o,i){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),nr.prototype.initialize.call(this,t,e,o,i),this.scaleByMap=!0,this.style.sizeFixed=!1},destroy:function(){this.space=null,this.offsetX=null,this.offsetY=null,nr.prototype.destroy.call(this)},removeSymbolTextsFromDotSymbol:function(t){if(t&&"string"==typeof t){var e=this._map.getFeatureByUuid(t);if(e)for(var o=0,i=e.geoSymbolTexts.length;o<i;o++)if(this===e.geoSymbolTexts[o]){e.geoSymbolTexts.splice(o,1);break}}},_calculateParts:function(){if("none"!==this.style.display&&(null==this.layer||"function"!=typeof this.layer.getVisibility||!1!==this.layer.getVisibility())){var t=this._map.getFeatureByUuid(this.associatedUuid);if(null!=t&&"none"!==t.style.display){this.latLngs=[];for(var e=[],o=!1,i=0;i<t.geoSymbolTexts.length;i++)if(this===t.geoSymbolTexts[i]){o=!0;break}o||t.geoSymbolTexts.push(this),null==this.minScale&&(this.minScale=t.minScale),null==this.maxScale&&(this.maxScale=t.maxScale);var n=1;"function"==typeof this.layer.getSymZoomScale&&(n=this.layer.getSymZoomScale()),null!=this.minScale&&n<this.minScale?n=this.minScale:null!=this.maxScale&&n>this.maxScale&&(n=this.maxScale);var l=t.latLngs[0],a=this._map.latLngToLayerPoint(l),s=new SuperMap.Pixel(a.x+this.offsetX*n,a.y+this.offsetY*n),r=this._map.layerPointToLatLng(s);0===this.latLngs.length?this.latLngs.push(r):(this.latLngs[0].lng=r.lng,this.latLngs[0].lat=r.lat);var u=L.Util.cloneLatLngs(this.latLngs[0]);u.push(l);var p={style:{surroundLineFlag:!1}};p.style=SuperMap.Util.copyAttributes(p.style,this.style),p.positionPoints=u,p.type=24,e.push(p),SuperMap.Util.isArray(this.textContent)||(this.textContent=[this.textContent]);var h=this.textContent.length,c=this.style.fontSize*h*n+h+1,y=this._map.latLngToLayerPoint(L.latLng(this.latLngs[0].lat,this.latLngs[0].lng)),g=L.point(y.x,y.y-c/2),f=L.point(y.x,y.y+c/2),P=[this._map.layerPointToLatLng(g),this._map.layerPointToLatLng(f)],d={};d.positionPoints=P,d.style={surroundLineFlag:!1},d.style=SuperMap.Util.copyAttributes(d.style,this.style),d.type=24,e.push(d);var S,m=new SuperMap.Geometry.Point(this.latLngs[0].lng,this.latLngs[0].lat);if(0!==this.textContent.length){for(var b=t.getBounds(),M=new SuperMap.Geometry.Point((b.getWest()+b.getEast())/2,b.getNorth()),v=new SuperMap.Geometry.Point((b.getWest()+b.getEast())/2,b.getSouth()),A=SuperMap.Plot.PlottingUtil.pointIsRightToLine(M,v,m),T="",_=0;_<this.textContent.length;_++)T+=this.textContent[_],_!==this.textContent.length-1&&(T+="\r\n");var O=null;O=!0===A?L.point(y.x-this.space,y.y):L.point(y.x+this.space,y.y);var x={},w=this._map.layerPointToLatLng(O);x.positionPoints=w,x.type=34,x.textContent=T,x.style={},x.style=SuperMap.Util.copyAttributes(x.style,this.style),Object.prototype.hasOwnProperty.call(x.style,"sizeFixed")&&delete x.style.sizeFixed,x.style.labelAlign=!0===A?"rm":"lm",e.push(x)}for(var E=0;E<e.length;E++)S=L.Util.isArray(e[E].positionPoints)?e[E].positionPoints:[e[E].positionPoints],this._createAndDrawLayer(e[E].type,S,e[E].style,e[E].textContent)}}},_calculateSize:function(t){this.scaleByMap=t.scaleByMap,!1===this.scaleByMap||!0===this.style.sizeFixed?this.fromZoom=this._map.getZoom():this.fromZoom<=this._map.getZoom()&&(this.dScale=scale),void 0!==this.prevOffsetX&&this.prevOffsetX!==this.offsetX&&(this.scaleBeforeOffsetX=this.offsetX/scale,this.prevOffsetX=this.offsetX),!0===this.scaleByMap&&(void 0===this.scaleBeforeOffsetX&&(this.scaleBeforeOffsetX=this.offsetX),this.offsetX=this.scaleBeforeOffsetX*scale,this.prevOffsetX=this.offsetX),void 0!==this.prevOffsetY&&this.prevOffsetY!==this.offsetY&&(this.scaleBeforeOffsetY=this.offsetY/scale,this.prevOffsetY=this.offsetY),!0===this.scaleByMap&&(void 0===this.scaleBeforeOffsetY&&(this.scaleBeforeOffsetY=this.offsetY),this.offsetY=this.scaleBeforeOffsetY*scale,this.prevOffsetY=this.offsetY),void 0!==this.prevStrokeWidth&&this.prevStrokeWidth!==this.style.weight&&(this.strokeWidth=this.style.weight,this.prevStrokeWidth=this.style.weight),!0===this.scaleByMap&&(void 0===this.weight&&(this.weight=this.style.weight),this.fromZoom<=this._map.getZoom()?this.style.weight=t.style.weight:this.style.weight=this.weight,this.prevStrokeWidth=this.style.weight),void 0!==this.prevFontSize&&this.prevFontSize!==this.style.fontSize&&(this.fontSize=this.style.fontSize/scale,this.prevFontSize=this.style.fontSize),!0===this.scaleByMap&&(void 0===this.fontSize&&(this.fontSize=this.style.fontSize),this.style.fontSize=this.fontSize,this.prevFontSize=this.style.fontSize)},_reView:function(){this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},_modifyPoint:function(){var t=this._map.getFeatureByUuid(this.associatedUuid);if(null!==t){var e=this._map.latLngToLayerPoint(L.latLng(t.latLngs[0].lat,t.latLngs[0].lng)),o=this._map.latLngToLayerPoint(L.latLng(this.latLngs[0].lat,this.latLngs[0].lng)),i=1;"function"==typeof this.layer.getSymZoomScale&&(i=this.layer.getSymZoomScale()),null!=this.minScale&&i<this.minScale?i=this.minScale:null!=this.maxScale&&i>this.maxScale&&(i=this.maxScale),this.offsetX=(o.x-e.x)/i,this.offsetY=(o.y-e.y)/i,this.redraw()}},_parseSymbolData:function(){nr.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(){nr.prototype._setSymbolData.call(this),this.symbolData&&(this.symbolData.space=this.space,this.symbolData.offsetX=this.offsetX,this.symbolData.offsetY=this.offsetY,void 0!==this.scaleBeforeOffsetX&&(this.symbolData.scaleBeforeOffsetX=this.scaleBeforeOffsetX),void 0!==this.scaleBeforeOffsetY&&(this.symbolData.scaleBeforeOffsetY=this.scaleBeforeOffsetY))}});L.supermap.plotting.symbolText1=function(t,e,o,i){return new cu(t,e,o,i)},L.supermap.plotting.SymbolText1=cu;var yu=L.Path.extend({name:"图元层",serverUrl:null,features:null,visibility:!0,symScaleDefinition:null,enableSymScale:null,options:{serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},getVisibility:function(){return this.visibility},setVisibility:function(t){if(this.visibility!==t){this.visibility=t;for(var e=0;e<this.features.length;e++)if(this.features[e].redraw(),this._map&&this._map.getPlotEditControl()){if(Object.prototype.hasOwnProperty.call(this._map.getPlotEditControl()._editMarkers,this.features[e].uuid)){var o=this._map.getPlotEditControl()._editMarkers[this.features[e].uuid];for(var i in o)this.visibility?o[i].setOpacity(1):o[i].setOpacity(0)}null!=this.features[e].dragging&&null!=this.features[e].dragging.moveMarker&&(this.visibility?this.features[e].dragging.moveMarker.setOpacity(1):this.features[e].dragging.moveMarker.setOpacity(0))}}},enableSymScaleDefinition:function(t){this.enableSymScale=t},getSymScaleDefinition:function(){return null==this.symScaleDefinition&&!0===this.enableSymScale&&(this.symScaleDefinition=L.supermap.plotting.getControl().getPlotMapManager().getSymScaleDefinition()),this.symScaleDefinition},setSymScaleDefinition:function(t,e){var o=this.symScaleDefinition;this.symScaleDefinition=t;for(var i=0;i<this.features.length;i++)this.features[i].redraw();if(0!==this.symScaleDefinition&&0!==o&&!e){var n=this.symScaleDefinition/o;for(i=0;i<this.features.length;i++)if(this.features[i]instanceof Hr){n<this.features[i].minScale?n=this.features[i].minScale:n>this.features[i].maxScale&&(n=this.features[i].maxScale);var l=this.features[i].getSymbolSize().w*n,a=this.features[i].getSymbolSize().h*n;this.features[i].setSymbolSize(l,a)}}},initialize:function(t,e,o){o=o||{},L.setOptions(this,o),this.name=t,this.serverUrl=e,this.features=[],this.enableSymScale=!0},destroy:function(){this.name="",this.serverUrl=null,this.features=null},beforeAdd:function(t){L.Path.prototype.beforeAdd.call(this,t)},onAdd:function(t){L.Path.prototype.onAdd.call(this,t),this._map=t;var e=this;null==zr.prototype.map&&(zr.prototype.map=t),e instanceof bu&&(L.supermap.plotting.getControl().getPlotMapManager().addPlottingLayer(e),e.getSymScaleDefinition()),this._map.on("zoomend",function(){var t=zr.prototype.getLayerScale();if("function"==typeof e.getMinVisibleScale&&e.getMinVisibleScale()>0&&t<e.getMinVisibleScale()||"function"==typeof e.getMaxVisibleScale&&e.getMaxVisibleScale()>0&&t>e.getMaxVisibleScale())for(var o=0;o<e.features.length;o++)null!=e.features[o].components&&e.features[o].components.length>0&&(e.features[o].redraw(),e.features[o].fromZoom=e._map.getZoom());else for(var i=0;i<e.features.length;i++)null!=e.features[i].components&&0===e.features[i].components.length?(e.features[i].redraw(),e.features[i].fromZoom=e._map.getZoom()):e.features[i]._reView()})},onRemove:function(){L.Path.prototype.onRemove.call(this),this.removeAllFeatures(),L.supermap.plotting.getControl().getPlotMapManager().removePlottingLayer(this)},addFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]);for(var e=0;e<t.length;)t[e]instanceof Qs||t[e]instanceof $r?(this.features.push(t[e]),t[e].onAdd(this),e++):t.splice(e,1)},removeFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]);for(var e=0,o=t.length;e<o;e++){var i=t[e];if(-1!=SuperMap.Util.indexOf(this.features,i)&&(i instanceof Qs||t[e]instanceof $r)){(i instanceof $s||i instanceof iu)&&this._map&&this._map.getPlotEditControl()&&(this._map.getPlotEditControl().unselectFeatures(i.components),this._map.getPlotEditControl().disableEditFeatures(i.components)),this._map&&this._map.getPlotEditControl()&&(this._map.getPlotEditControl().unselectFeatures(i),this._map.getPlotEditControl().disableEditFeatures(i)),i.symbolType===SuperMap.Plot.SymbolType.ROUTENODE&&i.route&&i.route.deleteRouteNode(i.routeNode),i.symbolType!==SuperMap.Plot.SymbolType.SYMBOLTEXT&&i.symbolType!==SuperMap.Plot.SymbolType.SYMBOLTEXT1||i.removeSymbolTextsFromDotSymbol(i.associatedUuid),i.symbolType===SuperMap.Plot.SymbolType.LINERELATION&&(i.startAssociatedUuid&&i.removeJoinLineFromDotSymbol(i.startAssociatedUuid),i.endAssociatedUuid&&i.removeJoinLineFromDotSymbol(i.endAssociatedUuid)),i.ownerGroup?(i.ownerGroup.removeComponents(),this.removeFeatures(i)):(i._clearComponents(),i.geoSymbolTexts&&i.geoSymbolTexts.length>0&&this.removeFeatures(i.geoSymbolTexts));var n=SuperMap.Util.indexOf(this.features,i);-1!==n&&this.features.splice(n,1),i.layer=null}}this._update()},getFeatures:function(){return this.features.slice()},removeAllFeatures:function(){this.removeFeatures(this.features.slice()),this.features=[]},getSymZoomScale:function(t){return null==this.getSymScaleDefinition()||!0!==this.enableSymScale?1:L.supermap.plotting.getControl().getPlotMapManager().getLayerScale(t)/this.getSymScaleDefinition()},_getSymbolDataFromCache:function(t,e){var o=L.supermap.plotting.getControl(this._map,this.serverUrl,{serviceParams:this.options.serviceParams}).getSymbolLibManager().getSymbolLibByLibId(t);return null!==o?o.getSymbolData(e):null},_cacheSymbolData:function(t){var e=L.supermap.plotting.getControl(this._map,this.serverUrl,{serviceParams:this.options.serviceParams}).getSymbolLibManager().getSymbolLibByLibId(t.libID);null!==e&&e.cacheSymbolData(t)},_setCursorStyle:function(t){void 0===t&&(t="");var e=!1;if(this._map.getPlottingLayers().length>1){var o=this._map.getPlottingLayers();for(var i in o)if(o[i]._renderer instanceof L.Canvas)o[i]._renderer._container.style.cursor=t;else if(o[i]._renderer instanceof L.SVG)for(var n=0;n<o[i]._renderer._rootGroup.childNodes.length;n++)o[i]._renderer._rootGroup.childNodes[n].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(var l=0;l<this._renderer._rootGroup.childNodes.length;l++)this._renderer._rootGroup.childNodes[l].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(o){var i=o.getBounds();return i.isValid()&&e.contains(i)&&t.push(o),o}),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,o=this.getPane().children,i=-t(-1/0,1/0),n=0,l=o.length;n<l;n++)e=o[n].style.zIndex,o[n]!==this._container&&e&&(i=t(i,+e));isFinite(i)&&(this.options.zIndex=i+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}}),gu=yu.extend({layer:null,initialize:function(t,e,o){yu.prototype.initialize.call(this,t,e,o),this.symScaleDefinition=1,o&&o.layer&&(this.layer=o.layer)},addFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]),0!==t.length&&(yu.prototype.addFeatures.call(this,t),this._map.getPlotEditControl()&&this.isSelected&&this._map.getPlotEditControl().enableEditFeatures(t))},removeFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]);for(var e=0,o=t.length;e<o;e++){var i=t[e];if(-1!=SuperMap.Util.indexOf(this.features,i)){this._map&&this._map.getPlotEditControl()&&(this._map.getPlotEditControl().unselectFeatures(i),this._map.getPlotEditControl().disableEditFeatures(i)),i._clearComponents();var n=SuperMap.Util.indexOf(this.features,i);-1!==n&&this.features.splice(n,1),i.layer=null}}this._update()}}),fu=L.Path.extend({serverUrl:null,features:null,isLocked:!1,isEditable:!0,isSelected:!0,visibility:!0,minVisibleScale:0,maxVisibleScale:0,markerMinVisibleScale:0,markerMaxVisibleScale:0,tolerancePixel:5,cacheImages:null,_editLayer:null,_vectorRenderer:null,_detectionRangeCombinations:{},options:{zIndex:300,vectorZIndex:200},getSelected:function(){return this.isSelected},setSelected:function(t){this.isSelected!==t&&(this.isSelected=t,!1===this.isSelected&&this.selectedFeatures.length>0&&(this._map&&this._map.getPlotEditControl()&&!0===this.isEditable&&!1===this.isLocked&&(this._editLayer.removeFeatures(this.selectedFeatures),this.addFeatures(this.selectedFeatures)),this.fire(SuperMap.Plot.Event.movingtargetsunselected,{features:this.selectedFeatures}),this.selectedFeatures.length=0))},getEditable:function(){return this.isEditable},setEditable:function(t){this.isEditable!==t&&(this.isEditable=t,!1===this.isEditable&&!1===this.isLocked&&this.selectedFeatures.length>0&&this._map&&this._map.getPlotEditControl()&&(this._editLayer.removeFeatures(this.selectedFeatures),this.addFeatures(this.selectedFeatures)))},getLocked:function(){return this.isLocked},setLocked:function(t){this.isLocked!==t&&(this.isLocked=t,!0===this.isEditable&&!0===this.isLocked&&this.selectedFeatures.length>0&&this._map&&this._map.getPlotEditControl()&&(this._editLayer.removeFeatures(this.selectedFeatures),this.addFeatures(this.selectedFeatures)))},getVisibility:function(){return this.visibility},setVisibility:function(t){this.visibility!==t&&(this.visibility=t,this.visibility?(this._renderer._container.style.visibility="visible",this._vectorRenderer._container.style.visibility="visible"):(this._renderer._container.style.visibility="hidden",this._vectorRenderer._container.style.visibility="hidden"),this._editLayer.setVisibility(this.visibility))},getMinVisibleScale:function(){return null==this.minVisibleScale&&(this.minVisibleScale=0),this.minVisibleScale},setMinVisibleScale:function(t){this.minVisibleScale=t,this.maxVisibleScale>1e-7&&this.maxVisibleScale<t&&(this.minVisibleScale=this.maxVisibleScale)},getMaxVisibleScale:function(){return null==this.maxVisibleScale&&(this.maxVisibleScale=1),this.maxVisibleScale},setMaxVisibleScale:function(t){this.maxVisibleScale=t,this.maxVisibleScale>1e-7&&this.maxVisibleScale<t&&(this.maxVisibleScale=this.minVisibleScale)},clearVisibleScale:function(){this.minVisibleScale=0,this.maxVisibleScale=0},composeDetectionRange:function(t,e,o){if(SuperMap.Util.isArray(t)||(t=[t]),0!==this.features.length){for(var i=t.slice(),n=0;n<i.length;)-1!=L.Util.indexOf(this.features,i[n])?(i[n].composeDetectionRange=e,n++):i.splice(0,1);var l={display:"display",color:"#ff0000",opacity:1,weight:1,fill:!0,fillColor:"#ff0000",fillOpacity:.5};l=SuperMap.Plot.PlottingUtil.copyAttributes(l,o),this._detectionRangeCombinations[e]={features:i,style:l}}},decomposeDetectionRange:function(t){if(Object.prototype.hasOwnProperty.call(this._detectionRangeCombinations,t)){for(var e=0;e<this._detectionRangeCombinations[t].features.length;e++)this._detectionRangeCombinations[t].features[e].composeDetectionRange=null;if(null!=this._detectionRangeCombinations[t].detectionRanges&&this._detectionRangeCombinations[t].detectionRanges.length>0){for(e=0;e<this._detectionRangeCombinations[t].detectionRanges.length;e++)this._removeDetectionRange(this._detectionRangeCombinations[t].detectionRanges[e]),delete this._detectionRangeCombinations[t].detectionRanges[e],this._detectionRangeCombinations[t].detectionRanges[e]=null;this._detectionRangeCombinations[t].detectionRanges.length=0}}delete this._detectionRangeCombinations[t]},getMarkerMinVisibleScale:function(){return null==this.markerMinVisibleScale&&(this.markerMinVisibleScale=0),this.markerMinVisibleScale},setMarkerMinVisibleScale:function(t){this.markerMinVisibleScale=t,this.markerMaxVisibleScale>1e-7&&this.markerMaxVisibleScale<t&&(this.markerMinVisibleScale=this.markerMaxVisibleScale)},getMarkerMaxVisibleScale:function(){return null==this.markerMaxVisibleScale&&(this.markerMaxVisibleScale=0),this.markerMaxVisibleScale},setMarkerMaxVisibleScale:function(t){this.markerMaxVisibleScale=t,this.markerMinVisibleScale>1e-7&&this.markerMinVisibleScale>t&&(this.markerMaxVisibleScale=this.markerMinVisibleScale)},clearMarkerVisibleScale:function(){this.markerMinVisibleScale=0,this.markerMaxVisibleScale=0},setGraphicZIndex:function(t){this.options.zIndex=t,this._renderer._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._renderer._container.style.zIndex=this.options.zIndex)},setVectorZIndex:function(t){this.options.vectorZIndex=t,this._vectorRenderer._container&&void 0!==this.options.vectorZIndex&&null!==this.options.vectorZIndex&&(this._vectorRenderer._container.style.zIndex=this.options.vectorZIndex)},initialize:function(t,e,o){this._editLayer=new gu(t+"_temportary",e,{layer:this}),o=o||{},L.Util.setOptions(this,o),this.cacheImages={},this.selectedFeatures=[],this.name=t,this.serverUrl=e,this.features=[],this._graphics=[],this._vectors=[]},getSymZoomScale:function(t){return 1},getEvents:function(){var t={click:this._handleClick,mousemove:this._onMapMouseMove,contextmenu:this._handleContextmenu};return this._map._zoomAnimated&&(t.zoomanim=this._zoomAnim),t},_zoomAnim:function(t){},_onMapMouseMove:function(t){var e=this._getGraphicsInBounds();if(0!==e.length)for(var o=0,i=e.length;o<i;o++){if(e[o]._containsPoint(this._map.latLngToLayerPoint(t.latlng))){this._renderer._container.style.cursor=e[o].feature.isSelected?"move":"pointer";break}this._renderer._container.style.cursor=""}var n=this._getLayersInBounds();if(0!==n.length)for(var l=0,a=n.length;l<a;l++){var s=!1;for(var r in n[l].components)if(n[l].components[r]._containsPoint(this._map.latLngToLayerPoint(t.latlng))){s=!0;break}if(s){this._vectorRenderer._container.style.cursor=n[l].isSelected?"move":"pointer";break}this._vectorRenderer._container.style.cursor=""}},supportTypes:function(t,e){return t===SuperMap.Plot.SymbolType.DOTSYMBOL||t===SuperMap.Plot.SymbolType.PICTURE||t===SuperMap.Plot.SymbolType.SYMBOLTEXT||t===SuperMap.Plot.SymbolType.SYMBOLTEXT1||t===SuperMap.Plot.SymbolType.LINERELATION||t===SuperMap.Plot.SymbolType.ALGOSYMBOL||null!=e&&0===e},isGraphic:function(t){return t===SuperMap.Plot.SymbolType.DOTSYMBOL||t===SuperMap.Plot.SymbolType.PICTURE||t===SuperMap.Plot.SymbolType.SYMBOLTEXT||t===SuperMap.Plot.SymbolType.SYMBOLTEXT1||t===SuperMap.Plot.SymbolType.TEXTSYMBOL},isVector:function(t,e){return t===SuperMap.Plot.SymbolType.LINERELATION||t===SuperMap.Plot.SymbolType.ALGOSYMBOL||null!=e&&0===e&&t!=SuperMap.Plot.SymbolType.TEXTSYMBOL},getFeatureByUuid:function(t){for(var e=0;e<this.features.length;e++)if(this.features[e].uuid===t)return this.features[e];return null},getFeatures:function(){return this.features.slice()},addFeatures:function(t){L.Util.isArray(t)||(t=[t]);for(var e=0,o=t.length;e<o;e++){var i=t[e];if(this.supportTypes(i.symbolType,i.libID))if(null!=this._map.getFeatureByUuid(i.uuid)&&(i.uuid=SuperMap.Plot.PlottingUtil.generateUuid()),this.features.push(i),this.isGraphic(i.symbolType)){var n=new Pu(i);n.onAdd(this),this._graphics.push(n)}else i.onAdd(this),this._vectors.push(i)}this._update()},removeFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]);for(var e=[],o=0,i=t.length;o<i;o++){var n=t[o];-1!=SuperMap.Util.indexOf(this.features,n)&&e.push(n)}this.fire(SuperMap.Plot.Event.beforefeaturesremoved,{features:e});for(var l=0,a=e.length;l<a;l++){var s=e[l],r=SuperMap.Util.indexOf(this.selectedFeatures,s);if(-1!==r&&(this._editLayer.removeFeatures(s),this.selectedFeatures.splice(r,1)),this._map&&this._map.getPlotEditControl()&&(this._map.getPlotEditControl().unselectFeatures(s),this._map.getPlotEditControl().disableEditFeatures(s)),s.symbolType!==SuperMap.Plot.SymbolType.SYMBOLTEXT&&s.symbolType!==SuperMap.Plot.SymbolType.SYMBOLTEXT1||s.removeSymbolTextsFromDotSymbol(s.associatedUuid),s.symbolType===SuperMap.Plot.SymbolType.LINERELATION&&(s.startAssociatedUuid&&s.removeJoinLineFromDotSymbol(s.startAssociatedUuid),s.endAssociatedUuid&&s.removeJoinLineFromDotSymbol(s.endAssociatedUuid)),null!=s.graphic&&s.graphic.layer===this){var u=s.graphic.getUuid();this.cacheImages[u]&&0==--this.cacheImages[u].imgCount&&delete this.cacheImages[u],-1!==(r=SuperMap.Util.indexOf(this._graphics,s.graphic))&&this._graphics.splice(r,1),s.graphic.onRemove()}else s._clearComponents();-1!==(r=SuperMap.Util.indexOf(this.features,s))&&this.features.splice(r,1),-1!==(r=SuperMap.Util.indexOf(this._vectors,s))&&this._vectors.splice(r,1)}this._update(),this.fire(SuperMap.Plot.Event.featuresremoved,{features:e,layername:this.name})},removeAllFeatures:function(){this.fire(SuperMap.Plot.Event.beforefeaturesremoved,{features:this.features}),this.removeFeatures(this.features.slice()),this.fire(SuperMap.Plot.Event.featuresremoved,{features:this.features,layername:this.name})},geoJsonToFeature:function(t,e){var o=this;o._editLayer.geoJsonToFeature(t,function(t){o._editLayer.removeFeatures(t.feature),o.addFeatures(t.feature),"function"==typeof e&&e({feature:t.feature})})},createSymbol:function(t,e,o,i,n,l,a,s){var r;if(l||(l={}),l.uuid=i,l.serverUrl=this.serverUrl,l.serviceParams=this.options.serviceParams,void 0!==l.symbolData&&null!==l.symbolData||!SuperMap.Plot.AlgoSymbolFactory.isAccessServer(t,e))if((r=L.supermap.plotting.PlottingObject.createSymbol(t,e,o,l,n,s)).subSymbols&&0!==r.subSymbols.length&&!SuperMap.Plot.AlgoSymbolFactory.isAccessServer(t,e)){for(var u=[],p=0,h=r.subSymbols.length;p<h;p++)null===r.subSymbols[p].symbolData&&(r.subSymbols[p].symbolData=this._getSymbolDataFromCache(r.subSymbols[p].libID,r.subSymbols[p].code),null===r.subSymbols[p].symbolData&&-1===SuperMap.Util.indexOf(u,r.subSymbols[p])&&u.push(r.subSymbols[p]));for(var c=u.slice(),y=0;y<u.length;y++){var g=new SuperMap.GetSymbolInfoParameters({libID:u[y].libID,code:u[y].code});L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(g,function(t){this._cacheSymbolData(t.result);for(var e=0,o=r.subSymbols.length;e<o;e++)if(null===r.subSymbols[e].symbolData&&r.subSymbols[e].libID===t.result.libID&&r.subSymbols[e].code===t.result.code){var i=SuperMap.Util.indexOf(c,r.subSymbols[e]);-1!==i&&c.splice(i,1),r.subSymbols[e].symbolData=SuperMap.Plot.PlottingUtil.cloneObject(t.result),0===c.length&&(r.isEdit=!1,this.addFeatures(r),"function"==typeof a&&a({feature:r}))}},this)}if(0===u.length)return this.addFeatures(r),"function"==typeof a&&a({feature:r}),r}else{if(!SuperMap.Plot.AlgoSymbolFactory.isAccessServer(t,e)||r.symbolData.innerCells)return this.addFeatures(r),"function"==typeof a&&a({feature:r}),r;var f=Math.floor(1e3*Math.random()),P=new SuperMap.GetSymbolInfoParameters({libID:r.libID,code:r.code,surroundLineType:r.surroundLineType,scaleValues:r.scaleValues,subSymbols:r.subSymbols});P.inputPoints=L.Util.latLngsToSuperMapPoints(r.getLatLngs()),P.dynamicToken=f,L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(P,function(t){t.result.dynamicToken&&t.result.dynamicToken===SuperMap.MD5.md5(f.toString())&&(r.symbolData.innerCells=t.result.innerCells,this.addFeatures(r))},this)}else{var d=null,S=!1;if(Object.prototype.hasOwnProperty.call(l,"symbolRank")||Object.prototype.hasOwnProperty.call(l,"surroundLineType")?S=!0:d=this._getSymbolDataFromCache(t,e),!d||S){var m=new SuperMap.GetSymbolInfoParameters({libID:t,code:e});o&&(m.inputPoints=L.Util.latLngsToSuperMapPoints(o)),Object.prototype.hasOwnProperty.call(l,"negativeImage")&&(m.negativeImage=l.negativeImage),Object.prototype.hasOwnProperty.call(l,"symbolRank")&&(m.symbolRank=l.symbolRank),Object.prototype.hasOwnProperty.call(l,"surroundLineType")&&(m.surroundLineType=l.surroundLineType);var b=Math.floor(1e3*Math.random());m.dynamicToken=b,L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(m,function(i){i.result.dynamicToken&&i.result.dynamicToken===SuperMap.MD5.md5(b.toString())&&(S||i.result.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL||(delete i.result.dynamicToken,this._cacheSymbolData(i.result)),l.symbolData=SuperMap.Plot.PlottingUtil.cloneObject(i.result),r=L.supermap.plotting.PlottingObject.createSymbol(t,e,o,l,n,s),this.addFeatures(r),"function"==typeof a&&a({feature:r}))},this)}else l.symbolData=d,r=L.supermap.plotting.PlottingObject.createSymbol(t,e,o,l,n,s),this.addFeatures(r),"function"==typeof a&&a({feature:r})}},createSymbolText:function(t,e,o,i,n,l){n||(n={}),n.associatedUuid=t,n.symbolTexts=e,n.custom=l,n.uuid=o;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SYMBOLTEXT,[],n,i,l);return this.addFeatures(a),a},createSymbolText1:function(t,e,o,i,n,l){n||(n={}),n.associatedUuid=t,n.textContent=e,n.custom=l,n.uuid=o;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SYMBOLTEXT1,[],n,i,l);return this.addFeatures(a),a},createLineRelation:function(t,e,o,i,n,l,a){l||(l={}),l.startAssociatedUuid=t,l.endAssociatedUuid=e,l.lineRelationType=o,l.uuid=i,l.custom=a;var s=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.LINERELATION,null,l,n,a);return this.addFeatures(s),s},updateFeatures:function(t){L.Util.isArray(t)||(t=[t]);var e=[],o=this;t.map(function(t){return o.isGraphic(t.symbolType)?(t.graphic.update(),e.push(t.graphic),t.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&(e=e.concat(t.graphic.getAssociatedGraphics())),t):t}),this._redraw(e)},update:function(){this._clearLayersOutBounds(),this._redrawLayersInBounds(),this._renderer._ctx.clearRect(this._renderer._bounds.min.x,this._renderer._bounds.min.y,this._renderer._ctx.canvas.width,this._renderer._ctx.canvas.height);var t=this._getGraphicsInBounds();this._renderer._drawPlottingGraphics(t),this._updateDetectionRange(t)},redraw:function(){this._clearLayersOutBounds(),this._redrawLayersInBounds(),this._renderer._ctx.clearRect(this._renderer._bounds.min.x,this._renderer._bounds.min.y,this._renderer._ctx.canvas.width,this._renderer._ctx.canvas.height),this._renderer._drawPlottingGraphics(this._getGraphicsInBounds())},beforeAdd:function(t){L.Path.prototype.beforeAdd.call(this,t),this._vectorRenderer=L.svg(),t.hasLayer(this._vectorRenderer)||t.addLayer(this._vectorRenderer),this._vectorRenderer._container.style.zIndex=this.options.vectorZIndex,this._renderer=L.canvas(),t.hasLayer(this._renderer)||t.addLayer(this._renderer),this._renderer._container.style.zIndex=this.options.zIndex},onAdd:function(){L.Path.prototype.onAdd.call(this),this._map.addLayer(this._editLayer);var t=this;this._map.on("zoomend",function(){if(t.getLocked()||!t.getEditable())for(var e=0;e<t.selectedFeatures.length;e++)t.selectedFeatures[e].fire(SuperMap.Plot.Event.reseteditmarkersvalues);t._getRedrawWhenZoom()&&(t._renderer._ctx.clearRect(t._renderer._bounds.min.x,t._renderer._bounds.min.y,t._renderer._ctx.canvas.width,t._renderer._ctx.canvas.height),t._renderer._drawPlottingGraphics(t._getGraphicsInBounds()))})},onRemove:function(){L.Path.prototype.onRemove.call(this),map.hasLayer(this._vectorRenderer)&&map.removeLayer(this._vectorRenderer),map.hasLayer(this._renderer)&&map.removeLayer(this._renderer),this._map.removeLayer(this._editLayer)},getRenderer:function(t){return t!==SuperMap.Plot.SymbolType.DOTSYMBOL&&t!==SuperMap.Plot.SymbolType.SYMBOLTEXT&&t!==SuperMap.Plot.SymbolType.SYMBOLTEXT1&&t!==SuperMap.Plot.SymbolType.PICTURE&&t!==SuperMap.Plot.SymbolType.TEXTSYMBOL?this._vectorRenderer:this._renderer},getFeaturesInBounds:function(){var t=[],e=this,o=this._map.getBounds();return this._graphics.map(function(e){return"none"!==e.feature.style.display&&o.contains(e.getLatLng())?t.push(e.feature):"none"!==e.feature.style.display&&null!=e.feature.trajectory&&e.feature.trajectory.getDisplayLatLngs(o).length>0&&t.push(e.feature),e}),this._vectors.map(function(i){return i.getBounds().isValid()&&e._intersects(o,i.getLatLngs())&&t.push(i),i}),t},_redraw:function(t){var e=[];null!=t&&SuperMap.Util.isArray(t)?e=e.concat(t):null!=t&&t instanceof Pu&&e.push(t);var o=this;o._renderer._redrawBounds&&(o._renderer._redrawBounds.min._floor(),o._renderer._redrawBounds.max._ceil(),o._renderer._clear(),o._graphics.map(function(t){return null!=t._pxBounds&&t._pxBounds.intersects(o._renderer._redrawBounds)&&-1===SuperMap.Util.indexOf(e,t)&&e.push(t),t}),o._renderer._drawPlottingGraphics(e))},_update:function(){this._map&&this.getVisibility()&&this._updatePath()},_containsPoint:function(){return!1},_updatePath:function(){this._clearLayersOutBounds(),this._redrawLayersInBounds(),this._renderer._ctx.clearRect(this._renderer._bounds.min.x,this._renderer._bounds.min.y,this._renderer._ctx.canvas.width,this._renderer._ctx.canvas.height),this._renderer._drawPlottingGraphics(this._getGraphicsInBounds())},_project:function(){var t=this;t._pxBounds=L.bounds(L.point(0,0),L.point(0,0)),t._getGraphicsInBounds().map(function(e){return e._project(),null!=e._pxBounds&&(t._pxBounds.extend(e._pxBounds.min),t._pxBounds.extend(e._pxBounds.max)),e}),t._getLayersInBounds().map(function(e){return e._project(),t._pxBounds.extend(e._pxBounds.min),t._pxBounds.extend(e._pxBounds.max),e})},_updateDetectionRange:function(t){var e=this;Object.keys(e._detectionRangeCombinations).forEach(function(o){for(var i=e._detectionRangeCombinations[o],n=[],l=0;l<i.features.length;l++)-1!=L.Util.indexOf(t,i.features[l].graphic)&&(n.push(L.Util.latLngsToSuperMapPoints(i.features[l].graphic._detectionRangePoints)),null!=i.features[l].graphic._detectionRange&&(e._removeDetectionRange(i.features[l].graphic._detectionRange),delete i.features[l].graphic._detectionRange,i.features[l].graphic._detectionRange=null));var a=SuperMap.Plot.PlottingUtil.getEnvelopePoints(n);if(null!=i.detectionRanges&&i.detectionRanges.length>0){for(l=0;l<i.detectionRanges.length;l++)e._removeDetectionRange(i.detectionRanges[l]),delete i.detectionRanges[l],i.detectionRanges[l]=null;i.detectionRanges.length=0}else i.detectionRanges=[];for(l=0;l<a.length;l++){var s=L.polygon(L.Util.superMapPointsToLatLngs(a[l]),{color:i.style.color,weight:i.style.weight,opacity:i.style.opacity,fill:i.style.fill,fillColor:i.style.fillColor,fillOpacity:i.style.fillOpacity,smoothFactor:0});e._addDetectionRange(s),i.detectionRanges.push(s)}})},_getGraphicsInBounds:function(){var t=[],e=this._map.getBounds();return this._graphics.map(function(o){return"none"!==o.feature.style.display&&e.contains(o.getLatLng())&&(null!=o.getImage()&&o.getUuid()===o.getImage().generateUuidFromFeature()||o.update(),t.push(o)),o}),t},_getRedrawWhenZoom:function(){var t=!1,e=this._map.getBounds();return this._graphics.map(function(o){return"none"!==o.feature.style.display&&e.contains(o.getLatLng())&&o.feature.symbolTexts.length>0&&(o.feature.layer.getMarkerMinVisibleScale()>0||o.feature.layer.getMarkerMaxVisibleScale()>0)&&(t=!0),o}),t},_getLayersInBounds:function(){var t=this,e=[],o=t._map.getBounds();return this._vectors.map(function(i){return i.getBounds().isValid()&&t._intersects(o,i.getLatLngs())&&e.push(i),i}),e},_clearLayersOutBounds:function(){var t=this,e=t._map.getBounds();this._vectors.map(function(o){return o.getBounds().isValid()&&!t._intersects(e,o.getLatLngs())&&o._clearComponents(),o})},_redrawLayersInBounds:function(){var t=this,e=t._map.getBounds();this._vectors.map(function(o){return!o.getBounds().isValid()&&t._intersects(e,o.getLatLngs())&&o.redraw(),o})},_intersects:function(t,e){for(var o=0;o<e.length;o++)if(t.contains(e[o]))return!0;return!1},_addTrajectory:function(t){t._map=this._map,t._renderer=this._vectorRenderer,t.addEventParent(this),t.onAdd()},_removeTrajectory:function(t){t.removeEventParent(this),t.onRemove()},_addDetectionRange:function(t){t._map=this._map,t._renderer=this._vectorRenderer,t.addEventParent(this),t.onAdd()},_removeDetectionRange:function(t){t.removeEventParent(this),t.onRemove()},_handleClick:function(t){var e=this;if(!1!==e.isSelected&&!1!==e.visibility){var o=e.selectedFeatures.slice();e.selectedFeatures.length>0&&(!0===e.isEditable&&!1===e.isLocked&&e._map&&e._map.getPlotEditControl()&&(e._editLayer.removeFeatures(e.selectedFeatures),e.addFeatures(e.selectedFeatures)),e._map.getPlotEditControl().disableEditFeatures(e.selectedFeatures),e.selectedFeatures.length=0);for(var i=e.getFeaturesInBounds(),n=0,l=i.length;n<l;n++){var a=!1;if(null!=i[n].graphic&&i[n].graphic._containsPoint(e._map.latLngToLayerPoint(t.latlng))&&(a=!0),null==i[n].graphic&&i[n].components.length>0)for(var s in i[n].components)if(i[n].components[s]._containsPoint(e._map.latLngToLayerPoint(t.latlng))){a=!0;break}if(a){if(!0===t.originalEvent.altKey&&!0!==t.originalEvent.ctrlKey&&-1!==SuperMap.Util.indexOf(o,i[n]))continue;e._map.getPlotEditControl().unselectFeatures();var r=[];if(!0===L.supermap.plotting.getControl().getTouchMode()&&e._map&&e._map.getPlotEditControl()&&!0===e._map.getPlotEditControl()._isMultiSelect&&(r=r.concat(o.slice())),r.push(i[n]),!0===e.isEditable&&!1===e.isLocked&&e._map&&e._map.getPlotEditControl()&&(e.removeFeatures(r),e._editLayer.addFeatures(r)),e._map.getPlotEditControl().enableEditFeatures(r),e._map.getPlotEditControl().selectFeatures(r),e.selectedFeatures=e.selectedFeatures.concat(r),e._map&&e._map.getPlotEditControl()&&(e._map.getPlotEditControl()._onTriggerMapClick=!1),!0!==t.originalEvent.ctrlKey)break}}o.length>0&&(this.fire(SuperMap.Plot.Event.movingtargetsunselected,{features:o}),o.length=0),this.selectedFeatures.length>0&&this.fire(SuperMap.Plot.Event.movingtargetsselected,{features:e.selectedFeatures}),L.DomEvent.stopPropagation(t)}},_handleContextmenu:function(t){if(!1!==this.isSelected&&!1!==this.visibility){for(var e=this.getFeaturesInBounds(),o=0,i=e.length;o<i;o++){var n=!1;if(null!=e[o].graphic&&e[o].graphic._containsPoint(this._map.latLngToLayerPoint(t.latlng))&&(n=!0),null==e[o].graphic&&e[o].components.length>0)for(var l in e[o].components)if(e[o].components[l]._containsPoint(this._map.latLngToLayerPoint(t.latlng))){n=!0;break}if(n){this.fire(SuperMap.Plot.Event.movingtargetcontextmenu,{features:[e[o]]});break}}L.DomEvent.stopPropagation(t)}},_getSymbolDataFromCache:function(t,e){var o=L.supermap.plotting.getControl(this._map,this.serverUrl,{serviceParams:this.options.serviceParams}).getSymbolLibManager().getSymbolLibByLibId(t);return null!==o?o.getSymbolData(e):null},_cacheSymbolData:function(t){var e=L.supermap.plotting.getControl(this._map,this.serverUrl,{serviceParams:this.options.serviceParams}).getSymbolLibManager().getSymbolLibByLibId(t.libID);null!==e&&e.cacheSymbolData(t)},_generateFromFeature:function(t){var e="";if(t.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL){if(e=t.libID.toString()+"_"+t.code.toString()+"_"+Math.round(t.symbolSize.w).toString()+"_"+Math.round(t.symbolSize.h).toString()+"_"+t.textContent+"_"+t.annotationPosition.toString()+"_"+t.dRotate.toString()+this._styleToString(t.style)+"_"+t.textDisplay.toString()+"_"+t.surroundLineType.toString(),null!=t.symbolTexts&&t.symbolTexts.length>0)for(var o=0;o<t.symbolTexts.length;o++)e+=this._symbolTextToString(t.symbolTexts[o]);if(null!=t.bloodVolumes&&t.bloodVolumes.length>0)for(var i=0;i<t.bloodVolumes.length;i++)e+=this._bloodVolumeToString(t.bloodVolumes[i]);if(null!=t.pictureFrames&&t.pictureFrames.length>0)for(var n=0;n<t.pictureFrames.length;n++)e+=this._pictureFrameToString(t.pictureFrames[n])}else t.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT?(e=t.libID.toString()+"_"+t.code.toString()+"_"+t.associatedUuid+"_"+t.addFrame.toString(),1===t.symbolTexts.length&&(e+=this._symbolTextToString(t.symbolTexts[0]))):t.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1&&(e=t.libID.toString()+"_"+t.code.toString()+"_"+t.associatedUuid+"_"+t.textContent+"_"+t.space.toString()+"_"+t.offsetX.toString()+"_"+t.offsetY.toString()+this._styleToString(t.style));return e},_symbolTextToString:function(t){var e="";return null!=t.textContent&&(e+="_"+t.textContent),null!=t.textPosition&&(e+="_"+t.textPosition.toString()),null!=t.offsetX&&(e+="_"+t.offsetX.toString()),null!=t.offsetY&&(e+="_"+t.offsetY.toString()),null!=t.border&&(e+="_"+t.border.toString()),null!=t.showRelationLine&&(e+="_"+t.showRelationLine.toString()),null!=t.paddingX&&(e+="_"+t.paddingX.toString()),null!=t.paddingY&&(e+="_"+t.paddingY.toString()),null!=t.style&&(e+=this._styleToString(t.style)),null!=t.lineStyle&&(null!=t.lineStyle.color&&(e+="_"+t.lineStyle.color),null!=t.lineStyle.lineSymbolID&&(e+="_"+t.lineStyle.lineSymbolID),null!=t.lineStyle.opacity&&(e+="_"+t.lineStyle.opacity),null!=t.lineStyle.weight&&(e+="_"+t.lineStyle.weight)),e},_bloodVolumeToString:function(t){var e="";return null!=t.volume&&(e+="_"+t.volume),null!=t.position&&(e+="_"+t.position.toString()),null!=t.offsetX&&(e+="_"+t.offsetX.toString()),null!=t.offsetY&&(e+="_"+t.offsetY.toString()),null!=t.width&&(e+="_"+t.width.toString()),null!=t.height&&(e+="_"+t.height.toString()),null!=t.style&&(null!=t.style.color&&(e+="_"+t.style.color),null!=t.style.opacity&&(e+="_"+t.style.opacity.toString()),null!=t.style.weight&&(e+="_"+t.style.weight.toString()),null!=t.style.remainingVolumeColor&&(e+="_"+t.style.remainingVolumeColor),null!=t.style.remainingVolumeOpacity&&(e+="_"+t.style.remainingVolumeOpacity.toString()),null!=t.style.consumeVolumeColor&&(e+="_"+t.style.consumeVolumeColor),null!=t.style.consumeVolumeOpacity&&(e+="_"+t.style.consumeVolumeOpacity.toString())),e},_pictureFrameToString:function(t){var e="";return null!=t.path&&(e+="_"+t.path),null!=t.position&&(e+="_"+t.position.toString()),null!=t.offsetX&&(e+="_"+t.offsetX.toString()),null!=t.offsetY&&(e+="_"+t.offsetY.toString()),null!=t.width&&(e+="_"+t.width.toString()),null!=t.height&&(e+="_"+t.height.toString()),e},_styleToString:function(t){var e="";return null!=t.fontFamily&&(e+="_"+t.fontFamily),null!=t.fontSize&&(e+="_"+t.fontSize),null!=t.fontColor&&(e+="_"+t.fontColor),null!=t.fontStroke&&(e+="_"+t.fontStroke),null!=t.fontStrokeColor&&(e+="_"+t.fontStrokeColor),null!=t.fontStrokeWidth&&(e+="_"+t.fontStrokeWidth),null!=t.fontBackground&&(e+="_"+t.fontBackground),null!=t.fontBackgroundColor&&(e+="_"+t.fontBackgroundColor),null!=t.fontShadow&&(e+="_"+t.fontShadow),null!=t.fontShadowColor&&(e+="_"+t.fontShadowColor),null!=t.fontShadowOffsetX&&(e+="_"+t.fontShadowOffsetX),null!=t.fontShadowOffsetY&&(e+="_"+t.fontShadowOffsetY),null!=t.color&&(e+="_"+t.color),null!=t.weight&&(e+="_"+t.weight),null!=t.opacity&&(e+="_"+t.opacity),null!=t.lineSymbolID&&(e+="_"+t.lineSymbolID),null!=t.dashArray&&(e+="_"+t.dashArray),null!=t.fill&&(e+="_"+t.fill),null!=t.fillSymbolID&&(e+="_"+t.fillSymbolID),null!=t.fillColor&&(e+="_"+t.fillColor),null!=t.fillOpacity&&(e+="_"+t.fillOpacity),null!=t.fillBackColor&&(e+="_"+t.fillBackColor),null!=t.fillBackOpacity&&(e+="_"+t.fillBackOpacity),null!=t.fillGradientMode&&(e+="_"+t.fillGradientMode),e}});L.supermap.plotting.movingTargetLayer=function(t,e,o){return new fu(t,e,o)};var Pu=L.Class.extend({_image:null,_lastPos:null,_lastImage:null,_latlng:null,_uuid:null,_trajectoryLine:null,_trajectoryPoints:null,_trajectoryPointGraphic:{},_detectionRange:null,_detectionRangePoints:null,_rotation:null,options:{graphicWidth:0,graphicHeight:0},initialize:function(t,e){e=e||{},this.feature=t,t.graphic=this,this._latlng=e._latlng,this._image=e._image,this._uuid=e._uuid,this._rotation=0,this._trajectoryPoints=[]},onAdd:function(t){this.feature.movingTarget=!0,this.feature._map=t._map,this.feature.layer=t,this.layer=t,this._renderer=t._renderer,this._map=t._map,this.update()},onRemove:function(){null!=this._trajectoryLine&&this.layer instanceof fu&&this.layer._removeTrajectory(this._trajectoryLine);for(var t=0;t<this._trajectoryPoints.length;t++)this.layer._removeTrajectory(this._trajectoryPoints[t]);null!=this._detectionRange&&this.layer instanceof fu&&this.layer._removeDetectionRange(this._detectionRange),this.feature._clearComponents(),this.layer=null,this._renderer=null,this._map=null,delete this.feature.graphic,delete this.feature.movingTarget},redraw:function(){null!=this.layer&&null!=this._renderer&&this.layer.getVisibility()&&this.layer.updateFeatures(this.feature)},update:function(){if(null!=this.layer&&null!=this._renderer&&this.layer.isGraphic(this.feature.symbolType)){if(this.feature.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT||this.feature.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1){var t=this._map.getFeatureByUuid(this.feature.associatedUuid);if(null==t||"none"===t.style.display)return}if(this._project(),this.layer._renderer._extendRedrawBounds(this),"function"==typeof this.layer.getVisibility&&!0===this.layer.getVisibility()&&"none"!==this.feature.style.display&&this._map.getBounds().contains(this.feature.getLatLngs()[0])){var e=this._uuid,o="";null!=this._image&&(o=this._image.generateUuidFromFeature()),e!==o&&(this.layer.cacheImages[e]&&0==--this.layer.cacheImages[e].imgCount&&delete this.layer.cacheImages[e],this.layer.cacheImages[o]?this._cloneImage(o):(null==this._image&&(this._image=new Lu(this.feature)),this._image.render(),this.layer.cacheImages[o]={img:this._image.getCacheInfo(),imgCount:1}),this._uuid=o)}if(this.setLatLng(this.feature.getLatLngs()[0]),this.feature.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL){if(this.feature.layer instanceof fu){var i=this._map.getScale();this.feature.layer.getVisibility()&&("function"!=typeof this.feature.layer.getMarkerMinVisibleScale&&"function"!=typeof this.feature.layer.getMarkerMaxVisibleScale||"function"==typeof this.feature.layer.getMarkerMinVisibleScale&&"function"!=typeof this.feature.layer.getMarkerMaxVisibleScale&&(i>=this.feature.layer.getMarkerMinVisibleScale()||0===this.feature.layer.getMarkerMinVisibleScale())||"function"!=typeof this.feature.layer.getMarkerMinVisibleScale&&"function"==typeof this.feature.layer.getMarkerMaxVisibleScale&&(0===this.feature.layer.getMarkerMaxVisibleScale()||i<=this.feature.layer.getMarkerMaxVisibleScale())||"function"==typeof this.feature.layer.getMarkerMinVisibleScale&&"function"==typeof this.feature.layer.getMarkerMaxVisibleScale&&0===this.feature.layer.getMarkerMaxVisibleScale()&&i>=this.feature.layer.getMarkerMinVisibleScale()||"function"==typeof this.feature.layer.getMarkerMinVisibleScale&&"function"==typeof this.feature.layer.getMarkerMaxVisibleScale&&0===this.feature.layer.getMarkerMinVisibleScale()&&i<=this.feature.layer.getMarkerMaxVisibleScale()||"function"==typeof this.feature.layer.getMarkerMinVisibleScale&&"function"==typeof this.feature.layer.getMarkerMaxVisibleScale&&(0===this.feature.layer.getMarkerMinVisibleScale()&&0===this.feature.layer.getMarkerMaxVisibleScale()||i>=this.feature.layer.getMarkerMinVisibleScale()&&i<=this.feature.layer.getMarkerMaxVisibleScale()))&&this._updateSymbolTexts()}else this._updateSymbolTexts();this._updateJoinLines(),null==this._lastPos?this._lastPos=L.latLng(this._latlng.lat,this._latlng.lng):(this._lastPos.lat=this._latlng.lat,this._lastPos.lng=this._latlng.lng),null==this._lastImage&&null!=this._image?this._lastImage=[this._image.size[0],this._image.size[1]]:null!=this._image&&(this._lastImage[0]=this._image.size[0],this._lastImage[1]=this._image.size[1])}}},getAssociatedGraphics:function(){for(var t=[],e=0;e<this.feature.geoSymbolTexts.length;e++){var o=this.feature.geoSymbolTexts[e];null!==o&&(null!=o.graphic&&null!=o.graphic.layer&&t.push(o.graphic))}return t},_updateSymbolTexts:function(){if(null!=this.feature.geoSymbolTexts&&0!==this.feature.geoSymbolTexts.length&&(null==this._lastPos||this._lastPos.lat!==this._latlng.lat||this._lastPos.lng!==this._latlng.lng||null==this._lastImage||this._lastImage[0]!=this._image.size[0]||this._lastImage[1]!=this._image.size[1]))for(var t=0;t<this.feature.geoSymbolTexts.length;t++){var e=this.feature.geoSymbolTexts[t];null!==e&&(null!=e.graphic&&null!=e.graphic.layer&&"none"!==e.style.display&&(e.graphic._project(),this._renderer._extendRedrawBounds(e.graphic),e._calculatePositionPoints(),e.graphic.update()))}},_updateJoinLines:function(){if(null!=this.feature.joinLines&&0<this.feature.joinLines.length&&(null==this._lastPos||this._lastPos.lat!==this._latlng.lat||this._lastPos.lng!==this._latlng.lng))for(var t=0;t<this.feature.joinLines.length;t++){var e=this.feature.joinLines[t];null!==e&&null!=e.layer&&("none"!==e.style.display&&e instanceof ar&&e.redraw())}},setLatLng:function(t){if(this._latlng=t,this.layer instanceof fu&&(this.feature.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL||this.feature.symbolType===SuperMap.Plot.SymbolType.PICTURE)&&null!=this.feature.trajectory){if(this.feature.trajectory.addLatLng(t),"none"===this.feature.style.display){null!=this._trajectoryLine&&(this.layer._removeTrajectory(this._trajectoryLine),this._trajectoryLine=null);for(var e=0;e<this._trajectoryPoints.length;e++)this.layer._removeTrajectory(this._trajectoryPoints[e]),delete this._trajectoryPoints[e],this._trajectoryPoints[e]=null;return this._trajectoryPoints.length=0,void(null!=this._detectionRange&&(this.layer._removeTrajectory(this._detectionRange),this._detectionRange=null))}if(!0===this.feature.autoRotation&&this.feature.trajectory.latlngs.length>=2){var o=new SuperMap.Geometry.Point(this.feature.trajectory.latlngs[this.feature.trajectory.latlngs.length-2].lng,this.feature.trajectory.latlngs[this.feature.trajectory.latlngs.length-2].lat),i=new SuperMap.Geometry.Point(this.feature.trajectory.latlngs[this.feature.trajectory.latlngs.length-1].lng,this.feature.trajectory.latlngs[this.feature.trajectory.latlngs.length-1].lat),n=SuperMap.Plot.PlottingUtil.radian(o,i)*SuperMap.Plot.PlottingUtil.RTOD;this._rotation=n-90}var l=this.feature.trajectory.getDisplayLatLngs(this._map.getBounds());if(!0===this.feature.trajectory.showTrackingLine?l.length<=1&&null!=this._trajectoryLine?(this.layer._removeTrajectory(this._trajectoryLine),delete this._trajectoryLine,this._trajectoryLine=null):l.length>1&&null===this._trajectoryLine?(this._trajectoryLine=L.polyline(l,{color:this.feature.trajectory.style.color,weight:this.feature.trajectory.style.weight,opacity:this.feature.trajectory.style.opacity}),this.layer._addTrajectory(this._trajectoryLine)):l.length>1&&null!==this._trajectoryLine&&(this._trajectoryLine.options.color===this.feature.trajectory.style.color&&this._trajectoryLine.options.weight===this.feature.trajectory.style.weight&&this._trajectoryLine.options.opacity===this.feature.trajectory.style.opacity||this._trajectoryLine.setStyle({color:this.feature.trajectory.style.color,weight:this.feature.trajectory.style.weight,opacity:this.feature.trajectory.style.opacity}),this._trajectoryLine.setLatLngs(l)):null!=this._trajectoryLine&&(this.layer._removeTrajectory(this._trajectoryLine),this._trajectoryLine=null),!0===this.feature.trajectory.showTrackingPoint){if(0===l.length&&this._trajectoryPoints.length>0){for(var a=0;a<this._trajectoryPoints.length;a++)this.layer._removeTrajectory(this._trajectoryPoints[a]),delete this._trajectoryPoints[a],this._trajectoryPoints[a]=null;this._trajectoryPoints.length=0}else if(l.length>0){var s=this.feature.trajectory.generateUuidKey(),r=[];if(Object.prototype.hasOwnProperty.call(this._trajectoryPointGraphic,s))for(var u=0;u<this._trajectoryPoints.length;){var p=SuperMap.Util.indexOf(l,this._trajectoryPoints[u].getLatLngs()[0]);-1!==p?(r.push(p),u++):(this.layer._removeTrajectory(this._trajectoryPoints[u]),delete this._trajectoryPoints[u],this._trajectoryPoints[u]=null,this._trajectoryPoints.splice(u,1))}else{for(var h=0;h<this._trajectoryPoints.length;h++)this.layer._removeTrajectory(this._trajectoryPoints[h]),delete this._trajectoryPoints[h],this._trajectoryPoints[h]=null;this._trajectoryPoints.length=0}for(var c=0;c<l.length;c++)if(-1===SuperMap.Util.indexOf(r,c)){var y={externalGraphic:this._generateTrackingPointImage(this.feature.trajectory.trackingPointStyle,this.feature.trajectory.trackingPointRadius,this.feature.trajectory.style,s),graphicWidth:2*this.feature.trajectory.trackingPointRadius,graphicHeight:2*this.feature.trajectory.trackingPointRadius},g=L.supermap.plotting.pointImage([l[c]],y);this.layer._addTrajectory(g),this._trajectoryPoints.push(g)}}}else{for(var f=0;f<this._trajectoryPoints.length;f++)this.layer._removeTrajectory(this._trajectoryPoints[f]),delete this._trajectoryPoints[f],this._trajectoryPoints[f]=null;this._trajectoryPoints.length=0}if(null!=this.feature.detectionRange)if(null==this.feature.detectionRange.style||null==this.feature.detectionRange.style.display||"none"!==this.feature.detectionRange.style.display){if(null!=this.feature.detectionRange.radius&&this.feature.detectionRange.radius>0||null!=this.feature.detectionRange.pixelRadius&&this.feature.detectionRange.pixelRadius>0||null!=this.feature.detectionRange.points&&this.feature.detectionRange.points.length>0){if(this._detectionRangePoints=[],null!=this.feature.detectionRange.radius&&this.feature.detectionRange.radius>0)for(var P=0;P<=360;P+=5){var d=SuperMap.Plot.PlottingUtil.destinationVincenty(L.latLng(this._latlng.lat,this._latlng.lng),360-P+90,1e3*this.feature.detectionRange.radius);this._detectionRangePoints.push(d)}else if(null!=this.feature.detectionRange.pixelRadius&&this.feature.detectionRange.pixelRadius>0){for(var S=new SuperMap.Geometry.Point(this._latlng.lng,this._latlng.lat),m=[],b=0;b<72;b++){var M=(5*b+1)*Math.PI/180,v=new SuperMap.Geometry.Point(Math.cos(M)*this.feature.detectionRange.pixelRadius+S.x,Math.sin(M)*this.feature.detectionRange.pixelRadius+S.y);m.push(v)}this._detectionRangePoints=detectionLatlngs.concat(L.Util.superMapPointsToLatLngs(m))}else null!=this.feature.detectionRange.points&&this.feature.detectionRange.points.length>0&&(this._detectionRangePoints=detectionLatlngs.concat(L.Util.superMapPointsToLatLngs(this.feature.detectionRange.points)));null==this.feature.composeDetectionRange?null==this._detectionRange?(this._detectionRange=L.polygon(this._detectionRangePoints,{color:this.feature.detectionRange.style.color,weight:this.feature.detectionRange.style.weight,opacity:this.feature.detectionRange.style.opacity,fill:this.feature.detectionRange.style.fill,fillColor:this.feature.detectionRange.style.fillColor,fillOpacity:this.feature.detectionRange.style.fillOpacity,smoothFactor:0}),this.layer._addDetectionRange(this._detectionRange)):(this._detectionRange.options.color===this.feature.detectionRange.style.color&&this._detectionRange.options.weight===this.feature.detectionRange.style.weight&&this._detectionRange.options.opacity===this.feature.detectionRange.style.opacity&&this._detectionRange.options.fill===this.feature.detectionRange.style.fill&&this._detectionRange.options.fillColor===this.feature.detectionRange.style.fillColor&&this._detectionRange.options.fillOpacity===this.feature.detectionRange.style.fillOpacity||this._detectionRange.setStyle({color:this.feature.detectionRange.style.color,weight:this.feature.detectionRange.style.weight,opacity:this.feature.detectionRange.style.opacity,fill:this.feature.detectionRange.style.fill,fillColor:this.feature.detectionRange.style.fillColor,fillOpacity:this.feature.detectionRange.style.fillOpacity}),this._detectionRange.setLatLngs(this._detectionRangePoints)):null!=this._detectionRange&&(this.layer._removeDetectionRange(this._detectionRange),delete this._detectionRange,this._detectionRange=null)}}else null!=this._detectionRange&&(this.layer._removeDetectionRange(this._detectionRange),delete this._detectionRange,this._detectionRange=null)}},setImage:function(t){this._image=t},setUuid:function(t){this._uuid=t},getLatLng:function(){return this._latlng},getImage:function(){return this._image},getUuid:function(){return this._uuid},_cloneImage:function(t){if(this.layer.cacheImages[t]){this.layer.cacheImages[t].imgCount++,null==this._image&&(this._image=new Lu(this.feature)),this._image._ctx.clearRect(0,0,this._image._ctx.width,this._image._ctx.height),this._image.anchor=L.point(this.layer.cacheImages[t].img.anchor.x,this.layer.cacheImages[t].img.anchor.y),this._image.size=[this.layer.cacheImages[t].img.size[0],this.layer.cacheImages[t].img.size[1]],this._image.redrawSize=[this.layer.cacheImages[t].img.redrawSize[0],this.layer.cacheImages[t].img.redrawSize[1]],this._image.redrawAnchor=L.point(this.layer.cacheImages[t].img.redrawAnchor.x,this.layer.cacheImages[t].img.redrawAnchor.y),this._image.bounds=L.latLngBounds(this.layer.cacheImages[t].img.bounds.getSouthEast(),this.layer.cacheImages[t].img.bounds.getNorthWest()),this._image.latLng=L.latLng(this.layer.cacheImages[t].img.latLng.lat,this.layer.cacheImages[t].img.latLng.lng),this._image.fromZoom=this.layer.cacheImages[t].img.fromZoom,null!=this._image.componentLatLngs&&this._image.componentLatLngs.length>0&&(this._image.componentLatLngs.length=0),this._image.componentLatLngs=[];for(var e=0;e<this.layer.cacheImages[t].img.componentLatLngs.length;e++)this._image.componentLatLngs.push(L.Util.cloneLatLngs(this.layer.cacheImages[t].img.componentLatLngs[e]));this._image.canvasEle.width=this._image.size[0],this._image.canvasEle.height=this._image.size[1],this._image._ctx.drawImage(this.layer.cacheImages[t].img.canvas,0,0),this._image.canvas=this._image._ctx.canvas,null!=this.layer.cacheImages[t].img.annotation?(null==this._image.annotation&&(this._image.annotation=new qs(this._image.feature)),this._image.annotation.clear(),this._image.annotation.anchor=L.point(this.layer.cacheImages[t].img.annotation.anchor.x,this.layer.cacheImages[t].img.annotation.anchor.y),this._image.annotation.size=[this.layer.cacheImages[t].img.annotation.size[0],this.layer.cacheImages[t].img.annotation.size[1]],this._image.annotation.position=this.layer.cacheImages[t].img.annotation.position,this._image.annotation.offsetX=this.layer.cacheImages[t].img.annotation.offsetX,this._image.annotation.offsetY=this.layer.cacheImages[t].img.annotation.offsetY,this._image.annotation.canvasEle.width=this._image.annotation.size[0],this._image.annotation.canvasEle.height=this._image.annotation.size[1],this._image.annotation._ctx.drawImage(this.layer.cacheImages[t].img.annotation.canvas,0,0),this._image.annotation.canvas=this._image.annotation._ctx.canvas):null!=this._image.annotation&&(delete this._image.annotation,this._image.annotation=null),null!=this._image.images&&this._image.images.length>0&&(this._image.images.length=0),this._image.images=[];for(var o=0;o<this.layer.cacheImages[t].img.images.length;o++){var i={};i=SuperMap.Util.copyAttributes(i,this.layer.cacheImages[t].img.images[o]),this._image.images.push(i)}null!=this._image.pictureFrames&&this._image.pictureFrames.length>0&&(this._image.pictureFrames.length=0),this._image.pictureFrames=[];for(var n=0;n<this.layer.cacheImages[t].img.pictureFrames.length;n++){var l={};l=SuperMap.Util.copyAttributes(l,this.layer.cacheImages[t].img.pictureFrames[n]),this._image.pictureFrames.push(l)}for(var a=0;a<this.layer.cacheImages[t].img.symbolTexts.length;a++)this._image.symbolTexts.length<=a&&this._image.symbolTexts.push(new qs(this._image.feature)),this._image.symbolTexts[a].clear(),this._image.symbolTexts[a].anchor=L.point(this.layer.cacheImages[t].img.symbolTexts[a].anchor.x,this.layer.cacheImages[t].img.symbolTexts[a].anchor.y),this._image.symbolTexts[a].size=[this.layer.cacheImages[t].img.symbolTexts[a].size[0],this.layer.cacheImages[t].img.symbolTexts[a].size[1]],this._image.symbolTexts[a].position=this.layer.cacheImages[t].img.symbolTexts[a].position,this._image.symbolTexts[a].offsetX=this.layer.cacheImages[t].img.symbolTexts[a].offsetX,this._image.symbolTexts[a].offsetY=this.layer.cacheImages[t].img.symbolTexts[a].offsetY,this._image.symbolTexts[a].canvasEle.width=this._image.symbolTexts[a].size[0],this._image.symbolTexts[a].canvasEle.height=this._image.symbolTexts[a].size[1],this._image.symbolTexts[a]._ctx.drawImage(this.layer.cacheImages[t].img.symbolTexts[a].canvas,0,0),this._image.symbolTexts[a].canvas=this._image.symbolTexts[a]._ctx.canvas;for(var s=this.layer.cacheImages[t].img.symbolTexts.length;s<this._image.symbolTexts.length;)delete this._image.symbolTexts[s],this._image.symbolTexts.splice(s,1);for(var r=0;r<this.layer.cacheImages[t].img.bloodVolumes.length;r++)this._image.bloodVolumes.length<=r&&this._image.bloodVolumes.push(new qs(this._image.feature)),this._image.bloodVolumes[r].clear(),this._image.bloodVolumes[r].anchor=L.point(this.layer.cacheImages[t].img.bloodVolumes[r].anchor.x,this.layer.cacheImages[t].img.bloodVolumes[r].anchor.y),this._image.bloodVolumes[r].size=[this.layer.cacheImages[t].img.bloodVolumes[r].size[0],this.layer.cacheImages[t].img.bloodVolumes[r].size[1]],this._image.bloodVolumes[r].position=this.layer.cacheImages[t].img.bloodVolumes[r].position,this._image.bloodVolumes[r].offsetX=this.layer.cacheImages[t].img.bloodVolumes[r].offsetX,this._image.bloodVolumes[r].offsetY=this.layer.cacheImages[t].img.bloodVolumes[r].offsetY,this._image.bloodVolumes[r].canvasEle.width=this._image.bloodVolumes[r].size[0],this._image.bloodVolumes[r].canvasEle.height=this._image.bloodVolumes[r].size[1],this._image.bloodVolumes[r]._ctx.drawImage(this.layer.cacheImages[t].img.bloodVolumes[r].canvas,0,0),this._image.bloodVolumes[r].canvas=this._image.bloodVolumes[r]._ctx.canvas;for(var u=this.layer.cacheImages[t].img.bloodVolumes.length;u<this._image.bloodVolumes.length;)delete this._image.bloodVolumes[u],this._image.bloodVolumes.splice(u,1)}},_getHandleAndCenterPoints:function(){var t={handlePoints:[],centerPoints:[]},e=this.getBounds();if(!e.isValid())return t;var o=L.point((e.min.x+e.max.x)/2,(e.min.y+e.max.y)/2),i=e.max.x-e.min.x,n=e.max.y-e.min.y,l=i;n>i&&(l=n),l+=10;var a=L.point(o.x-l/2,o.y+l/2),s=L.point(o.x-l/2,o.y-l/2),r=L.point(o.x+l/2,o.y-l/2),u=L.point(o.x+l/2,o.y+l/2),p=this._map.layerPointToLatLng(a),h=this._map.layerPointToLatLng(s),c=this._map.layerPointToLatLng(r),y=this._map.layerPointToLatLng(u);t.handlePoints=[p.clone(),h.clone(),c.clone(),y.clone()];for(var g=1,f=0;f<t.handlePoints.length;f++)t.handlePoints[f].nHandle=g++;for(f=0;f<t.handlePoints.length;f++)t.handlePoints[f].tag=f;var P=this._map.layerPointToLatLng(L.point((e.min.x+e.max.x)/2,(e.min.y+e.max.y)/2));return P.isCenterPoint=!0,t.centerPoints=[P],t},getBounds:function(){if(null!=this._latlng&&null!=this._image){var t=this._map.latLngToLayerPoint(this._latlng),e=!0===this.feature.autoRotation?-(this._rotation+this.getImage().feature.dRotate):-this.getImage().feature.dRotate,o=L.point(t.x-this._image.anchor.x,t.y-this._image.anchor.y),i=L.point(t.x+(this._image.size[0]-this._image.anchor.x),t.y+(this._image.size[1]-this._image.anchor.y)),n=this._map.layerPointToLatLng(o),l=this._map.layerPointToLatLng(i),a=new SuperMap.Geometry.Point(n.lng,n.lat),s=new SuperMap.Geometry.Point(l.lng,l.lat);SuperMap.Plot.PlottingUtil.rotateAngle(new SuperMap.Geometry.Point(this._latlng.lng,this._latlng.lat),(360-e)/180*Math.PI,a),SuperMap.Plot.PlottingUtil.rotateAngle(new SuperMap.Geometry.Point(this._latlng.lng,this._latlng.lat),(360-e)/180*Math.PI,s);var r=L.bounds(this._map.latLngToLayerPoint(L.latLng(a.y,a.x)),this._map.latLngToLayerPoint(L.latLng(s.y,s.x)));return r.min._floor(),r.max._ceil(),r}return null},_containsPoint:function(t){if(null!=this._latlng&&null!=this._image){var e=this._map.latLngToLayerPoint(this._latlng),o=!0===this.feature.autoRotation?-(this._rotation+this.getImage().feature.dRotate):-this.getImage().feature.dRotate,i=L.point(e.x-this._image.anchor.x,e.y-this._image.anchor.y),n=L.point(e.x+(this._image.size[0]-this._image.anchor.x),e.y+(this._image.size[1]-this._image.anchor.y)),l=this._map.layerPointToLatLng(i),a=this._map.layerPointToLatLng(n),s=new SuperMap.Geometry.Point(l.lng,l.lat),r=new SuperMap.Geometry.Point(a.lng,a.lat);SuperMap.Plot.PlottingUtil.rotateAngle(new SuperMap.Geometry.Point(this._latlng.lng,this._latlng.lat),(360-o)/180*Math.PI,s),SuperMap.Plot.PlottingUtil.rotateAngle(new SuperMap.Geometry.Point(this._latlng.lng,this._latlng.lat),(360-o)/180*Math.PI,r);var u=L.bounds(this._map.latLngToLayerPoint(L.latLng(s.y,s.x)),this._map.latLngToLayerPoint(L.latLng(r.y,r.x)));if(u.min._floor(),u.max._ceil(),null!=u&&u.contains(t))return!0}return!1},_project:function(){if(null!=this._latlng&&null!=this._image){var t=this._map.latLngToLayerPoint(this._latlng),e=L.point(t.x-this._image.redrawAnchor.x,t.y-this._image.redrawAnchor.y),o=L.point(t.x+(this._image.redrawSize[0]-this._image.redrawAnchor.x),t.y+(this._image.redrawSize[1]-this._image.redrawAnchor.y));this._pxBounds=L.bounds(e,o),this._pxBounds.min._floor(),this._pxBounds.max._ceil()}},_generateTrackingPointImage:function(t,e,o,i){var n=null;if(Object.prototype.hasOwnProperty.call(this._trajectoryPointGraphic,i))return this._trajectoryPointGraphic[i];delete this._trajectoryPointGraphic;var l=document.createElement("canvas");l.width=2*e+2*o.weight,l.height=2*e+2*o.weight,document.body.appendChild(l);var a=l.getContext("2d");return 0===t?(a.fillStyle=o.color,a.beginPath(),a.arc(e+o.weight,e+o.weight,e,0,2*Math.PI),a.fill()):1===t?(a.globalAlpha=o.opacity,a.strokeStyle=o.color,a.lineWidth=o.weight,a.beginPath(),a.arc(e+o.weight,e+o.weight,e,0,2*Math.PI),a.stroke()):2===t?(a.fillStyle=o.color,a.beginPath(),a.moveTo(o.weight,2*e+o.weight),a.lineTo(2*e+o.weight,2*e+o.weight),a.lineTo(e+o.weight,o.weight),a.lineTo(o.weight,2*e+o.weight),a.fill()):3===t?(a.globalAlpha=o.opacity,a.strokeStyle=o.color,a.lineWidth=o.weight,a.beginPath(),a.moveTo(o.weight,2*e+o.weight),a.lineTo(2*e+o.weight,2*e+o.weight),a.lineTo(e+o.weight,o.weight),a.lineTo(o.weight,2*e+o.weight),a.stroke()):4===t&&(a.globalAlpha=o.opacity,a.strokeStyle=o.color,a.lineWidth=o.weight,a.beginPath(),a.moveTo(o.weight,e+o.weight),a.lineTo(2*e+o.weight,e+o.weight),a.moveTo(e+o.weight,o.weight),a.lineTo(e+o.weight,2*e+o.weight),a.stroke()),n=l.toDataURL("image/png","image/octet-stream"),document.body.removeChild(l),this._trajectoryPointGraphic[i]=n,n}}),du=L.Path.extend({serverUrl:null,features:null,isLocked:!1,isEditable:!0,isSelected:!0,visibility:!0,cacheImages:null,graphics:null,_editLayer:null,options:{renderer:L.canvas()},getSelected:function(){return this.isSelected},setSelected:function(t){this.isSelected!==t&&(this.isSelected=t,this._map&&this._map.getPlotEditControl()&&(this.isSelected?this._map.getPlotEditControl().enableEditFeatures(this.features):(this._map.getPlotEditControl().unselectFeatures(this.features),this._map.getPlotEditControl().disableEditFeatures(this.features))))},getEditable:function(){return this.isEditable},setEditable:function(t){if(this.isEditable!==t&&(this.isEditable=t,this._map&&this._map.getPlotEditControl())){var e=this._map.getPlotEditControl().getSelectedFeatures();this._map.getPlotEditControl().unselectFeatures(this.features),this._map.getPlotEditControl().selectFeatures(e)}},getLocked:function(){return this.isLocked},setLocked:function(t){if(this.isLocked!==t&&(this.isLocked=t,this._map&&this._map.getPlotEditControl())){var e=this._map.getPlotEditControl().getSelectedFeatures();this._map.getPlotEditControl().unselectFeatures(this.features),this._map.getPlotEditControl().selectFeatures(e)}},getVisibility:function(){return this.visibility},setVisibility:function(t){this.visibility!==t&&(this.visibility=t,this.visibility?this._renderer._container.style.display="block":this._renderer._container.style.display="none")},initialize:function(t,e,o){this._editLayer=new gu(t+"_temportary",e,{layer:this}),o=o||{},L.Util.setOptions(this,o),this.cacheImages={},this.graphics=[],this.selectedFeatures=[],this.name=t,this.serverUrl=e,this.features=[]},getSymZoomScale:function(t){return 1},getEvents:function(){var t={click:this._handleClick,mousemove:this._onMapMouseMove};return this._map._zoomAnimated&&(t.zoomanim=this._zoomAnim),t},_getSymbolDataFromCache:function(t,e){var o=L.supermap.plotting.getControl(this._map,this.serverUrl,{serviceParams:this.options.serviceParams}).getSymbolLibManager().getSymbolLibByLibId(t);return null!==o?o.getSymbolData(e):null},_cacheSymbolData:function(t){var e=L.supermap.plotting.getControl(this._map,this.serverUrl,{serviceParams:this.options.serviceParams}).getSymbolLibManager().getSymbolLibByLibId(t.libID);null!==e&&e.cacheSymbolData(t)},_zoomAnim:function(t){var e=this._map.getZoomScale(t.zoom),o=this._map._getCenterOffset(t.center)._multiplyBy(-e).subtract(this._map._getMapPanePos());L.DomUtil.setTransform?L.DomUtil.setTransform(this._canvas,o,e):L.DomUtil.setPosition(this._canvas,o)},_onMapMouseMove:function(t){var e=this._getGraphicsInBounds();if(0!==e.length)for(var o=0,i=e.length;o<i;o++){if(e[o]._containsPoint(this._map.latLngToLayerPoint(t.latlng))){this._editLayer._renderer._container.style.cursor=e[o].feature.isSelected?"move":"pointer";break}this._editLayer._renderer._container.style.cursor=""}},isGraphic:function(t){return t===SuperMap.Plot.SymbolType.DOTSYMBOL},isSupportType:function(t){return t===SuperMap.Plot.SymbolType.DOTSYMBOL},getFeatureByUuid:function(t){for(var e=0;e<this.features.length;e++)if(this.features[e].uuid===t)return this.features[e];return null},getFeatures:function(){return this.features.slice()},addFeatures:function(t){L.Util.isArray(t)||(t=[t]);for(var e=0,o=t.length;e<o;e++){var i=t[e];if(this.isSupportType(i.symbolType)){if(null!=this._map.getFeatureByUuid(i.uuid)&&(i.uuid=SuperMap.Plot.PlottingUtil.generateUuid()),i.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL){var n=new Pu(i);n.onAdd(this),this.graphics.push(n)}this.features.push(i)}}this._update()},removeFeatures:function(t){var e=[];SuperMap.Util.isArray(t)||(t=[t]);for(var o=0,i=t.length;o<i;o++){var n=t[o];-1!=SuperMap.Util.indexOf(this.features,n)&&e.push(n.graphic)}this.fire(SuperMap.Plot.Event.beforefeaturesremoved,{features:t}),this.removeGraphics(e),this.fire(SuperMap.Plot.Event.featuresremoved,{features:t,layername:this.name})},removeAllFeatures:function(){this.fire(SuperMap.Plot.Event.beforefeaturesremoved,{features:this.features}),this.removeAllGraphics(),this.fire(SuperMap.Plot.Event.featuresremoved,{features:this.features,layername:this.name})},updateGraphics:function(t){L.Util.isArray(t)||(t=[t]);t.map(function(t){return t.update(),t}),this._update()},removeGraphics:function(t){L.Util.isArray(t)||(t=[t]);var e=this;t.map(function(t){var o=SuperMap.Util.indexOf(e.selectedFeatures,t.feature);-1!==o&&(e._editLayer.removeFeatures(t.feature),e.selectedFeatures.splice(o,1)),e._map&&e._map.getPlotEditControl()&&(e._map.getPlotEditControl().unselectFeatures(t.feature),e._map.getPlotEditControl().disableEditFeatures(t.feature));var i=t.getUuid();return e.cacheImages[i]&&0==--e.cacheImages[i].imgCount&&delete e.cacheImages[i],-1!==(o=SuperMap.Util.indexOf(e.graphics,t))&&e.graphics.splice(o,1),t.onRemove(),-1!==(o=SuperMap.Util.indexOf(e.features,t.feature))&&e.features.splice(o,1),t}),this._update()},removeAllGraphics:function(){this.removeGraphics(this.graphics.slice()),this.selectedFeatures=[],this.graphics=[],this.features=[],this.cacheImages={}},redraw:function(){this._update()},_generateFromFeature:function(t){var e="";return t.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL?e=t.libID.toString()+"_"+t.code.toString()+"_"+Math.round(t.symbolSize.w).toString()+"_"+Math.round(t.symbolSize.h).toString()+"_"+t.textContent+"_"+t.annotationPosition.toString()+"_"+t.dRotate.toString()+this._styleToString(t.style)+"_"+t.textDisplay.toString()+"_"+t.surroundLineType.toString():t.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT?(e=t.libID.toString()+"_"+t.code.toString()+"_"+t.associatedUuid+"_"+t.addFrame.toString(),1===t.symbolTexts.length&&(null!=t.symbolTexts[0].textContent&&(e+="_"+t.symbolTexts[0].textContent),null!=t.symbolTexts[0].textPosition&&(e+="_"+t.symbolTexts[0].textPosition.toString()),null!=t.symbolTexts[0].offsetX&&(e+="_"+t.symbolTexts[0].offsetX.toString()),null!=t.symbolTexts[0].offsetY&&(e+="_"+t.symbolTexts[0].offsetY.toString()),null!=t.symbolTexts[0].style&&(e+=this._styleToString(t.symbolTexts[0].style)))):t.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1&&(e=t.libID.toString()+"_"+t.code.toString()+"_"+t.associatedUuid+"_"+t.textContent+"_"+t.space.toString()+"_"+t.offsetX.toString()+"_"+t.offsetY.toString()+this._styleToString(t.style)),e},_styleToString:function(t){var e="";return null!=t.fontFamily&&(e+="_"+t.fontFamily),null!=t.fontSize&&(e+="_"+t.fontSize),null!=t.fontColor&&(e+="_"+t.fontColor),null!=t.fontStroke&&(e+="_"+t.fontStroke),null!=t.fontStrokeColor&&(e+="_"+t.fontStrokeColor),null!=t.fontStrokeWidth&&(e+="_"+t.fontStrokeWidth),null!=t.fontBackground&&(e+="_"+t.fontBackground),null!=t.fontBackgroundColor&&(e+="_"+t.fontBackgroundColor),null!=t.fontShadow&&(e+="_"+t.fontShadow),null!=t.fontShadowColor&&(e+="_"+t.fontShadowColor),null!=t.fontShadowOffsetX&&(e+="_"+t.fontShadowOffsetX),null!=t.fontShadowOffsetY&&(e+="_"+t.fontShadowOffsetY),null!=t.color&&(e+="_"+t.color),null!=t.weight&&(e+="_"+t.weight),null!=t.opacity&&(e+="_"+t.opacity),null!=t.lineSymbolID&&(e+="_"+t.lineSymbolID),null!=t.dashArray&&(e+="_"+t.dashArray),null!=t.fill&&(e+="_"+t.fill),null!=t.fillSymbolID&&(e+="_"+t.fillSymbolID),null!=t.fillColor&&(e+="_"+t.fillColor),null!=t.fillOpacity&&(e+="_"+t.fillOpacity),null!=t.fillBackColor&&(e+="_"+t.fillBackColor),null!=t.fillBackOpacity&&(e+="_"+t.fillBackOpacity),null!=t.fillGradientMode&&(e+="_"+t.fillGradientMode),e},onAdd:function(){this._canvas=document.createElement("canvas");var t=this._map.getPixelBounds().getSize().x,e=this._map.getPixelBounds().getSize().y;this._canvas.width=t,this._canvas.height=e,this._ctx=this._canvas.getContext("2d"),L.Path.prototype.onAdd.call(this),this._map.addLayer(this._editLayer)},onRemove:function(){L.Path.prototype.onRemove.call(this),this._map.removeLayer(this._editLayer)},_update:function(){this._map&&this.getVisibility()&&this._updatePath()},_containsPoint:function(){return!1},_updatePath:function(){this._renderer._ctx.clearRect(this._renderer._bounds.min.x,this._renderer._bounds.min.y,this._renderer._ctx.canvas.width,this._renderer._ctx.canvas.height),this._renderer._drawPlottingGraphics(this._getGraphicsInBounds())},_project:function(){var t=this;t._pxBounds=L.bounds(L.point(0,0),L.point(0,0)),t._getGraphicsInBounds().map(function(e){return e._project(),t._pxBounds.extend(e._pxBounds.min),t._pxBounds.extend(e._pxBounds.max),e})},_getGraphicsInBounds:function(){var t=[],e=this._map.getBounds();return this.graphics.map(function(o){return"none"!==o.feature.style.display&&e.contains(o.getLatLng())&&(null!=o.getImage()&&o.getUuid()===o.getImage().generateUuidFromFeature()||o.update(),t.push(o)),o}),t},_handleClick:function(t){var e=this;if(null!=e._map.getPlotEditControl()){if(0!==this.selectedFeatures.length)for(var o=0,i=this.selectedFeatures.length;o<i;o++)e._editLayer.removeFeatures(this.selectedFeatures),this.addFeatures(this.selectedFeatures);this.selectedFeatures=[];for(var n=e._getGraphicsInBounds(),l=0,a=n.length;l<a;l++)if(n[l]._containsPoint(this._map.latLngToLayerPoint(t.latlng))){this.removeFeatures(n[l].feature),e._editLayer.addFeatures(n[l].feature),e._map.getPlotEditControl()&&(e._map.getPlotEditControl().unselectFeatures(),n[l].feature.enableEdit||e._map.getPlotEditControl().enableEditFeatures(n[l].feature),e._map.getPlotEditControl().selectFeatures(n[l].feature)),this.selectedFeatures.push(n[l].feature),e._map.getPlotEditControl()&&(e._map.getPlotEditControl()._onTriggerMapClick=!1);break}L.DomEvent.stopPropagation(t)}}});L.supermap.plotting.graphicLayer=function(t,e,o){return new du(t,e,o)};o(203);L.Map.include({getFeatureByUuid:function(t){var e=[];for(var o in this._layers){var i;if(this._layers[o]instanceof bu)null!==(i=this._layers[o].getFeatureByUuid(t))&&e.push(i);if(this._layers[o]instanceof du)null!==(i=this._layers[o].getFeatureByUuid(t))&&e.push(i);if(this._layers[o]instanceof fu)null!==(i=this._layers[o].getFeatureByUuid(t))&&e.push(i)}return 0===e.length?null:e[0]},getScale:function(t){var e=0,o=this._layers;for(var i in o)if(o[i]instanceof L.TileLayer){e=o[i].getScale(t);break}return e},getPlottingLayers:function(){var t=[],e=this._layers;for(var o in e)e[o]instanceof bu&&t.push(e[o]);return t},clearPlottingLayers:function(){var t=this._layers;for(var e in t)t[e]instanceof bu&&(t[e].removeAllFeatures(),this.removeLayer(t[e]))},getLayer:function(t){var e=this._layers;for(var o in e)if(e[o]._leaflet_id===t)return e[o]},getLayersByName:function(t){return this.getLayersBy("name",t)},getLayersBy:function(t,e){return this.getBy("_layers",t,e)},getBy:function(t,e,o){var i="function"==typeof o.test,n=[];for(var l in this[t])n.push(this[t][l]);return SuperMap.Array.filter(n,function(t){return t[e]===o||i&&o.test(t[e])})},latLngToLayerPoint:function(t){return this.project(L.latLng(t))._subtract(this.getPixelOrigin())},getTiledMapLayer:function(){var t=[],e=this._layers;for(var o in e)"tilePane"==e[o].options.pane&&t.push(e[o]);return t}});o(293);L.Canvas.include({_drawPlottingGraphics:function(t){var e=this,o=[];t.map(function(t){if("function"==typeof t.layer.getVisibility&&!1===t.layer.getVisibility())return t;if("none"===t.feature.style.display)return t;if(t.feature.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT||t.feature.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1){var i=e._map.getFeatureByUuid(t.feature.associatedUuid);if(null==i||"none"===i.style.display)return t}return t.getImage().complete()?e._drawPlottingGraphic(t):o.push(t),t}),o.length>0&&setTimeout(function(){for(var t=0;t<o.length;t++)e._drawPlottingGraphic(o[t])},100),this._redrawBounds=null},_drawPlottingLayers:function(t){t.map(function(e){return e instanceof L.Polyline&&e._update(),e instanceof L.Polygon&&e._update(),t})},_drawPlottingGraphic:function(t){var e=this;if("none"===t.feature.style.display)return t;if(t.feature.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT||t.feature.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1){var o=e._map.getFeatureByUuid(t.feature.associatedUuid);if(null==o||"none"===o.style.display)return t}var i=e._map.latLngToLayerPoint(t.getLatLng()),n=t.getImage().img||t.getImage().canvas,l=i.x,a=i.y,s=-1*t.getImage().anchor.x,r=-1*t.getImage().anchor.y;e._ctx.save(),e._ctx.translate(l,a);var u=!0===t.feature.autoRotation?-(t._rotation+t.getImage().feature.dRotate):-t.getImage().feature.dRotate;e._ctx.rotate(u/180*Math.PI),e._ctx.translate(s,r);var p=L.Canvas.drawImageScaleFactor||(L.Canvas.drawImageScaleFactor=/android 2.1/.test(navigator.userAgent.toLowerCase())?320/window.screen.width:1);t.graphicHeight&&t.graphicWidth?e._ctx.drawImage(n,0,0,t.graphicHeight*p,t.graphicWidth*p):e._ctx.drawImage(n,0,0,t.getImage().size[0]*p,t.getImage().size[1]*p);for(var h=0;h<t.getImage().images.length;h++){var c=t.getImage().images[h].style,y=c.graphicWidth||c.graphicHeight,g=c.graphicHeight||c.graphicWidth;y=y||2*c.pointRadius,g=g||2*c.pointRadius;var f=void 0!==c.graphicXOffset?c.graphicXOffset:-.5*y,P=void 0!==c.graphicYOffset?c.graphicYOffset:-.5*g,d=t.getImage().images[h].point;e._ctx.translate(f,P);var S=L.supermap.plotting.getControl().imageManager[t.getImage().images[h].path];e._ctx.drawImage(S,d.x,d.y,y*p,g*p),e._ctx.translate(-f,-P)}e._ctx.translate(-s,-r),e._ctx.rotate(-u/180*Math.PI);var m=t.getImage().getBounds(t.getImage().feature.getLatLngs()[0],-u);if(null!=t.getImage().annotation){var b=null;switch(t.getImage().annotation.position){case SuperMap.Plot.AnnoPosition.LEFTTOP:b=L.latLng(m.getNorth(),m.getWest());break;case SuperMap.Plot.AnnoPosition.LEFTBOTTOM:b=L.latLng(m.getSouth(),m.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHTTOP:b=L.latLng(m.getNorth(),m.getEast());break;case SuperMap.Plot.AnnoPosition.RIGHTBOTTOM:b=L.latLng(m.getSouth(),m.getEast());break;case SuperMap.Plot.AnnoPosition.TOP:b=L.latLng(m.getNorth(),(m.getWest()+m.getEast())/2);break;case SuperMap.Plot.AnnoPosition.BOTTOM:b=L.latLng(m.getSouth(),(m.getWest()+m.getEast())/2);break;case SuperMap.Plot.AnnoPosition.LEFT:b=L.latLng((m.getSouth()+m.getNorth())/2,m.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHT:b=L.latLng((m.getSouth()+m.getNorth())/2,m.getEast())}var M=e._map.latLngToLayerPoint(b),v=M.x+t.getImage().annotation.offsetX-i.x,A=M.y+t.getImage().annotation.offsetY-i.y;e._ctx.translate(v,A),e._ctx.translate(-t.getImage().annotation.anchor.x,-t.getImage().annotation.anchor.y),e._ctx.drawImage(t.getImage().annotation.canvas,0,0,t.getImage().annotation.size[0]*p,t.getImage().annotation.size[1]*p),e._ctx.translate(t.getImage().annotation.anchor.x,t.getImage().annotation.anchor.y),e._ctx.translate(-v,-A)}for(var T=0;T<t.getImage().pictureFrames.length;T++){var _=null;switch(t.getImage().pictureFrames[T].position){case SuperMap.Plot.AnnoPosition.TOP:_=L.latLng(m.getNorth(),(m.getWest()+m.getEast())/2);break;case SuperMap.Plot.AnnoPosition.BOTTOM:_=L.latLng(m.getSouth(),(m.getWest()+m.getEast())/2);break;case SuperMap.Plot.AnnoPosition.LEFT:_=L.latLng((m.getSouth()+m.getNorth())/2,m.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHT:_=L.latLng((m.getSouth()+m.getNorth())/2,m.getEast())}var O=e._map.latLngToLayerPoint(_),x=O.x+t.getImage().pictureFrames[T].offsetX-i.x,w=O.y+t.getImage().pictureFrames[T].offsetY-i.y;e._ctx.translate(x,w);var E=t.getImage().pictureFrames[T].style,C=E.graphicWidth||E.graphicHeight,I=E.graphicHeight||E.graphicWidth;C=C||2*E.pointRadius,I=I||2*E.pointRadius;var R=void 0!==E.graphicXOffset?E.graphicXOffset:-.5*C,D=void 0!==E.graphicYOffset?E.graphicYOffset:-.5*I;e._ctx.translate(R,D);var U=L.supermap.plotting.getControl().imageManager[t.getImage().pictureFrames[T].path];e._ctx.drawImage(U,0,0,C*p,I*p),e._ctx.translate(-R,-D),e._ctx.translate(-x,-w)}if(t.feature.layer instanceof fu){var N=e._map.getScale();if(t.feature.layer.getVisibility()&&("function"!=typeof t.feature.layer.getMarkerMinVisibleScale&&"function"!=typeof t.feature.layer.getMarkerMaxVisibleScale||"function"==typeof t.feature.layer.getMarkerMinVisibleScale&&"function"!=typeof t.feature.layer.getMarkerMaxVisibleScale&&(N>=t.feature.layer.getMarkerMinVisibleScale()||0===t.feature.layer.getMarkerMinVisibleScale())||"function"!=typeof t.feature.layer.getMarkerMinVisibleScale&&"function"==typeof t.feature.layer.getMarkerMaxVisibleScale&&(0===t.feature.layer.getMarkerMaxVisibleScale()||N<=t.feature.layer.getMarkerMaxVisibleScale())||"function"==typeof t.feature.layer.getMarkerMinVisibleScale&&"function"==typeof t.feature.layer.getMarkerMaxVisibleScale&&0===t.feature.layer.getMarkerMaxVisibleScale()&&N>=t.feature.layer.getMarkerMinVisibleScale()||"function"==typeof t.feature.layer.getMarkerMinVisibleScale&&"function"==typeof t.feature.layer.getMarkerMaxVisibleScale&&0===t.feature.layer.getMarkerMinVisibleScale()&&N<=t.feature.layer.getMarkerMaxVisibleScale()||"function"==typeof t.feature.layer.getMarkerMinVisibleScale&&"function"==typeof t.feature.layer.getMarkerMaxVisibleScale&&(0===t.feature.layer.getMarkerMinVisibleScale()&&0===t.feature.layer.getMarkerMaxVisibleScale()||N>=t.feature.layer.getMarkerMinVisibleScale()&&N<=t.feature.layer.getMarkerMaxVisibleScale())))for(var B=0;B<t.getImage().symbolTexts.length;B++){var k=null;switch(t.getImage().symbolTexts[B].position){case SuperMap.Plot.AnnoPosition.LEFTTOP:k=L.latLng(m.getNorth(),m.getWest());break;case SuperMap.Plot.AnnoPosition.LEFTBOTTOM:k=L.latLng(m.getSouth(),m.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHTTOP:k=L.latLng(m.getNorth(),m.getEast());break;case SuperMap.Plot.AnnoPosition.RIGHTBOTTOM:k=L.latLng(m.getSouth(),m.getEast());break;case SuperMap.Plot.AnnoPosition.TOP:k=L.latLng(m.getNorth(),(m.getWest()+m.getEast())/2);break;case SuperMap.Plot.AnnoPosition.BOTTOM:k=L.latLng(m.getSouth(),(m.getWest()+m.getEast())/2);break;case SuperMap.Plot.AnnoPosition.LEFT:k=L.latLng((m.getSouth()+m.getNorth())/2,m.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHT:k=L.latLng((m.getSouth()+m.getNorth())/2,m.getEast());break;case SuperMap.Plot.AnnoPosition.ANCHOR:k=L.latLng(t.getLatLng().lat,t.getLatLng().lng)}var F=e._map.latLngToLayerPoint(k),V=F.x+t.getImage().symbolTexts[B].offsetX-i.x,j=F.y+t.getImage().symbolTexts[B].offsetY-i.y;e._ctx.translate(V,j),e._ctx.translate(-t.getImage().symbolTexts[B].anchor.x,-t.getImage().symbolTexts[B].anchor.y),e._ctx.drawImage(t.getImage().symbolTexts[B].canvas,0,0,t.getImage().symbolTexts[B].size[0]*p,t.getImage().symbolTexts[B].size[1]*p),e._ctx.translate(t.getImage().symbolTexts[B].anchor.x,t.getImage().symbolTexts[B].anchor.y),e._ctx.translate(-V,-j)}}else for(var Y=0;Y<t.getImage().symbolTexts.length;Y++){var z=null;switch(t.getImage().symbolTexts[Y].position){case SuperMap.Plot.AnnoPosition.LEFTTOP:z=L.latLng(m.getNorth(),m.getWest());break;case SuperMap.Plot.AnnoPosition.LEFTBOTTOM:z=L.latLng(m.getSouth(),m.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHTTOP:z=L.latLng(m.getNorth(),m.getEast());break;case SuperMap.Plot.AnnoPosition.RIGHTBOTTOM:z=L.latLng(m.getSouth(),m.getEast());break;case SuperMap.Plot.AnnoPosition.TOP:z=L.latLng(m.getNorth(),(m.getWest()+m.getEast())/2);break;case SuperMap.Plot.AnnoPosition.BOTTOM:z=L.latLng(m.getSouth(),(m.getWest()+m.getEast())/2);break;case SuperMap.Plot.AnnoPosition.LEFT:z=L.latLng((m.getSouth()+m.getNorth())/2,m.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHT:z=L.latLng((m.getSouth()+m.getNorth())/2,m.getEast());break;case SuperMap.Plot.AnnoPosition.ANCHOR:z=L.latLng(t.getLatLng().lat,t.getLatLng().lng)}var G=e._map.latLngToLayerPoint(z),W=G.x+t.getImage().symbolTexts[Y].offsetX-i.x,X=G.y+t.getImage().symbolTexts[Y].offsetY-i.y;e._ctx.translate(W,X),e._ctx.translate(-t.getImage().symbolTexts[Y].anchor.x,-t.getImage().symbolTexts[Y].anchor.y),e._ctx.drawImage(t.getImage().symbolTexts[Y].canvas,0,0,t.getImage().symbolTexts[Y].size[0]*p,t.getImage().symbolTexts[Y].size[1]*p),e._ctx.translate(t.getImage().symbolTexts[Y].anchor.x,t.getImage().symbolTexts[Y].anchor.y),e._ctx.translate(-W,-X)}for(var H=0;H<t.getImage().bloodVolumes.length;H++){var Z=null;switch(t.getImage().bloodVolumes[H].position){case SuperMap.Plot.AnnoPosition.TOP:Z=L.latLng(m.getNorth(),(m.getWest()+m.getEast())/2);break;case SuperMap.Plot.AnnoPosition.BOTTOM:Z=L.latLng(m.getSouth(),(m.getWest()+m.getEast())/2);break;case SuperMap.Plot.AnnoPosition.LEFT:Z=L.latLng((m.getSouth()+m.getNorth())/2,m.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHT:Z=L.latLng((m.getSouth()+m.getNorth())/2,m.getEast())}var J=e._map.latLngToLayerPoint(Z),q=J.x+t.getImage().bloodVolumes[H].offsetX-i.x,K=J.y+t.getImage().bloodVolumes[H].offsetY-i.y;e._ctx.translate(q,K),e._ctx.translate(-t.getImage().bloodVolumes[H].anchor.x,-t.getImage().bloodVolumes[H].anchor.y),e._ctx.drawImage(t.getImage().bloodVolumes[H].canvas,0,0,t.getImage().bloodVolumes[H].size[0]*p,t.getImage().bloodVolumes[H].size[1]*p),e._ctx.translate(t.getImage().bloodVolumes[H].anchor.x,t.getImage().bloodVolumes[H].anchor.y),e._ctx.translate(-q,-K)}e._ctx.restore()},_updateTextPt:function(t,e){var o=e.options,i=1;100!==o.fontPercent&&(i=o.fontPercent/100),this._ctx.fillStyle=o.fontColor,!0===o.fontStroke&&(this._ctx.strokeStyle=o.fontStrokeColor,this._ctx.setLineDash([]),this._ctx.lineWidth=o.fontStrokeWidth),this._ctx.globalAlpha=o.fontOpacity||1;var n=[o.fontStyle?o.fontStyle:"normal","normal",o.fontWeight?o.fontWeight:"normal",o.fontSize?o.fontSize+"px":"1em",o.fontFamily?o.fontFamily:"sans-serif"].join(" "),l=o.text.split("\n"),a=l.length;if(this._ctx.fillText){this._ctx.font=n,this._ctx.textAlign=L.Canvas.LABEL_ALIGN[o.labelAlign[0]]||"center",this._ctx.textBaseline=L.Canvas.LABEL_ALIGN[o.labelAlign[1]]||"middle";var s=L.Canvas.LABEL_FACTOR[o.labelAlign[1]];null==s&&(s=-.5);var r=this._ctx.measureText("Mg").height||this._ctx.measureText("xx").width;t.y+=r*s*(a-1);for(var u=0;u<a;u++)if(0!=o.fontSpace){var p=0,h=l[u].split(""),c=this._ctx.measureText(l[u]).width+o.fontSpace*(h.length-1),y=o.labelAlign[0]||"c";"c"===y?p-=c/2-this._ctx.measureText(l[u][0]).width/2:"r"===y&&(p-=c-o.fontSize);var g=0,f=l[u].split(""),P="";this._ctx.save(),this._ctx.translate(t.x,t.y),0!=o.labelRotation&&this._ctx.rotate(o.labelRotation*Math.PI/180),this._ctx.scale(i,1);for(var d=0;d<f.length;d++)!0===o.fontStroke&&this._ctx.strokeText(f[d],p+g,r*u),this._ctx.fillText(f[d],p+g,r*u),P+=f[d],g=this._ctx.measureText(P).width+parseFloat(o.fontSpace)*(d+1);this._ctx.restore()}else this._ctx.save(),this._ctx.translate(t.x,t.y),0!=o.labelRotation&&this._ctx.rotate(o.labelRotation*Math.PI/180),this._ctx.scale(i,1),!0===o.fontStroke&&this._ctx.strokeText(l[u],0,r*u),this._ctx.fillText(l[u],0,r*u),this._ctx.restore()}},_updateText:function(t){if(void 0!=t.options.text&&!(t.options.fontSize<6)){void 0===t.options.fontPercent&&(t.options.fontPercent=100),t.options.fontPercent<0&&(t.options.fontPercent=0),t.options.fontPercent>400&&(t.options.fontPercent=400),void 0===t.options.fontSpace&&(t.options.fontSpace=0),t.options.fontSpace>30||t.options.fontSpace<0&&(t.options.fontSpace=0);var e=t._latlng,o=this._map.latLngToLayerPoint(e);if(void 0!=o){if(t.options.labelXOffset||t.options.labelYOffset){var i=isNaN(t.options.labelXOffset)?0:t.options.labelXOffset,n=isNaN(t.options.labelYOffset)?0:t.options.labelYOffset;o.x+=i,o.y-=n}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 a=t.getPxBounds();t.options.labelRotation=l;var s=a.min.x,r=a.min.y,u=a.max.x-a.min.x,p=a.max.y-a.min.y;this._ctx.fillStyle=t.options.fontBackgroundColor,this._ctx.globalAlpha=1,this._ctx.save(),this._ctx.translate(s,r),0!=t.options.labelRotation&&this._ctx.rotate(t.options.labelRotation*Math.PI/180),this._ctx.fillRect(0,0,u,p),this._ctx.restore()}if(!0===t.options.fontShadow){var h=L.point(o.x,o.y);if(t.options.fontShadowOffsetX&&(h.x+=t.options.fontShadowOffsetX),t.options.fontShadowOffsetY&&(h.y+=t.options.fontShadowOffsetY),0!==t.options.labelRotation){var c=o.x,y=o.y,g=t.options.labelRotation*Math.PI/180,f=Math.sqrt(Math.pow(h.x-c,2)+Math.pow(h.y-y,2)),P=g+Math.atan2(h.y-y,h.x-c);h.x=c+f*Math.cos(P),h.y=y+f*Math.sin(P)}var d=t.options.fontStroke;t.options.fontStroke=!1;var S=t.options.fontColor;t.options.fontColor=t.options.fontShadowColor,this._updateTextPt(h,t),t.options.fontColor=S,t.options.fontStroke=d}if(Object.prototype.hasOwnProperty.call(t,"_eventParents"))for(var m in t._eventParents)Object.prototype.hasOwnProperty.call(t._eventParents[m],"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(o,t)}}},_updateImage:function(t){var e=this,o=function(){var t=this.style,o=t.graphicWidth||t.graphicHeight,i=t.graphicHeight||t.graphicWidth;o=o||2*t.pointRadius,i=i||2*t.pointRadius;var n=-.5*o+t.graphicXOffset,l=-.5*i+t.graphicYOffset,a=t.graphicOpacity||t.fillOpacity,s=this.point,r=s.x,u=s.y;if(!isNaN(r)&&!isNaN(u)){var p;e._ctx.save(),t.rotation&&(p=t.rotation/180*Math.PI),e._ctx.translate(r,u),p&&e._ctx.rotate(p),e._ctx.translate(n,l),e._ctx.globalAlpha=a;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,o*h,i*h),e._ctx.restore()}},i=new Image;"firefox"==SuperMap.Browser.name?(i.onload=function(){o.call({point:t._point,style:t.options,img:i}),i.onload=null},t.options.graphicTitle&&(i.title=t.options.graphicTitle),i.src=t.options.externalGraphic):(t.options.graphicTitle&&(i.title=t.options.graphicTitle),i.src=t.options.externalGraphic,i.onload=function(){o.call({point:t._point,style:t.options,img:i}),i.onload=null}),window.ActiveXObject||"ActiveXObject"in window?i.onload():i.complete&&i.onload()},_updateArc:function(t){if(this._drawing&&!t._empty()){var e=t._point,o=this._ctx,i=t._radius,n=(t._radiusY||i)/i,l=(360-t.options.endAngle)*(Math.PI/180),a=(360-t.options.startAngle)*(Math.PI/180);this._drawnLayers[t._leaflet_id]=t,1!==n&&(o.save(),o.scale(1,n)),o.beginPath(),o.arc(e.x,e.y/n,i,l,a,!1),1!==n&&o.restore(),this._fillStroke(o,t)}},_afterTo:function(t,e){var o=t._order;if(o){var i=o.next,n=o.prev;if(n)n.next=i;else if(i)return;i?i.prev=n:n&&(this._drawLast=n);var l=e._order,a=l.next;l.next=o,o.prev=l,a?(a.prev=o,o.next=a):(o.next=null,this._drawLast=o),this._requestRedraw(t)}},_beforePath:function(t,e){this._updateDashArray(t),this._layers[L.Util.stamp(t)]=t;var o=e._order,i=o.prev,n=t._order={layer:t,prev:i,next:o};null==n.prev?this._drawFirst=n:i.next=n,o.prev=n},_onClick:function(t){var e,o=this._map.mouseEventToLayerPoint(t),i=[],n=[],l=0;for(var a in this._map._layers)if(this._map._layers[a]._drawFirst)for(var s=this._map._layers[a]._drawFirst;s;s=s.next)if(s.layer.options.interactive&&s.layer._containsPoint(o)&&!this._map._draggableMoved(s.layer)&&(e=s.layer,Object.prototype.hasOwnProperty.call(e,"_eventParents")&&null!==e._eventParents))for(var r in e._eventParents)n.push(e),i.push(e._eventParents[r]);if(e&&n.length>1&&i.length>0){for(var u=!1,p=[],h=[],c=0,y=i.length;c<y;c++)i[c].isSelected&&i[c].moveend&&(u=!0),i[c].enableEdit&&(p.push(i[c]),h.push(n[c]));if(t.altKey){for(var g=0;g<i.length;g++){if(1===i[g].symbolType){l=g;break}i[g].getBounds().contains(i[l].getBounds())||(l=g)}return void this._fireEvent([h[l]],t)}for(var f=0,P=p.length;f<P;f++){if(p[f].isSelected&&p[f].moveend){this._fireEvent([h[f]],t);break}if(p[f].isSelected&&p.length>1){this._fireEvent([h[f]],t);break}if(!u){this._fireEvent([h[h.length-1]],t);break}}}this._fireEvent(!!e&&[e],t)}}),L.Polyline.prototype._containsPoint=function(t,e){var o,i,n,l,a,s,r=this._clickTolerance()+10;if(this._pxBounds&&!this._pxBounds.contains(t))return!1;for(o=0,l=this._parts.length;o<l;o++)for(i=0,n=(a=(s=this._parts[o]).length)-1;i<a;n=i++)if((e||0!==i)&&L.LineUtil.pointToSegmentDistance(t,s[n],s[i])<=r)return!0;return!1},L.Polygon.prototype._containsPoint=function(t){var e,o,i,n,l,a,s,r,u=!1;if(this._pxBounds&&!this._pxBounds.contains(t))return!1;for(n=0,s=this._parts.length;n<s;n++)for(l=0,a=(r=(e=this._parts[n]).length)-1;l<r;a=l++)o=e[l],i=e[a],o.y>t.y!=i.y>t.y&&t.x<(i.x-o.x)*(t.y-o.y)/(i.y-o.y)+o.x&&(u=!u);return u||L.Polyline.prototype._containsPoint.call(this,t,!0)},L.supermap.plotting.Text.prototype._containsPoint=function(t){return this._pxBounds.contains(t)},L.supermap.plotting.PointImage.prototype._containsPoint=function(t){return this._pxBounds.contains(t)},L.Canvas.LABEL_ALIGN={l:"left",r:"right",t:"hanging",b:"alphabetic"},L.Canvas.LABEL_FACTOR={l:0,r:-1,t:0,b:-1},L.Canvas.drawImageScaleFactor=null;var Su=L.Control.extend({_mouseTolerance:10,_editMarkers:null,_editMode:SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE,feature:null,_temportary:null,options:{avoidRegionStyle:{fill:!1,color:"#0000ff",dashArray:"2, 2",opacity:1,weight:1},draggable:!0,avoidIcon:L.divIcon({className:"leaflet-supermap-plot-avoid-icon-path",iconSize:[8,8]}),icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"})},initialize:function(t,e){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&(this.options.avoidIcon=L.divIcon({className:"leaflet-supermap-plot-avoid-icon-path",iconSize:[15,15]}),this.options.icon=new L.DivIcon({iconSize:new L.Point(15,15),className:"leaflet-div-icon leaflet-editing-icon"})),L.Control.prototype.initialize.call(this,e),L.setOptions(this,e),this._temportary=new yu("avoidRegionControl-temportary",t.serverUrl,{serviceParams:t.serviceParams}),this._editMarkers={},this.feature=t},onAdd:function(t){if(this.feature&&!this.feature.getLocked())return this.controlDiv=L.DomUtil.create("div","supermap-iclient-avoidregion"),this._map=t,this._markers=[],this._latlngs=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._map.addLayer(this._temportary),this._map.on("mousemove",this._onMouseMove,this).on("click",this._onMapClick,this),this._showAvoidRegions(),this.controlDiv},onRemove:function(){this._hideAvoidRegions(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,delete this._latlngs,this.plotting&&(this._temportary.removeFeatures(this.plotting),delete this.plotting,this.plotting=null),this._map.removeLayer(this._temportary),delete this._temportary,this._map.off("mousemove",this._onMouseMove,this).off("click",this._onMapClick,this)},_showAvoidRegions:function(){for(var t=0;t<this.feature.avoidRegions.length;t++){var e=this.feature.avoidRegions[t];this._temportary.addFeatures(e),this._selectFeature(e)}},_hideAvoidRegions:function(){for(var t=0;t<this.feature.avoidRegions.length;t++){var e=this.feature.avoidRegions[t];this._unselectFeature(e),this._temportary.removeFeatures(e)}},_selectFeature:function(t){t.symbolType===SuperMap.Plot.SymbolType.AVOIDREGION&&(this._collectEditMarkers(t),t.on("mousemove",this._onMouseMove,this).on("mouseout",this._onMouseOut,this).on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this),t.dragging.enable())},_unselectFeature:function(t){t.symbolType===SuperMap.Plot.SymbolType.AVOIDREGION&&(this._removeMarkers(t),t.off("mousemove",this._onMouseMove,this).off("mouseout",this._onMouseOut,this).off("dragstart",this._onDragStart,this).off("drag",this._onDrag,this).off("dragend",this._onDragEnd,this),t.dragging.disable())},_onMouseOut:function(t){t.target.layer._renderer._container.style.cursor=""},_onMapClick:function(t){if(this.moveend)this.moveend=!1;else{var e=this._map.mouseEventToLayerPoint(t.originalEvent),o=this._map.layerPointToLatLng(e);this.plotting?this._addVertex(o):(this.plotting=L.supermap.plotting.avoidRegion(0,SuperMap.Plot.SymbolType.AVOIDREGION,[],{style:this.options.avoidRegionStyle}),this._temportary.addFeatures(this.plotting),this._addVertex(o)),L.DomEvent.preventDefault(t.originalEvent)}},_collectEditMarkers:function(t){var e=[];if(t.symbolType===SuperMap.Plot.SymbolType.AVOIDREGION)for(var o in t.getLatLngs()){var i=new L.LatLng(t.getLatLngs()[o].lat,t.getLatLngs()[o].lng),n=L.supermap.plotting.editMarker(i,{icon:this.options.avoidIcon,nHandle:-1,tag:o});this._addToMapAndBindMarker(n),e.push(n),n.owner=t}this._editMarkers[t.uuid]=e},_removeMarkers:function(t){var e=this._editMarkers[t.uuid];for(var o in e)this._unbindMarkerEvents(e[o]),this._map.removeLayer(e[o]);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],o=e.indexOf(t.target);this._map.removeLayer(e[o]),e.splice(o,1),t.target.owner.latLngs.splice(o,1),t.target.owner.redraw()}},_dragPoint:function(t){var e=t.target.owner;if(e.symbolType===SuperMap.Plot.SymbolType.AVOIDREGION){var o=this._editMarkers[e.uuid],i=SuperMap.Util.indexOf(o,t.target);e.getLatLngs()[i]=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 o=this._markers.length;o>1&&this._markers[o-1].on("click",this._finishShape,this),o>2&&this._markers[o-2].off("click",this._finishShape,this)},_finishShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this),L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&this._latlngs.length+1<this.plotting.maxEditPts&&this._latlngs.length!==this.plotting.getLatLngs().length&&this.plotting.setLatLngs(this._latlngs);var t=this.plotting.clone();this._markerGroup.clearLayers(),this._markers=[],this._latlngs=[],this._temportary.removeFeatures(this.plotting),delete this.plotting,this.plotting=null,this._temportary.addFeatures(t),this.feature.addAvoidRegion(t),this._selectFeature(t);var e=new SuperMap.Plot.Transaction;e.transType=SuperMap.Plot.TransactionType.EDIT;var o=new SuperMap.Plot.TransactionInfo;o.layerId=this.feature.layer._leaflet_id,o.uuid=this.feature.uuid,o.functionName="addAvoidRegion",o.undoParams=[t],o.redoParams=[t],e.transInfos.push(o),L.supermap.plotting.getControl().getTransManager().add(e),t.on("contextmenu",function(){})},_onDragStart:function(t){var e=t.target,o=this._editMarkers[e.uuid];for(var i in o)o[i].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),o=this._map.layerPointToLatLng(e);if(this.plotting){var i=L.Util.cloneLatLngs(this._latlngs);0===i.length?i.push(o):i[i.length-1].lat===o.lat&&i[i.length-1].lng===o.lng||i.push(o),this.plotting.setLatLngs(i)}L.DomEvent.preventDefault(t.originalEvent)}}),mu=(o(61),L.Path.extend({name:"子图层",caption:"子图层",visibility:!0,features:null,parent:null,initialize:function(t,e){e=e||{},L.Util.setOptions(this,e),null!=t&&(this.name=t),null!=e&&e.caption&&(this.caption=e.caption),this.features=[]},getParent:function(){return this.parent},setParent:function(t){this.parent=t},getVisibility:function(){return this.visibility},setVisibility:function(t){if(this.visibility!==t){this.visibility=t;for(var e=0;e<this.features.length;e++)if(this.features[e].redraw(),this._map&&this._map.getPlotEditControl()){if(Object.prototype.hasOwnProperty.call(this._map.getPlotEditControl()._editMarkers,this.features[e].uuid)){var o=this._map.getPlotEditControl()._editMarkers[this.features[e].uuid];for(var i in o)this.visibility?o[i].setOpacity(1):o[i].setOpacity(0)}null!=this.features[e].dragging&&null!=this.features[e].dragging.moveMarker&&(this.visibility?this.features[e].dragging.moveMarker.setOpacity(1):this.features[e].dragging.moveMarker.setOpacity(0))}}},addFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]);for(var e=t.slice(),o=0;o<t.length;o++)!(t[o]instanceof Qs)||t[o]instanceof $r||t[o]instanceof ar?e.splice(o,1):(t[o].childLayer=this,this.features.push(t[o]));L.supermap.plotting.getControl().getPlotMapManager().fire("featuresadded",{features:e,parent:this,layername:this.name})},removeFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]);for(var e=t.slice(),o=0,i=t.length;o<i;o++){var n=t[o];if(-1!=SuperMap.Util.indexOf(this.features,n)){var l=SuperMap.Util.indexOf(this.features,n);-1!==l&&this.features.splice(l,1),n.childLayer=null}else e.splice(o,1)}e.length>0&&L.supermap.plotting.getControl().getPlotMapManager().fire("featuresremoved",{features:e,parent:this,layername:this.name})},removeAllFeatures:function(){this.removeFeatures(this.features.slice()),this.features=[]},getFeatures:function(){return this.features.slice()}}));L.supermap.plotting.childPlotLayer=function(t,e){return new mu(t,e)};var bu=yu.extend({caption:"图元层",tolerancePixel:5,isLocked:!1,isEditable:!0,isSelected:!0,childPlotLayers:null,minVisibleScale:0,maxVisibleScale:0,addChildPlotLayer:function(t){for(var e=!0;e;){e=!1;for(var o=0;o<this.childPlotLayers.length;o++)if(this.childPlotLayers[o].name===t.name){t.name+="#1",e=!0;break}}this.childPlotLayers.push(t),t.setParent(this),L.supermap.plotting.getControl().getPlotMapManager().fire("childplotlayeradded",{childPlotLayer:t,parent:this})},getChildPlotLayers:function(){return this.childPlotLayers},removeChildPlotLayer:function(t){this.removeFeatures(t.features.slice());var e=SuperMap.Util.indexOf(this.childPlotLayers,t);-1!==e&&this.childPlotLayers.splice(e,1),L.supermap.plotting.getControl().getPlotMapManager().fire("childplotlayerremoved",{childPlotLayer:t,parent:this})},getMinVisibleScale:function(){return null==this.minVisibleScale&&(this.minVisibleScale=0),this.minVisibleScale},setMinVisibleScale:function(t){this.minVisibleScale=t,this.maxVisibleScale>1e-7&&this.maxVisibleScale<t&&(this.minVisibleScale=this.maxVisibleScale)},getMaxVisibleScale:function(){return null==this.maxVisibleScale&&(this.maxVisibleScale=1),this.maxVisibleScale},setMaxVisibleScale:function(t){this.maxVisibleScale=t,this.maxVisibleScale>1e-7&&this.maxVisibleScale<t&&(this.maxVisibleScale=this.minVisibleScale)},clearVisibleScale:function(){this.minVisibleScale=0,this.maxVisibleScale=0},getSelected:function(){return this.isSelected},setSelected:function(t){this.isSelected!==t&&(this.isSelected=t,this._map&&this._map.getPlotEditControl()&&(this.isSelected?this._map.getPlotEditControl().enableEditFeatures(this.features):(this._map.getPlotEditControl().unselectFeatures(this.features),this._map.getPlotEditControl().disableEditFeatures(this.features))))},getEditable:function(){return this.isEditable},setEditable:function(t){if(this.isEditable!==t&&(this.isEditable=t,this._map&&this._map.getPlotEditControl())){var e=this._map.getPlotEditControl().getSelectedFeatures();this._map.getPlotEditControl().unselectFeatures(this.features),this._map.getPlotEditControl().selectFeatures(e)}},getLocked:function(){return this.isLocked},setLocked:function(t){if(this.isLocked!==t&&(this.isLocked=t,this._map&&this._map.getPlotEditControl())){var e=this._map.getPlotEditControl().getSelectedFeatures();this._map.getPlotEditControl().unselectFeatures(this.features),this._map.getPlotEditControl().selectFeatures(e)}},getVisibility:function(){return this.visibility},setVisibility:function(t){yu.prototype.setVisibility.call(this,t)},initialize:function(t,e,o){this.childPlotLayers=[],this.features=[],this.visibility=!0,yu.prototype.initialize.call(this,t,e,o),null!=o&&o.caption&&(this.caption=o.caption);var i=L.supermap.plotting.childPlotLayer("子图层",o);this.addChildPlotLayer(i),this.setVisibility(this.visibility),this.setSymScaleDefinition(L.supermap.plotting.getControl().getPlotMapManager().getSymScaleDefinition(),!0)},moveTo:function(t,e){var o=SuperMap.Util.indexOf(this.features,t);if(o!==e){var i=null,n=e;n>=0&&n<this.features.length&&(i=this.features[n]);for(var l=0;l<t.components.length;l++)0===e?this._renderer._bringToBack(t.components[l]):e===this.features.length-1?this._renderer._bringToFront(t.components[l]):null!=i&&this._renderer._afterTo(t.components[l],i.components[0]);this.features.splice(o,1),this.features.splice(e,0,t)}},getFeatureByUuid:function(t){for(var e=0;e<this.features.length;e++){if(this.features[e].uuid===t)return this.features[e];if(this.features[e]instanceof L.supermap.plotting.GroupObject||this.features[e]instanceof L.supermap.plotting.Route)for(var o=0;o<this.features[e].components.length;o++)if(this.features[e].components[o].uuid===t)return this.features[e].components[o]}return null},addFeatures:function(t,e){if(SuperMap.Util.isArray(t)||(t=[t]),0!==t.length){null==e&&(e=L.supermap.plotting.getControl().getPlotMapManager().getActiveChildPlotLayer());var o=SuperMap.Util.indexOf(this.getChildPlotLayers(),e);-1!==o?this.getChildPlotLayers()[o].addFeatures(t):this.getChildPlotLayers().length>0&&this.getChildPlotLayers()[0].addFeatures(t),this.fire(SuperMap.Plot.Event.beforefeaturesadded,{features:t}),yu.prototype.addFeatures.call(this,t),this.fire(SuperMap.Plot.Event.featuresadded,{features:t,layername:this.name}),this._map.getPlotEditControl()&&this.isSelected&&this._map.getPlotEditControl().enableEditFeatures(t)}},removeFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]);for(var e=0;e<this.getChildPlotLayers().length;e++)this.getChildPlotLayers()[e].removeFeatures(t);this.fire(SuperMap.Plot.Event.beforefeaturesremoved,{features:t,layername:this.name}),yu.prototype.removeFeatures.call(this,t),this.fire(SuperMap.Plot.Event.featuresremoved,{features:t,layername:this.name})},removeAllFeatures:function(){for(var t=0;t<this.getChildPlotLayers().length;t++)this.getChildPlotLayers()[t].removeFeatures(this.features);this.fire(SuperMap.Plot.Event.beforefeaturesremoved,{features:this.features}),yu.prototype.removeAllFeatures.call(this),this.fire(SuperMap.Plot.Event.featuresremoved,{features:this.features,layername:this.name})},createSymbol:function(t,e,o,i,n,l,a,s){var r;if(l||(l={}),l.uuid=i,l.serverUrl=this.serverUrl,l.serviceParams=this.options.serviceParams,void 0!==l.symbolData&&null!==l.symbolData||!SuperMap.Plot.AlgoSymbolFactory.isAccessServer(t,e))if((r=L.supermap.plotting.PlottingObject.createSymbol(t,e,o,l,n,s)).subSymbols&&0!==r.subSymbols.length&&!SuperMap.Plot.AlgoSymbolFactory.isAccessServer(t,e)){for(var u=[],p=0,h=r.subSymbols.length;p<h;p++)null===r.subSymbols[p].symbolData&&(r.subSymbols[p].symbolData=this._getSymbolDataFromCache(r.subSymbols[p].libID,r.subSymbols[p].code),null===r.subSymbols[p].symbolData&&-1===SuperMap.Util.indexOf(u,r.subSymbols[p])&&u.push(r.subSymbols[p]));for(var c=u.slice(),y=0;y<u.length;y++){var g=new SuperMap.GetSymbolInfoParameters({libID:u[y].libID,code:u[y].code});L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(g,function(t){this._cacheSymbolData(t.result);for(var e=0,o=r.subSymbols.length;e<o;e++)if(null===r.subSymbols[e].symbolData&&r.subSymbols[e].libID===t.result.libID&&r.subSymbols[e].code===t.result.code){var i=SuperMap.Util.indexOf(c,r.subSymbols[e]);-1!==i&&c.splice(i,1),r.subSymbols[e].symbolData=SuperMap.Plot.PlottingUtil.cloneObject(t.result),0===c.length&&(r.isEdit=!1,this.addFeatures(r),"function"==typeof a&&a({feature:r}))}},this)}if(0===u.length)return this.addFeatures(r),"function"==typeof a&&a({feature:r}),r}else{if(!SuperMap.Plot.AlgoSymbolFactory.isAccessServer(t,e)||r.symbolData.innerCells)return this.addFeatures(r),"function"==typeof a&&a({feature:r}),r;var f=Math.floor(1e3*Math.random()),P=new SuperMap.GetSymbolInfoParameters({libID:r.libID,code:r.code,surroundLineType:r.surroundLineType,scaleValues:r.scaleValues,subSymbols:r.subSymbols});P.inputPoints=L.Util.latLngsToSuperMapPoints(r.getLatLngs()),P.dynamicToken=f,L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(P,function(t){t.result.dynamicToken&&t.result.dynamicToken===SuperMap.MD5.md5(f.toString())&&(r.symbolData.innerCells=t.result.innerCells,this.addFeatures(r))},this)}else{var d=null,S=!1;if(Object.prototype.hasOwnProperty.call(l,"symbolRank")||Object.prototype.hasOwnProperty.call(l,"surroundLineType")?S=!0:d=this._getSymbolDataFromCache(t,e),!d||S){var m=new SuperMap.GetSymbolInfoParameters({libID:t,code:e});o&&(m.inputPoints=L.Util.latLngsToSuperMapPoints(o)),Object.prototype.hasOwnProperty.call(l,"negativeImage")&&(m.negativeImage=l.negativeImage),Object.prototype.hasOwnProperty.call(l,"symbolRank")&&(m.symbolRank=l.symbolRank),Object.prototype.hasOwnProperty.call(l,"surroundLineType")&&(m.surroundLineType=l.surroundLineType);var b=Math.floor(1e3*Math.random());m.dynamicToken=b,L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(m,function(i){i.result.dynamicToken&&i.result.dynamicToken===SuperMap.MD5.md5(b.toString())&&(S||i.result.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL||(delete i.result.dynamicToken,this._cacheSymbolData(i.result)),l.symbolData=SuperMap.Plot.PlottingUtil.cloneObject(i.result),r=L.supermap.plotting.PlottingObject.createSymbol(t,e,o,l,n,s),this.addFeatures(r),"function"==typeof a&&a({feature:r}))},this)}else l.symbolData=d,r=L.supermap.plotting.PlottingObject.createSymbol(t,e,o,l,n,s),this.addFeatures(r),"function"==typeof a&&a({feature:r})}},createGroupObject:function(t,e){var o=[];for(var i in t)t[i]&&t[i]instanceof nr&&o.push(t[i]);if(o.length>1){var n=new $s(0,SuperMap.Plot.SymbolType.GROUPOBJECT,[],{subObjects:o,uuid:e});return this.addFeatures(n),n}return null},unGroupObject:function(t){var e=[];return t.symbolType===SuperMap.Plot.SymbolType.GROUPOBJECT||t.symbolType===SuperMap.Plot.SymbolType.FLAGGROUP?(e=t._unGroupObject(),t.destroy()):e.push(t),e},createLineRelation:function(t,e,o,i,n,l,a){l||(l={}),l.startAssociatedUuid=t,l.endAssociatedUuid=e,l.lineRelationType=o,l.uuid=i,l.custom=a;var s=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.LINERELATION,null,l,n,a);return this.addFeatures(s),s},createInterferenceBeam:function(t,e,o,i,n,l){n||(n={}),n.associatedUuid=t,n.uuid=o,n.custom=l;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.INTERFERENCEBEAM,e,n,i,l);return this.addFeatures(a),a},createSatellite:function(t,e,o,i,n,l,a,s,r){var u=this._getSymbolDataFromCache(t,e);if(null===u){var p=new SuperMap.GetSymbolInfoParameters({libID:t,code:e});L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(p,function(u){this._cacheSymbolData(u.result),a||(a={}),a.serverUrl=this.serverUrl,a.serviceParams=this.options.serviceParams,a.orbitPoints=o,a.textContent=i,a.uuid=n,a.custom=r,a.subSymbols=[{libID:t,code:e,symbolData:SuperMap.Plot.PlottingUtil.cloneObject(u.result),textContent:i}];var p=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SATELLITE,[],a,l,r);this.addFeatures(p),"function"==typeof s&&s({feature:p})},this)}else{a||(a={}),a.serverUrl=this.serverUrl,a.serviceParams=this.options.serviceParams,a.orbitPoints=o,a.textContent=i,a.uuid=n,a.custom=r,a.subSymbols=[{libID:t,code:e,symbolData:u,textContent:i}];var h=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SATELLITE,[],a,l,r);this.addFeatures(h),"function"==typeof s&&s({feature:h})}},createSatelliteTimeWindows:function(t,e,o,i,n,l){n||(n={}),n.associatedUuid=t,n.timeWindows=e,n.custom=l,n.uuid=o;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS,[],n,i,l);return this.addFeatures(a),a},createSatelliteTimeWindows1:function(t,e,o,i,n,l){n||(n={}),n.associatedUuid=t;for(var a=0;a<e.length;a++)e[a].type="number";n.timeWindows=e,n.custom=l,n.uuid=o;var s=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS,[],n,i,l);return this.addFeatures(s),s},createSatelliteTimeWindows2:function(t,e,o,i,n,l){n||(n={}),n.associatedUuid=t;for(var a=0;a<e.length;a++)e[a].type="Time";n.timeWindows=e,n.custom=l,n.uuid=o;var s=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS,[],n,i,l);return this.addFeatures(s),s},createSymbolText:function(t,e,o,i,n,l){n||(n={}),n.associatedUuid=t,n.symbolTexts=e,n.custom=l,n.uuid=o;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SYMBOLTEXT,[],n,i,l);return this.addFeatures(a),a},createSymbolText1:function(t,e,o,i,n,l){n||(n={}),n.associatedUuid=t,n.textContent=e,n.custom=l,n.uuid=o;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SYMBOLTEXT1,[],n,i,l);return this.addFeatures(a),a},createNavyDeployment:function(t,e,o,i,n,l,a){if(n||(n={}),n.associatedUuid=t,n.custom=a,n.serverUrl=this.serverUrl,n.serviceParams=this.options.serviceParams,e&&0!==e.length){for(var s=[],r=0,u=e.length;r<u;r++)null===e[r].symbolData&&(e[r].symbolData=this._getSymbolDataFromCache(e[r].libID,e[r].code),null===e[r].symbolData&&-1===SuperMap.Util.indexOf(s,e[r])&&s.push(e[r]));if(0!==s.length)for(var p=s.slice(),h=0;h<s.length;h++){var c=new SuperMap.GetSymbolInfoParameters({libID:s[h].libID,code:s[h].code});L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(c,function(t){this._cacheSymbolData(t.result);for(var o=0,s=e.length;o<s;o++)if(null===e[o].symbolData&&e[o].libID===t.result.libID&&e[o].code===t.result.code){var r=SuperMap.Util.indexOf(p,e[o]);-1!==r&&p.splice(r,1),e[o].symbolData=SuperMap.Plot.PlottingUtil.cloneObject(t.result)}if(0===p.length){n.subSymbols=e;var u=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.NAVYDEPLOYMENT,[],n,i,a);this.addFeatures(u),"function"==typeof l&&l({feature:u})}},this)}else{n.subSymbols=e;var y=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.NAVYDEPLOYMENT,[],n,i,a);this.addFeatures(y),"function"==typeof l&&l({feature:y})}}},createAirDeployment:function(t,e,o,i,n,l,a){if(n||(n={}),n.associatedUuid=t,n.custom=a,n.serverUrl=this.serverUrl,n.serviceParams=this.options.serviceParams,e&&0!==e.length){for(var s=[],r=0,u=e.length;r<u;r++)null===e[r].symbolData&&(e[r].symbolData=this._getSymbolDataFromCache(e[r].libID,e[r].code),null===e[r].symbolData&&-1===SuperMap.Util.indexOf(s,e[r])&&s.push(e[r]));if(0!==s.length)for(var p=s.slice(),h=0;h<s.length;h++){var c=new SuperMap.GetSymbolInfoParameters({libID:s[h].libID,code:s[h].code});L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(c,function(t){this._cacheSymbolData(t.result);for(var o=0,s=e.length;o<s;o++)if(null===e[o].symbolData&&e[o].libID===t.result.libID&&e[o].code===t.result.code){var r=SuperMap.Util.indexOf(p,e[o]);-1!==r&&p.splice(r,1),e[o].symbolData=SuperMap.Plot.PlottingUtil.cloneObject(t.result)}if(0===p.length){n.subSymbols=e;var u=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.AIRDEPLOYMENT,[],n,i,a);this.addFeatures(u),"function"==typeof l&&l({feature:u})}},this)}else{n.subSymbols=e;var y=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.AIRDEPLOYMENT,[],n,i,a);this.addFeatures(y),"function"==typeof l&&l({feature:y})}}},createNavyRoute:function(t,e,o,i,n,l){n||(n={}),n.routeNodes=e,n.uuid=o,n.custom=l,n.arrRoutePts=t;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.NAVYROUTE,[],n,i,l);return this.addFeatures(a),a},createMissileRoute:function(t,e,o,i,n,l){n||(n={}),n.routeNodes=e,n.uuid=o,n.custom=l,n.arrRoutePts=t;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.MISSILEROUTE,[],n,i,l);return this.addFeatures(a),a},createAirRoute:function(t,e,o,i,n,l){n||(n={}),n.routeNodes=e,n.uuid=o,n.custom=l,n.arrRoutePts=t;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.AIRROUTE,[],n,i,l);return this.addFeatures(a),a},createFlags:function(t,e,o){for(var i=[],n=0;n<t.length;n++)100===t[n].libID&&t[n].code>=2800&&t[n].code<=2900&&i.push(t[n]);var l=null;return i.length>1&&(l=new qr(0,SuperMap.Plot.SymbolType.FLAGGROUP,[],{subObjects:i,ratio:e,uuid:o}),this.addFeatures(l)),l},createArcRegion:function(t,e,o,i,n,l,a,s,r,u,p){r||(r={}),r.centerPoint=t,r.radius=e,r.startAngle=o,r.endAngle=i,r.textContent=n,r.textPosition=l,r.uuid=a,r.custom=p;var h=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.ARCREGION,[],r,s,p);return this.addFeatures(h),h},geoJsonToFeature:function(t,e){this.geoJsonToFeature1(t,null,e)},geoJsonToFeature1:function(t,e,o){var i=JSON.parse(t),n=parseInt(i.libID),l=parseInt(i.code);if(i.isEdit=!0,!this._map.getFeatureByUuid(i.id))if(SuperMap.Plot.AlgoSymbolFactory.isAccessServer(n,l)){var a={};a.symbolRank=parseInt(i.symbolRank),a.surroundLineType=parseInt(i.surroundLineType);var s=!1;0===a.surroundLineType&&0===a.symbolRank||(s=!0);var r=this._getSymbolDataFromCache(n,l);if(s||null===r){var u=new SuperMap.GetSymbolInfoParameters({libID:n,code:l,symbolRank:a.symbolRank,surroundLineType:a.surroundLineType,inputPoints:i.localePoints,subSymbols:i.subSymbols}),p=this._map;L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(u,function(t){if(t.result.libID&&t.result.code){t.result.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL||s||this._cacheSymbolData(t.result),r=SuperMap.Util.cloneObject(t.result),SuperMap.Plot.AnalysisSymbol.mergeSymbolDataAndServerData(i,r);var a={symbolData:i,serverUrl:this.serverUrl,serviceParams:this.options.serviceParams,isGeoJSONData:!0},u=L.supermap.plotting.PlottingObject.createSymbol(n,l,null,a);if(this.addFeatures(u,e),null!=i.lineRelations)for(var h=0;h<i.lineRelations.length;h++){var c=p.getFeatureByUuid(i.lineRelations[h]);null!=c&&(c.startAssociatedUuid===i.uuid?c.setStartFeature(i.uuid):c.endAssociatedUuid===i.uuid&&c.setEndFeature(i.uuid))}"function"==typeof o&&o({feature:u})}},this)}else{SuperMap.Plot.AnalysisSymbol.mergeSymbolDataAndServerData(i,r);var h={symbolData:i,serverUrl:this.serverUrl,isGeoJSONData:!0},c=L.supermap.plotting.PlottingObject.createSymbol(n,l,null,h);this.addFeatures(c,e),"function"==typeof o&&o({feature:c})}}else if(i.subSymbols&&0!==i.subSymbols.length){for(var y=[],g=0,f=i.subSymbols.length;g<f;g++)if(!i.subSymbols[g].symbolData){var P=L.supermap.plotting.getControl(this._map,this.serverUrl,{serviceParams:this.options.serviceParams}).getSymbolLibManager().getSymbolLibByLibId(i.subSymbols[g].libID);if(P)P.querySymbolbyKey(l.toString()).length>0&&(i.subSymbols[g].symbolData=this._getSymbolDataFromCache(i.subSymbols[g].libID,i.subSymbols[g].code),null===i.subSymbols[g].symbolData&&-1===SuperMap.Util.indexOf(y,i.subSymbols[g])&&y.push(i.subSymbols[g]))}for(var d=y.slice(),S=0;S<y.length;S++){var m=new SuperMap.GetSymbolInfoParameters({libID:y[S].libID,code:y[S].code});L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(m,function(t){this._cacheSymbolData(t.result);for(var a=0,s=i.subSymbols.length;a<s;a++)if(null===i.subSymbols[a].symbolData&&i.subSymbols[a].libID===t.result.libID&&i.subSymbols[a].code===t.result.code){var r=SuperMap.Util.indexOf(d,i.subSymbols[a]);-1!==r&&d.splice(r,1),i.subSymbols[a].symbolData=SuperMap.Plot.PlottingUtil.cloneObject(t.result)}if(0===d.length){var u={symbolData:i,serverUrl:this.serverUrl,serviceParams:this.options.serviceParams,symbolType:i.symbolType,isGeoJSONData:!0},p=L.supermap.plotting.PlottingObject.createSymbol(n,l,null,u);this.addFeatures(p,e),"function"==typeof o&&o({feature:p})}},this)}if(0===y.length){var b={symbolData:i,serverUrl:this.serverUrl,serviceParams:this.options.serviceParams,symbolType:i.symbolType,isGeoJSONData:!0},M=L.supermap.plotting.PlottingObject.createSymbol(n,l,null,b);this.addFeatures(M,e),"function"==typeof o&&o({feature:M})}}else if(i.geometries&&0!==i.geometries.length){var v=[];for(g=0;g<i.geometries.length;g++){var A=parseInt(i.geometries[g].libID),T=parseInt(i.geometries[g].code);if(SuperMap.Plot.AlgoSymbolFactory.isAccessServer(A,T)&&!Object.prototype.hasOwnProperty.call(i.geometries[g],"innerCells")){for(var _=!0,O=0;O<v.length;O++)if(v[O].libID===A&&v[O].code===T){_=!1;break}_&&v.push(i.geometries[g])}else i.geometries[g].subSymbols&&i.geometries[g].subSymbols.length}var x=v.slice();for(S=0;S<v.length;S++){if(null!=(r=this._getSymbolDataFromCache(v[S].libID,v[S].code))){var w=0;for(f=i.geometries.length;w<f;w++)if(i.geometries[w].libID===r.libID&&i.geometries[w].code===r.code){var E=SuperMap.Util.indexOf(x,i.geometries[w]);-1!==E&&x.splice(E,1),SuperMap.Plot.AnalysisSymbol.mergeSymbolDataAndServerData(i.geometries[w],r)}}else{var C=new SuperMap.GetSymbolInfoParameters({libID:v[S].libID,code:v[S].code});L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(C,function(t){this._cacheSymbolData(t.result);for(var a=0,s=i.geometries.length;a<s;a++)if(i.geometries[a].libID===t.result.libID&&i.geometries[a].code===t.result.code){var r=SuperMap.Util.indexOf(x,i.geometries[a]);-1!==r&&x.splice(r,1);var u=SuperMap.Util.cloneObject(t.result);SuperMap.Plot.AnalysisSymbol.mergeSymbolDataAndServerData(i.geometries[a],u)}if(0===x.length){var p={symbolData:i,serverUrl:this.serverUrl,serviceParams:this.options.serviceParams,symbolType:i.symbolType,isGeoJSONData:!0},h=L.supermap.plotting.PlottingObject.createSymbol(n,l,null,p);this.addFeatures(h,e),"function"==typeof o&&o({feature:h})}},this)}}if(0===x.length){var I={symbolData:i,serverUrl:this.serverUrl,serviceParams:this.options.serviceParams,symbolType:i.symbolType,isGeoJSONData:!0},R=L.supermap.plotting.PlottingObject.createSymbol(n,l,null,I);this.addFeatures(R,e),"function"==typeof o&&o({feature:R})}}else{var D={symbolData:i,serverUrl:this.serverUrl,serviceParams:this.options.serviceParams,symbolType:i.symbolType,isGeoJSONData:!0},U=L.supermap.plotting.PlottingObject.createSymbol(n,l,null,D);this.addFeatures(U,e),"function"==typeof o&&o({feature:U})}},_getFeatureFromEvent:function(t){var e=null;if(!this._map)return e;if(this.isSelected)for(var o=this._map.layerPointToLatLng(L.point(0,0)),i=this._map.layerPointToLatLng(L.point(this._clickTolerance(),0)),n=new SuperMap.Geometry.Point(o.lng,o.lat),l=new SuperMap.Geometry.Point(i.lng,i.lat),a=SuperMap.Plot.PlottingUtil.distance(n,l),s=this.features.length-1;s>=0&&null===(e=this._selectFeature(this.features[s],t.latlng,a));s--);return e},_isAvoidRegion:function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];if(0!==e.length){var i=null;if(0===e[0].avoidRegions.length)return e[0];if(i=new Su(e[0]),this._map.addControl(i),!0){for(var n=0,l=e[0].avoidRegions.length;n<l;n++)this.removeFeatures(e[0].avoidRegions[n]);return this._map.removeControl(i),!1,e[0]}}},_selectFeature:function(t,e,o){if(null==t)return null;if(void 0!==t.style&&null!==t.style&&"none"===t.style.display)return null;if(!(t instanceof Qs))return null;if(t instanceof $s){for(var i=0;i<t.components.length;i++)if(this._selectFeature(t.components[i],e,o))return t.isSelected?t.components[i]:t}else if(t instanceof iu){for(var n=0;n<t.components.length;n++)if(this._selectFeature(t.components[n],e,o))return t.components[n]===SuperMap.Plot.SymbolType.ROUTENODE||t.components[n]===SuperMap.Plot.SymbolType.LITERATESIGN?t.components[n]:t}else if(t.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT){for(var l=0;l<t.components.length;l++)if(this._selectFeature(e,o,t.components[l]))return t}else if(t.symbolType===SuperMap.Plot.SymbolType.ROUTENODE||t.symbolType===SuperMap.Plot.SymbolType.LITERATESIGN){var a=t.getBounds();if(a&&a.isValid()&&e.lng>=a.getWest()&&e.lng<=a.getEast()&&e.lat>=a.getSouth()&&e.lat<=a.getNorth())return t}else for(var s=this._map.latLngToLayerPoint(e),r=0,u=t.components.length;r<u;r++)if(t.components[r]._containsPoint&&t.components[r]._containsPoint(s))return t;return null}});L.supermap.plotting.plottingLayer=function(t,e,o){return new bu(t,e,o)};L.Util.bounds=function(t){L.Util.isArray(t)||(t=[t]);for(var e=L.latLngBounds(),o=0;o<t.length;o++)L.Util.isArray(t[o])?e.extend(L.Util.bounds(t[o])):e.extend(t[o]);return e},L.Util.latLngsToSuperMapPoints=function(t){var e=[];L.Util.isArray(t)||(t=[t]);for(var o=0;o<t.length;o++)e.push(new SuperMap.Geometry.Point(t[o].lng,t[o].lat));return e},L.Util.superMapPointsToLatLngs=function(t){var e=[];L.Util.isArray(t)||(t=[t]);for(var o=0;o<t.length;o++)void 0!==t[o]&&e.push(L.latLng(t[o].y,t[o].x));return e},L.Util.cloneLatLngs=function(t){var e=[];L.Util.isArray(t)||(t=[t]);for(var o=0;o<t.length;o++)L.Util.isArray(t[o])?e.push(L.Util.cloneLatLngs(t[o])):e.push(t[o].clone());return e},L.Util.moveLatLngs=function(t,e,o){L.Util.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++)L.Util.isArray(t[i])?L.Util.moveLatLngs(t[i],e,o):(t[i].lat+=e,t[i].lng+=o)},L.Util.rotateLatLngs=function(t,e,o){L.Util.isArray(t)||(t=[t]);for(var i=o*(Math.PI/180),n=Math.cos(i),l=Math.sin(i),a=0;a<t.length;a++)if(L.Util.isArray(t[a]))L.Util.rotateLatLngs(t[a],e,o);else{var s=t[a].lat-e.lat,r=t[a].lng-e.lng;t[a].lat=r*l+s*n+e.lat,t[a].lng=r*n-s*l+e.lng}},L.Util.rotateBounds=function(t,e,o){if(t instanceof L.LatLngBounds){var i=L.latLngBounds(),n=o*(Math.PI/180),l=Math.cos(n),a=Math.sin(n),s=[];s.push(L.latLng(t.getNorth(),t.getWest())),s.push(L.latLng(t.getNorth(),t.getEast())),s.push(L.latLng(t.getSouth(),t.getWest())),s.push(L.latLng(t.getSouth(),t.getEast()));for(var r=0;r<s.length;r++){var u=s[r].lat-e.lat,p=s[r].lng-e.lng;s[r].lat=p*a+u*l+e.lat,s[r].lng=p*l-u*a+e.lng,i.extend(s[r])}return i}},L.Util.resizeLatLngs=function(t,e,o){L.Util.isArray(t)||(t=[t]);for(var i=0;i<t.length;i++)L.Util.isArray(t[i])?L.Util.resizeLatLngs(t[i],e,o):(t[i].lat=e.lat+o*(t[i].lat-e.lat),t[i].lng=e.lng+o*(t[i].lng-e.lng))},L.Util.conventProjectPts=function(t){var e=[];L.Util.isArray(t)||(t=[t]);for(var o=0,i=t.length;o<i;o++)e.push(L.CRS.EPSG3857.project(t[o]));return e},L.Util.unConventProjectPts=function(t){var e=[];L.Util.isArray(t)||(t=[e]);for(var o=0,i=t.length;o<i;o++)e.push(L.CRS.EPSG3857.unproject(t[o]));return e},L.Util.isMercatorProjection=function(t){if(void 0!==t&&"string"==typeof t)switch(t.toUpperCase()){case"EPSG:3857":return!0;case"EPSG:4326":default:return!1}},L.Util.isPlottingLayer=function(t){return t instanceof bu};var Lu=Js.extend({redrawAnchor:null,redrawSize:null,lastStyleKey:null,lastMainKey:null,lastSymbolTextKey:null,lastBloodVolumeKey:null,lastAnnotationKey:null,lastPictureFrameKey:null,images:null,annotation:null,pictureFrames:null,symbolTexts:null,bloodVolumes:null,componentLatLngs:null,initialize:function(t,e){this.feature=t,e=e||{},L.Util.setOptions(this,e),this.canvasEle=document.createElement("canvas"),this.canvasEle.width=0,this.canvasEle.height=0,this._ctx=this.canvasEle.getContext("2d"),this.images=[],this.symbolTexts=[],this.bloodVolumes=[],this.pictureFrames=[],this.componentLatLngs=[]},render:function(){this._redrawFeature()},complete:function(){if(!(null!=this.pictureFrames&&0!==this.pictureFrames.length||null!=this.images&&0!==this.images.length))return!0;for(var t=0;t<this.pictureFrames.length;t++)if(null!=L.supermap.plotting.getControl().imageManager[this.pictureFrames[t].path]&&!0!==L.supermap.plotting.getControl().imageManager[this.pictureFrames[t].path].complete)return!1;for(var e=0;e<this.images.length;e++)if(null!=L.supermap.plotting.getControl().imageManager[this.images[e].path]&&!0!==L.supermap.plotting.getControl().imageManager[this.images[e].path].complete)return!1;return!0},getBounds:function(t,e){if(this.feature.symbolType===SuperMap.Plot.SymbolType.PICTURE)return this.feature.getBounds();for(var o=new L.LatLngBounds,i=t.lat-this.latLng.lat,n=t.lng-this.latLng.lng,l=this.feature._map.getZoomScale(this.fromZoom,this.feature._map.getZoom()),a=0;a<this.componentLatLngs.length;a++){var s=L.Util.cloneLatLngs(this.componentLatLngs[a]);L.Util.moveLatLngs(s,i,n),L.Util.resizeLatLngs(s,t,l),L.Util.rotateLatLngs(s,t,e),o.extend(L.Util.bounds(s))}return o},getComponentLatLngs:function(){this.componentLatLngs.length=0;for(var t=0;t<this.feature.components.length;t++){var e=this.feature.components[t];e.isLeadLine||e.isAnnotation||e.isSymbolText||e.isBloodVolume||e.isPictureFrame||this.componentLatLngs.push(e.getLatLngs())}},_redrawFeature:function(){if(0===this.feature.components.length){this.latLng=L.latLng(this.feature.getLatLngs()[0].lat,this.feature.getLatLngs()[0].lng),this.fromZoom=this.feature._map.getZoom();var t=this.feature.dRotate;this.feature.dRotate=0,this.feature._calculateParts(),this.feature.dRotate=t,this.lastStyleKey=this._generateFromFeatureStyle(this.feature.style),this.lastMainKey=this._generateFromFeature(),this.lastAnnotationKey=this._generateFromAnnotation(),this.lastSymbolTextKey=this._generateFromSymbolText(),this.lastPictureFrameKey=this._generateFromPictureFrame(),this.lastBloodVolumeKey=this._generateFromBloodVolume(),this.bounds=L.latLngBounds(L.latLng(this.feature.getBounds().getNorth(),this.feature.getBounds().getWest()),L.latLng(this.feature.getBounds().getSouth(),this.feature.getBounds().getEast())),this.getComponentLatLngs(),this._drawFeatures(),this._drawAnnotation(),this._drawSymbolText(),this._drawBloodVolume(),this._drawPictureFrame()}else{var e=this._generateFromFeature();if(this.lastMainKey!==e){for(var o in this.feature.components)delete this.feature.components[o];this.feature.components.length=0;var i=this.feature.dRotate;this.feature.dRotate=0,this.feature._calculateParts(),this.feature.dRotate=i,this.lastMainKey=e,this.lastAnnotationKey=this._generateFromAnnotation(),this.lastSymbolTextKey=this._generateFromSymbolText(),this.lastPictureFrameKey=this._generateFromPictureFrame(),this.lastBloodVolumeKey=this._generateFromBloodVolume(),this.lastStyleKey=this._generateFromFeatureStyle(this.feature.style),this.fromZoom=this.feature._map.getZoom(),this.latLng=L.latLng(this.feature.getLatLngs()[0].lat,this.feature.getLatLngs()[0].lng),this.bounds=L.latLngBounds(L.latLng(this.feature.getBounds().getNorth(),this.feature.getBounds().getWest()),L.latLng(this.feature.getBounds().getSouth(),this.feature.getBounds().getEast())),this.getComponentLatLngs(),this._drawFeatures(),this._drawAnnotation(),this._drawSymbolText(),this._drawBloodVolume(),this._drawPictureFrame()}else{var n=this._generateFromAnnotation();this.lastAnnotationKey!==n&&(this.feature._handleAnnotation(this._scaleBounds(this.bounds)),this._drawAnnotation(),this.lastAnnotationKey=n);var l=this._generateFromSymbolText();this.lastSymbolTextKey!==l&&(this.feature._calculateLabel(this._scaleBounds(this.bounds),this.latLng),this._drawSymbolText(),this.lastSymbolTextKey=l);var a=this._generateFromBloodVolume();this.lastBloodVolumeKey!==a&&(this.feature._calculateBloodVolume(this._scaleBounds(this.bounds),this.latLng),this._drawBloodVolume(),this.lastBloodVolumeKey=a);var s=this._generateFromPictureFrame();this.lastPictureFrameKey!==s&&(this.feature._calculatePictureFrame(this._scaleBounds(this.bounds)),this._drawPictureFrame(),this.lastPictureFrameKey=s)}var r=this._generateFromFeatureStyle(this.feature.style);if(this.lastStyleKey!==r&&"function"==typeof this.feature._copyStyleForCell){for(var u in this.feature.components){var p=this.feature.components[u];if(!(p.isSymbolText||p.isBloodVolume||p.isPictureFrame)){var h=p.options;this.feature._copyStyleForCell(h,this.feature.style,p),L.setOptions(p,h)}}8===this.feature.annotationPosition&&0!==this.feature.textContent.length&&this.feature._handleAnnotation(this._scaleBounds(this.bounds)),this._drawFeatures(),this._drawAnnotation()}this.lastStyleKey=r}this._computeRedrawSize()},getCacheInfo:function(){var t=document.createElement("canvas"),e=t.getContext("2d");t.width=this.canvas.width,t.height=this.canvas.height,e.clearRect(0,0,t.width,t.height),e.drawImage(this.canvas,0,0);for(var o={canvas:e.canvas,anchor:L.point(this.anchor.x,this.anchor.y),size:[this.size[0],this.size[1]],redrawSize:[this.redrawSize[0],this.redrawSize[1]],redrawAnchor:L.point(this.redrawAnchor.x,this.redrawAnchor.y),bounds:L.latLngBounds(this.bounds.getSouthEast(),this.bounds.getNorthWest()),fromZoom:this.fromZoom,latLng:L.latLng(this.latLng.lat,this.latLng.lng),componentLatLngs:[]},i=0;i<this.componentLatLngs.length;i++)o.componentLatLngs.push(L.Util.cloneLatLngs(this.componentLatLngs[i]));null!=this.annotation&&(o.annotation=this.annotation.getCacheInfo()),o.images=[];for(var n=0;n<this.images.length;n++){var l={};l=SuperMap.Util.copyAttributes(l,this.images[n]),o.images.push(l)}o.pictureFrames=[];for(var a=0;a<this.pictureFrames.length;a++){var s={};s=SuperMap.Util.copyAttributes(s,this.pictureFrames[a]),o.pictureFrames.push(s)}o.symbolTexts=[];for(var r=0;r<this.symbolTexts.length;r++)o.symbolTexts.push(this.symbolTexts[r].getCacheInfo());o.bloodVolumes=[];for(var u=0;u<this.bloodVolumes.length;u++)o.bloodVolumes.push(this.bloodVolumes[u].getCacheInfo());return o},generateUuidFromFeature:function(){var t="";return this.feature.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL?(t+=this._generateFromFeature(),t+="_"+this._generateFromAnnotation(),t+="_"+this._generateFromSymbolText(),t+="_"+this._generateFromBloodVolume(),t+="_"+this._generateFromPictureFrame(),t+="_"+this._generateFromFeatureStyle(this.feature.style)):this.feature.symbolType===SuperMap.Plot.SymbolType.PICTURE?(t=this.feature.libID.toString()+"_"+this.feature.code.toString()+"_"+this.feature.path+this.feature.style.graphicWidth+this.feature.style.graphicHeight+this.feature.style.graphicXOffset+this.feature.style.graphicYOffset,t+="_"+this._generateFromSymbolText(),t+="_"+this._generateFromBloodVolume()):this.feature.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT?(t=this.feature.libID.toString()+"_"+this.feature.code.toString()+"_"+this.feature.associatedUuid+"_"+this.feature.addFrame.toString(),t+="_"+this._generateFromSymbolText()):this.feature.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1&&(t=this.feature.libID.toString()+"_"+this.feature.code.toString()+"_"+this.feature.associatedUuid+"_"+this.feature.textContent+"_"+this.feature.space.toString()+"_"+this.feature.offsetX.toString()+"_"+this.feature.offsetY.toString(),t+="_"+this._generateFromFeatureStyle(this.feature.style)),t},_computeImageSize:function(){var t=this._scaleBounds(this.bounds),e=new L.Bounds;e.extend(this.feature._map.latLngToLayerPoint(t.getNorthEast())),e.extend(this.feature._map.latLngToLayerPoint(t.getNorthWest())),e.extend(this.feature._map.latLngToLayerPoint(t.getSouthEast())),e.extend(this.feature._map.latLngToLayerPoint(t.getSouthWest()));var o=new L.Bounds(e.min,e.max);this.leftTopPixel=L.point(e.min.x,e.min.y);var i=o.getSize();i.x+=2*this.feature.style.weight,i.y+=2*this.feature.style.weight,this.anchor=this._latlngToLayerPoint([this.latLng])[0],this.size=[i.x,i.y]},_computeRedrawSize:function(){var t=this._scaleBounds(this.bounds),e=this.getBounds(this.latLng,this.feature.dRotate),o=e.getWest()-t.getWest(),i=e.getEast()-t.getEast(),n=e.getNorth()-t.getNorth(),l=e.getSouth()-t.getSouth();if(this.feature.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL||this.feature.symbolType===SuperMap.Plot.SymbolType.PICTURE)for(var a in this.feature.components){var s=this.feature.components[a];(s.isAnnotation||s.isSymbolText||s.isBloodVolume||s.isPictureFrame)&&t.extend(s.getBounds?s.getBounds():s.getLatLng())}var r=new L.Bounds;r.extend(this.feature._map.latLngToLayerPoint(L.latLng(t.getNorth()+n,t.getEast()+i))),r.extend(this.feature._map.latLngToLayerPoint(L.latLng(t.getNorth()+n,t.getWest()+o))),r.extend(this.feature._map.latLngToLayerPoint(L.latLng(t.getSouth()+l,t.getEast()+i))),r.extend(this.feature._map.latLngToLayerPoint(L.latLng(t.getSouth()+l,t.getWest()+o))),this.leftTopPixel=L.point(r.min.x,r.min.y);var u=r.getSize(),p=this.feature.style.weight;u.x+=2*p,u.y+=2*p,this.redrawAnchor=this._latlngToLayerPoint([this.latLng])[0],this.redrawSize=[u.x,u.y]},_latlngToLayerPoint:function(t,e){null==e&&(e=this.fromZoom);for(var o=this.feature._map.getZoomScale(e,this.feature._map.getZoom()),i=this.latLng,n=[],l=0;l<t.length;l++){var a=i.lat+o*(t[l].lat-i.lat),s=i.lng+o*(t[l].lng-i.lng),r=this.feature._map.latLngToLayerPoint(L.latLng(a,s));r.x=r.x-this.leftTopPixel.x+this.feature.style.weight,r.y=r.y-this.leftTopPixel.y+this.feature.style.weight,n.push(r)}return n},_scaleBounds:function(t){if(this.fromZoom!==this.feature._map.getZoom()){var e=this.feature._map.getZoomScale(this.fromZoom,this.feature._map.getZoom()),o=this.latLng,i=o.lat+e*(t.getNorth()-o.lat),n=o.lat+e*(t.getSouth()-o.lat),l=o.lng+e*(t.getWest()-o.lng),a=o.lng+e*(t.getEast()-o.lng);return L.latLngBounds(L.latLng(i,l),L.latLng(n,a))}return L.latLngBounds(L.latLng(t.getNorth(),t.getWest()),L.latLng(t.getSouth(),t.getEast()))},_scaleCompount:function(t){if(this.fromZoom!==this.feature._map.getZoom()){var e=this.feature._map.getZoomScale(this.fromZoom,this.feature._map.getZoom()),o=this.latLng,i=o.lat+e*(t.getNorth()-o.lat),n=o.lat+e*(t.getSouth()-o.lat),l=o.lng+e*(t.getWest()-o.lng),a=o.lng+e*(t.getEast()-o.lng);return L.latLngBounds(L.latLng(i,l),L.latLng(n,a))}return L.latLngBounds(L.latLng(t.getNorth(),t.getWest()),L.latLng(t.getSouth(),t.getEast()))},_drawFeatures:function(){for(var t in this.images.length=0,this._computeImageSize(),this.canvasEle.width=this.size[0],this.canvasEle.height=this.size[1],this._ctx.clearRect(0,0,this.canvasEle.width,this.canvasEle.height),this.canvas=this._ctx.canvas,this._ctx.translate(0,0),this.feature.components){var e=this.feature.components[t];!0!==e.isSymbolText&&!0!==e.isBloodVolume&&!0!==e.isPictureFrame&&!0!==e.isAnnotation&&(Zs&&e instanceof Zs?this.images.push(this._drawImage(e,this._ctx)):Hs&&e instanceof Hs?this._drawText(e,this._ctx):L.Rectangle&&e instanceof L.Rectangle?this._drawRectangle(e,this._ctx):L.Polygon&&e instanceof L.Polygon?this._drawPolygon(e,this._ctx):L.Polyline&&e instanceof L.Polyline&&this._drawPolyline(e,this._ctx))}},_drawAnnotation:function(){for(var t=!1,e=this._scaleBounds(this.bounds),o=(this.latLng,0);o<this.feature.components.length;o++)if(!0===this.feature.components[o].isAnnotation&&8!==this.feature.annotationPosition){t=!0;var i=null;switch(this.feature.annotationPosition){case SuperMap.Plot.AnnoPosition.LEFTTOP:i=L.latLng(e.getNorth(),e.getWest());break;case SuperMap.Plot.AnnoPosition.LEFTBOTTOM:i=L.latLng(e.getSouth(),e.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHTTOP:i=L.latLng(e.getNorth(),e.getEast());break;case SuperMap.Plot.AnnoPosition.RIGHTBOTTOM:i=L.latLng(e.getSouth(),e.getEast());break;case SuperMap.Plot.AnnoPosition.TOP:i=L.latLng(e.getNorth(),(e.getWest()+e.getEast())/2);break;case SuperMap.Plot.AnnoPosition.BOTTOM:i=L.latLng(e.getSouth(),(e.getWest()+e.getEast())/2);break;case SuperMap.Plot.AnnoPosition.LEFT:i=L.latLng((e.getSouth()+e.getNorth())/2,e.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHT:i=L.latLng((e.getSouth()+e.getNorth())/2,e.getEast())}null==this.annotation?(this.annotation=new qs(this.feature,[this.feature.components[o]],i,this.feature.annotationPosition,0,0,this.options),this.annotation.render()):(this.annotation.clear(),this.annotation.setComponents([this.feature.components[o]],i,this.feature.annotationPosition,0,0));break}!1===t&&null!=this.annotation&&(delete this.annotation,this.annotation=null)},_drawSymbolText:function(){for(var t=this._scaleBounds(this.bounds),e=this.latLng,o=0;o<this.feature.symbolTextComponents.length;o++){var i=null;switch(this.feature.symbolTexts[o].textPosition){case SuperMap.Plot.AnnoPosition.LEFTTOP:i=L.latLng(t.getNorth(),t.getWest());break;case SuperMap.Plot.AnnoPosition.LEFTBOTTOM:i=L.latLng(t.getSouth(),t.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHTTOP:i=L.latLng(t.getNorth(),t.getEast());break;case SuperMap.Plot.AnnoPosition.RIGHTBOTTOM:i=L.latLng(t.getSouth(),t.getEast());break;case SuperMap.Plot.AnnoPosition.TOP:i=L.latLng(t.getNorth(),(t.getWest()+t.getEast())/2);break;case SuperMap.Plot.AnnoPosition.BOTTOM:i=L.latLng(t.getSouth(),(t.getWest()+t.getEast())/2);break;case SuperMap.Plot.AnnoPosition.LEFT:i=L.latLng((t.getSouth()+t.getNorth())/2,t.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHT:i=L.latLng((t.getSouth()+t.getNorth())/2,t.getEast());break;case SuperMap.Plot.AnnoPosition.ANCHOR:i=L.latLng(e.lat,e.lng)}if(this.symbolTexts.length<=o){var n=new qs(this.feature,this.feature.symbolTextComponents[o],i,this.feature.symbolTexts[o].textPosition,0,0,this.options);n.render(),this.symbolTexts.push(n)}else this.symbolTexts[o].clear(),this.symbolTexts[o].setComponents(this.feature.symbolTextComponents[o],i,this.feature.symbolTexts[o].textPosition,0,0)}for(var l=this.feature.symbolTextComponents.length;l<this.symbolTexts.length;)delete this.symbolTexts[l],this.symbolTexts.splice(l,1)},_drawBloodVolume:function(){for(var t=0;t<this.feature.bloodVolumeComponents.length;t++){var e=this._scaleBounds(this.bounds),o=null;switch(this.feature.bloodVolumes[t].position){case SuperMap.Plot.AnnoPosition.TOP:o=L.latLng(e.getNorth(),(e.getWest()+e.getEast())/2);break;case SuperMap.Plot.AnnoPosition.BOTTOM:o=L.latLng(e.getSouth(),(e.getWest()+e.getEast())/2);break;case SuperMap.Plot.AnnoPosition.LEFT:o=L.latLng((e.getSouth()+e.getNorth())/2,e.getWest());break;case SuperMap.Plot.AnnoPosition.RIGHT:o=L.latLng((e.getSouth()+e.getNorth())/2,e.getEast())}if(this.bloodVolumes.length<=t){var i=new qs(this.feature,this.feature.bloodVolumeComponents[t],o,this.feature.bloodVolumes[t].position,0,0,this.fromZoom,this.options);i.render(),this.bloodVolumes.push(i)}else this.bloodVolumes[t].clear(),this.bloodVolumes[t].setComponents(this.feature.bloodVolumeComponents[t],o,this.feature.bloodVolumes[t].position,0,0,this.fromZoom)}for(var n=this.feature.bloodVolumeComponents.length;n<this.bloodVolumes.length;)delete this.bloodVolumes[n],this.bloodVolumes.splice(n,1)},_drawPictureFrame:function(){if(this.pictureFrames.length=0,null!=this.feature.pictureFrameComponents)for(var t=0;t<this.feature.pictureFrameComponents.length;t++){var e=this.feature.pictureFrames[t].offsetX,o=this.feature.pictureFrames[t].offsetY,i=this.feature.pictureFrameComponents[t][0];if(Zs&&i instanceof Zs){var n=this._drawImage(i,this._ctx);this.pictureFrames.push({path:n.path,style:n.style,position:this.feature.pictureFrames[t].position,offsetX:e,offsetY:o})}}},_generateFromFeature:function(){var t="";return this.feature.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL?t=this.feature.libID.toString()+"_"+this.feature.code.toString()+"_"+Math.round(this.feature.symbolSize.w).toString()+"_"+Math.round(this.feature.symbolSize.h).toString()+"_"+ +this.feature.dRotate.toString()+"_"+this.feature.symbolRank.toString()+this.feature.surroundLineType.toString()+this.feature.textContent+this.feature.annotationPosition:this.feature.symbolType===SuperMap.Plot.SymbolType.PICTURE&&(t=this.feature.libID.toString()+"_"+this.feature.code.toString()+"_"+this.feature.path+this.feature.style.graphicWidth+this.feature.style.graphicHeight+this.feature.style.graphicXOffset+this.feature.style.graphicYOffset,t+="_"+this._generateFromSymbolText(),t+="_"+this._generateFromBloodVolume()),t},_generateFromAnnotation:function(){return this.feature.textContent+"_"+this.feature.annotationPosition.toString()},_generateFromSymbolText:function(){var t="";if(null==this.feature.symbolTexts)return t;for(var e=0;e<this.feature.symbolTexts.length;e++){var o=this.feature.symbolTexts[e];null!=o.textContent&&(t+="_"+o.textContent),null!=o.textPosition&&(t+="_"+o.textPosition.toString()),null!=o.offsetX&&(t+="_"+o.offsetX.toString()),null!=o.offsetY&&(t+="_"+o.offsetY.toString()),null!=o.border&&(t+="_"+o.border.toString()),null!=o.showRelationLine&&(t+="_"+o.showRelationLine.toString()),null!=o.paddingX&&(t+="_"+o.paddingX.toString()),null!=o.paddingY&&(t+="_"+o.paddingY.toString()),null!=o.style&&(t+=this._generateFromFeatureStyle(o.style)),null!=o.lineStyle&&(null!=o.lineStyle.color&&(t+="_"+o.lineStyle.color),null!=o.lineStyle.lineSymbolID&&(t+="_"+o.lineStyle.lineSymbolID),null!=o.lineStyle.opacity&&(t+="_"+o.lineStyle.opacity),null!=o.lineStyle.weight&&(t+="_"+o.lineStyle.weight))}return t},_generateFromBloodVolume:function(){var t="";if(null==this.feature.bloodVolumes)return t;for(var e=0;e<this.feature.bloodVolumes.length;e++){var o=this.feature.bloodVolumes[e];null!=o.volume&&(t+="_"+o.volume),null!=o.position&&(t+="_"+o.position.toString()),null!=o.offsetX&&(t+="_"+o.offsetX.toString()),null!=o.offsetY&&(t+="_"+o.offsetY.toString()),null!=o.width&&(t+="_"+o.width.toString()),null!=o.height&&(t+="_"+o.height.toString()),null!=o.style&&(null!=o.style.color&&(t+="_"+o.style.color),null!=o.style.opacity&&(t+="_"+o.style.opacity.toString()),null!=o.style.weight&&(t+="_"+o.style.weight.toString()),null!=o.style.remainingVolumeColor&&(t+="_"+o.style.remainingVolumeColor),null!=o.style.remainingVolumeOpacity&&(t+="_"+o.style.remainingVolumeOpacity.toString()),null!=o.style.consumeVolumeColor&&(t+="_"+o.style.consumeVolumeColor),null!=o.style.consumeVolumeOpacity&&(t+="_"+o.style.consumeVolumeOpacity.toString()))}return t},_generateFromPictureFrame:function(){var t="";if(null==this.feature.pictureFrames)return t;for(var e=0;e<this.feature.pictureFrames.length;e++){var o=this.feature.pictureFrames[0];null!=o.path&&(t+="_"+o.path),null!=o.position&&(t+="_"+o.position.toString()),null!=o.offsetX&&(t+="_"+o.offsetX.toString()),null!=o.offsetY&&(t+="_"+o.offsetY.toString()),null!=o.width&&(t+="_"+o.width.toString()),null!=o.height&&(t+="_"+o.height.toString())}return t},_generateFromFeatureStyle:function(t){var e="";return null!=t.fontFamily&&(e+=t.fontFamily),null!=t.fontSize&&(e+="_"+t.fontSize),null!=t.fontColor&&(e+="_"+t.fontColor),null!=t.fontStroke&&(e+="_"+t.fontStroke),null!=t.fontStrokeColor&&(e+="_"+t.fontStrokeColor),null!=t.fontStrokeWidth&&(e+="_"+t.fontStrokeWidth),null!=t.fontBackground&&(e+="_"+t.fontBackground),null!=t.fontBackgroundColor&&(e+="_"+t.fontBackgroundColor),null!=t.fontShadow&&(e+="_"+t.fontShadow),null!=t.fontShadowColor&&(e+="_"+t.fontShadowColor),null!=t.fontShadowOffsetX&&(e+="_"+t.fontShadowOffsetX),null!=t.fontShadowOffsetY&&(e+="_"+t.fontShadowOffsetY),null!=t.color&&(e+="_"+t.color),null!=t.weight&&(e+="_"+t.weight),null!=t.opacity&&(e+="_"+t.opacity),null!=t.lineSymbolID&&(e+="_"+t.lineSymbolID),null!=t.dashArray&&(e+="_"+t.dashArray),null!=t.fill&&(e+="_"+t.fill),null!=t.fillSymbolID&&(e+="_"+t.fillSymbolID),null!=t.fillColor&&(e+="_"+t.fillColor),null!=t.fillOpacity&&(e+="_"+t.fillOpacity),null!=t.fillBackColor&&(e+="_"+t.fillBackColor),null!=t.fillBackOpacity&&(e+="_"+t.fillBackOpacity),null!=t.fillGradientMode&&(e+="_"+t.fillGradientMode),null!=t.surroundLineColor&&(e+="_"+t.surroundLineColor),null!=t.surroundLineColorOpacity&&(e+="_"+t.surroundLineColorOpacity),null!=t.surroundLineWidth&&(e+="_"+t.surroundLineWidth),e}});L.supermap.plotting.dotSymbolStyle=function(t){return new Lu(t)};var Mu=yu.extend({addFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]),yu.prototype.addFeatures.call(this,t)}});L.supermap.plotting.animationLayer=function(t,e){return new Mu(t,e)};var vu=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),o=this.getPosition(),i=t._controlCorners[o];return L.DomUtil.addClass(e,"leaflet-control"),-1!==o.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.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-",o=this._controlContainer=L.DomUtil.create("div",e+"control-container",this._container);function i(i,n){var l=e+i+" "+e+n;t[i+n]=L.DomUtil.create("div",l,o)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){L.DomUtil.remove(this._controlContainer)}});var Au=vu.extend({_mouseTolerance:10,_polyline:null,_currentpolyline:null,_editMarkers:null,wayAnimation:null,wayPath:[],_able:null,options:{wayAnimationStyle:{fill:!1,color:"#ff0000",dashArray:"2, 2",opacity:1,weight:1},draggable:!0,avoidIcon:L.divIcon({className:"leaflet-supermap-plot-avoid-icon-path",iconSize:[8,8]}),icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"})},initialize:function(t){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&(this.options.avoidIcon=L.divIcon({className:"leaflet-supermap-plot-avoid-icon-path",iconSize:[15,15]}),this.options.icon=new L.DivIcon({iconSize:new L.Point(15,15),className:"leaflet-div-icon leaflet-editing-icon"})),L.Control.prototype.initialize.call(this,t),L.setOptions(this,t),this._editMarkers={},this._polyline=null,this._lineType=null},onAdd:function(t){return this.controlDiv=L.DomUtil.create("div","supermap-iclient-wayanmation"),this._map=t,this._markers=[],this._latlngs=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._map.on("mousemove",this._onMouseMove,this).on("click",this._onMapClick,this),this.controlDiv},onRemove:function(){this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,delete this._latlngs,this._polyline&&(delete this._polyline,this._polyline=null),this._map.off("mousemove",this._onMouseMove,this).off("click",this._onMapClick,this)},setWayAnimation:function(t){this.wayAnimation=t,this._lineType=this.wayAnimation.getGOAnimationType();try{if(this._lineType!=SuperMap.Plot.GOAnimationType.ANIMATION_BROKENLINE_EXP&&this._lineType!=SuperMap.Plot.GOAnimationType.ANIMATION_CURVE_EXP)throw new Error("The type of animation is error!");null!=this.wayAnimation.path&&(this._currentpolyline=this.wayAnimation.path)}catch(t){console.log(t.message)}},setSelected:function(){if(null==this._currentpolyline)return!1;var t=this._currentpolyline._leaflet_id,e=this._map.getLayer(t);this._collectEditMarkers(e)},unSelected:function(){if(null==this._currentpolyline)return!1;var t=this._currentpolyline._leaflet_id,e=this._map.getLayer(t);this._removeMarkers(e)},setVisiable:function(t){var e=null;if(e=t?1:0,null!=this._currentpolyline){var o=this._map.getLayer(this._currentpolyline._leaflet_id).options.weight,i=this._map.getLayer(this._currentpolyline._leaflet_id).options.color;this._map.getLayer(this._currentpolyline._leaflet_id).setStyle({color:i,weight:o,opacity:e})}},getVisibale:function(){if(null!=this._currentpolyline){var t=this._currentpolyline.options.opacity;if(1==t)return!0;if(0==t)return!1}},enable:function(){this._able=!0},disable:function(){this._able=!1},_onMouseOut:function(t){t.target.layer._renderer._container.style.cursor=""},_onMapClick:function(t){if(this._able){if(this.moveend)return void(this.moveend=!1);var e=this._map.mouseEventToLayerPoint(t.originalEvent),o=this._map.layerPointToLatLng(e);this._polyline?this._addVertex(o):(this._polyline=L.polyline([],{color:"red",weight:1}),this._polyline.options.color="red",this._polyline.redraw(),this._polyline.type="polyline",this._polyline.addLatLng(o),this._polyline.addTo(this._map),this._addVertex(o)),L.DomEvent.preventDefault(t.originalEvent)}},_collectEditMarkers:function(t){var e=[];for(var o in t._featureControlPoints){var i=new L.LatLng(t._featureControlPoints[o].lat,t._featureControlPoints[o].lng),n=L.supermap.plotting.editMarker(i,{icon:this.options.avoidIcon,nHandle:-1,tag:o});this._addToMapAndBindMarker(n),e.push(n),n.owner=t}this._editMarkers[t._leaflet_id]=e},_removeMarkers:function(t){var e=this._editMarkers[t._leaflet_id];for(var o in e)this._unbindMarkerEvents(e[o]),this._map.removeLayer(e[o]);delete this._editMarkers[t._leaflet_id]},_unbindMarkerEvents:function(t){t.off("mousemove",this._moveMove,this),t.off("mouseout",this._moveOut,this),t.off("drag",this.redraw,this),t.dragging.disable()},_addToMapAndBindMarker:function(t){t.addTo(this._map),t.on("mousemove",this._moveMove,this),t.on("mouseout",this._moveOut,this),t.on("drag",this._dragPoint,this),t.dragging.enable()},_removePoint:function(t){if(t.target.owner.isSelected){var e=this._editMarkers[t.target.owner._leaflet_id],o=e.indexOf(t.target);this._map.removeLayer(e[o]),e.splice(o,1),t.target.owner.latLngs.splice(o,1),t.target.owner.redraw()}},_dragPoint:function(t){var e=t.target.owner,o=this._editMarkers[e._leaflet_id],i=SuperMap.Util.indexOf(o,t.target);e._featureControlPoints[i]=t.latlng,this._changeAnimationPath(e),this.fire(SuperMap.Plot.Event.wayfeaturemodifyfinished,{result:e._featureControlPoints,animation:this.wayAnimation}),this.moveend=!0},_changeAnimationPath:function(t){var e=t._featureControlPoints,o=t._leaflet_id;if(this._lineType==SuperMap.Plot.GOAnimationType.ANIMATION_BROKENLINE_EXP)this._map.getLayer(o).setLatLngs(e),this._map.getLayer(o)._featureControlPoints=e,this.wayAnimation.setPath(this._map.getLayer(o)),this.wayAnimation.setWayPoints(e);else{var i=this._latLng2AlgoPlot(e);i=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(i),i=this._algoPlot2LatLng(i),this._map.getLayer(o).setLatLngs(i),this._map.getLayer(o)._featureControlPoints=e,this.wayAnimation.setPath(this._map.getLayer(o)),this.wayAnimation.setWayPoints(e)}},_moveMove:function(t){t.target._icon.style.cursor="pointer"},_moveOut:function(t){t.target._icon.style.cursor=""},_addVertex:function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});if(this._markerGroup.addLayer(e),this._markers.push(e),this._latlngs.push(t),this._lineType==SuperMap.Plot.GOAnimationType.ANIMATION_BROKENLINE_EXP)this._polyline.setLatLngs(this._latlngs);else{var o=this._latLng2AlgoPlot(this._latlngs);o=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(o),o=this._algoPlot2LatLng(o),this._polyline.setLatLngs(o)}var i=this._markers.length;i>1&&this._markers[i-1].on("click",this._finishShape,this),i>2&&this._markers[i-2].off("click",this._finishShape,this)},_finishShape:function(){if(this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this),L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode())if(this._lineType==SuperMap.Plot.GOAnimationType.ANIMATION_BROKENLINE_EXP)this._polyline.setLatLngs(this._latlngs);else{var t=this._latLng2AlgoPlot(this._latlngs);t=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t),t=this._algoPlot2LatLng(t),this._polyline.setLatLngs(t)}this._markerGroup.clearLayers(),this._markers=[],this._polyline._featureControlPoints=this._latlngs,this.disable(),this.wayAnimation.setPath(this._polyline),this._currentpolyline=this._polyline,this.wayAnimation.setWayPoints(this._polyline._featureControlPoints),this._polyline.setStyle({opacity:0}),this.fire(SuperMap.Plot.Event.wayfeaturedrawfinished,{feature:this._polyline,animation:this.wayAnimation}),this._latlngs=[],delete this._polyline,this._lineType=null,this._polyline=null},_onMouseMove:function(t){if(this._able){var e=this._map.mouseEventToLayerPoint(t.originalEvent),o=this._map.layerPointToLatLng(e);if(this._polyline){var i=L.Util.cloneLatLngs(this._latlngs);if(0===i.length?i.push(o):i[i.length-1].lat===o.lat&&i[i.length-1].lng===o.lng||i.push(o),this._lineType==SuperMap.Plot.GOAnimationType.ANIMATION_BROKENLINE_EXP)this._polyline.setLatLngs(i);else{var n,l;n=this._latLng2AlgoPlot(i);var a=this._calBeizer(n);l=this._algoPlot2LatLng(a),this._polyline.setLatLngs(l)}}L.DomEvent.preventDefault(t.originalEvent)}},_calBeizer:function(t){return SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t)},_latLng2AlgoPlot:function(t){for(var e=[],o=0;o<t.length;o++){var i=new SuperMapAlgoPlot.Point(t[o].lng,t[o].lat);e.push(i)}return e},_algoPlot2LatLng:function(t){for(var e=[],o=0;o<t.length;o++){var i=L.latLng(t[o].y,t[o].x);e.push(i)}return e}});L.supermap.plotting.wayAnimationControl=function(t){return new Au(t)};var Tu=vu.extend({drawType:null,_editMarkers:null,_polyline:null,_polygon:null,_drawObject:null,_positionMarkers:null,_active:null,_measureService:null,options:{measureShapeStyle:{fill:!1,color:"#ffff00",dashArray:"2, 2",opacity:1,weight:1},draggable:!0,avoidIcon:L.divIcon({className:"leaflet-supermap-plot-avoid-icon-path",iconSize:[8,8]}),icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"})},initialize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2?arguments[2]:void 0;if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&(this.options.avoidIcon=L.divIcon({className:"leaflet-supermap-plot-avoid-icon-path",iconSize:[15,15]}),this.options.icon=new L.DivIcon({iconSize:new L.Point(15,15),className:"leaflet-div-icon leaflet-editing-icon"})),L.Control.prototype.initialize.call(this,o),L.setOptions(this,o),this.drawType=t,this._editMarkers={},this._polyline=null,this._polygon=null,this._drawObject=[],this._positionMarkers=[],this._measureService=e},onAdd:function(t){return this.controlDiv=L.DomUtil.create("div","supermap-iclient"),this._map=t,this._markers=[],this._latlngs=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._map.on("mousemove",this._onMouseMove,this).on("click",this._onMapClick,this),this.controlDiv},onRemove:function(){this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,delete this._latlngs,this._polyline&&(delete this._polyline,this._polyline=null),this._polygon&&(delete this._polygon,this.polygon=null),this._map.off("mousemove",this._onMouseMove,this).off("click",this._onMapClick,this)},setMeasureType:function(t){this.drawType=t},enable:function(){this._active=!0,this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._mouseMarker.on("dblclick",this._finishShape,this).addTo(this._map)},disable:function(){this._active=!1,this._mouseMarker&&(this._mouseMarker.off("click",this._onClick,this),this._mouseMarker.off("dblclick",this._finishShape,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker)},clear:function(){this._active=!1,this._latlngs=[],this._polyline=null,this._polygon=null;for(var t=0;t<this._drawObject.length;t++)this._map.removeLayer(this._drawObject[t]);this._drawObject=[];for(var e=0;e<this._positionMarkers.length;e++)this._map.removeLayer(this._positionMarkers[e]);this._markers=[],this.disable()},_measureDistance:function(t){if(null!=t&&1!==t.length){for(var e=[],o=0;o<t.length;o++)e.push(t[o]);this._measureService||(this._measureService="http://localhost:8090/iserver/services/map-china400/rest/maps/China_4326");var i=new L.supermap.MeasureService(this._measureService),n=new L.supermap.MeasureParameters;n.geometry=this._polyline,n.unit=L.supermap.Unit.METER,i.measureDistance(n,function(t){var o=t.result;if(null!=o){var i="距离:"+o.distance+"米";this._markers[e.length-1].bindPopup(i).openPopup(this._markers[0].getLatLng())}}.bind(this))}},_measureArea:function(t){if(!(t.length<3)){for(var e=[],o=0;o<t.length;o++)e.push(t[o]);this._measureService||(this._measureService="http://localhost:8090/iserver/services/map-china400/rest/maps/China_4326");var i=new L.supermap.MeasureService(this._measureService),n=new L.supermap.MeasureParameters;n.geometry=this._polygon,i.measureArea(n,function(t){if(void 0!==t.result){var e="面积:"+t.result.area+"平方米";this._polygon&&this._polygon.bindPopup(e).openPopup(this._polygon.getCenter())}}.bind(this))}},_measureAzimuth:function(t){if(null!=t&&1!==t.length){for(var e=[],o=0;o<t.length;o++)e.push(t[o]);for(var i=[],n=0;n<e.length-1;n++){var l=this.calculateazimuth(e[n],e[n+1]);i.push(l)}for(var a=0;a<e.length-1;a++)if(i[a]<0){var s=i[a]+360;this._markers[t.length-1].bindPopup("方位角为:"+s+"°").openPopup(this._markers[t.length-1].getLatLng())}else this._markers[t.length-1].bindPopup("方位角为:"+i[a]+"°").openPopup(this._markers[t.length-1].getLatLng())}},calculateazimuth:function(t,e){var o=t.lat*(Math.PI/180),i=t.lng*(Math.PI/180),n=e.lat*(Math.PI/180),l=e.lng*(Math.PI/180);return Math.atan2(Math.sin(l-i)*Math.cos(n),Math.cos(o)*Math.sin(n)-Math.sin(o)*Math.cos(n)*Math.cos(l-i))*(180/Math.PI)},_onMouseOut:function(t){t.target.layer._renderer._container.style.cursor=""},_onMapClick:function(t){if(this._active){if(this.moveend)return void(this.moveend=!1);var e=this._map.mouseEventToLayerPoint(t.originalEvent),o=this._map.layerPointToLatLng(e);this._polyline||this._polygon?(this._addVertex(o),0===this.drawType?this._measureDistance(this._latlngs):1===this.drawType?this._measureArea(this._latlngs):2===this.drawType&&this._measureAzimuth(this._latlngs)):(this._markers=[],1!=this.drawType?(this._polyline=L.polyline([],{color:"#ffff00"}),this._polyline.addLatLng(o),this._polyline.addTo(this._map),this._addVertex(o),0===this.drawType?this._measureDistance(this._latlngs):2===this.drawType&&this._measureAzimuth(this._latlngs)):1===this.drawType&&(this._polygon=L.polygon([],{color:"#ffff00"}),this._polygon.addLatLng(o),this._polygon.addTo(this._map),this._addVertex(o),this._measureArea(this._latlngs))),L.DomEvent.preventDefault(t.originalEvent)}},_onClick:function(t){if(this._active){if(this.moveend)return void(this.moveend=!1);var e=this._map.mouseEventToLayerPoint(t.originalEvent),o=this._map.layerPointToLatLng(e);this._polyline||this._polygon?(this._addVertex(o),0===this.drawType?this._measureDistance(this._latlngs):1===this.drawType?this._measureArea(this._latlngs):2===this.drawType&&this._measureAzimuth(this._latlngs)):1!=this.drawType?(this._polyline=L.polyline([],{color:"#ffff00"}),this._polyline.addLatLng(o),this._polyline.addTo(this._map),this._addVertex(o),0===this.drawType?this._measureDistance(this._latlngs):2===this.drawType&&this._measureAzimuth(this._latlngs)):1===this.drawType&&(this._polygon=L.polygon([],{color:"#ffff00"}),this._polygon.addLatLng(o),this._polygon.addTo(this._map),this._addVertex(o),this._measureArea(this._latlngs)),L.DomEvent.preventDefault(t.originalEvent)}},_addVertex:function(t){var e=new L.Marker(t);this._map.addLayer(e),this._markerGroup.addLayer(e),this._markers.push(e),this._positionMarkers.push(e),this._latlngs.push(t),1!=this.drawType?this._polyline.setLatLngs(this._latlngs):this._polygon.setLatLngs(this._latlngs);var o=this._markers.length;o>1&&this._markers[o-1].on("click",this._finishShape,this),o>2&&this._markers[o-2].off("click",this._finishShape,this)},_finishShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this),1!=this.drawType?(this._polyline.setLatLngs(this._latlngs),0===this.drawType?this._measureDistance(this._latlngs):2===this.drawType&&this._measureAzimuth(this._latlngs),this._drawObject.push(this._polyline)):1===this.drawType&&(this._polygon.setLatLngs(this._latlngs),this._measureArea(this._latlngs),this._drawObject.push(this._polygon)),this._polyline?(this._polyline._featureControlPoints=this._latlngs,delete this._polyline,this._polyline=null):this._polygon&&(this._polygon._featureControlPoints=this._latlngs,delete this._polygon,this._polygon=null),this._latlngs=[]},_onMouseMove:function(t){if(this._active){var e=this._map.mouseEventToLayerPoint(t.originalEvent),o=this._map.layerPointToLatLng(e);if(this._polyline||this._polygon){var i=L.Util.cloneLatLngs(this._latlngs);0===i.length?i.push(o):i[i.length-1].lat===o.lat&&i[i.length-1].lng===o.lng||i.push(o),1!=this.drawType?(this._polyline.setLatLngs(i),0===this.drawType?this._measureDistance(this._latlngs):2===this.drawType&&this._measureAzimuth(this._latlngs)):(this._polygon.setLatLngs(i),this._measureArea(this._latlngs)),this._mouseMarker.setLatLng(o)}L.DomEvent.preventDefault(t.originalEvent)}}});L.supermap.plotting.measureControl=function(t,e){return new Tu(t,e)};var _u=L.Handler.extend({symbolData:null,plotting:null,_isDrawing:!1,libID:0,code:24,serverUrl:"",path:null,isFreeCure:!1,_drawingLayer:null,_tempDrawingLayer:null,_control:null,options:{tolerancePixel:6,allowIntersection:!0,repeatMode:!0,icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3},initialize:function(t,e,o){L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&(this.options.icon=this.options.touchIcon),this._map=t,this._drawingLayer=e,this._tempDrawingLayer=new yu("drawControl-temportary"),this._container=t._container,this._overlayPane=t._panes.overlayPane,L.setOptions(this,o)},addHooks:function(){this._map&&(this._isDrawing=!1,this._markers=[],this._latlngs=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._map.addLayer(this._tempDrawingLayer),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("zoomend",this._onZoomEnd,this),this._map.getPlotEditControl()&&this._map.getPlotEditControl()._avoidEditing&&this._map.getPlotEditControl().avoidEdit(!1),null!=this._map.doubleClickZoom&&this._map.doubleClickZoom.enabled()&&(this.doubleClickZoomEnabled=!0,this._map.doubleClickZoom.disable()))},removeHooks:function(){this._isDrawing=!1,this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,delete this._latlngs,delete this.isFreeCure,this.plotting&&(this._tempDrawingLayer.removeFeatures(this.plotting),delete this.plotting,this.plotting=null),this._map.removeLayer(this._tempDrawingLayer),this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseup",this._onMouseUp,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this),null!=this._map.doubleClickZoom&&!0===this.doubleClickZoomEnabled&&this._map.doubleClickZoom.enable()},deleteLastVertex:function(){if(!(this._markers.length<=1)){this._latlngs.pop();var t=this._markers.pop(),e=this.plotting.getLatLngs(),o=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(o,!1)}},addVertex:function(t){if(this._markers.push(this._createMarker(t)),this._latlngs.push(t),this.plotting&&0===this.libID&&1023===this.code&&!0===this.isFreeCure)this.plotting.setLatLngs(this._freeCurveResample(this._latlngs));else if(this.plotting&&SuperMap.Plot.AlgoSymbolFactory.isAccessServer(this.plotting.libID,this.plotting.code)&&this._latlngs.length>=this.plotting.minEditPts){var e=new SuperMap.GetSymbolInfoParameters({libID:this.libID,code:this.code});e.inputPoints=L.Util.latLngsToSuperMapPoints(this._latlngs),L.supermap.symbolInfoService(this._drawingLayer.serverUrl,this._drawingLayer.options.serviceParams).getSymbolInfo(e,function(t){this.plotting.symbolData=t.result,this.plotting.setLatLngs(this._latlngs)},this)}else if(this.plotting&&this.plotting instanceof iu){var o=this._map.layerPointToLatLng(L.point(0,0)),i=this._map.layerPointToLatLng(L.point(this.options.tolerancePixel,0)),n=SuperMap.Plot.PlottingUtil.distance({x:o.lng,y:o.lat},{x:i.lng,y:i.lat});this.plotting._addRouteNodeByPos(t,n)}else this.plotting&&this.plotting.setLatLngs(this._latlngs);this._vertexChanged(t,!0)},_finishShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this),L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&this._latlngs.length+1<this.plotting.maxEditPts&&"function"==typeof this.plotting.getLatLngs&&this._latlngs.length!==this.plotting.getLatLngs().length&&this.plotting.setLatLngs(this._latlngs),0===this.libID&&this.code===SuperMap.Plot.SymbolType.FREECURVE&&!0===this.isFreeCure&&(this.isFreeCure=!1),-1===this.plotting.libID&&(this.plotting.libID=this.libID,this.plotting.code=this.code);var t=this.plotting.clone();if(this._markerGroup.clearLayers(),this._markers=[],this._latlngs=[],this._tempDrawingLayer.removeFeatures(this.plotting),delete this.plotting,this._drawingLayer.addFeatures(t),this._drawingLayer._renderer instanceof L.SVG&&(t.isFirstAdd=!0),this._control.fire(SuperMap.Plot.Event.featureadded,{feature:t}),this._isDrawing=!1,this.options.repeatMode||this.disable(),null!=t.layer){var e=new SuperMap.Plot.Transaction;e.transType=SuperMap.Plot.TransactionType.CREATE;var o=new SuperMap.Plot.TransactionInfo;o.layerId=t.layer._leaflet_id,o.feature=t,e.transInfos.push(o),L.supermap.plotting.getControl(this._map,this.serverUrl,{serviceParams:this._drawingLayer.options.serviceParams}).getTransManager().add(e)}},_onZoomEnd:function(){this._markers},_onMouseMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent),o=this._map.layerPointToLatLng(e);if(this._currentLatLng=o,!this.plotting||!0!==this._isDrawing||this.plotting instanceof iu)!1===this._isDrawing&&(this._isDrawing=!0,this._createFeature());else{var i=L.Util.cloneLatLngs(this._latlngs);if(0===i.length?i.push(o):i[i.length-1].lat===o.lat&&i[i.length-1].lng===o.lng||i.push(o),0===this.libID&&this.code===SuperMap.Plot.SymbolType.FREECURVE&&!0===this.isFreeCure){this._latlngs.push(o);var n=this._freeCurveResample(this._latlngs);this.plotting.setLatLngs(n),o.lat=n[n.length-1].lat,o.lng=n[n.length-1].lng}else if(this.plotting.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL&&SuperMap.Plot.AlgoSymbolFactory.isAccessServer(this.plotting.libID,this.plotting.code)&&i.length>=this.plotting.minEditPts){var l=new SuperMap.GetSymbolInfoParameters({libID:this.libID,code:this.code});l.inputPoints=L.Util.latLngsToSuperMapPoints(i),L.supermap.symbolInfoService(this._drawingLayer.serverUrl,this._drawingLayer.options.serviceParams).getSymbolInfo(l,function(t){this.plotting.symbolData=t.result,this.plotting.setLatLngs(i)},this)}else this.plotting.setLatLngs(i)}this._mouseMarker.setLatLng(o),L.DomEvent.preventDefault(t.originalEvent)},_createFeature:function(t){if(this._tempDrawingLayer.setSymScaleDefinition(this._drawingLayer.getSymScaleDefinition()),0===this.libID&&this.code===SuperMap.Plot.SymbolType.PICTURE)this.plotting=L.supermap.plotting.PlottingObject.createSymbol(this.libID,this.code,[],{serverUrl:this._drawingLayer.serverUrl,spatialAnalystUrl:this._drawingLayer.spatialAnalystUrl,serviceParams:this._drawingLayer.serviceParams,map:this._map,path:this.path}),this._control.fire(SuperMap.Plot.Event.beforefeatureadded,{feature:this.plotting}),this._tempDrawingLayer.addFeatures(this.plotting),this.plotting.isEdit=!1,"function"==typeof t&&t();else if(SuperMap.Plot.AlgoSymbolFactory.isAccessServer(this.libID,this.code))if(this.symbolData=this._drawingLayer._getSymbolDataFromCache(this.libID,this.code),null===this.symbolData){var e=Math.floor(1e3*Math.random()),o=new SuperMap.GetSymbolInfoParameters({libID:this.libID,code:this.code});o.dynamicToken=e,L.supermap.symbolInfoService(this._drawingLayer.serverUrl,this._drawingLayer.options.serviceParams).getSymbolInfo(o,function(o){o.result.dynamicToken&&o.result.dynamicToken===SuperMap.MD5.md5(e.toString())?this.libID!==o.result.libID||this.code!==o.result.code?this.symbolData=null:(this._drawingLayer._cacheSymbolData(o.result),this.symbolData=o.result,this.plotting=L.supermap.plotting.PlottingObject.createSymbol(this.libID,this.code,[],{symbolData:this.symbolData,serverUrl:this._drawingLayer.serverUrl,serviceParams:this._drawingLayer.serviceParams,map:this._map}),this._control.fire(SuperMap.Plot.Event.beforefeatureadded,{feature:this.plotting}),this._tempDrawingLayer.addFeatures(this.plotting),this.plotting.isEdit=!1,"function"==typeof t&&t()):this.symbolData=null},this)}else this.plotting=L.supermap.plotting.PlottingObject.createSymbol(this.libID,this.code,[],{symbolData:this.symbolData,serverUrl:this._drawingLayer.serverUrl,serviceParams:this._drawingLayer.serviceParams,map:this._map}),this._control.fire(SuperMap.Plot.Event.beforefeatureadded,{feature:this.plotting}),this._tempDrawingLayer.addFeatures(this.plotting),this.plotting.isEdit=!1,"function"==typeof t&&t();else if(this.plotting=L.supermap.plotting.PlottingObject.createSymbol(this.libID,this.code,[],{serverUrl:this._drawingLayer.serverUrl,spatialAnalystUrl:this._drawingLayer.spatialAnalystUrl,serviceParams:this._drawingLayer.serviceParams,map:this._map}),this.plotting.subSymbols&&0!==this.plotting.subSymbols.length){for(var i=[],n=0,l=this.plotting.subSymbols.length;n<l;n++)null===this.plotting.subSymbols[n].symbolData&&(this.plotting.subSymbols[n].symbolData=this._drawingLayer._getSymbolDataFromCache(this.plotting.subSymbols[n].libID,this.plotting.subSymbols[n].code),null===this.plotting.subSymbols[n].symbolData&&-1===SuperMap.Util.indexOf(i,this.plotting.subSymbols[n])&&i.push(this.plotting.subSymbols[n]));for(var a=i.slice(),s=0;s<i.length;s++){var r=new SuperMap.GetSymbolInfoParameters({libID:i[s].libID,code:i[s].code});L.supermap.symbolInfoService(this.serverUrl,this._drawingLayer.options.serviceParams).getSymbolInfo(r,function(e){this._drawingLayer._cacheSymbolData(e.result);for(var o=0,i=this.plotting.subSymbols.length;o<i;o++)if(null===this.plotting.subSymbols[o].symbolData&&this.plotting.subSymbols[o].libID===e.result.libID&&this.plotting.subSymbols[o].code===e.result.code){var n=SuperMap.Util.indexOf(a,this.plotting.subSymbols[o]);-1!==n&&a.splice(n,1),this.plotting.subSymbols[o].symbolData=SuperMap.Plot.PlottingUtil.cloneObject(e.result)}0===a.length&&(this._control.fire(SuperMap.Plot.Event.beforefeatureadded,{feature:this.plotting}),this._tempDrawingLayer.addFeatures(this.plotting),this.plotting.isEdit=!1,"function"==typeof t&&t())},this)}0===i.length&&(this._control.fire(SuperMap.Plot.Event.beforefeatureadded,{feature:this.plotting}),this._tempDrawingLayer.addFeatures(this.plotting),this.plotting.isEdit=!1,"function"==typeof t&&t())}else this._control.fire(SuperMap.Plot.Event.beforefeatureadded,{feature:this.plotting}),this._tempDrawingLayer.addFeatures(this.plotting),this.plotting.isEdit=!1,"function"==typeof t&&t()},_vertexChanged:function(){var t=this._markers.length;t>1&&this._markers[t-1].on("click",this._finishShape,this),t>2&&this._markers[t-2].off("click",this._finishShape,this)},_onMouseDown:function(t){if((!t||2!==t.originalEvent.button)&&!this._clickHandled&&!this._touchHandled&&!this._disableMarkers&&this._drawingLayer&&this._drawingLayer.isEditable&&this._drawingLayer._map){this._onMouseMove(t),this._clickHandled=!0,this._disableNewMarkers();var e=t.originalEvent,o=e.clientX,i=e.clientY;this._startPoint.call(this,o,i)}},_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,o=e.clientX,i=e.clientY;this._endPoint.call(this,o,i,t),this._clickHandled=null,L.DomEvent.stopPropagation(t)},_endPoint:function(t,e,o){if(this._mouseDownOrigin){var i=L.point(t,e).distanceTo(this._mouseDownOrigin),n=this._calculateFinishDistance(o.latlng);if(L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&null==this.plotting){var l=this;this._createFeature(function(){l._latlngs.push(o.latlng),l.plotting.setLatLngs(l._latlngs),(l.plotting instanceof nr||l.plotting instanceof L.supermap.plotting.Route)&&(l._latlngs.length+1>=l.plotting.maxEditPts||n<20&&L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode())?l._finishShape():Math.abs(i)<9*(window.devicePixelRatio||1)&&l.addVertex(o.latlng),l._enableNewMarkers()})}else(this.plotting instanceof nr||this.plotting instanceof L.supermap.plotting.Route)&&(this._latlngs.length+1>=this.plotting.maxEditPts||n<20&&L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode())?this._finishShape():Math.abs(i)<9*(window.devicePixelRatio||1)&&this.addVertex(o.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(t){var e,o,i=t.originalEvent;!i.touches||!i.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(e=i.touches[0].clientX,o=i.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,e,o),this._endPoint.call(this,e,o,t),this._touchHandled=null),this._clickHandled=null},_calculateFinishDistance:function(t){var e;if(this._markers.length>0){var o=this._markers[this._markers.length-1],i=this._map.latLngToContainerPoint(o.getLatLng()),n=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),l=this._map.latLngToContainerPoint(n.getLatLng());e=i.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)},_freeCurveResample:function(t){var e=t.slice(),o=[];if(e.length<3)o=e.slice();else{if(!this.plotting.isEdit){var i=this._map.layerPointToLatLng(L.point(0,0)),n=this._map.layerPointToLatLng(L.point(100,100)),l=Math.abs(i.lng-n.lng),a=this._reSample(L.Util.latLngsToSuperMapPoints(e),l/50);(a=L.Util.superMapPointsToLatLngs(a)).length<3&&(a=e),e=(e=[]).concat(a)}var s=SuperMap.Plot.PlottingUtil.computeBeizerPoints(this.plotting.isEdit,L.Util.latLngsToSuperMapPoints(e),[]);o=SuperMap.Plot.PlottingUtil.clonePoints(L.Util.superMapPointsToLatLngs(s.beizerPoints))}return o},_reSample:function(t,e){var o=[];if(null==t||e<0)return o;var i=t.length;if(i>2){var n=new SuperMapAlgoPlot.Point(0,0),l=0,a=0,s=0,r=2*Math.PI;n=t[0],o.push(n);for(var u=!1,p=!1,h=!1,c=1;c<i;c++)if(a=Math.sqrt((t[c].y-n.y)*(t[c].y-n.y)+(t[c].x-n.x)*(t[c].x-n.x)),SuperMapAlgoPlot.PlottingUtil.equalFuzzy(0,a))u&&(n=t[c-1],c--,o.push(n),s=0,r=2*Math.PI,u=!1,p=!1,h=!1);else{var y=(t[c].x-n.x)/a,g=(t[c].y-n.y)/a;if(l=g>0||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(0,g)?Math.acos(y):2*Math.PI-Math.acos(y),r>2*Math.PI&&l+2*Math.PI<r?(l+=2*Math.PI,s<0&&(s+=2*Math.PI)):s<0&&l-2*Math.PI>s&&(l-=2*Math.PI,r>2*Math.PI&&(r-=2*Math.PI)),l>s&&l<r||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(0,l-s)||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(0,l-r)){var f=Math.atan(e/a);p?s<l-f&&(s=l-f):(p=!0,s=l-f),h?r>l+f&&(r=l+f):(h=!0,r=l+f),u=!0}else n=t[c-1],c--,o.push(n),s=0,r=2*Math.PI,u=!1,p=!1,h=!1}return o.push(t[i-1]),o}return o}}),Ou=vu.extend({drawingLayer:null,initialize:function(t,e){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");this.drawingLayer=t,null!=this.drawingLayer&&this.drawingLayer instanceof bu&&(L.supermap.plotting.getControl().plotMapManager.activePlottingLayer=this.drawingLayer,L.supermap.plotting.getControl().plotMapManager.activeChildPlotLayer=this.drawingLayer.getChildPlotLayers()[0]),L.Control.prototype.initialize.call(this,e)},onAdd:function(t){var e=L.DomUtil.create("div","supermap-iclient");return this._map=t,this.handler=new _u(this._map,this.drawingLayer),this.handler._control=this,this._map._plotDrawControl=this,e},onRemove:function(){this._map._plotDrawControl=null,this._map=null,this.handler=null},setDrawingLayer:function(t,e){this.drawingLayer=t,this.handler._drawingLayer=t,this.handler._tempDrawingLayer.serverUrl=t.serverUrl,this.handler._tempDrawingLayer.symScaleDefinition=t.symScaleDefinition,this.handler._tempDrawingLayer.enableSymScale=t.enableSymScale,this.handler._drawingLayer.serviceParams=t.serviceParams,this.drawingLayer instanceof bu&&(L.supermap.plotting.getControl().plotMapManager.activePlottingLayer=this.drawingLayer,null!=e&&-1!=SuperMap.Util.indexOf(this.drawingLayer.getChildPlotLayers(),e)?L.supermap.plotting.getControl().plotMapManager.activeChildPlotLayer=e:L.supermap.plotting.getControl().plotMapManager.activeChildPlotLayer=this.drawingLayer.getChildPlotLayers()[0])}});L.Map.include({getPlotDrawControl:function(){return this._plotDrawControl?this._plotDrawControl:null}});L.supermap.plotting.drawControl=function(t,e){return new Ou(t,e)};var xu=vu.extend({_dragStartScale:null,_dragStartRotate:null,_dragStartBounds:null,_dragStartLatLngs:null,_dragStartScaleValues:null,_dragStartPositionOffset:null,_dragStartScalePoints:null,_editMarkers:null,_disEditBox:null,_editFeatures:null,_mouseTolerance:10,touchTolerance:20,_editMode:SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE,_avoidEditing:!1,_isMultiSelect:!1,selectedFeatures:[],options:{highlightFlag:!0,highlightStyle:{color:"#ffffff",opacity:1,weight:1},unEditIconClassName:"icon iconfont icon-xuanzhong1",draggable:!0,editIcon:L.divIcon({className:"leaflet-supermap-plot-control-icon-path",iconSize:[10,10]}),scaleIcon:L.divIcon({className:"leaflet-supermap-plot-scale-icon-path",iconSize:[10,10]}),rotateIcon:L.divIcon({className:"leaflet-supermap-plot-rotate-icon-path",iconSize:[15,15]}),lockedIcon:L.divIcon({className:"leaflet-supermap-plot-locked-icon-path",iconSize:[10,10]}),avoidIcon:L.divIcon({className:"leaflet-supermap-plot-avoid-icon-path",iconSize:[8,8]}),leftTopIcon:L.divIcon({className:"leaflet-supermap-plot-left-top-icon-path",iconSize:[15,15]}),rightTopIcon:L.divIcon({className:"leaflet-supermap-plot-right-top-icon-path",iconSize:[15,15]}),leftBottomIcon:L.divIcon({className:"leaflet-supermap-plot-left-bottom-icon-path",iconSize:[15,15]}),rightBottomIcon:L.divIcon({className:"leaflet-supermap-plot-right-bottom-icon-path",iconSize:[15,15]}),centerCrossIcon:L.divIcon({className:"leaflet-supermap-plot-center-icon-path",iconSize:[24,24]})},initialize:function(t,e){if(L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&(this.options.editIcon=L.divIcon({className:"leaflet-supermap-plot-control-icon-path",iconSize:[20,20]}),this.options.scaleIcon=L.divIcon({className:"leaflet-supermap-plot-scale-icon-path",iconSize:[20,20]}),this.options.rotateIcon=L.divIcon({className:"leaflet-supermap-plot-rotate-icon-path",iconSize:[25,25]}),this.options.lockedIcon=L.divIcon({className:"leaflet-supermap-plot-locked-icon-path",iconSize:[20,20]}),this.options.avoidIcon=L.divIcon({className:"leaflet-supermap-plot-avoid-icon-path",iconSize:[15,15]})),L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");L.Control.prototype.initialize.call(this,e),L.setOptions(this,e),this._editMarkers={},this._disEditBox={},this._dragStartScale={},this._dragStartRotate={},this._dragStartBounds={},this._dragStartLatLngs={},this._dragStartPositionOffset={},this._dragStartScaleValues={},this._dragStartScalePoints={},this._editFeatures={}},onAdd:function(t){this.controlDiv=L.DomUtil.create("div","supermap-iclient"),this._map=t,this._map.on("click",this._onMapClick,this),this._map._plotEditControl=this;for(var e=0;e<this._map.getPlottingLayers().length;e++)if(this._map.getPlottingLayers()[e].isSelected){this.enableEditFeatures(this._map.getPlottingLayers()[e].features);for(var o=0;o<this._map.getPlottingLayers()[e].features.length;o++)(this._map.getPlottingLayers()[e].features[o]instanceof $s||this._map.getPlottingLayers()[e].features[o]instanceof iu)&&this.enableEditFeatures(this._map.getPlottingLayers()[e].features[o].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 Qs&&(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 Qs&&(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()){for(var e in this._avoidRegionControl=new Su(this.selectedFeatures[0]),this._map.addControl(this._avoidRegionControl),this._editFeatures)this._disableFeatureEdit(this._editFeatures[e]);this._collectEditMarkers(this._avoidRegionControl.feature),this._avoidEditing=t}else if(!t){if(this._avoidRegionControl){for(var o in this._editFeatures)this._enableFeatureEdit(this._editFeatures[o]);if(!SuperMap.Util.isArray(this._avoidRegionControl.feature))var i=[this._avoidRegionControl.feature];this.selectFeatures(i),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 o=this._map.getPlottingLayers()[t];if(!0!==o.isLocked&&!1!==o.isEditable)for(var i=0,n=o.getFeatures().length;i<n;i++){var l=o.getFeatures()[i];if(l.isSelected&&!1===l.isLocked&&(l.layer=o,l instanceof Qs))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)&&Object.prototype.hasOwnProperty.call(l,"timeWindows")&&0!==l.timeWindows.length)for(var a=0,s=l.timeWindows.length;a<s;a++)Object.prototype.hasOwnProperty.call(l.timeWindows[a],"symbolType")&&l.timeWindows[a].symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS&&this.pasteGeoAry.push(l.timeWindows[a])}}},copyFeatures:function(t){this.pasteGeoAry=[],this.pasteGeoSel=[],SuperMap.Util.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var o=t[e];o instanceof Qs&&(this.pasteGeoAry.push(o),this.pasteGeoSel.push(o.isSelected),o.isSelected&&this.selectedFeatures.push(o))}},cut:function(){this.pasteGeoAry=[],this.pasteGeoSel=[];var t=[],e=new SuperMap.Plot.Transaction;e.transType=SuperMap.Plot.TransactionType.REMOVE;for(var o=this.getSelectedFeatures().slice(),i=0;i<o.length;i++){var n=o[i];if(!0!==n.layer.isLocked&&!1!==n.layer.isEditable&&!1===n.isLocked){if(n instanceof Qs)if(n.symbolType===SuperMap.Plot.SymbolType.ROUTENODE)this.pasteGeoAry.push(n.route),this.pasteGeoSel.push(n.route.isSelected),n.layer.removeFeatures(n.route);else{if(this.pasteGeoAry.push(n),this.pasteGeoSel.push(n.isSelected),Object.prototype.hasOwnProperty.call(n,"geoSymbolTexts")&&0!==n.geoSymbolTexts.length)for(var l=0,a=n.geoSymbolTexts.length;l<a;l++)Object.prototype.hasOwnProperty.call(n.geoSymbolTexts[l],"isSelected")&&!0===n.geoSymbolTexts[l].isSelected&&t.push(n.geoSymbolTexts[l].clone());if((n.symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS||n.symbolType===SuperMap.Plot.SymbolType.SATELLITE)&&Object.prototype.hasOwnProperty.call(n,"timeWindows")&&0!==n.timeWindows.length)for(var s=0,r=n.timeWindows.length;s<r;s++)Object.prototype.hasOwnProperty.call(n.timeWindows[s],"symbolType")&&n.timeWindows[s].symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS&&(this.pasteGeoAry.push(n.timeWindows[s]),n.layer.removeFeatures(n.timeWindows[s]));var u=new SuperMap.Plot.TransactionInfo;u.layerId=n.layer._leaflet_id,u.feature=n,e.transInfos.push(u),n.layer.removeFeatures(n)}0!==e.transInfos.length&&L.supermap.plotting.getControl().getTransManager().add(e)}}if(0!==t.length)for(var p=0,h=t.length;p<h;p++){var c=t[p];if(c.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT||c.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1)for(var y=0,g=this.pasteGeoAry.length;y<g;y++)c.associatedUuid===this.pasteGeoAry[y].uuid&&this.pasteGeoAry[y].geoSymbolTexts.push(t[p])}},cutFeatures:function(t){this.pasteGeoAry=[],this.pasteGeoSel=[],t=SuperMap.Util.isArray(t)?t.slice():[t];for(var e=0;e<t.length;e++){var o=t[e],i=o.layer;o instanceof Qs&&(this.pasteGeoAry.push(o),this.pasteGeoSel.push(o.isSelected),o instanceof ou?(o.isSelected&&this.unselectFeatures(o),i.removeFeatures(o.route)):i.removeFeatures(o),o.layer=i)}},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 o=function(t,e,o,i,n,l){var a=new SuperMap.Plot.TransactionInfo;a.layerId=t,a.uuid=e,a.functionName=o,a.undoParams=i,a.redoParams=n,l.transInfos.push(a)},i=1,n=this.getSelectedFeatures().length,l=null,a=null,s=null,r=this.getSelectedFeatures()[0].getBounds();if(t===SuperMap.Plot.AlignType.LEFT)for(;i<n;i++)l=this.getSelectedFeatures()[i].getBounds(),a=r.getWest()-l.getWest(),this.getSelectedFeatures()[i].move(0,a),this._collectEditMarkers(this.getSelectedFeatures()[i]),o(this.getSelectedFeatures()[i].layer._leaflet_id,this.getSelectedFeatures()[i].uuid,"move",[0,-a],[0,a],e);if(t===SuperMap.Plot.AlignType.RIGHT)for(;i<n;i++)l=this.getSelectedFeatures()[i].getBounds(),a=r.getEast()-l.getEast(),this.getSelectedFeatures()[i].move(0,a),this._collectEditMarkers(this.getSelectedFeatures()[i]),o(this.getSelectedFeatures()[i].layer._leaflet_id,this.getSelectedFeatures()[i].uuid,"move",[0,-a],[0,a],e);if(t===SuperMap.Plot.AlignType.UP)for(;i<n;i++)l=this.getSelectedFeatures()[i].getBounds(),s=r.getNorth()-l.getNorth(),this.getSelectedFeatures()[i].move(s,0),this._collectEditMarkers(this.getSelectedFeatures()[i]),o(this.getSelectedFeatures()[i].layer._leaflet_id,this.getSelectedFeatures()[i].uuid,"move",[-s,0],[s,0],e);if(t===SuperMap.Plot.AlignType.DOWN)for(;i<n;i++)l=this.getSelectedFeatures()[i].getBounds(),s=r.getSouth()-l.getSouth(),this.getSelectedFeatures()[i].move(s,0),this._collectEditMarkers(this.getSelectedFeatures()[i]),o(this.getSelectedFeatures()[i].layer._leaflet_id,this.getSelectedFeatures()[i].uuid,"move",[-s,0],[s,0],e);if(t===SuperMap.Plot.AlignType.VERTICALCENTER)for(;i<n;i++)l=this.getSelectedFeatures()[i].getBounds(),s=r.getCenter().lat-l.getCenter().lat,this.getSelectedFeatures()[i].move(s,0),this._collectEditMarkers(this.getSelectedFeatures()[i]),o(this.getSelectedFeatures()[i].layer._leaflet_id,this.getSelectedFeatures()[i].uuid,"move",[-s,0],[s,0],e);if(t===SuperMap.Plot.AlignType.HORIZONTALCENTER)for(;i<n;i++)l=this.getSelectedFeatures()[i].getBounds(),a=r.getCenter().lng-l.getCenter().lng,this.getSelectedFeatures()[i].move(0,a),this._collectEditMarkers(this.getSelectedFeatures()[i]),o(this.getSelectedFeatures()[i].layer._leaflet_id,this.getSelectedFeatures()[i].uuid,"move",[0,-a],[0,a],e)}},deleteSelectedFeatures:function(){if(0===Object.keys(this.getSelectedFeatures()).length)return null;if(Object.keys(this.getSelectedFeatures()).length){var t=this.getSelectedFeatures(),e=t.slice(),o=new SuperMap.Plot.Transaction;o.transType=SuperMap.Plot.TransactionType.REMOVE,L.supermap.plotting.getControl().getTransManager().add(o);for(var i=0,n=e.length;i<n;i++){var l=new SuperMap.Plot.TransactionInfo;l.layerId=e[i].layer._leaflet_id,l.feature=e[i],o.transInfos.push(l)}for(var a=0,s=t.length;a<s;a++)t[a].layer.removeFeatures(t[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),this._isMultiSelect=!this._isMultiSelect},lockedFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++)t[e].layer instanceof fu&&null!=t[e].graphic?(this.enableEditFeatures(t[e]),t[e].locked=!0,this._collectEditMarkers(t[e])):t.splice(e,1)},unlockedFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++)t[e].layer instanceof fu&&null!=t[e].graphic?(this.disableEditFeatures(t[e]),this._removeMarkers(t[e])):t.splice(e,1)},selectFeatures:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];SuperMap.Util.isArray(t)||(t=[t]);for(var o=0;o<t.length;o++)t[o].layer instanceof fu&&null!=t[o].graphic&&(!0===t[o].layer.isEditable&&!1===t[o].layer.isLocked?(t[o].layer.removeFeatures(t[o]),t[o].layer._editLayer.addFeatures(t[o])):this.enableEditFeatures(t[o]));if(!1!==this.fire(SuperMap.Plot.Event.beforefeaturesselected,{features:t})){var i=[];for(var n in t)null!==t[n]._map&&t[n].enableEdit&&!1===t[n].isSelected&&(t[n].isSelected=!0,this.selectedFeatures.push(t[n]),this._collectEditMarkers(t[n]),this.options.draggable&&!t[n].layer.isLocked&&t[n].layer.isEditable&&t[n].dragging.enable(),null!==t[n].ownerGroup&&(t[n].ownerGroup.isSelected=!0),t[n]instanceof ou&&(t[n].route.isSelected=!0,this.options.highlightFlag&&t[n].route.highlight(this.options.highlightStyle)),i.push(t[n]));e&&this.fire(SuperMap.Plot.Event.featuresselected,{features:i})}},unselectFeatures:function(t){void 0===t&&(t=this.selectedFeatures.slice()),SuperMap.Util.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++)t[e].layer instanceof fu&&null!=t[e].graphic&&-1!=L.Util.indexOf(this.selectedFeatures,t[e])&&(!0===t[e].layer.isEditable&&!1===t[e].layer.isLocked?(t[e].layer._editLayer.removeFeatures(t[e]),t[e].layer.addFeatures(t[e])):this.disableEditFeatures(t[e]));if(!1!==this.fire(SuperMap.Plot.Event.beforefeaturesunselected,{features:t})){for(var o=t.slice(),i=0;i<o.length;){var n=L.Util.indexOf(this.selectedFeatures,o[i]);-1!==n?(this._removeMarkers(o[i]),o[i].isSelected=!1,null!=o[i].dragging&&o[i].dragging.disable(),null!==o[i].ownerGroup&&(o[i].ownerGroup.isSelected=!1),o[i]instanceof ou&&(o[i].route.isSelected=!1,o[i].route.unhighlight()),this.selectedFeatures.splice(n,1),i++):o.splice(i,1)}this.fire(SuperMap.Plot.Event.featuresunselected,{features:o}),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),o=e.getSize();L.DomUtil.setPosition(this._box,e.min),this._box.style.width=o.x+"px",this._box.style.height=o.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 o in this._editFeatures)e.push(this._editFeatures[o]);for(var i=[],n=0,l=e.length;n<l;n++)e[n].isSelected||(e[n]instanceof ou||e[n].symbolType===SuperMap.Plot.SymbolType.LITERATESIGN?t.contains(e[n].route.getBounds().getCenter())&&-1===SuperMap.Util.indexOf(i,e[n].route)&&i.push(e[n].route):null!==e[n].ownerGroup?t.contains(e[n].ownerGroup.getBounds().getCenter())&&-1===SuperMap.Util.indexOf(i,e[n].ownerGroup)&&i.push(e[n].ownerGroup):e[n].getBounds().isValid()&&t.contains(e[n].getBounds().getCenter())&&i.push(e[n]));0!==i.length&&this.selectFeatures(i),this._mapDraggingWasEnabled&&this._map.dragging.enable(),this.multiple=!1}},_enableFeatureEdit:function(t){t instanceof Qs&&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 Qs&&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,o="";if(e.isSelected)if(this._editMode===SuperMap.Plot.EditMode.ADDCONTROLPOINT&&(SuperMap.Plot.AddPoint_WayType.UNKNOWN!==e._getSymbolWayType()||e instanceof ou&&(e._isFirstNode()||e._isLastNode())||e.symbolType===SuperMap.Plot.SymbolType.ANNOFRAMESYMBOLM))o="crosshair";else if(this._editMode===SuperMap.Plot.EditMode.ADDCONTROLPOINT&&e instanceof iu){var i=this._getAddPointTolerance(),n=e._selectNodeLayer(t.latlng,i);null===n||n instanceof ou&&(n._isFirstNode()||n._isLastNode())?o="crosshair":null!==n&&(o="pointer")}else o="move";else o="pointer";e.layer._setCursorStyle(o)},_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 o in e)e[o].setOpacity(0)}this.selectedFeatures[t]instanceof $s?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,o=this.selectedFeatures.length;e<o;e++)if((this._editMode!==SuperMap.Plot.EditMode.ADDCONTROLPOINT||SuperMap.Plot.AddPoint_WayType.UNKNOWN===this.selectedFeatures[e]._getSymbolWayType())&&!this.selectedFeatures[e].getLocked()){var i=this.selectedFeatures[e].symbolType;if(i===SuperMap.Plot.SymbolType.SYMBOLTEXT1||i===SuperMap.Plot.SymbolType.AIRROUTE||i===SuperMap.Plot.SymbolType.NAVYROUTE||i===SuperMap.Plot.SymbolType.MISSILEROUTE)break;if(this.selectedFeatures[e].move(t.dLat,t.dLng),this.isAddTransInfo){var n=new SuperMap.Plot.TransactionInfo;n.layerId=this.selectedFeatures[e].layer._leaflet_id,n.uuid=this.selectedFeatures[e].uuid,n.functionName="move",this.transaction.transInfos.push(n)}}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,o=this._map.getFeatureByUuid(e);if(null===o)for(var i=0;i<this.selectedFeatures.length;i++)if(this.selectedFeatures[i].uuid===e){o=this.selectedFeatures[i];break}if(null!==o){if("setRotate"===this.transaction.transInfos[t].functionName)o._isDot()?(this.transaction.transInfos[t].undoParams=[this._dragStartRotate[e]],this.transaction.transInfos[t].redoParams=[o.getRotate()]):(this.transaction.transInfos[t].undoParams=[360-(o.getRotate()-this._dragStartRotate[e])],this.transaction.transInfos[t].redoParams=[o.getRotate()-this._dragStartRotate[e]]);else if("setScale"===this.transaction.transInfos[t].functionName){var n=this._dragStartScale[e];!1===o.limitWidthHeight?(this.transaction.transInfos[t].undoParams=[n.x,n.y],this.transaction.transInfos[t].redoParams=[o.getScale().x,o.getScale().y]):(this.transaction.transInfos[t].undoParams=[n],this.transaction.transInfos[t].redoParams=[o.getScale()])}else if("setLatLngs"===this.transaction.transInfos[t].functionName)o.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(o.getLatLngs())],o.symbolType===SuperMap.Plot.SymbolType.ARCREGION&&1===this.transaction.transInfos[t].redoParams[0].length&&this.transaction.transInfos[t].redoParams[0].push(o.scalePoints[0]);else if("setScaleValues"===this.transaction.transInfos[t].functionName){for(var l=[],a=[],s=0;s<this._dragStartScaleValues[e].length;s++)l.push(this._dragStartScaleValues[e][s]);for(var r=0;r<o.scaleValues.length;r++)a.push(o.scaleValues[r]);this.transaction.transInfos[t].undoParams=[l],this.transaction.transInfos[t].redoParams=[a]}else if("modifyPoint"===this.transaction.transInfos[t].functionName){var u=this.transaction.transInfos[t].undoParams[0];this.transaction.transInfos[t].undoParams.push(this._dragStartScalePoints[e][u]),this.transaction.transInfos[t].undoParams[1].isScalePoint=!0;var p=this.transaction.transInfos[t].redoParams[0];this.transaction.transInfos[t].redoParams.push(o.scalePoints[p]),this.transaction.transInfos[t].redoParams[1].isScalePoint=!0}else if("move"===this.transaction.transInfos[t].functionName){if(o.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&!0===o.positionOffset){var h=0,c=0,y=this._map.latLngToLayerPoint(o.getLatLngs()[0]),g={x:y.x+this._dragStartPositionOffset[e].x,y:y.y+this._dragStartPositionOffset[e].y},f=this._map.layerPointToLatLng(g);y.x+=o.positionOffsetX,y.y+=o.positionOffsetY;var P=this._map.layerPointToLatLng(y);h=f.lng-P.lng,c=f.lat-P.lat}else o instanceof $s?(h=this._dragStartLatLngs[e][0].getLatLng().lng-this._editMarkers[o.uuid][0].getLatLng().lng,c=this._dragStartLatLngs[e][0].getLatLng().lat-this._editMarkers[o.uuid][0].getLatLng().lat):0!==o.getLatLngs().length&&(h=this._dragStartLatLngs[e][0].lng-o.getLatLngs()[0].lng,c=this._dragStartLatLngs[e][0].lat-o.getLatLngs()[0].lat);o instanceof $s?(this.transaction.transInfos[t].undoParams=[c,h],this.transaction.transInfos[t].redoParams=[-c,-h]):0!==o.getLatLngs().length&&(this.transaction.transInfos[t].undoParams=[c,h],this.transaction.transInfos[t].redoParams=[-c,-h])}}else this.transaction.transInfos.splice(t,1),t--}},_onResetEditMarkers:function(t){-1!==L.Util.indexOf(this.selectedFeatures,t.target)&&this._collectEditMarkers(t.target)},_onResetEditMarkersValues:function(t){this._resetEditMarkersValue(t.target)},_onMapClick:function(t){if(!1!==this._onTriggerMapClick){if(this._startPoint&&this._endPoint)return this._startPoint=null,void(this._endPoint=null);this.unselectFeatures(),L.DomEvent.stopPropagation(t)}else this._onTriggerMapClick=!0},_onClick:function(t){this._onTriggerMapClick=!1;var e,o,i=t.target;if(i.isSelected&&i.symbolType===SuperMap.Plot.SymbolType.SATELLITE&&i.timeWindows.length>0){var n=i.layer._getFeatureFromEvent(t);n.symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS&&(i=n)}if(this.transaction||(this.transaction=new SuperMap.Plot.Transaction,this.transaction.transType=SuperMap.Plot.TransactionType.EDIT,this.isAddTransInfo=!0),i instanceof Qs)if(i instanceof $s&&i.moveend)i.moveend=!1;else if(null!==i.ownerGroup&&i.ownerGroup.moveend)i.ownerGroup.moveend=!1;else if(this._editMode!==SuperMap.Plot.EditMode.ADDCONTROLPOINT)i instanceof $s&&!i.isSelected?(!1===t.originalEvent.ctrlKey&&this.unselectFeatures(),this.selectFeatures(i)):i instanceof iu||i.isSelected||null!==i.ownerGroup&&!0!==i.ownerGroup.isSelected||(!1===t.originalEvent.ctrlKey&&this.unselectFeatures(),this.selectFeatures(i));else if(i instanceof iu||i.isSelected){if(!1===i.isLocked&&i.isSelected)if(i instanceof iu){var l=this._getAddPointTolerance();if(null===(c=i._selectNodeLayer(t.latlng,l))){var a=this._getAddPointTolerance(),s=i._addRouteNodeByPosWithoutLast(t.latlng,a);null!==s&&(this.unselectFeatures(),this.selectFeatures(s))}}else if(i instanceof ou&&i.route.isSelected){var r=i._isFirstNode(),u=i._isLastNode();if(!0===r||!0===u){var p=i.route._addRouteNodeByNode(i.routeNode,r,u);if(null!==p){this.unselectFeatures(),this.selectFeatures(p);var h=new SuperMap.Plot.TransactionInfo;h.layerId=p.layer._leaflet_id,h.uuid=p.uuid,h.functionName="setLatLngs",h.undoParams=[L.Util.cloneLatLngs(p.getLatLngs())],h.redoParams=[L.Util.cloneLatLngs(p.getLatLngs())],this.transaction.transInfos.push(h),this.transaction&&(L.supermap.plotting.getControl().getTransManager().add(this.transaction),this.transaction=new SuperMap.Plot.Transaction,this.isAddTransInfo=!0)}}else this.unselectFeatures(),this.selectFeatures(i)}else this._addPoint(i,t.latlng)}else if(!1===t.originalEvent.ctrlKey&&this.unselectFeatures(),this.selectFeatures(i),i instanceof ou&&((e=i._isFirstNode())||(o=i._isLastNode()))){var c=i.route._addRouteNodeByNode(i.routeNode,e,o);null!==c&&(this.unselectFeatures(),this.selectFeatures(c))}},_addPoint:function(t,e){if(null!==t&&void 0!==t){var o=t.scaleValues.slice(),i=L.Util.cloneLatLngs(t.getLatLngs()),n=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);var a=new SuperMap.Plot.TransactionInfo;a.layerId=t.layer._leaflet_id,a.uuid=t.uuid,a.functionName="setScaleValues",a.undoParams=[o],a.redoParams=[t.scaleValues],this.transaction.transInfos.push(a),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 s=t._getSymbolWayType();if(void 0!==SuperMap.Plot.AlgoSymbolFactory&&SuperMap.Plot.AlgoSymbolFactory.canPolylineConnect(t.libID,t.code)&&!0===t.polylineConnectLocationPoint&&(s=SuperMap.Plot.AddPoint_WayType.POLYLINE),SuperMap.Plot.AddPoint_WayType.UNKNOWN===s)return;var r=new SuperMap.Geometry.Point(e.lng,e.lat),u=-1;SuperMap.Plot.AddPoint_WayType.CURVE===s&&(u=this._addPointByCurve(t,r));var p=new SuperMap.Plot.Transaction;if(L.supermap.plotting.getControl().getTransManager().add(p),SuperMap.Plot.AddPoint_WayType.POLYLINE===s&&(u=this._addPointByPolyLine(t,r)),n=L.Util.latLngsToSuperMapPoints(t.getLatLngs()),u>0&&u<n.length){var h=L.supermap.plotting.editMarker(new L.LatLng(r.y,r.x),{icon:this.options.editIcon,nHandle:-1});h.owner=t,this._addToMapAndBindMarker(h),this._editMarkers[t.uuid].splice(u,0,h),0===t.libID&&590===t.code||100===t.libID&&(17703===t.code||17704===t.code)?(this._addPointByPolybezier(t,u,r),this._resetEditMarkersValue(t)):(n.splice(u,0,r),t.latLngs=L.Util.superMapPointsToLatLngs(n));var c=new SuperMap.Plot.TransactionInfo;if(c.layerId=t.layer._leaflet_id,c.uuid=t.uuid,c.functionName="setLatLngs",c.undoParams=[i],c.redoParams=[L.Util.cloneLatLngs(t.getLatLngs())],p.transInfos.push(c),0===t.libID&&590===t.code||100===t.libID&&(17703===t.code||17704===t.code)){var y=new SuperMap.Plot.TransactionInfo;y.layerId=t.layer._leaflet_id,y.uuid=t.uuid,y.functionName="setScaleValues",y.undoParams=[o],y.redoParams=[t.scaleValues],p.transInfos.push(y)}}}}},_addPointByCurve:function(t,e){var o=L.Util.latLngsToSuperMapPoints(t.getLatLngs()),i=SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(o);if(2>i.length)return-1;for(var n=[],l=0,a=1,s=o.length;a<s;a++)for(var r=[],u=l,p=i.length;u<p;u++){if(SuperMap.Plot.PlottingUtil.equalFuzzy(o[a].x,i[u].x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(o[a].y,i[u].y)){if(r.length<1)continue;r.push(i[u]),n.push(r),r=[],l=u;break}r.push(i[u])}for(var h=-1,c=-1,y=0;y<n.length;y++){var g=this._computePointToLineMinDis(e,n[y]).minDis;g<0||(c<0?(c=g,h=y+1):c>g&&(c=g,h=y+1))}var f=o.slice();f.push(f[0]);for(var P=SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(f),d=[],S=1,m=f.length;S<m;S++)for(var b=[],M=l,v=P.length;M<v;M++){if(SuperMap.Plot.PlottingUtil.equalFuzzy(f[S].x,P[M].x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(f[S].y,P[M].y)){if(r.length<1)continue;b.push(P[M]),d.push(b),b=[],l=M;break}b.push(P[M])}for(var A=-1,T=-1,_=0;_<d.length;_++){var O=this._computePointToLineMinDis(e,d[_]).minDis;O<0||(T<0?(T=O,A=_+1):T>O&&(T=O,A=_+1))}return A>h&&(h=-1),h},_addPointByPolyLine:function(t,e){var o=-1,i=L.Util.latLngsToSuperMapPoints(t.getLatLngs());return(o=this._computePointToLineMinDis(e,i).index)>=0&&o++,o},_addPointByPolybezier:function(t,e,o){var i=L.Util.latLngsToSuperMapPoints(t.getLatLngs()),n=[];if(t.scaleValues.length==4*(i.length-1)){var l=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i);n.push(new SuperMap.Geometry.Point(i[0].x,i[0].y)),n.push(new SuperMap.Geometry.Point(i[0].x,i[0].y));var a=t.scaleValues[0],s=t.scaleValues[1],r=i[0].x+l*a,u=i[0].y+l*s;n.push(new SuperMap.Geometry.Point(r,u));for(var p=1;p<i.length-1;p++){n.push(new SuperMap.Geometry.Point(i[p].x,i[p].y));var h=t.scaleValues[4*p-2],c=t.scaleValues[4*p-1],y=i[p].x+l*h,g=i[p].y+l*c;n.push(new SuperMap.Geometry.Point(y,g)),h=t.scaleValues[4*p],c=t.scaleValues[4*p+1],y=i[p].x+l*h,g=i[p].y+l*c,n.push(new SuperMap.Geometry.Point(y,g))}var f=i.length-1;n.push(new SuperMap.Geometry.Point(i[f].x,i[f].y)),a=t.scaleValues[4*f-2],a=t.scaleValues[4*f-1],r=i[f].x+l*a,u=i[f].y+l*a,n.push(new SuperMap.Geometry.Point(r,u)),n.push(new SuperMap.Geometry.Point(i[f].x,i[f].y)),i.splice(e,0,o);var P=i.length;if(0==e){var d=new SuperMap.Geometry.Point(0,0),S=new SuperMap.Geometry.Point(0,0),m=new SuperMap.Geometry.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(8,3,i[0],i[1],i[2],S,m),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.6,i[0],i[1],S,d),n.splice(1,1,S),n.splice(0,0,new SuperMap.Geometry.Point(i[0].x,i[0].y)),n.splice(1,0,new SuperMap.Geometry.Point(i[0].x,i[0].y)),n.splice(2,0,d)}else if(e==P-1){var b=new SuperMap.Geometry.Point(0,0);d=new SuperMap.Geometry.Point(0,0),S=new SuperMap.Geometry.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(8,3,i[P-3],i[P-2],i[P-1],b,d),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(.6,i[P-1],i[P-2],d,S),n.splice(n.length-1,1,d),n.push(new SuperMap.Geometry.Point(i[i.length-1].x,i[i.length-1].y)),n.push(S),n.push(new SuperMap.Geometry.Point(i[i.length-1].x,i[i.length-1].y))}else{var M=new SuperMap.Geometry.Point(0,0),v=new SuperMap.Geometry.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(8,3,i[e-1],i[e],i[e+1],M,v),n.splice(3*e,0,new SuperMap.Geometry.Point(i[e].x,i[e].y)),n.splice(3*e+1,0,M),n.splice(3*e+2,0,v)}t.scaleValues.length=0;var A=(n[2].x-n[0].x)/l,T=(n[2].y-n[0].y)/l;t.scaleValues.push(A),t.scaleValues.push(T);for(var _=1;_<i.length-1;_++){A=(n[3*_+1].x-n[3*_].x)/l,T=(n[3*_+1].y-n[3*_].y)/l;t.scaleValues.push(A),t.scaleValues.push(T);var O=(n[3*_+2].x-n[3*_].x)/l,x=(n[3*_+2].y-n[3*_].y)/l;t.scaleValues.push(O),t.scaleValues.push(x)}A=(n[3*(i.length-1)+1].x-n[3*(i.length-1)].x)/l,T=(n[3*(i.length-1)+1].y-n[3*(i.length-1)].y)/l,t.scaleValues.push(A),t.scaleValues.push(T)}else{i.splice(e,0,o);var w=SuperMap.Plot.PlottingUtil.computeBeizerPoints(!1,i,t.scaleValues);t.scaleValues=w.scaleValues}t.setLatLngs(L.Util.superMapPointsToLatLngs(i))},_computePointToLineMinDis:function(t,e){var o=this._getAddPointTolerance(),i=SuperMap.Plot.PlottingUtil.computePointToLineMinDis(t,e);return i.minDis>o&&(i.index=-1),i},_getAddPointTolerance:function(){var t=this._mouseTolerance;L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&(t=this.touchTolerance);var e=this._map.layerPointToLatLng(L.point(0,0)),o=this._map.layerPointToLatLng(L.point(t,0));return SuperMap.Plot.PlottingUtil.distance(new SuperMap.Geometry.Point(e.lng,e.lat),new SuperMap.Geometry.Point(o.lng,o.lat))},_collectEditMarkers:function(t){void 0!==this._editMarkers[t.uuid]&&this._removeMarkers(t);var e,o=[];if(t.layer instanceof fu){for(var i=t.graphic._getHandleAndCenterPoints(),n=0,l=i.handlePoints.length;n<l;n++){var a=new L.LatLng(i.handlePoints[n].lat,i.handlePoints[n].lng),s=void 0;0===i.handlePoints[n].tag?s=L.supermap.plotting.editMarker(a,{icon:this.options.leftBottomIcon,nHandle:-3,tag:n}):1===i.handlePoints[n].tag?s=L.supermap.plotting.editMarker(a,{icon:this.options.leftTopIcon,nHandle:-3,tag:n}):2===i.handlePoints[n].tag?s=L.supermap.plotting.editMarker(a,{icon:this.options.rightTopIcon,nHandle:-3,tag:n}):3===i.handlePoints[n].tag&&(s=L.supermap.plotting.editMarker(a,{icon:this.options.rightBottomIcon,nHandle:-3,tag:n})),this._addToMapAndBindMarker(s),s.owner=t,o.push(s)}if(!0===t.locked)for(var r=0,u=i.centerPoints.length;r<u;r++){var p=new L.LatLng(i.centerPoints[r].lat,i.centerPoints[r].lng),h=L.supermap.plotting.editMarker(p,{icon:this.options.centerCrossIcon,nHandle:-3});this._addToMapAndBindMarker(h),o.push(h),h.owner=t}}else if(t.layer instanceof bu&&(t.layer.getLocked()||!t.layer.getEditable())){var c=t.getBounds();if(null!==c&&c.isValid()){var y=L.latLng(c.getNorth(),c.getEast()),g=L.latLng(c.getNorth(),c.getWest()),f=L.latLng(c.getSouth(),c.getEast()),P=L.latLng(c.getSouth(),c.getWest()),d=new L.Polygon([y,g,P,f],{smoothFactor:.5});L.setOptions(d,{weight:1,opacity:.5,color:"#0000ff",fillOpacity:.3,fillColor:"#0000ff"}),this._map.addLayer(d),e=d}}else if(t.getLocked()){var S=t._getHandlePointsByBounds();for(var m in S){var b=new L.LatLng(S[m].lat,S[m].lng),M=L.supermap.plotting.editMarker(b,{icon:this.options.lockedIcon,nHandle:-3});this._addToMapAndBindMarker(M),M.owner=t,o.push(M)}}else if(t instanceof $s||t instanceof ou)if(t instanceof qr&&this._editMode!==SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE)for(var v=0;v<t.scalePoints.length;v++){var A=new L.LatLng(t.scalePoints[v].lat,t.scalePoints[v].lng),T=t.scalePoints[v].tag?t.scalePoints[v].tag:v,_=L.supermap.plotting.editMarker(A,{icon:this.options.scaleIcon,nHandle:t.enableEdit?-2:-3,tag:T});this._addToMapAndBindMarker(_),o.push(_),_.owner=t}else{var O=t._getHandleAndRotatePoints();for(var x in O.handlePoints){var w=O.handlePoints[x].nHandle;(this._editMode!==SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE||t instanceof ou)&&(w=-3);var E=new L.LatLng(O.handlePoints[x].lat,O.handlePoints[x].lng),C=L.supermap.plotting.editMarker(E,{icon:this.options.editIcon,nHandle:w,tag:x});this._addToMapAndBindMarker(C),C.owner=t,o.push(C)}if(this._editMode===SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE)for(var I in O.rotatePoints){var R=new L.LatLng(O.rotatePoints[I].lat,O.rotatePoints[I].lng),D=L.supermap.plotting.editMarker(R,{icon:this.options.rotateIcon,nHandle:0});this._addToMapAndBindMarker(D),o.push(D),D.owner=t}}else if(this._editMode===SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE){for(var U=t._getHandleAndRotatePoints(),N=0,B=U.handlePoints.length;N<B;N++){var k=U.handlePoints[N].nHandle;t.enableEdit&&t.symbolType!==SuperMap.Plot.SymbolType.TEXTSYMBOL?t._getHandleCount()>9&&(k=-1):k=-3;var F=new L.LatLng(U.handlePoints[N].lat,U.handlePoints[N].lng),V=L.supermap.plotting.editMarker(F,{icon:this.options.editIcon,nHandle:k,tag:N});this._addToMapAndBindMarker(V),V.owner=t,o.push(V)}for(var j=0,Y=U.rotatePoints.length;j<Y;j++){var z=new L.LatLng(U.rotatePoints[j].lat,U.rotatePoints[j].lng),G=L.supermap.plotting.editMarker(z,{icon:this.options.rotateIcon,nHandle:t.enableEdit?0:-3});this._addToMapAndBindMarker(G),o.push(G),G.owner=t}}else if(t.symbolType===SuperMap.Plot.SymbolType.REGULARPOLYGON){var W=[t.latLngs[0],t.components[0].getLatLngs()[0][0]];for(var X in W){var H=L.supermap.plotting.editMarker(W[X],{icon:this.options.editIcon,nHandle:t.enableEdit?-1:-3,tag:X});this._addToMapAndBindMarker(H),o.push(H),H.owner=t}for(var Z in t.scalePoints){var J=new L.LatLng(t.scalePoints[Z].lat,t.scalePoints[Z].lng),q=t.scalePoints[Z].tag?t.scalePoints[Z].tag:Z,K=L.supermap.plotting.editMarker(J,{icon:this.options.scaleIcon,nHandle:t.enableEdit?-2:-3,tag:q});this._addToMapAndBindMarker(K),o.push(K),K.owner=t}}else if(t.symbolType===SuperMap.Plot.SymbolType.PARALLELLINE){var Q=L.Util.superMapPointsToLatLngs(t.superMapAlgoSymbol.controlPoints[0]);for(var $ in t.getLatLngs()[0]=L.latLng(Q[0].lat,Q[0].lng),t.latLngs){var tt=new L.LatLng(t.latLngs[$].lat,t.latLngs[$].lng),et=L.supermap.plotting.editMarker(tt,{icon:this.options.editIcon,nHandle:t.enableEdit?-1:-3,tag:$});this._addToMapAndBindMarker(et),o.push(et),et.owner=t}}else if(t.symbolType===SuperMap.Plot.SymbolType.NEWPIESYMBOL||t.symbolType===SuperMap.Plot.SymbolType.NEWCHORDSYMBOL||t.symbolType===SuperMap.Plot.SymbolType.NEWARCSYMBOL){for(var ot=0;ot<t.latLngs.length;ot++){var it={};if(2===ot){var nt=t.components[0]._latlngs;it=nt.length>1?new L.LatLng(nt[1].lat,nt[1].lng):new L.LatLng(nt[0][1].lat,nt[0][1].lng)}else it=new L.LatLng(t.latLngs[ot].lat,t.latLngs[ot].lng);var lt=L.supermap.plotting.editMarker(it,{icon:this.options.editIcon,nHandle:t.enableEdit?-1:-3,tag:ot});this._addToMapAndBindMarker(lt),o.push(lt),lt.owner=t}for(var at in t.scalePoints){var st=new L.LatLng(t.scalePoints[at].lat,t.scalePoints[at].lng),rt=t.scalePoints[at].tag?t.scalePoints[at].tag:at,ut=L.supermap.plotting.editMarker(st,{icon:this.options.scaleIcon,nHandle:t.enableEdit?-2:-3,tag:rt});this._addToMapAndBindMarker(ut),o.push(ut),ut.owner=t}}else if(t.symbolType!==SuperMap.Plot.SymbolType.SATELLITE){for(var pt in t.latLngs){var ht=new L.LatLng(t.latLngs[pt].lat,t.latLngs[pt].lng),ct=L.supermap.plotting.editMarker(ht,{icon:this.options.editIcon,nHandle:t.enableEdit?-1:-3,tag:pt});this._addToMapAndBindMarker(ct),o.push(ct),ct.owner=t}for(var yt in t.scalePoints){var gt=new L.LatLng(t.scalePoints[yt].lat,t.scalePoints[yt].lng),ft=t.scalePoints[yt].tag?t.scalePoints[yt].tag:yt,Pt=L.supermap.plotting.editMarker(gt,{icon:this.options.scaleIcon,nHandle:t.enableEdit?-2:-3,tag:ft});this._addToMapAndBindMarker(Pt),o.push(Pt),Pt.owner=t}}else if(t.symbolType===SuperMap.Plot.SymbolType.SATELLITE||t.timeWindows.length>1)for(var dt in t.scalePoints){var St=new L.LatLng(t.scalePoints[dt].lat,t.scalePoints[dt].lng),mt=t.scalePoints[dt].tag?t.scalePoints[dt].tag:dt,bt=L.supermap.plotting.editMarker(St,{icon:this.options.scaleIcon,nHandle:t.enableEdit?-2:-3,tag:mt});this._addToMapAndBindMarker(bt),o.push(bt),bt.owner=t}this._editMarkers[t.uuid]=o,this._disEditBox[t.uuid]=e},_resetEditMarkersValue:function(t){if(Object.prototype.hasOwnProperty.call(this._editMarkers,t.uuid)){var e=this._editMarkers[t.uuid],o=this._disEditBox[t.uuid];if(t.layer instanceof fu&&null!=t.graphic){var i=t.graphic._getHandleAndCenterPoints();for(var n in i.handlePoints)e[n]._latlng=i.handlePoints[n],e[n].update();!0===t.locked&&(e[4]._latlng=i.centerPoints[0],e[4].update())}else if(null==o||!t.layer.getLocked()&&t.layer.getEditable())if(t instanceof $s||t instanceof ou)if(t instanceof qr&&this._editMode!==SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE)for(var l in t.scalePoints)e[l]._latlng=t.scalePoints[l],e[l].update();else{var a=t._getHandleAndRotatePoints();for(var s in a.handlePoints)e[s]._latlng=a.handlePoints[s],e[s].update();if(this._editMode===SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE){var r=a.handlePoints.length;for(var u in a.rotatePoints)e[r+parseInt(u)]._latlng=a.rotatePoints[u],e[r+parseInt(u)].update()}}else if(this._editMode===SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE){var p=t._getHandleAndRotatePoints();for(var h in p.handlePoints)e[h]._latlng=p.handlePoints[h],e[h].update();var c=p.handlePoints.length;for(var y in p.rotatePoints)e[c+parseInt(y)]._latlng=p.rotatePoints[y],e[c+parseInt(y)].update()}else if(void 0!==t.scalePoints&&null!==t.scalePoints||(t.scalePoints=[]),t.symbolType===SuperMap.Plot.SymbolType.REGULARPOLYGON){var g=[t.getLatLngs()[0],t.components[0].getLatLngs()[0][0]];for(var f in g)e[f]._latlng=g[f],e[f].update()}else if(t.symbolType===SuperMap.Plot.SymbolType.PARALLELLINE){var P=L.Util.superMapPointsToLatLngs(t.superMapAlgoSymbol.controlPoints[0]);for(var d in t.getLatLngs()[0]=L.latLng(P[0].lat,P[0].lng),t.getLatLngs())e[d]._latlng=t.getLatLngs()[d],e[d].update()}else if(t.symbolType===SuperMap.Plot.SymbolType.SATELLITE||t.timeWindows&&t.timeWindows.length>1)for(var S in t.scalePoints){var m=parseInt(S);e[m]._latlng=t.scalePoints[S],e[m].update()}else if(t.getLatLngs().length+t.scalePoints.length===e.length){for(var b in t.getLatLngs())e[b]._latlng=t.getLatLngs()[b],e[b].update();var M=t.getLatLngs().length;for(var v in t.scalePoints){var A=M+parseInt(v);e[A]._latlng=t.scalePoints[v],e[A].update()}}else this._collectEditMarkers(t);else{var T=t.getBounds();if(null!==T&&T.isValid()){var _=L.latLng(T.getNorth(),T.getEast()),O=L.latLng(T.getNorth(),T.getWest()),x=L.latLng(T.getSouth(),T.getEast()),w=L.latLng(T.getSouth(),T.getWest());o.setLatLngs([_,O,w,x])}}}},_removeMarkers:function(t){var e=this._editMarkers[t.uuid];for(var o in e)this._unbindMarkerEvents(e[o]),this._map.removeLayer(e[o]);delete this._editMarkers[t.uuid];var i=this._disEditBox[t.uuid];i&&this._map.removeLayer(i),delete this._disEditBox[t.uuid]},_unbindMarkerEvents:function(t){null!=t&&(t.off("mousemove",this._moveMove,this),t.off("mouseout",this._moveOut,this),-3!==t.options.nHandle&&(t.off("click",this._removePoint,this),t.off("dragstart",this._dragStart,this),t.off("drag",this._dragPoint,this),t.off("dragend",this._dragEnd,this),t.dragging.disable()))},_addToMapAndBindMarker:function(t){t.addTo(this._map),t.on("mousemove",this._moveMove,this),t.on("mouseout",this._moveOut,this),-3!==t.options.nHandle&&(t.on("click",this._removePoint,this),t.on("dragstart",this._dragStart,this),t.on("drag",this._dragPoint,this),t.on("dragend",this._dragEnd,this),t.dragging.enable()),-3===t.options.nHandle&&(t.on("dragstart",this._dragStart,this),t.on("dragend",this._dragEnd,this),t.dragging.enable())},_moveMove:function(t){switch(t.target.options.nHandle){case 1:case 8:t.target._icon.style.cursor="se-resize";break;case 3:case 6:t.target._icon.style.cursor="ne-resize";break;case 4:case 5:t.target._icon.style.cursor="e-resize";break;case 2:case 7:t.target._icon.style.cursor="n-resize";break;case-1:case-2:t.target._icon.style.cursor="pointer";break;case 0:t.target._icon.style.cursor="default"}},_moveOut:function(t){t.target._icon.style.cursor=""},_removePoint:function(t){if(this._editMode===SuperMap.Plot.EditMode.ADDCONTROLPOINT&&t.target.owner.isSelected){var e=L.Util.cloneLatLngs(t.target.owner.getLatLngs()),o=this._editMarkers[t.target.owner.uuid],i=o.indexOf(t.target);this._map.removeLayer(o[i]),o.splice(i,1),t.target.owner.latLngs.splice(i,1),t.target.owner.redraw();var n=new SuperMap.Plot.Transaction;L.supermap.plotting.getControl().getTransManager().add(n);var l=new SuperMap.Plot.TransactionInfo;l.layerId=t.target.owner.layer._leaflet_id,l.uuid=t.target.owner.layer.uuid,l.functionName="setLatLngs",l.undoParams=[e],l.redoParams=[L.Util.cloneLatLngs(t.target.owner.getLatLngs())],n.transInfos.push(l)}else if(this._editMode===SuperMap.Plot.EditMode.REMOVECONTROLPOINT&&t.target.owner.isSelected){var a=this._editMarkers[t.target.owner.uuid],s=a.indexOf(t.target),r=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(a[s]),a.splice(s,1),t.target.owner.latLngs.splice(s,1),t.target.owner.redraw();var u=new SuperMap.Plot.Transaction;L.supermap.plotting.getControl().getTransManager().add(u);var p=new SuperMap.Plot.TransactionInfo;p.layerId=t.target.owner.layer._leaflet_id,p.uuid=t.target.owner.uuid,p.functionName="setLatLngs",p.undoParams=[r],p.redoParams=[L.Util.cloneLatLngs(t.target.owner.getLatLngs())],u.transInfos.push(p)}},_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 o=this.selectedFeatures[e];if(o._isDot()&&(this._dragStartScale[o.uuid]=o.getScale()),o.scaleValues&&o.scaleValues.length&&0!==o.scaleValues.length){this._dragStartScaleValues[o.uuid]=[];for(var i=0;i<o.scaleValues.length;i++)this._dragStartScaleValues[o.uuid].push(o.scaleValues[i])}else this._dragStartScaleValues[o.uuid]=[];if(o.scalePoints&&o.scalePoints.length&&0!==o.scalePoints.length&&(this._dragStartScalePoints[o.uuid]=L.Util.cloneLatLngs(o.scalePoints)),this._dragStartRotate[o.uuid]=o.getRotate(),this.selectedFeatures[e]instanceof $s?this._dragStartLatLngs[o.uuid]=this._editMarkers[this.selectedFeatures[e].uuid]:this._dragStartLatLngs[o.uuid]=L.Util.cloneLatLngs(o.getLatLngs()),o.symbolType===SuperMap.Plot.SymbolType.ARCREGION&&1===this._dragStartLatLngs[o.uuid].length&&this._dragStartLatLngs[o.uuid].push(o.scalePoints[0].clone()),o.symbolType===SuperMap.Plot.SymbolType.LINERELATION&&(null!==o.startAssociatedUuid?this._dragStartLatLngs[o.uuid].push(o.startAssociatedUuid):null!==o.endAssociatedUuid&&this._dragStartLatLngs[o.uuid].push(o.endAssociatedUuid)),this._dragStartBounds[o.uuid]=o.getBounds(),o.symbolType===SuperMap.Plot.SymbolType.FLAGGROUP)o.anchorPoint=L.latLng(o.getBounds().getSouth(),o.getBounds().getWest());else if(o.symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL)o.anchorPoint=L.latLng(o.getLatLngs()[0].lat,o.getLatLngs()[0].lng);else if(o.symbolType===SuperMap.Plot.SymbolType.CONCENTRICCIRCLE)o.anchorPoint=L.latLng(o.getLatLngs()[0].lat,o.getLatLngs()[0].lng);else if(o.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL){var n=o.getBounds();n.isValid()&&(o.anchorPoint=n.getCenter())}var l=this._editMarkers[o.uuid];for(var a in l)-3===l[a].options.nHandle&&l[a].setOpacity(0),l[a].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 o=t.target.owner,i=null;i=o.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL||o.symbolType===SuperMap.Plot.SymbolType.CONCENTRICCIRCLE||o.symbolType===SuperMap.Plot.SymbolType.PICTURE?o.getLatLngs()[0]:o.anchorPoint;var n=this._map.latLngToLayerPoint(i);o.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&!0===o.positionOffset&&(n.x+=o.positionOffsetX*o.dScale,n.y+=o.positionOffsetY*o.dScale);var l=this._map.latLngToLayerPoint(t.latlng),a=this._map.latLngToLayerPoint(t.oldLatLng),s=l.x-n.x-(a.x-n.x),r=l.y-n.y-(a.y-n.y);if(0!==s&&0!==r){var u=180*(Math.atan2(a.y-n.y,a.x-n.x)-Math.atan2(l.y-n.y,l.x-n.x))/Math.PI,p=u;if(void 0!==this._lastPixel)p=180*(Math.atan2(this._lastPixel.y-n.y,this._lastPixel.x-n.x)-Math.atan2(l.y-n.y,l.x-n.x))/Math.PI;!function(t,o){for(var i=0;i<e.selectedFeatures.length;i++){var n=0;if(n=e.selectedFeatures[i].symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL||e.selectedFeatures[i].symbolType===SuperMap.Plot.SymbolType.PICTURE?t+e._dragStartRotate[e.selectedFeatures[i].uuid]:o,(n%=360)<0&&(n+=360),e.selectedFeatures[i].setRotate(n),e.isAddTransInfo){var l=new SuperMap.Plot.TransactionInfo;l.layerId=e.selectedFeatures[i].layer._leaflet_id,l.uuid=e.selectedFeatures[i].uuid,l.functionName="setRotate",e.transaction.transInfos.push(l)}}e.isAddTransInfo=!1}(u,p)}this._lastPixel=l},_dragResize:function(t,e){var o=this;function i(t,i,l){for(var a=[],s=0;s<o.selectedFeatures.length;s++)if(!0!==o.selectedFeatures[s].getLocked())if(o.selectedFeatures[s]._isDot()){var r=o._dragStartScale[o.selectedFeatures[s].uuid];if(o.selectedFeatures[s].symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&!1===o.selectedFeatures[s].limitWidthHeight)r.x=0===r.x?.05:r.x,r.y=0===r.y?.05:r.y,o.selectedFeatures[s].setScale(t*r.x,i*r.y);else{var u=t*(r=!0===Boolean(r)?r:1);u>0&&o.selectedFeatures[s].setScale(u)}if(o.isAddTransInfo){var p=new SuperMap.Plot.TransactionInfo;p.layerId=o.selectedFeatures[s].layer._leaflet_id,p.uuid=o.selectedFeatures[s].uuid,p.functionName="setScale",o.transaction.transInfos.push(p)}}else{if(9===o.selectedFeatures[s]._getHandleCount()&&e&&e>0){var h=o._dragStartBounds[o.selectedFeatures[s].uuid],c=o._dragStartLatLngs[o.selectedFeatures[s].uuid],y=o.selectedFeatures[s]._getLatLng(e,h,l);o.selectedFeatures[s]._resizeLatLngs(y,e,h,c)}if(SuperMap.Plot.AlgoSymbolFactory.isAccessServer(o.selectedFeatures[s].libID,o.selectedFeatures[s].code)){var g=new SuperMap.GetSymbolInfoParameters;g.libID=o.selectedFeatures[s].libID,g.code=o.selectedFeatures[s].code,g.inputPoints=L.Util.latLngsToSuperMapPoints(o.selectedFeatures[s].getLatLngs()),g.scaleValues=o.selectedFeatures[s].scaleValues,g.subSymbols=o.selectedFeatures[s].subSymbols,a.push(o.selectedFeatures[s]),L.supermap.symbolInfoService(n.serverUrl,n.serviceParams).getSymbolInfo(g,function(t){for(var e=0;e<a.length;e++)a[e].libID===t.result.libID&&a[e].code===t.result.code&&(a[e].symbolData.innerCells=t.result.innerCells,a[e].symbolData.scalePoints=t.result.scalePoints,a[e].symbolData.scaleValues=t.result.scaleValues,a[e].redraw(),a[e]._updateSymbolTexts(),a.splice(0,1))},this)}else if(o.selectedFeatures[s].redraw(),o.selectedFeatures[s]._updateSymbolTexts(),o.selectedFeatures[s].symbolType===SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL&&o.selectedFeatures[s].ownerGroup&&(o.selectedFeatures[s].ownerGroup.symbolType===SuperMap.Plot.SymbolType.NAVYDEPLOYMENT||o.selectedFeatures[s].ownerGroup.symbolType===SuperMap.Plot.SymbolType.AIRDEPLOYMENT))for(var f in o.selectedFeatures[s].ownerGroup.subObjects)o.selectedFeatures[s].ownerGroup.subObjects[f].redraw();if(o.isAddTransInfo){var P=new SuperMap.Plot.TransactionInfo;P.layerId=o.selectedFeatures[s].layer._leaflet_id,P.uuid=o.selectedFeatures[s].uuid,P.functionName="setLatLngs",o.transaction.transInfos.push(P)}}}var n=t.target.owner,l=this._dragStartBounds[n.uuid],a=l.getEast()-l.getWest(),s=l.getNorth()-l.getSouth(),r=n._resizeOffset(t.latlng,e,l);!0===t.originalEvent.altKey&&(0===r.lng&&0!==r.lat?r.lng=r.lat*a/s:0===r.lat&&0!==r.lng?r.lat=r.lng*s/a:Math.abs(r.lng)<Math.abs(r.lat)?r.lng<0&&r.lat>0||r.lng>0&&r.lat<0?r.lng=r.lat*a/s*-1:r.lng=r.lat*a/s:r.lat<0&&r.lng>0||r.lat>0&&r.lng<0?r.lat=r.lng*s/a*-1:r.lat=r.lng*s/a);var u=1,p=n._resizeBounds(t.latlng,e,l),h=!0===Boolean(a)?(p.getEast()-p.getWest())/a:.5,c=!0===Boolean(s)?(p.getNorth()-p.getSouth())/s:.5;u=2===e||7===e?c:4===e||5===e?h:h<c?h:c,n.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&!1===n.limitWidthHeight?i(h,c,r):i(u,null,r),this.oldLatLng=t.latlng},_dragLatLngs:function(t){var e=t.target.owner,o=this._editMarkers[e.uuid],i=SuperMap.Util.indexOf(o,t.target),n=!1;if(-2===t.target.options.nHandle&&(n=!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(),a=this._map.latLngToLayerPoint(t.latlng);if(n&&void 0!==this._lastDragPixel&&null!==this._lastDragPixel&&!((Math.abs(a.x-this._lastDragPixel.x)>3||Math.abs(a.y-this._lastDragPixel.y)>3)&&l-this.lastDownTime>100))return;var s=new SuperMap.GetSymbolInfoParameters;s.libID=e.libID,s.code=e.code,n?(s.inputPoints=L.Util.latLngsToSuperMapPoints(e.getLatLngs()),s.scalePoints=L.Util.latLngsToSuperMapPoints(e.scalePoints),s.scaleValues=e.scaleValues,s.newScalePoint=new SuperMap.Geometry.Point(t.latlng.lng,t.latlng.lat),s.newScalePointIndex=parseInt(t.target.options.tag)):(e.getLatLngs()[i]=t.target.getLatLng(),s.inputPoints=L.Util.latLngsToSuperMapPoints(e.getLatLngs()),s.scaleValues=e.scaleValues),s.subSymbols=e.subSymbols,L.supermap.symbolInfoService(e.serverUrl,e.serviceParams).getSymbolInfo(s,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=a,this.lastDownTime=(new Date).getTime()}else if(-1===t.target.options.nHandle){if(e.symbolType===SuperMap.Plot.SymbolType.REGULARPOLYGON)1===i?e.getLatLngs()[e.getLatLngs().length-1]=t.latlng:e.getLatLngs()[0]=t.latlng;else if(e.symbolType===SuperMap.Plot.SymbolType.ELLIPSESYMBOL)e.getLatLngs()[i]=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){var r=new SuperMap.Plot.TransactionInfo;r.layerId=e.layer._leaflet_id,r.uuid=e.uuid,r.functionName="setLatLngs",this.transaction.transInfos.push(r)}}else e.getLatLngs()[i]=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(var u in e.ownerGroup.subObjects)e.ownerGroup.subObjects[u].redraw();e._updateSymbolTexts(),this._resetEditMarkersValue(e)}else if(-2===t.target.options.nHandle){var p=t.target.getLatLng();if(p.isScalePoint=!0,e._modifyPoint(parseInt(t.target.options.tag),p),e.symbolType===SuperMap.Plot.SymbolType.FLAGGROUP)for(var h=0,c=e.components.length;h<c;h++)e.components[h]._updateSymbolTexts();else e._updateSymbolTexts();this._resetEditMarkersValue(e)}if(this.isAddTransInfo){var y=new SuperMap.Plot.TransactionInfo;if(y.layerId=e.layer._leaflet_id,y.uuid=e.uuid,y.functionName="setLatLngs",-2===t.target.options.nHandle&&(y.functionName="setScaleValues",e.symbolType!==SuperMap.Plot.SymbolType.ARCREGION&&e.symbolType!==SuperMap.Plot.SymbolType.FLAGGROUP||(y.functionName="modifyPoint",y.undoParams=[parseInt(t.target.options.tag)],y.redoParams=[parseInt(t.target.options.tag)])),this.transaction.transInfos.push(y),-2!==t.target.options.nHandle&&0===e.libID&&590===e.code||100===e.libID&&(17703===e.code||17704===e.code)){var g=new SuperMap.Plot.TransactionInfo;g.layerId=e.layer._leaflet_id,g.uuid=e.uuid,g.functionName="setScaleValues"}}this.isAddTransInfo=!1},_pasteToPosition:function(){if(this.pasteGeoAry&&0!==this.pasteGeoAry.length){var t=new SuperMap.Plot.Transaction;t.transType=SuperMap.Plot.TransactionType.CREATE,L.supermap.plotting.getControl().getTransManager().add(t);var e=function(t,e,o,i){var n=new SuperMap.Plot.TransactionInfo;n.layerId=t,n.uuid=e,n.feature=o,i.transInfos.push(n)},o=null,i=null,n=this.pasteGeoAry.slice();if(0!==arguments.length){for(var l=new L.LatLngBounds,a=0,s=n.length;a<s;a++){var r=n[a];if(r instanceof $s)for(var u=0;u<r.subObjects.length;u++){var p=r.subObjects[u];l.extend(p._bounds)}else r instanceof Qs&&l.extend(r._bounds)}o=l.getCenter()}0!==this.getSelectedFeatures().length&&this.unselectFeatures();var h=this._map.getPlottingLayers();for(var c in n)if(n[c]instanceof Qs&&(i=n[c].clone()),0!==arguments.length&&null!==o){for(var y=0,g=h.length;y<g;y++)if(h[y].getEditable()&&!h[y].getLocked()){h[y].addFeatures(i);break}if(i instanceof iu||i.move(arguments[0].lat-o.lat,arguments[0].lng-o.lng),this.selectFeatures(i),e(i.layer._leaflet_id,i.uuid,i,t),n[c]&&n[c].geoSymbolTexts)for(var f=0;f<n[c].geoSymbolTexts.length;f++){var P=n[c].geoSymbolTexts[f].getSymbolData();for(var d in P.associatedUuid=i.uuid,n)if(n[d].symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT||n[d].symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1){var S=n[c].layer.createSymbol(P.libID,P.code,null,{symbolData:P});this.selectFeatures(S),n.splice(d,1),e(S.layer._leaflet_id,S.uuid,S,t);break}}if(n[c]&&n[c].deployments)for(var m=0;m<n[c].deployments.length;m++){var b=n[c].deployments[m].getSymbolData();for(var M in b.associatedUuid=i.uuid,n)if(n[M].symbolType===SuperMap.Plot.SymbolType.NAVYDEPLOYMENT||n[M].symbolType===SuperMap.Plot.SymbolType.AIRDEPLOYMENT){var v=n[c].layer.createSymbol(b.libID,b.code,null,{symbolData:b});this.selectFeatures(v),n.splice(M,1),e(v.layer._leaflet_id,v.uuid,v,t);break}}if(n[c]&&n[c].timeWindows)for(var A=0;A<n[c].timeWindows.length;A++){var T=n[c].timeWindows[A].getSymbolData();for(var _ in T.associatedUuid=i.uuid,n)if(n[_].symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS){var O=n[c].layer.createSymbol(T.libID,T.code,null,{symbolData:T});this.selectFeatures(O),n.splice(_,1),e(O.layer._leaflet_id,O.uuid,O,t);break}}}else for(var x=0,w=h.length;x<w;x++)if(h[x].getEditable()&&!h[x].getLocked()){if(h[x].addFeatures(i),1012!==i.code&&this.selectFeatures(i),e(i.layer._leaflet_id,i.uuid,i,t),n[c]&&n[c].geoSymbolTexts)for(var E=0;E<n[c].geoSymbolTexts.length;E++){var C=n[c].geoSymbolTexts[E].getSymbolData();for(var I in C.associatedUuid=i.uuid,n)if(n[I].symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT||n[I].symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1){var R=n[c].layer.createSymbol(C.libID,C.code,null,{symbolData:C});this.selectFeatures(R),n.splice(I,1),e(R.layer._leaflet_id,R.uuid,R,t);break}}if(n[c]&&n[c].deployments)for(var D=0;D<n[c].deployments.length;D++){var U=n[c].deployments[D].getSymbolData();for(var N in U.associatedUuid=i.uuid,n)if(n[N].symbolType===SuperMap.Plot.SymbolType.NAVYDEPLOYMENT||n[N].symbolType===SuperMap.Plot.SymbolType.AIRDEPLOYMENT){var B=n[c].layer.createSymbol(U.libID,U.code,null,{symbolData:U});this.selectFeatures(B),n.splice(N,1),e(B.layer._leaflet_id,B.uuid,B,t);break}}if(n[c]&&n[c].timeWindows)for(var k=0;k<n[c].timeWindows.length;k++){if(!Object.prototype.hasOwnProperty.call(n[c].timeWindows[k],"symbolType"))return;var F=n[c].timeWindows[k].getSymbolData();for(var V in F.associatedUuid=i.uuid,n)if(n[V].symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS){var j=n[c].layer.createSymbol(F.libID,F.code,null,{symbolData:F});this.selectFeatures(j),n.splice(V,1),e(j.layer._leaflet_id,j.uuid,j,t);break}}break}}},pasteToPositionAndLayer:function(t,e){var o=!0;e&&e instanceof bu&&(o=!1);var i=!1;null!==t&&void 0!==t||(i=!0);var n=null,l=this.pasteGeoAry.slice();if(!i){for(var a=new L.LatLngBounds,s=0;s<l.length;s++){var r=l[s];r instanceof iu&&a.extend(r._bounds),a.extend(r._bounds)}n=a.getCenter()}for(var u=0;u<this.selectedFeatures.length;u++){var p=this.selectedFeatures[u];this.unselectFeatures(p)}this.selectedFeatures=[];for(var h=0;h<l.length;h++){var c=l[h];if(!0!==c.layer.isLocked&&!1!==c.layer.isEditable){var y=null;if(y=c instanceof iu?c.route.clone():c.clone(),o?c.layer.addFeatures(y):e.addFeatures(y),i||null===n||y instanceof iu||y.move(t.lat-n.lat,t.lng-n.lng),void 0!==this.pasteGeoSel&&this.pasteGeoSel.length>h&&!0===this.pasteGeoSel[h])if(c instanceof iu){var g=y._getNodeFeature(y._getNodeByUuid(c.routeNode.id));this.selectedFeatures(g)}else this.selectFeatures(y);if(l[h]&&l[h].geoSymbolTexts)for(var f=0;f<l[h].geoSymbolTexts.length;f++){var P=l[h].geoSymbolTexts[f].getSymbolData();for(var d in P.associatedUuid=y.uuid,l)if(l[d].symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT||l[d].symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1){var S=l[h].layer.createSymbol(P.libID,P.code,null,{symbolData:P});this.selectFeatures(S),l.splice(d,1);break}}if(l[h]&&l[h].deployments)for(var m=0;m<l[h].deployments.length;m++){var b=l[h].deployments[m].getSymbolData();for(var M in b.associatedUuid=y.uuid,l)if(l[M].symbolType===SuperMap.Plot.SymbolType.NAVYDEPLOYMENT||l[M].symbolType===SuperMap.Plot.SymbolType.AIRDEPLOYMENT){var v=l[h].layer.createSymbol(b.libID,b.code,null,{symbolData:b});this.selectFeatures(v),l.splice(M,1);break}}if(l[h]&&l[h].timeWindows)for(var A=0;A<l[h].timeWindows.length;A++){var T=l[h].timeWindows[A].getSymbolData();for(var _ in T.associatedUuid=y.uuid,l)if(l[_].symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS){var O=l[h].layer.createSymbol(T.libID,T.code,null,{symbolData:T});this.selectFeatures(O),l.splice(_,1);break}}}}},equalLarge:function(t){for(var e=[],o=0;o<this.getSelectedFeatures().length;o++)this.getSelectedFeatures()[o].symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&e.push(this.getSelectedFeatures()[o]);if(!(e.length<2)){var i=new SuperMap.Plot.Transaction;L.supermap.plotting.getControl().getTransManager().add(i);var n=function(t,e,o,i,n){var l=new SuperMap.Plot.TransactionInfo;l.layerId=t,l.uuid=e,l.functionName="setSymbolSize",l.undoParams=o,l.redoParams=i,n.transInfos.push(l)};if(t===SuperMap.Plot.EqualLargeType.WIDTH)for(var l=e[e.length-1].symbolSize.w,a=0;a<e.length-1;a++){var s=e[a].symbolSize.w;e[a].setSymbolSize(l,e[a].symbolSize.h),n(e[a].layer._leaflet_id,e[a].uuid,[s,e[a].symbolSize.h],[l,e[a].symbolSize.h],i)}else if(t===SuperMap.Plot.EqualLargeType.HEIGHT)for(var r=e[e.length-1].symbolSize.h,u=0;u<e.length-1;u++){var p=e[u].symbolSize.h;e[u].setSymbolSize(e[u].symbolSize.w,r),n(e[u].layer._leaflet_id,e[u].uuid,[e[u].symbolSize.w,p],[e[u].symbolSize.w,r],i)}else if(t===SuperMap.Plot.EqualLargeType.SAME)for(var h=e[e.length-1].symbolSize.w,c=e[e.length-1].symbolSize.h,y=0;y<e.length-1;y++){var g=e[y].symbolSize.w,f=e[y].symbolSize.h;e[y].setSymbolSize(h,c),n(e[y].layer._leaflet_id,e[y].uuid,[g,f],[h,c],i)}}},uniformDistribution:function(t){if(!(this.getSelectedFeatures().length<3)){var e=new SuperMap.Plot.Transaction;L.supermap.plotting.getControl().getTransManager().add(e);for(var o=function(t,e,o,i,n){var l=new SuperMap.Plot.TransactionInfo;l.layerId=t,l.uuid=e,l.functionName="move",l.undoParams=o,l.redoParams=i,n.transInfos.push(l)},i=[],n=0;n<this.getSelectedFeatures().length;n++){var l=this.getSelectedFeatures()[n].getBounds();i.push(new SuperMap.Geometry.Point(l.getCenter().lng,l.getCenter().lat))}var a=this.getSelectedFeatures().slice();if(t===SuperMap.Plot.UniformDistributionType.LEVEL){for(var s=0;s<i.length;s++)for(var r=0;r<i.length-1-s;r++)if(i[r].x>i[r+1].x){var u=i[r+1];i[r+1]=i[r],i[r]=u;var p=a[r+1];a[r+1]=a[r],a[r]=p}for(var h=Math.abs(i[i.length-1].x-i[0].x)/(i.length-1),c=1;c<i.length-1;c++){var y=i[i.length-1].x-h*c-i[c].x;a[c].move(0,y),this._resetEditMarkersValue(a[c]),o(a[c].layer._leaflet_id,a[c].uuid,[0,-y],[0,y],e)}}else if(t===SuperMap.Plot.UniformDistributionType.VERTICAL){for(var g=0;g<i.length;g++)for(var f=0;f<i.length-1-g;f++)if(i[f].y>i[f+1].y){var P=i[f+1];i[f+1]=i[f],i[f]=P;var d=a[f+1];a[f+1]=a[f],a[f]=d}for(var S=Math.abs(i[i.length-1].y-i[0].y)/(i.length-1),m=1;m<i.length-1;m++){var b=i[i.length-1].y-S*m-i[m].y;a[m].move(b,0),this._resetEditMarkersValue(a[m]),o(a[m].layer._leaflet_id,a[m].uuid,[-b,0],[b,0],e)}}}}});L.Map.include({getPlotEditControl:function(){return this._plotEditControl?this._plotEditControl:null}});L.supermap.plotting.editControl=function(t){return new xu(t)};var wu=L.supermap.ServiceBase.extend({initialize:function(t,e){L.supermap.ServiceBase.prototype.initialize.call(this,t,e)},getSMLInfos:function(t,e,o){var i=this;return o||(o=i),new J(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:o,processCompleted:e,processFailed:e}}).processAsync(t),i},editSMLFile:function(t,e,o){var i=this;return o||(o=i),new b(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:o,processCompleted:e,processFailed:e}}).processAsync(t),i}});L.supermap.smlFileService=function(t,e){return new wu(t,e)};var Eu=L.supermap.ServiceBase.extend({initialize:function(t,e){L.supermap.ServiceBase.prototype.initialize.call(this,t,e)},getSymbolInfo:function(t,e,o){var i=this;return o||(o=i),new at(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:o,processCompleted:e,processFailed:e}}).processAsync(t),i}});L.supermap.symbolInfoService=function(t,e){return new Eu(t,e)};var Cu=L.supermap.ServiceBase.extend({initialize:function(t,e){L.supermap.ServiceBase.prototype.initialize.call(this,t,e)},getLibIDs:function(t,e){var o=this;return e||(e=o),new w(o.url,{proxy:o.options.proxy,withCredentials:o.options.withCredentials,crossOrigin:o.options.crossOrigin,headers:o.options.headers,serverType:o.options.serverType,eventListeners:{scope:e,processCompleted:t,processFailed:t}}).processAsync(),o},getLibInfo:function(t,e,o){var i=this;return o||(o=i),new F(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:o,processCompleted:e,processFailed:e}}).processAsync(t),i}});L.supermap.symbolLibService=function(t,e){return new Cu(t,e)}}()}();