@syncfusion/ej2-maps 27.1.50 → 27.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitleaksignore +37 -0
- package/dist/ej2-maps.min.js +2 -2
- package/dist/ej2-maps.umd.min.js +2 -2
- package/dist/ej2-maps.umd.min.js.map +1 -1
- package/dist/es6/ej2-maps.es2015.js +20 -18
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +20 -18
- package/dist/es6/ej2-maps.es5.js.map +1 -1
- package/dist/global/ej2-maps.min.js +2 -2
- package/dist/global/ej2-maps.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/maps/layers/legend.d.ts +1 -1
- package/src/maps/layers/legend.js +17 -17
- package/src/maps/user-interaction/zoom.js +3 -1
package/dist/ej2-maps.umd.min.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: ej2-maps.umd.min.js
|
|
3
|
-
* version : 27.
|
|
3
|
+
* version : 27.2.2
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
|
7
7
|
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
|
8
8
|
* applicable laws.
|
|
9
9
|
*/
|
|
10
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-svg-base"),require("@syncfusion/ej2-data"),require("@syncfusion/ej2-pdf-export")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-svg-base","@syncfusion/ej2-data","@syncfusion/ej2-pdf-export"],t):t((e=e||self).ej={},e.ej2Base,e.ej2SvgBase,e.ej2Data,e.ej2PdfExport)}(this,function(e,Y,E,O,_){"use strict";M=function(e,t){return(M=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var M,L=function(e,t){function i(){this.constructor=e}M(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},H=function(e,t){this.width=e,this.height=t};function w(e,t){return"string"!=typeof e?e:Y.isNullOrUndefined(e)?null:-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10)}function I(e){e.element.style.height=Y.isNullOrUndefined(e.height)?"auto":e.height,e.element.style.width=Y.isNullOrUndefined(e.width)?"auto":e.width,e.element.style.setProperty("display","block");var t=e.element.clientWidth,i=e.element.clientHeight,o="string"==typeof e.element.style.width?w(e.element.style.width,t):e.element.style.width,n="string"==typeof e.element.style.height?w(e.element.style.height,i):e.element.style.height;new H(0,0);return"0px"===e.width||"0%"===e.width||"0%"===e.height||"0px"===e.height?new H(0,0):new H(w(e.width,t)||t||o||600,w(e.height,i)||i||n||(e.isDevice?Math.min(window.innerWidth,window.innerHeight):450))}function z(e){e.renderer=new E.SvgRenderer(e.element.id),e.availableSize=I(e),e.svgObject=e.renderer.createSvg({id:e.element.id+"_svg",width:e.availableSize.width,height:e.availableSize.height}),"0px"!==e.width&&"0%"!==e.width&&"0%"!==e.height&&"0px"!==e.height||(e.svgObject.setAttribute("height","0"),e.svgObject.setAttribute("width","0"))}function U(e,t,i){var o=i.getBoundingClientRect(),n=i.ownerDocument.defaultView.pageXOffset,a=i.ownerDocument.defaultView.pageYOffset,l=i.ownerDocument.documentElement.clientTop,i=i.ownerDocument.documentElement.clientLeft,n=o.left+n-i,i=o.top+a-l;return new T(e-n,t-i)}function j(e){return e*(Math.PI/180)}function Z(e){return e*(180/Math.PI)}function B(e,t,i,o,n){var a,l,r,s=new H(n.mapAreaRect.width,n.mapAreaRect.height),d=n.baseMapBounds.longitude,p=n.baseMapBounds.latitude,h=j(e),m=j(t),c=Y.isNullOrUndefined(n.projectionType)?"Mercator":n.projectionType,u=n.isTileMap?256*Math.pow(2,1):Y.isNullOrUndefined(i)?Math.min(s.width,s.height):Math.min(s.width,s.height)*i;if("Normal"===o.geometryType)y=Y.isNullOrUndefined(i)?t:Math.abs((t-d.min)*i),b=Y.isNullOrUndefined(i)?e:Math.abs((p.max-e)*i);else if("Geographic"===o.geometryType){switch(c){case"Mercator":var g=new J(u/2,u/2),y=g.x+t*(u/360),f=te(Math.sin(j(e)),-.9999,.9999),b=g.y+.5*Math.log((1+f)/(1-f))*-(u/(2*Math.PI));break;case"Winkel3":r=((a=X(m,h)).x+m/(Math.PI/2))/2,l=(a.y+h)/2;break;case"Miller":r=m,l=1.25*Math.log(Math.tan(Math.PI/4+.4*h));break;case"Eckert3":r=2/(S=Math.sqrt(Math.PI*(4+Math.PI)))*m*(1+Math.sqrt(1-4*h*h/(Math.PI*Math.PI))),l=4/S*h;break;case"AitOff":r=(a=X(m,h)).x,l=a.y;break;case"Eckert5":r=m*(1+Math.cos(h))/Math.sqrt(2+Math.PI),l=2*h/Math.sqrt(2+Math.PI);break;case"Equirectangular":r=m,l=h;break;case"Eckert6":for(var S=(1+Math.PI/2)*Math.sin(h),v=1/0,x=0;x<10&&1e-6<Math.abs(v);x++)h-=v=(h+Math.sin(h)-S)/(1+Math.cos(h));S=Math.sqrt(2+Math.PI),r=m*(1+Math.cos(h))/S,l=2*h/S}y="Mercator"===c?y:q(V(n,Z(r)),3),b="Mercator"===c?b:-q(G(n,Z(l)),3)}return new J(y,b)}function D(o,n,a,e){var l="";return!Y.isNullOrUndefined(e)&&1<e.length&&(Array.prototype.forEach.call(e,function(e,t){var i=e.latitude,e=e.longitude,i=o.isTileMap?R(new T(e,i),n,o.tileTranslatePoint,!0):B(i,e,n,a,o);l+=0===t?"M "+i.x+" "+i.y:" L "+i.x+" "+i.y}),l+=" z "),l}function R(e,t,i,o){var t=256*Math.pow(2,t),n=(e.x+180)/360,a=Math.sin(e.y*Math.PI/180),a=.5-Math.log((1+a)/(1-a))/(4*Math.PI),l=e.x,e=e.y;return o&&(l=n*t+.5+i.x,e=a*t+.5+i.y),{x:l,y:e}}function V(e,t){var i=e.baseMapBounds.longitude,e=Y.isNullOrUndefined(e.baseSize)?e.mapAreaRect.width:e.mapAreaRect.width+Math.abs(e.baseSize.width-e.mapAreaRect.width)/2;return Math.round(e*(t-i.min)/(i.max-i.min)*100)/100}function G(e,t){var i=e.baseMapBounds.latitude;return Math.round(e.mapAreaRect.height*(t-i.min)/(i.max-i.min)*100)/100}function X(e,t){var i=Math.cos(t),o=$(ee(i*Math.cos(e/=2)));return new J(2*i*Math.sin(e)*o,Math.sin(t)*o)}function q(e,t){t=Math.pow(10,t);return Math.round(e*t)/t}function $(e){return e/Math.sin(e)}function ee(e){return Math.acos(e)}function te(e,t,i){return Y.isNullOrUndefined(t)||(e=Math.max(e,t)),e=Y.isNullOrUndefined(i)?e:Math.min(e,i)}function ie(e,t,i,o){Y.createElement("a",{attrs:{download:e+"."+t.toLocaleLowerCase(),href:i}}).dispatchEvent(new MouseEvent(o?"click":"move",{view:window,bubbles:!1,cancelable:!0}))}function oe(e,t){this.latitude=e,this.longitude=t}var J=function(e,t){this.x=e,this.y=t},ne=function(e,t){this.min=e,this.max=t},ae=function(e,t){this.latitude=new ne(e.min,e.max),this.longitude=new ne(t.min,t.max)};function W(e,t){var i=document.getElementById("mapsmeasuretext");return null===i&&((i=document.createElement("text")).id="mapsmeasuretext",document.body.appendChild(i)),i.innerText=e,i.style.cssText="position: absolute; font-size: "+("number"==typeof t.size?t.size+"px":t.size)+"; font-weight: "+t.fontWeight+"; font-style: "+t.fontStyle+"; font-family: "+t.fontFamily+"; visibility: hidden; top: -100; left: 0; whiteSpace: nowrap; lineHeight: normal",new H(i.clientWidth,i.clientHeight)}function le(e,t){var i=document.createElement("canvas").getContext("2d");i.font=t.fontStyle+" "+t.fontWeight+" "+("number"==typeof t.size?t.size+"px":t.size)+" "+t.fontFamily;i=i.measureText(e).width,e=parseFloat(t.size)||16;return new H(i,e)}var re,se=function(e,t,i,o,n,a,l){void 0===a&&(a=""),this.transform="",this.baseLine="auto",this.id=e,this.text=n,this.transform=a,this.anchor=o,this.x=t,this.y=i,this.baseLine=l},A=function(e,t,i,o,n,a,l,r){this.id=e,this["fill-opacity"]=n,this["stroke-opacity"]=a,this.fill=t,this.stroke=o,this["stroke-width"]=i,this["stroke-dasharray"]=l,this.d=r},de=function(e,t,i){this.r=e,this.g=t,this.b=i},Q=(L(pe,re=A),pe);function pe(e,t,i,o,n,a,l,r,s){e=re.call(this,e,t,i.width,i.color,o,i.opacity)||this;return e.y=n.y,e.x=n.x,e.height=n.height,e.width=n.width,e.rx=a||0,e.ry=l||0,e.transform=r||"",e["stroke-dasharray"]=s,e["fill-opacity"]=o,e["stroke-opacity"]=i.opacity,e}L(ce,he=A);var he,me=ce;function ce(e,t,i,o,n,a,l,r){e=he.call(this,e,t,i.width,i.color,o,i.opacity,r)||this;return e.cy=a,e.cx=n,e.r=l,e["stroke-dasharray"]=r,e["fill-opacity"]=o,e["stroke-opacity"]=i.opacity,e}L(ye,ue=A);var ue,ge=ye;function ye(e,t,i,o,n,a,l,r){e=ue.call(this,e,i,o,n,a=void 0===a?1:a,l=void 0===l?1:l,r=void 0===r?"":r)||this;return e.points=t,e}L(Se,fe=ge);var fe,be=Se;function Se(e,t,i,o,n,a,l,r){return fe.call(this,e,t,i,o,n,a=void 0===a?1:a,l=void 0===l?1:l,r=void 0===r?"":r)||this}L(xe,ve=A);var ve,L=xe;function xe(e,t,i,o,n,a,l,r){e=ve.call(this,e,i,o,n,a=void 0===a?1:a,l=void 0===l?1:l,r=void 0===r?"":r)||this;return e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e}function Oe(e,t,i,o){this.x1=e,this.y1=t,this.x2=i,this.y2=o}function Ce(e,t,i,o,n,a,l,r,s){void 0===a&&(a="userSpaceOnUse"),void 0===l&&(l="userSpaceOnUse"),void 0===r&&(r=""),void 0===s&&(s=""),this.id=e,this.x=t,this.y=i,this.width=o,this.height=n,this.patternUnits=a,this.patternContentUnits=l,this.patternTransform=r,this.href=s}var T=function(e,t){this.x=e,this.y=t},K=function(e,t,i,o){this.x=e,this.y=t,this.width=i,this.height=o};function _e(e,t,i,o,n){void 0===n&&(n=!1);var a,i={id:e.id,x:e.x,y:e.y,fill:i,"font-size":t.size,"font-style":t.fontStyle,"font-family":t.fontFamily,"font-weight":t.fontWeight,"text-anchor":e.anchor,transform:e.transform,opacity:t.opacity,"dominant-baseline":e.baseLine},l="string"==typeof e.text||"number"==typeof e.text?e.text:n?e.text[e.text.length-1]:e.text[0],r=new E.SvgRenderer(""),s=r.createText(i,l);if(s.style["user-select"]="none",s.style["font-family"]=t.fontFamily,s.style["font-size"]=t.size,s.style["font-weight"]=t.fontWeight,s.style["font-color"]=t.color,s.style["-moz-user-select"]="none",s.style["-webkit-touch-callout"]="none",s.style["-webkit-user-select"]="none",s.style["-khtml-user-select"]="none",s.style["-ms-user-select"]="none",s.style["-o-user-select"]="none","string"!=typeof e.text&&1<e.text.length)for(var d=1,p=e.text.length;d<p;d++)a=W(e.text[d],t).height,a=r.createTSpan({x:e.x,id:e.id,y:e.y+(n?-d*a:d*a)},n?e.text[e.text.length-(d+1)]:e.text[d]),s.appendChild(a);return o.appendChild(s),s}function Me(e,t,i,o,n,a){for(var l=Y.createElement("div",{id:t,className:n.element.id+"_marker_template_element"}),r=(l.style.cssText="position: absolute;pointer-events: auto;",e.length);0<r;)l.appendChild(e[0]),r--;if(!n.isReact||"function"!==a){for(var s=l.innerHTML,d=Object.keys(i),p=RegExp,h=0;h<d.length;h++)"object"==typeof i[d[h]]?s=Pe(s,"",i,n):"latitude"!==d[h].toLowerCase()&&"longitude"!==d[h].toLowerCase()&&(s=s.replace(new p("{{:"+d[h]+"}}","g"),i[d[h].toString()]));l.innerHTML=s}return l}function Le(e,t){t=t.format&&!isNaN(Number(e))?t.intl.getNumberFormat({format:t.format,useGrouping:t.useGroupingSeparator})(Number(e)):e;return t}function Pe(e,t,i,o){for(var n=""===e?t:e,a=""===e?n.split("${"):n.split("{{:"),l=RegExp,r=0;r<a.length;r++)if(-1<a[r].indexOf("}}")&&-1<a[r].indexOf(".")||-1<a[r].indexOf("}")&&-1<a[r].search("."))for(var s,d=""===e?a[r].split("}"):a[r].split("}}"),p=0;p<d.length;p++)-1<d[p].indexOf(".")&&(s=k(i,d[p]).toString(),n=""===e?n.split("${"+d[p]+"}").join(Le(s,o)):n.replace(new l("{{:"+d[p]+"}}","g"),s));return n}function we(e,t,i){for(var o=(Y.isNullOrUndefined(e.childElementCount)?e[0]:e).outerHTML,n=Object.keys(i),a=RegExp,l=0;l<n.length;l++)o=o.replace(new a("{{:"+n[l]+"}}","g"),i[n[l].toString()]);e=Y.createElement("div",{id:t,innerHTML:o});return e.style.position="absolute",e}function Te(e,t,i,o,n,a,l){var r,s,d=n.size,p=n.borderColor,h=parseFloat(n.borderWidth),m=parseFloat(n.borderOpacity),c=n.fill,u=n.dashArray,g={color:p,width:h,opacity:m},n=n.opacity,h=new A(o,c,h,p,n,m,u,"");return d.width="string"==typeof d.width?parseInt(d.width,10):d.width,d.height="string"==typeof d.height?parseInt(d.height,10):d.height,"Circle"===e?(p=(d.width+d.height)/4,m=new me(o,c,g,n,i.x,i.y,p,u),l.renderer.drawCircle(m)):"Rectangle"===e?(r=i.x-d.width/2,s=i.y-d.height/2,p=new Q(o,c,g,n,new K(r,s,d.width,d.height),null,null,"",u),l.renderer.drawRectangle(p)):"Image"===e?(r=i.x-d.width/2,s=i.y-(-1<o.indexOf("cluster")?d.height/2:d.height),Y.merge(h,{href:t,height:d.height,width:d.width,x:r,y:s}),l.renderer.drawImage(h)):Xe(l,e,h,d,i,a)}function k(e,t){if(!Y.isNullOrUndefined(e)&&!Y.isNullOrUndefined(t)){var i=t.replace(/\[/g,".").replace(/\]/g,"").split(".");if(1===i.length)e=e[i[0]];else for(var o=0;o<i.length&&!Y.isNullOrUndefined(e);o++)e=e[i[o]]}return e}function Ie(e,t){var i=!Y.isNullOrUndefined(e.colorValuePath)&&-1<e.colorValuePath.indexOf(".")?k(t,e.colorValuePath).toString():t[e.colorValuePath];return e.fill=Y.isNullOrUndefined(e.colorValuePath)||Y.isNullOrUndefined(i)?e.fill:-1<e.colorValuePath.indexOf(".")?k(t,e.colorValuePath).toString():t[e.colorValuePath],e}function ke(e,t){return Y.isNullOrUndefined(e.shapeValuePath)||Y.isNullOrUndefined(t[e.shapeValuePath])?(Fe(e,t),Ee(e,t)):(Fe(e,t),"Image"===t[e.shapeValuePath]&&Ee(e,t)),e}function Ne(e,t){return-1<e.indexOf(".")?k(t,e).toString():t[e]}function Fe(e,t){Y.isNullOrUndefined(e.shapeValuePath)||(t=Ne(e.shapeValuePath,t),e.shape=Y.isNullOrUndefined(t)||""===t.toString()?e.shape:t)}function Ee(e,t){Y.isNullOrUndefined(e.imageUrlValuePath)||(t=Ne(e.imageUrlValuePath,t),e.imageUrl=Y.isNullOrUndefined(t)?e.imageUrl:t)}function ze(s,d,p,h,m,o,n,a){var c,l,u,r,g,y,f,b=[],S=[],v=0,x=0,O=s.markerClusterSettings.labelStyle,C=0,_=[],M=s.markerClusterSettings,L=p.renderer.createGroup({id:p.element.id+"_LayerIndex_"+h+"_markerCluster"}),P={cancel:!1,name:Do,fill:M.fill,height:M.height,width:M.width,imageUrl:M.imageUrl,shape:M.shape,data:void 0,maps:p,cluster:M,border:M.border},w=p.element.getBoundingClientRect(),T=(p.isTileMap?new Object:nt(p,s,!1),p.isTileMap||(f=p.mapLayerPanel.calculateFactor(s)),!1),I=p.isTileMap?p.tileZoomLevel:p.mapScaleValue;return p.trigger("markerClusterRendering",P,function(e){for(Array.prototype.forEach.call(d.childNodes,function(e,i){var t,o,n,a,l,r;_=[],"hidden"!==e.style.visibility?(c=(y=e).getBoundingClientRect(),_.push(i),Y.isNullOrUndefined(c)||(t=0<p.markerModule.zoomedMarkerCluster.length&&p.markerModule.zoomedMarkerCluster[h]&&p.markerModule.zoomedMarkerCluster[h][i]&&0<p.markerModule.zoomedMarkerCluster[h][i].length||0<p.markerModule.initialMarkerCluster.length&&p.markerModule.initialMarkerCluster[h]&&p.markerModule.initialMarkerCluster[h][i]&&0<p.markerModule.initialMarkerCluster[h][i].length?(p.previousScale<I?p.markerModule.zoomedMarkerCluster:p.markerModule.initialMarkerCluster)[h][i]:null,Y.isNullOrUndefined(t)||0===t.length?Array.prototype.forEach.call(d.childNodes,function(e,t){i+1<=t&&"hidden"!==e.style.visibility&&Ae(e,c,b,_,t)}):Array.prototype.forEach.call(t,function(e){var t;i!==e&&"hidden"!==(t=document.getElementById(p.element.id+"_LayerIndex_"+h+"_MarkerIndex_0_dataIndex_"+e)).style.visibility&&Ae(t,c,b,_,e)}),Be(p,I,h,i,_),v=c.left+c.width/2,x=c.top+c.height,0<b.length&&(_=_.filter(function(e,t,i){return i.indexOf(e)===t}),v-=w.left,x-=p.availableSize.height<=w.height?w.top:w.bottom-w.top,t=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=parseInt(e.id.split("_MarkerIndex_")[1].split("_")[0],10),l=(a=s.markerSettings[o]).dataSource[t],r=Y.isNullOrUndefined(a.longitudeValuePath)?Y.isNullOrUndefined(l.longitude)?Y.isNullOrUndefined(l.Longitude)?0:parseFloat(l.Longitude):parseFloat(l.longitude):Number(k(l,a.longitudeValuePath)),l=Y.isNullOrUndefined(a.latitudeValuePath)?Y.isNullOrUndefined(l.latitude)?Y.isNullOrUndefined(l.Latitude)?0:parseFloat(l.Latitude):parseFloat(l.latitude):Number(k(l,a.latitudeValuePath)),p.isTileMap?p.isTileMap&&!p.zoomSettings.enable&&(n=R(new J(r,l),p.tileZoomLevel,p.tileTranslatePoint,!0)):n=B(l,r,f,s,p),e.style.visibility="hidden",P.cancel?(g={size:new H(M.width,M.height),fill:M.fill,borderColor:M.border.color,borderWidth:M.border.width,opacity:M.opacity,dashArray:M.dashArray,imageUrl:M.imageUrl,shape:M.shape}).borderOpacity=(Y.isNullOrUndefined(M.border.opacity)?M:M.border).opacity:(g={size:new H(P.width,P.height),fill:P.fill,borderColor:P.border.color,borderWidth:P.border.width,opacity:M.opacity,dashArray:M.dashArray,imageUrl:P.imageUrl,shape:P.shape}).borderOpacity=(Y.isNullOrUndefined(P.border.opacity)?M:P.border).opacity,v=p.isTileMap||-1<d.id.indexOf("_Markers_Group")?v:v+3.75-P.width/2,x=p.isTileMap||-1<d.id.indexOf("_Markers_Group")?x:x-P.height/2,p.isTileMap&&!p.zoomSettings.enable&&(v=n.x,x=n.y),a=p.element.id+"_LayerIndex_"+h+"_MarkerIndex_"+o+"_dataIndex_"+t+"_cluster_"+C,l=p.element.id+"_LayerIndex_"+h+"_MarkerIndex_"+o+"_dataIndex_"+t+"_cluster_"+C+"_datalabel_"+C,C++,(r=Te(g.shape,g.imageUrl,{x:0,y:0},a,g,m,p)).setAttribute("transform","translate( "+v+" "+x+" )"),"Balloon"===P.shape?r.children[0].textContent=_.toString():r.textContent=_.toString(),u=new se(l,0,3.75,"middle",(b.length+1).toString(),"",""),(u=_e(u,O,O.color,m)).setAttribute("transform","translate( "+v+" "+x+" )"),L.appendChild(u),L.appendChild(r))),b=[]):Be(p,I,h,i,_),T=!0}),o.appendChild(L),p.svgObject.appendChild(o),p.element.appendChild(p.svgObject),M.allowDeepClustering&&Array.prototype.forEach.call(L.childNodes,function(e,t){if("hidden"!==e.style.visibility&&(c=(y=e).getBoundingClientRect(),!(Y.isNullOrUndefined(c)||-1<y.id.indexOf("_datalabel_")))){for(var i=t+1;i<L.childElementCount;i++)"hidden"!==L.childNodes[i].style.visibility&&(r=L.childNodes[i],l=r.getBoundingClientRect(),Y.isNullOrUndefined(l)||-1<r.id.indexOf("_datalabel_")||c.left>l.right||c.right<l.left||c.top>l.bottom||c.bottom<l.top||(S.push(r),S.push(L.childNodes[i-1]),L.childNodes[i].style.visibility="hidden",L.childNodes[i-1].style.visibility="hidden",_.push(i)));if(0<S.length){y=e;for(var o=0;o<S.length;o++)"g"===y.tagName?y.childNodes[0].textContent=y.childNodes[0].textContent+","+S[o].textContent:y.textContent=y.textContent+","+S[o].textContent,L.childNodes[t-1].textContent=(+L.childNodes[t-1].textContent+ +S[o+1].textContent).toString(),o++}S=[]}});0<L.childNodes.length;)m.insertBefore(L.childNodes[0],m.firstChild);n||N(p.element.id+"_Secondary_Element").appendChild(m);var t=document.getElementById(p.element.id+"_LayerIndex_"+h+"_Polygon_Group"),i=document.getElementById(p.element.id+"_LayerIndex_"+h+"_Polygons_Group"),t=(Y.isNullOrUndefined(t)&&!p.isTileMap?o.insertBefore(m,o.firstChild):p.isTileMap?Y.isNullOrUndefined(i)?Y.isNullOrUndefined(t)?o.insertBefore(m,o.firstChild):t.insertAdjacentElement("afterend",m):i.insertAdjacentElement("afterend",m):o.appendChild(m),document.getElementById(p.element.id+"_LayerIndex_"+h+"_markerCluster"));Y.isNullOrUndefined(t)||t.remove(),a&&(i=document.getElementById(p.element.id+"_Layer_Collections"),t=document.getElementById(p.element.id+"_LayerIndex_"+(h+1)),Y.isNullOrUndefined(i)||Y.isNullOrUndefined(t)?Y.isNullOrUndefined(i)||i.appendChild(o):i.insertBefore(o,t))}),T}function Be(e,t,i,o,n){var a;1===t?(a=!Y.isNullOrUndefined(e.markerModule.initialMarkerCluster[i][o])&&1<n.length?n:[],e.markerModule.initialMarkerCluster[i][o]=a,a=!Y.isNullOrUndefined(e.markerModule.zoomedMarkerCluster[i][o])&&1<n.length?n:[],e.markerModule.zoomedMarkerCluster[i][o]=a):1<t&&(e.markerModule.zoomedMarkerCluster[i][o]=1<n.length?n:[])}function Ae(e,t,i,o,n){var a=e.getBoundingClientRect();Y.isNullOrUndefined(a)||t.left>a.right||t.right<a.left||t.top>a.bottom||t.bottom<a.top||(i.push(a),e.style.visibility="hidden",o.push(n))}function Ue(e,t){for(var i=e[0].layerIndex,o=e[0].targetClusterIndex,n=e[0].markerIndex,a=e[0].dataIndex,l=t.element.id+"_LayerIndex_"+i+"_MarkerIndex_"+n,r=t.layers[i].markerSettings[n],a=l+"_dataIndex_"+a+"_cluster_"+o,s="Balloon"===t.layers[i].markerClusterSettings.shape?F(a+"_Group"):F(a),a=F(a+"_datalabel_"+o),d=(s.setAttribute("visibility","visible"),a.setAttribute("visibility","visible"),e[0].data.length),p=0;p<d;p++)("Balloon"===r.shape&&Y.isNullOrUndefined(r.template)?F(l+"_dataIndex_"+e[0].data[p].index+"_Group"):F(l+"_dataIndex_"+e[0].data[p].index)).style.visibility="hidden";P(t.element.id+"_LayerIndex_"+i+"_MarkerIndex_"+n+"_markerClusterConnectorLine")}function je(e,t,i,o){for(var n=e[0].layerIndex,a=e[0].markerIndex,l=e[0].targetClusterIndex,r=e[0].dataIndex,s=o?F:i.querySelector.bind(i),d=o?"":"#",p=t.element.id+"_LayerIndex_"+n+"_MarkerIndex_"+a,h=t.layers[n].markerSettings[a],m=p+"_dataIndex_"+r+"_cluster_"+l,c="Balloon"===t.layers[n].markerClusterSettings.shape?s(d+m+"_Group"):s(d+m),m=s(d+m+"_datalabel_"+l),u=(c.setAttribute("visibility","hidden"),m.setAttribute("visibility","hidden"),"Balloon"===h.shape&&Y.isNullOrUndefined(h.template)?s(d+p+"_dataIndex_"+r+"_Group"):s(d+p+"_dataIndex_"+r)),g=(-1<u.parentElement.id.indexOf("Template_Group")?u.getBoundingClientRect():h).height,y=(-1<u.parentElement.id.indexOf("Template_Group")?u.getBoundingClientRect():h).width,f=+c.getAttribute("transform").split("translate(")[1].trim().split(" ")[0],b=+c.getAttribute("transform").split("translate(")[1].trim().split(" ")[1].split(")")[0].trim(),S=y+5,v=6.28*S,x=0,O=Math.round(v/y),C=(x+=O,e[0].data.length),_=Math.round(g/v*100),M=(C<O?100/C:_)/100*360,L=C<O?45:0,P=1,w="M "+f+" "+b+" ",T="",I=0;I<C;I++){if(x===I||360<=Math.round(L)){for(L=0,v=6.28*(S=(y+5)*++P),O=Math.round(v/g),_=Math.round(g/v*100);_*O<100;)O++;M=_/100*360,x+=O}var k=f+S*Math.sin(2*Math.PI*L/360),N=b+S*Math.cos(2*Math.PI*L/360);T+=w+"L "+k+" "+N+" ",-1<(u="Balloon"===h.shape&&Y.isNullOrUndefined(h.template)?s(d+p+"_dataIndex_"+e[0].data[I].index+"_Group"):s(d+p+"_dataIndex_"+e[0].data[I].index)).parentElement.id.indexOf("Template_Group")&&(u.style.transform="",u.style.left=t.isTileMap?k-y/2+"px":k-y/2-10+"px",u.style.top=t.isTileMap?N-g/2+"px":N-g/2-10+"px"),u.setAttribute("transform","translate( "+k+" "+N+")"),u.style.visibility="visible",L+=M}l=t.layers[n].markerClusterSettings.connectorLineSettings,m={d:T,id:t.element.id+"_LayerIndex_"+n+"_MarkerIndex_"+a+"_dataIndex_"+r+"_markerClusterConnectorLine",stroke:l.color,"fill-opacity":l.opacity,"stroke-opacity":l.opacity,"stroke-width":l.width},i=o?s(t.element.id+"_Markers_Group"):i,c=t.renderer.createGroup({id:t.element.id+"_LayerIndex_"+n+"_MarkerIndex_"+a+"_markerClusterConnectorLine"});c.appendChild(t.renderer.drawPath(m)),"Balloon"===h.shape?i.insertBefore(c,i.querySelector("#"+p+"_dataIndex_0_Group")):i.insertBefore(c,i.querySelector("#"+p+"_dataIndex_0"))}function Ze(e,t,i,o,n,a,l,r,s,d,p){var h={size:new H(e.width,e.height),fill:e.fill,borderColor:e.border.color,borderWidth:e.border.width,opacity:t.opacity,dashArray:t.dashArray,borderOpacity:(Y.isNullOrUndefined(e.border.opacity)?t:e.border).opacity},e=(P(l),Te(e.shape,e.imageUrl,{x:0,y:0},l,h,p,d)),l=(d.isTileMap?n.x:(n.x+a.x)*s)+(Y.isNullOrUndefined(r)||Y.isNullOrUndefined(r.x)?0:r.x),h=(d.isTileMap?n.y:(n.y+a.y)*s)+(Y.isNullOrUndefined(r)||Y.isNullOrUndefined(r.y)?0:r.y),a=(e.setAttribute("transform","translate( "+l+" "+h+" )"),Re(d.selectedMarkerElementId,d.markerSelectionClass,e,"MarkerselectionMapStyle"),d.legendSettings.toggleLegendSettings.enable&&"Markers"===d.legendSettings.type&&(n=parseInt(e.id.split("_LayerIndex_")[1],10),Ve(d.toggledElementId,"g"===e.tagName?e.children[0]:e,d.legendSettings.toggleLegendSettings.applyShapeSettings?d.layers[n].shapeSettings:d.legendSettings.toggleLegendSettings)),p.appendChild(e),i.length-1===o?"marker":null),s=new J(l,h);return(0<t.animationDuration||"Enable"===Y.animationMode)&&ft(e,t.animationDelay,t.animationDuration,s,d,a),p}function De(e,t,i,o,n,a,l,r,s,d,p){if((t=dt(e.template,p))&&t(o,p,e.template,p.element.id+"_MarkerTemplate"+n,!1).length){for(var h=Me(t(o,p,e.template,p.element.id+"_MarkerTemplate"+n,!1),i,o,0,p,typeof e.template),m=0;m<h.children.length;m++)h.children[m].style.pointerEvents="auto";h.style.left=(p.isTileMap?l.x:(l.x+r.x)*s)+d.x-p.mapAreaRect.x+"px",h.style.top=(p.isTileMap?l.y:(l.y+r.y)*s)+d.y-p.mapAreaRect.y+"px",a.appendChild(h)}return a}function Re(e,t,i,o){if(e)for(var n=0;n<e.length;n++)i.getAttribute("id")===e[n]&&(0!==n&&"g"!==i.tagName||(Y.isNullOrUndefined(t)||Y.isNullOrUndefined(t.id)||document.body.appendChild(t),-1<i.id.indexOf("_MarkerIndex_")&&0<i.childElementCount&&i.children[0].setAttribute("class",o)),i.setAttribute("class",o))}function Ve(e,t,i){if(!Y.isNullOrUndefined(e)&&0<e.length)for(var o=0;o<e.length;o++)e[o]===t.id&&(t.setAttribute("fill",i.fill),t.setAttribute("stroke",i.border.color),t.setAttribute("fill-opacity",i.opacity.toString()),t.setAttribute("stroke-opacity",(Y.isNullOrUndefined(i.border.opacity)?i:i.border).opacity.toString()),t.setAttribute("stroke-width",(Y.isNullOrUndefined(i.border.width)?0:i.border.width).toString()))}function Ge(e,t,i,o,n,a,l){F(e)||((e=Y.createElement("style",{id:e})).innerText="."+t+"{fill:"+i+";opacity:"+o+";stroke-width:"+a+";stroke:"+n+";}",l.shapeSelectionClass=e,document.body.appendChild(e))}function s(e,t){return t&&t.appendChild(e),e}function He(e,t,i){return s(e.renderer.drawCircle(t),i)}function We(e,t,i){return s(e.renderer.drawRectangle(t),i)}function Xe(e,t,i,o,n,a){var l;switch(t){case"Balloon":l=qe(e,i,o,n,"Marker",a);break;case"Cross":i.d="M "+n.x+" "+(n.y-o.height/2)+" L "+n.x+" "+(n.y+o.height/2)+" M "+(n.x-o.width/2)+" "+n.y+" L "+(n.x+o.width/2)+" "+n.y;break;case"Diamond":i.d="M "+n.x+" "+(n.y-o.height/2)+" L "+(n.x+o.width/2)+" "+n.y+" L "+n.x+" "+(n.y+o.height/2)+" L "+(n.x-o.width/2)+" "+n.y+" Z";break;case"Star":i.d="M "+(n.x+o.width/3)+" "+(n.y+o.height/2)+" L "+(n.x-o.width/2)+" "+(n.y-o.height/6)+" L "+(n.x+o.width/2)+" "+(n.y-o.height/6)+" L "+(n.x-o.width/3)+" "+(n.y+o.height/2)+" L "+n.x+" "+(n.y-o.height/2)+" L "+(n.x+o.width/3)+" "+(n.y+o.height/2)+" Z";break;case"Triangle":i.d="M "+n.x+" "+(n.y-o.height/2)+" L "+(n.x+o.width/2)+" "+(n.y+o.height/2)+" L "+(n.x-o.width/2)+" "+(n.y+o.height/2)+" Z";break;case"HorizontalLine":i.d=" M "+(n.x-o.width/2)+" "+n.y+" L "+(n.x+o.width/2)+" "+n.y;break;case"VerticalLine":i.d="M "+n.x+" "+(n.y-o.height/2)+" L "+n.x+" "+(n.y+o.height/2);break;case"InvertedTriangle":i.d="M "+(n.x-o.width/2)+" "+(n.y-o.height/2)+" L "+(n.x+o.width/2)+" "+(n.y-o.height/2)+" L "+n.x+" "+(n.y+o.height/2)+" Z";break;case"Pentagon":for(var r,s,d=0;d<5;d++)r=o.width/2*Math.cos(Math.PI/180*(72*d)),s=o.height/2*Math.sin(Math.PI/180*(72*d)),i.d+=(0===d?"M ":"L ")+(n.x+r)+" "+(n.y+s);i.d+=" Z"}return"Cross"!==t&&"HorizontalLine"!==t&&"VerticalLine"!==t||(i.stroke="transparent"===i.stroke?i.fill:i.stroke),"Balloon"===t?l:e.renderer.drawPath(i)}function qe(e,t,i,o,n,a){var l=i.width,r=i.height,l=(o.x-=l/2,o.y-=-1<t.id.indexOf("cluster")?r/2:-1<t.id.indexOf("Legend")?r/1.25:r,t.d="M15,0C8.8,0,3.8,5,3.8,11.2C3.8,17.5,9.4,24.4,15,30c5.6-5.6,11.2-12.5,11.2-18.8C26.2,5,21.2,0,15,0z M15,16c-2.8,0-5-2.2-5-5s2.2-5,5-5s5,2.2,5,5S17.8,16,15,16z",e.renderer.drawPath(t)),r=i.width/30,i=i.height/30;return l.setAttribute("transform","translate("+o.x+", "+o.y+") scale("+r+", "+i+")"),"Marker"===n?(s(l,o=e.renderer.createGroup({id:t.id+"_Group"})),s(o,a)):l}function Ye(e,t,i,o,n){if(!Y.isNullOrUndefined(t)&&!Y.isNullOrUndefined(e)&&!Y.isNullOrUndefined(i))for(var a=0;a<e.length;a++){var l=-1<i.indexOf(".")?k(e[a],i):e[a][i],r=Je(l,o,t);if((!Y.isNullOrUndefined(l)&&isNaN(t[r])&&"string"==typeof l?l.toLowerCase():l)===(!Y.isNullOrUndefined(t[r])&&isNaN(t[r])?t[r].toLowerCase():t[r]))return a}return null}function Je(e,t,i){if(!Y.isNullOrUndefined(e)&&!Y.isNullOrUndefined(i)&&!Y.isNullOrUndefined(t))for(var o="[object Array]"===Object.prototype.toString.call(t)?t:[t],n=0;n<o.length;n++)if((Y.isNullOrUndefined(e)||"string"!=typeof e?e:e.toLowerCase())===(!Y.isNullOrUndefined(i[o[n]])&&isNaN(i[o[n]])?i[o[n]].toLowerCase():i[o[n]]))return o[n];return null}function Qe(e,t,i){for(var o=[],n=0;n<e.length;n++){var a=e[n];t<=a.y&&i>=a.y&&o.push(a)}return o}function Ke(e,t,i,o,n){return n===o?(t-e)/100+e:(t-e)/100*(100/(n-o)*(i-o))+e}function $e(e,t,i){if(!e.length)return null;for(var o,n,a,l,r=e.length,s=0,d=0,p=0,h=0;h<=r-1;h++)o=e[h].x,n="Mercator"===t||"Normal"===i?e[h].y:-e[h].y,l=h===r-1?(a=e[0].x,"Mercator"===t||"Normal"===i?e[0].y:-e[0].y):(a=e[h+1].x,"Mercator"===t||"Normal"===i?e[h+1].y:-e[h+1].y),s+=Math.abs(o*l-a*n),d+=Math.abs((o+a)*(o*l-a*n)),p+=Math.abs((n+l)*(o*l-a*n));s*=.5;for(var m=e.some(function(e){return e.x<5&&e.y<5})&&"Normal"===i?6:4,d=0!==s?1/(m*s)*d:0,p=0!==s?1/(m*s)*p:0,c={x:0,y:0},u={x:0,y:0},g={x:0,y:0},y={x:0,y:0},f={x:0,y:0},b={x:0,y:0},S={x:0,y:0},v={x:0,y:0},x=0,h=0;h<=r-1;h++){var O=e[h];O.y="Mercator"===t||"Normal"===i?O.y:-O.y,O.y>p?O.x<d&&d-O.x<d-f.x?f={x:O.x,y:O.y}:O.x>d&&(0===b.x||O.x-d<b.x-d)&&(b={x:O.x,y:O.y}):O.x<d&&d-O.x<d-S.x?S={x:O.x,y:O.y}:O.x>d&&(0===v.x||O.x-d<v.x-d)&&(v={x:O.x,y:O.y}),x=b.y-v.y+(b.y-v.y)/4,O.x>d?O.y<p&&p-O.y<p-c.y?c={x:O.x,y:O.y}:O.y>p&&(0===u.y||O.y-p<u.y-p)&&(u={x:O.x,y:O.y}):O.y<p&&p-O.y<p-g.y?g={x:O.x,y:O.y}:O.y>p&&(0===y.y||O.y-p<y.y-p)&&(y={x:O.x,y:O.y})}return{x:d,y:p,rightMin:c,rightMax:u,leftMin:g,leftMax:y,points:e,topMax:v,topMin:S,bottomMax:b,bottomMin:f,height:x}}function et(e){var t=!1;return"[object Array]"===Object.prototype.toString.call(e)&&Array.prototype.forEach.call(e,function(e){Y.isNullOrUndefined(e.geometry)||"Path"!==e.geometry.type||(t=!0)}),t}function tt(e,t,i,o,n,a){var l=t;if(e<(o=Y.isNullOrUndefined(o)?(n?le:W)(t,i).width:o))for(var r=t.length-1;0<=r;--r)if((o=(n?le:W)(l=t.substring(0,r)+"...",i).width)<=e||l.length<4)return l.length<4&&(l=" "),Y.isNullOrUndefined(a)||a.push(o),l;return Y.isNullOrUndefined(a)||a.push(o),l}function it(e,t,i,o){var n;switch(t){case"Near":n=e.x;break;case"Center":n="title"===o?e.width/2-i.width/2:e.x+e.width/2-i.width/2;break;case"Far":n="title"===o?e.width-e.y-i.width:e.x+e.width-i.width}t="title"===o?e.y+i.height/2:e.y+e.height/2+i.height/2;return new J(n,t)}function P(e){e=document.getElementById(e);return e?Y.remove(e):null}function ot(e,t){var i=B(e.minLatOfGivenLocation,e.minLongOfGivenLocation,e.mapLayerPanel.calculateFactor(t),t,e),t=B(e.maxLatOfGivenLocation,e.maxLongOfGivenLocation,e.mapLayerPanel.calculateFactor(t),t,e),e=(i.x+t.x)/2,i=(i.y+t.y)/2;return new J(e,i)}function nt(e,t,i){var o,n,a,l,r=e.zoomSettings.zoomFactor,s=e.centerPosition,d=s.latitude,p=s.longitude,h=!Y.isNullOrUndefined(e.centerLatOfGivenLocation)&&!Y.isNullOrUndefined(e.centerLongOfGivenLocation)&&e.zoomNotApplied,m=(Y.isNullOrUndefined(e.mapScaleValue)&&(e.mapScaleValue=r),e.zoomSettings.shouldZoomInitially&&e.zoomSettings.enable&&(e.mapScaleValue=n=r=(e.zoomSettings.shouldZoomInitially||e.enablePersistence)&&1===e.scale?e.scale:Y.isNullOrUndefined(e.markerZoomFactor)?1:e.markerZoomedState?e.markerZoomFactor:parseInt(e.scale.toString()),e.markerZoomedState&&e.mapScaleValue!==e.markerZoomFactor&&!e.enablePersistence&&(e.mapScaleValue=r=e.markerZoomFactor),!e.markerZoomedState||Y.isNullOrUndefined(e.markerCenterLatitude)||Y.isNullOrUndefined(e.markerCenterLongitude)||(d=e.markerCenterLatitude,p=e.markerCenterLongitude)),h&&(e.mapScaleValue=n=r=e.scaleOfGivenLocation),Y.isNullOrUndefined(e.baseMapRectBounds)?null:e.baseMapRectBounds.min),c=Y.isNullOrUndefined(e.baseMapRectBounds)?null:e.baseMapRectBounds.max,u=i?1:e.mapScaleValue,g=(Y.isNullOrUndefined(e.currentShapeDataLength)&&!Y.isNullOrUndefined(t.shapeData)&&(e.currentShapeDataLength=Y.isNullOrUndefined(t.shapeData.features)?Y.isNullOrUndefined(t.shapeData.geometries)?0:t.shapeData.geometries.length:t.shapeData.features.length),e.totalRect&&e.legendSettings.visible?e.totalRect:e.mapAreaRect),y=e.availableSize;return Y.isNullOrUndefined(m)||Y.isNullOrUndefined(c)||(o=Math.abs(c.x-m.x),c=Math.abs(m.y-c.y),i=i?1:1===e.markerZoomFactor?e.mapScaleValue:r,s=e.zoomSettings.shouldZoomInitially&&e.markerZoomedState&&!e.zoomPersistence?e.markerZoomCenterPoint:e.centerPosition,!Y.isNullOrUndefined(p)&&0!==p&&!Y.isNullOrUndefined(d)&&0!==d||h?(r=((o+Math.abs(e.mapAreaRect.width-o))/2+e.mapAreaRect.x)/i,s=((c+Math.abs(e.mapAreaRect.height-c))/2+e.mapAreaRect.y)/i,i=h?ot(e,t):B(d,p,e.mapLayerPanel.calculateFactor(t),t,e),n=Y.isNullOrUndefined(e.previousProjection)||e.previousProjection!==e.projectionType||e.isMarkerZoomCompleted?(a=-i.x+r,l=-i.y+s,u):(1!==Math.floor(e.scale)&&e.zoomSettings.shouldZoomInitially||e.zoomNotApplied?(a=-i.x+r,l=-i.y+s):e.zoomSettings.shouldZoomInitially||e.zoomNotApplied?(a=-i.x+r,l=-i.y+s,n=u):(a=e.zoomTranslatePoint.x,l=e.zoomTranslatePoint.y),e.mapScaleValue)):Y.isNullOrUndefined(e.previousProjection)||e.previousProjection!==e.projectionType?(0!==c&&0!==o&&c!==o||(o=g.width/2,c=g.height),n=parseFloat(Math.min(g.width/o,g.height/c).toFixed(2)),h=0!==m.x&&"layers"===e.translateType?y.width-g.width:0,a=g.x+(-m.x+(g.width/2-(o*=n=1.05<n?1:n)/2))-h,l=g.y+(-m.y+(g.height/2-(c*=n)/2)),e.previousTranslate=new J(a,l)):e.zoomSettings.shouldZoomInitially||1!==e.markerZoomFactor||1!==e.mapScaleValue?(n=e.mapScaleValue<1?e.mapScaleValue+1:e.mapScaleValue,e.mapScaleValue=e.zoomSettings.enable&&1!==e.mapScaleValue?e.mapScaleValue:1,e.currentShapeDataLength!==(Y.isNullOrUndefined(t.shapeData.features)?t.shapeData.geometries:t.shapeData.features).length&&"SubLayer"!==t.type?(d=parseFloat(Math.min(g.height/c,g.width/o).toFixed(2)),l=g.y+(-m.y+(g.height/2-(c*=d)/2)),a=g.x+(-m.x+(g.width/2-(o*=n=d)/2))):e.availableSize.height===e.heightBeforeRefresh&&e.widthBeforeRefresh===e.availableSize.width||Y.isNullOrUndefined(e.translatePoint)||Y.isNullOrUndefined(e.previousTranslate)?Y.isNullOrUndefined(e.previousProjection)||!(1===e.mapScaleValue||e.mapScaleValue<=1.05)||e.zoomModule.isDragZoom?(a=e.zoomTranslatePoint.x,l=e.zoomTranslatePoint.y,n=e.scale):(n=parseFloat(Math.min(g.width/o,g.height/c).toFixed(2)),a=g.x+(-m.x+(g.width/2-(o*=n=1.05<n?1:n)/2)),l=g.y+(-m.y+(g.height/2-(c*=n)/2))):(p=parseFloat(Math.min(g.width/o,g.height/c).toFixed(2)),r=o,i=c,s=g.x+(-m.x+(g.width/2-(r*=p)/2)),u=g.y+(-m.y+(g.height/2-(i*=p)/2)),y=(e.translatePoint.x-e.previousTranslate.x)/e.widthBeforeRefresh,h=(e.translatePoint.y-e.previousTranslate.y)/e.heightBeforeRefresh,a=s+y*e.availableSize.width,l=u+h*e.availableSize.height,e.previousTranslate=new J(s,u),e.zoomTranslatePoint.x=a,e.zoomTranslatePoint.y=l)):(n=parseFloat(Math.min(g.width/o,g.height/c).toFixed(2)),l=g.y+(-m.y+(g.height/2-(c*=n)/2)),a=g.x+(-m.x+(g.width/2-(o*=n)/2))),Y.isNullOrUndefined(e.translatePoint))||(a=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:a,l=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:l),n=e.enablePersistence?1<=e.mapScaleValue?e.mapScaleValue:1:n,e.widthBeforeRefresh=e.availableSize.width,e.heightBeforeRefresh=e.availableSize.height,{scale:n,location:new J(a,l)}}function at(e,t,i){var o,n,a=e.zoomSettings.zoomFactor,l=e.centerPosition,r=l.latitude,l=l.longitude,s=!Y.isNullOrUndefined(e.centerLongOfGivenLocation)&&!Y.isNullOrUndefined(e.centerLatOfGivenLocation)&&e.zoomNotApplied,d=(Y.isNullOrUndefined(e.previousCenterLatitude)&&Y.isNullOrUndefined(e.previousCenterLongitude)?(e.previousCenterLatitude=e.centerPosition.latitude,e.previousCenterLongitude=e.centerPosition.longitude):e.previousCenterLatitude!==e.centerPosition.latitude&&e.previousCenterLongitude!==e.centerPosition.longitude?(e.centerPositionChanged=!0,e.previousCenterLatitude=e.centerPosition.latitude,e.previousCenterLongitude=e.centerPosition.longitude):e.centerPositionChanged=!1,(Y.isNullOrUndefined(e.mapScaleValue)||a>e.mapScaleValue)&&(e.isReset&&1===e.mapScaleValue?e.mapScaleValue=e.mapScaleValue:!Y.isNullOrUndefined(e.mapScaleValue)&&e.mapScaleValue<=e.scale?e.mapScaleValue=e.scale:e.mapScaleValue=a),e.mapScaleValue=1!==e.zoomSettings.zoomFactor&&e.zoomSettings.zoomFactor===e.mapScaleValue||e.zoomSettings.zoomFactor===e.mapScaleValue||e.centerPositionChanged?e.zoomSettings.zoomFactor:e.mapScaleValue,e.zoomSettings.shouldZoomInitially&&!e.isZoomByPosition&&(e.mapScaleValue=a=b=(e.enablePersistence||e.zoomSettings.shouldZoomInitially)&&1===e.scale?e.scale:Y.isNullOrUndefined(e.markerZoomFactor)?e.mapScaleValue:e.markerZoomFactor,a=e.mapScaleValue,Y.isNullOrUndefined(e.markerCenterLatitude)||Y.isNullOrUndefined(e.markerCenterLongitude)||(r=e.markerCenterLatitude,l=e.markerCenterLongitude)),s&&(e.mapScaleValue=b=a=e.scaleOfGivenLocation),i?1:e.mapScaleValue),p=e.mapAreaRect,h=e.baseMapRectBounds.min,m=e.baseMapRectBounds.max,c=i?1:e.mapScaleValue,u=Math.abs(m.x-h.x),m=Math.abs(h.y-m.y);if(!Y.isNullOrUndefined(l)&&0!==l&&!Y.isNullOrUndefined(r)&&0!==r||s){var g=(m+Math.abs(e.mapAreaRect.height-m))/2/c,y=(u+Math.abs(e.mapAreaRect.width-u))/2/c,c=s?ot(e,t):B(r,l,e.mapLayerPanel.calculateFactor(t),t,e);Y.isNullOrUndefined(e.zoomTranslatePoint)&&Y.isNullOrUndefined(e.previousProjection)||e.zoomNotApplied?(o=-c.x+y+e.mapAreaRect.x/d,n=-c.y+g+e.mapAreaRect.y/d):e.previousProjection!==e.projectionType?(o=-c.x+y,n=-c.y+g):(e.isZoomByPosition&&(e.zoomTranslatePoint.x=-c.x+y,e.zoomTranslatePoint.y=-c.y+g),o=e.zoomTranslatePoint.x,n=e.zoomTranslatePoint.y,a=d),Y.isNullOrUndefined(e.translatePoint)||(n=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:n,o=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:o),b=0!==a?a:1}else{var s=0===e.zoomSettings.zoomFactor?1:e.zoomSettings.zoomFactor,f=e.zoomSettings.maxZoom,b=s=f<s?f:s,r=0===e.mapScaleValue?1:e.mapScaleValue>f?f:e.mapScaleValue,y=p.x+(-h.x+(p.width/2-u/2)),g=p.y+(-h.y+(p.height/2-m/2));if(!Y.isNullOrUndefined(e.zoomTranslatePoint)||!Y.isNullOrUndefined(e.previousProjection))if(e.previousProjection!==e.projectionType){var S=[];S.push({x:y,y:g});for(var v=1;v<f;v++){var x=S[v-1].x-(p.width/v-p.width/(v+1))/2,O=S[v-1].y-(p.height/v-p.height/(v+1))/2;S.push({x:x,y:O})}y=S[s-1].x,g=S[s-1].y}else y=e.zoomTranslatePoint.x,g=e.zoomTranslatePoint.y,s!==r&&(b=r);Y.isNullOrUndefined(e.translatePoint)||(o=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:y,n=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:g)}return b=e.enablePersistence?0===e.mapScaleValue?1:e.mapScaleValue:b,e.widthBeforeRefresh=e.availableSize.width,e.heightBeforeRefresh=e.availableSize.height,{scale:i?1:b,location:new J(o,n)}}function lt(e){e.tileZoomScale=e.tileZoomLevel=Math.floor(e.availableSize.height/512)+1;var t=256*Math.pow(2,e.tileZoomLevel);e.tileTranslatePoint.x=e.availableSize.width/2-t/2,e.tileTranslatePoint.y=e.availableSize.height/2-t/2+20,e.previousTileWidth=e.availableSize.width,e.previousTileHeight=e.availableSize.height}function N(e){return document.getElementById(e)}function rt(e){return"string"==typeof e?parseFloat(e):e}function st(e,t){return e.formatFunction=e.intl.getNumberFormat({format:e.format,useGrouping:e.useGroupingSeparator}),e.formatFunction(t)}function dt(t,e){var i=null;try{"function"!=typeof t&&document.querySelectorAll(t).length?i=Y.compile(document.querySelector(t).innerHTML.trim()):(e.isVue||e.isVue3||"function"==typeof t)&&(i=Y.compile(t))}catch(e){i=Y.compile(t)}return i}function F(e){return document.getElementById(e)}function pt(e,t){var i,o=parseInt(e.split("_LayerIndex_")[1].split("_")[0],10),e=parseInt(e.split("_shapeIndex_")[1].split("_")[0],10),t=t.layersCollection[o],o=t.layerData[e].property;return{shapeData:o,data:i=t.dataSource?t.dataSource[Ye(t.dataSource,o,t.shapeDataPath,t.shapePropertyPath)]:i}}function ht(e,t,i,o){var n=pt(e,i),a={color:t.border.color,opacity:t.border.opacity,width:t.border.width},l=t.enableMultiSelect?{cancel:!1,name:o,fill:t.fill,opacity:t.opacity,border:a,shapeData:n.shapeData,data:n.data,target:e,maps:i,shapeDataCollection:i.shapeSelectionItem}:{cancel:!1,name:o,fill:t.fill,opacity:t.opacity,border:a,shapeData:n.shapeData,data:n.data,target:e,maps:i};return i.trigger(o,l,function(){l.border.opacity=(Y.isNullOrUndefined(l.border.opacity)?l:l.border).opacity}),l}function mt(e){return document.getElementsByClassName(e)}function C(e,t){var i=null;return i=document.getElementById(t)?document.getElementById(t).querySelector("#"+e):i}function ct(e,t,i,o){for(var n,a=o.layers[e].shapeData.features,l=0;l<a.length;l++)if(a[l].properties.name===t){n=o.element.id+"_LayerIndex_"+e+"_shapeIndex_"+l+"_dataIndex_undefined";break}return F(n)}function ut(e,t,i){e=Y.createElement("style",{id:e});return e.innerText="."+t+"{fill:"+i.fill+";fill-opacity:"+(Y.isNullOrUndefined(i.opacity)?"1":i.opacity.toString())+";stroke-opacity:"+(Y.isNullOrUndefined(i.border.opacity)?"1":i.border.opacity.toString())+";stroke-width:"+i.border.width.toString()+";stroke:"+i.border.color+";}",e}function gt(e,t,i){e=F(e);Y.isNullOrUndefined(e)||(e.innerText="."+t+"{fill:"+i.fill+";fill-opacity:"+(Y.isNullOrUndefined(i.opacity)?"1":i.opacity.toString())+";stroke-width:"+i.border.width.toString()+";stroke-opacity:"+(Y.isNullOrUndefined(i.border.opacity)?"1":i.border.opacity.toString())+";stroke:"+i.border.color+"}")}function yt(t,i,e,o,n){var a={color:t.border.color,width:t.border.width/i.scale,opacity:t.border.opacity},l={opacity:t.opacity,fill:t.fill,border:a,name:en,target:e.id,cancel:!1,shapeData:o,data:n,maps:i};i.trigger("itemSelection",l,function(e){l.border.opacity=(Y.isNullOrUndefined(t.border.opacity)?t:t.border).opacity,i.shapeSelectionItem.push(l.shapeData),F("ShapeselectionMap")?gt("ShapeselectionMap","ShapeselectionMapStyle",l):document.body.appendChild(ut("ShapeselectionMap","ShapeselectionMapStyle",l))})}function x(e){e.removeAttribute("class")}function ft(i,e,t,o,n,a,l){void 0===l&&(l=0);var r=o.x,s=o.y,d=0,p=i.getAttribute("transform")||"";new Y.Animation({}).animate(i,{duration:0===t&&"Enable"===Y.animationMode?1e3:t,delay:e,progress:function(e){var t;e.timeStamp>e.delay&&!n.zoomModule.isPanningInProgress&&(n.isTileMap&&0===d&&(t=document.querySelector(".GroupElement"),Y.isNullOrUndefined(t)||(t.style.display="block")),d=(e.timeStamp-e.delay)/e.duration,i.setAttribute("transform","translate( "+(r-l*d)+" "+(s-l*d)+" ) scale("+d+")"))},end:function(e){n.zoomModule.isPanningInProgress||i.setAttribute("transform",p),n.zoomModule.isPanningInProgress=!1,a&&n.trigger(Qo,{cancel:!1,name:Qo,element:a,maps:n})}})}function bt(e){P(e)}function St(e,t,i,o,n,a,l,r,s){for(var d=U(i,o,r),d=(Y.isNullOrUndefined(d)||(i=d.x,o=d.y),document.getElementById(l)),p=W(e,{fontFamily:"Segoe UI",size:"8px",fontStyle:"Normal",fontWeight:"Regular"}).width,h=e.split(" "),m=h[0].length,c=1;c<h.length;c++)m<h[c].length&&(m=h[c].length);d||((d=Y.createElement("div",{id:l})).style.cssText='background-color: rgb(255, 255, 255) !important; color:black !important; position:absolute;border:1px solid rgb(0, 0, 0); padding-left:5px;font-size:12px; font-family: "Segoe UI"; text-align:center'),i<n-p||(n-p<i&&i<n-8*m?p=n-i:n-8*m<=i&&(p<i?i-=p:(p=i,i=0)));t=t.split("px");vt(d,e,i,o,t,p,n,r),d.clientHeight+2*parseInt(t[0],10)>a&&(p=i,i=0),vt(d,e,i,o,t,p,n,r),s&&setTimeout(bt,5e3,l)}function vt(e,t,i,o,n,a,l,r){e.innerText=t,e.style.top=-1!==e.id.indexOf("_Legend")?(parseInt(n[0],10)+o).toString()+"px":(2*parseInt(n[0],10)).toString()+"px",e.style.left=i.toString()+"px",e.style.width=a.toString()+"px",e.style.maxWidth=l.toString()+"px",e.style.wordWrap="break-word",r.appendChild(e)}function xt(e,t,i,o,n){var a=F(e),l=Ot(n.borderColor),r=Ot(n.fontColor),i="top:"+i.toString()+"px;left:"+o.toString()+"px;color:"+(r?"rgba("+r.r+","+r.g+","+r.b+","+n.fontOpacity+")":n.fontColor)+";background:"+n.fill+";z-index: 2;position:absolute;border:"+n.borderWidth+"px solid "+(l?"rgba("+l.r+","+l.g+","+l.b+","+n.borderOpacity+")":n.borderColor)+";font-family:"+n.fontFamily+";font-style:"+n.fontStyle+";font-weight:"+n.fontWeight+";font-size:"+n.fontSize+";border-radius:"+n.borderWidth+"px;";!a&&n.visible?((a=Y.createElement("div",{id:e})).innerHTML=Y.SanitizeHtmlHelper.sanitize(" "+t+" "),a.style.cssText=i,document.body.appendChild(a)):n.visible&&(a.innerHTML=Y.SanitizeHtmlHelper.sanitize(" "+t+" "),a.style.cssText=i)}function Ot(e){var t,i;return-1!==e.indexOf("#")&&-1===e.toLowerCase().indexOf("rgb")?(i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e))?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null:-1!==e.toLowerCase().indexOf("rgb")?(i=e.match(/\d+/g).map(function(e){return parseInt(e,10)}))?{r:i[0],g:i[1],b:i[2]}:null:((t=document.createElement("div")).style.color=e,i=window.getComputedStyle(document.body.appendChild(t)).color.match(/\d+/g).map(function(e){return parseInt(e,10)}),document.body.removeChild(t),i?{r:i[0],g:i[1],b:i[2]}:null)}function Ct(e,t,i,o,n){var a=new E.SvgRenderer(""),e=_t(e,i,t,n,o);return a["draw"+e.functionName](e.renderOption)}function _t(e,t,i,o,n){var a,l="Path",r=t.width,s=t.height,d=e.x,p=e.y,h=e.x+-r/2,m=e.y+-s/2;switch(o.stroke="HorizontalLine"===i||"VerticalLine"===i||"Cross"===i?o.fill:o.stroke,o["stroke-width"]=0!==o["stroke-width"]||"HorizontalLine"!==i&&"VerticalLine"!==i&&"Cross"!==i?o["stroke-width"]:1,i){case"Circle":case"Bubble":l="Ellipse",Y.merge(o,{rx:r/2,ry:s/2,cx:d,cy:p});break;case"VerticalLine":Y.merge(o,{d:a="M "+d+" "+(p+s/2)+" L "+d+" "+(p+-s/2)});break;case"HorizontalLine":Y.merge(o,{d:a="M "+d+" "+p+" L "+(d+r/2)+" "+p});break;case"Diamond":Y.merge(o,{d:a="M "+h+" "+p+" L "+d+" "+(p+-s/2)+" L "+(d+r/2)+" "+p+" L "+d+" "+(p+s/2)+" L "+h+" "+p+" z"});break;case"Rectangle":Y.merge(o,{d:a="M "+h+" "+(p+-s/2)+" L "+(d+r/2)+" "+(p+-s/2)+" L "+(d+r/2)+" "+(p+s/2)+" L "+h+" "+(p+s/2)+" L "+h+" "+(p+-s/2)+" z"});break;case"Triangle":Y.merge(o,{d:a="M "+h+" "+(p+s/2)+" L "+d+" "+(p+-s/2)+" L "+(d+r/2)+" "+(p+s/2)+" L "+h+" "+(p+s/2)+" z"});break;case"InvertedTriangle":Y.merge(o,{d:a="M "+(d+r/2)+" "+(p-s/2)+" L "+d+" "+(p+s/2)+" L "+(d-r/2)+" "+(p-s/2)+" L "+(d+r/2)+" "+(p-s/2)+" z"});break;case"Pentagon":for(var c,u,g=0;g<=5;g++)c=r/2*Math.cos(Math.PI/180*(72*g)),u=r/2*Math.sin(Math.PI/180*(72*g)),a=0===g?"M "+(d+c)+" "+(p+u)+" ":a.concat("L "+(d+c)+" "+(p+u)+" ");a=a.concat("Z"),Y.merge(o,{d:a});break;case"Star":a="M "+(e.x+t.width/3)+" "+(e.y+t.height/2)+" L "+(e.x-t.width/2)+" "+(e.y-t.height/6)+" L "+(e.x+t.width/2)+" "+(e.y-t.height/6)+" L "+(e.x-t.width/3)+" "+(e.y+t.height/2)+" L "+e.x+" "+(e.y-t.height/2)+" L "+(e.x+t.width/3)+" "+(e.y+t.height/2)+" Z",Y.merge(o,{d:a});break;case"Cross":Y.merge(o,{d:a="M "+h+" "+p+" L "+(d+r/2)+" "+p+" M "+d+" "+(p+s/2)+" L "+d+" "+(p+-s/2)});break;case"Image":l="Image",Y.merge(o,{href:n,height:s,width:r,x:h,y:m})}return{renderOption:o,functionName:l}}function Mt(e,t){t.appendChild(e);var i=e.offsetWidth,o=e.offsetHeight;return t.removeChild(e),new H(i,o)}function Lt(e,t,i,o){for(var n,a=0;a<e.childElementCount;a++)if(-1<(n=e.childNodes[a]).id.indexOf("_NavigationGroup"))Pt(n,t,i,o);else if(-1<n.id.indexOf("_Polygons_Group"))for(var l=0;l<n.childElementCount;l++){var r=o.layersCollection[t].polygonSettings.polygons[parseInt(n.children[l].id.split("_PolygonIndex_")[1])].borderWidth;n.children[l].setAttribute("stroke-width",(r/i).toString())}else{var s,d=void 0,p=o.layersCollection[t].shapeSettings.borderWidthValuePath,h=o.layersCollection[t].shapeSettings.border.width,m=o.layersCollection[t].shapeSettings.circleRadius,d=o.layersCollection[t].shapeSettings.borderWidthValuePath&&null!==(s=Ye(o.layersCollection[t].dataSource,o.layersCollection[t].layerData[a].property,o.layersCollection[t].shapeDataPath,o.layersCollection[t].shapePropertyPath,o.layersCollection[t]))&&o.layersCollection[t].dataSource[s][p]||(Y.isNullOrUndefined(h)?0:h);n.setAttribute("stroke-width",(d/i).toString()),(-1<e.id.indexOf("_Point")||-1<e.id.indexOf("_MultiPoint"))&&n.setAttribute("r",(m/i).toString())}}function Pt(e,t,i,o){for(var n,a,l=0;l<e.childElementCount;l++)"path"===(a=e.childNodes[l]).tagName&&(n=o.layersCollection[t].navigationLineSettings[parseFloat(a.id.split("_NavigationIndex_")[1].split("_")[0])].width,a.setAttribute("stroke-width",(n/i).toString()))}function wt(e){for(var t=[],i=e.touches,o=0;o<i.length;o++)t.push({pageX:i[o].pageX,pageY:i[o].pageY});return t}function Tt(e,t){e=It(e[0],e[1]);return It(t[0],t[1])/e}function It(e,t){var i=e.pageX-t.pageX,e=e.pageY-t.pageY;return Math.sqrt(i*i+e*e)}function kt(e,t){var t=t.element.getBoundingClientRect(),i=t.top+document.defaultView.pageXOffset,o=t.left+document.defaultView.pageYOffset;return Array.prototype.slice.call(e).map(function(e){return{x:e.pageX-o,y:e.pageY-i}})}function Nt(e){return{x:e.map(function(e){return e.x}).reduce(Ft)/e.length,y:e.map(function(e){return e.y}).reduce(Ft)/e.length}}function Ft(e,t){return e+t}function Et(e,t,i,o,n,a,l){var r,s,d,p,h,m,c,u,g=l.previousPoint,y=l.previousScale,f=n-y,b=new T(0,0);n===y?e.setAttribute("transform","scale( "+n+" ) translate( "+o.x+" "+o.y+" )"):(h=o,d=(m=g).x===h.x?null:(h.y-m.y)/(h.x-m.x),h=g,p=null===(m=d)?h.x:h.y-m*h.x,c=o.x-g.x,u=o.y-g.y,zt(e,0,i,function(e){e.timeStamp>e.delay&&(r=(e.timeStamp-e.delay)/e.duration,s=y+r*f,b.x=g.x+r*c/(s/n),b.y=null==d?g.y+r*u:d*b.x+p,e.element.setAttribute("transform","scale( "+s+" ) translate( "+b.x+" "+b.y+" )"),l.translatePoint=b,l.scale=s,l.zoomModule.processTemplate(o.x,o.y,s,l))},function(){l.translatePoint=o,l.scale=n,e.setAttribute("transform","scale( "+n+" ) translate( "+o.x+" "+o.y+" )"),l.zoomModule.processTemplate(o.x,o.y,n,l)}))}function zt(t,e,i,o,n){function a(e){(e-=r=r||e)<i?(o.call(l,{element:t,delay:0,timeStamp:e,duration:i}),window.requestAnimationFrame(a)):(window.cancelAnimationFrame(s),n.call(l,{element:t}),-1<t.id.indexOf("Marker")&&(N(t.id.split("_Layer")[0]+"_Markers_Group").style.cssText="visibility:visible"))}var l=this,r=null,s=(i="Disable"===Y.animationMode?0:i,window.requestAnimationFrame(a))}function Bt(e,t,i,o,n){this.dataOptions=e,this.type=t||"GET",this.async=i||!0,this.contentType=o,this.sendData=n}var At;function Ut(e,t,i,o){var n,a=e.getAttribute("transform").split(" "),l=(2===a.length&&(a[2]=a[1].split(")")[0],a[1]=a[0].split("(")[1]),new T(parseInt(a[1],10),parseInt(a[2],10))),r=o.x-l.x,s=o.y-l.y,d=new T(0,0);zt(e,0,i,function(e){e.timeStamp>e.delay&&(n=(e.timeStamp-e.delay)/e.duration,d.x=l.x+n*r,d.y=l.y+n*s,e.element.setAttribute("transform","translate( "+d.x+" "+d.y+" )"))},function(){e.setAttribute("transform","translate( "+o.x+" "+o.y+" )")})}function jt(e,t){var i=Y.isNullOrUndefined(t.shouldZoomPreviousFactor)?null:t.shouldZoomPreviousFactor,o=Y.isNullOrUndefined(t.shouldZoomCurrentFactor)?null:t.shouldZoomCurrentFactor;Y.isNullOrUndefined(o)?!Y.isNullOrUndefined(i)&&Y.isNullOrUndefined(o)&&t.shouldZoomPreviousFactor!==e?t.shouldZoomCurrentFactor=e:t.shouldZoomPreviousFactor=e:(t.shouldZoomCurrentFactor=null,t.shouldZoomPreviousFactor=null)}function Zt(e,t,i,o,n,a,l,r){var s,d=l.zoomSettings.maxZoom,p=Math.sin(t*Math.PI/180),p=Math.log((1+p)/(1-p))/2,p=Math.max(Math.min(p,Math.PI),-Math.PI)/2,h=Math.sin(e*Math.PI/180),h=Math.log((1+h)/(1-h))/2,h=Math.max(Math.min(h,Math.PI),-Math.PI)/2,t=(l.zoomNotApplied&&!l.isTileMap&&(t=Math.abs((l.baseMapBounds.latitude.max-l.baseMapBounds.latitude.min)/(t-e)),e=Math.abs((l.baseMapBounds.longitude.max-l.baseMapBounds.longitude.min)/(o-i)),s=r?(t+e)/2:Math.min(t,e)),(p-h)/Math.PI),e=o-i,p=(e<0?360+e:e)/360,h=Math.log(a/256/t)/Math.LN2,o=Math.log(n/256/p)/Math.LN2,i=l.zoomNotApplied&&!l.isTileMap?s:r&&!l.isTileMap?(h+o)/2:Math.min(h,o),e=Math.min(i,d);return e=l.isTileMap||!l.zoomNotApplied?Math.floor(e):e,l.isTileMap||jt(e,l),e}function Dt(e){var t,e=Y.isNullOrUndefined(e.result)?e.actual:e.result;return Y.isNullOrUndefined(e.length)?Y.isNullOrUndefined(e.Items)||(t=e.Items):t=e,t}(t=At=At||{}).mapsTitleFont={size:"14px",fontWeight:null,color:"#424242",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},t.mapsSubTitleFont={size:"13px",fontWeight:null,color:"#424242",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},t.tooltipLabelFont={size:"12px",fontWeight:"Regular",color:null,fontStyle:"Regular",fontFamily:null},t.legendTitleFont={size:"12px",fontWeight:"Medium",color:null,fontStyle:"Medium",fontFamily:null},t.legendLabelFont={size:"13px",fontWeight:"Medium",color:null,fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},t.dataLabelFont={size:null,fontWeight:"Medium",color:"#000000",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"};Rt=function(e,t){return(Rt=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var Rt,Vt,t=function(e,t){function i(){this.constructor=e}Rt(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},i=function(e,t,i,o){var n,a=arguments.length,l=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;0<=r;r--)(n=e[r])&&(l=(a<3?n(l):3<a?n(t,i,l):n(t,i))||l);return 3<a&&l&&Object.defineProperty(t,i,l),l},Gt=(Vt=Y.ChildProperty,t(Ht,Vt),i([Y.Property("")],Ht.prototype,"content",void 0),i([Y.Property("0px")],Ht.prototype,"x",void 0),i([Y.Property("0px")],Ht.prototype,"y",void 0),i([Y.Property("None")],Ht.prototype,"verticalAlignment",void 0),i([Y.Property("None")],Ht.prototype,"horizontalAlignment",void 0),i([Y.Property("-1")],Ht.prototype,"zIndex",void 0),Ht);function Ht(){return null!==Vt&&Vt.apply(this,arguments)||this}Wt=Y.ChildProperty,t(qt,Wt),i([Y.Property("Start")],qt.prototype,"position",void 0),i([Y.Property("false")],qt.prototype,"showArrow",void 0),i([Y.Property(2)],qt.prototype,"size",void 0),i([Y.Property("black")],qt.prototype,"color",void 0),i([Y.Property(0)],qt.prototype,"offSet",void 0);var Wt,Xt=qt;function qt(){return null!==Wt&&Wt.apply(this,arguments)||this}Yt=Y.ChildProperty,t(Qt,Yt),i([Y.Property(null)],Qt.prototype,"size",void 0),i([Y.Property(null)],Qt.prototype,"color",void 0),i([Y.Property("Roboto, Noto, Sans-serif")],Qt.prototype,"fontFamily",void 0),i([Y.Property("Medium")],Qt.prototype,"fontWeight",void 0),i([Y.Property("Medium")],Qt.prototype,"fontStyle",void 0),i([Y.Property(1)],Qt.prototype,"opacity",void 0);var Yt,Jt=Qt;function Qt(){return null!==Yt&&Yt.apply(this,arguments)||this}Kt=Y.ChildProperty,t(o,Kt),i([Y.Property("transparent")],o.prototype,"fill",void 0),i([Y.Property(null)],o.prototype,"color",void 0),i([Y.Property(1)],o.prototype,"borderOpacity",void 0),i([Y.Property(1)],o.prototype,"borderWidth",void 0),i([Y.Property(null)],o.prototype,"borderColor",void 0),i([Y.Property(null)],o.prototype,"radius",void 0),i([Y.Property(null)],o.prototype,"selectionColor",void 0),i([Y.Property(null)],o.prototype,"highlightColor",void 0),i([Y.Property(5)],o.prototype,"padding",void 0),i([Y.Property(1)],o.prototype,"opacity",void 0),i([Y.Property(["ZoomIn","ZoomOut","Reset"])],o.prototype,"toolbarItems",void 0);var Kt,$t=o;function o(){return null!==Kt&&Kt.apply(this,arguments)||this}ei=Y.ChildProperty,t(n,ei),i([Y.Property(!0)],n.prototype,"visible",void 0),i([Y.Property("white")],n.prototype,"fill",void 0),i([Y.Property(1)],n.prototype,"borderOpacity",void 0),i([Y.Property(1)],n.prototype,"borderWidth",void 0),i([Y.Property("#707070")],n.prototype,"borderColor",void 0),i([Y.Property("black")],n.prototype,"fontColor",void 0),i([Y.Property("")],n.prototype,"fontFamily",void 0),i([Y.Property("")],n.prototype,"fontStyle",void 0),i([Y.Property("")],n.prototype,"fontWeight",void 0),i([Y.Property("")],n.prototype,"fontSize",void 0),i([Y.Property(1)],n.prototype,"fontOpacity",void 0);var ei,ti=n;function n(){return null!==ei&&ei.apply(this,arguments)||this}ii=Y.ChildProperty,t(ni,ii),i([Y.Property("transparent")],ni.prototype,"backgroundColor",void 0),i([Y.Property(1)],ni.prototype,"borderOpacity",void 0),i([Y.Property(1)],ni.prototype,"borderWidth",void 0),i([Y.Property("transparent")],ni.prototype,"borderColor",void 0),i([Y.Property("Far")],ni.prototype,"horizontalAlignment",void 0),i([Y.Property("Near")],ni.prototype,"verticalAlignment",void 0),i([Y.Property("Horizontal")],ni.prototype,"orientation",void 0),i([Y.Complex({},$t)],ni.prototype,"buttonSettings",void 0),i([Y.Complex({},ti)],ni.prototype,"tooltipSettings",void 0);var ii,oi=ni;function ni(){return null!==ii&&ii.apply(this,arguments)||this}ai=Y.ChildProperty,t(li,ai),i([Y.Property("")],li.prototype,"color",void 0),i([Y.Property(0)],li.prototype,"width",void 0),i([Y.Property(null)],li.prototype,"opacity",void 0);var ai,a=li;function li(){return null!==ai&&ai.apply(this,arguments)||this}ri=Y.ChildProperty,t(di,ri),i([Y.Property(null)],di.prototype,"latitude",void 0),i([Y.Property(null)],di.prototype,"longitude",void 0);var ri,si=di;function di(){return null!==ri&&ri.apply(this,arguments)||this}pi=Y.ChildProperty,t(mi,pi),i([Y.Property(!1)],mi.prototype,"visible",void 0),i([Y.Property("")],mi.prototype,"template",void 0),i([Y.Property("")],mi.prototype,"fill",void 0),i([Y.Complex({color:null,width:1},a)],mi.prototype,"border",void 0),i([Y.Complex({fontFamily:null,size:null,fontWeight:null},Jt)],mi.prototype,"textStyle",void 0),i([Y.Property(null)],mi.prototype,"format",void 0),i([Y.Property(null)],mi.prototype,"valuePath",void 0),i([Y.Property(2e3)],mi.prototype,"duration",void 0);var pi,hi=mi;function mi(){return null!==pi&&pi.apply(this,arguments)||this}ci=Y.ChildProperty,t(gi,ci),i([Y.Property(!1)],gi.prototype,"visible",void 0),i([Y.Property("")],gi.prototype,"fill",void 0),i([Y.Complex({color:null,width:1},a)],gi.prototype,"border",void 0),i([Y.Complex({fontFamily:null,size:null,fontWeight:null},Jt)],gi.prototype,"textStyle",void 0),i([Y.Property(2e3)],gi.prototype,"duration",void 0);var ci,ui=gi;function gi(){return null!==ci&&ci.apply(this,arguments)||this}yi=Y.ChildProperty,t(bi,yi),i([Y.Property(10)],bi.prototype,"left",void 0),i([Y.Property(10)],bi.prototype,"right",void 0),i([Y.Property(10)],bi.prototype,"top",void 0),i([Y.Property(10)],bi.prototype,"bottom",void 0);var yi,fi=bi;function bi(){return null!==yi&&yi.apply(this,arguments)||this}Si=Y.ChildProperty,t(xi,Si),i([Y.Property("#000000")],xi.prototype,"color",void 0),i([Y.Property(1)],xi.prototype,"width",void 0),i([Y.Property(1)],xi.prototype,"opacity",void 0);var Si,vi=xi;function xi(){return null!==Si&&Si.apply(this,arguments)||this}Oi=Y.ChildProperty,t(l,Oi),i([Y.Property(!1)],l.prototype,"allowClustering",void 0),i([Y.Property(!0)],l.prototype,"allowDeepClustering",void 0),i([Y.Complex({color:"transparent",width:1},a)],l.prototype,"border",void 0),i([Y.Property("#D2691E")],l.prototype,"fill",void 0),i([Y.Property(1)],l.prototype,"opacity",void 0),i([Y.Property("Rectangle")],l.prototype,"shape",void 0),i([Y.Property(12)],l.prototype,"width",void 0),i([Y.Property(12)],l.prototype,"height",void 0),i([Y.Property(new J(0,0))],l.prototype,"offset",void 0),i([Y.Property("")],l.prototype,"imageUrl",void 0),i([Y.Property("")],l.prototype,"dashArray",void 0),i([Y.Complex({},Jt)],l.prototype,"labelStyle",void 0),i([Y.Property(!1)],l.prototype,"allowClusterExpand",void 0),i([Y.Complex({},vi)],l.prototype,"connectorLineSettings",void 0);var Oi,Ci=l;function l(){return null!==Oi&&Oi.apply(this,arguments)||this}_i=Y.ChildProperty,t(Li,_i);var _i,Mi=Li;function Li(){return null!==_i&&_i.apply(this,arguments)||this}Pi=Y.ChildProperty,t(Ti,Pi),i([Y.Property(null)],Ti.prototype,"from",void 0),i([Y.Property(null)],Ti.prototype,"to",void 0),i([Y.Property(null)],Ti.prototype,"value",void 0),i([Y.Property(null)],Ti.prototype,"color",void 0),i([Y.Property(null)],Ti.prototype,"minOpacity",void 0),i([Y.Property(null)],Ti.prototype,"maxOpacity",void 0),i([Y.Property(null)],Ti.prototype,"label",void 0),i([Y.Property(!0)],Ti.prototype,"showLegend",void 0);var Pi,wi=Ti;function Ti(){return null!==Pi&&Pi.apply(this,arguments)||this}Ii=Y.ChildProperty,t(Ni,Ii),i([Y.Property(null)],Ni.prototype,"latitude",void 0),i([Y.Property(null)],Ni.prototype,"longitude",void 0);var Ii,ki=Ni;function Ni(){return null!==Ii&&Ii.apply(this,arguments)||this}Fi=Y.ChildProperty,t(zi,Fi),i([Y.Property(null)],zi.prototype,"shapePath",void 0),i([Y.Property(null)],zi.prototype,"shapeValue",void 0);var Fi,Ei=zi;function zi(){return null!==Fi&&Fi.apply(this,arguments)||this}Bi=Y.ChildProperty,t(Ui,Bi),i([Y.Property(!1)],Ui.prototype,"enable",void 0),i([Y.Property(null)],Ui.prototype,"fill",void 0),i([Y.Property(1)],Ui.prototype,"opacity",void 0),i([Y.Property(!1)],Ui.prototype,"enableMultiSelect",void 0),i([Y.Complex({color:"transparent",width:0},a)],Ui.prototype,"border",void 0);var Bi,Ai=Ui;function Ui(){return null!==Bi&&Bi.apply(this,arguments)||this}ji=Y.ChildProperty,t(Di,ji),i([Y.Property(null)],Di.prototype,"fill",void 0),i([Y.Property(!1)],Di.prototype,"enable",void 0),i([Y.Property(1)],Di.prototype,"opacity",void 0),i([Y.Complex({color:"transparent",width:0},a)],Di.prototype,"border",void 0);var ji,Zi=Di;function Di(){return null!==ji&&ji.apply(this,arguments)||this}Ri=Y.ChildProperty,t(Gi,Ri),i([Y.Property(1)],Gi.prototype,"borderWidth",void 0),i([Y.Property(1)],Gi.prototype,"borderOpacity",void 0),i([Y.Property(1)],Gi.prototype,"opacity",void 0),i([Y.Property("#FF471A")],Gi.prototype,"borderColor",void 0),i([Y.Property("#FF471A")],Gi.prototype,"fill",void 0),i([Y.Property([])],Gi.prototype,"points",void 0),i([Y.Property("")],Gi.prototype,"tooltipText",void 0),i([Y.Property("")],Gi.prototype,"tooltipTemplate",void 0);var Ri,Vi=Gi;function Gi(){return null!==Ri&&Ri.apply(this,arguments)||this}Hi=Y.ChildProperty,t(Xi,Hi),i([Y.Collection([],Vi)],Xi.prototype,"polygons",void 0),i([Y.Complex({},Ai)],Xi.prototype,"selectionSettings",void 0),i([Y.Complex({},Zi)],Xi.prototype,"highlightSettings",void 0),i([Y.Complex({},ui)],Xi.prototype,"tooltipSettings",void 0);var Hi,Wi=Xi;function Xi(){return null!==Hi&&Hi.apply(this,arguments)||this}qi=Y.ChildProperty,t(Ji,qi),i([Y.Property(!1)],Ji.prototype,"visible",void 0),i([Y.Property(1)],Ji.prototype,"width",void 0),i([Y.Property(null)],Ji.prototype,"longitude",void 0),i([Y.Property(null)],Ji.prototype,"latitude",void 0),i([Y.Property("")],Ji.prototype,"dashArray",void 0),i([Y.Property("black")],Ji.prototype,"color",void 0),i([Y.Property(0)],Ji.prototype,"angle",void 0),i([Y.Complex({showArrow:!1,position:"Start",size:5,color:"black"},Xt)],Ji.prototype,"arrowSettings",void 0),i([Y.Complex({},Ai)],Ji.prototype,"selectionSettings",void 0),i([Y.Complex({},Zi)],Ji.prototype,"highlightSettings",void 0);var qi,Yi=Ji;function Ji(){return null!==qi&&qi.apply(this,arguments)||this}Qi=Y.ChildProperty,t(r,Qi),i([Y.Complex({},a)],r.prototype,"border",void 0),i([Y.Property(!1)],r.prototype,"visible",void 0),i([Y.Property([])],r.prototype,"dataSource",void 0),i([Y.Property()],r.prototype,"query",void 0),i([Y.Property(1e3)],r.prototype,"animationDuration",void 0),i([Y.Property(0)],r.prototype,"animationDelay",void 0),i([Y.Property("")],r.prototype,"fill",void 0),i([Y.Property(10)],r.prototype,"minRadius",void 0),i([Y.Property(20)],r.prototype,"maxRadius",void 0),i([Y.Property(1)],r.prototype,"opacity",void 0),i([Y.Property(null)],r.prototype,"valuePath",void 0),i([Y.Property("Circle")],r.prototype,"bubbleType",void 0),i([Y.Property(null)],r.prototype,"colorValuePath",void 0),i([Y.Collection([],wi)],r.prototype,"colorMapping",void 0),i([Y.Complex({},hi)],r.prototype,"tooltipSettings",void 0),i([Y.Complex({},Ai)],r.prototype,"selectionSettings",void 0),i([Y.Complex({},Zi)],r.prototype,"highlightSettings",void 0);var Qi,Ki=r;function r(){return null!==Qi&&Qi.apply(this,arguments)||this}$i=Y.ChildProperty,t(to,$i),i([Y.Property("")],to.prototype,"text",void 0),i([Y.Property("")],to.prototype,"description",void 0);var $i,eo=to;function to(){return null!==$i&&$i.apply(this,arguments)||this}t(no,io=eo),i([Y.Complex({size:null,fontWeight:null,fontFamily:null},Jt)],no.prototype,"textStyle",void 0),i([Y.Property("Center")],no.prototype,"alignment",void 0);var io,oo=no;function no(){return null!==io&&io.apply(this,arguments)||this}t(ro,ao=eo),i([Y.Complex({size:null,fontWeight:null,fontFamily:null},Jt)],ro.prototype,"textStyle",void 0),i([Y.Property("Center")],ro.prototype,"alignment",void 0),i([Y.Complex({},oo)],ro.prototype,"subtitleSettings",void 0);var ao,lo=ro;function ro(){return null!==ao&&ao.apply(this,arguments)||this}so=Y.ChildProperty,t(d,so),i([Y.Property(!1)],d.prototype,"enable",void 0),i([Y.Property(!0)],d.prototype,"enablePanning",void 0),i([Y.Property(!0)],d.prototype,"enableSelectionZooming",void 0),i([Y.Property(!0)],d.prototype,"mouseWheelZoom",void 0),i([Y.Property(!1)],d.prototype,"doubleClickZoom",void 0),i([Y.Property(!0)],d.prototype,"pinchZooming",void 0),i([Y.Property(!1)],d.prototype,"zoomOnClick",void 0),i([Y.Property(1)],d.prototype,"zoomFactor",void 0),i([Y.Property(10)],d.prototype,"maxZoom",void 0),i([Y.Property(1)],d.prototype,"minZoom",void 0),i([Y.Property(!1)],d.prototype,"shouldZoomInitially",void 0),i([Y.Property(!0)],d.prototype,"resetToInitial",void 0),i([Y.Complex({},oi)],d.prototype,"toolbarSettings",void 0);var so,po=d;function d(){return null!==so&&so.apply(this,arguments)||this}ho=Y.ChildProperty,t(co,ho),i([Y.Property(!1)],co.prototype,"enable",void 0),i([Y.Property(!0)],co.prototype,"applyShapeSettings",void 0),i([Y.Property(1)],co.prototype,"opacity",void 0),i([Y.Property("")],co.prototype,"fill",void 0),i([Y.Complex({color:"",width:0},a)],co.prototype,"border",void 0);var ho,mo=co;function co(){return null!==ho&&ho.apply(this,arguments)||this}uo=Y.ChildProperty,t(p,uo),i([Y.Property(!1)],p.prototype,"useMarkerShape",void 0),i([Y.Property(!1)],p.prototype,"toggleVisibility",void 0),i([Y.Property(!1)],p.prototype,"visible",void 0),i([Y.Property("transparent")],p.prototype,"background",void 0),i([Y.Property("Layers")],p.prototype,"type",void 0),i([Y.Property(!1)],p.prototype,"invertedPointer",void 0),i([Y.Property("After")],p.prototype,"labelPosition",void 0),i([Y.Property("None")],p.prototype,"labelDisplayMode",void 0),i([Y.Property("Circle")],p.prototype,"shape",void 0),i([Y.Property("")],p.prototype,"width",void 0),i([Y.Property("")],p.prototype,"height",void 0),i([Y.Complex({fontFamily:null,fontWeight:null},Jt)],p.prototype,"textStyle",void 0),i([Y.Property(15)],p.prototype,"shapeWidth",void 0),i([Y.Property(15)],p.prototype,"shapeHeight",void 0),i([Y.Property(10)],p.prototype,"shapePadding",void 0),i([Y.Complex({color:null,width:0},a)],p.prototype,"border",void 0),i([Y.Complex({color:"#000000",width:0},a)],p.prototype,"shapeBorder",void 0),i([Y.Complex({},eo)],p.prototype,"title",void 0),i([Y.Complex({size:null,color:At.legendTitleFont.color,fontStyle:At.legendTitleFont.fontStyle,fontWeight:null,fontFamily:null},Jt)],p.prototype,"titleStyle",void 0),i([Y.Property("Bottom")],p.prototype,"position",void 0),i([Y.Property("Center")],p.prototype,"alignment",void 0),i([Y.Property("None")],p.prototype,"orientation",void 0),i([Y.Property({x:0,y:0})],p.prototype,"location",void 0),i([Y.Property(null)],p.prototype,"fill",void 0),i([Y.Property(1)],p.prototype,"opacity",void 0),i([Y.Property("Default")],p.prototype,"mode",void 0),i([Y.Property(null)],p.prototype,"showLegendPath",void 0),i([Y.Property(null)],p.prototype,"valuePath",void 0),i([Y.Property(!1)],p.prototype,"removeDuplicateLegend",void 0),i([Y.Complex({},mo)],p.prototype,"toggleLegendSettings",void 0);var uo,go=p;function p(){return null!==uo&&uo.apply(this,arguments)||this}yo=Y.ChildProperty,t(h,yo),i([Y.Property(!1)],h.prototype,"visible",void 0),i([Y.Complex({width:0,color:"transparent"},a)],h.prototype,"border",void 0),i([Y.Property("black")],h.prototype,"fill",void 0),i([Y.Property(1)],h.prototype,"opacity",void 0),i([Y.Property(5)],h.prototype,"rx",void 0),i([Y.Property(5)],h.prototype,"ry",void 0),i([Y.Complex({fontWeight:null},Jt)],h.prototype,"textStyle",void 0),i([Y.Property("")],h.prototype,"labelPath",void 0),i([Y.Property("None")],h.prototype,"smartLabelMode",void 0),i([Y.Property("None")],h.prototype,"intersectionAction",void 0),i([Y.Property("")],h.prototype,"template",void 0),i([Y.Property(0)],h.prototype,"animationDuration",void 0);var yo,fo=h;function h(){return null!==yo&&yo.apply(this,arguments)||this}bo=Y.ChildProperty,t(m,bo),i([Y.Property(null)],m.prototype,"fill",void 0),i([Y.Property([])],m.prototype,"palette",void 0),i([Y.Property(5)],m.prototype,"circleRadius",void 0),i([Y.Complex({width:null,color:null},a)],m.prototype,"border",void 0),i([Y.Property("")],m.prototype,"dashArray",void 0),i([Y.Property(1)],m.prototype,"opacity",void 0),i([Y.Property(null)],m.prototype,"colorValuePath",void 0),i([Y.Property(null)],m.prototype,"borderColorValuePath",void 0),i([Y.Property(null)],m.prototype,"borderWidthValuePath",void 0),i([Y.Property(null)],m.prototype,"valuePath",void 0),i([Y.Collection([],wi)],m.prototype,"colorMapping",void 0),i([Y.Property(!1)],m.prototype,"autofill",void 0);var bo,So=m;function m(){return null!==bo&&bo.apply(this,arguments)||this}vo=Y.ChildProperty,t(c,vo),i([Y.Complex({color:"transparent",width:1},a)],c.prototype,"border",void 0),i([Y.Property(null)],c.prototype,"dashArray",void 0),i([Y.Property(!1)],c.prototype,"visible",void 0),i([Y.Property(!1)],c.prototype,"enableDrag",void 0),i([Y.Property("#FF471A")],c.prototype,"fill",void 0),i([Y.Property(10)],c.prototype,"height",void 0),i([Y.Property(10)],c.prototype,"width",void 0),i([Y.Property(1)],c.prototype,"opacity",void 0),i([Y.Property(null)],c.prototype,"colorValuePath",void 0),i([Y.Property(null)],c.prototype,"shapeValuePath",void 0),i([Y.Property(null)],c.prototype,"imageUrlValuePath",void 0),i([Y.Property("Balloon")],c.prototype,"shape",void 0),i([Y.Property("")],c.prototype,"legendText",void 0),i([Y.Property(new J(0,0))],c.prototype,"offset",void 0),i([Y.Property("")],c.prototype,"imageUrl",void 0),i([Y.Property(null)],c.prototype,"template",void 0),i([Y.Property([])],c.prototype,"dataSource",void 0),i([Y.Property()],c.prototype,"query",void 0),i([Y.Complex({},hi)],c.prototype,"tooltipSettings",void 0),i([Y.Property(1e3)],c.prototype,"animationDuration",void 0),i([Y.Property(0)],c.prototype,"animationDelay",void 0),i([Y.Complex({},Ai)],c.prototype,"selectionSettings",void 0),i([Y.Complex({},Zi)],c.prototype,"highlightSettings",void 0),i([Y.Property(null)],c.prototype,"latitudeValuePath",void 0),i([Y.Property(null)],c.prototype,"longitudeValuePath",void 0),i([Y.Collection([],ki)],c.prototype,"initialMarkerSelection",void 0);var vo,xo=c;function c(){return null!==vo&&vo.apply(this,arguments)||this}t(_o,Oo=xo);var Oo,Co=_o;function _o(e,t,i,o){return Oo.call(this,e,t,i,o)||this}Mo=Y.ChildProperty,t(u,Mo),i([Y.Property(null)],u.prototype,"shapeData",void 0),i([Y.Property()],u.prototype,"query",void 0),i([Y.Complex({},So)],u.prototype,"shapeSettings",void 0),i([Y.Property([])],u.prototype,"dataSource",void 0),i([Y.Property("Layer")],u.prototype,"type",void 0),i([Y.Property("Geographic")],u.prototype,"geometryType",void 0),i([Y.Property("")],u.prototype,"urlTemplate",void 0),i([Y.Property(!0)],u.prototype,"visible",void 0),i([Y.Property("name")],u.prototype,"shapeDataPath",void 0),i([Y.Property("name")],u.prototype,"shapePropertyPath",void 0),i([Y.Property(0)],u.prototype,"animationDuration",void 0),i([Y.Collection([],Co)],u.prototype,"markerSettings",void 0),i([Y.Complex({},Ci)],u.prototype,"markerClusterSettings",void 0),i([Y.Complex({},fo)],u.prototype,"dataLabelSettings",void 0),i([Y.Collection([],Ki)],u.prototype,"bubbleSettings",void 0),i([Y.Collection([],Yi)],u.prototype,"navigationLineSettings",void 0),i([Y.Complex({},Wi)],u.prototype,"polygonSettings",void 0),i([Y.Complex({},hi)],u.prototype,"tooltipSettings",void 0),i([Y.Complex({},Ai)],u.prototype,"selectionSettings",void 0),i([Y.Complex({},Zi)],u.prototype,"highlightSettings",void 0),i([Y.Complex({},mo)],u.prototype,"toggleLegendSettings",void 0),i([Y.Collection([],Ei)],u.prototype,"initialShapeSelection",void 0);var Mo,Lo=u;function u(){var e=null!==Mo&&Mo.apply(this,arguments)||this;return e.isBaseLayer=!1,e}var Po,wo=function(e,t,i,o,n,a,l){void 0===i&&(i=256),void 0===o&&(o=256),void 0===n&&(n=0),void 0===a&&(a=0),void 0===l&&(l=null),this.x=e,this.y=t,this.top=n,this.left=a,this.height=i,this.width=o,this.src=l},t=(Po=Y.ChildProperty,t(To,Po),i([Y.Property(null)],To.prototype,"background",void 0),i([Y.Complex({color:"transparent",width:1},a)],To.prototype,"border",void 0),To);function To(){return null!==Po&&Po.apply(this,arguments)||this}var Io="click",ko="onclick",No="rightClick",Fo="doubleClick",Eo="resize",zo="tooltipRender",Bo="shapeSelected",Ao="shapeHighlight",Uo="layerRendering",jo="shapeRendering",Zo="markerRendering",Do="markerClusterRendering",Ro="markerClick",Vo="markerDragStart",Go="markerClusterClick",Ho="markerMouseMove",Wo="markerClusterMouseMove",Xo="dataLabelRendering",qo="bubbleRendering",Yo="bubbleClick",Jo="bubbleMouseMove",Qo="animationComplete",Ko="legendRendering",$o="annotationRendering",en="itemSelection",tn="itemHighlight",on="beforePrint",nn="pan",an=(ln.prototype.getBingMap=function(e,t,i,o,n,a){for(var l="",r=Math.min(this.maps.tileZoomLevel,parseInt(this.maxZoom,10));0<r;r--){var s=0,d=1<<r-1;0!=(e.x&d)&&s++,0!=(e.y&d)&&(s+=2),l=l+""+s}return Y.isNullOrUndefined(a)?"":(a=a[Math.min(parseInt(l.substr(l.length-1,1),10),a.length)],(n=n.replace("{quadkey}",l).replace("{subdomain}",a))+"&mkt="+o+"&ur=IN&Key="+t)},ln.prototype.destroy=function(){this.maps=null,this.subDomains=[]},ln);function ln(e){this.maps=e}sn.prototype.getShapeColorMapping=function(e,t,i){var o=e.colorValuePath||e.valuePath,t=!Y.isNullOrUndefined(o)&&-1<o.indexOf(".")?k(t,o):t[o],o=Number(t),e=this.getColorByValue(e.colorMapping,o,t);return Y.isNullOrUndefined(e)?i:e},sn.prototype.getColorByValue=function(e,t,i){if(isNaN(t)&&Y.isNullOrUndefined(i))return null;for(var o,n="",a=0,l=e;a<l.length;a++){var r=l[a];(!Y.isNullOrUndefined(r.from)&&!Y.isNullOrUndefined(r.to)&&t>=r.from&&t<=r.to||r.value===i)&&(n="[object Array]"===Object.prototype.toString.call(r.color)?Y.isNullOrUndefined(r.value)?this.getColor(r,t):r.color[0]:r.color),(t>=r.from&&t<=r.to||r.value===i)&&!Y.isNullOrUndefined(r.minOpacity)&&!Y.isNullOrUndefined(r.maxOpacity)&&n&&(o=this.deSaturationColor(r,n,t,i)),(""===n||Y.isNullOrUndefined(n))&&Y.isNullOrUndefined(r.from)&&Y.isNullOrUndefined(r.to)&&Y.isNullOrUndefined(r.minOpacity)&&Y.isNullOrUndefined(r.maxOpacity)&&Y.isNullOrUndefined(r.value)&&(n="[object Array]"===Object.prototype.toString.call(r.color)?r.color[0]:r.color)}return{fill:n||(e.length?null:i),opacity:o}},sn.prototype.deSaturationColor=function(e,t,i,o){var n=1;return n=i>=e.from&&i<=e.to||e.value===o?(isNaN(i)?e.from/(e.to-e.from):(i-e.from)/(e.to-e.from))*(e.maxOpacity-e.minOpacity)+e.minOpacity:n},sn.prototype.rgbToHex=function(e,t,i){return"#"+this.componentToHex(e)+this.componentToHex(t)+this.componentToHex(i)},sn.prototype.componentToHex=function(e){e=e.toString(16);return 1===e.length?"0"+e:e},sn.prototype.getColor=function(e,t){return Number(t)===e.from?e.color[0]:Number(t)===e.to?e.color[e.color.length-1]:(t=this.getGradientColor(Number(t),e),this.rgbToHex(t.r,t.g,t.b))},sn.prototype.getGradientColor=function(e,t){var i=t.from,o=t.to,n=0,a=o-i,n=(e-i)/a;if(t.color.length<=2)r="#"===t.color[0].charAt(0)?t.color[0]:this._colorNameToHex(t.color[0]),s="#"===t.color[t.color.length-1].charAt(0)?t.color[t.color.length-1]:this._colorNameToHex(t.color[t.color.length-1]);else{for(var l,r="#"===t.color[0].charAt(0)?t.color[0]:this._colorNameToHex(t.color[0]),s="#"===t.color[t.color.length-1].charAt(0)?t.color[t.color.length-1]:this._colorNameToHex(t.color[t.color.length-1]),d=a/(t.color.length-1),p=t.color.length-1,h=[],m=1;m<p;m++)l={b:i+m*d,color:t.color[m]},h.push(l);for(var c=0;c<h.length;c++)i<=e&&e<=h[c].b&&0===c?(s="#"===h[c].color.charAt(0)?h[c].color:this._colorNameToHex(h[c].color),n=e<h[c].b?1-Math.abs((e-h[c].b)/d):(e-h[c].b)/d):h[c].b<=e&&e<=o&&c===h.length-1&&(r="#"===h[c].color.charAt(0)?h[c].color:this._colorNameToHex(h[c].color),n=e<h[c].b?1-Math.abs((e-h[c].b)/d):(e-h[c].b)/d),c!==h.length-1&&c<h.length&&h[c].b<=e&&e<=h[c+1].b&&(r="#"===h[c].color.charAt(0)?h[c].color:this._colorNameToHex(h[c].color),s="#"===h[c+1].color.charAt(0)?h[c+1].color:this._colorNameToHex(h[c+1].color),n=Math.abs(e-h[c+1].b)/d)}return this.getPercentageColor(n,r,s)},sn.prototype.getPercentageColor=function(e,t,i){var i=i.split("#")[1],t=t.split("#")[1],o=this.getPercentage(e,parseInt(t.substr(0,2),16),parseInt(i.substr(0,2),16)),n=this.getPercentage(e,parseInt(t.substr(2,2),16),parseInt(i.substr(2,2),16)),e=this.getPercentage(e,parseInt(t.substr(4,2),16),parseInt(i.substr(4,2),16));return new de(o,n,e)},sn.prototype.getPercentage=function(e,t,i){return Math.round(t+(i-t)*e)},sn.prototype._colorNameToHex=function(e){var t={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",orchid:"#da70d6",papayawhip:"#ffefd5",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};return"[object Array]"!==Object.prototype.toString.call(e)&&void 0!==t[e.toLowerCase()]?t[e.toLowerCase()]:e};var rn=sn;function sn(e){}g.prototype.measureLayerPanel=function(){var e,i=this,t=this.mapObject.layersCollection,o=this.mapObject.mapAreaRect,n=N(this.mapObject.element.id+"_Secondary_Element");this.mapObject.isTileMap&&n&&(this.tileSvgObject=this.mapObject.renderer.createSvg({id:this.mapObject.element.id+"_Tile_SVG",width:o.width,height:o.height}),(e=Y.createElement("div",{id:this.mapObject.element.id+"_Tile_SVG_Parent"})).style.cssText="position: absolute; height: "+o.height+"px; width: "+o.width+"px;",e.appendChild(this.tileSvgObject),n.appendChild(e)),this.layerGroup=this.mapObject.renderer.createGroup({id:this.mapObject.element.id+"_Layer_Collections","clip-path":"url(#"+this.mapObject.element.id+"_MapArea_ClipRect)"}),this.clipRectElement=this.mapObject.renderer.drawClipPath(new Q(this.mapObject.element.id+"_MapArea_ClipRect","transparent",{width:1,color:"Gray"},1,{x:this.mapObject.isTileMap?0:o.x,y:this.mapObject.isTileMap?0:o.y,width:o.width,height:o.height})),this.layerGroup.appendChild(this.clipRectElement),this.mapObject.baseMapBounds=null,this.mapObject.baseMapRectBounds=null,this.mapObject.baseSize=null,Array.prototype.forEach.call(t,function(e,t){i.currentLayer=e,i.processLayers(e,t)}),Y.isNullOrUndefined(this.mapObject.legendModule)||"Float"!==this.mapObject.legendSettings.position||(this.mapObject.isTileMap?this.layerGroup:this.mapObject.svgObject).appendChild(this.mapObject.legendModule.legendGroup)},g.prototype.renderTileLayer=function(e,t,i,o){e.currentFactor=e.calculateFactor(t),e.mapObject.defaultState=!(1!==e.mapObject.zoomSettings.zoomFactor&&!Y.isNullOrUndefined(e.mapObject.tileZoomLevel)&&1!==e.mapObject.tileZoomLevel),Y.isNullOrUndefined(e.mapObject.previousCenterLatitude)&&Y.isNullOrUndefined(e.mapObject.previousCenterLongitude)&&!e.mapObject.isZoomByPosition?(e.mapObject.previousCenterLatitude=e.mapObject.centerPosition.latitude,e.mapObject.previousCenterLongitude=e.mapObject.centerPosition.longitude):e.mapObject.previousCenterLatitude!==e.mapObject.centerPosition.latitude&&e.mapObject.previousCenterLongitude!==e.mapObject.centerPosition.longitude||e.mapObject.isZoomByPosition?(e.mapObject.centerPositionChanged=!0,e.mapObject.previousCenterLatitude=e.mapObject.centerPosition.latitude,e.mapObject.previousCenterLongitude=e.mapObject.centerPosition.longitude):e.mapObject.centerPositionChanged=!1;var n,t=new J(e.mapObject.centerPosition.longitude,e.mapObject.centerPosition.latitude),a=t,t=(this.mapObject.isTileMap&&e.mapObject.markerModule&&e.mapObject.zoomSettings.enable&&(e.mapObject.markerModule.calculateZoomCenterPositionAndFactor(this.mapObject.layersCollection),Y.isNullOrUndefined(this.mapObject.markerCenterLatitude)||Y.isNullOrUndefined(this.mapObject.markerCenterLongitude)||e.mapObject.isZoomByPosition||(a=new J(e.mapObject.markerCenterLongitude,e.mapObject.markerCenterLatitude))),t=!e.mapObject.zoomSettings.shouldZoomInitially&&e.mapObject.centerPosition.longitude&&e.mapObject.centerPosition.latitude&&!e.mapObject.zoomPersistence&&e.mapObject.defaultState?new J(e.mapObject.centerPosition.longitude,e.mapObject.centerPosition.latitude):e.mapObject.zoomSettings.shouldZoomInitially&&e.mapObject.markerZoomedState&&!e.mapObject.zoomPersistence&&!Y.isNullOrUndefined(e.mapObject.markerZoomCenterPoint)?new J(e.mapObject.markerZoomCenterPoint.longitude,e.mapObject.markerZoomCenterPoint.latitude):{x:null,y:null},e.mapObject.zoomSettings.shouldZoomInitially&&!e.mapObject.isZoomByPosition?Y.isNullOrUndefined(e.mapObject.markerZoomFactor)?1:e.mapObject.markerZoomFactor:e.mapObject.zoomSettings.zoomFactor),t=e.mapObject.enablePersistence?Y.isNullOrUndefined(e.mapObject.mapScaleValue)?Y.isNullOrUndefined(e.mapObject.markerZoomFactor)?e.mapObject.zoomSettings.zoomFactor:e.mapObject.markerZoomFactor:e.mapObject.mapScaleValue:t;t=e.mapObject.zoomSettings.enable?t:e.mapObject.zoomSettings.zoomFactor,e.mapObject.defaultState=1===(t=0<t?t:1),!e.mapObject.markerZoomedState&&e.mapObject.zoomSettings.shouldZoomInitially&&1===e.mapObject.zoomSettings.zoomFactor&&(e.mapObject.defaultState=!0),Y.isNullOrUndefined(e.mapObject.tileZoomLevel)?(e.mapObject.tileZoomLevel=t,e.mapObject.previousZoomFactor=t):this.mapObject.isReset&&1===e.mapObject.tileZoomLevel&&!e.mapObject.zoomSettings.shouldZoomInitially?(n=e.mapObject.tileZoomLevel,e.mapObject.tileZoomLevel=n):1!==e.mapObject.zoomSettings.zoomFactor||e.mapObject.zoomSettings.shouldZoomInitially?(e.mapObject.previousZoomFactor=e.mapObject.tileZoomLevel,e.mapObject.tileZoomLevel=e.mapObject.defaultState&&e.mapObject.zoomSettings.enable?e.mapObject.tileZoomLevel:e.mapObject.zoomSettings.shouldZoomInitially||e.mapObject.centerPositionChanged?t:e.mapObject.previousZoomFactor!==e.mapObject.zoomSettings.zoomFactor?e.mapObject.zoomSettings.zoomFactor:e.mapObject.tileZoomLevel,e.mapObject.tileZoomLevel=1===t&&0===e.mapObject.zoomSettings.zoomFactor?t:e.mapObject.tileZoomLevel,!Y.isNullOrUndefined(e.mapObject.tileTranslatePoint)&&(e.mapObject.markerZoomFactor!==e.mapObject.mapScaleValue||Y.isNullOrUndefined(e.mapObject.markerZoomFactor)&&Y.isNullOrUndefined(e.mapObject.mapScaleValue))&&(e.mapObject.zoomSettings.zoomFactor<=1||e.mapObject.previousZoomFactor!==e.mapObject.zoomSettings.zoomFactor)&&(e.mapObject.tileTranslatePoint.x=0,e.mapObject.tileTranslatePoint.y=0)):e.mapObject.defaultState&&(e.mapObject.previousZoomFactor=e.mapObject.tileZoomLevel,e.mapObject.tileZoomLevel=t,Y.isNullOrUndefined(e.mapObject.tileTranslatePoint)||(e.mapObject.tileTranslatePoint.x=0,e.mapObject.tileTranslatePoint.y=0)),t<=1&&!Y.isNullOrUndefined(e.mapObject.height)&&!e.mapObject.zoomSettings.shouldZoomInitially&&e.mapObject.tileZoomLevel===e.mapObject.tileZoomScale&&this.mapObject.initialCheck&<(this.mapObject),Y.isNullOrUndefined(e.mapObject.centerLatOfGivenLocation)||Y.isNullOrUndefined(e.mapObject.centerLongOfGivenLocation)||!e.mapObject.zoomNotApplied||(Y.isNullOrUndefined(a)||(a.y=e.mapObject.centerLatOfGivenLocation,a.x=e.mapObject.centerLongOfGivenLocation),e.mapObject.tileZoomLevel=e.mapObject.mapScaleValue=e.mapObject.scaleOfGivenLocation),e.mapObject.tileTranslatePoint=e.panTileMap(e.mapObject.availableSize.width,e.mapObject.availableSize.height,a),this.mapObject.zoomSettings.resetToInitial&&this.mapObject.initialCheck&&!Y.isNullOrUndefined(e.mapObject.height)&&512<this.mapObject.availableSize.height&&(this.mapObject.applyZoomReset=!0,this.mapObject.initialZoomLevel=Math.floor(this.mapObject.availableSize.height/512),n=256*Math.pow(2,this.mapObject.initialZoomLevel),Y.isNullOrUndefined(this.mapObject.initialTileTranslate)||(this.mapObject.initialTileTranslate.x=this.mapObject.availableSize.width/2-n/2,this.mapObject.initialTileTranslate.y=this.mapObject.availableSize.height/2-n/2+20)),e.generateTiles(e.mapObject.tileZoomLevel,e.mapObject.tileTranslatePoint,null,o),Y.isNullOrUndefined(e.mapObject.previousZoomFactor)||e.mapObject.previousZoomFactor===e.mapObject.zoomSettings.zoomFactor||(e.mapObject.previousZoomFactor=e.mapObject.zoomSettings.zoomFactor),e.mapObject.polygonModule&&(t=e.mapObject.polygonModule.polygonRender(this.mapObject,i,e.mapObject.tileZoomLevel),Y.isNullOrUndefined(t)||e.layerObject.appendChild(t)),e.mapObject.navigationLineModule&&(a=e.mapObject.navigationLineModule.renderNavigation(e.currentLayer,e.mapObject.tileZoomLevel,i),Y.isNullOrUndefined(a)||e.layerObject.appendChild(a)),e.mapObject.markerModule&&e.mapObject.markerModule.markerRender(this.mapObject,e.layerObject,i,e.mapObject.tileZoomLevel,null),e.translateLayerElements(e.layerObject),e.layerGroup.appendChild(e.layerObject)},g.prototype.processLayers=function(o,n){var a=this;if(this.layerObject=this.mapObject.renderer.createGroup({id:this.mapObject.element.id+"_LayerIndex_"+n}),!this.mapObject.enablePersistence){var e=this.mapObject.getModuleName()+this.mapObject.element.id;if(-1===navigator.userAgent.indexOf("Edge")){var t=void 0;try{t=window.localStorage}catch(e){t=null}!Y.isNullOrUndefined(t)&&window.localStorage.getItem(e)&&window.localStorage.removeItem(e)}}var l={cancel:!1,name:Uo,index:n,layer:o,maps:this.mapObject,visible:o.visible};this.mapObject.trigger("layerRendering",l,function(e){var t,i;!l.cancel&&l.visible&&(Y.isNullOrUndefined(o.shapeData)&&!Y.isNullOrUndefined(o.urlTemplate)&&""!==o.urlTemplate?!Y.isNullOrUndefined(o.urlTemplate)&&-1<o.urlTemplate.indexOf("quadkey")?(t=new an(a.mapObject),a.bingMapCalculation(o,n,a,t)):a.renderTileLayer(a,o,n):Y.isNullOrUndefined(o.shapeData)||Y.isNullOrUndefined(o.shapeData.geometries)&&Y.isNullOrUndefined(o.shapeData.features)||(t=!Y.isNullOrUndefined(o.shapeData.geometries)&&0<o.shapeData.geometries.length?o.shapeData.geometries:o.shapeData.features,o.layerData=[],i=o.shapeData.bbox,!Y.isNullOrUndefined(i)&&o.isBaseLayer?a.mapObject.baseMapBounds=new ae({min:i[0][1],max:i[1][1]},{min:i[0][0],max:i[1][0]}):Y.isNullOrUndefined(a.mapObject.baseMapBounds)&&!et(t)&&a.calculateRectBounds(t),a.calculatePathCollection(n,t)))}),this.mapObject.isTileMap?this.tileSvgObject&&(this.tileSvgObject.appendChild(this.layerGroup),this.mapObject.baseMapBounds=null):this.mapObject.svgObject.appendChild(this.layerGroup)},g.prototype.bingMapCalculation=function(e,t,i,o){o.imageUrl=e.urlTemplate,o.subDomains=["t0","t1","t2","t3"],o.maxZoom="21",i.mapObject.bingMap=o,i.renderTileLayer(i,e,t,o),this.mapObject.arrangeTemplate(),this.mapObject.zoomModule&&this.mapObject.previousScale!==this.mapObject.scale&&this.mapObject.zoomModule.applyTransform(this.mapObject,!0)},g.prototype.bubbleCalculation=function(e,t){if(null!=e.dataSource&&null!=e)for(var i=e.dataSource,o=0;o<i.length;o++){var n=!Y.isNullOrUndefined(e.valuePath)&&-1<e.valuePath.indexOf(".")?Number(k(e.dataSource[o],e.valuePath)):parseFloat(e.dataSource[o][e.valuePath]);isNaN(n)||(0!==o?n>t.max?t.max=n:n<t.min&&(t.min=n):t.max=t.min=n)}},g.prototype.calculatePathCollection=function(f,b){var S=this,v=(this.groupElements=[],et(b)||(this.currentFactor=this.calculateFactor(this.currentLayer)),this.rectBounds=null,this.currentLayer.shapeSettings),x=(Array.prototype.forEach.call(b,function(e){var t,i,o;Y.isNullOrUndefined(e.geometry)&&Y.isNullOrUndefined(e.coordinates)||(t=(Y.isNullOrUndefined(e.geometry)?e:e.geometry).type,i=(Y.isNullOrUndefined(e.geometry)?e:e.geometry).coordinates,o=e.geometry,e=e.properties,S.generatePoints(t,i,o,e))}),this.currentLayer.rectBounds=this.rectBounds,Y.isNullOrUndefined(this.mapObject.baseMapRectBounds)&&this.currentLayer.isBaseLayer&&(this.mapObject.baseMapRectBounds=this.rectBounds),!Y.isNullOrUndefined(v.palette)&&1<v.palette.length?v.palette:function(e){var t;switch(e.toLowerCase()){case"tailwind":t=["#0369A1","#14B8A6","#15803D","#334155","#5A61F6","#65A30D","#8B5CF6","#9333EA","#F59E0B","#F97316"];break;case"tailwinddark":t=["#10B981","#22D3EE","#2DD4BF","#4ADE80","#8B5CF6","#E879F9","#F472B6","#F87171","#F97316","#FCD34D"];break;case"fluent":t=["#614570","#4C6FB1","#CC6952","#3F579A","#4EA09B","#6E7A89","#D4515C","#E6AF5D","#639751","#9D4D69"];break;case"fluentdark":t=["#8AB113","#2A72D5","#43B786","#584EC6","#E85F9C","#6E7A89","#EA6266","#EBA844","#26BC7A","#BC4870"];break;case"material3":t=["#6200EE","#E77A16","#82C100","#7107DC","#05BB3D","#D21020","#FAD200","#0085FF","#9204EA","#08EE9B"];break;case"material3dark":t=["#4EAAFF","#FA4EAB","#FFF500","#17EA58","#38FFE7","#FF9E45","#B3F32F","#B93CE4","#FC5664","#9B55FF"];break;case"fluent2":t=["#6200EE","#09AF74","#0076E5","#CB3587","#E7910F","#0364DE","#66CD15","#F3A93C","#107C10","#C19C00"];break;case"fluent2dark":case"fluent2highcontrast":t=["#9BB449","#2A72D5","#43B786","#3F579A","#584EC6","#E85F9C","#6E7A89","#EA6266","#0B6A0B","#C19C00"];break;case"bootstrap5":case"bootstrap5dark":t=["#6610F2","#6f42C1","#D63384","#DC3545","#FD7E14","#FFC107","#198754","#0DCAF0"];break;default:t=["#B5E485","#7BC1E8","#DF819C","#EC9B79","#78D0D3","#D6D572","#9178E3","#A1E5B4","#87A4B4","#E4C16C"]}return t}(this.mapObject.theme)),O=Y.createElement("div",{id:this.mapObject.element.id+"_LayerIndex_"+f+"_Label_Template_Group",className:this.mapObject.element.id+"_template"});if(O.style.cssText="pointer-events: none; overflow: hidden; position: absolute;top:"+this.mapObject.mapAreaRect.y+"px;left:"+this.mapObject.mapAreaRect.x+"px;height:"+this.mapObject.mapAreaRect.height+"px;width:"+this.mapObject.mapAreaRect.width+"px;",0!==this.currentLayer.layerData.length)for(var e=function(r){function e(o){var n,a="Polygon"===(a=Y.isNullOrUndefined(m._isMultiPolygon)?(Y.isNullOrUndefined(m.type)?m[0]:m).type:"MultiPolygon")||"MultiPolygon"===a?"Polygon":a;if(o.cancel?(o.fill=u,o.border.color=v.border.color||S.mapObject.themeStyle.shapeBorderColor,o.border.width=v.border.width):(o.fill="#A6A6A6"===o.fill?o.shape.fill||S.mapObject.themeStyle.shapeFill:o.fill,o.border.color=("transparent"===o.border.color?o.shape:o).border.color,o.border.width=(0===o.border.width?o.shape:o).border.width,Y.isNullOrUndefined(v.borderColorValuePath)&&(h.color=o.border.color),Y.isNullOrUndefined(v.borderWidthValuePath)&&(h.width=o.border.width)),o.border.opacity=Y.isNullOrUndefined(o.border.opacity)?y:o.border.opacity,S.groupElements.length<1)p=S.mapObject.renderer.createGroup({id:S.mapObject.element.id+"_LayerIndex_"+f+"_"+a+"_Group",transform:""}),S.groupElements.push(p);else for(var e=0;e<S.groupElements.length;e++){var t=S.groupElements[e];if(-1<t.id.indexOf(a)){p=t;break}if(e>=S.groupElements.length-1){p=S.mapObject.renderer.createGroup({id:S.mapObject.element.id+"_LayerIndex_"+f+"_"+a+"_Group"}),S.groupElements.push(p);break}}switch(a){case"Polygon":m._isMultiPolygon?c=S.generateMultiPolygonPath(m):(c+="M"+m[0].point.x+" "+m[0].point.y,m.map(function(e){c+=" L "+e.point.x+" "+e.point.y})),3<(c+=" z ").length&&(s=new A(g,o.fill,o.border.width,o.border.color,y,o.border.opacity,v.dashArray,c),n=S.mapObject.renderer.drawPath(s));break;case"LineString":m.map(function(e,t){c+=0===t?"M "+e.point.x+" "+e.point.y:"L"+e.point.x+" , "+e.point.y+" "}),3<c.length&&(s=new A(g,"transparent",Y.isNullOrUndefined(o.border.width)?1:o.border.width,Y.isNullOrUndefined(o.fill)?o.border.color:o.fill,y,o.border.opacity,v.dashArray,c),n=S.mapObject.renderer.drawPath(s));break;case"MultiLineString":m.map(function(e){e.map(function(e,t){c+=0===t?"M "+e.point.x+" "+e.point.y:"L"+e.point.x+" , "+e.point.y+" "})}),3<c.length&&(s=new A(g,"transparent",Y.isNullOrUndefined(o.border.width)?1:o.border.width,Y.isNullOrUndefined(o.fill)?o.border.color:o.fill,y,o.border.opacity,v.dashArray,c),n=S.mapObject.renderer.drawPath(s));break;case"Point":var i=m.point,l="SubLayer"!==S.mapObject.layers[f].type?v.circleRadius:v.circleRadius/(S.mapObject.isTileMap?S.mapObject.scale:S.currentFactor);d=new me(g,o.fill,o.border,y,i.x,i.y,l,v.dashArray),n=S.mapObject.renderer.drawCircle(d);break;case"MultiPoint":m.map(function(e,t){var e=e.point,i="SubLayer"!==S.mapObject.layers[f].type?v.circleRadius:v.circleRadius/(S.mapObject.isTileMap?S.mapObject.scale:S.currentFactor);d=new me(g+"_multiLine_"+t,o.fill,o.border,y,e.x,e.y,i,v.dashArray),n=S.mapObject.renderer.drawCircle(d),S.pathAttributeCalculate(p,n,a,m)});break;case"Path":c=m.point,s=new A(g,o.fill,o.border.width,o.border.color,y,o.border.opacity,v.dashArray,c),n=S.mapObject.renderer.drawPath(s)}Y.isNullOrUndefined(n)||"MultiPoint"===a||S.pathAttributeCalculate(p,n,a,m),r===S.currentLayer.layerData.length-1&&S.layerFeatures(f,x,b,O)}var s,d,p,t=void 0,h={color:v.border.color||o.mapObject.themeStyle.shapeBorderColor,width:v.border.width,opacity:v.border.opacity},m=o.currentLayer.layerData[r],c="",u=v.autofill?x[r%x.length]:v.fill||o.mapObject.themeStyle.shapeFill,g=(null===v.colorValuePath||Y.isNullOrUndefined(m.property)||(null!==(t=Ye(o.currentLayer.dataSource,m.property,o.currentLayer.shapeDataPath,o.currentLayer.shapePropertyPath,o.currentLayer))&&0===v.colorMapping.length?u=-1<o.currentLayer.shapeSettings.colorValuePath.indexOf(".")?k(o.currentLayer.dataSource[t],v.colorValuePath):o.currentLayer.dataSource[t][v.colorValuePath]:m.property[v.colorValuePath]&&0===o.currentLayer.dataSource.length&&0===v.colorMapping.length&&(u=-1<o.currentLayer.shapeSettings.colorValuePath.indexOf(".")?k(m.property,v.colorValuePath):m.property[v.colorValuePath]),u=Y.isNullOrUndefined(u)?v.fill||o.mapObject.themeStyle.shapeFill:u),o.mapObject.element.id+"_LayerIndex_"+f+"_shapeIndex_"+r+"_dataIndex_"+t),i=o.getShapeColorMapping(o.currentLayer,m.property,u),u="[object Object]"!==Object.prototype.toString.call(i)||Y.isNullOrUndefined(i.fill)?u:i.fill,y=((o.currentLayer.shapeSettings.borderColorValuePath||o.currentLayer.shapeSettings.borderWidthValuePath)&&null!==(t=Ye(o.currentLayer.dataSource,m.property,o.currentLayer.shapeDataPath,o.currentLayer.shapePropertyPath,o.currentLayer))&&(o.currentLayer.dataSource[t][v.borderColorValuePath]&&(h.color=o.currentLayer.dataSource[t][v.borderColorValuePath]),o.currentLayer.dataSource[t][v.borderWidthValuePath])&&(h.width=o.currentLayer.dataSource[t][v.borderWidthValuePath]),("[object Object]"!==Object.prototype.toString.call(i)||Y.isNullOrUndefined(i.opacity)?v:i).opacity),i={cancel:!1,name:jo,index:r,data:o.currentLayer.dataSource?o.currentLayer.dataSource[t]:null,maps:o.mapObject,shape:v,fill:u,border:{width:h.width,color:h.color,opacity:h.opacity}};e.bind(o),o.mapObject.trigger("shapeRendering",i,e)},o=this,t=0;t<this.currentLayer.layerData.length;t++)e(t);else this.layerFeatures(f,x,b,O)},g.prototype.pathAttributeCalculate=function(e,t,i,o){for(var n,a="[object Array]"===Object.prototype.toString.call(this.currentLayer.shapePropertyPath)?this.currentLayer.shapePropertyPath:[this.currentLayer.shapePropertyPath],l=0;l<a.length;l++)if(!Y.isNullOrUndefined(o.property)){n=a[l];break}t.setAttribute("aria-label",Y.isNullOrUndefined(o.property)?"":o.property[n]),this.currentLayer.selectionSettings.enable||this.currentLayer.highlightSettings.enable?(t.tabIndex=this.mapObject.tabIndex,t.setAttribute("role","button"),t.style.cursor=this.currentLayer.highlightSettings.enable&&!this.currentLayer.selectionSettings.enable?"default":"pointer"):t.setAttribute("role","region"),"LineString"!==i&&"MultiLineString"!==i||(t.style.cssText="outline:none"),Re(this.mapObject.selectedElementId,this.mapObject.shapeSelectionClass,t,"ShapeselectionMapStyle"),this.mapObject.legendSettings.toggleLegendSettings.enable&&"Layers"===this.mapObject.legendSettings.type&&Ve(this.mapObject.toggledElementId,t,this.mapObject.legendSettings.toggleLegendSettings.applyShapeSettings?this.currentLayer.shapeSettings:this.mapObject.legendSettings.toggleLegendSettings),e.appendChild(t)},g.prototype.layerFeatures=function(n,a,e,i){var l,r=this;if(this.mapObject.polygonModule&&this.groupElements.push(this.mapObject.polygonModule.polygonRender(this.mapObject,n,this.mapObject.isTileMap?Math.floor(this.currentFactor):this.currentFactor)),this.currentLayer.bubbleSettings.length&&this.mapObject.bubbleModule)for(var s,t=this.currentLayer.bubbleSettings.length,d=this,o=0;o<t;o++)!function(i){s=d.currentLayer.bubbleSettings[i],l=d.mapObject.renderer.createGroup({id:d.mapObject.element.id+"_LayerIndex_"+n+"_bubble_Group_"+i});var o={min:0,max:0},e=(d.bubbleCalculation(s,o),s.dataSource);d.mapObject.bubbleModule.bubbleCollection=[],!Y.isNullOrUndefined(e)&&0<e.length&&(e.map(function(e,t){r.renderBubble(r.currentLayer,e,a[t%a.length],o,i,t,l,n,s)}),d.groupElements.push(l))}(o);this.mapObject.markerModule&&!this.mapObject.isTileMap&&this.mapObject.zoomSettings.enable&&this.mapObject.markerModule.calculateZoomCenterPositionAndFactor(this.mapObject.layersCollection);var p,h=this.mapObject.renderer.createGroup({id:this.mapObject.element.id+"_LayerIndex_"+n+"_dataLableIndex_Group"});h.style.pointerEvents="none",this.mapObject.dataLabelModule&&this.currentLayer.dataLabelSettings.visible&&(p=[],Array.prototype.forEach.call(e,function(e,t){r.renderLabel(r.currentLayer,n,e,h,t,i,p)}),this.groupElements.push(h)),this.mapObject.navigationLineModule&&this.groupElements.push(this.mapObject.navigationLineModule.renderNavigation(this.currentLayer,this.currentFactor,n)),Y.isNullOrUndefined(this.groupElements)||Y.isNullOrUndefined(this.layerObject)||this.groupElements.map(function(e){Y.isNullOrUndefined(e)||r.layerObject.appendChild(e)}),this.mapObject.markerModule&&this.mapObject.markerModule.markerRender(this.mapObject,this.layerObject,n,this.mapObject.isTileMap?Math.floor(this.currentFactor):this.currentFactor,null),this.translateLayerElements(this.layerObject),this.layerGroup.appendChild(this.layerObject)},g.prototype.renderLabel=function(e,t,i,o,n,a,l){this.mapObject.dataLabelModule.renderLabel(e,t,i,e.layerData,o,a,n,l)},g.prototype.generateMultiPolygonPath=function(e){for(var t="",i=0;i<e.length;i++)t+="M"+e[i][0].point.x+" "+e[i][0].point.y,e[i].map(function(e){t+=" L "+e.point.x+" "+e.point.y});return t},g.prototype.renderBubble=function(e,t,i,o,n,a,l,r,s){if(Y.isNullOrUndefined(this.mapObject.bubbleModule)||!s.visible)return null;i=s.fill||i,this.mapObject.bubbleModule.id=this.mapObject.element.id+"_LayerIndex_"+r+"_BubbleIndex_"+n+"_dataIndex_"+a,this.mapObject.bubbleModule.renderBubble(s,t,i,o,n,a,r,e,l,this.mapObject.bubbleModule.id)},g.prototype.getShapeColorMapping=function(e,t,i){var o;return i=i||e.shapeSettings.fill,0===e.shapeSettings.colorMapping.length&&Y.isNullOrUndefined(e.dataSource)||(t=Ye(e.dataSource,t,e.shapeDataPath,e.shapePropertyPath),o=new rn(this.mapObject),Y.isNullOrUndefined(e.dataSource))||Y.isNullOrUndefined(e.dataSource[t])?i:o.getShapeColorMapping(e.shapeSettings,e.dataSource[t],i)},g.prototype.generatePoints=function(e,t,i,o){var n=this,a=[];switch(e.toLowerCase()){case"polygon":0<(a=this.calculatePolygonBox(t[0])).length&&(a.property=o,a.type=e,a._isMultiPolygon=!1,this.currentLayer.layerData.push(a));break;case"multipolygon":for(var l=[],r=0;r<t.length;r++)for(var s=0;s<t[r].length;s++)0<(a=this.calculatePolygonBox(t[r][s])).length&&l.push(a);l.property=o,l.type=e,l._isMultiPolygon=!0,this.currentLayer.layerData.push(l);break;case"linestring":var d=Y.isNullOrUndefined(this.currentLayer.shapeSettings.border.width)?1:"string"==typeof this.currentLayer.shapeSettings.border.width?parseInt(this.currentLayer.shapeSettings.border.width,10):this.currentLayer.shapeSettings.border.width;t.map(function(e){c=e[1],u=e[0];e=B(c,u,n.currentFactor,n.currentLayer,n.mapObject);n.calculateBox(e,d),a.push({point:e,lat:c,lng:u})}),a.property=o,a.type=e,this.currentLayer.layerData.push(a);break;case"multilinestring":var p=Y.isNullOrUndefined(this.currentLayer.shapeSettings.border.width)?1:"string"==typeof this.currentLayer.shapeSettings.border.width?parseInt(this.currentLayer.shapeSettings.border.width,10):this.currentLayer.shapeSettings.border.width,h=[];t.map(function(e){a=[],e.map(function(e){c=e[1],u=e[0];e=B(c,u,n.currentFactor,n.currentLayer,n.mapObject);n.calculateBox(e,p),a.push({point:e,lat:c,lng:u})}),h.push(a)}),h.property=o,h.type=e,this.currentLayer.layerData.push(h);break;case"point":var m=(Y.isNullOrUndefined(this.currentLayer.shapeSettings.border.width)?1:"string"==typeof this.currentLayer.shapeSettings.border.width?parseInt(this.currentLayer.shapeSettings.border.width,10):this.currentLayer.shapeSettings.border.width)+2*this.currentLayer.shapeSettings.circleRadius,c=t[1],u=t[0],g=B(c,u,this.currentFactor,this.currentLayer,this.mapObject);this.calculateBox(g,m),this.currentLayer.layerData.push({point:g,type:e,lat:c,lng:u,property:o});break;case"multipoint":var y=(Y.isNullOrUndefined(this.currentLayer.shapeSettings.border.width)?1:"string"==typeof this.currentLayer.shapeSettings.border.width?parseInt(this.currentLayer.shapeSettings.border.width,10):this.currentLayer.shapeSettings.border.width)+2*this.currentLayer.shapeSettings.circleRadius,a=[];t.map(function(e){c=e[1],u=e[0];e=B(c,u,n.currentFactor,n.currentLayer,n.mapObject);n.calculateBox(e,y),a.push({point:e,lat:c,lng:u})}),a.property=o,a.type=e,this.currentLayer.layerData.push(a);break;case"path":this.currentLayer.layerData.push({point:i.d,type:e,property:o})}},g.prototype.calculateBox=function(e,t){Y.isNullOrUndefined(this.rectBounds)?this.rectBounds={min:{x:e.x-t,y:e.y-t},max:{x:e.x+t,y:e.y+t}}:(this.rectBounds.min.x=Math.min(this.rectBounds.min.x,e.x-t),this.rectBounds.min.y=Math.min(this.rectBounds.min.y,e.y-t),this.rectBounds.max.x=Math.max(this.rectBounds.max.x,e.x+t),this.rectBounds.max.y=Math.max(this.rectBounds.max.y,e.y+t))},g.prototype.calculateFactor=function(e){var t,i,o=1,n=this.mapObject.baseMapBounds,a=new H(this.mapObject.mapAreaRect.width,this.mapObject.mapAreaRect.height-5);return n?(i=B(n.latitude.min,n.longitude.min,null,e,this.mapObject),t=(n=B(n.latitude.max,n.longitude.max,null,e,this.mapObject)).y-i.y,i=n.x-i.x,0!==t&&0!==i||(i=a.width/2,t=a.height)):t=i=500,e=t<a.height?parseFloat(Math.abs(100*Number(a.height/Number(t.toString()+"e+1"))).toString().split(".")[0])/10:a.height/t,o=i<a.width?parseFloat(Math.abs(100*Number(a.width/Number(i.toString()+"e+1"))).toString().split(".")[0])/10:a.width/i,Math.min(o,e)},g.prototype.translateLayerElements=function(e){if(this.mapObject.translateType="layer",Y.isNullOrUndefined(this.mapObject.baseMapRectBounds)){if(this.mapObject.isTileMap&&!Y.isNullOrUndefined(this.mapObject.scale))for(var t=0;t<e.childElementCount;t++)-1<(s=e.childNodes[t]).id.indexOf("_Markers_Group")||-1<s.id.indexOf("_bubble_Group")||-1<s.id.indexOf("_dataLableIndex_Group")||-1<s.id.indexOf("_line_Group")||-1===s.id.indexOf("_Polygons_Group")&&(r="scale( "+this.mapObject.scale+" ) translate( "+this.mapObject.translatePoint.x+" "+this.mapObject.translatePoint.y+" ) ",s.setAttribute("transform",r))}else{var i="Disable"===Y.animationMode?0:0===this.currentLayer.animationDuration&&"Enable"===Y.animationMode?1e3:this.currentLayer.animationDuration,o=0!==i||Y.isNullOrUndefined(this.mapObject.zoomModule),n=(this.mapObject.baseTranslatePoint=this.mapObject.zoomTranslatePoint,void 0),n=(1<this.mapObject.zoomSettings.zoomFactor&&!Y.isNullOrUndefined(this.mapObject.zoomModule)?at:nt)(this.mapObject,this.currentLayer,o),a=this.mapObject.previousScale=n.scale,l=this.mapObject.previousPoint=n.location;this.mapObject.baseTranslatePoint=this.mapObject.translatePoint=l,this.mapObject.baseScale=this.mapObject.scale=a;for(var r,s,d=0;d<e.childElementCount;d++)-1<(s=e.childNodes[d]).id.indexOf("_Markers_Group")||-1<s.id.indexOf("_bubble_Group")||-1<s.id.indexOf("_dataLableIndex_Group")||(r="scale( "+a+" ) translate( "+l.x+" "+l.y+" ) ",s.setAttribute("transform",r),0<i&&!Y.isNullOrUndefined(this.mapObject.zoomModule)&&(n=(1<this.mapObject.zoomSettings.zoomFactor?at:nt)(this.mapObject,this.currentLayer),this.mapObject.scale=n.scale,this.mapObject.zoomTranslatePoint=this.mapObject.translatePoint=n.location))}},g.prototype.calculateRectBounds=function(e){var o=this;Array.prototype.forEach.call(e,function(e){if(!Y.isNullOrUndefined(e.geometry)||!Y.isNullOrUndefined(e.coordinates)){var t=(Y.isNullOrUndefined(e.geometry)?e:e.geometry).type,i=(Y.isNullOrUndefined(e.geometry)?e:e.geometry).coordinates;switch(t.toLowerCase()){case"polygon":o.calculateRectBox(i[0]);break;case"multipolygon":i.map(function(e){o.calculateRectBox(e[0])});break;case"multilinestring":i.map(function(e){e.map(function(e,t){o.calculateRectBox(e,"multilinestring",0===t)})});break;case"linestring":i.map(function(e,t){o.calculateRectBox(e,"linestring",0===t)});break;case"point":o.calculateRectBox(i,"point");break;case"multipoint":i.map(function(e,t){o.calculateRectBox(e,"multipoint",0===t)})}}})},g.prototype.calculatePolygonBox=function(e){var o=this,n=[],a=this.mapObject.baseMapBounds;return e.map(function(e){var t,i=e[1],e=e[0];e>=a.longitude.min&&e<=a.longitude.max&&i>=a.latitude.min&&i<=a.latitude.max&&(t=B(i,e,o.currentFactor,o.currentLayer,o.mapObject),Y.isNullOrUndefined(o.rectBounds)?o.rectBounds={min:{x:t.x,y:t.y},max:{x:t.x,y:t.y}}:(o.rectBounds.min.x=Math.min(o.rectBounds.min.x,t.x),o.rectBounds.min.y=Math.min(o.rectBounds.min.y,t.y),o.rectBounds.max.x=Math.max(o.rectBounds.max.x,t.x),o.rectBounds.max.y=Math.max(o.rectBounds.max.y,t.y)),n.push({point:t,lat:i,lng:e}))}),n},g.prototype.calculateRectBox=function(e,t,i){var o=this;"linestring"!==t&&"multilinestring"!==t&&"point"!==t&&"multipoint"!==t?Array.prototype.forEach.call(e,function(e){Y.isNullOrUndefined(o.mapObject.baseMapBounds)?o.mapObject.baseMapBounds=new ae({min:e[1],max:e[1]},{min:e[0],max:e[0]}):(o.mapObject.baseMapBounds.latitude.min=Math.min(o.mapObject.baseMapBounds.latitude.min,e[1]),o.mapObject.baseMapBounds.latitude.max=Math.max(o.mapObject.baseMapBounds.latitude.max,e[1]),o.mapObject.baseMapBounds.longitude.min=Math.min(o.mapObject.baseMapBounds.longitude.min,e[0]),o.mapObject.baseMapBounds.longitude.max=Math.max(o.mapObject.baseMapBounds.longitude.max,e[0]))}):(i||"point"===t)&&Y.isNullOrUndefined(this.mapObject.baseMapBounds)?this.mapObject.baseMapBounds=new ae({min:e[1],max:e[1]},{min:e[0],max:e[0]}):(this.mapObject.baseMapBounds.latitude.min=Math.min(this.mapObject.baseMapBounds.latitude.min,e[1]),this.mapObject.baseMapBounds.latitude.max=Math.max(this.mapObject.baseMapBounds.latitude.max,e[1]),this.mapObject.baseMapBounds.longitude.min=Math.min(this.mapObject.baseMapBounds.longitude.min,e[0]),this.mapObject.baseMapBounds.longitude.max=Math.max(this.mapObject.baseMapBounds.longitude.max,e[0]))},g.prototype.generateTiles=function(e,t,i,o,n){var a,l=this.mapObject.locale,r=this.mapObject.availableSize,s=(this.tiles=[],c=a=Math.pow(2,e),0),d=0,p=(t.x+256*c<r.width&&(s=0<t.x?Math.ceil(t.x/256):0,d=t.x+256*c<r.width?Math.ceil((r.width-(t.x+256*c))/256):0),c+=s+d,"Pan"===i?(c=this.horizontalPanXCount>=c?this.horizontalPanXCount:c,this.horizontalPan=!1):(this.horizontalPanXCount=c,this.horizontalPan=!0),this.mapObject.layers[this.mapObject.baseLayerIndex]),h=(this.urlTemplate=p.urlTemplate,Math.min(a,(-t.y+r.height)/256+1)),m=Math.min(c,(-t.x+r.width+256*d)/256+1),c=-(t.x+256*s+256)/256,u=-(t.y+256)/256;o=o||this.bing||this.mapObject.bingMap;for(var g=Math.round(c);g<Math.round(m);g++)for(var y=Math.round(u);y<Math.round(h);y++){var f,b=256*g+t.x,S=256*y+t.y;-256<b&&b<=r.width&&-256<S&&S<r.height&&0<=y&&((f=new wo((g<0?g%a+a:g)%a,y)).left=Math.round(b),f.top=Math.round(S),o&&!Y.isNullOrUndefined(p.urlTemplate)&&""!==p.urlTemplate&&-1<p.urlTemplate.indexOf("quadkey")?f.src=o.getBingMap(f,"","",l,o.imageUrl,o.subDomains):(o=null,f.src=this.urlTemplate.replace("level",e.toString()).replace("tileX",f.x.toString()).replace("tileY",f.y.toString())),this.tiles.push(f))}Y.isNullOrUndefined(i)||(1<i.indexOf("wheel")?(this.animateToZoomX=this.mapObject.availableSize.width/2-n.x-10,this.animateToZoomY=-n.y):(this.animateToZoomX=-10,this.animateToZoomY=10-(this.mapObject.availableSize.height/2+11.5)));for(var v=Y.extend([],this.tiles,[],!0),x=0,O=this.mapObject.layers;x<O.length;x++){var C=O[x];if("SubLayer"===C.type&&C.visible&&(Y.isNullOrUndefined(C.shapeData)&&!Y.isNullOrUndefined(C.urlTemplate)&&""!==C.urlTemplate))for(var _=0,M=v;_<M.length;_++){var L=M[_],P=Y.extend({},L,{},!0);C.urlTemplate.indexOf("quadkey")?(o=new an(this.mapObject),P.src=o.getBingMap(P,"","",l,o.imageUrl,o.subDomains)):P.src=C.urlTemplate.replace("level",e.toString()).replace("tileX",L.x.toString()).replace("tileY",L.y.toString()),this.tiles.push(P)}}(this.mapObject.previousScale!==this.mapObject.scale||this.mapObject.isReset||this.mapObject.isZoomByPosition||this.mapObject.zoomNotApplied)&&this.arrangeTiles(i,this.animateToZoomX,this.animateToZoomY)},g.prototype.arrangeTiles=function(p,e,t){var h=this,m=document.getElementById(this.mapObject.element.id+"_tile_parent"),c=document.getElementById(this.mapObject.element.id+"_tiles"),e=Y.isNullOrUndefined(p)||"Pan"===p||(this.tileAnimation(p,e,t),"Disable"===Y.animationMode)?0:0===this.mapObject.layersCollection[0].animationDuration&&"Enable"===Y.animationMode?1e3:this.mapObject.layersCollection[0].animationDuration;setTimeout(function(){var e;m&&(m.style.zIndex="1"),c&&(c.style.zIndex="0"),!document.getElementById(h.mapObject.element.id+"_animated_tiles")&&m?(e=Y.createElement("div",{id:h.mapObject.element.id+"_animated_tiles"}),m.appendChild(e)):"Pan"!==p&&c&&m?(c.appendChild(m.children[0]),h.mapObject.isAddLayer||Y.isNullOrUndefined(document.getElementById(h.mapObject.element.id+"_animated_tiles"))||(document.getElementById(h.mapObject.element.id+"_animated_tiles").id=h.mapObject.element.id+"_animated_tiles_old"),e=Y.createElement("div",{id:h.mapObject.element.id+"_animated_tiles"}),m.appendChild(e)):e=m?m.children[0]:null;for(var t=0;t<h.tiles.length;t++){var i,o,n=h.tiles[t],a=null,l=h.mapObject.element.id;"Pan"===p?(o=document.getElementById(l+"_tile_"+t),i=!1,a=Y.isNullOrUndefined(o)?(i=!0,o=Y.createElement("div",{id:l+"_tile_"+t}),Y.createElement("img")):(o.style.removeProperty("display"),o.children[0]),!i&&a&&a.src!==n.src&&(a.src=n.src),o.style.position="absolute",o.style.left=n.left+"px",o.style.top=n.top+"px",o.style.height=n.height+"px",o.style.width=n.width+"px",i&&(a.setAttribute("height","256px"),a.setAttribute("width","256px"),a.setAttribute("src",n.src),a.setAttribute("alt",h.mapObject.getLocalizedLabel("ImageNotFound")),a.style.setProperty("user-select","none"),o.appendChild(a),e.appendChild(o))):((a=Y.createElement("img")).setAttribute("height","256px"),a.setAttribute("width","256px"),a.setAttribute("src",n.src),a.style.setProperty("user-select","none"),a.setAttribute("alt",h.mapObject.getLocalizedLabel("ImageNotFound")),(o=Y.createElement("div",{id:l+"_tile_"+t})).style.position="absolute",o.style.left=n.left+"px",o.style.top=n.top+"px",o.style.height=n.height+"px",o.style.width=n.width+"px",o.appendChild(a),e&&e.appendChild(o)),t===h.tiles.length-1&&document.getElementById(h.mapObject.element.id+"_animated_tiles_old")&&P(h.mapObject.element.id+"_animated_tiles_old")}if(!Y.isNullOrUndefined(h.mapObject.currentTiles))for(var r=h.tiles.length;r<e.childElementCount;r++){for(var s=!1,d=0;d<h.mapObject.currentTiles.childElementCount;d++)s||h.mapObject.currentTiles.children[d].id!==e.children[r].id||(s=!0);s?e.children[r].style.display="none":e.removeChild(e.children[r])}},e)},g.prototype.tileAnimation=function(e,t,i){var o=document.getElementById(this.mapObject.element.id+"_tile_parent"),n=document.getElementById(this.mapObject.element.id+"_animated_tiles"),a=document.getElementById(this.mapObject.element.id+"_tiles"),l="2";if(0===e.indexOf("ZoomOut")||"Reset"===e){for(a.style.zIndex="1",o.style.zIndex="0";1<=a.childElementCount;)a.removeChild(a.children[0]);t=0,i=document.getElementById(this.mapObject.element.id+"_tile_parent").getClientRects()[0].height/4,l=0===e.indexOf("ZoomOut")?"0.5":"0.2"}Y.isNullOrUndefined(n)||(n.style.transition="Disable"===Y.animationMode?"0ms":0===this.mapObject.layersCollection[0].animationDuration&&"Enable"===Y.animationMode?"1000ms":this.mapObject.layersCollection[0].animationDuration+"ms",n.style.transform="translate("+t+"px, "+i+"px) scale("+l+")")},g.prototype.panTileMap=function(e,t,i){this.mapObject.tileZoomLevel<=this.mapObject.tileZoomScale&&this.mapObject.initialCheck&&(this.mapObject.tileZoomLevel=this.mapObject.tileZoomScale);var o=this.mapObject.tileZoomLevel,n=256*Math.pow(2,o),a=e/2-n/2,l=t/2-n/2,r=R(i,o,{x:a,y:l},this.isMapCoordinates),s=this.mapObject.zoomNotApplied?0:20;return a-=r.x-e/2,l=l-(r.y-t/2)+s,this.mapObject.scale=Math.pow(2,o-1),(Y.isNullOrUndefined(this.mapObject.tileTranslatePoint)||0===this.mapObject.tileTranslatePoint.y&&0===this.mapObject.tileTranslatePoint.x||Y.isNullOrUndefined(this.mapObject.previousTileWidth)||Y.isNullOrUndefined(this.mapObject.previousTileHeight))&&(this.mapObject.previousTileWidth=e,this.mapObject.previousTileHeight=t),Y.isNullOrUndefined(this.mapObject.tileTranslatePoint)||!Y.isNullOrUndefined(i.x)||1!==this.mapObject.zoomSettings.zoomFactor&&this.mapObject.zoomSettings.zoomFactor===o&&this.mapObject.defaultState||e===this.mapObject.previousTileWidth&&t===this.mapObject.previousTileHeight||(r=a-(this.mapObject.previousTileWidth/2-n/2),i=l-(this.mapObject.previousTileHeight/2-n/2+s),this.mapObject.tileTranslatePoint.x=this.mapObject.tileTranslatePoint.x+r,this.mapObject.tileTranslatePoint.y=this.mapObject.tileTranslatePoint.y+i),Y.isNullOrUndefined(this.mapObject.tileTranslatePoint)||this.mapObject.zoomNotApplied||(0===this.mapObject.tileTranslatePoint.x||this.mapObject.tileTranslatePoint.x===a||this.mapObject.centerPositionChanged||(a=this.mapObject.tileTranslatePoint.x),0===this.mapObject.tileTranslatePoint.y)||this.mapObject.tileTranslatePoint.y===l||this.mapObject.centerPositionChanged||(l=this.mapObject.tileTranslatePoint.y),this.mapObject.translatePoint=new J((a-.01*this.mapObject.zoomSettings.zoomFactor)/this.mapObject.scale,(l-.01*this.mapObject.zoomSettings.zoomFactor)/this.mapObject.scale),this.mapObject.previousTileWidth=e,this.mapObject.previousTileHeight=t,new J(a,l)},g.prototype.destroy=function(){this.mapObject=null,this.groupElements=[],this.layerObject=null,this.currentLayer=null,this.rectBounds=null,this.tiles=[],this.clipRectElement=null,this.tileSvgObject=null,this.ajaxModule=null,this.ajaxResponse=[],this.layerGroup=null,Y.isNullOrUndefined(this.bing)||this.bing.destroy(),this.bing=null};var dn=g;function g(e){this.isMapCoordinates=!0,this.horizontalPan=!1,this.horizontalPanXCount=0,this.mapObject=e,this.ajaxModule=new Y.Fetch,this.ajaxResponse=[]}hn.prototype.renderAnnotationElements=function(){var i=this,e=this.map.element.id+"_Secondary_Element",o=Y.createElement("div",{id:this.map.element.id+"_Annotations_Group"});o.style.position="absolute",o.style.top="0px",o.style.left="0px",this.map.annotations.map(function(e,t){null!==e.content&&i.createAnnotationTemplate(o,e,t)}),0<o.childElementCount&&!Y.isNullOrUndefined(N(e))&&N(e).appendChild(o),this.map.renderReactTemplates()},hn.prototype.createAnnotationTemplate=function(e,t,o){var n,a,l=this,i=this.map,r=i.availableSize,s=Y.createElement("div",{id:i.element.id+"_Annotation_"+o}),d=(s.style.cssText="position: absolute; z-index:"+t.zIndex+";",{cancel:!1,name:$o,content:t.content,annotation:t}),p=(this.map.trigger($o,d,function(e){if(!d.cancel)if((n=dt(d.content,l.map))&&n(l.map,l.map,d.content,l.map.element.id+"_ContentTemplate_"+o).length)for(var t=(a=Array.prototype.slice.call(n(l.map,l.map,d.content,l.map.element.id+"_ContentTemplate_"+o))).length,i=0;i<t;i++)s.appendChild(a[i]);else s.appendChild(Y.createElement("div",{innerHTML:d.content}))}),Mt(s.cloneNode(!0),i.element)),h=i.element.getBoundingClientRect(),m=i.svgObject.getBoundingClientRect(),c=Math.abs(m.left-h.left),u=Math.abs(m.top-h.top),i=Y.isNullOrUndefined(t.x)?"0%":t.x,h=Y.isNullOrUndefined(t.y)?"0%":t.y,g=-1<i.indexOf("%")?r.width/100*parseFloat(i):parseFloat(i),y=-1<h.indexOf("%")?r.height/100*parseFloat(h):parseFloat(h);switch(c="None"===t.horizontalAlignment?c+g:c,u="None"===t.verticalAlignment?u+y:u,t.verticalAlignment){case"Near":u+=y;break;case"Center":u=u+y+(m.height/2-p.height/2);break;case"Far":u=u+m.height+y-p.height}switch(t.horizontalAlignment){case"Near":c+=g;break;case"Center":c=c+g+(m.width/2-p.width/2);break;case"Far":c=c+m.width+g-p.width}s.style.left=c+"px",s.style.top=u+"px",e.appendChild(s)},hn.prototype.getModuleName=function(){return"Annotations"},hn.prototype.destroy=function(){this.map=null};var pn=hn;function hn(e){this.map=e}mn=function(e,t){return(mn=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var mn,cn,i=function(e,t){function i(){this.constructor=e}mn(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},y=function(e,t,i,o){var n,a=arguments.length,l=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;0<=r;r--)(n=e[r])&&(l=(a<3?n(l):3<a?n(t,i,l):n(t,i))||l);return 3<a&&l&&Object.defineProperty(t,i,l),l},i=(cn=Y.Component,i(f,cn),Object.defineProperty(f.prototype,"isShapeSelected",{get:function(){return this.mapSelect},enumerable:!0,configurable:!0}),f.prototype.mergePersistMapsData=function(){var e;try{i=window.localStorage}catch(e){i=null}if(Y.isNullOrUndefined(i)||(e=window.localStorage.getItem(this.getModuleName()+this.element.id)),!Y.isNullOrUndefined(e)&&""!==e){var t=JSON.parse(e),i=Object.keys(t);this.isProtectedOnChange=!0;for(var o=0,n=i;o<n.length;o++){var a=n[o];"object"!=typeof this[a]||Y.isNullOrUndefined(this[a])?this[a]=t[a]:Y.extend(this[a],t[a])}this.isProtectedOnChange=!1}},f.prototype.getLocalizedLabel=function(e){return this.localeObject.getConstant(e)},f.prototype.preRender=function(){this.isDevice=Y.Browser.isDevice,this.initPrivateVariable(),this.allowServerDataBinding=!1,this.unWireEVents(),this.wireEVents(),this.setCulture()},f.prototype.renderElements=function(){this.isDestroyed||(this.trigger("load",{maps:this}),this.createSVG(),this.findBaseAndSubLayers(),!Y.isNullOrUndefined(this.markerModule)&&this.markerModule.getMapsInstance()&&this.markerModule.initializeMarkerClusterList(),this.createSecondaryElement(),this.addTabIndex(),this.themeStyle=function(e){var t,i;switch(e.toLowerCase()){case"materialdark":i="#303030";break;case"fabricdark":i="#201F1F";break;case"bootstrapdark":i="#1A1A1A"}switch(e.toLowerCase()){case"materialdark":case"fabricdark":case"bootstrapdark":t={backgroundColor:i,areaBackgroundColor:i,titleFontColor:"#FFFFFF",titleFontSize:"14px",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#DADADA",legendTextColor:"#DADADA",dataLabelFontColor:"#DADADA",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#363F4C",zoomFillColor:"#FFFFFF",labelFontFamily:"Roboto, Noto, Sans-serif",fontFamily:"Roboto, Noto, Sans-serif",fontSize:"12px",legendFontSize:"12px",fontWeight:"Medium",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};break;case"highcontrast":t={backgroundColor:"#000000",areaBackgroundColor:"#000000",titleFontColor:"#FFFFFF",titleFontSize:"14px",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#FFFFFF",legendTextColor:"#FFFFFF",dataLabelFontColor:"#000000",tooltipFontColor:"#000000",tooltipFillColor:"#ffffff",zoomFillColor:"#FFFFFF",fontFamily:"Roboto, Noto, Sans-serif",fontSize:"12px",legendFontSize:"12px",fontWeight:"Medium",labelFontFamily:"Roboto, Noto, Sans-serif",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};break;case"bootstrap4":t={backgroundColor:"#FFFFFF",areaBackgroundColor:"#FFFFFF",titleFontColor:"#212529",subTitleFontColor:"#212529",legendTitleFontColor:"#212529",legendTextColor:"#212529",dataLabelFontColor:"#212529",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#000000",zoomFillColor:"#5B6269",fontFamily:"HelveticaNeue-Medium",fontSize:"12px",fontWeight:"Medium",titleFontSize:"16px",legendFontSize:"14px",tooltipFillOpacity:1,tooltipTextOpacity:.9,labelFontFamily:"HelveticaNeue-Medium",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};break;case"tailwind":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#374151",subTitleFontColor:"#374151",legendTitleFontColor:"#374151",legendTextColor:"#6B7280",dataLabelFontColor:"#505967",tooltipFontColor:"#F9FAFB",tooltipFillColor:"#111827",zoomFillColor:"#6b7280",fontFamily:"Inter",fontSize:"12px",fontWeight:"Medium",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:.9,labelFontFamily:"Inter",titleFontWeight:"500",zoomSelectionColor:"#374151",shapeFill:"#E5E7EB",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};break;case"tailwinddark":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#D1D5DB",subTitleFontColor:"#D1D5DB",legendTitleFontColor:"#D1D5DB",legendTextColor:"#D1D5DB",dataLabelFontColor:"#D1D5DB",tooltipFontColor:"#1F2937",tooltipFillColor:"#F9FAFB",zoomFillColor:"#D1D5DB",fontFamily:"Inter",fontSize:"12px",fontWeight:"Medium",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:.9,labelFontFamily:"Inter",titleFontWeight:"500",zoomSelectionColor:"#F3F4F6",shapeFill:"#374151",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};break;case"bootstrap5":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#212529",subTitleFontColor:"#212529",legendTitleFontColor:"#212529",legendTextColor:"#212529",dataLabelFontColor:"#212529",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#000000",zoomFillColor:"#6E757D",fontFamily:"Segoe UI",fontSize:"10px",fontWeight:"400",titleFontSize:"14px",subTitleFontSize:"12px",legendFontSize:"10px",tooltipFillOpacity:.9,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"400",zoomSelectionColor:"#212529",zoomBorderColor:"#DEE2E6",shapeFill:"#E9ECEF",shapeBorderColor:"#DEE2E6",zoomButtonRadius:32,rectangleZoomBorderColor:"#0D6EFD",rectangleZoomFillColor:"#86B7FE",rectangleZoomFillOpacity:.3,legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent"};break;case"bootstrap5dark":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#DEE2E6",subTitleFontColor:"#DEE2E6",legendTitleFontColor:"#DEE2E6",legendTextColor:"#DEE2E6",dataLabelFontColor:"#DEE2E6",tooltipFontColor:"#212529",tooltipFillColor:"#FFFFFF",zoomFillColor:"#ADB5BD",fontFamily:"Segoe UI",fontSize:"10px",fontWeight:"400",titleFontSize:"14px",subTitleFontSize:"12px",legendFontSize:"10px",tooltipFillOpacity:.9,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"400",zoomSelectionColor:"#F8F9FA",zoomBorderColor:"#495057",shapeFill:"#343A40",shapeBorderColor:"#495057",zoomButtonRadius:32,rectangleZoomFillColor:"#86B7FE",rectangleZoomBorderColor:"#0D6EFD",rectangleZoomFillOpacity:.3,legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent"};break;case"fluent":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#201F1E",subTitleFontColor:"#201F1E",legendTitleFontColor:"#201F1E",legendTextColor:"#201F1E",dataLabelFontColor:"#201F1E",tooltipFontColor:"#323130",tooltipFillColor:"#FFFFFF",zoomFillColor:"#A19F9D",fontFamily:"Segoe UI",fontSize:"12px",fontWeight:"Medium",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"600",zoomSelectionColor:"#323130",shapeFill:"#F3F2F1",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};break;case"fluentdark":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#F3F2F1",subTitleFontColor:"#F3F2F1",legendTitleFontColor:"#F3F2F1",legendTextColor:"#F3F2F1",dataLabelFontColor:"#F3F2F1",tooltipFontColor:"#F3F2F1",tooltipFillColor:"#252423",zoomFillColor:"#484644",fontFamily:"Segoe UI",fontSize:"12px",fontWeight:"Medium",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"600",zoomSelectionColor:"#F3F2F1",shapeFill:"#252423",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};break;case"material3":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#1C1B1F",subTitleFontColor:"#1C1B1F",legendTitleFontColor:"#1C1B1F",legendTextColor:"#49454E",dataLabelFontColor:"#1C1B1F",tooltipFontColor:"#F4EFF4",tooltipFillColor:"#313033",zoomFillColor:"#49454E",fontFamily:"Roboto",fontSize:"14px",titleFontSize:"16px",subTitleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Roboto",titleFontWeight:"500",fontWeight:"400",zoomSelectionColor:"#49454E",shapeFill:"#E7E0EC",shapeBorderColor:"#000000",rectangleZoomFillColor:"#6750A4",rectangleZoomFillOpacity:.24,rectangleZoomBorderColor:"#6750A4",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};break;case"material3dark":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#E6E1E5",subTitleFontColor:"#E6E1E5",legendTitleFontColor:"#E6E1E5",legendTextColor:"#CAC4D0",dataLabelFontColor:"#E6E1E5",tooltipFontColor:"#313033",tooltipFillColor:"#E6E1E5",zoomFillColor:"#E6E1E5",fontFamily:"Roboto",fontSize:"14px",titleFontSize:"16px",subTitleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Roboto",titleFontWeight:"500",fontWeight:"400",zoomSelectionColor:"#E6E1E5",shapeFill:"#49454F",shapeBorderColor:"#000000",rectangleZoomFillColor:"#D0BCFF",rectangleZoomFillOpacity:.24,rectangleZoomBorderColor:"#D0BCFF",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};break;case"fluent2":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#242424",subTitleFontColor:"#242424",legendTitleFontColor:"#242424",legendTextColor:"#242424",dataLabelFontColor:"#242424",tooltipFontColor:"#242424",tooltipFillColor:"#FFFFFF",zoomFillColor:"#D1D1D1",fontFamily:"Segoe UI",fontSize:"10px",fontWeight:"400",titleFontSize:"14px",subTitleFontSize:"12px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"600",zoomSelectionColor:"#242424",shapeFill:"#E6E6E6",shapeBorderColor:"#EBEBEB",rectangleZoomFillColor:"#B4D6FA",rectangleZoomFillOpacity:.25,rectangleZoomBorderColor:"#0F6CBD",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:32};break;case"fluent2dark":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#FFFFFF",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#FFFFFF",legendTextColor:"#FFFFFF",dataLabelFontColor:"#FFFFFF",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#292929",zoomFillColor:"#666",fontFamily:"Segoe UI",fontSize:"10px",fontWeight:"400",titleFontSize:"14px",subTitleFontSize:"12px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"600",zoomSelectionColor:"#FFFFFF",shapeFill:"#333333",shapeBorderColor:"#000000",rectangleZoomFillColor:"#0E4775",rectangleZoomFillOpacity:.25,rectangleZoomBorderColor:"#0E4775",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:32};break;case"fluent2highcontrast":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#FFFFFF",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#FFFFFF",legendTextColor:"#FFFFFF",dataLabelFontColor:"#FFFFFF",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#000000",zoomFillColor:"#3FF23F",fontFamily:"Segoe UI",fontSize:"10px",fontWeight:"400",titleFontSize:"14px",subTitleFontSize:"12px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"600",zoomSelectionColor:"#FFFFFF",zoomBorderColor:"#FFFFFF",shapeFill:"#FFFFFF",shapeBorderColor:"#FFFFFF",rectangleZoomFillColor:"#1AEBFF",rectangleZoomFillOpacity:.25,rectangleZoomBorderColor:"#1AEBFF",legendBorderColor:"#FFFFFF",legendBorderWidth:1,tooltipBorderColor:"#FFF",zoomButtonRadius:32};break;default:t={backgroundColor:"#FFFFFF",areaBackgroundColor:"#FFFFFF",titleFontColor:"#424242",titleFontSize:"14px",subTitleFontColor:"#424242",legendTitleFontColor:"#757575",legendTextColor:"#757575",dataLabelFontColor:"#000000",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#000000",zoomFillColor:"#737373",labelFontFamily:"Roboto, Noto, Sans-serif",fontFamily:"Roboto, Noto, Sans-serif",fontSize:"12px",legendFontSize:"12px",fontWeight:"Medium",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30}}return t}(this.theme),this.renderBorder(),this.renderTitle(this.titleSettings,"title",null,null),this.renderArea(),this.processRequestJsonData(),this.renderComplete(),this.isAddLayer=!!this.isTileMap&&this.isAddLayer)},f.prototype.render=function(){this.renderElements()},f.prototype.processRequestJsonData=function(){var o,n,a=this,l=this.layersCollection.length-1;this.serverProcess={request:0,response:0},Array.prototype.forEach.call(this.layersCollection,function(i,e){if(i.shapeData instanceof O.DataManager?(a.serverProcess.request++,n=i.shapeData,o=i.query instanceof O.Query?i.query:new O.Query,n.executeQuery(o).then(function(e){a.processResponseJsonData("DataManager",e,i,"ShapeData")})):(i.shapeData instanceof Bt||i.shapeData)&&!Y.isNullOrUndefined(i.shapeData.dataOptions)&&a.processAjaxRequest(i,i.shapeData,"ShapeData"),i.dataSource instanceof O.DataManager&&(a.serverProcess.request++,n=i.dataSource,o=i.query instanceof O.Query?i.query:new O.Query,n.executeQuery(o).then(function(e){i.dataSource=Dt(e)})),0<i.markerSettings.length)for(var t=0;t<i.markerSettings.length;t++)!function(t){i.markerSettings[t].dataSource instanceof O.DataManager&&(a.serverProcess.request++,n=i.markerSettings[t].dataSource,o=i.markerSettings[t].query instanceof O.Query?i.markerSettings[t].query:new O.Query,n.executeQuery(o).then(function(e){i.markerSettings[t].dataSource=Dt(e)}))}(t);if(0<i.bubbleSettings.length)for(t=0;t<i.bubbleSettings.length;t++)!function(t){i.bubbleSettings[t].dataSource instanceof O.DataManager&&(a.serverProcess.request++,n=i.bubbleSettings[t].dataSource,o=i.bubbleSettings[t].query instanceof O.Query?i.bubbleSettings[t].query:new O.Query,n.executeQuery(o).then(function(e){i.bubbleSettings[t].dataSource=Dt(e)}))}(t);(i.dataSource instanceof Bt||!Y.isNullOrUndefined(i.dataSource)&&!Y.isNullOrUndefined(i.dataSource.dataOptions))&&a.processAjaxRequest(i,i.dataSource,"DataSource"),a.serverProcess.request===a.serverProcess.response&&l===e&&a.processResponseJsonData(null)})},f.prototype.processAjaxRequest=function(o,e,n){var a=this,t=(this.serverProcess.request++,new Y.Fetch(e.dataOptions,e.type,e.contentType));t.onSuccess=function(e){var t,i;Y.isNullOrUndefined(e.type)||"application/octet-stream"!==e.type?a.processResponseJsonData("Fetch",e,o,n):(t=new FileReader,i=a,t.onload=function(){e=JSON.parse(t.result.toString()),i.processResponseJsonData("Fetch",e,o,n)},t.readAsText(e))},t.send(e.sendData)},f.prototype.processResponseJsonData=function(e,t,i,o){if(this.serverProcess.response++,e&&("ShapeData"===o?i.shapeData="DataManager"===e?Dt(t):t:i.dataSource="DataManager"===e?Dt(t):t),Y.isNullOrUndefined(e)||this.serverProcess.request!==this.serverProcess.response)Y.isNullOrUndefined(e)&&this.renderMap();else{var n=this.layersCollection;this.layersCollection=[];for(var a=0;a<n.length;a++)n[a].isBaseLayer&&this.layersCollection.push(n[a]);for(var l=0;l<n.length;l++)n[l].isBaseLayer||this.layersCollection.push(n[l]);this.renderMap()}},f.prototype.renderMap=function(){this.legendModule&&this.legendSettings.visible&&this.legendModule.renderLegend(),this.createTile(),this.zoomSettings.enable&&this.zoomModule&&this.zoomModule.createZoomingToolbars(),Y.isNullOrUndefined(this.dataLabelModule)||(this.dataLabelModule.dataLabelCollections=[]),this.mapLayerPanel.measureLayerPanel(),Y.isNullOrUndefined(this.svgObject)||this.element.appendChild(this.svgObject),this.setSecondaryElementPosition();for(var e,t,i,o,n,a,l=0;l<this.layers.length;l++){if(this.layers[l].selectionSettings&&this.layers[l].selectionSettings.enable&&0<this.layers[l].initialShapeSelection.length&&this.checkInitialRender){for(var r=this.layers[l].selectionSettings.enableMultiSelect,s=(this.layers[l].selectionSettings.enableMultiSelect=r||!0,this.layers[l].initialShapeSelection),d=0;d<this.layers[l].initialShapeSelection.length;d++)this.shapeSelection(l,s[d].shapePath,s[d].shapeValue,!0);this.layers[l].selectionSettings.enableMultiSelect=r,l===this.layers.length-1&&(this.checkInitialRender=!1)}if(!this.isResize)for(var p=0;p<this.layers[l].markerSettings.length;p++)if(this.layers[l].markerSettings[p].selectionSettings&&this.layers[l].markerSettings[p].selectionSettings.enable&&0<this.layers[l].markerSettings[p].initialMarkerSelection.length)for(var h=this.layers[l].markerSettings[p].initialMarkerSelection,d=0;d<h.length;d++)this.markerInitialSelection(l,p,this.layers[l].markerSettings[p],h[d].latitude,h[d].longitude)}Y.isNullOrUndefined(document.getElementById(this.element.id+"_tile_parent"))||(n=this.svgObject.getBoundingClientRect(),e=document.getElementById(this.element.id),t=document.getElementById(this.element.id+"_tile_parent"),i=document.getElementById(this.element.id+"_tiles"),a=t.getBoundingClientRect(),o=void 0,o=parseFloat(t.style.left),n=n.bottom-a.bottom-e.offsetTop,a=parseFloat(t.style.top),a=n<=11?a:Y.isNullOrUndefined(this.legendModule)||"Bottom"!==this.legendSettings.position?2*a:this.mapAreaRect.y,o=!(n<=11)&&Y.isNullOrUndefined(this.legendModule)?2*o:o,t.style.top=a+"px",t.style.left=o+"px",i.style.top=a+"px",i.style.left=o+"px",!Y.isNullOrUndefined(this.legendModule)&&0<this.legendModule.totalPages.length&&(t.style.height=i.style.height=this.legendModule.legendTotalRect.height+"px",t.style.width=i.style.width=this.legendModule.legendTotalRect.width+"px")),this.arrangeTemplate(),this.annotationsModule&&"0px"!==this.width&&"0px"!==this.height&&"0%"!==this.width&&"0%"!==this.height&&this.annotationsModule.renderAnnotationElements(),this.element.style.outline="none",this.element.style.position="relative";for(l=0;l<document.getElementsByTagName("path").length-1;l++)-1<document.getElementsByTagName("path")[l].id.indexOf("shapeIndex")&&(document.getElementsByTagName("path")[l].style.outline="none");this.zoomingChange(),this.zoomModule&&this.isDevice&&this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.mapScaleValue,this.element.id+"_Zooming_"),this.isZoomByPosition||this.zoomNotApplied||this.triggerZoomEvent(),this.isResize=!1},f.prototype.triggerZoomEvent=function(){var e=this.getMinMaxLatitudeLongitude(),e={maps:this,isResized:this.isResize,minLatitude:e.minLatitude,maxLatitude:e.maxLatitude,minLongitude:e.minLongitude,maxLongitude:e.maxLongitude,cancel:!1,name:"Loaded"};this.trigger("loaded",e)},f.prototype.markerSelection=function(e,t,i,o){var n={color:e.border.color,width:e.border.width/t.scale,opacity:e.border.opacity},n={opacity:e.opacity,fill:e.fill,border:n,target:i.id,cancel:!1,data:o,maps:t};F("MarkerselectionMap")?gt("MarkerselectionMap","MarkerselectionMapStyle",n):document.body.appendChild(ut("MarkerselectionMap","MarkerselectionMapStyle",n)),0!==this.selectedMarkerElementId.length&&!e.enableMultiSelect||("g"===i.tagName?(i.children[0].setAttribute("class","MarkerselectionMapStyle"),this.selectedMarkerElementId.push(i.children[0].id)):(i.setAttribute("class","MarkerselectionMapStyle"),this.selectedMarkerElementId.push(i.id)))},f.prototype.markerInitialSelection=function(e,t,i,o,n){var a=i.selectionSettings;if(a.enable)for(var l=0;l<i.dataSource.length;l++){var r,s=i.dataSource[l];s.latitude===o&&s.longitude===n&&(r=this.element.id+"_LayerIndex_"+e+"_MarkerIndex_"+t+"_dataIndex_"+l,this.markerSelection(a,this,F(r),s))}},f.prototype.renderArea=function(){var e=this.mapsArea.border.width,t=this.mapsArea.background;(0<e||t||this.themeStyle.areaBackgroundColor)&&(e={opacity:Y.isNullOrUndefined(this.mapsArea.border.opacity)?1:this.mapsArea.border.opacity,color:this.mapsArea.border.color,width:this.mapsArea.border.width},t=new Q(this.element.id+"_MapAreaBorder",t||this.themeStyle.areaBackgroundColor,e,1,this.mapAreaRect),this.svgObject.appendChild(this.renderer.drawRectangle(t)))},f.prototype.addTabIndex=function(){this.element.setAttribute("aria-label",this.description||"Maps Element"),this.element.setAttribute("role","region"),this.element.tabIndex=this.tabIndex},f.prototype.setSecondaryElementPosition=function(){var e=N(this.element.id+"_Secondary_Element"),t=this.element.getBoundingClientRect(),i=N(this.element.id+"_svg");Y.isNullOrUndefined(i)||(i=i.getBoundingClientRect(),e.style.left=Math.max(i.left-t.left,0)+"px",e.style.top=Math.max(i.top-t.top,0)+"px")},f.prototype.zoomingChange=function(){if(N(this.element.id+"_Layer_Collections")&&this.zoomModule&&(this.zoomModule.layerCollectionEle=N(this.element.id+"_Layer_Collections")),this.isTileMap&&N(this.element.id+"_Tile_SVG")&&N(this.element.id+"_tile_parent")){var e=N(this.element.id+"_tile_parent"),t=N(this.element.id+"_Tile_SVG"),i=N(this.element.id+"_Tile_SVG_Parent"),o=e.getBoundingClientRect(),n=t.getBoundingClientRect(),a=o.left-n.left,l=o.top-n.top,r=(i.style.left=a+"px",i.style.top=l+"px",!Y.isNullOrUndefined(this.legendModule)&&0<this.legendModule.totalPages.length&&(e.style.width=t.style.width=this.legendModule.legendTotalRect.width.toString(),e.style.height=t.style.height=this.legendModule.legendTotalRect.height.toString(),i.style.width=this.legendModule.legendTotalRect.width+"px",i.style.height=this.legendModule.legendTotalRect.height+"px"),document.getElementsByClassName("template"));if(!Y.isNullOrUndefined(r)&&0<r.length)for(var s=0;s<r.length;s++){var d=r[s];d.style.left=a+"px",d.style.top=l+"px"}}if(0<=this.zoomSettings.zoomFactor){this.zoomModule&&this.zoomModule.toolBarGroup&&this.zoomSettings.enable&&this.zoomModule.alignToolBar();var p=document.getElementById(this.element.id+"_Layer_Collections");if(!Y.isNullOrUndefined(p)&&0<p.childElementCount)for(s=0;s<p.childNodes.length;s++){var h=p.childNodes[s];if("g"===h.tagName&&-1===h.id.indexOf("_Legend_Group"))for(var m=parseFloat(h.id.split("_LayerIndex_")[1].split("_")[0]),c=0;c<h.childNodes.length;c++){var u=h.childNodes[c];-1<u.id.indexOf("_Markers_Group")||-1<u.id.indexOf("_bubble_Group")||-1<u.id.indexOf("_dataLableIndex_Group")||Lt(u,m,this.scale,this)}}this.zoomModule&&(this.previousScale!==this.scale||this.zoomNotApplied||this.isZoomByPosition)&&this.zoomModule.applyTransform(this,!0)}},f.prototype.createSecondaryElement=function(){var e;Y.isNullOrUndefined(document.getElementById(this.element.id+"_Secondary_Element"))&&((e=Y.createElement("div",{id:this.element.id+"_Secondary_Element"})).style.cssText="position: relative;z-index:2;",this.element.appendChild(e))},f.prototype.getMinMaxLatitudeLongitude=function(){var e,t=document.getElementById(this.element.id);return Y.isNullOrUndefined(t)?{minLatitude:0,maxLatitude:0,minLongitude:0,maxLongitude:0}:(t=t.getBoundingClientRect(),e=rt(this.margin.left),e=this.isTileMap?this.pointToLatLong(this.mapAreaRect.x-e,-this.mapAreaRect.y):this.getGeoLocation(0,this.mapAreaRect.x+t.left,this.mapAreaRect.y),t=this.isTileMap?this.pointToLatLong(this.mapAreaRect.width,this.mapAreaRect.height-this.mapAreaRect.y):this.getGeoLocation(0,this.mapAreaRect.x+t.left+this.mapAreaRect.width,this.mapAreaRect.y+this.mapAreaRect.height),{minLatitude:e.latitude,maxLatitude:t.latitude,minLongitude:e.longitude,maxLongitude:t.longitude})},f.prototype.arrangeTemplate=function(){var a=this,e=(document.getElementById(this.element.id+"_Legend_Border")&&(document.getElementById(this.element.id+"_Legend_Border").style.pointerEvents="none"),document.getElementsByClassName(this.element.id+"_template"));!Y.isNullOrUndefined(e)&&0<e.length&&N(this.element.id+"_Layer_Collections")&&!this.isTileMap&&Array.prototype.forEach.call(e,function(e){var t,i,o=0,n=0;!Y.isNullOrUndefined(e)&&0<e.childElementCount&&(t=N(a.element.id+"_Layer_Collections").getBoundingClientRect(),i=N(e.id).getBoundingClientRect(),-1===e.id.indexOf("Marker")&&(o=a.isTileMap?0:t.left<i.left?-Math.abs(i.left-t.left):Math.abs(i.left-t.left),n=a.isTileMap?0:t.top<i.top?-Math.abs(i.top-t.top):Math.abs(i.top-t.top)),Array.prototype.forEach.call(e.childNodes,function(e){var t;-1!==e.id.indexOf("Marker")?"hidden"!==e.style.visibility&&(t=N(e.id).getBoundingClientRect(),e.style.left=parseFloat(e.style.left)-(a.isTileMap?0:t.width/2)+"px",e.style.top=parseFloat(e.style.top)-(a.isTileMap?0:t.height/2)+"px"):(e.style.left=parseFloat(e.style.left)+o+"px",e.style.top=parseFloat(e.style.top)+n+"px",e.style.transform="translate(-50%, -50%)")}))})},f.prototype.createTile=function(){var e,t,i=this.layersCollection[0];i.isBaseLayer&&!Y.isNullOrUndefined(i.urlTemplate)&&""!==i.urlTemplate&&Y.isNullOrUndefined(i.shapeData)&&(P(this.element.id+"_tile_parent"),P(this.element.id+"_tiles"),P("animated_tiles"),i=Y.createElement("div",{id:this.element.id+"_tile_parent"}),e=rt(this.margin.right),i.style.cssText="position: absolute; left: "+this.mapAreaRect.x+"px; right: "+e+"px; top: "+(this.mapAreaRect.y+0)+"px; height: "+this.mapAreaRect.height+"px; width: "+this.mapAreaRect.width+"px; overflow: hidden;",(t=Y.createElement("div",{id:this.element.id+"_tiles"})).style.cssText="position: absolute; left: "+this.mapAreaRect.x+"px; right: "+e+"px; top: "+(this.mapAreaRect.y+0)+"px; height: "+this.mapAreaRect.height+"px; width: "+this.mapAreaRect.width+"px; overflow: hidden;",this.element.appendChild(i),this.element.appendChild(t))},f.prototype.initPrivateVariable=function(){var e;""===this.element.id&&(e=document.getElementsByClassName("e-maps").length,this.element.id="maps_control_"+e),this.renderer=new E.SvgRenderer(this.element.id),this.mapLayerPanel=new dn(this)},f.prototype.findBaseAndSubLayers=function(){var t=this,e=this.baseLayerIndex,i=[],o=[];this.layersCollection=[],Array.prototype.forEach.call(this.layers,function(e){("Layer"===e.type?i:o).push(e)});for(var n=0;n<i.length;n++){var a=i[n];if(a.visible&&e===n){a.isBaseLayer=!0,this.isTileMap=!!Y.isNullOrUndefined(a.shapeData),this.layersCollection.push(a);break}if(n===i.length-1){this.layersCollection.push(i[0]);break}}o.map(function(e){e.visible&&t.layersCollection.push(e)})},f.prototype.renderBorder=function(){var e,t=this.border.width,i=this.svgObject.querySelector("#"+this.element.id+"_MapBorder");(0<t||this.background||this.themeStyle.backgroundColor)&&Y.isNullOrUndefined(i)?(e={opacity:Y.isNullOrUndefined(this.border.opacity)?1:this.border.opacity,color:this.border.color,width:this.border.width},e=new Q(this.element.id+"_MapBorder",this.background||this.themeStyle.backgroundColor,e,1,new K(t/2,t/2,this.availableSize.width-t,this.availableSize.height-t)),this.svgObject.appendChild(this.renderer.drawRectangle(e))):i.setAttribute("fill",this.background||this.themeStyle.backgroundColor)},f.prototype.renderTitle=function(e,t,i,o){var n,a,l,r={size:e.textStyle.size,color:e.textStyle.color,fontFamily:e.textStyle.fontFamily,fontWeight:e.textStyle.fontWeight,fontStyle:e.textStyle.fontStyle,opacity:e.textStyle.opacity},s=rt(this.margin.top),d=rt(this.margin.bottom),p=rt(this.margin.left),h=rt(this.margin.right),h=Math.abs(p+h-this.availableSize.width);r.fontFamily=(Y.isNullOrUndefined(r.fontFamily)?this.themeStyle:r).fontFamily,r.fontWeight=r.fontWeight||this.themeStyle.titleFontWeight,r.size="title"===t?r.size||this.themeStyle.titleFontSize:r.size||this.themeStyle.subTitleFontSize||At.mapsSubTitleFont.size,e.text?(Y.isNullOrUndefined(o)&&(o=this.renderer.createGroup({id:this.element.id+"_Title_Group"})),l=W(a=tt(h,e.text,r),r),i=it(Y.isNullOrUndefined(i)?new K(p,s,this.availableSize.width,this.availableSize.height):i,Y.isNullOrUndefined(e.alignment)?"Center":e.alignment,l,t),a=new se(this.element.id+"_Map_"+t,i.x,i.y,"start",a),i=new K(i.x,i.y,l.width,l.height),(l=_e(a,r,r.color||("title"===t?this.themeStyle.titleFontColor:this.themeStyle.subTitleFontColor),o)).setAttribute("aria-label",e.text),l.setAttribute("role","region"),("title"!==t||e.subtitleSettings.text)&&"subtitle"!==t||(n=Math.abs(i.y+d-this.availableSize.height),this.mapAreaRect=new K(p,i.y+10,h,n-10)),"subtitle"!==t&&e.subtitleSettings.text?this.renderTitle(e.subtitleSettings,"subtitle",i,o):this.svgObject.appendChild(o)):(n=Math.abs(s+d-this.availableSize.height),this.mapAreaRect=new K(p,s,h,n))},f.prototype.createSVG=function(){this.removeSvg(),z(this)},f.prototype.removeSvg=function(){if(P(this.element.id+"_Secondary_Element"),P(this.element.id+"_tile_parent"),P(this.element.id+"_tiles"),this.svgObject){for(;0<this.svgObject.childNodes.length;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&Y.remove(this.svgObject)}this.clearTemplate()},f.prototype.wireEVents=function(){Y.EventHandler.add(this.element,"click",this.mapsOnClick,this),Y.EventHandler.add(this.element,"contextmenu",this.mapsOnRightClick,this),Y.EventHandler.add(this.element,"dblclick",this.mapsOnDoubleClick,this),Y.EventHandler.add(this.element,Y.Browser.touchStartEvent,this.mouseDownOnMap,this),Y.EventHandler.add(this.element,Y.Browser.touchMoveEvent,this.mouseMoveOnMap,this),Y.EventHandler.add(this.element,Y.Browser.touchEndEvent,this.mouseEndOnMap,this),Y.EventHandler.add(this.element,"pointerleave mouseleave",this.mouseLeaveOnMap,this),Y.EventHandler.add(this.element,"keydown",this.keyDownHandler,this),Y.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),this.resizeEvent=this.mapsOnResize.bind(this),window.addEventListener(Y.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeEvent)},f.prototype.unWireEVents=function(){Y.EventHandler.remove(this.element,"click",this.mapsOnClick),Y.EventHandler.remove(this.element,"contextmenu",this.mapsOnRightClick),Y.EventHandler.remove(this.element,"dblclick",this.mapsOnDoubleClick),Y.EventHandler.remove(this.element,Y.Browser.touchStartEvent,this.mouseDownOnMap),Y.EventHandler.remove(this.element,Y.Browser.touchMoveEvent,this.mouseMoveOnMap),Y.EventHandler.remove(this.element,Y.Browser.touchEndEvent,this.mouseEndOnMap),Y.EventHandler.remove(this.element,"pointerleave mouseleave",this.mouseLeaveOnMap),Y.EventHandler.remove(this.element,"keydown",this.keyDownHandler),Y.EventHandler.remove(this.element,"keyup",this.keyUpHandler),window.removeEventListener(Y.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeEvent)},f.prototype.mouseLeaveOnMap=function(e){0<document.getElementsByClassName("highlightMapStyle").length&&this.legendModule&&(this.legendModule.removeShapeHighlightCollection(),x(document.getElementsByClassName("highlightMapStyle")[0]))},f.prototype.keyUpHandler=function(e){var t=e.target.id;this.isTileMap&&this.removeTileMap(),"Tab"===e.code&&-1<t.indexOf("_LayerIndex_")&&-1<t.indexOf("shapeIndex")?this.keyboardHighlightSelection(t,e):-1===t.indexOf("_LayerIndex_")&&-1===t.indexOf("shapeIndex")&&0<mt("highlightMapStyle").length&&(x(mt("highlightMapStyle")[0]),this.legendSettings.visible)&&this.legendModule&&this.legendModule.removeShapeHighlightCollection()},f.prototype.keyboardHighlightSelection=function(e,t){var i=t.type,o=parseInt(e.split("_LayerIndex_")[1].split("_")[0],10),n=parseInt(e.split("_shapeIndex_")[1].split("_")[0],10),n=this.layers[o].shapeData.features.length>n?this.layers[o].shapeData.features[n].properties:null,e=parseInt(e.split("_dataIndex_")[1].split("_")[0],10),e=Y.isNullOrUndefined(e)?null:this.layers[o].dataSource[e];this.layers[o].selectionSettings.enable&&"keydown"===i&&this.selectionModule?(this.selectionModule.selectionsettings=this.layers[o].selectionSettings,this.selectionModule.selectionType="Shape",this.selectionModule.selectElement(t.target,o,e,n)):this.highlightModule&&this.layers[o].highlightSettings.enable&&"keyup"===i&&!t.target.classList.contains("ShapeselectionMapStyle")&&(this.highlightModule.highlightSettings=this.layers[o].highlightSettings,this.highlightModule.handleHighlight(t.target,o,e,n))},f.prototype.keyDownHandler=function(e){var t,i=this.zoomModule,o=e.target.id;"ArrowUp"!==e.code&&"ArrowDown"!==e.code&&"ArrowLeft"!==e.code&&"ArrowRight"!==e.code||!i||(t=document.getElementById(this.element.id+"_animated_tiles"),this.isTileMap&&!Y.isNullOrUndefined(t)&&(this.currentTiles=t.cloneNode(!0))),this.zoomSettings.enable&&i&&("+"===e.key||"Equal"===e.code)?i.performZoomingByToolBar("zoomin"):this.zoomSettings.enable&&i&&("-"===e.key||"Minus"===e.code)?i.performZoomingByToolBar("zoomout"):this.zoomSettings.enable&&i&&82===e.keyCode?(i.performZoomingByToolBar("reset"),i.isPanModeEnabled=!1):this.zoomSettings.enable&&this.zoomSettings.enablePanning&&i&&("ArrowUp"===e.code||"ArrowDown"===e.code)?(e.preventDefault(),i.mouseDownLatLong.x=0,i.mouseMoveLatLong.y=this.mapAreaRect.height/7,i.panning("None",i.mouseDownLatLong.x,"ArrowUp"===e.code?-i.mouseMoveLatLong.y:i.mouseMoveLatLong.y,e),i.mouseDownLatLong.y=i.mouseMoveLatLong.y):this.zoomSettings.enable&&this.zoomSettings.enablePanning&&i&&("ArrowLeft"===e.code||"ArrowRight"===e.code)?(e.preventDefault(),i.mouseDownLatLong.y=0,i.mouseMoveLatLong.x=this.mapAreaRect.width/7,i.panning("None","ArrowLeft"===e.code?-i.mouseMoveLatLong.x:i.mouseMoveLatLong.x,i.mouseDownLatLong.y,e),i.mouseDownLatLong.x=i.mouseMoveLatLong.x):"Enter"===e.code&&(o=e.target.id,e.preventDefault(),this.legendModule&&(-1<o.indexOf("_Left_Page_Rect")||-1<o.indexOf("_Right_Page_Rect"))&&(this.mapAreaRect=this.legendModule.initialMapAreaRect,this.legendModule.currentPage=-1<o.indexOf("_Left_Page_")?this.legendModule.currentPage-1:this.legendModule.currentPage+1,this.legendModule.legendGroup=this.renderer.createGroup({id:this.element.id+"_Legend_Group"}),this.legendModule.drawLegendItem(this.legendModule.currentPage),t=document.getElementById(this.element.id+"_Paging_Text").textContent.split("/").map(Number),-1<o.indexOf("_Left_Page_Rect")?(1!==t[0]&&e.target.focus(),e.target.style.outlineColor=t[0]-1!==t[1]?"":"transparent"):-1<o.indexOf("_Right_Page_Rect")&&(t[0]!==t[1]&&e.target.focus(),e.target.style.outlineColor=t[0]!==t[1]+1?"":"transparent"),C(this.element.id+"_Legend_Border",this.element.id))&&(C(this.element.id+"_Legend_Border",this.element.id).style.pointerEvents="none"),-1<o.indexOf("shapeIndex"))&&this.keyboardHighlightSelection(o,e),this.zoomModule&&this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.mapScaleValue,this.mouseMoveId)},f.prototype.SelectedElement=function(e){var t=!1;return t="ShapeselectionMapStyle"===e.getAttribute("class")?!0:t},f.prototype.mapsOnClick=function(t){var e,i,o=this,n=t.target,a=n.id,l=null,r=null;this.mouseClickEvent={x:t.x,y:t.y},-1===n.id.indexOf("_ToolBar")&&(e=this.getClickLocation(a,t.pageX,t.pageY,n,t.layerX,t.layerY),Y.isNullOrUndefined(e)||(l=e.latitude,r=e.longitude),i={cancel:!1,name:Io,target:a,x:t.clientX,y:t.clientY,latitude:l,longitude:r,isShapeSelected:this.SelectedElement(n)},this.onclick?(i.name=ko,this.trigger("onclick",i,function(e){o.clickHandler(t,i,n)})):this.trigger("click",i,function(e){o.clickHandler(t,i,n)})),this.zoomModule&&(this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.mapScaleValue,a),this.isDevice)&&this.zoomModule.removeToolbarClass("","","","","")},f.prototype.clickHandler=function(e,t,i){-1<i.id.indexOf("shapeIndex")&&(this.mergeCluster(),F(this.element.id+"_mapsTooltip"))&&-1<this.mapsTooltipModule.tooltipTargetID.indexOf("_MarkerIndex_")&&P(this.element.id+"_mapsTooltip"),this.markerModule&&this.markerModule.markerClusterClick(e),t.cancel||this.notify(Io,i),t.cancel||-1===i.id.indexOf("shapeIndex")||this.triggerShapeSelection(i)},f.prototype.triggerShapeSelection=function(e){var t=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),t=ht(e.id,this.layers[t].selectionSettings,this,Bo);t.cancel||!this.selectionModule||Y.isNullOrUndefined(this.shapeSelected)?t.cancel&&this.selectionModule&&Y.isNullOrUndefined(t.data)&&(x(e),this.selectionModule.removedSelectionList(e)):gt(this.selectionModule.selectionType+"selectionMap",this.selectionModule.selectionType+"selectionMapStyle",t)},f.prototype.getMarkerClickLocation=function(e,t,i,o,n,a){document.getElementById(this.element.id+"_svg").style.cursor="grabbing";var l=F(n.targetId),r=this.getClickLocation(n.targetId,e,t,l,i,o),s=this.isTileMap?R(new T(r.longitude,r.latitude),this.tileZoomLevel,this.tileTranslatePoint,!0):B(r.latitude,r.longitude,this.mapLayerPanel.currentFactor,this.layersCollection[n.layerIndex],this),d=this.translatePoint,p=this.isTileMap?s.x:(s.x+d.x)*this.scale,s=this.isTileMap?s.y:(s.y+d.y)*this.scale;return("Balloon"!==this.markerDragArgument.shape?l:l.parentElement).setAttribute("transform","translate( "+p+" "+s+" )"),a&&(d=this.layers[n.layerIndex].markerSettings[n.markerIndex],r=this.getClickLocation(n.targetId,e-d.offset.x,t-d.offset.y,l,i-d.offset.x,o-d.offset.y)),r},f.prototype.getClickLocation=function(e,t,i,o,n,a,l){var r,s,d,p=0;return-1===e.indexOf("_LayerIndex_")||this.isTileMap||Y.isNullOrUndefined(l)&&(parseInt(this.mouseDownEvent.x,10)!==parseInt(this.mouseClickEvent.x,10)||parseInt(this.mouseDownEvent.y,10)!==parseInt(this.mouseClickEvent.y,10))?this.isTileMap&&(!Y.isNullOrUndefined(l)||parseInt(this.mouseDownEvent.x,10)===parseInt(this.mouseClickEvent.x,10)&&parseInt(this.mouseDownEvent.y,10)===parseInt(this.mouseClickEvent.y,10))&&(r=this.getTileGeoLocation(n,a)):(p=parseFloat(e.split("_LayerIndex_")[1].split("_")[0]),"Normal"===this.layers[p].geometryType?-1<e.indexOf("_shapeIndex_")?(n=U(t,i,-1<(l=o.parentElement).id.indexOf("_Point_Group")||-1<l.id.indexOf("_LineString_Group")||-1<l.id.indexOf("_MultiLineString_Group")||-1<l.id.indexOf("_Polygon_Group")?l.parentElement:l),a=this.mapLayerPanel.currentFactor*this.mapScaleValue,s=Math.abs(-this.baseMapBounds.longitude.min*a),d=Math.abs(this.baseMapBounds.latitude.max*a),r={latitude:Math.abs(this.baseMapBounds.latitude.max-n.y/a),longitude:Math.abs(n.x/a+this.baseMapBounds.longitude.min)},this.baseMapBounds.longitude.min<0&&s>n.x&&(r.longitude=-r.longitude),this.baseMapBounds.latitude.min<0&&d>n.y&&(r.latitude=-r.latitude)):-1<e.indexOf("_MarkerIndex_")&&this.markerModule&&!this.markerDragArgument?(o=parseInt(e.split("_MarkerIndex_")[1].split("_")[0],10),l=parseInt(e.split("_dataIndex_")[1].split("_")[0],10),r=isNaN(o)||isNaN(l)?{latitude:null,longitude:null}:{latitude:(a=this.layers[p].markerSettings[o].dataSource[l]).latitude,longitude:a.longitude}):-1<e.indexOf("_MarkerIndex_")&&this.markerModule&&this.markerDragArgument?(n=document.getElementById(this.element.id+"_LayerIndex_"+this.markerDragArgument.layerIndex).getBoundingClientRect(),o=new T(t>n.left?Math.abs(n.left-t):0,i>n.top?Math.abs(n.top-i):0),s=Math.abs(-this.baseMapBounds.longitude.min*this.mapLayerPanel.currentFactor),d=Math.abs(this.baseMapBounds.latitude.max*this.mapLayerPanel.currentFactor),r={latitude:Math.abs(this.baseMapBounds.latitude.max-o.y/(this.mapLayerPanel.currentFactor*this.scale)),longitude:Math.abs(o.x/(this.mapLayerPanel.currentFactor*this.scale)+this.baseMapBounds.longitude.min)},this.baseMapBounds.longitude.min<0&&s>o.x&&(r.longitude=-r.longitude),this.baseMapBounds.latitude.min<0&&d>o.y&&(r.latitude=-r.latitude)):r={latitude:null,longitude:null}:r=this.getGeoLocation(p,t,i)),r},f.prototype.removeTileMap=function(){var e=document.getElementById(this.element.id+"_animated_tiles");if(!Y.isNullOrUndefined(this.currentTiles)&&e.childElementCount<this.currentTiles.childElementCount)for(var t=e.childElementCount-1;t>=this.currentTiles.childElementCount;t--)e.removeChild(e.children[t]);this.currentTiles=null},f.prototype.mouseEndOnMap=function(e){var t,i,o=0,n=0;return-1!==e.type.indexOf("touch")?(this.isTouch=!0,o=t=e.changedTouches[0].pageX,n=(i=e.changedTouches[0].pageY)-(this.isTileMap?10:0),this.mouseClickEvent={x:t,y:i}):(this.isTouch="touch"===e.pointerType,t=e.pageX,i=e.pageY,o=e.layerX,n=e.layerY-(this.isTileMap?10:0)),this.isTileMap&&this.removeTileMap(),this.isTouch&&(this.titleTooltip(e,t,i,!0),Y.isNullOrUndefined(this.legendModule)||this.legendTooltip(e,e.pageX,e.pageY,!0)),this.notify(Y.Browser.touchEndEvent,e),e.cancelable&&!this.isTouch&&e.preventDefault(),Y.isNullOrUndefined(this.markerDragArgument)?document.getElementById(this.element.id+"_svg").style.cursor="auto":(e=this.markerDragArgument,this.mouseClickEvent.x=this.mouseDownEvent.x,this.mouseClickEvent.y=this.mouseDownEvent.y,o=this.getMarkerClickLocation(t,i,o,n,this.markerDragArgument,!0),n=this.layers[e.layerIndex].markerSettings[e.markerIndex],document.getElementById(this.element.id+"_svg").style.cursor=n.enableDrag?"pointer":"grabbing",t={name:"markerDragEnd",x:t,y:i,latitude:o.latitude,longitude:o.longitude,layerIndex:e.layerIndex,markerIndex:e.markerIndex,dataIndex:e.dataIndex},Y.isNullOrUndefined(n.latitudeValuePath)&&Y.isNullOrUndefined(n.longitudeValuePath)?(i=n.dataSource[e.dataIndex],Y.isNullOrUndefined(i.Longitude)||Y.isNullOrUndefined(i.Latitude)?(n.dataSource[e.dataIndex].latitude=t.latitude,n.dataSource[e.dataIndex].longitude=t.longitude):(n.dataSource[e.dataIndex].Latitude=t.latitude,n.dataSource[e.dataIndex].Longitude=t.longitude)):(n.dataSource[e.dataIndex][n.latitudeValuePath]=t.latitude,n.dataSource[e.dataIndex][n.longitudeValuePath]=t.longitude),this.markerDragId="",this.markerDragArgument=null,this.trigger("markerDragEnd",t)),this.zoomModule&&this.isDevice&&(this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.scale,this.element.id+"_Zooming_"),this.zoomModule.removeToolbarClass("","","","","")),!1},f.prototype.mouseDownOnMap=function(e){this.mouseDownEvent={x:e.x,y:e.y},-1!==e.type.indexOf("touch")&&e.changedTouches&&(this.mouseDownEvent={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}),this.isDevice&&!Y.isNullOrUndefined(this.mapsTooltipModule)&&this.mapsTooltipModule.renderTooltip(e);var t=e.target,i=(this.markerDragId=t.id,document.getElementById(this.element.id+"_animated_tiles"));this.isTileMap&&!Y.isNullOrUndefined(i)&&(this.currentTiles=i.cloneNode(!0)),-1===t.id.indexOf("_ToolBar")&&(i=this.markerModule,(-1<t.id.indexOf("shapeIndex")||-1<t.id.indexOf("Tile"))&&this.mergeCluster(),i&&(i.markerClick(e),i.markerClusterClick(e)),this.bubbleModule)&&this.bubbleModule.bubbleClick(e),this.notify(Y.Browser.touchStartEvent,e)},f.prototype.mergeCluster=function(){this.markerModule&&0<this.markerModule.sameMarkerData.length&&(!this.zoomModule||this.zoomModule.isSingleClick)&&(Ue(this.markerModule.sameMarkerData,this),this.markerModule.sameMarkerData=[])},f.prototype.mapsOnRightClick=function(e){var t=e.target,i=t.id,o=null,n=null;this.mouseClickEvent=this.mouseDownEvent={x:e.x,y:e.y},-1===t.id.indexOf("_ToolBar")&&(t=this.getClickLocation(i,e.pageX,e.pageY,t,e.layerX,e.layerY),Y.isNullOrUndefined(t)||(o=t.latitude,n=t.longitude),t={cancel:!1,name:No,target:i,x:e.clientX,y:e.clientY,latitude:o,longitude:n,isShapeSelected:!1},this.trigger("rightClick",t))},f.prototype.mapsOnDoubleClick=function(e){this.notify("dblclick",e);var t,i=e.target,o=i.id,n=null,a=null;-1===i.id.indexOf("_ToolBar")&&(-1===i.id.indexOf("_LayerIndex_")||this.isTileMap||this.mouseDownEvent.x!==e.clientX||this.mouseDownEvent.y!==e.clientY?this.isTileMap&&this.mouseDownEvent.x===e.clientX&&this.mouseDownEvent.y===e.clientY&&(n=(t=this.getTileGeoLocation(e.layerX,e.layerY)).latitude,a=t.longitude):(i=parseFloat(i.id.split("_LayerIndex_")[1].split("_")[0]),n=(t=this.getGeoLocation(i,e.layerX,e.layerY)).latitude,a=t.longitude),i={cancel:!1,name:Fo,x:e.clientX,y:e.clientY,target:o,latitude:n,longitude:a,isShapeSelected:null},this.trigger("doubleClick",i))},f.prototype.mouseMoveOnMap=function(e){var t;e.type,t=e.target,this.markerModule&&(this.markerModule.markerMove(e),this.markerModule.markerClusterMouseMove(e)),this.bubbleModule&&this.bubbleModule.bubbleMove(e),-1===t.id.indexOf("MarkerIndex")&&(document.getElementById(this.element.id+"_svg").style.cursor="auto"),this.onMouseMove(e),this.notify(Y.Browser.touchMoveEvent,e)},f.prototype.onMouseMove=function(e){var t,i,o,n=e.target,n=(this.mouseMoveId=n.id,0),a=0;return-1===e.type.indexOf("touch")?(t=e.pageX,i=e.pageY,n=e.layerX,a=e.layerY-(this.isTileMap?10:0),this.titleTooltip(e,e.pageX,e.pageY),Y.isNullOrUndefined(this.legendModule)||this.legendTooltip(e,e.pageX,e.pageY,!0)):(n=t=(o=e.touches)[0].clientX,a=i=o[0].clientY-(this.isTileMap?10:0)),Y.isNullOrUndefined(this.markerDragArgument)||(o=this.markerDragArgument,this.mouseClickEvent.x=this.mouseDownEvent.x,this.mouseClickEvent.y=this.mouseDownEvent.y,this.getMarkerClickLocation(t,i,n,a,o,!1)),this.zoomModule&&this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.scale,e.target.id),!1},f.prototype.legendTooltip=function(e,t,i,o){for(var n,a,l=e.target.id,r=(this.legendModule.currentPage,e.target.id.split("_Index_")[1]),s=this.legendModule.totalPages.length<=this.legendModule.currentPage?this.legendModule.totalPages.length-1:this.legendModule.currentPage<0?0:this.legendModule.currentPage,d=(0!==this.legendModule.totalPages.length?this.legendModule.totalPages[s].Collection:this.legendModule.totalPages).length,p=0;p<d;p++)n=(a=this.legendModule.totalPages[s].Collection[p]).DisplayText,l=e.target.id,r=e.target.id.split("_Index_")[1],l===this.element.id+"_Legend_Text_Index_"+r&&-1<e.target.textContent.indexOf("...")&&a.idIndex===parseInt(r,10)&&St(n,this.legendSettings.textStyle.size,t,i,this.element.offsetWidth,this.element.offsetHeight,this.element.id+"_EJ2_Legend_Text_Tooltip",F(this.element.id+"_Secondary_Element"),o);l!==this.element.id+"_Legend_Text_Index_"+r&&P(this.element.id+"_EJ2_Legend_Text_Tooltip")},f.prototype.titleTooltip=function(e,t,i,o){var n=e.target.id;n===this.element.id+"_LegendTitle"&&-1<e.target.textContent.indexOf("...")?St(this.legendSettings.title.text,this.legendSettings.titleStyle.size,t,i,this.element.offsetWidth,this.element.offsetHeight,this.element.id+"_EJ2_LegendTitle_Tooltip",F(this.element.id+"_Secondary_Element"),o):P(this.element.id+"_EJ2_LegendTitle_Tooltip"),n===this.element.id+"_Map_title"&&-1<e.target.textContent.indexOf("...")?St(this.titleSettings.text,this.titleSettings.textStyle.size||this.themeStyle.titleFontSize,t,i,this.element.offsetWidth,this.element.offsetHeight,this.element.id+"_EJ2_Title_Tooltip",F(this.element.id+"_Secondary_Element"),o):P(this.element.id+"_EJ2_Title_Tooltip")},f.prototype.mapsOnResize=function(e){var t,i=this;return this.isDestroyed||this.isExportInitialTileMap||(t={cancel:!(this.isResize=this.isReset=!0),name:Eo,previousSize:this.availableSize,currentSize:I(this),maps:this},this.trigger(Eo,t),t.cancel)||(this.resizeTo&&clearTimeout(this.resizeTo),!Y.isNullOrUndefined(this.element)&&this.element.classList.contains("e-maps")&&(this.resizeTo=setTimeout(function(){i.unWireEVents(),i.createSVG(),i.refreshing=!0,i.wireEVents(),i.render(),i.refreshing=!1},500))),!1},f.prototype.zoomByPosition=function(e,t){var i;this.isDestroyed||(this.zoomNotApplied=this.isMarkerZoomCompleted=!1,i=this.zoomSettings.zoomFactor===t,this.previousProjection=null,!this.isTileMap&&this.zoomModule?(Y.isNullOrUndefined(e)?this.zoomSettings.zoomFactor=t:(this.zoomSettings.zoomFactor=t,i=this.centerPosition.latitude===e.latitude&&this.centerPosition.longitude===e.longitude||i,this.centerPosition=e),this.isZoomByPosition=!0,this.mapScaleValue=null):this.zoomModule&&(this.tileZoomLevel=this.zoomSettings.zoomFactor=t,i=this.centerPosition.latitude===e.latitude&&this.centerPosition.longitude===e.longitude||i,this.centerPosition=e,this.isZoomByPosition=!0),i&&this.refresh())},f.prototype.panByDirection=function(e,t){if(!this.isDestroyed){var i=0,o=0;switch(e){case"Left":i=-this.mapAreaRect.width/7;break;case"Right":i=this.mapAreaRect.width/7;break;case"Top":o=-this.mapAreaRect.height/7;break;case"Bottom":o=this.mapAreaRect.height/7}this.zoomModule&&this.zoomModule.panning(e,i,o,t)}},f.prototype.addLayer=function(e){var t;this.isDestroyed||((t=this.layers).push(e),this.isAddLayer=!0,this.layers=t)},f.prototype.removeLayer=function(e){var t;this.isDestroyed||((t=this.layers).splice(e,1),this.layers=t)},f.prototype.addMarker=function(e,t){if(!this.isDestroyed&&!Y.isNullOrUndefined(this.markerModule)){var i=document.getElementById(this.element.id+"_LayerIndex_"+e);if(0<t.length&&i){for(var o=0,n=t;o<n.length;o++){var a=n[o];this.layersCollection[e].markerSettings.push(new Co(this,"markerSettings",a))}this.markerModule.markerRender(this,i,e,this.mapLayerPanel.currentFactor,"AddMarker"),this.arrangeTemplate()}}},f.prototype.shapeSelection=function(e,t,i,o){if(!this.isDestroyed&&!Y.isNullOrUndefined(this.layers[e])){var n=void 0,a=void 0,l=Array.isArray(t)?t:Array(t),r=(Y.isNullOrUndefined(o)&&(o=!0),this.layers[e].selectionSettings);if(!r.enableMultiSelect&&this.legendSelection&&o&&this.removeShapeSelection(),"SubLayer"===this.layers[e].type)for(var s=0;s<this.layersCollection.length;s++)if(this.layersCollection[s].shapeData===this.layers[e].shapeData){a=s;break}if(!Y.isNullOrUndefined(r)&&r.enable)for(var d=void 0,p=this.layers[e].shapeData.features,s=0;s<p.length;s++)for(var h=0;h<l.length;h++){var m=void 0;if((!Y.isNullOrUndefined(p[s].properties[l[h]])&&isNaN(p[s].properties[l[h]])?p[s].properties[l[h]].toLowerCase():p[s].properties[l[h]])===(Y.isNullOrUndefined(i)||"string"!=typeof i?i:i.toLowerCase())){Y.isNullOrUndefined(this.layers[e].shapeSettings.colorValuePath)||(m=Ye(this.layers[e].dataSource,p[s].properties,this.layers[e].shapeDataPath,this.layers[e].shapePropertyPath,this.layers[e]));var c=this.layers[e];if(0<=this.baseLayerIndex&&c.isBaseLayer?d=0:"SubLayer"===this.layers[e].type&&(d=a),n=F(this.element.id+"_LayerIndex_"+d+"_shapeIndex_"+s+"_dataIndex_"+m),Y.isNullOrUndefined(m)&&Y.isNullOrUndefined(n)&&(n=F(this.element.id+"_LayerIndex_"+e+"_shapeIndex_"+s+"_dataIndex_null")),c=parseInt(n.id.split("_shapeIndex_")[1].split("_")[0],10),m=this.layers[e].shapeData.features.length>c?this.layers[e].shapeData.features[c].properties:null,c=parseInt(n.id.split("_dataIndex_")[1].split("_")[0],10),c=Y.isNullOrUndefined(c)?null:this.layers[e].dataSource[c],o){yt(r,this,n,m,c),this.shapeSelectionClass=F("ShapeselectionMap"),this.legendSettings.visible&&-1===n.id.indexOf("_MarkerIndex_")&&this.legendModule.shapeHighLightAndSelection(n,c,r,"selection",e);var u=!this.legendSettings.visible||this.legendModule.shapeToggled;if(u&&(n.setAttribute("class","ShapeselectionMapStyle"),-1===this.selectedElementId.indexOf(n.getAttribute("id"))&&this.selectedElementId.push(n.getAttribute("id")),!r.enableMultiSelect))return}else this.legendSelection=!r.enableMultiSelect&&!this.legendSelection||this.legendSelection,this.legendSettings.visible&&-1===n.id.indexOf("_MarkerIndex_")&&"ShapeselectionMapStyle"===n.getAttribute("class")&&this.legendModule.shapeHighLightAndSelection(n,c,r,"selection",e),(u=!this.legendSettings.visible||this.legendModule.shapeToggled)&&(x(n),-1!==(m=this.selectedElementId.indexOf(n.getAttribute("id"))))&&(this.selectedElementId.splice(m,1),!r.enableMultiSelect)&&this.legendSelection&&0<this.selectedElementId.length&&this.removeShapeSelection()}}}},f.prototype.zoomToCoordinates=function(e,t,i,o){var n,a,l,r;this.isDestroyed||(a=n=void 0,r=this.isMarkerZoomCompleted=!1,this.centerPosition={latitude:null,longitude:null},this.isZoomByPosition=!1,(Y.isNullOrUndefined(i)&&Y.isNullOrUndefined(o)||Y.isNullOrUndefined(e)&&Y.isNullOrUndefined(t))&&(e=Y.isNullOrUndefined(e)?0:e,t=Y.isNullOrUndefined(e)?0:t,i=Y.isNullOrUndefined(i)?e:i,o=Y.isNullOrUndefined(o)?t:o,r=!0),i<e&&(e=(l=[i,e])[0],i=l[1]),o<t&&(t=(l=[o,t])[0],o=l[1]),a=r?(n=e+i,t+o):(n=(e+i)/2,(t+o)/2),this.centerLatOfGivenLocation=n,this.centerLongOfGivenLocation=a,this.minLatOfGivenLocation=e,this.minLongOfGivenLocation=t,this.maxLatOfGivenLocation=i,this.maxLongOfGivenLocation=o,this.zoomNotApplied=!0,this.scaleOfGivenLocation=Zt(e,i,t,o,this.mapAreaRect.width,this.mapAreaRect.height,this,!0),l=this.getMinMaxLatitudeLongitude(),r={cancel:!1,name:"zoom",type:"zoomIn",maps:this,tileTranslatePoint:{},translatePoint:{},tileZoomLevel:this.isTileMap?{previous:this.tileZoomLevel,current:this.scaleOfGivenLocation}:{},scale:this.isTileMap?{previous:this.tileZoomLevel,current:this.scaleOfGivenLocation}:{previous:this.scale,current:this.scaleOfGivenLocation},minLatitude:l.minLatitude,maxLatitude:l.maxLatitude,minLongitude:l.minLongitude,maxLongitude:l.maxLongitude},this.trigger("zoom",r),this.refresh())},f.prototype.removeShapeSelection=function(){for(var e=this.selectedElementId.length,t=0;t<e;t++)x(N(this.selectedElementId[0])),this.selectedElementId.splice(0,1);if(this.legendSettings.visible)for(var i=this.legendSelectionCollection.length,t=0;t<i;t++)x(N(this.legendSelectionCollection[t].legendElement.id)),this.selectedLegendElementId.splice(0,1);this.shapeSelectionItem=[],this.legendSelectionCollection=[]},f.prototype.setCulture=function(){this.intl=new Y.Internationalization,this.setLocaleConstants(),this.localeObject=new Y.L10n(this.getModuleName(),this.defaultLocalConstants,this.locale)},f.prototype.setLocaleConstants=function(){this.defaultLocalConstants={ZoomIn:"Zoom in",Zoom:"Zoom",ZoomOut:"Zoom out",Pan:"Pan",Reset:"Reset",ImageNotFound:"Image Not Found"}},f.prototype.destroy=function(){this.unWireEVents(),Y.isNullOrUndefined(this.mapsTooltipModule)||this.mapsTooltipModule.removeEventListener(),Y.isNullOrUndefined(this.bingMap)||this.bingMap.destroy(),cn.prototype.destroy.call(this),this.shapeSelectionItem=[],this.toggledElementId=[],this.toggledLegendId=[],this.legendSelectionCollection=[],this.selectedLegendElementId=[],this.selectedNavigationElementId=[],this.selectedBubbleElementId=[],this.selectedMarkerElementId=[],this.selectedElementId=[],this.dataLabelShape=[],this.zoomShapeCollection=[],this.zoomLabelPositions=[],this.mouseDownEvent={x:null,y:null},this.mouseClickEvent={x:null,y:null},this.formatFunction=null,this.localeObject=null,this.defaultLocalConstants=null,this.intl=null,this.mapAreaRect=null,this.layersCollection=null,this.themeStyle=null,this.totalRect=null,this.baseSize=null,this.baseMapBounds=null,this.baseMapRectBounds=null,this.baseTranslatePoint=null,this.baseTileTranslatePoint=null,this.markerZoomCenterPoint=null,this.currentTiles=null,this.serverProcess=null,this.toolbarProperties=null,this.zoomLabelPositions=null,this.resizeEvent=null,this.availableSize=null,document.getElementById("mapsmeasuretext")&&document.getElementById("mapsmeasuretext").remove(),this.removeSvg(),this.svgObject=null,this.mapLayerPanel=null,this.renderer=null,this.translatePoint=null,this.tileTranslatePoint=null,this.previousPoint=null,this.dataLabelShape=[],this.zoomShapeCollection=[],this.selectedElementId=[],this.selectedMarkerElementId=[],this.selectedBubbleElementId=[],this.shapeSelectionClass=null,this.markerSelectionClass=null,this.bubbleSelectionClass=null,this.navigationSelectionClass=null,this.selectedNavigationElementId=[],this.polygonSelectionClass=null,this.selectedPolygonElementId=[],this.legendSelectionClass=null,this.previousTranslate=null,this.initialTileTranslate=null,this.markerDragArgument=null},f.prototype.getModuleName=function(){return"maps"},f.prototype.getPersistData=function(){return this.addOnPersist(["translatePoint","zoomSettings","mapScaleValue","tileTranslatePoint","baseTranslatePoint","scale","zoomPersistence","defaultState","markerZoomedState","initialCheck","initialZoomLevel","initialTileTranslate","applyZoomReset","markerZoomFactor"])},f.prototype.onPropertyChanged=function(e,t){if(!this.isDestroyed){for(var i=!1,o=!1,n=!1,a=0,l=Object.keys(e);a<l.length;a++){var r=l[a];switch(r){case"background":this.renderBorder();break;case"height":case"width":case"layers":case"projectionType":case"centerPosition":case"legendSettings":case"baseLayerIndex":if("layers"===r)for(var n=!0,s=Object.keys(e.layers).length,d=0;d<s;d++)if(!Y.isNullOrUndefined(e.layers[d]))for(var p=0,h=Object.keys(e.layers[d]);p<h.length;p++){var m=h[p];Y.isNullOrUndefined(this.layers[d].shapeData)&&!Y.isNullOrUndefined(this.layers[d].urlTemplate)&&""!==this.layers[d].urlTemplate?this.isReset=!0:"markerSettings"===m&&(o=!0)}i=!0;break;case"zoomSettings":Y.isNullOrUndefined(t.zoomSettings)||(i=!(e.zoomSettings.zoomFactor!==t.zoomSettings.zoomFactor&&!n||(e.zoomSettings.shouldZoomInitially!==t.zoomSettings.shouldZoomInitially?(this.zoomSettings.zoomFactor=1,this.previousProjection=null,this.scale=this.isMarkerZoomCompleted?null:this.scale,this.isMarkerZoomCompleted=!e.zoomSettings.shouldZoomInitially):e.zoomSettings.enable!==t.zoomSettings.enable&&(this.zoomSettings.zoomFactor=1),0)));break;case"locale":case"currencyCode":cn.prototype.refresh.call(this)}}i&&(e.layers&&o?(P(this.element.id+"_Markers_Group"),this.isTileMap?this.mapLayerPanel.renderTileLayer(this.mapLayerPanel,this.layers.currentFactor,this.layers.length-1):this.render()):(this.createSVG(),this.renderElements()))}},f.prototype.requiredModules=function(){var e=[],t=this.findVisibleLayers(this.layers),i=!1;return this.annotations.map(function(e){i=null!=e.content}),this.isBubbleVisible()&&e.push({member:"Bubble",args:[this],name:"Bubble"}),t.highlight&&e.push({member:"Highlight",args:[this],name:"Highlight"}),t.selection&&e.push({member:"Selection",args:[this],name:"Selection"}),this.legendSettings.visible&&e.push({member:"Legend",args:[this],name:"Legend"}),(this.zoomSettings.enable||this.zoomSettings.zoomFactor>this.zoomSettings.minZoom)&&e.push({member:"Zoom",args:[this],name:"Zoom"}),this.isMarkersVisible()&&e.push({member:"Marker",args:[this],name:"Marker"}),this.isDataLabelVisible()&&e.push({member:"DataLabel",args:[this],name:"DataLabel"}),this.isNavigationVisible()&&e.push({member:"NavigationLine",args:[this],name:"NavigationLine"}),this.isPolygonVisible()&&e.push({member:"Polygon",args:[this],name:"Polygon"}),t.tooltip&&e.push({member:"MapsTooltip",args:[this],name:"MapsTooltip"}),i&&e.push({member:"Annotations",args:[this,pn],name:"Annotations"}),this.allowPrint&&e.push({member:"Print",args:[this],name:"Print"}),this.allowImageExport&&e.push({member:"ImageExport",args:[this],name:"ImageExport"}),this.allowPdfExport&&e.push({member:"PdfExport",args:[this],name:"PdfExport"}),e},f.prototype.isMarkersVisible=function(){var i=!1;return Array.prototype.forEach.call(this.layers,function(e){for(var t=0;t<e.markerSettings.length;t++)if(e.markerSettings[t].visible){i=!0;break}}),i},f.prototype.isDataLabelVisible=function(){for(var e=!1,t=0;t<this.layers.length;t++)if(this.layers[t].dataLabelSettings.visible){e=!0;break}return e},f.prototype.isNavigationVisible=function(){var i=!1;return Array.prototype.forEach.call(this.layers,function(e){for(var t=0;t<e.navigationLineSettings.length;t++)if(e.navigationLineSettings[t].visible){i=!0;break}}),i},f.prototype.isPolygonVisible=function(){var i=!1;return Array.prototype.forEach.call(this.layers,function(e){for(var t=0;t<e.polygonSettings.polygons.length;t++)if(0<e.polygonSettings.polygons.length){i=!0;break}}),i},f.prototype.isBubbleVisible=function(){for(var e=!1,t=0,i=this.layers;t<i.length;t++){var o=i[t];if(this.getBubbleVisible(o)){e=!0;break}}return e},f.prototype.getBubbleVisible=function(e){for(var t=!1,i=0,o=e.bubbleSettings;i<o.length;i++)if(o[i].visible){t=!0;break}return t},f.prototype.print=function(e){this.allowPrint&&this.printModule&&!this.isDestroyed&&this.printModule.print(this,e)},f.prototype.export=function(t,i,o,n){var a=this;if(!this.isDestroyed){if(Y.isNullOrUndefined(n)&&(n=!0),"PDF"!==t&&this.allowImageExport&&this.imageExportModule)return new Promise(function(e){e(a.imageExportModule.export(a,t,i,n))});if(this.allowPdfExport&&this.pdfExportModule)return new Promise(function(e){e(a.pdfExportModule.export(a,t,i,n,o))})}return null},f.prototype.getBingUrlTemplate=function(i){var e;return e=this.isDestroyed?e:new Promise(function(t){var e=new Y.Fetch({url:i});e.onSuccess=function(e){e=e.resourceSets[0].resources[0];t(e.imageUrl)},e.send()})},f.prototype.findVisibleLayers=function(e,t,i,o,n,a){void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===o&&(o=!1),void 0===n&&(n=!1),void 0===a&&(a=!1);for(var l=0,r=e;l<r.length;l++){var s=r[l];if(t=s.visible||t,s.visible){for(var d=s.bubbleSettings,p=s.markerSettings,h=s.polygonSettings,m=0,c=s.navigationLineSettings;m<c.length;m++){var u=c[m];u.visible&&(n=!Y.isNullOrUndefined(u.highlightSettings)&&u.highlightSettings.enable||n,a=!Y.isNullOrUndefined(u.selectionSettings)&&u.selectionSettings.enable||a)}for(var g=0,y=h.polygons;g<y.length;g++){var f=y[g];!Y.isNullOrUndefined(f.points)&&0<f.points.length&&(n=s.polygonSettings.highlightSettings.enable||n,a=s.polygonSettings.selectionSettings.enable||a,o=s.polygonSettings.tooltipSettings.visible||o)}for(var b=0,S=p;b<S.length;b++){var v=S[b];if(v.visible&&(o=v.tooltipSettings.visible||o,n=v.selectionSettings.enable||n,a=v.highlightSettings.enable||a),o)break}for(var x=0,O=d;x<O.length;x++){var C=O[x];if(C.visible&&(o=C.tooltipSettings.visible||o,n=C.selectionSettings.enable||n,a=C.highlightSettings.enable||a),o)break}o=s.tooltipSettings.visible||o,n=s.selectionSettings.enable||n,a=s.highlightSettings.enable||a}if(t&&i&&o)break}return{layer:t,bubble:i,tooltip:o,selection:n,highlight:a}},f.prototype.getGeoLocation=function(e,t,i){var o,n,a=null,l=null;return this.isDestroyed||this.isTileMap||(n=document.getElementById(this.element.id),o=this.element.getBoundingClientRect(),t=t-n.offsetLeft-(o.left-n.offsetLeft)-window.scrollX,i=i-n.offsetTop-(o.top-n.offsetTop)-window.scrollY,n=(o=nt(this,this.layersCollection[e],!1).location).x*this.scale,e=o.y*this.scale,o=Math.min(this.mapAreaRect.height,this.mapAreaRect.width)*this.mapLayerPanel.currentFactor*this.scale,t=this.clip(t-n,0,o-1)/o-.5,n=.5-this.clip(i-e,0,o-1)/o,a=90-360*Math.atan(Math.exp(2*-n*Math.PI))/Math.PI,l=360*t),{latitude:a,longitude:l}},f.prototype.clip=function(e,t,i){return Math.min(Math.max(e,t),i)},f.prototype.getTileGeoLocation=function(e,t){var i,o=null,n=null;return this.isTileMap&&(i=document.getElementById(this.element.id+"_tile_parent"),this.isDestroyed||Y.isNullOrUndefined(i)||(o=(e=this.pointToLatLong(e+this.mapAreaRect.x-i.offsetLeft,t+this.mapAreaRect.y-i.offsetTop)).latitude,n=e.longitude)),{latitude:o,longitude:n}},f.prototype.pointToLatLong=function(e,t){var i,o=0,n=0;return this.isDestroyed||Y.isNullOrUndefined(this.translatePoint)||(t=Y.isNullOrUndefined(this.markerDragArgument)?t:t+10,i=256*Math.pow(2,this.tileZoomLevel),e=this.clip(e-this.translatePoint.x*this.scale,0,i-1)/i-.5,t=.5-this.clip(t-this.translatePoint.y*this.scale,0,i-1)/i,o=90-360*Math.atan(Math.exp(2*-t*Math.PI))/Math.PI,n=360*e),{latitude:o,longitude:n}},y([Y.Property(null)],f.prototype,"background",void 0),y([Y.Property(!1)],f.prototype,"useGroupingSeparator",void 0),y([Y.Property(null)],f.prototype,"format",void 0),y([Y.Property(null)],f.prototype,"width",void 0),y([Y.Property(null)],f.prototype,"height",void 0),y([Y.Property("MouseMove")],f.prototype,"tooltipDisplayMode",void 0),y([Y.Property(!1)],f.prototype,"allowPrint",void 0),y([Y.Property(!1)],f.prototype,"allowImageExport",void 0),y([Y.Property(!1)],f.prototype,"allowPdfExport",void 0),y([Y.Complex({},lo)],f.prototype,"titleSettings",void 0),y([Y.Complex({},po)],f.prototype,"zoomSettings",void 0),y([Y.Complex({},go)],f.prototype,"legendSettings",void 0),y([Y.Collection([],Lo)],f.prototype,"layers",void 0),y([Y.Collection([],Gt)],f.prototype,"annotations",void 0),y([Y.Complex({},fi)],f.prototype,"margin",void 0),y([Y.Complex({color:"#DDDDDD",width:0},a)],f.prototype,"border",void 0),y([Y.Property("Material")],f.prototype,"theme",void 0),y([Y.Property("Mercator")],f.prototype,"projectionType",void 0),y([Y.Property(0)],f.prototype,"baseLayerIndex",void 0),y([Y.Property(null)],f.prototype,"description",void 0),y([Y.Property(0)],f.prototype,"tabIndex",void 0),y([Y.Complex({latitude:null,longitude:null},si)],f.prototype,"centerPosition",void 0),y([Y.Complex({},t)],f.prototype,"mapsArea",void 0),y([Y.Event()],f.prototype,"load",void 0),y([Y.Event()],f.prototype,"beforePrint",void 0),y([Y.Event()],f.prototype,"loaded",void 0),y([Y.Event()],f.prototype,"click",void 0),y([Y.Event()],f.prototype,"onclick",void 0),y([Y.Event()],f.prototype,"doubleClick",void 0),y([Y.Event()],f.prototype,"rightClick",void 0),y([Y.Event()],f.prototype,"resize",void 0),y([Y.Event()],f.prototype,"tooltipRender",void 0),y([Y.Event()],f.prototype,"legendRendering",void 0),y([Y.Event()],f.prototype,"tooltipRenderComplete",void 0),y([Y.Event()],f.prototype,"shapeSelected",void 0),y([Y.Event()],f.prototype,"itemSelection",void 0),y([Y.Event()],f.prototype,"itemHighlight",void 0),y([Y.Event()],f.prototype,"shapeHighlight",void 0),y([Y.Event()],f.prototype,"layerRendering",void 0),y([Y.Event()],f.prototype,"shapeRendering",void 0),y([Y.Event()],f.prototype,"markerRendering",void 0),y([Y.Event()],f.prototype,"markerClusterRendering",void 0),y([Y.Event()],f.prototype,"markerClick",void 0),y([Y.Event()],f.prototype,"markerDragStart",void 0),y([Y.Event()],f.prototype,"markerDragEnd",void 0),y([Y.Event()],f.prototype,"markerClusterClick",void 0),y([Y.Event()],f.prototype,"markerClusterMouseMove",void 0),y([Y.Event()],f.prototype,"markerMouseMove",void 0),y([Y.Event()],f.prototype,"dataLabelRendering",void 0),y([Y.Event()],f.prototype,"bubbleRendering",void 0),y([Y.Event()],f.prototype,"bubbleClick",void 0),y([Y.Event()],f.prototype,"bubbleMouseMove",void 0),y([Y.Event()],f.prototype,"animationComplete",void 0),y([Y.Event()],f.prototype,"annotationRendering",void 0),y([Y.Event()],f.prototype,"zoom",void 0),y([Y.Event()],f.prototype,"pan",void 0),y([Y.Event()],f.prototype,"panComplete",void 0),y([Y.Event()],f.prototype,"zoomComplete",void 0),y([Y.NotifyPropertyChanges],f));function f(e,t){e=cn.call(this,e,t)||this;return e.isTileMap=!1,e.isResize=!1,e.isReset=!1,e.baseSize=new H(0,0),e.translatePoint=new J(0,0),e.baseTranslatePoint=new J(0,0),e.zoomTranslatePoint=new J(0,0),e.markerZoomedState=!0,e.zoomPersistence=!1,e.defaultState=!0,e.centerPositionChanged=!1,e.markerNullCount=0,e.tileTranslatePoint=new J(0,0),e.baseTileTranslatePoint=new J(0,0),e.isDevice=!1,e.staticMapZoom=e.zoomSettings.enable?e.zoomSettings.zoomFactor:0,e.zoomNotApplied=!1,e.dataLabelShape=[],e.zoomShapeCollection=[],e.zoomLabelPositions=[],e.mouseDownEvent={x:null,y:null},e.mouseClickEvent={x:null,y:null},e.selectedElementId=[],e.selectedMarkerElementId=[],e.selectedBubbleElementId=[],e.selectedNavigationElementId=[],e.selectedPolygonElementId=[],e.selectedLegendElementId=[],e.legendSelectionCollection=[],e.shapeSelections=!0,e.legendSelection=!0,e.toggledLegendId=[],e.toggledElementId=[],e.checkInitialRender=!0,e.initialTileTranslate=new J(0,0),e.isMarkerZoomCompleted=!1,e.markerDragId="",e.initialCheck=!0,e.applyZoomReset=!1,e.markerClusterExpandCheck=!1,e.markerClusterExpand=!1,e.mouseMoveId="",e.shapeSelectionItem=[],e.markerDragArgument=null,Y.setValue("mergePersistData",e.mergePersistMapsData,e),e}un.prototype.renderBubble=function(a,e,t,i,l,r,s,d,p,h){var m=this,o=d.layerData,n=a.colorValuePath,c=!Y.isNullOrUndefined(n)&&-1<n.indexOf(".")?k(e,a.colorValuePath):e[n],n=!Y.isNullOrUndefined(n)&&-1<n.indexOf(".")?Number(k(e,a.colorValuePath)):Number(e[n]),u=!Y.isNullOrUndefined(a.valuePath)&&-1<a.valuePath.indexOf(".")?Number(k(e,a.valuePath)):Number(e[a.valuePath]);if(isNaN(u)&&isNaN(n)&&Y.isNullOrUndefined(c))return null;for(var g=Ke(a.minRadius,a.maxRadius,u,i.min,i.max),u=new rn(this.maps).getColorByValue(a.colorMapping,n,c),i="[object Object]"!==Object.prototype.toString.call(u)||Y.isNullOrUndefined(u.fill)?t:u.fill,y=("[object Object]"!==Object.prototype.toString.call(u)||Y.isNullOrUndefined(u.opacity)?a:u).opacity,f=[[]],b=(this.maps.translateType="bubble",0),S=0,v=0,x=0,O=o.length;x<O;x++){var C=(C=o[x]).property,_=Je(e[d.shapeDataPath],d.shapePropertyPath,C);if((!Y.isNullOrUndefined(e[d.shapeDataPath])&&isNaN(e[d.shapeDataPath])?e[d.shapeDataPath].toLowerCase():e[d.shapeDataPath])===(!Y.isNullOrUndefined(C[_])&&isNaN(C[_])?C[_].toLowerCase():C[_])&&"LineString"!==o[x].type&&"MultiLineString"!==o[x].type&&"Point"!==o[x].type&&"MultiPoint"!==o[x].type)if(o[x]._isMultiPolygon)for(var M=o[x],L=0;L<M.length;L++)f.push(this.getPoints(M[L],[])),S<(v=f[f.length-1].length)&&(S=v,b=f.length-1);else f.push(this.getPoints(o[x],[])),S<(v=f[f.length-1].length)&&(S=v,b=f.length-1)}var P,n=this.maps.projectionType,c={color:a.border.color,opacity:a.border.opacity,width:a.border.width},t=$e(f[b],n,d.geometryType);if(a.visible){if(Y.isNullOrUndefined(t)){u=f.length-1;if(!f[u].x||!f[u].y)return;P={cancel:!1,name:qo,border:c,cx:f[u].x,cy:f[u].y,data:e,fill:i,maps:this.maps,radius:g}}else n="Mercator"===this.maps.projectionType?t.y:-t.y,P={cancel:!1,name:qo,border:c,cx:t.x,cy:n,data:e,fill:i,maps:this.maps,radius:g};this.maps.trigger("bubbleRendering",P,function(e){var t,i,o,n;!P.cancel&&(P.border.opacity=Y.isNullOrUndefined(P.border.opacity)?y:P.border.opacity,t="Circle"===a.bubbleType?(t=new me(h,P.fill,P.border,y,0,0,P.radius,null),He(m.maps,t,p)):(t="Mercator"===m.maps.projectionType?P.cy-g:P.cy+g,o=new Q(h,P.fill,P.border,y,new K(0,0,2*g,2*g),2,2),P.cx-=g,P.cy=t,We(m.maps,o,p)),Re(m.maps.selectedBubbleElementId,m.maps.bubbleSelectionClass,t,"BubbleselectionMapStyle"),m.bubbleCollection.push({LayerIndex:s,BubbleIndex:l,DataIndex:r,element:t,center:{x:P.cx,y:P.cy}}),o=0!==d.animationDuration||"Enable"===Y.animationMode||Y.isNullOrUndefined(m.maps.zoomModule),o=(1<m.maps.zoomSettings.zoomFactor&&!Y.isNullOrUndefined(m.maps.zoomModule)&&!m.maps.isTileMap?at:nt)(m.maps,d,o),i=a.dataSource,n=o.scale,o=o.location,o=new T(m.maps.isTileMap?(P.cx+m.maps.translatePoint.x)*m.maps.tileZoomLevel:(P.cx+o.x)*n,m.maps.isTileMap?(P.cy+m.maps.translatePoint.y)*m.maps.tileZoomLevel:(P.cy+o.y)*n),t.setAttribute("transform","translate( "+o.x+" "+o.y+" )"),n=i.length-1===r?"bubble":null,"Square"===a.bubbleType?(o.x+=g,o.y+=g*("Mercator"===m.maps.projectionType?1:-1)):g=0,0<a.animationDuration||"Enable"===Y.animationMode)&&ft(t,a.animationDelay,a.animationDuration,o,m.maps,n,g)})}},un.prototype.getPoints=function(e,t){return Y.isNullOrUndefined(e.map)?t=e.point:e.map(function(e){t.push(new J(e.point.x,e.point.y))}),t},un.prototype.bubbleClick=function(e){var t,i=e.target.id;-1===i.indexOf("_LayerIndex_")||(t=this.getbubble(i),Y.isNullOrUndefined(t))||(t={cancel:!1,name:Yo,data:t,maps:this.maps,target:i,x:e.clientX,y:e.clientY},this.maps.trigger(Yo,t))},un.prototype.getbubble=function(e){var t=e.split("_LayerIndex_"),i=parseInt(t[1].split("_")[0],10);if(-1<e.indexOf("_BubbleIndex_")){e=this.maps.layers[i],i=parseInt(t[1].split("_BubbleIndex_")[1],10),t=parseInt(t[1].split("_BubbleIndex_")[1].split("_dataIndex_")[1],10);if(!isNaN(i))return e.bubbleSettings[i].dataSource[t]}return null},un.prototype.bubbleMove=function(e){var t,i=e.target.id;-1===i.indexOf("_LayerIndex_")||(t=this.getbubble(i),Y.isNullOrUndefined(t))||(t={cancel:!1,name:Jo,data:t,maps:this.maps,target:i,x:e.clientX,y:e.clientY},this.maps.trigger(Jo,t))},un.prototype.getModuleName=function(){return"Bubble"},un.prototype.destroy=function(){this.bubbleCollection=[],this.maps=null};y=un;function un(e){this.id="",this.maps=e,this.bubbleCollection=[]}b.prototype.getMapsInstance=function(){return this.maps},b.prototype.markerRender=function(u,g,y,f,b){var S,v=this,x=0,O=0,C=0,_=(u.translateType="marker",u.layersCollection[y]),M=(this.markerSVGObject=u.renderer.createGroup({id:u.element.id+"_Markers_Group",class:"GroupElement"}),this.markerSVGObject.style.pointerEvents="auto",Y.createElement("div",{id:u.element.id+"_LayerIndex_"+y+"_Markers_Template_Group",className:u.element.id+"_template"})),e=(M.style.cssText="overflow: hidden; position: absolute;pointer-events: none;top:"+u.mapAreaRect.y+"px;left:"+u.mapAreaRect.x+"px;height:"+u.mapAreaRect.height+"px;width:"+u.mapAreaRect.width+"px;",0!==_.animationDuration||"Enable"===Y.animationMode||Y.isNullOrUndefined(u.zoomModule));u.isTileMap||(S=(!Y.isNullOrUndefined(u.zoomModule)&&1<u.zoomSettings.zoomFactor?at:nt)(u,_,e)),Array.prototype.forEach.call(_.markerSettings,function(h,m){var c=h.dataSource;Y.isNullOrUndefined(h.dataSource)||Array.prototype.forEach.call(c,function(s,d){u.markerNullCount=0<m&&0===d?0:u.markerNullCount;var p={cancel:!1,name:Zo,fill:h.fill,height:h.height,width:h.width,imageUrl:h.imageUrl,shape:h.shape,template:h.template,data:s,maps:u,marker:h,border:h.border,colorValuePath:h.colorValuePath,shapeValuePath:h.shapeValuePath,imageUrlValuePath:h.imageUrlValuePath};u.trigger("markerRendering",p,function(e){p=ke(p=Ie(p,s),s);var t,i,o=Y.isNullOrUndefined(h.longitudeValuePath)?Y.isNullOrUndefined(s.longitude)?Y.isNullOrUndefined(s.Longitude)?null:parseFloat(s.Longitude):parseFloat(s.longitude):Number(k(s,h.longitudeValuePath)),n=Y.isNullOrUndefined(h.latitudeValuePath)?Y.isNullOrUndefined(s.latitude)?Y.isNullOrUndefined(s.Latitude)?null:parseFloat(s.Latitude):parseFloat(s.latitude):Number(k(s,h.latitudeValuePath)),a=h.offset,l=(p.cancel||!h.visible||Y.isNullOrUndefined(o)||Y.isNullOrUndefined(n)||(l=u.element.id+"_LayerIndex_"+y+"_MarkerIndex_"+m+"_dataIndex_"+d,r=u.isTileMap?R(new T(o,n),f,u.tileTranslatePoint,!0):B(n,o,f,_,u),u.isTileMap&&(S="SubLayer"===_.type&&Y.isNullOrUndefined(u.zoomModule)?r=R(new T(o,n),u.tileZoomLevel,u.tileTranslatePoint,!0):new Object),t=("AddMarker"===b?u:S).scale,i="AddMarker"===b?u.translatePoint:S.location,!p.template||isNaN(r.x)||isNaN(r.y)?p.template||isNaN(r.x)||isNaN(r.y)||(x++,Ze(p,h,c,d,r,i,l,a,t,u,v.markerSVGObject)):(C++,De(p,void 0,l,s,m,M,r,i,t,a,u),u.renderReactTemplates())),O+=isNaN(n)||isNaN(o)?1:0,C+=p.cancel?1:0,x+=p.cancel?1:0,u.markerNullCount=Y.isNullOrUndefined(o)||Y.isNullOrUndefined(n)?u.markerNullCount+1:u.markerNullCount,c.length-u.markerNullCount),r=!1;v.markerSVGObject.childElementCount===l-C-O&&"Template"!==b&&(g.appendChild(v.markerSVGObject),_.markerClusterSettings.allowClustering)&&(u.svgObject.appendChild(v.markerSVGObject),u.element.appendChild(u.svgObject),-1!==_.urlTemplate.indexOf("openstreetmap")&&Y.isNullOrUndefined(_.shapeData)&&u.zoomSettings.enable?(r=ze(_,v.markerSVGObject,u,y,v.markerSVGObject,g,!0,!1),g.appendChild(v.markerSVGObject)):r=ze(_,v.markerSVGObject,u,y,v.markerSVGObject,g,!0,!1),u.renderReactTemplates()),M.childElementCount===l-x-O&&N(u.element.id+"_Secondary_Element")&&(N(u.element.id+"_Secondary_Element").appendChild(M),u.checkInitialRender)&&_.markerClusterSettings.allowClustering&&!r&&(ze(_,M,u,y,v.markerSVGObject,g,!1,!1),u.renderReactTemplates())})})})},b.prototype.calculateIndividualLayerMarkerZoomLevel=function(e,t,i){var o=Math.abs(this.maps.baseMapBounds.latitude.max-this.maps.baseMapBounds.latitude.min),n=Math.abs(this.maps.baseMapBounds.longitude.max-this.maps.baseMapBounds.longitude.min),t=Math.floor(Math.log(t/o)),o=(t=i<t?i:t,i<(o=Math.floor(Math.log(e/n)))?i:o),e=Math.min(t,o),n=Math.min(e,i-1);return this.maps.isTileMap||jt(n,this.maps),n},b.prototype.calculateZoomCenterPositionAndFactor=function(e){var o,n,a,l,t,i,r,s,d,p;Y.isNullOrUndefined(this.maps)||(this.maps.zoomSettings.shouldZoomInitially&&this.maps.markerModule?(r=i=t=void 0,s=this.maps.zoomSettings.maxZoom,d=this.maps.mapAreaRect.width,p=this.maps.mapAreaRect.height,this.maps.markerZoomedState=this.maps.markerZoomedState||(!Y.isNullOrUndefined(this.maps.markerZoomFactor)&&1<this.maps.markerZoomFactor?this.maps.markerZoomedState:!this.maps.markerZoomedState),this.maps.defaultState=this.maps.markerZoomedState?!this.maps.markerZoomedState:this.maps.defaultState,Array.prototype.forEach.call(e,function(e){0!==e.markerSettings.length&&Array.prototype.forEach.call(e.markerSettings,function(e){e=e.dataSource;!Y.isNullOrUndefined(e)&&0<e.length&&Array.prototype.forEach.call(e,function(e,t){var i=Y.isNullOrUndefined(e.latitude)?Y.isNullOrUndefined(e.Latitude)?null:parseFloat(e.Latitude):parseFloat(e.latitude),e=Y.isNullOrUndefined(e.longitude)?Y.isNullOrUndefined(e.Longitude)?null:parseFloat(e.Longitude):parseFloat(e.longitude);Y.isNullOrUndefined(i)||Y.isNullOrUndefined(e)||(o=Y.isNullOrUndefined(o)&&0===t?e:o,n=Y.isNullOrUndefined(n)&&0===t?i:n,a=Y.isNullOrUndefined(a)&&0===t?i:a,l=Y.isNullOrUndefined(l)&&0===t?e:l,e<o&&(o=e),i<a&&(a=i),l<e&&(l=e),n<i&&(n=i))})})}),Y.isNullOrUndefined(a)||Y.isNullOrUndefined(o)||Y.isNullOrUndefined(l)||Y.isNullOrUndefined(n)||(i=(a+n)/2,r=(o+l)/2,this.maps.markerCenterLatitude=i,this.maps.markerCenterLongitude=r,(Y.isNullOrUndefined(this.maps.markerZoomCenterPoint)||this.maps.markerZoomedState)&&(this.maps.markerZoomCenterPoint={latitude:i,longitude:r}),e=void 0,this.maps.isTileMap||0===this.maps.baseMapRectBounds.min.x?(t=Zt(a,n,o,l,d,p,this.maps,!1),this.maps.isTileMap?e=!Y.isNullOrUndefined(this.maps.markerZoomFactor)&&!Y.isNullOrUndefined(this.maps.mapScaleValue)&&1<this.maps.mapScaleValue&&1!==this.maps.markerZoomFactor?this.maps.mapScaleValue:t:(e=!Y.isNullOrUndefined(this.maps.mapScaleValue)&&1!==Math.floor(this.maps.scale)&&this.maps.mapScaleValue!==t&&Y.isNullOrUndefined(this.maps.shouldZoomCurrentFactor)?this.maps.mapScaleValue:t)!==this.maps.mapScaleValue||1!==this.maps.markerZoomFactor&&1!==this.maps.mapScaleValue||this.maps.enablePersistence||(e=t)):(t=this.calculateIndividualLayerMarkerZoomLevel(d,p,s),e=!Y.isNullOrUndefined(this.maps.mapScaleValue)&&this.maps.mapScaleValue!==t?this.maps.mapScaleValue:t),this.maps.markerZoomFactor=e)):(this.maps.markerZoomedState=!1,1<this.maps.markerZoomFactor&&(this.maps.markerCenterLatitude=null,this.maps.markerCenterLongitude=null,this.maps.markerZoomFactor=1,this.maps.enablePersistence||(this.maps.mapScaleValue=1)),this.maps.isTileMap&&!this.maps.enablePersistence&&this.maps.mapScaleValue<=1&&(this.maps.tileZoomLevel=0===this.maps.mapScaleValue?this.maps.isZoomByPosition?this.maps.tileZoomLevel:1:this.maps.mapScaleValue,1!==this.maps.mapScaleValue||1!==this.maps.markerZoomFactor||Y.isNullOrUndefined(this.maps.tileTranslatePoint)||(this.maps.tileTranslatePoint.x=0,this.maps.tileTranslatePoint.y=0))))},b.prototype.markerClick=function(e){var t,i,o,n,a,l,r=e.target.id;-1===(r=-1===r.indexOf(this.maps.element.id)&&(t=e.target.closest("."+this.maps.element.id+"_marker_template_element"),!Y.isNullOrUndefined(t))&&-1<t.id.indexOf("_MarkerIndex_")?t.id:r).indexOf("_LayerIndex_")||0<r.indexOf("_cluster_")||(t=this.getMarker(r),Y.isNullOrUndefined(t))||(t.marker.enableDrag&&(document.getElementById(this.maps.element.id+"_svg").style.cursor="grabbing"),l={cancel:!1,name:Ro,data:t.data,maps:this.maps,marker:t.marker,target:r,x:e.clientX,y:e.clientY,latitude:t.data.latitude||t.data.Latitude,longitude:t.data.longitude||t.data.Longitude,value:t.data.name},this.maps.trigger(Ro,l),!t.marker.enableDrag)||(l=!1,i=parseInt(r.split("_LayerIndex_")[1].split("_")[0],10),o=parseInt(r.split("_MarkerIndex_")[1].split("_")[0],10),n=parseInt(r.split("_dataIndex_")[1].split("_")[0],10),a=this.maps.layers[i].markerSettings[o],l=0<this.sameMarkerData.length?0<this.sameMarkerData[0].data.filter(function(e){return e.index===n}).length&&this.sameMarkerData[0].layerIndex===i&&this.sameMarkerData[0].markerIndex===o:l)||(l={name:Vo,x:e.clientX,y:e.clientY,latitude:t.data.latitude||t.data.Latitude,longitude:t.data.longitude||t.data.Longitude,layerIndex:i,markerIndex:o,dataIndex:n},this.maps.trigger(Vo,l),this.maps.markerDragArgument={targetId:r,x:e.clientX,y:e.clientY,latitude:t.data.latitude||t.data.Latitude,longitude:t.data.longitude||t.data.Longitude,shape:Y.isNullOrUndefined(a.shapeValuePath)?a.shape:a.dataSource[n][a.shapeValuePath],layerIndex:i,markerIndex:o,dataIndex:n})},b.prototype.markerClusterClick=function(e){var t,i=e.target.id;-1===i.indexOf("_LayerIndex_")||-1===i.indexOf("_cluster_")||(t=this.getMarker(i),Y.isNullOrUndefined(t))||(0<t.clusterCollection.length&&this.maps.markerClusterExpand&&(F(this.maps.element.id+"_mapsTooltip")&&-1<this.maps.mapsTooltipModule.tooltipTargetID.indexOf("_MarkerIndex_")&&P(this.maps.element.id+"_mapsTooltip"),0<this.sameMarkerData.length&&!this.maps.markerClusterExpandCheck?(this.maps.markerClusterExpandCheck=!0,Ue(this.sameMarkerData,this.maps)):(this.sameMarkerData=t.clusterCollection,this.maps.markerClusterExpandCheck=!1,je(this.sameMarkerData,this.maps,this.markerSVGObject,!0))),i={cancel:!1,name:Go,data:t,maps:this.maps,target:i,x:e.clientX,y:e.clientY,latitude:t.data.latitude||t.data.Latitude,longitude:t.data.longitude||t.data.Longitude,markerClusterCollection:t.markCollection},this.maps.trigger(Go,i))},b.prototype.getMarker=function(e){var t=e.split("_LayerIndex_"),i=parseInt(t[1].split("_")[0],10),o=this.maps.layers[i],n=[],a=[];if(this.maps.markerClusterExpand=o.markerClusterSettings.allowClusterExpand,-1<e.indexOf("_MarkerIndex_")){var l=parseInt(t[1].split("_MarkerIndex_")[1].split("_")[0],10),t=parseInt(t[1].split("_dataIndex_")[1].split("_")[0],10),r=o.markerSettings[l];if(!isNaN(l)){var s=r.dataSource[t],d=[];if(!r.template&&-1<e.indexOf("_cluster_")&&this.maps.layers[i].markerClusterSettings.allowClusterExpand&&Array.prototype.forEach.call(r.dataSource,function(e,t){e.latitude===s.latitude&&e.longitude===s.longitude&&d.push({data:s,index:t})}),-1<e.indexOf("_cluster_")){for(var p=document.getElementById(-1<e.indexOf("_datalabel_")?"Balloon"===o.markerClusterSettings.shape?e.split("_datalabel_")[0]+"_Group":e.split("_datalabel_")[0]:"Balloon"===o.markerClusterSettings.shape?e+"_Group":e),o=("Balloon"===o.markerClusterSettings.shape?p.children[0]:p).textContent.split(",").map(Number),d=[],h=0,m=o;h<m.length;h++){var c=m[h];d.push({data:r.dataSource[c],index:c}),n.push(r.dataSource[c])}a.push({data:d,layerIndex:i,markerIndex:l,dataIndex:t,targetClusterIndex:+(-1<e.split("_cluster_")[1].indexOf("_datalabel_")?e.split("_cluster_")[1].split("_datalabel_")[0]:e.split("_cluster_")[1]),isClusterSame:!1})}return{marker:r,data:s,clusterCollection:a,markCollection:n}}}return null},b.prototype.markerMove=function(e){var t,i=e.target.id;-1===i.indexOf("_LayerIndex_")||0<i.indexOf("_cluster_")||(t=this.getMarker(i),Y.isNullOrUndefined(t))||(t.marker.enableDrag&&(document.getElementById(this.maps.element.id+"_svg").style.cursor=Y.isNullOrUndefined(this.maps.markerDragArgument)?"pointer":"grabbing"),t={cancel:!1,name:Ho,data:t.data,maps:this.maps,target:i,x:e.clientX,y:e.clientY},this.maps.trigger(Ho,t))},b.prototype.markerClusterMouseMove=function(e){var t,i=e.target.id;-1===i.indexOf("_LayerIndex_")||-1===i.indexOf("_cluster_")||(t=this.getMarker(i),this.maps.markerClusterExpand&&(e.target.style.cursor="pointer"),Y.isNullOrUndefined(t))||(t={cancel:!1,name:Wo,data:t.data,maps:this.maps,target:i,x:e.clientX,y:e.clientY},this.maps.trigger(Wo,t))},b.prototype.initializeMarkerClusterList=function(){for(var e=0;e<this.maps.layers.length;e++)this.initialMarkerCluster[e]=[],this.zoomedMarkerCluster[e]=[]},b.prototype.getModuleName=function(){return"Marker"},b.prototype.destroy=function(){this.maps=null,this.trackElements=[],this.markerSVGObject=null,this.sameMarkerData=[],this.initialMarkerCluster=[],this.zoomedMarkerCluster=[]};var gn=b;function b(e){this.maps=e,this.trackElements=[],this.sameMarkerData=[],this.initialMarkerCluster=[],this.zoomedMarkerCluster=[]}fn.prototype.polygonRender=function(n,a,l){var r=n.layersCollection[a],s=n.renderer.createGroup({id:n.element.id+"_LayerIndex_"+a+"_Polygons_Group"});return r.polygonSettings.polygons.map(function(e,t){var i=n.renderer.createGroup({id:n.element.id+"_LayerIndex_"+a+"_Polygons_Group_"+t}),o=e.points;!Y.isNullOrUndefined(e.points)&&0<e.points.length&&(o=D(n,l,r,o),t=new A(n.element.id+"_LayerIndex_"+a+"_PolygonIndex_"+t,e.fill,e.borderWidth/l,e.borderColor,e.opacity,e.borderOpacity,"",o),e=n.renderer.drawPath(t),Re(n.selectedPolygonElementId,n.polygonSelectionClass,e,"PolygonselectionMapStyle"),i.appendChild(e),s.appendChild(i))}),s},fn.prototype.getModuleName=function(){return"Polygon"},fn.prototype.destroy=function(){};var yn=fn;function fn(e){}Sn.prototype.getDataLabel=function(e,t,i,o){for(var n,a=0;a<(Y.isNullOrUndefined(e)?0:e.length);a++){var l=e[a],r=!Y.isNullOrUndefined(l[o])&&isNaN(l[o])&&"string"==typeof l[o]?l[o].toLowerCase():l[o];if(i=Y.isNullOrUndefined(i)||"string"!=typeof i?i:i.toString(),r===(Y.isNullOrUndefined(i)||"string"!=typeof i?i:i.toLowerCase())){n=l;break}}return n},Sn.prototype.renderLabel=function(g,y,e,t,D,f,b,S){var v,x,O,C,R,V,G,p,_,M=this,i=g.dataLabelSettings,L=g.dataLabelSettings.textStyle,P=g.dataLabelSettings,o=g.dataLabelSettings.labelPath,w=[[]],T=0,n=0,I=e,k="",a=0,H=!1,h=e.properties,N=this.maps.element.id+"_LayerIndex_"+y+"_shapeIndex_"+b+"_LabelIndex_"+b,F=new J(0,0),l=t[b],m=(L.fontFamily="material"!==this.maps.theme.toLowerCase()?this.maps.themeStyle.labelFontFamily:L.fontFamily,L.fontWeight=L.fontWeight||this.maps.themeStyle.fontWeight,L.size=L.size||this.maps.themeStyle.fontSize,e=Y.isNullOrUndefined(l)?null:l.property,"[object Array]"===Object.prototype.toString.call(g.shapePropertyPath)?g.shapePropertyPath:[g.shapePropertyPath]),e=0!==g.animationDuration||"Enable"===Y.animationMode||Y.isNullOrUndefined(this.maps.zoomModule),e=this.maps.isTileMap?new Object:(1<this.maps.zoomSettings.zoomFactor&&!Y.isNullOrUndefined(this.maps.zoomModule)?at:nt)(this.maps,g,e),E=(this.maps.isTileMap?this.maps:e).scale,z=this.maps.isTileMap?this.maps.translatePoint:e.location,B=this.maps.zoomTranslatePoint,A=Y.isNullOrUndefined(this.maps.scale)?1:Math.floor(this.maps.scale),U=this.maps.zoomSettings.enable&&!Y.isNullOrUndefined(this.maps.zoomShapeCollection)&&0<this.maps.zoomShapeCollection.length&&!this.maps.isAddLayer;this.maps.translateType="labels";for(var r=0;r<m.length&&!(h[m[r]]&&(p=m[r],C=this.getDataLabel(g.dataSource,g.shapeDataPath,I.properties[p],g.shapeDataPath)));r++);if(C=this.getDataLabel(g.dataSource,g.shapeDataPath,I.properties[p],g.shapeDataPath),!Y.isNullOrUndefined(l)&&!Y.isNullOrUndefined(l.property))if(w=[[]],t[b]._isMultiPolygon||"Point"===t[b].type||"MultiPoint"===t[b].type){if("Point"!==t[b].type&&"MultiPoint"!==t[b].type)for(var c=t[b],r=0;r<c.length;r++)w.push(this.getPoint(c[r],[])),n<(a=w[w.length-1].length)&&(n=a,T=w.length-1)}else w.push(this.getPoint(t[b],[])),n<(a=w[w.length-1].length)&&(n=a,T=w.length-1);if(k=Y.isNullOrUndefined(C)?I.properties[o]:Y.isNullOrUndefined(C[o])?C[g.shapeDataPath]:C[o].toString(),"[object Array]"===Object.prototype.toString.call(g.shapePropertyPath)&&Y.isNullOrUndefined(k)&&!Y.isNullOrUndefined(g.dataSource)&&0===g.dataSource.length)for(var s=0;s<g.shapePropertyPath.length;s++)if(I.properties[g.shapePropertyPath[s]]){k=I.properties[g.shapePropertyPath[s]];break}Y.isNullOrUndefined(k)&&""!==g.dataLabelSettings.template&&0===g.dataSource.length&&(k=I.properties[g.shapePropertyPath]);var j,W=k=Y.isNullOrUndefined(k)&&!Y.isNullOrUndefined(g.dataSource)&&0<g.dataSource.length?"":k,X=this.maps.projectionType,q=j=$e(w[T],X,g.geometryType);if(!Y.isNullOrUndefined(k)&&!Y.isNullOrUndefined(j)){if(U&&1<A&&!this.maps.zoomNotApplied&&""===i.template){if(0<y)for(var d=0;d<this.maps.zoomLabelPositions.length;d++)if(this.maps.zoomLabelPositions[d].dataLabelText===k){R=b,b=d,H=!0;break}V=j.x,G=j.y,j.x=(j.x+B.x)*E,j.y=(j.y+B.y)*E}j.y="Mercator"===this.maps.projectionType||"Normal"===g.geometryType?j.y:-j.y,Y.isNullOrUndefined(this.maps.format)||isNaN(Number(k))||isNaN(parseFloat(k))||this.maps.useGroupingSeparator&&(k=st(this.maps,parseFloat(k)),Y.isNullOrUndefined(C)||(C[o]=k));var Z={name:Xo,maps:this.maps,cancel:!1,border:{color:i.border.color,width:i.border.width,opacity:i.border.opacity},datalabel:i,fill:i.fill,template:i.template,text:k,offsetX:0,offsetY:0};this.maps.trigger("dataLabelRendering",Z,function(e){if(!Z.cancel){var t,i=U&&1<A&&!M.maps.zoomNotApplied&&M.maps.zoomShapeCollection.length>b?M.maps.dataLabelShape[b]*E:(j.rightMax.x-j.leftMax.x)*E,o=(Y.isNullOrUndefined(M.maps.dataLabelShape)||M.maps.isReset||(_=q.rightMax.x-q.leftMax.x,M.maps.dataLabelShape.push(_)),le(k=Z.text===k||Z.cancel?k:Z.text,L)),n=k,a=o,l=j.y-o.height/2,r=j.y+o.height/2,s=(j.y+z.y)*E-o.height/2,d=(j.y+z.y)*E+o.height/2,l=(5<(l=Qe(w[T],l,r)).length&&"MultiPolygon"!==I.geometry.type&&"MultiPolygon"!==I.type&&(r=$e(l,X,g.geometryType),U&&1<A&&!M.maps.zoomNotApplied&&""===Z.template&&(r.x=(M.maps.zoomLabelPositions[b].location.x+B.x)*E,r.y=(M.maps.zoomLabelPositions[b].location.y+B.y)*E),V=r.x,j.x=r.x,i=U&&1<A&&!M.maps.zoomNotApplied&&M.maps.zoomShapeCollection.length>b?M.maps.dataLabelShape[b]*E:0<(r.rightMax.x-r.leftMax.x)*E?(r.rightMax.x-r.leftMax.x)*E:i),(j.x+z.x)*E+o.width/2),r=(j.x+z.x)*E-o.width/2;if(M.value[b]={rightWidth:l,leftWidth:r,heightTop:s,heightBottom:d},""!==Z.template){l=(_=dt(Z.template,M.maps))?_(Y.isNullOrUndefined(C)?I.properties:C,M.maps,Z.template,M.maps.element.id+"_LabelTemplate",!1):document.createElement("div");l.innerHTML=_?"":Z.template,t=we(l,N,Y.isNullOrUndefined(C)?I.properties:C),M.maps.isTileMap?(t.style.left=(j.x+z.x)*E-o.width/2+"px",t.style.top=(j.y+z.y)*E-o.height+"px"):(t.style.left=Math.abs(M.maps.baseMapRectBounds.min.x-j.x)*E+e.offsetX+"px",t.style.top=Math.abs(M.maps.baseMapRectBounds.min.y-j.y)*E+e.offsetY+"px"),f.appendChild(t)}else{r=Y.isNullOrUndefined(P.smartLabelMode)?"None":P.smartLabelMode.toString(),s=("Trim"===r&&(a=le(n=tt(i,"number"==typeof k?k.toString():k,L,null,!0),L),v=new se(N,F.x,F.y,"middle",n,"","")),"None"===r&&(v=new se(N,F.x,F.y,"middle",k,"","")),"Hide"===r&&(k=i>=o.width?k:"",v=new se(N,F.x,F.y,"middle",k,"","")),Y.isNullOrUndefined(v)||(k=v.text),Y.isNullOrUndefined(P.intersectionAction)?"None":P.intersectionAction.toString());if("Hide"===s){for(var p=0;p<S.length;p++)if(!Y.isNullOrUndefined(S[p])&&!(M.value[b].leftWidth>S[p].rightWidth||M.value[b].rightWidth<S[p].leftWidth||M.value[b].heightTop>S[p].heightBottom||M.value[b].heightBottom<S[p].heightTop)){k="";break}S.push(M.value[b]),v=new se(N,F.x,F.y,"middle",k,"","")}var h,m,c;if("Trim"===s){for(var u=0;u<S.length;u++)if(!Y.isNullOrUndefined(S[u]))if(S[u].rightWidth<M.value[b].leftWidth||S[u].leftWidth>M.value[b].rightWidth||S[u].heightBottom<M.value[b].heightTop||S[u].heightTop>M.value[b].heightBottom)n=k,0;else{if(M.value[b].leftWidth>S[u].leftWidth){n=tt((i=S[u].rightWidth-M.value[b].leftWidth)-(M.value[b].rightWidth-M.value[b].leftWidth),k,L,null,!0);break}if(M.value[b].leftWidth<S[u].leftWidth){i=M.value[b].rightWidth-S[u].leftWidth,n=tt(Math.abs(i-(M.value[b].rightWidth-M.value[b].leftWidth)),k,L,null,!0);break}}a=le(n,L),S.push(M.value[b]),v=new se(N,F.x,F.y,"middle",n,"","")}"None"===s&&(v=new se(N,F.x,F.y,"middle",k,"","")),1<n.length&&1<(d=Z.border).width&&(l=Z.fill,r=P.opacity,s=P.rx,h=P.ry,c=m=void 0,c=U&&1<A&&!M.maps.zoomNotApplied?(m=j.x-o.width/2,j.y-o.height/2-5):(m=(j.x+z.x)*E-o.width/2,(j.y+z.y)*E-o.height/2),d.opacity=Y.isNullOrUndefined(d.opacity)?r:d.opacity,l=new Q(M.maps.element.id+"_LayerIndex_"+y+"_shapeIndex_"+b+"_rectIndex_"+b,l,d,r,new K(m+e.offsetX,c+e.offsetY,o.width,o.height),s,h),(O=M.maps.renderer.drawRectangle(l)).setAttribute("visibility",0<g.dataLabelSettings.animationDuration||"Enable"===Y.animationMode?"hidden":"visibile"),D.appendChild(O)),(x=_e(v,L,L.color||M.maps.themeStyle.dataLabelFontColor,D)).setAttribute("aria-label",k),x.setAttribute("role","region"),x.setAttribute("visibility",0<g.dataLabelSettings.animationDuration||"Enable"===Y.animationMode?"hidden":"visibile"),U&&1<A&&!M.maps.zoomNotApplied?(x.setAttribute("transform","translate( "+(j.x+e.offsetX)+" "+(j.y+e.offsetY)+" )"),j.x=V,j.y=G):x.setAttribute("transform","translate( "+((j.x+z.x)*E+e.offsetX)+" "+((j.y+z.y)*E+a.height/2+e.offsetY)+" )"),D.appendChild(x)}M.dataLabelCollections.push({location:{x:j.x+e.offsetX,y:j.y+e.offsetY},element:Y.isNullOrUndefined(t)?x:t,layerIndex:y,shapeIndex:H?R:b,labelIndex:H?R:b,dataLabelText:W}),0<f.childElementCount&&!M.maps.element.contains(f)&&(document.getElementById(M.maps.element.id+"_Secondary_Element").appendChild(f),M.maps.renderReactTemplates()),!(0<g.dataLabelSettings.animationDuration||"Enable"===Y.animationMode)||Y.isNullOrUndefined(x)||(M.datalabelAnimate(x,P.animationDuration,L.opacity,!1),Y.isNullOrUndefined(O))||M.datalabelAnimate(O,P.animationDuration,P.opacity,!0)}})}},Sn.prototype.datalabelAnimate=function(t,e,i,o){var n;new Y.Animation({}).animate(t,{duration:0===e&&"Enable"===Y.animationMode?1e3:e,delay:0,progress:function(e){e.timeStamp>e.delay&&(n=(e.timeStamp-e.delay)/e.duration,t.setAttribute("style","user-select: none; visibility: visible;"),t.setAttribute(o?"fill-opacity":"opacity",(i*n).toString()))},end:function(){t.style.visibility="visible",t.setAttribute(o?"fill-opacity":"opacity",i.toString())}})},Sn.prototype.getPoint=function(e,t){return"MultiLineString"===e.type?Array.prototype.forEach.call(e,function(e){Array.prototype.forEach.call(e,function(e){t.push(new J(e.point.x,e.point.y))})}):Array.prototype.forEach.call(e,function(e){t.push(new J(e.point.x,e.point.y))}),t},Sn.prototype.getModuleName=function(){return"DataLabel"},Sn.prototype.destroy=function(){this.dataLabelCollections=[],this.value=null,this.maps=null};var bn=Sn;function Sn(e){this.value={rightWidth:0,leftWidth:0,heightTop:0,heightBottom:0},this.maps=e,this.dataLabelCollections=[]}xn.prototype.renderNavigation=function(e,t,i){if(!Y.isNullOrUndefined(this.maps))for(var o,n,a,l,r,s,d,p,h=void 0,m=e.navigationLineSettings,c=[],u=void 0,g=void 0,y=void 0,f=void 0,b=void 0,S=void 0,v=void 0,x=void 0,O=void 0,C=void 0,_=void 0,M=this.maps.renderer.createGroup({id:this.maps.element.id+"_LayerIndex_"+i+"_line_Group"}),L=0;L<m.length;L++){if(n=m[L].latitude,o=m[L].longitude,a=!Y.isNullOrUndefined(m[L].visible)&&m[L].visible,u=Y.isNullOrUndefined(m[L].angle)?0:m[L].angle,l=m[L].width||1,r=m[L].color,s=m[L].dashArray,p=m[L].arrowSettings,d=!Y.isNullOrUndefined(p)&&p.showArrow,!Y.isNullOrUndefined(o)&&!Y.isNullOrUndefined(n)&&o.length===n.length&&a)for(var P=0;P<o.length;P++){var w=this.maps.isTileMap?R(new J(o[P],n[P]),t,this.maps.tileTranslatePoint,!0):B(n[P],o[P],t,e,this.maps);c.push(w)}for(var _=this.maps.renderer.createGroup({id:this.maps.element.id+"_LayerIndex_"+i+"_NavigationGroup"+L}),T=0;T<c.length-1;T++){var I,k,N,F,u=1<(u=u<-1?-1:u)?1:u,E=this.maps.element.id+"_LayerIndex_"+i+"_NavigationIndex_"+L+"_Line"+T,z=this.convertRadius(c[T],c[T+1]);u<=1&&0<u&&(y=0,c[T].x>c[T+1].x)&&(y=1),-1<=u&&u<0&&c[T].x>c[T+(y=1)].x&&(y=0),d&&(f=p.color,b=Y.isNullOrUndefined(p.size)?0:p.size,C=Y.isNullOrUndefined(p.offSet)?0:p.offSet,I=Math.round(b/2),v="Start"===(S=p.position)?"url(#triangle"+L+")":null,x="End"===S?"url(#triangle"+L+")":null,0!==O&&0===u&&(O="Start"===S?C:-C),O=Y.isNullOrUndefined(O)?0:O,k=this.maps.element.id+"_triangle",(N=this.maps.renderer.createDefs()).innerHTML+='<marker id="triangle'+L+'"></marker>',(F=N.querySelector("#triangle"+L)).setAttribute("markerWidth",b.toString()),F.setAttribute("markerHeight",b.toString()),F.setAttribute("refX",(I-O).toString()),F.setAttribute("refY",I.toString()),F.setAttribute("orient","auto"),g=new A(k,f,l,r,1,1,s,"M 0,0 L 0,"+b+" L "+I+", "+I+" Z"),h=this.maps.renderer.drawPath(g),F.appendChild(h),N.appendChild(F),_.appendChild(N)),k=0===(u=Math.abs(u))?"M "+c[T].x+","+c[T].y+"L "+c[T+1].x+","+c[T+1].y+" ":"M "+c[T].x+","+c[T].y+" A "+(z/2+(1-u)*z/(10*u))+" "+(z/2+(1-u)*z/(10*u))+" 0,0,"+y+" , "+c[T+1].x+","+c[T+1].y+" ",g=new A(E,"none",l,r,1,1,s,k),h=this.maps.renderer.drawPath(g),Y.isNullOrUndefined(S)||("Start"===S?h.setAttribute("marker-start",v):h.setAttribute("marker-end",x)),Re(this.maps.selectedNavigationElementId,this.maps.navigationSelectionClass,h,"navigationlineselectionMapStyle"),_.appendChild(h),M.appendChild(_)}c=[]}return M},xn.prototype.convertRadius=function(e,t){var i=t.x-e.x,t=t.y-e.y;return Math.sqrt(Math.pow(i,2)+Math.pow(t,2))},xn.prototype.getModuleName=function(){return"NavigationLine"},xn.prototype.destroy=function(){this.maps=null};var vn=xn;function xn(e){this.maps=e}S.prototype.renderLegend=function(){this.legendRenderingCollections=[],this.legendCollection=[],this.totalPages=[],this.widthIncrement=0,this.heightIncrement=0,this.defsElement=this.maps.renderer.createDefs(),this.maps.svgObject.appendChild(this.defsElement),this.initialMapAreaRect=this.maps.mapAreaRect,this.calculateLegendBounds(),this.drawLegend()},S.prototype.calculateLegendBounds=function(){var h=this,e=this.maps,m=e.legendSettings,t=(this.legendCollection=[],e.mapAreaRect.y);if(this.legendRenderingCollections=[],Array.prototype.forEach.call(e.layersCollection,function(e,t){if(!Y.isNullOrUndefined(e.shapeData)){var i=e.shapeData.features,o=e.shapeDataPath,n=e.shapePropertyPath,a=e.dataSource,l=void 0,r=void 0;if("Layers"===m.type&&e.visible)l=e.shapeSettings.colorValuePath,r=e.shapeSettings.colorMapping,h.getLegends(t,i,r,a,o,l,n);else if("Bubbles"===m.type)for(var s=0,d=e.bubbleSettings;s<d.length;s++){var p=d[s];p.visible&&(l=p.colorValuePath,r=p.colorMapping,a=p.dataSource,h.getLegends(t,i,r,a,o,l,n))}}"Markers"===m.type&&h.getMarkersLegendCollections(t,e.markerSettings)}),0<this.legendCollection.length)for(var i=0;i<this.legendCollection.length;i++){var o=this.legendCollection[i],n={name:Ko,cancel:!1,fill:o.fill,shape:m.shape,shapeBorder:m.shapeBorder,text:"number"==typeof o.text?o.text.toString():o.text};e.trigger("legendRendering",n),o.fill=n.fill,o.shape=n.shape,o.shapeBorder=n.shapeBorder,o.text=n.text,n.cancel&&(this.legendCollection.splice(i,1),i--)}var a=e.legendSettings.title.text,B=e.legendSettings.titleStyle;if(0<this.legendCollection.length){var l,A,U,j=m.mode,r=0,s=0,Z=m.shapePadding,d=m.shapeHeight,p=m.shapeWidth,c=[],u=[],g=m.position,D=m.labelDisplayMode,y="None"===m.orientation?"Top"===g||"Bottom"===g?"Horizontal":"Vertical":m.orientation,f=1<m.width.length?-1<m.width.indexOf("%")?e.availableSize.width/100*parseInt(m.width,10):parseInt(m.width,10):null,b=1<m.height.length?-1<m.height.indexOf("%")?e.availableSize.height/100*parseInt(m.height,10):parseInt(m.height,10):null,S=0,v=0,R=W(a,B);if("Interactive"===j){for(var V=m.textStyle,g=this.legendCollection.length,x="Horizontal"===y?Y.isNullOrUndefined(f)?e.mapAreaRect.width/g:f/g:Y.isNullOrUndefined(f)?25:f,O="Horizontal"===y?Y.isNullOrUndefined(b)?25:b:Y.isNullOrUndefined(b)?e.mapAreaRect.height/g:b/g,C=(v=R.height+10,m.labelPosition),_=S=0,G=0,M=0,L=0,P=0,w=0,i=0;i<this.legendCollection.length;i++){var S="Horizontal"===y?S+x:S,v="Horizontal"===y?v:v+O,T=this.legendCollection[i].text,I=new H(0,0);"None"===D?I=W(T,V):"Trim"===D?I=W(T=tt("Horizontal"===y?x:O,T,V),V):T="",P=Math.max(P,I.height),w=Math.max(w,I.width),0<I.width&&0<I.height&&(G="Horizontal"===y?(_=S+x/2,"After"===C?v+O+I.height/2+10:v-10):(_="After"===C?S-I.width/2-10:S+x+I.width/2+10,v+O/2+I.height/4)),0===i?(M="Horizontal"!==y&&"After"===C?_-I.width/2:S,L="Horizontal"!==y||"After"===C?v:G-I.height/2,1===this.legendCollection.length&&(f="Horizontal"===y?Math.abs(S+x-M):x+w+10,b="Horizontal"===y?O+P/2+10:Math.abs(v+O-L))):i===this.legendCollection.length-1&&(f="Horizontal"===y?Math.abs(S+x-M):x+w+10,b="Horizontal"===y?O+P/2+10:Math.abs(v+O-L)),this.legendRenderingCollections.push({fill:this.legendCollection[i].fill,x:S,y:v,width:x,height:O,text:T,textX:_,textY:G,textWidth:I.width,textHeight:I.height,shapeBorder:this.legendCollection[i].shapeBorder})}1!==this.legendCollection.length||"Fluent2HighContrast"===e.theme&&"Bottom"===m.position||(b=O,f=x),this.legendItemRect={x:M,y:L,width:f,height:b}}else{for(var f=Y.isNullOrUndefined(f)?e.mapAreaRect.width:f,b=Y.isNullOrUndefined(b)?e.mapAreaRect.height:b,k=0,i=this.page=0;i<this.legendCollection.length;i++){var N,F,E,o=this.legendCollection[i],z=(Y.isNullOrUndefined(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]}),W(o.text,m.textStyle));this.textMaxWidth=Math.max(this.textMaxWidth,z.width),0===i?(S=r=10+p/2,v=s=t+R.height+(d>z.height?d/2:z.height/4)):(N=z.height>d?z.height:d,"Horizontal"===y?s=(E=u[k-1].x+u[k-1].width+10+p)+Z+z.width>f?b<(F=(u[k-1].y>c[k-1].y+d/2?u[k-1].y:c[k-1].y+d/2)+t)+N?(this.getPageChanged(),k=0,c=[],u=[],r=S,v):(r=c[0].x,F+N/2):(r=E-p/2,c[k-1].y):b<(F=u[k-1].y>c[k-1].y+d/2?u[k-1].y:c[k-1].y+d/2)+t+N?(E=u[k-1].x+this.textMaxWidth+10)+Z+z.width>f?(r=S,s=v,u=[],c=[],this.getPageChanged(),k=0):(r=E+p/2,s=c[0].y):(r=c[k-1].x,s=F+10+d/2)),N=r+p/2+Z,l=s+z.height/4,c.push({x:r,y:s}),u.push({x:N,y:l,width:z.width,height:z.height/2}),this.totalPages[this.page].Collection.push({DisplayText:o.text,ImageSrc:o.imageSrc,Shape:{x:r,y:s},Text:{x:N,y:l},Fill:o.fill,legendShape:o.shape,shapeBorder:o.shapeBorder,idIndex:i,Rect:{x:c[k].x-p/2,y:c[k].y-d/2<l-z.height?c[k].y-d/2:l-z.height,width:Math.abs(c[k].x-p/2-(N+z.width)),height:d>z.height?d:z.height}}),k++}a=this.totalPages[0].Collection;Array.prototype.forEach.call(a,function(e,t){e=new K(e.Rect.x,e.Rect.y,e.Rect.width,e.Rect.height);0===t&&(A=e.x,U=e.y),h.widthIncrement=Math.max(h.widthIncrement,Math.abs(A-(e.x+e.width))),h.heightIncrement=Math.max(h.heightIncrement,Math.abs(U-(e.y+e.height)))}),f=this.widthIncrement<f?this.widthIncrement:f,b=this.heightIncrement<b?this.heightIncrement:b,this.legendItemRect={x:a[0].Rect.x,y:a[0].Rect.y,width:f,height:b}}}},S.prototype.getLegends=function(e,t,i,o,n,a,l){this.getRangeLegendCollection(e,t,i,o,n,a,l),this.getEqualLegendCollection(e,t,i,o,n,a,l),this.getDataLegendCollection(e,t,i,o,n,a,l)},S.prototype.getPageChanged=function(){this.page++,Y.isNullOrUndefined(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]})},S.prototype.legendTextTrim=function(e,t,i,o){var n=t,a=o-W(t,i).width;if(e<o)for(var l=t.length-1;0<=l;--l)if(a+W(n=t.substring(0,l)+"...",i).width<=e||n.length<4)return n=n.length<4?" ":n;return n},S.prototype.drawLegend=function(){var e=this.maps,t=e.legendSettings,i=e.renderer,o={size:t.textStyle.size,color:t.textStyle.color,fontFamily:t.textStyle.fontFamily,fontWeight:t.textStyle.fontWeight,fontStyle:t.textStyle.fontStyle,opacity:t.textStyle.opacity};if(this.legendGroup=i.createGroup({id:e.element.id+"_Legend_Group"}),"Interactive"===t.mode)for(var n=0;n<this.legendRenderingCollections.length;n++){var a=e.element.id+"_Legend_Index_"+n,l=e.element.id+"_Legend_Index_"+n+"_Text",r=this.legendRenderingCollections[n],s=new K(r.x,r.y,r.width,r.height),d=(0===n&&this.renderLegendBorder(),new J(r.textX,r.textY)),a=(o.color=null!==o.color?o.color:this.maps.themeStyle.legendTextColor,new Q(a,r.fill,r.shapeBorder,t.opacity,s)),s=new se(l,d.x,d.y,"middle",r.text,"",""),l=(o.fontFamily=(Y.isNullOrUndefined(o.fontFamily)?this.maps.themeStyle:o).fontFamily,o.size=o.size||e.themeStyle.legendFontSize,_e(s,o,o.color,this.legendGroup)),d=(l.setAttribute("aria-label",r.text),l.setAttribute("role","region"),i.drawRectangle(a));this.legendGroup.appendChild(d),!e.legendSettings.toggleLegendSettings.enable||"Layers"!==t.type&&"Markers"!==t.type||this.maintainLegendToggle(n,d,l),this.legendToggle()}else this.drawLegendItem(this.currentPage)},S.prototype.drawLegendItem=function(e){var t=this.maps,i=t.legendSettings,o=new H(i.shapeWidth,i.shapeHeight),n=t.renderer,a=i.shape;if(0<=e&&e<this.totalPages.length){C(this.legendGroup.id,this.maps.element.id)&&Y.remove(C(this.legendGroup.id,this.maps.element.id));for(var l=0;l<this.totalPages[e].Collection.length;l++){var r,s,d=this.totalPages[e].Collection[l],p=d.shapeBorder,h=n.createGroup({id:t.element.id+"_Legend_Index_"+d.idIndex}),m=d.DisplayText,c="HorizontalLine"===i.shape||"VerticalLine"===i.shape||"Cross"===i.shape?Y.isNullOrUndefined(i.fill)?"#000000":i.fill:p.color,u=("HorizontalLine"===i.shape||"VerticalLine"===i.shape||"Cross"===i.shape)&&0===p.width?1:p.width,g=t.element.id+"_Legend_Shape_Index_"+d.idIndex,y=t.element.id+"_Legend_Text_Index_"+d.idIndex,f=new J(d.Shape.x,d.Shape.y-4),b=new J(d.Text.x,d.Text.y-4),g=new A(g,d.Fill,u,c,i.opacity,(Y.isNullOrUndefined(p.opacity)?i:p).opacity,""),u={fontFamily:i.textStyle.fontFamily,fontStyle:i.textStyle.fontStyle,fontWeight:i.textStyle.fontWeight,size:i.textStyle.size,color:i.textStyle.color,opacity:i.textStyle.opacity},c=(u.color=null!==u.color?u.color:this.maps.themeStyle.legendTextColor,u.fontFamily=(Y.isNullOrUndefined(u.fontFamily)?this.maps.themeStyle:u).fontFamily,u.size=u.size||t.themeStyle.legendFontSize,u.fontWeight=u.fontWeight||t.themeStyle.fontWeight,0===l&&this.renderLegendBorder(),"Markers"===i.type&&i.useMarkerShape&&(c=this.legendCollection[d.idIndex].data[0],p=t.layers[c.layerIndex].markerSettings[c.markerIndex],a=Y.isNullOrUndefined(p.dataSource[c.dataIndex][p.shapeValuePath])||""===p.dataSource[c.dataIndex][p.shapeValuePath]?p.shape:p.dataSource[c.dataIndex][p.shapeValuePath]),"Balloon"===a?h.appendChild(qe(t,g,o,{x:f.x,y:f.y+5},"Legend")):h.appendChild(Ct(f,a,o,d.ImageSrc,g)),d.Rect.x+d.Rect.width),p=(c>this.legendBorderRect.width&&(m=this.legendTextTrim(this.legendBorderRect.width,m,u,c)),_e(new se(y,b.x,b.y,"start",m,"",""),u,u.color,h));p.setAttribute("aria-label",m),p.setAttribute("role","region"),this.legendGroup.appendChild(h),!t.legendSettings.toggleLegendSettings.enable||"Layers"!==i.type&&"Markers"!==i.type||(f=h.childNodes[0],this.maintainLegendToggle(d.idIndex,f,p)),l===this.totalPages[e].Collection.length-1&&(g=void 0,0!==this.page&&(b=W(c=e+1+"/"+this.totalPages.length,y=i.textStyle),u=this.legendItemRect.x+this.legendItemRect.width-b.width-20-20+2,h=(m=this.legendItemRect.x+this.legendItemRect.width)-10-b.width/2-5-4,d=this.legendItemRect.y+this.legendItemRect.height+2.5+10,g=n.createGroup({id:t.element.id+"_Legend_Paging_Group"}),f=n.createGroup({id:t.element.id+"_Legend_Left_Paging_Group"}),p=n.createGroup({id:t.element.id+"_Legend_Right_Paging_Group"}),r=" M "+m+" "+d+" L "+(m-10)+" "+(d-5)+" L "+(m-10)+" "+(d+5)+" z ",s=new A(t.element.id+"_Left_Page",this.maps.themeStyle.legendTextColor,0,this.maps.themeStyle.legendTextColor,e+1===1?.5:1,1,""," M "+u+" "+d+" L "+(10+u)+" "+(d-5)+" L "+(10+u)+" "+(d+5)+" z "),f.appendChild(n.drawPath(s)),s=new Q(t.element.id+"_Left_Page_Rect","transparent",{},1,new K(u-5,d-10,20,20),null,null,"",""),(u=n.drawRectangle(s)).setAttribute("aria-label","Navigate to the previous legend items"),u.setAttribute("role","button"),u.tabIndex=e+1===1?-1:t.tabIndex,e+1===1?(u.style.cursor="default",u.style.setProperty("outline","none")):(u.style.cursor="pointer",u.style.removeProperty("outline")),f.appendChild(u),this.wireEvents(f),s=new A(t.element.id+"_Right_Page",this.maps.themeStyle.legendTextColor,0,this.maps.themeStyle.legendTextColor,e+1===this.totalPages.length?.5:1,1,"",r),p.appendChild(n.drawPath(s)),r=new Q(t.element.id+"_Right_Page_Rect","transparent",{},1,new K(m-10-5,d-10,20,20),null,null,"",""),(u=n.drawRectangle(r)).setAttribute("aria-label","Navigate to the next legend items"),u.setAttribute("role","button"),u.tabIndex=e+1===this.totalPages.length?-1:t.tabIndex,e+1===this.totalPages.length?(u.style.cursor="default",u.style.setProperty("outline","none")):(u.style.cursor="pointer",u.style.removeProperty("outline")),p.appendChild(u),this.wireEvents(p),g.appendChild(f),g.appendChild(p),s={id:t.element.id+"_Paging_Text",x:h,y:d+b.height/4,fill:this.maps.themeStyle.legendTextColor,"font-size":"14px","font-style":y.fontStyle,"font-family":y.fontFamily,"font-weight":y.fontWeight,"text-anchor":"middle",transform:"",opacity:1,"dominant-baseline":""},(m=n.createText(s,c)).style.cssText="user-select: none;",m.setAttribute("aria-label",c),m.setAttribute("role","region"),g.appendChild(m),this.legendGroup.appendChild(g)),this.legendToggle())}}},S.prototype.maintainLegendToggle=function(e,t,i){var o;this.maps.legendSettings.toggleLegendSettings.enable&&!Y.isNullOrUndefined(this.maps.toggledLegendId)&&-1<this.maps.toggledLegendId.indexOf(e)&&!Y.isNullOrUndefined(this.maps.toggledElementId)&&0<this.maps.toggledElementId.length&&(e=this.legendCollection[e].data,this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(o=e[e.length-1].layerIndex,this.setToggleAttributes(i,t,this.maps.layers[o].shapeSettings.fill,this.maps.layers[o].shapeSettings.opacity,this.maps.layers[o].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor,Y.isNullOrUndefined(this.maps.layers[o].shapeSettings.border.width)?0:this.maps.layers[o].shapeSettings.border.width,(Y.isNullOrUndefined(this.maps.layers[o].shapeSettings.border.opacity)?this.maps.layers[o].shapeSettings:this.maps.layers[o].shapeSettings.border).opacity,this.maps.layers[o].shapeSettings.fill)):this.setToggleAttributes(i,t,this.maps.legendSettings.toggleLegendSettings.fill,this.maps.legendSettings.toggleLegendSettings.opacity,this.maps.legendSettings.toggleLegendSettings.border.color,this.maps.legendSettings.toggleLegendSettings.border.width,(Y.isNullOrUndefined(this.maps.legendSettings.toggleLegendSettings.border.opacity)?this.maps.legendSettings.toggleLegendSettings:this.maps.legendSettings.toggleLegendSettings.border).opacity,this.maps.legendSettings.toggleLegendSettings.fill),e._isVisible=!1)},S.prototype.legendHighLightAndSelection=function(e,t){var i="Default"===this.maps.legendSettings.mode?document.getElementById(e.id.replace("Shape","Text")):document.getElementById(e.id+"_Text"),o=this.maps.legendModule.legendCollection,n=!Y.isNullOrUndefined(o[0].data[0].layerIndex)&&this.maps.layers[o[0].data[0].layerIndex].selectionSettings.enableMultiSelect,a=0,l=!0,r=parseFloat(e.id.charAt(e.id.length-1)),s=(this.updateLegendElement(),this.maps.toggledLegendId.indexOf(r));if(this.maps.legendSettings.toggleLegendSettings.enable&&"highlight"===t&&-1!==s)return-1!==(s=this.getIndexofLegend(this.legendHighlightCollection,e))&&this.legendHighlightCollection.splice(s,1),this.removeLegendHighlightCollection(),null;if("selection"===t){if(this.shapeHighlightCollection=[],this.maps.shapeSelections||n||(this.removeAllSelections(),this.maps.shapeSelections=!0),0<this.maps.legendSelectionCollection.length&&(n||this.maps.shapeSelections))for(var d=0;d<this.maps.legendSelectionCollection.length;d++){if(e===this.maps.legendSelectionCollection[d].legendElement){this.maps.legendSelectionCollection[d].legendElement=e,l=!1,this.removeLegendSelectionCollection(this.maps.legendSelectionCollection[d].legendElement),this.maps.selectedLegendElementId.splice(this.maps.selectedLegendElementId.indexOf(r),1),this.maps.legendSelectionCollection.splice(d,1),this.maps.legendSelection=!(0<this.maps.legendSelectionCollection.length);break}if(!n)if(1<this.maps.legendSelectionCollection.length){for(var p=0;p<this.maps.legendSelectionCollection.length;p++)this.removeLegendSelectionCollection(this.maps.legendSelectionCollection[p].legendElement);this.maps.legendSelectionCollection=[]}else this.removeLegendSelectionCollection(this.maps.legendSelectionCollection[d].legendElement),this.maps.legendSelectionCollection.splice(d,1)}}else{if(0<this.maps.legendSelectionCollection.length)for(d=0;d<this.maps.legendSelectionCollection.length;d++){if((-1<e.id.indexOf("_Legend_Shape")||e.id.indexOf("_Legend_Index"))&&e===this.maps.legendSelectionCollection[d].legendElement){l=!1;break}this.removeLegendHighlightCollection()}this.removeLegendHighlightCollection()}if(l)for(var h=0;h<o.length;h++){var m="Interactive"===this.maps.legendSettings.mode?parseFloat(e.id.split("_Legend_Index_")[1]):parseFloat(e.id.split("_Legend_Shape_Index_")[1]);if(i.textContent===o[h].text&&0<o[h].data.length&&m===h){var c=this.maps.layers[o[h].data[0].layerIndex],m=void 0,u=void 0,g=void 0;if(Y.isNullOrUndefined(c)||(m=("selection"===t?c.selectionSettings:c.highlightSettings).enable,u=void 0,u="selection"===t?c.selectionSettings:c.highlightSettings,g=o[h].data),m)for(var y=0;y<g.length;y++){var f=void 0,b=g[y].shapeIndex,S=g[y].layerIndex,v=g[y].dataIndex;if(null!==(f=-1===(x=g[y].pointIndex)?document.getElementById(this.maps.element.id+"_LayerIndex_"+S+"_shapeIndex_"+b+"_dataIndex_"+v):document.getElementById(this.maps.element.id+"_LayerIndex_"+S+"_shapeIndex_"+b+"_dataIndex_"+v+"_multiLine_"+x))){var x,O,C=!0;if(null!==this.maps.legendSelectionCollection)for(var _=0;_<this.maps.legendSelectionCollection.length;_++)if(this.maps.legendSelectionCollection[_].legendElement===e){C=!1;break}"highlight"===t&&C?(0===y&&(this.legendHighlightCollection=[],this.pushCollection(e,this.legendHighlightCollection,o[h],c.shapeSettings)),S=this.legendHighlightCollection.length,b=this.legendHighlightCollection[S-1].legendOldFill,this.legendHighlightCollection[S-1].MapShapeCollection.Elements.push(f),v=this.legendHighlightCollection[S-1].MapShapeCollection.Elements.length-1,x=f.getAttribute("fill"),O=f.getAttribute("fill-opacity"),this.legendHighlightCollection[S-1].shapeOldFillColor.push(x),this.legendHighlightCollection[S-1].shapeOldOpacity=O,x=this.legendHighlightCollection[S-1].shapeOldFillColor[v],O=this.legendHighlightCollection[S-1].shapeOldOpacity,this.shapePreviousColor=this.legendHighlightCollection[S-1].shapeOldFillColor,this.setColor(f,Y.isNullOrUndefined(u.fill)?x:u.fill,Y.isNullOrUndefined(u.opacity)?O:u.opacity.toString(),u.border.color,u.border.width.toString(),"highlight"),this.setColor(e,Y.isNullOrUndefined(u.fill)?b:u.fill,Y.isNullOrUndefined(u.opacity)?O:u.opacity.toString(),u.border.color,u.border.width.toString(),"highlight")):"selection"===t&&(this.legendHighlightCollection=[],this.maps.legendSelectionClass=u,0===y&&(this.pushCollection(e,this.maps.legendSelectionCollection,o[h],c.shapeSettings),n||0!==this.maps.selectedLegendElementId.length&&(this.maps.selectedLegendElementId=[]),this.maps.selectedLegendElementId.push(h)),a=this.maps.legendSelectionCollection.length,v=this.maps.legendSelectionCollection[a-1].legendOldFill,this.maps.legendSelectionCollection[a-1].MapShapeCollection.Elements.push(f),this.maps.legendSelectionCollection[a-1].shapeOldFillColor=this.shapePreviousColor,this.setColor(e,Y.isNullOrUndefined(u.fill)?v:u.fill,u.opacity.toString(),u.border.color,u.border.width.toString(),"selection"),this.setColor(f,Y.isNullOrUndefined(u.fill)?v:u.fill,u.opacity.toString(),u.border.color,u.border.width.toString(),"selection"),-1===this.maps.selectedElementId.indexOf(f.getAttribute("id"))&&this.maps.selectedElementId.push(f.getAttribute("id")),y===g.length-1)&&(this.maps.legendSelection=!1,this.removeLegend(this.maps.legendSelectionCollection))}}}}},S.prototype.setColor=function(e,t,i,o,n,a){var l=-1<e.parentElement.id.indexOf("LineString");"selection"===a?(Ge(l?"LineselectionMap":"ShapeselectionMap",l?"LineselectionMapStyle":"ShapeselectionMapStyle",l?"transparent":t,i,l?t:o,n,this.maps),e.setAttribute("class",l?"LineselectionMapStyle":"ShapeselectionMapStyle")):(e.setAttribute("fill",l?"transparent":t),e.setAttribute("fill-opacity",i),e.setAttribute("stroke",l?t:o),e.setAttribute("stroke-width",(Number(n)/this.maps.scale).toString()))},S.prototype.pushCollection=function(e,t,i,o){t.push({legendElement:e,legendOldFill:i.fill,legendOldOpacity:i.opacity,legendOldBorderColor:i.borderColor,legendOldBorderWidth:i.borderWidth,shapeOpacity:o.opacity,shapeOldBorderColor:o.border.color||this.maps.themeStyle.shapeBorderColor,shapeOldBorderWidth:o.border.width});e=t.length;t[e-1].MapShapeCollection={Elements:[]},t[e-1].shapeOldFillColor=[],t[e-1].shapeOldOpacity=null},S.prototype.removeLegend=function(e){for(var t=0;t<e.length;t++)for(var i=e[t],o=(this.setColor(i.legendElement,i.legendOldFill,i.legendOldOpacity,i.legendOldBorderColor,i.legendOldBorderWidth,"highlight"),i.MapShapeCollection.Elements.length),n=0;n<o;n++){var a=-1!==i.legendOldFill.indexOf("url")?i.shapeOldFillColor[n]:i.legendOldFill,l=Y.isNullOrUndefined(i.shapeOldOpacity)?i.shapeOpacity:i.shapeOldOpacity;this.setColor(i.MapShapeCollection.Elements[n],a,l,i.shapeOldBorderColor,i.shapeOldBorderWidth,"highlight")}},S.prototype.removeLegendHighlightCollection=function(){0<this.legendHighlightCollection.length&&(this.removeLegend(this.legendHighlightCollection),this.legendHighlightCollection=[])},S.prototype.removeLegendSelectionCollection=function(e){if(0<this.maps.legendSelectionCollection.length){x(e);for(var t=this.shapesOfLegend(e),i=t.length,o=0;o<i;o++){var n=F(t[o]);"ShapeselectionMapStyle"!==n.getAttribute("class")&&"LineselectionMapStyle"!==n.getAttribute("class")||(x(n),-1!==(n=this.maps.selectedElementId.indexOf(n.id))&&this.maps.selectedElementId.splice(n,1))}}},S.prototype.removeShapeHighlightCollection=function(){if(0<this.shapeHighlightCollection.length)for(var e=0;e<this.shapeHighlightCollection.length;e++){for(var t=this.shapeHighlightCollection[e],i=!0,o=0;o<this.maps.legendSelectionCollection.length;o++)this.maps.legendSelectionCollection[o].legendElement===t.legendElement&&(i=!1);i&&this.setColor(t.legendElement,t.legendOldFill,t.legendOldOpacity,t.legendOldBorderColor,t.legendOldBorderWidth,"highlight")}},S.prototype.shapeHighLightAndSelection=function(e,t,i,o,n){if(void 0!==t){this.updateLegendElement(),this.shapeToggled=!0;var a=this.maps.legendModule.legendCollection,l=this.legendIndexOnShape(t,n),r=this.shapeDataOnLegend(e),t=this.maps.toggledLegendId.indexOf(l.actualIndex);if(this.maps.legendSettings.toggleLegendSettings.enable&&-1!==t)return this.shapeToggled=!1,this.legendHighlightCollection=[],-1!==(t=this.getIndexofLegend(this.shapeHighlightCollection,r.LegendEle))&&this.shapeHighlightCollection.splice(t,1),this.removeShapeHighlightCollection(),null;if(void 0===l.currentIndex&&void 0===l.actualIndex)return this.removeShapeHighlightCollection(),null;if(void 0!==l.currentIndex||"selection"!==o||this.maps.layers[n].selectionSettings.enableMultiSelect||"ShapeselectionMapStyle"===e.getAttribute("class")||(this.maps.legendSelection=!1),"selection"!==o||this.maps.layers[n].selectionSettings.enableMultiSelect||this.maps.legendSelection||(this.removeAllSelections(),this.maps.legendSelection=!0),void 0===l.currentIndex){if("selection"===o&&void 0!==l.actualIndex){for(var s=0,d=0;d<r.Elements.length;d++)"ShapeselectionMapStyle"===r.Elements[d].getAttribute("class")&&s++;t=this.maps.selectedLegendElementId.indexOf(l.actualIndex);-1===t?(this.maps.selectedLegendElementId.push(l.actualIndex),this.maps.legendSelectionClass=i):s<=1&&("ShapeselectionMapStyle"===e.getAttribute("class")||"LineselectionMapStyle"===e.getAttribute("class"))&&(!this.maps.layers[n].selectionSettings.enableMultiSelect||s<=1&&("ShapeselectionMapStyle"===e.getAttribute("class")||"LineselectionMapStyle"===e.getAttribute("class")))&&this.maps.selectedLegendElementId.splice(t,1)}return this.removeShapeHighlightCollection(),null}var t=a[l.actualIndex].text,p=void 0,h=void 0,m=("Default"===this.maps.legendSettings.mode?void 0!==l.currentIndex&&(p=document.getElementById(this.maps.element.id+"_Legend_Text_Index_"+l.actualIndex).textContent,h=document.getElementById(this.maps.element.id+"_Legend_Shape_Index_"+l.actualIndex)):(p=document.getElementById(this.maps.element.id+"_Legend_Index_"+l.actualIndex+"_Text").textContent,h=document.getElementById(this.maps.element.id+"_Legend_Index_"+l.actualIndex)),this.oldShapeElement=r.LegendEle,this.maps.legendSelectionCollection.length);if(t===p){var c=!0;if(this.maps.legendSelectionCollection)for(d=0;d<this.maps.legendSelectionCollection.length;d++)if(this.maps.legendSelectionCollection[d].legendElement===r.LegendEle){c=!1;break}if("highlight"===o&&c){(void 0===(g=this.isTargetSelected(r,this.shapeHighlightCollection))||g&&!g.IsSelected)&&this.pushCollection(h,this.shapeHighlightCollection,a[l.actualIndex],this.maps.layers[n].shapeSettings);for(var u=0;u<this.shapeHighlightCollection.length;u++)r.LegendEle.id===this.shapeHighlightCollection[u].legendElement.id&&(this.shapeHighlightCollection[u].legendElement=r.LegendEle);if(0<m)for(u=0;u<m;u++){if(r.LegendEle===this.maps.legendSelectionCollection[u].legendElement){this.maps.legendSelectionCollection[u].legendElement=r.LegendEle,this.removeShapeHighlightCollection();break}u===m-1&&(this.removeShapeHighlightCollection(),this.setColor(h,Y.isNullOrUndefined(i.fill)?h.getAttribute("fill"):i.fill,i.opacity.toString(),i.border.color,i.border.width.toString(),"highlight"))}else this.removeShapeHighlightCollection(),this.setColor(h,Y.isNullOrUndefined(i.fill)?h.getAttribute("fill"):i.fill,Y.isNullOrUndefined(i.opacity)?"1":i.opacity.toString(),i.border.color,i.border.width.toString(),"highlight")}else if("selection"===o){var g=this.isTargetSelected(r,this.maps.legendSelectionCollection);if(0<m)for(var y,f,u=0;u<this.maps.legendSelectionCollection.length;)r.LegendEle===this.maps.legendSelectionCollection[u].legendElement||i.enableMultiSelect?u++:(y=this.maps.legendSelectionCollection[u],f=this.maps.selectedLegendElementId.indexOf(l.actualIndex),this.maps.selectedLegendElementId.splice(f,1),this.maps.legendSelectionCollection.splice(u,1),x(y.legendElement),this.maps.shapeSelections=!0,u=0);if(g&&g.IsSelected&&("ShapeselectionMapStyle"===e.getAttribute("class")||"LineselectionMapStyle"===e.getAttribute("class"))){var b=0;if(i.enableMultiSelect)for(d=0;d<r.Elements.length;d++)e.getAttribute("class")===r.Elements[d].getAttribute("class")&&b++;b<=1&&(i.enableMultiSelect||this.maps.legendSelection)&&(this.maps.selectedLegendElementId.splice(this.maps.selectedLegendElementId.indexOf(l.actualIndex),1),Y.isNullOrUndefined(r.LegendEle)||x(r.LegendEle),this.maps.legendSelectionCollection.splice(g.SelectionIndex,1),this.maps.shapeSelections=!0)}else{void 0!==g&&(!g||g.IsSelected)||Y.isNullOrUndefined(h)||-1===(S=this.getIndexofLegend(this.maps.legendSelectionCollection,h))&&this.pushCollection(h,this.maps.legendSelectionCollection,a[l.actualIndex],this.maps.layers[n].shapeSettings);for(var S,v=!0,d=0;d<this.maps.selectedLegendElementId.length;d++)l.actualIndex===this.maps.selectedLegendElementId[d]&&(v=!1);v&&this.maps.selectedLegendElementId.push(l.actualIndex),this.maps.legendSelectionClass=i,this.removeLegend(this.shapeHighlightCollection),Y.isNullOrUndefined(h)||(this.setColor(h,Y.isNullOrUndefined(i.fill)?h.getAttribute("fill"):i.fill,Y.isNullOrUndefined(i.opacity)?"1":i.opacity.toString(),i.border.color,i.border.width.toString(),"selection"),S=this.getIndexofLegend(this.maps.legendSelectionCollection,h),this.maps.legendSelectionCollection[S].MapShapeCollection.Elements.push(e)),this.maps.shapeSelections=!1}}else 0<document.getElementsByClassName("highlightMapStyle").length&&(this.removeShapeHighlightCollection(),x(document.getElementsByClassName("highlightMapStyle")[0]))}}else this.removeShapeHighlightCollection()},S.prototype.isTargetSelected=function(e,t){for(var i,o=0;o<t.length;o++)Y.isNullOrUndefined(e.LegendEle.getAttribute("id"))||e.LegendEle.getAttribute("id")!==t[o].legendElement.getAttribute("id")||(i={IsSelected:!0,SelectionIndex:o});return i},S.prototype.updateLegendElement=function(){for(var e=0;e<this.maps.legendSelectionCollection.length;e++)document.getElementById(this.maps.legendSelectionCollection[e].legendElement.id)&&(this.maps.legendSelectionCollection[e].legendElement=document.getElementById(this.maps.legendSelectionCollection[e].legendElement.id))},S.prototype.getIndexofLegend=function(e,t){return e.map(function(e){return e.legendElement}).indexOf(t)},S.prototype.removeAllSelections=function(){for(var e=0;e<this.maps.selectedElementId.length;e++)x(i=document.getElementById(this.maps.selectedElementId[e]));for(var t=0;t<this.maps.selectedLegendElementId.length;t++){var i=("Interactive"===this.maps.legendSettings.mode?this.maps.element.id+"_Legend_Index_":this.maps.element.id+"_Legend_Shape_Index_")+this.maps.selectedLegendElementId[t],o=document.getElementById(i);Y.isNullOrUndefined(o)||x(document.getElementById(i))}this.maps.legendSelectionCollection=[],this.maps.selectedLegendElementId=[],this.maps.selectedElementId=[]},S.prototype.legendIndexOnShape=function(e,t){for(var i,o,n,a=e[this.maps.layers[t].shapeDataPath],l=this.maps.legendSettings.mode,r=this.maps.legendModule.legendCollection,s=("Default"===l&&!Y.isNullOrUndefined(this.maps.legendModule.totalPages)&&0<this.maps.legendModule.totalPages.length&&(n=this.maps.legendModule.totalPages[this.maps.legendModule.currentPage].Collection),"Default"!==l||Y.isNullOrUndefined(n)?1:n.length),d=0;d<r.length;d++){for(var p=r[d].data,h=0;h<s;h++)if("Default"!==l||r[d].text===n[h].DisplayText)for(var m=0;m<p.length;m++)a===p[m].name&&(i=h);for(m=0;m<p.length;m++)a===p[m].name&&(o=d)}return{currentIndex:i,actualIndex:o}},S.prototype.shapeDataOnLegend=function(e){for(var t=this.maps.legendModule.legendCollection,i=this.maps.legendSettings,o=0;o<t.length;o++){for(var n=t[o].data,a=!1,l=[],r={Elements:[]},s=0;s<n.length;s++){var d,p=void 0,h=n[s].shapeIndex,m=n[s].layerIndex,c=n[s].dataIndex;e===(p=-1===(d=n[s].pointIndex)?document.getElementById(this.maps.element.id+"_LayerIndex_"+m+"_shapeIndex_"+h+"_dataIndex_"+c):document.getElementById(this.maps.element.id+"_LayerIndex_"+m+"_shapeIndex_"+h+"_dataIndex_"+c+"_multiLine_"+d))&&(a=!0),l.push(p)}if(a)return Y.isNullOrUndefined(r.LegendEle)&&(r.LegendEle="Default"===i.mode?document.getElementById(this.maps.element.id+"_Legend_Shape_Index_"+o):document.getElementById(this.maps.element.id+"_Legend_Index_"+o)),r.Elements=l,r}return null},S.prototype.shapesOfLegend=function(e){for(var e=parseFloat(e.id.charAt(e.id.length-1)),t=this.maps.legendModule.legendCollection[e].data,i=[],o=0;o<t.length;o++){var n,a=void 0,l=t[o].shapeIndex,r=t[o].layerIndex,s=t[o].dataIndex,a=-1===(n=t[o].pointIndex)?document.getElementById(this.maps.element.id+"_LayerIndex_"+r+"_shapeIndex_"+l+"_dataIndex_"+s):document.getElementById(this.maps.element.id+"_LayerIndex_"+r+"_shapeIndex_"+l+"_dataIndex_"+s+"_multiLine_"+n);Y.isNullOrUndefined(a)||i.push(a.id)}return i},S.prototype.legendToggle=function(){var e=this.maps,t=e.legendSettings;if(this.maps.selectedLegendElementId)for(var i=0;i<this.maps.selectedLegendElementId.length;i++){var o="Interactive"===t.mode?this.maps.element.id+"_Legend_Index_":this.maps.element.id+"_Legend_Shape_Index_",n=e.svgObject.querySelector("#"+o+this.maps.selectedLegendElementId[i]);if(!Y.isNullOrUndefined(n)){o=Y.isNullOrUndefined(this.maps.legendSelectionClass.fill)?n.getAttribute("fill"):this.maps.legendSelectionClass.fill;this.setColor(n,o,this.maps.legendSelectionClass.opacity.toString(),this.maps.legendSelectionClass.border.color,this.maps.legendSelectionClass.border.width.toString(),"selection");for(var a=0;a<this.maps.legendSelectionCollection.length;a++)this.maps.legendSelectionCollection[a].legendElement.id===n.id&&(this.maps.legendSelectionCollection[a].legendElement=n);-1===this.getIndexofLegend(this.maps.legendSelectionCollection,n)&&(o=this.maps.legendModule.legendCollection[this.maps.selectedLegendElementId[i]].data[i].layerIndex,this.pushCollection(n,this.maps.legendSelectionCollection,this.maps.legendModule.legendCollection[this.maps.selectedLegendElementId[i]],this.maps.layers[o].shapeSettings))}}if(this.maps.toggledLegendId)for(i=0;i<this.maps.toggledLegendId.length;i++){var l="Interactive"===t.mode?"#"+this.maps.element.id+"_Legend_Index_"+this.maps.toggledLegendId[i]+"_Text":"#"+this.maps.element.id+"_Legend_Text_Index_"+this.maps.toggledLegendId[i],l=e.svgObject.querySelector(l),l=(Y.isNullOrUndefined(l)||l.setAttribute("fill","#E5E5E5"),"Interactive"===t.mode?"#"+this.maps.element.id+"_Legend_Index_"+this.maps.toggledLegendId[i]:"#"+this.maps.element.id+"_Legend_Shape_Index_"+this.maps.toggledLegendId[i]),l=e.svgObject.querySelector(l);Y.isNullOrUndefined(l)||l.setAttribute("fill","#E5E5E5")}},S.prototype.renderLegendBorder=function(){for(var e=this.maps,t=e.legendSettings,i=t.title.text,o={fontFamily:t.titleStyle.fontFamily,fontStyle:t.titleStyle.fontStyle,fontWeight:t.titleStyle.fontWeight,size:t.titleStyle.size,color:t.titleStyle.color,opacity:t.titleStyle.opacity},n=tt(this.legendItemRect.width+20,i,o),a=W(n,o),l=!1,r=0;r<this.legendRenderingCollections.length;r++){if(this.legendRenderingCollections[r].textWidth!==this.legendRenderingCollections[0].textWidth){l=!1;break}l=!0}this.legendBorderRect=new K("Fluent2HighContrast"!==e.theme||l||"Left"!==t.position&&"Right"!==t.position||"Interactive"!==t.mode?this.legendItemRect.x-10:this.legendItemRect.x-30,this.legendItemRect.y-10-a.height,this.legendItemRect.width+20,this.legendItemRect.height+20+a.height+("Interactive"!==t.mode&&0!==this.page?10:0));var s={color:t.border.color||this.maps.themeStyle.legendBorderColor,opacity:t.border.opacity,width:t.border.width||this.maps.themeStyle.legendBorderWidth},s=(s.opacity=Y.isNullOrUndefined(s.opacity)?1:s.opacity,new Q(e.element.id+"_Legend_Border",t.background,s,1,this.legendBorderRect,null,null,"",""));this.legendGroup.appendChild(e.renderer.drawRectangle(s)),this.getLegendAlignment(e,this.legendBorderRect.width,this.legendBorderRect.height,t),this.legendGroup.setAttribute("transform","translate( "+(this.translate.x+-this.legendBorderRect.x)+" "+(this.translate.y+-this.legendBorderRect.y)+" )"),"Float"!==t.position&&e.svgObject.appendChild(this.legendGroup),i&&(o.color=null!==o.color?o.color:this.maps.themeStyle.legendTitleFontColor,o.fontFamily=(Y.isNullOrUndefined(o.fontFamily)?this.maps.themeStyle:o).fontFamily,o.size=Y.isNullOrUndefined(o.size)?this.maps.themeStyle.subTitleFontSize||At.legendTitleFont.size:o.size,o.fontWeight=Y.isNullOrUndefined(o.fontWeight)?this.maps.themeStyle.titleFontWeight||At.legendTitleFont.fontWeight:o.fontWeight,(s=_e(new se(e.element.id+"_LegendTitle",this.legendItemRect.x+this.legendItemRect.width/2,this.legendItemRect.y-a.height/2-5,"middle",n,""),o,o.color,this.legendGroup)).setAttribute("aria-label",i),s.setAttribute("role","region"))},S.prototype.changeNextPage=function(e){this.currentPage=-1<e.target.id.indexOf("_Left_Page_")?this.currentPage-1:this.currentPage+1,this.legendGroup=this.maps.renderer.createGroup({id:this.maps.element.id+"_Legend_Group"}),this.maps.mapAreaRect=this.initialMapAreaRect,this.drawLegendItem(this.currentPage),Y.isNullOrUndefined(this.maps.legendModule)||"Float"!==this.maps.legendSettings.position||(this.maps.isTileMap?this.maps.mapLayerPanel.layerGroup:this.maps.svgObject).appendChild(this.maps.legendModule.legendGroup),C(this.maps.element.id+"_Legend_Border",this.maps.element.id)&&(C(this.maps.element.id+"_Legend_Border",this.maps.element.id).style.pointerEvents="none")},S.prototype.getLegendAlignment=function(e,t,i,o){var n,a,l=Y.extend({},e.mapAreaRect,void 0,!0),r=l.x,s=l.y,d=l.height,p=l.width,h=e.availableSize.width,m=e.availableSize.height,c=Y.isNullOrUndefined(o.location.x)?0:o.location.x,u=Y.isNullOrUndefined(o.location.y)?0:o.location.y;if("Float"===o.position)this.translate=e.isTileMap?new J(c,u+2.5):new J(c+e.mapAreaRect.x,u+e.mapAreaRect.y),this.legendTotalRect=e.mapAreaRect;else{switch(o.position){case"Top":case"Bottom":l.height="Top"===o.position?d-i:d-i-20,n=h/2-t/2,a="Top"===o.position?s:s+l.height,l.y="Top"===o.position?s+i+(e.isTileMap?5:10):s-5;break;case"Left":case"Right":l.width=p-t-e.mapAreaRect.x,n="Left"===o.position?r+5:r+l.width+10,a=m/2-i/2,l.x="Left"===o.position?r+t+10:r}switch(o.alignment){case"Near":"Top"===o.position||"Bottom"===o.position?n=l.x-("Interactive"===o.mode?10:0):a=l.y-(o.height&&o.width||"Interactive"!==o.mode?0:e.mapAreaRect.x);break;case"Far":"Top"===o.position||"Bottom"===o.position?n=h-t-("Interactive"===o.mode?0:10):a=m-i-("Default"===o.mode?10:0)}(o.height||o.width)&&"Interactive"!==o.mode?this.legendTotalRect=e.mapAreaRect=e.totalRect=l:(e.totalRect=null,(o.height||o.width)&&"Interactive"===o.mode&&(e.totalRect=l),this.legendTotalRect=e.mapAreaRect=l),"Left"===o.position&&(e.mapAreaRect.width=l.width),this.translate=new J(n,a)}},S.prototype.getMarkersLegendCollections=function(d,e){var p=this;Array.prototype.forEach.call(e,function(l,r){var e=l.dataSource,s=l.legendText;Array.prototype.forEach.call(e,function(e,t){var i,o,n,a=!!Y.isNullOrUndefined(e[p.maps.legendSettings.showLegendPath])||e[p.maps.legendSettings.showLegendPath];l.visible&&a&&!Y.isNullOrUndefined(e.latitude)&&!Y.isNullOrUndefined(e.longitude)&&(l.template&&(i=dt(l.template,p.maps)(p.maps),(Y.isNullOrUndefined(i.childElementCount)?i[0]:i).querySelector("img").src),i=Y.isNullOrUndefined(e[s])?"":e[s],o=Y.isNullOrUndefined(l.colorValuePath)?l.fill:e[l.colorValuePath],n=[],p.maps.legendSettings.removeDuplicateLegend?n.push(p.getMarkerLegendData(d,i,o)):n.push({layerIndex:d,markerIndex:r,dataIndex:t,value:o,name:i,shape:Y.isNullOrUndefined(l.shapeValuePath)||Y.isNullOrUndefined(e[l.shapeValuePath])||""===e[l.shapeValuePath]?(p.maps.legendSettings.useMarkerShape?l:p.maps.legendSettings).shape:e[l.shapeValuePath]}),p.getOverallLegendItemsCollection(i,o,n,a))})})},S.prototype.getMarkerLegendData=function(n,a,l){var r=this,s=[];return this.maps.layers[n].markerSettings.map(function(e,o){e=e.dataSource;Array.prototype.forEach.call(e,function(e,t){var i=r.maps.layers[n].markerSettings[o];a!==e[i.legendText]&&""!==a||l!==(e[i.colorValuePath]||i.fill)||s.push({layerIndex:n,markerIndex:o,dataIndex:t,value:l,name:a,shape:Y.isNullOrUndefined(i.shapeValuePath)?i.shape:e[i.shapeValuePath]})})}),s},S.prototype.getRangeLegendCollection=function(a,l,e,t,r,s,d){for(var i,p=this,h=0,m=this.maps.legendSettings.fill,c=[],u=this,o=0,n=e;o<n.length;o++)!function(o){var n,e;Y.isNullOrUndefined(o.from)||Y.isNullOrUndefined(o.to)||(i=Y.isNullOrUndefined(o.label)?o.from+" - "+o.to:o.label,n=!(c=[]),!Y.isNullOrUndefined(t)&&0<t.length&&Array.prototype.forEach.call(t,function(e,t){var i=-1<s.indexOf(".")?Number(k(e,s)):parseFloat(e[s]);i>=o.from&&i<=o.to&&(n=!0,c.push(p.getLegendData(a,t,e,r,l,d,i)))}),n||c.push({layerIndex:a,shapeIndex:null,dataIndex:null,name:null,value:null}),e=Y.isNullOrUndefined(m)?"[object Array]"===Object.prototype.toString.call(o.color)?Y.isNullOrUndefined(o.value)?u.legendGradientColor(o,h):o.color[0]:o.color:m,h++,u.getOverallLegendItemsCollection(i,e,c,o.showLegend))}(n[o])},S.prototype.getOverallLegendItemsCollection=function(e,t,i,o){var n=[],a=this.maps.legendSettings;if(0<i.length&&o){for(var l=0;l<i.length;l++){var r=i[l];if(0<r.length)for(var s=0;s<r.length;s++)n.push(r[s]);else n.push(i[l]);n._isVisible=!0}if(!!this.maps.legendSettings.removeDuplicateLegend&&this.removeDuplicates(this.legendCollection,e,t))for(l=0;l<this.legendCollection.length;l++)this.legendCollection[l].text===e&&this.legendCollection[l].fill===t&&this.legendCollection[l].data.push(n[0]);else this.legendCollection.push({text:e,fill:t,data:n,opacity:a.opacity,borderColor:a.shapeBorder.color,borderWidth:a.shapeBorder.width})}},S.prototype.removeDuplicates=function(e,t,i){for(var o=!1,n=0;n<e.length;n++)if((e[n].text===t||""===e[n].text)&&e[n].fill===i){o=!0;break}return o},S.prototype.getEqualLegendCollection=function(r,s,d,p,h,m,c){for(var u,g=this,y=this.maps.legendSettings.fill,f=[],b=[],S=[],v=[],x=this,e=0,t=d;e<t.length;e++)!function(o){if(Y.isNullOrUndefined(o.value)){var n;Y.isNullOrUndefined(o.minOpacity)&&Y.isNullOrUndefined(o.maxOpacity)&&Y.isNullOrUndefined(o.value)&&Y.isNullOrUndefined(o.from)&&Y.isNullOrUndefined(o.to)&&!Y.isNullOrUndefined(o.color)&&(Array.prototype.forEach.call(p,function(e,t){for(var i=-1<m.indexOf(".")?k(e,m):e[m],o=0;o<S.length;o++)i===S[o]&&v.push(g.getLegendData(r,t,e,h,s,c,i))}),0===S.length&&(n=!1,Array.prototype.forEach.call(p,function(e,t){n=!1;for(var i=e[m],o=0;o<d.length;o++)Y.isNullOrUndefined(i)||isNaN(i)?n=n||!1:i>=d[o].from&&i<=d[o].to&&(n=!0);n||v.push(g.getLegendData(r,t,e,h,s,c,i))})),u=Y.isNullOrUndefined(o.label)?"Others":o.label,l="[object Array]"===Object.prototype.toString.call(o.color)?o.color[0]:o.color,x.getOverallLegendItemsCollection(u,l,v,o.showLegend))}else{u=Y.isNullOrUndefined(o.label)?o.value:o.label;var a=!(b=[]);!Y.isNullOrUndefined(p)&&0<p.length&&Array.prototype.forEach.call(p,function(e,t){var i=m&&-1<m.indexOf(".")?k(e,m):e[m];i===o.value?(a=!0,-1===f.indexOf(i)&&f.push(i),b.push(g.getLegendData(r,t,e,h,s,c,i))):-1===S.indexOf(i)&&S.push(i)});for(var e=0;e<f.length;e++)for(var t,i=0;i<S.length;i++)f[e]===S[i]&&(t=S.indexOf(f[e]),S.splice(t,1));a||b.push({layerIndex:r,shapeIndex:null,dataIndex:null,name:null,value:null});var l=Y.isNullOrUndefined(y)?"[object Array]"===Object.prototype.toString.call(o.color)?o.color[0]:o.color:y;x.getOverallLegendItemsCollection(u,l,b,o.showLegend)}}(t[e])},S.prototype.getDataLegendCollection=function(l,r,s,e,d,p,h){var m,c=this,u=this.maps.legendSettings.fill,g=this.maps.legendSettings.valuePath;Y.isNullOrUndefined(p)||Y.isNullOrUndefined(e)||Array.prototype.forEach.call(e,function(e,t){var i=!!Y.isNullOrUndefined(c.maps.legendSettings.showLegendPath)||!Y.isNullOrUndefined(e[c.maps.legendSettings.showLegendPath])&&e[c.maps.legendSettings.showLegendPath],o=-1<p.indexOf(".")?k(e,p):e[p],n=[],a=Y.isNullOrUndefined(u)?o:u;Y.isNullOrUndefined(o)||0!==s.length||Y.isNullOrUndefined(g)&&Y.isNullOrUndefined(d)||(m=Y.isNullOrUndefined(e[g])?-1<d.indexOf(".")?k(e,d):e[d]:-1<g.indexOf(".")?k(e,g):e[g],n.push(c.getLegendData(l,t,e,d,r,h,o))),c.getOverallLegendItemsCollection(m,a,n,i)})},S.prototype.interactiveHandler=function(e){var e=e.target,i=this.maps.legendSettings,o=this.maps.element.id+"_Interactive_Legend",t="Layers"===i.type?"_shapeIndex_":"Markers"===i.type?"_MarkerIndex_":"_BubbleIndex_";if(1<e.id.indexOf(t)){var n=parseFloat(e.id.split("_LayerIndex_")[1].split("_")[0]),a=parseFloat(e.id.split(/_dataIndex_/i)[1].split("_")[0]),l=void 0,r=void 0,s=void 0,t=(Y.isNullOrUndefined(C(o,this.maps.element.id))||Y.remove(C(o,this.maps.element.id)),this.maps.layersCollection[n]),t="Layers"===i.type?t.visible:"Markers"===i.type?t.markerSettings[parseFloat(e.id.split("_MarkerIndex_")[1].split("_")[0])].visible:this.maps.getBubbleVisible(this.maps.layersCollection[n]);if(i.visible&&0<this.legendRenderingCollections.length&&"Interactive"===i.mode&&t)for(var d=this.maps.svgObject.getBoundingClientRect(),p=0;p<this.legendCollection.length;p++){var h=this.legendCollection[p],m=C(this.maps.element.id+"_Legend_Index_"+p,this.maps.element.id),c=m.getBoundingClientRect(),u=new K(Math.abs(c.left-d.left),Math.abs(c.top-d.top),c.width,c.height),l=m.getAttribute("fill"),r=i.shapeBorder.color,s=i.shapeBorder.width;if(!Y.isNullOrUndefined(h.data))for(var g=h.data,y=this,f=0;f<g.length;f++)if("break"===function(e){var t;if(a===g[e].dataIndex&&n===g[e].layerIndex)return y.renderInteractivePointer(i,l,r,o,s,u),t=C(o,y.maps.element.id),y.maps.isDevice&&!Y.isNullOrUndefined(t)&&(clearTimeout(y.arrowTimer),y.arrowTimer=setTimeout(function(){Y.isNullOrUndefined(t.parentNode)||Y.remove(t)},2e3)),"break"}(f))break}}else Y.isNullOrUndefined(C(o,this.maps.element.id))||Y.remove(C(o,this.maps.element.id))},S.prototype.renderInteractivePointer=function(e,t,i,o,n,a){var l,r,s="None"===e.orientation?"Top"===e.position||"Bottom"===e.position?"Horizontal":"Vertical":e.orientation,a=(a.y="Float"===e.position&&this.maps.isTileMap?a.y-this.maps.mapAreaRect.y:a.y,s="Horizontal"===s?e.invertedPointer?" M "+(l=a.x+a.width/2-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(r=a.y+a.height)+" L "+(l-10)+" "+(r+10)+" L "+(l+10)+" "+(r+10)+" Z ":" M "+(l=a.x+a.width/2-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(r=a.y)+" L "+(l-10)+" "+(r-10)+" L "+(l+10)+" "+(r-10)+" Z ":e.invertedPointer?" M "+(l=a.x-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(r=a.y+a.height/2)+" L "+(l-10)+" "+(r-10)+" L "+(l-10)+" "+(r+10)+" z ":" M "+(l=a.x+a.width-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(r=a.y+a.height/2)+" L "+(l+10)+" "+(r-10)+" L "+(l+10)+" "+(r+10)+" z ",new A(o,t,n,i,1,1,"",s));("Float"===e.position&&this.maps.isTileMap?this.maps.mapLayerPanel.layerGroup:this.maps.svgObject).appendChild(this.maps.renderer.drawPath(a))},S.prototype.wireEvents=function(e){Y.EventHandler.add(e,Y.Browser.touchStartEvent,this.changeNextPage,this)},S.prototype.addEventListener=function(){this.maps.isDestroyed||(this.maps.on(Y.Browser.touchMoveEvent,this.interactiveHandler,this),this.maps.on(Y.Browser.touchEndEvent,this.interactiveHandler,this),this.maps.on(Io,this.legendClick,this))},S.prototype.markerToggleSelection=function(e,t,i,o){e.setAttribute("fill",this.legendCollection[o].fill),e.setAttribute("stroke",this.maps.layers[t].markerSettings[i].border.color),e.setAttribute("fill-opacity",this.maps.layers[t].markerSettings[i].opacity.toString()),e.setAttribute("stroke-width",this.maps.layers[t].markerSettings[i].border.width.toString()),e.setAttribute("stroke-opacity",(Y.isNullOrUndefined(this.maps.layers[t].markerSettings[i].border.opacity)?this.maps.layers[t].markerSettings[i]:this.maps.layers[t].markerSettings[i].border).opacity.toString());o=this.maps.toggledElementId.indexOf(e.id);-1!==o&&this.maps.toggledElementId.splice(o,1)},S.prototype.bubbleToggleSelection=function(e,t,i,o){e.setAttribute("fill",this.legendCollection[o].fill),e.setAttribute("stroke",this.maps.layers[t].bubbleSettings[i].border.color),e.setAttribute("fill-opacity",this.maps.layers[t].bubbleSettings[i].opacity.toString()),e.setAttribute("stroke-width",this.maps.layers[t].bubbleSettings[i].border.width.toString()),e.setAttribute("stroke-opacity",(Y.isNullOrUndefined(this.maps.layers[t].bubbleSettings[i].border.opacity)?this.maps.layers[t].bubbleSettings[i]:this.maps.layers[t].bubbleSettings[i].border).opacity.toString())},S.prototype.legendClick=function(e){var t,i,o=this.maps.legendSettings.toggleLegendSettings.fill,n=this.maps.legendSettings.toggleLegendSettings.opacity,a=this.maps.legendSettings.toggleLegendSettings.border.color,l=this.maps.legendSettings.toggleLegendSettings.border.width,r=(Y.isNullOrUndefined(this.maps.legendSettings.toggleLegendSettings.border.opacity)?this.maps.legendSettings.toggleLegendSettings:this.maps.legendSettings.toggleLegendSettings.border).opacity;if(!Y.isNullOrUndefined(e.parentNode)&&-1<e.parentNode.id.indexOf(this.maps.element.id+"_Legend_Index_")){var s=void 0,d=parseFloat(e.parentElement.id.substr((this.maps.element.id+"_Legend_Index_").length)),p=(f=this.legendCollection[d].data)._isVisible,h=void 0;if(this.maps.legendSettings.toggleLegendSettings.enable&&("Bubbles"===this.maps.legendSettings.type||"Markers"===this.maps.legendSettings.type))for(var m=0;m<this.maps.layers.length;m++)for(var c=0;c<("Bubbles"===this.maps.legendSettings.type?this.maps.layers[m].bubbleSettings:this.maps.layers[m].markerSettings).length;c++){for(var u=0;u<f.length;u++){h=this.legendCollection[d].data[u],s="Bubbles"===this.maps.legendSettings.type?C(this.maps.element.id+"_LayerIndex_"+h.layerIndex+"_BubbleIndex_"+c+"_dataIndex_"+h.dataIndex,this.maps.element.id):C(this.maps.element.id+"_LayerIndex_"+h.layerIndex+"_MarkerIndex_"+h.markerIndex+"_dataIndex_"+h.dataIndex,this.maps.element.id),Y.isNullOrUndefined(h.shape)||"Balloon"!==h.shape||(s=(s="Bubbles"===this.maps.legendSettings.type?C(this.maps.element.id+"_LayerIndex_"+h.layerIndex+"_BubbleIndex_"+c+"_dataIndex_"+h.dataIndex+"_Group",this.maps.element.id):C(this.maps.element.id+"_LayerIndex_"+h.layerIndex+"_MarkerIndex_"+h.markerIndex+"_dataIndex_"+h.dataIndex+"_Group",this.maps.element.id)).children[0]);var g=this.maps.toggledLegendId.indexOf(d);p&&null!==s?(this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(s.setAttribute("fill",this.maps.layers[m].shapeSettings.fill),s.setAttribute("stroke",this.maps.layers[m].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor),s.setAttribute("fill-opacity",this.maps.layers[m].shapeSettings.opacity.toString()),s.setAttribute("stroke-width",(Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.width)?0:this.maps.layers[m].shapeSettings.border.width).toString()),s.setAttribute("stroke-opacity",(Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.opacity)?this.maps.layers[m].shapeSettings:this.maps.layers[m].shapeSettings.border).opacity.toString())):(s.setAttribute("fill",o),s.setAttribute("fill-opacity",n.toString()),s.setAttribute("stroke",a),s.setAttribute("stroke-width",l.toString()),s.setAttribute("stroke-opacity",r.toString())),"Markers"===this.maps.legendSettings.type&&(-1===g&&this.maps.toggledLegendId.push(d),-1===this.maps.toggledElementId.indexOf(s.id))&&this.maps.toggledElementId.push(s.id),null!==e&&(t=C(this.maps.element.id+"_Legend_Shape_Index_"+d,this.maps.element.id),i=C(this.maps.element.id+"_Legend_Text_Index_"+d,this.maps.element.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?this.setToggleAttributes(i,t,this.maps.layers[m].shapeSettings.fill,this.maps.layers[m].shapeSettings.opacity,this.maps.layers[m].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor,Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.width)?0:this.maps.layers[m].shapeSettings.border.width,(Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.opacity)?this.maps.layers[m].shapeSettings:this.maps.layers[m].shapeSettings.border).opacity,this.maps.layers[m].shapeSettings.fill):this.setToggleAttributes(i,t,o,n,a,l,r,o))):("Markers"===this.maps.legendSettings.type?(-1!==g&&0===u&&this.maps.toggledLegendId.splice(g,1),this.markerToggleSelection(s,m,c,d)):this.bubbleToggleSelection(s,m,c,d),null!==e&&(t=C(this.maps.element.id+"_Legend_Shape_Index_"+d,this.maps.element.id),i=C(this.maps.element.id+"_Legend_Text_Index_"+d,this.maps.element.id),this.setToggleAttributes(i,t,this.legendCollection[d].fill,this.legendCollection[d].opacity,this.legendCollection[d].shapeBorder.color,this.legendCollection[d].shapeBorder.width,this.legendCollection[d].shapeBorder.opacity,this.maps.legendSettings.textStyle.color),"HorizontalLine"!==this.maps.legendSettings.shape&&"VerticalLine"!==this.maps.legendSettings.shape&&"Cross"!==this.maps.legendSettings.shape||t.setAttribute("stroke",this.legendCollection[d].fill)))}f._isVisible=!p}if("Layers"===this.maps.legendSettings.type&&this.maps.legendSettings.toggleLegendSettings.enable){var y=void 0;this.removeCollections(e,d),-1!==(g=this.maps.toggledLegendId.indexOf(d))&&(p=!1);for(c=0;c<this.maps.layers.length;c++)for(u=0;u<f.length;u++){h=this.legendCollection[d].data[u];null!==(y=C(this.maps.element.id+"_LayerIndex_"+h.layerIndex+"_shapeIndex_"+h.shapeIndex+"_dataIndex_"+h.dataIndex,this.maps.element.id))&&(O=this.maps.toggledElementId.indexOf(y.id),p?(0===u&&this.maps.toggledLegendId.push(d),-1===O&&this.maps.toggledElementId.push(y.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(y.setAttribute("fill",this.maps.layers[c].shapeSettings.fill),y.setAttribute("fill-opacity",this.maps.layers[c].shapeSettings.opacity.toString()),y.setAttribute("stroke",this.maps.layers[c].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor),y.setAttribute("stroke-width",(Y.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width).toString()),y.setAttribute("stroke-opacity",(Y.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.opacity)?this.maps.layers[c].shapeSettings:this.maps.layers[c].shapeSettings.border).opacity.toString())):(y.setAttribute("fill",o),y.setAttribute("fill-opacity",n.toString()),y.setAttribute("stroke",a),y.setAttribute("stroke-width",l.toString()),y.setAttribute("stroke-opacity",r.toString())),null!==e&&(i=C(this.maps.element.id+"_Legend_Text_Index_"+d,this.maps.element.id),t=C(this.maps.element.id+"_Legend_Shape_Index_"+d,this.maps.element.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?this.setToggleAttributes(i,t,this.maps.layers[c].shapeSettings.fill,this.maps.layers[c].shapeSettings.opacity,this.maps.layers[c].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor,Y.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width,(Y.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.opacity)?this.maps.layers[c].shapeSettings:this.maps.layers[c].shapeSettings.border).opacity,this.maps.layers[c].shapeSettings.fill):this.setToggleAttributes(i,t,o,n,a,l,r,o))):(-1!==g&&0===u&&this.maps.toggledLegendId.splice(g,1),-1!==O&&this.maps.toggledElementId.splice(O,1),y.setAttribute("fill",this.legendCollection[d].fill),y.setAttribute("stroke-opacity",(Y.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.opacity)?this.maps.layers[c].shapeSettings:this.maps.layers[c].shapeSettings.border).opacity.toString()),y.setAttribute("stroke-width",(Y.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width).toString()),y.setAttribute("fill-opacity",this.maps.layers[c].shapeSettings.opacity.toString()),y.setAttribute("stroke",this.maps.layers[c].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor),null!==e&&(i=C(this.maps.element.id+"_Legend_Text_Index_"+d,this.maps.element.id),t=C(this.maps.element.id+"_Legend_Shape_Index_"+d,this.maps.element.id),this.setToggleAttributes(i,t,this.legendCollection[d].fill,this.legendCollection[d].opacity,this.legendCollection[d].shapeBorder.color,this.legendCollection[d].shapeBorder.width,this.legendCollection[d].shapeBorder.opacity,"#757575"))))}f._isVisible=!p}}else if(!Y.isNullOrUndefined(e.id)&&(-1<e.id.indexOf(this.maps.element.id+"_Legend_Shape_Index")||-1!==e.id.indexOf(this.maps.element.id+"_Legend_Index"))&&this.maps.legendSettings.visible&&-1===e.id.indexOf("_Text")){var f,b=void 0,d=parseFloat(e.id.split(this.maps.element.id+"_Legend_Index_")[1]),S=void 0,p=(f=this.legendCollection[d].data)._isVisible;if(("Bubbles"===this.maps.legendSettings.type||"Markers"===this.maps.legendSettings.type)&&this.maps.legendSettings.toggleLegendSettings.enable)for(g=this.maps.toggledLegendId.indexOf(d),m=0;m<this.maps.layers.length;m++)for(c=0;c<("Bubbles"===this.maps.legendSettings.type?this.maps.layers[m].bubbleSettings:this.maps.layers[m].markerSettings).length;c++){for(u=0;u<f.length;u++){S=this.legendCollection[d].data[u],b="Bubbles"===this.maps.legendSettings.type?C(this.maps.element.id+"_LayerIndex_"+S.layerIndex+"_BubbleIndex_"+c+"_dataIndex_"+S.dataIndex,this.maps.element.id):C(this.maps.element.id+"_LayerIndex_"+S.layerIndex+"_MarkerIndex_"+c+"_dataIndex_"+S.dataIndex,this.maps.element.id);Y.isNullOrUndefined(S.shape)||"Balloon"!==S.shape||(b=(b="Bubbles"===this.maps.legendSettings.type?C(this.maps.element.id+"_LayerIndex_"+S.layerIndex+"_BubbleIndex_"+c+"_dataIndex_"+S.dataIndex+"_Group",this.maps.element.id):C(this.maps.element.id+"_LayerIndex_"+S.layerIndex+"_MarkerIndex_"+c+"_dataIndex_"+S.dataIndex+"_Group",this.maps.element.id)).children[0]),p&&null!==b?("Markers"===this.maps.legendSettings.type&&(-1===g&&this.maps.toggledLegendId.push(d),-1===this.maps.toggledElementId.indexOf(b.id))&&this.maps.toggledElementId.push(b.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(b.setAttribute("fill",this.maps.layers[m].shapeSettings.fill),b.setAttribute("stroke",this.maps.layers[m].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor),b.setAttribute("stroke-width",(Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.width)?0:this.maps.layers[m].shapeSettings.border.width).toString()),b.setAttribute("stroke-opacity",(Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.opacity)?this.maps.layers[m].shapeSettings:this.maps.layers[m].shapeSettings.border).opacity.toString()),b.setAttribute("fill-opacity",this.maps.layers[m].shapeSettings.opacity.toString())):(b.setAttribute("fill",o),b.setAttribute("fill-opacity",n.toString()),b.setAttribute("stroke",a),b.setAttribute("stroke-width",l.toString()),b.setAttribute("stroke-opacity",r.toString())),null!==e&&(i=C(this.maps.element.id+"_Legend_Index_"+d+"_Text",this.maps.element.id),t=C(this.maps.element.id+"_Legend_Index_"+d,this.maps.element.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?this.setToggleAttributes(i,t,this.maps.layers[m].shapeSettings.fill,this.maps.layers[m].shapeSettings.opacity,this.maps.layers[m].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor,Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.width)?0:this.maps.layers[m].shapeSettings.border.width,(Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.opacity)?this.maps.layers[m].shapeSettings:this.maps.layers[m].shapeSettings.border).opacity,this.maps.layers[m].shapeSettings.fill):this.setToggleAttributes(i,t,o,n,a,l,r,o))):("Markers"===this.maps.legendSettings.type?(-1!==g&&0===u&&this.maps.toggledLegendId.splice(g,1),this.markerToggleSelection(b,m,c,d)):this.bubbleToggleSelection(b,m,c,d),null!==e&&((t=C(this.maps.element.id+"_Legend_Index_"+d,this.maps.element.id)).setAttribute("fill",this.legendCollection[d].fill),t.setAttribute("fill-opacity",this.legendCollection[d].opacity),t.setAttribute("stroke",this.legendCollection[d].shapeBorder.color),t.setAttribute("stroke-width",this.legendCollection[d].shapeBorder.width),t.setAttribute("stroke-opacity",this.legendCollection[d].shapeBorder.opacity),(i=C(this.maps.element.id+"_Legend_Index_"+d+"_Text",this.maps.element.id)).setAttribute("fill",this.maps.legendSettings.textStyle.color)))}f._isVisible=!p}if("Layers"===this.maps.legendSettings.type&&this.maps.legendSettings.toggleLegendSettings.enable){var v=void 0,x=(this.removeCollections(e,d),this.maps.toggledLegendId.indexOf(d));-1!==x&&(p=!1);for(m=0;m<this.maps.layers.length;m++)for(var O,u=0;u<f.length;u++)S=this.legendCollection[d].data[u],null!==(v=C(this.maps.element.id+"_LayerIndex_"+S.layerIndex+"_shapeIndex_"+S.shapeIndex+"_dataIndex_"+S.dataIndex,this.maps.element.id))&&(O=this.maps.toggledElementId.indexOf(v.id),p?(0===u&&this.maps.toggledLegendId.push(d),-1===O&&this.maps.toggledElementId.push(v.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(v.setAttribute("fill",this.maps.layers[0].shapeSettings.fill),v.setAttribute("stroke",this.maps.layers[0].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor),v.setAttribute("fill-opacity",this.maps.layers[m].shapeSettings.opacity.toString()),v.setAttribute("stroke-width",(Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.width)?0:this.maps.layers[m].shapeSettings.border.width).toString()),v.setAttribute("stroke-opacity",(Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.opacity)?this.maps.layers[m].shapeSettings:this.maps.layers[m].shapeSettings.border).opacity.toString())):(v.setAttribute("fill",o),v.setAttribute("fill-opacity",n.toString()),v.setAttribute("stroke",a),v.setAttribute("stroke-width",l.toString()),v.setAttribute("stroke-opacity",r.toString())),null!==e&&(t=C(this.maps.element.id+"_Legend_Index_"+d,this.maps.element.id),i=C(this.maps.element.id+"_Legend_Index_"+d+"_Text",this.maps.element.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?this.setToggleAttributes(i,t,this.maps.layers[0].shapeSettings.fill,this.maps.layers[m].shapeSettings.opacity,this.maps.layers[0].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor,Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.width)?0:this.maps.layers[m].shapeSettings.border.width,(Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.opacity)?this.maps.layers[m].shapeSettings:this.maps.layers[m].shapeSettings.border).opacity,this.maps.layers[0].shapeSettings.fill):this.setToggleAttributes(i,t,o,n,a,l,r,o))):(-1!==x&&0===u&&this.maps.toggledLegendId.splice(x,1),-1!==O&&this.maps.toggledElementId.splice(O,1),v.setAttribute("fill-opacity",this.maps.layers[m].shapeSettings.opacity.toString()),v.setAttribute("stroke-width",(Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.width)?0:this.maps.layers[m].shapeSettings.border.width).toString()),v.setAttribute("stroke",this.maps.layers[0].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor),v.setAttribute("stroke-opacity",(Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.opacity)?this.maps.layers[m].shapeSettings:this.maps.layers[m].shapeSettings.border).opacity.toString()),v.setAttribute("fill",this.legendCollection[d].fill),null!==e&&(i=C(this.maps.element.id+"_Legend_Index_"+d+"_Text",this.maps.element.id),t=C(this.maps.element.id+"_Legend_Index_"+d,this.maps.element.id),this.setToggleAttributes(i,t,this.legendCollection[d].fill,this.legendCollection[d].opacity,this.legendCollection[d].shapeBorder.color,this.legendCollection[d].shapeBorder.width,this.legendCollection[d].shapeBorder.opacity,"#757575"))));f._isVisible=!p}}},S.prototype.removeCollections=function(e,t){this.removeLegendSelectionCollection(e);var i=this.getIndexofLegend(this.maps.legendSelectionCollection,e);-1!==i&&this.maps.legendSelectionCollection.splice(i,1);-1!==this.getIndexofLegend(this.legendHighlightCollection,e)&&this.legendHighlightCollection.splice(i,1);i=this.getIndexofLegend(this.shapeHighlightCollection,e),-1!==i&&this.shapeHighlightCollection.splice(i,1),e=this.maps.selectedLegendElementId.indexOf(t);-1!==e&&this.maps.selectedLegendElementId.splice(e,1)},S.prototype.removeEventListener=function(){this.maps.isDestroyed||(this.maps.off(Y.Browser.touchMoveEvent,this.interactiveHandler),this.maps.off(Y.Browser.touchEndEvent,this.interactiveHandler),this.maps.off(Io,this.legendClick))},S.prototype.getLegendData=function(e,t,i,o,n,a,l){var r=[];if("[object Array]"===Object.prototype.toString.call(n))for(var s=0;s<n.length;s++){var d=n[s],p=-1<o.indexOf(".")?k(i,o):i[o],h=Je(i[o],a,d.properties),p=Y.isNullOrUndefined(p)||"string"!=typeof p?p:p.toLowerCase();if((!Y.isNullOrUndefined(d.properties[h])&&isNaN(d.properties[h])?d.properties[h].toLowerCase():d.properties[h])===p)if("MultiPoint"!==d.geometry.type)r.push({layerIndex:e,shapeIndex:s,dataIndex:t,name:i[o],value:l,pointIndex:-1});else for(var m=0;m<d.geometry.coordinates.length;m++)r.push({layerIndex:e,shapeIndex:s,dataIndex:t,name:i[o],value:l,pointIndex:m})}return r},S.prototype.setToggleAttributes=function(e,t,i,o,n,a,l,r){e.setAttribute("fill",r),t.setAttribute("fill",i),t.setAttribute("fill-opacity",o.toString()),t.setAttribute("stroke",n),t.setAttribute("stroke-width",a.toString()),Y.isNullOrUndefined(l)||t.setAttribute("stroke-opacity",l.toString())},S.prototype.legendGradientColor=function(e,t){var i="http://www.w3.org/2000/svg";if(!Y.isNullOrUndefined(e.color)&&"object"==typeof e.color){var o=document.createElementNS(i,"linearGradient"),n=this.maps.legendSettings.position,a="Top"===n||"Bottom"===n?"100":"0",n="Top"===n||"Bottom"===n?"0":"100";o.setAttribute("id","linear_"+t+"_"+this.maps.element.id),o.setAttribute("x1","0%"),o.setAttribute("y1","0%"),o.setAttribute("x2",a+"%"),o.setAttribute("y2",n+"%");for(var l=0;l<e.color.length;l++){var r=100/(e.color.length-1),s=document.createElementNS(i,"stop");s.setAttribute("offset",l*r+"%"),s.setAttribute("stop-color",e.color[l]),s.setAttribute("stop-opacity",1..toString()),o.appendChild(s)}this.legendLinearGradient=o;a="url(#linear_"+t+"_"+this.maps.element.id+")";this.defsElement.appendChild(o),n=a}return n},S.prototype.getModuleName=function(){return"Legend"},S.prototype.destroy=function(){this.legendCollection=[],this.legendRenderingCollections=[],this.translate=null,this.legendBorderRect=null,this.initialMapAreaRect=null,this.legendTotalRect=null,this.totalPages=[],this.legendItemRect=null,this.legendGroup=null,this.shapeHighlightCollection=[],this.legendHighlightCollection=[],this.shapePreviousColor=[],this.selectedNonLegendShapes=[],this.legendLinearGradient=null,this.currentLayer=null,this.defsElement=null,this.legendElement=[],this.oldShapeElement=null,this.removeEventListener(),this.maps=null};var On=S;function S(e){this.legendBorderRect=new K(0,0,0,0),this.initialMapAreaRect=new K(0,0,0,0),this.legendTotalRect=new K(0,0,0,0),this.totalPages=[],this.page=0,this.currentPage=0,this.legendItemRect=new K(0,0,0,0),this.heightIncrement=0,this.widthIncrement=0,this.textMaxWidth=0,this.shapeHighlightCollection=[],this.legendHighlightCollection=[],this.shapePreviousColor=[],this.selectedNonLegendShapes=[],this.shapeToggled=!0,this.legendElement=null,this.maps=e,this.addEventListener()}_n.prototype.addEventListener=function(){this.maps.isDestroyed||(this.maps.on(Y.Browser.touchMoveEvent,this.mouseMove,this),this.maps.on(Y.Browser.touchStartEvent,this.mouseMove,this))},_n.prototype.removeEventListener=function(){this.maps.isDestroyed||(this.maps.off(Y.Browser.touchMoveEvent,this.mouseMove),this.maps.off(Y.Browser.touchStartEvent,this.mouseMove))},_n.prototype.addHighlight=function(e,t,i){e=ct(e,t,0,this.maps);i?this.mapHighlight(e,null,null):x(e)},_n.prototype.mouseMove=function(e){var t,i,o,n,a,l=e.target,e="touch"===e.pointerType||"2"===e.pointerType||-1<e.type.indexOf("touch");(-1!==l.id.indexOf("LayerIndex")||-1<l.id.indexOf("NavigationIndex"))&&"ShapeselectionMapStyle"!==l.getAttribute("class")&&!e&&"MarkerselectionMapStyle"!==l.getAttribute("class")&&"BubbleselectionMapStyle"!==l.getAttribute("class")&&"navigationlineselectionMapStyle"!==l.getAttribute("class")&&"PolygonselectionMapStyle"!==l.getAttribute("class")&&"LineselectionMapStyle"!==l.getAttribute("class")?(i=parseInt(l.id.split("_LayerIndex_")[1].split("_")[0],10),n=o=t=e=void 0,-1<l.id.indexOf("shapeIndex")?(o=parseInt(l.id.split("_shapeIndex_")[1].split("_")[0],10),e=this.maps.layers[i].shapeData.features&&!Y.isNullOrUndefined(this.maps.layersCollection[i].layerData[o])?this.maps.layersCollection[i].layerData[o].property:null,n=parseInt(l.id.split("_dataIndex_")[1].split("_")[0],10),t=Y.isNullOrUndefined(n)?null:this.maps.layers[i].dataSource[n],this.highlightSettings=this.maps.layers[i].highlightSettings):-1<l.id.indexOf("BubbleIndex")?(o=parseInt(l.id.split("_BubbleIndex_")[1].split("_")[0],10),n=parseInt(l.id.split("_dataIndex_")[1].split("_")[0],10),t=this.maps.layers[i].bubbleSettings[o].dataSource[n],this.highlightSettings=this.maps.layers[i].bubbleSettings[o].highlightSettings):-1<l.id.indexOf("MarkerIndex")?(o=parseInt(l.id.split("_MarkerIndex_")[1].split("_")[0],10),n=parseInt(l.id.split("_dataIndex_")[1].split("_")[0],10),t=this.maps.layers[i].markerSettings[o].dataSource[n],this.highlightSettings=this.maps.layers[i].markerSettings[o].highlightSettings):-1<l.id.indexOf("_PolygonIndex_")?(n=parseInt(l.id.split("_PolygonIndex_")[1].split("_")[0],10),t=this.maps.layers[i].polygonSettings.polygons[n].points,this.highlightSettings=this.maps.layers[i].polygonSettings.highlightSettings):(a=parseInt(l.id.split("_NavigationIndex_")[1].split("_")[0],10),i=parseInt(l.id.split("_LayerIndex_")[1].split("_")[0],10),e=null,t={latitude:this.maps.layers[i].navigationLineSettings[a].latitude,longitude:this.maps.layers[i].navigationLineSettings[a].longitude},this.highlightSettings=this.maps.layers[i].navigationLineSettings[a].highlightSettings),this.highlightSettings.enable?this.handleHighlight(l,i,t,e):(o=document.getElementsByClassName("highlightMapStyle")[0],Y.isNullOrUndefined(o)||(x(o),-1<o.id.indexOf("NavigationIndex")&&(a=parseInt(o.id.split("_NavigationIndex_")[1].split("_")[0],10),n=parseInt(o.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10),o.setAttribute("stroke-width",this.maps.layers[n].navigationLineSettings[a].width.toString()),o.setAttribute("stroke",this.maps.layers[n].navigationLineSettings[a].color))))):0<mt("highlightMapStyle").length?(-1<(l=mt("highlightMapStyle")[0]).id.indexOf("NavigationIndex")&&(a=parseInt(l.id.split("_NavigationIndex_")[1].split("_")[0],10),i=parseInt(l.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10),l.setAttribute("stroke-width",this.maps.layers[i].navigationLineSettings[a].width.toString()),l.setAttribute("stroke",this.maps.layers[i].navigationLineSettings[a].color)),x(l),this.maps.legendSettings.visible&&this.maps.legendModule&&this.maps.legendModule.removeShapeHighlightCollection()):(-1!==l.id.indexOf(this.maps.element.id+"_Legend_Shape_Index")||-1!==l.id.indexOf(this.maps.element.id+"_Legend_Index"))&&this.maps.legendModule&&this.maps.legendSettings.visible&&-1===l.id.indexOf("_Text")?this.maps.legendModule.legendHighLightAndSelection(l,"highlight"):this.maps.legendSettings.visible&&this.maps.legendModule&&this.maps.legendModule.removeLegendHighlightCollection()},_n.prototype.handleHighlight=function(e,t,i,o){this.maps.legendSettings.visible&&-1===e.id.indexOf("_MarkerIndex_")&&this.maps.legendModule&&"Layers"===this.maps.legendSettings.type&&this.maps.legendModule.shapeHighLightAndSelection(e,i,this.highlightSettings,"highlight",t),-1<e.id.indexOf("shapeIndex")&&this.maps.legendSettings.visible&&this.maps.legendModule&&!this.maps.legendModule.shapeToggled||this.mapHighlight(e,o,i)},_n.prototype.mapHighlight=function(e,t,i){var o=this,n=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),a=!1,n=(-1<e.id.indexOf("MarkerIndex")&&(l=parseInt(e.id.split("_MarkerIndex_")[1].split("_")[0],10),a=this.maps.layers[n].markerSettings[l].highlightSettings.enable),-1!==e.parentElement.id.indexOf("LineString")&&this.highlightSettings.fill||this.highlightSettings.border.color),l=-1===e.parentElement.id.indexOf("LineString")?this.highlightSettings.border.width/(a?1:this.maps.scale):this.highlightSettings.border.width/this.maps.scale,a=(Y.isNullOrUndefined(this.highlightSettings.border.opacity)?this.highlightSettings:this.highlightSettings.border).opacity,r={opacity:this.highlightSettings.opacity,fill:-1===e.parentElement.id.indexOf("LineString")?-1===e.id.indexOf("NavigationIndex")?Y.isNullOrUndefined(this.highlightSettings.fill)?e.getAttribute("fill"):this.highlightSettings.fill:"none":"transparent",border:{color:n,width:l,opacity:a},cancel:!1},s={opacity:r.opacity,fill:r.fill,border:{color:n,width:l,opacity:a},name:Ao,target:e.id,cancel:!1,shapeData:t,data:i,maps:this.maps},d=(-1<e.id.indexOf("shapeIndex")&&this.maps.trigger(Ao,s,function(){}),{opacity:r.opacity,fill:r.fill,border:{color:n,width:l,opacity:a},name:tn,target:e.id,cancel:!1,shapeData:t,data:i,maps:this.maps});this.maps.trigger(tn,d,function(){d.cancel=(r.cancel!==d.cancel?d:-1<e.id.indexOf("shapeIndex")?s:r).cancel,d.fill=(r.fill!==d.fill?d:-1<e.id.indexOf("shapeIndex")?s:r).fill,d.opacity=(r.opacity!==d.opacity?d:-1<e.id.indexOf("shapeIndex")?s:r).opacity,d.border.color=(r.border.color!==d.border.color?d:-1<e.id.indexOf("shapeIndex")?s:r).border.color,d.border.width=(r.border.width!==d.border.width?d:-1<e.id.indexOf("shapeIndex")?s:r).border.width,d.border.opacity=(r.border.opacity!==d.border.opacity?d:-1<e.id.indexOf("shapeIndex")?s:r).border.opacity,o.highlightMap(e,d)})},_n.prototype.highlightMap=function(e,t){var i,o,n;"highlightMapStyle"===e.getAttribute("class")||t.cancel||(0<mt("highlightMapStyle").length&&(x(i=mt("highlightMapStyle")[0]),-1<i.id.indexOf("NavigationIndex"))&&(o=parseInt(i.id.split("_NavigationIndex_")[1].split("_")[0],10),n=parseInt(i.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10),i.setAttribute("stroke-width",this.maps.layers[n].navigationLineSettings[o].width.toString()),i.setAttribute("stroke",this.maps.layers[n].navigationLineSettings[o].color)),F("highlightMap")?gt("highlightMap","highlightMapStyle",t):document.body.appendChild(ut("highlightMap","highlightMapStyle",t)),e.setAttribute("class","highlightMapStyle"))},_n.prototype.getModuleName=function(){return"Highlight"},_n.prototype.destroy=function(){this.highlightSettings=null,this.removeEventListener(),this.maps=null};var Cn=_n;function _n(e){this.maps=e,this.addEventListener()}Ln.prototype.addEventListener=function(){this.maps.isDestroyed||this.maps.on(Io,this.mouseClick,this)},Ln.prototype.removeEventListener=function(){this.maps.isDestroyed||this.maps.off(Io,this.mouseClick)},Ln.prototype.mouseClick=function(e){var t,i,o,n,a;!Y.isNullOrUndefined(e.type)&&-1!==e.type.indexOf("touch")&&Y.isNullOrUndefined(e.id)&&(e=e.target),!Y.isNullOrUndefined(e.id)&&(-1<e.id.indexOf("LayerIndex")||-1<e.id.indexOf("NavigationIndex"))?(i=n=o=a=void 0,t=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),-1<e.id.indexOf("shapeIndex")?(n=parseInt(e.id.split("_shapeIndex_")[1].split("_")[0],10),a=!Y.isNullOrUndefined(this.maps.layers[t].shapeData.features)&&this.maps.layers[t].shapeData.features.length>n?this.maps.layers[t].shapeData.features[n].properties:!Y.isNullOrUndefined(this.maps.layers[t].shapeData.geometries)&&this.maps.layers[t].shapeData.geometries.length>n?this.maps.layers[t].shapeData.geometries[n].properties:null,i=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=Y.isNullOrUndefined(i)?null:this.maps.layers[t].dataSource[i],this.selectionsettings=this.maps.layers[t].selectionSettings,this.selectionType="Shape"):-1<e.id.indexOf("BubbleIndex")?(n=parseInt(e.id.split("_BubbleIndex_")[1].split("_")[0],10),i=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=this.maps.layers[t].bubbleSettings[n].dataSource[i],this.selectionsettings=this.maps.layers[t].bubbleSettings[n].selectionSettings,this.selectionType="Bubble"):-1<e.id.indexOf("MarkerIndex")?(n=parseInt(e.id.split("_MarkerIndex_")[1].split("_")[0],10),i=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=this.maps.layers[t].markerSettings[n].dataSource[i],this.selectionsettings=this.maps.layers[t].markerSettings[n].selectionSettings,this.selectionType="Marker"):-1<e.id.indexOf("_PolygonIndex_")?(i=parseInt(e.id.split("_PolygonIndex_")[1].split("_")[0],10),o=this.maps.layers[t].polygonSettings.polygons[i].points,this.selectionsettings=this.maps.layers[t].polygonSettings.selectionSettings,this.selectionType="Polygon"):-1<e.id.indexOf("NavigationIndex")&&(n=parseInt(e.id.split("_NavigationIndex_")[1].split("_")[0],10),a=null,o={latitude:this.maps.layers[t].navigationLineSettings[n].latitude,longitude:this.maps.layers[t].navigationLineSettings[n].longitude},this.selectionsettings=this.maps.layers[t].navigationLineSettings[n].selectionSettings,this.selectionType="navigationline"),!Y.isNullOrUndefined(this.selectionsettings)&&this.selectionsettings.enable&&this.selectElement(e,t,o,a)):this.maps.legendSettings.visible&&!this.maps.legendSettings.toggleLegendSettings.enable&&this.maps.legendModule&&!Y.isNullOrUndefined(e.id)&&-1===e.id.indexOf("_Text")&&(-1<e.id.indexOf(this.maps.element.id+"_Legend_Shape_Index")||-1!==e.id.indexOf(this.maps.element.id+"_Legend_Index"))&&this.maps.legendModule.legendHighLightAndSelection(e,"selection")},Ln.prototype.selectElement=function(e,t,i,o){this.maps.mapSelect=!!e,this.maps.legendModule&&this.maps.legendSettings.visible&&-1===e.id.indexOf("_MarkerIndex_")&&this.maps.legendModule.shapeHighLightAndSelection(e,i,this.selectionsettings,"selection",t),-1<e.id.indexOf("shapeIndex")&&this.maps.legendSettings.visible&&this.maps.legendModule&&!this.maps.legendModule.shapeToggled||this.selectMap(e,o,i)},Ln.prototype.addSelection=function(e,t,i){e=ct(e,t,0,this.maps);i?this.selectMap(e,null,null):x(e)},Ln.prototype.selectMap=function(h,e,t){var m=this,c=-1<h.parentElement.id.indexOf("LineString"),i={color:c&&this.selectionsettings.fill||this.selectionsettings.border.color,width:c?this.selectionsettings.border.width/this.maps.scale:this.selectionsettings.border.width/("Marker"===this.selectionType?1:this.maps.scale),opacity:this.selectionsettings.border.opacity},u={opacity:this.selectionsettings.opacity,fill:c?"transparent":"navigationline"!==this.selectionType?this.selectionsettings.fill:"none",border:i,name:en,target:h.id,cancel:!1,shapeData:e,data:t,maps:this.maps};this.maps.trigger("itemSelection",u,function(e){if(u.border.opacity=(Y.isNullOrUndefined(m.selectionsettings.border.opacity)?m.selectionsettings:m.selectionsettings.border).opacity,!u.cancel)if(h.getAttribute("class")===m.selectionType+"selectionMapStyle"||"LineselectionMapStyle"===h.getAttribute("class")){x(h),m.removedSelectionList(h);for(var t=0;t<m.maps.shapeSelectionItem.length;t++)if(m.maps.shapeSelectionItem[t]===u.shapeData){m.maps.shapeSelectionItem.splice(t,1);break}-1<h.id.indexOf("NavigationIndex")&&(o=parseInt(h.id.split("_NavigationIndex_")[1].split("_")[0],10),n=parseInt(h.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10),h.setAttribute("stroke-width",m.maps.layers[n].navigationLineSettings[o].width.toString()),h.setAttribute("stroke",m.maps.layers[n].navigationLineSettings[o].color))}else{var i=N(m.maps.element.id+"_Layer_Collections");if(!m.selectionsettings.enableMultiSelect&&(0<i.getElementsByClassName(m.selectionType+"selectionMapStyle").length||0<i.getElementsByClassName("LineselectionMapStyle").length)){for(var o,n,a=i.getElementsByClassName(m.selectionType+"selectionMapStyle").length,l=void 0,r=0;r<a;r++)x(l=i.getElementsByClassName(m.selectionType+"selectionMapStyle")[0]),m.removedSelectionList(l);if(0<i.getElementsByClassName("LineselectionMapStyle").length)for(a=i.getElementsByClassName("LineselectionMapStyle").length,r=0;r<a;r++)x(l=i.getElementsByClassName("LineselectionMapStyle")[0]),m.removedSelectionList(l);if("Shape"===m.selectionType){m.maps.shapeSelectionItem=[];for(var s=m.maps.selectedElementId.length,d=0;d<s;d++){x(l=i.getElementsByClassName(m.selectionType+"selectionMapStyle")[0]);var p=m.maps.selectedElementId.indexOf(l.getAttribute("id"));m.maps.selectedElementId.splice(p,1)}}-1<l.id.indexOf("NavigationIndex")&&(o=parseInt(h.id.split("_NavigationIndex_")[1].split("_")[0],10),n=parseInt(h.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10),l.setAttribute("stroke-width",m.maps.layers[n].navigationLineSettings[o].width.toString()),l.setAttribute("stroke",m.maps.layers[n].navigationLineSettings[o].color))}c?(F("LineselectionMap")?gt("LineselectionMap","LineselectionMapStyle",u):document.body.appendChild(ut("LineselectionMap","LineselectionMapStyle",u)),h.setAttribute("class","LineselectionMapStyle")):(F(m.selectionType+"selectionMap")?gt(m.selectionType+"selectionMap",m.selectionType+"selectionMapStyle",u):document.body.appendChild(ut(m.selectionType+"selectionMap",m.selectionType+"selectionMapStyle",u)),h.setAttribute("class",m.selectionType+"selectionMapStyle")),"ShapeselectionMapStyle"===h.getAttribute("class")&&(m.maps.shapeSelectionClass=F(m.selectionType+"selectionMap"),m.maps.selectedElementId.push(h.getAttribute("id")),m.maps.shapeSelectionItem.push(u.shapeData)),"MarkerselectionMapStyle"===h.getAttribute("class")&&(m.maps.markerSelectionClass=F(m.selectionType+"selectionMap"),m.maps.selectedMarkerElementId.push(h.getAttribute("id"))),"BubbleselectionMapStyle"===h.getAttribute("class")&&(m.maps.bubbleSelectionClass=F(m.selectionType+"selectionMap"),m.maps.selectedBubbleElementId.push(h.getAttribute("id"))),"navigationlineselectionMapStyle"===h.getAttribute("class")&&(m.maps.navigationSelectionClass=F(m.selectionType+"selectionMap"),m.maps.selectedNavigationElementId.push(h.getAttribute("id"))),"PolygonselectionMapStyle"===h.getAttribute("class")&&(m.maps.polygonSelectionClass=F(m.selectionType+"selectionMap"),m.maps.selectedPolygonElementId.push(h.getAttribute("id")))}})},Ln.prototype.removedSelectionList=function(e){"Shape"===this.selectionType&&this.maps.selectedElementId.splice(this.maps.selectedElementId.indexOf(e.getAttribute("id")),1),"Bubble"===this.selectionType&&this.maps.selectedBubbleElementId.splice(this.maps.selectedBubbleElementId.indexOf(e.getAttribute("id")),1),"Marker"===this.selectionType&&this.maps.selectedMarkerElementId.splice(this.maps.selectedMarkerElementId.indexOf(e.getAttribute("id")),1),"navigationline"===this.selectionType&&this.maps.selectedBubbleElementId.splice(this.maps.selectedBubbleElementId.indexOf(e.getAttribute("id")),1),"Polygon"===this.selectionType&&this.maps.selectedPolygonElementId.splice(this.maps.selectedPolygonElementId.indexOf(e.getAttribute("id")),1)},Ln.prototype.getModuleName=function(){return"Selection"},Ln.prototype.destroy=function(){this.selectionsettings=null,this.removeEventListener(),this.maps=null};var Mn=Ln;function Ln(e){this.maps=e,this.addEventListener()}wn.prototype.renderTooltip=function(i){var o,e,t,n,a=this,l=(u=(-1!==i.type.indexOf("touch")?(this.isTouch=!0,c=i.changedTouches[0].pageX,i.changedTouches[0]):(this.isTouch="touch"===i.pointerType,c=i.pageX,i)).pageY,i.target),r=(-1===l.id.indexOf(this.maps.element.id)&&(m=l.closest("."+this.maps.element.id+"_marker_template_element"),!Y.isNullOrUndefined(m))&&-1<m.id.indexOf("_MarkerIndex_")&&(l=m),""),s=l.id,d=[],p=-1<s.indexOf("_LayerIndex_")&&parseFloat(s.split("_LayerIndex_")[1].split("_")[0]),h=this.maps.layersCollection[p],m=[],c=U(c,u,this.maps.svgObject),u=(this.tooltipTargetID=s,null),g=null,y=this.maps.getClickLocation(s,i.pageX,i.pageY,l,i.layerX,i.layerY,"tooltip"),f=(Y.isNullOrUndefined(y)||(u=y.latitude,g=y.longitude),-1<s.indexOf("_PolygonIndex_"));if((-1<s.indexOf("_shapeIndex_")||-1<s.indexOf("_MarkerIndex_")||-1<s.indexOf("_BubbleIndex_")||-1<s.indexOf("_PolygonIndex_"))&&null===this.maps.markerDragArgument){if(-1<s.indexOf("_PolygonIndex_")){var y=parseInt(s.split("_PolygonIndex_")[1].split("_")[0],10),b=h.polygonSettings.tooltipSettings,S=h.polygonSettings.polygons[y],v=b.textStyle,x=b.fill;m.push(S.tooltipText)}else if(-1<s.indexOf("_shapeIndex_")){var O=h.tooltipSettings,y=parseInt(s.split("_shapeIndex_")[1].split("_")[0],10);if(Y.isNullOrUndefined(h.layerData)||Y.isNullOrUndefined(h.layerData[y]))return;var C=h.layerData[y].property,_=!1,M="[object Array]"===Object.prototype.toString.call(h.shapePropertyPath)?h.shapePropertyPath:[h.shapePropertyPath];if(!Y.isNullOrUndefined(M)){for(var L=0;L<M.length;L++)if(!Y.isNullOrUndefined(h.dataSource)&&!Y.isNullOrUndefined(h.shapeDataPath))for(var P=0;P<h.dataSource.length;P++){var w=h.dataSource[P],T=-1<h.shapeDataPath.indexOf(".")?k(w,h.shapeDataPath):w[h.shapeDataPath];if((!Y.isNullOrUndefined(T)&&isNaN(w[h.shapeDataPath])?T.toLowerCase():T)===(!Y.isNullOrUndefined(C[M[L]])&&isNaN(C[M[L]])?C[M[L]].toLowerCase():C[M[L]])){_=!0,p=P,L=M.length;break}}if(p=_?p:null,h.dataSource&&0<h.dataSource.length){if(!Y.isNullOrUndefined(h.dataSource[p]))for(e in d=JSON.parse(JSON.stringify(h.dataSource[p])),C)d.hasOwnProperty(e)||(d[e]=C[e])}else d=C}!O.visible||(Y.isNullOrUndefined(p)||isNaN(p))&&Y.isNullOrUndefined(C)||(h.tooltipSettings.format?r=this.formatter(h.tooltipSettings.format,d):(y=Je(h.shapeDataPath,h.shapePropertyPath,C),r=Y.isNullOrUndefined(h.dataSource)||Y.isNullOrUndefined(p)?C[y]:Le(-1<O.valuePath.indexOf(".")?k(h.dataSource[p],O.valuePath):h.dataSource[p][O.valuePath],this.maps),Y.isNullOrUndefined(r)&&!Y.isNullOrUndefined(O.valuePath)&&(r=-1<O.valuePath.indexOf(".")?k(C,O.valuePath):C[O.valuePath])))}else-1<s.indexOf("_MarkerIndex_")?(y=parseInt(s.split("_MarkerIndex_")[1].split("_")[0],10),I=parseInt(s.split("_MarkerIndex_")[1].split("_")[2],10),t=h.markerSettings[y],O=t.tooltipSettings,d=t.dataSource[I],O.visible&&!isNaN(y)&&(t.tooltipSettings.format?r=this.formatter(t.tooltipSettings.format,t.dataSource[I]):"function"!=typeof t.template&&t.template&&!t.tooltipSettings.valuePath?r=t.template.split(">")[1].split("<")[0]:Y.isNullOrUndefined(t.tooltipSettings.valuePath)||(r=Le(-1<t.tooltipSettings.valuePath.indexOf(".")?k(t.dataSource[I],t.tooltipSettings.valuePath):t.dataSource[I][t.tooltipSettings.valuePath],this.maps)))):-1<s.indexOf("_BubbleIndex_")&&(y=parseInt(s.split("_BubbleIndex_")[1].split("_")[0],10),I=parseInt(s.split("_BubbleIndex_")[1].split("_")[2],10),t=h.bubbleSettings[y],O=t.tooltipSettings,d=t.dataSource[I],O.visible)&&!isNaN(I)&&(t.tooltipSettings.format?r=this.formatter(t.tooltipSettings.format,t.dataSource[I]):Y.isNullOrUndefined(t.tooltipSettings.valuePath)||(r=Le(-1<t.tooltipSettings.valuePath.indexOf(".")?k(t.dataSource[I],t.tooltipSettings.valuePath):t.dataSource[I][t.tooltipSettings.valuePath],this.maps)));(f?b:O).visible&&(document.getElementById(this.tooltipId)?o=document.getElementById(this.tooltipId):(o=Y.createElement("div",{id:this.maps.element.id+"_mapsTooltip",className:"EJ2-maps-Tooltip"}),Y.isNullOrUndefined(f?S.tooltipTemplate:O.template)||(f?""===S.tooltipTemplate:""===O.template)||"MouseMove"===this.maps.tooltipDisplayMode?o.style.cssText="position: absolute;pointer-events:none;":o.style.position="absolute",document.getElementById(this.maps.element.id+"_Secondary_Element").appendChild(o)),f?S.tooltipTemplate:O.template,(f?null!==S.tooltipTemplate:null!==O.template)&&1===Object.keys((f?S.tooltipTemplate:O.template,f?S.tooltipTemplate:O.template)).length&&(f?S.tooltipTemplate=S.tooltipTemplate[Object.keys(S.tooltipTemplate)[0]]:O.template=O.template[Object.keys(O.template)[0]]),y={location:c,text:m,data:d=this.setTooltipContent(O,d),textStyle:{color:(f?v:O.textStyle).color,fontFamily:(f?v:O.textStyle).fontFamily,fontStyle:(f?v:O.textStyle).fontStyle,fontWeight:(f?v:O.textStyle).fontWeight,opacity:(f?v:O.textStyle).opacity,size:(f?v:O.textStyle).size},template:f?S.tooltipTemplate:O.template},""!==(n={cancel:!1,name:zo,options:y,fill:f?x:O.fill,maps:this.maps,latitude:u,longitude:g,element:l,eventArgs:i,content:f?Y.isNullOrUndefined(S.tooltipText)?"":S.tooltipText:Y.isNullOrUndefined(r)?"":r.toString()}).content||""!==n.options.template?this.maps.trigger(zo,n,function(e){var t;n.cancel||Y.isNullOrUndefined(r)||-1!==s.indexOf("_cluster_")||-1!==s.indexOf("_dataLabel_")?a.clearTooltip(i.target):(a.maps.isProtectedOnChange=!0,n.options.textStyle.size=n.options.textStyle.size||a.maps.themeStyle.fontSize,n.options.textStyle.color=n.options.textStyle.color||a.maps.themeStyle.tooltipFontColor,n.options.textStyle.fontFamily=n.options.textStyle.fontFamily||a.maps.themeStyle.fontFamily,n.options.textStyle.fontWeight=n.options.textStyle.fontWeight||a.maps.themeStyle.fontWeight,n.options.textStyle.opacity=n.options.textStyle.opacity||a.maps.themeStyle.tooltipTextOpacity,t=f?{color:b.border.color||a.maps.themeStyle.tooltipBorderColor,width:b.border.width,opacity:b.border.opacity}:{color:O.border.color||a.maps.themeStyle.tooltipBorderColor,width:O.border.width,opacity:O.border.opacity},n.cancel?a.svgTooltip=new E.Tooltip({theme:a.maps.theme,enable:!0,header:"",data:O.data,template:O.template,content:n.content.toString()!==r.toString()?[n.content.toString()]:[r.toString()],shapes:[],location:O.location,palette:[void 0],areaBounds:a.maps.mapAreaRect,textStyle:O.textStyle,availableSize:a.maps.availableSize,fill:O.fill||a.maps.themeStyle.tooltipFillColor,enableShadow:!0,border:t}):a.svgTooltip=new E.Tooltip({theme:a.maps.theme,enable:!0,header:"",data:n.options.data,template:n.options.template,content:n.content.toString()!==r.toString()?[n.content.toString()]:[r.toString()],shapes:[],location:n.options.location,palette:[void 0],areaBounds:a.maps.mapAreaRect,textStyle:n.options.textStyle,availableSize:a.maps.availableSize,fill:n.fill||a.maps.themeStyle.tooltipFillColor,enableShadow:!0,border:t}),(a.maps.isVue||a.maps.isVue3)&&(a.svgTooltip.controlInstance=a.maps),a.svgTooltip.opacity=a.maps.themeStyle.tooltipFillOpacity||a.svgTooltip.opacity,a.svgTooltip.appendTo(o),a.maps.renderReactTemplates(),a.maps.isDevice&&(t=(-1<s.indexOf("_MarkerIndex_")||-1<s.indexOf("_BubbleIndex_")||-1<s.indexOf("_shapeIndex_")?O:b).duration,null!==(t=!Y.isNullOrUndefined(t)&&0<t?t:t<0?2e3:null))&&(clearTimeout(a.tooltipTimer),a.tooltipTimer=setTimeout(a.removeTooltip.bind(a),t)))}):this.clearTooltip(i.target),this.svgTooltip&&this.maps.trigger("tooltipRenderComplete",{cancel:!1,name:"tooltipRenderComplete",maps:this.maps,options:y,element:this.svgTooltip.element}),this.svgTooltip)?this.maps.trigger("tooltipRenderComplete",{cancel:!1,name:"tooltipRenderComplete",maps:this.maps,options:y,element:this.svgTooltip.element}):this.clearTooltip(i.target)}else{var I=i.target.closest("#"+this.maps.element.id+"_mapsTooltipparent_template");Y.isNullOrUndefined(I)&&this.clearTooltip(i.target)}},wn.prototype.setTooltipContent=function(e,t){t=Y.extend({},t,null,!0);return this.maps.format&&!isNaN(Number(t[e.valuePath]))?t[e.valuePath]=st(this.maps,Number(t[e.valuePath])):t=Object.keys(t).length?t:void 0,t},wn.prototype.formatter=function(e,t){void 0===t&&(t={});for(var i=0,o=Object.keys(t);i<o.length;i++){var n=o[i];e="object"==typeof t[n]?Pe("",e,t,this.maps):e.split("${"+n+"}").join(Le(t[n],this.maps))}return e},wn.prototype.mouseUpHandler=function(e){Y.isNullOrUndefined(this.maps)||(this.renderTooltip(e),"MouseMove"===this.maps.tooltipDisplayMode&&(clearTimeout(this.tooltipTimer),this.tooltipTimer=setTimeout(this.removeTooltip.bind(this),2e3)))},wn.prototype.removeTooltip=function(){var e=!1;return 0<document.getElementsByClassName("EJ2-maps-Tooltip").length&&(Y.remove(document.getElementsByClassName("EJ2-maps-Tooltip")[0]),e=!0),e},wn.prototype.clearTooltip=function(e){e=e.closest("#"+this.maps.element.id+"_mapsTooltipparent_template");Y.isNullOrUndefined(e)&&this.removeTooltip()&&this.maps.clearTemplate()},wn.prototype.addEventListener=function(){this.maps.isDestroyed||("DoubleClick"===this.maps.tooltipDisplayMode?this.maps.on("dblclick",this.renderTooltip,this):"Click"===this.maps.tooltipDisplayMode?this.maps.on(Y.Browser.touchEndEvent,this.mouseUpHandler,this):this.maps.on(Y.Browser.touchMoveEvent,this.renderTooltip,this),this.maps.on(Y.Browser.touchCancelEvent,this.removeTooltip,this),this.maps.element.addEventListener("contextmenu",this.removeTooltip))},wn.prototype.removeEventListener=function(){!this.maps||this.maps.isDestroyed||("DoubleClick"===this.maps.tooltipDisplayMode?this.maps.off("dblclick",this.renderTooltip):"Click"===this.maps.tooltipDisplayMode?this.maps.off(Y.Browser.touchEndEvent,this.mouseUpHandler):this.maps.off(Y.Browser.touchMoveEvent,this.renderTooltip),this.maps.off(Y.Browser.touchCancelEvent,this.removeTooltip),this.maps.element.removeEventListener("contextmenu",this.removeTooltip))},wn.prototype.getModuleName=function(){return"MapsTooltip"},wn.prototype.destroy=function(){Y.isNullOrUndefined(this.svgTooltip)||this.svgTooltip.destroy(),this.svgTooltip=null,this.maps=null};var Pn=wn;function wn(e){this.maps=e,this.tooltipId=this.maps.element.id+"_mapsTooltip",this.addEventListener()}v.prototype.performZooming=function(e,t,i){var o,n,a,l,r,s,d=this,p=this.maps,h=(p.previousProjection=t<=1.5?void 0:p.projectionType,p.defaultState=!1,p.initialCheck=!1,p.markerZoomedState=p.isMarkerZoomCompleted=!1,p.zoomPersistence=p.enablePersistence,p.tileZoomLevel),m=p.previousScale=p.scale,c=p.zoomSettings.maxZoom,u=p.zoomSettings.minZoom,g=(t=t<=c?t:c,!0);switch(i.toLowerCase()){case"zoomin":g=t<=this.maps.zoomSettings.maxZoom;break;case"zoomout":g=t>=this.maps.zoomSettings.minZoom}g&&(o=p.tileTranslatePoint,p.isTileMap||!("ZoomIn"===i?u<=t&&t<=c:u<=t)&&!p.isReset?p.isTileMap&&u<=t&&t<=c&&(this.getTileTranslatePosition(h,t,e,i),p.tileZoomLevel=t,p.zoomSettings.zoomFactor=t,p.scale=Math.pow(2,t-1),"ZoomOut"===i&&p.zoomSettings.resetToInitial&&p.applyZoomReset&&t<=p.initialZoomLevel&&(p.initialCheck=!0,p.zoomPersistence=!1,p.tileTranslatePoint.x=p.initialTileTranslate.x,p.tileTranslatePoint.y=p.initialTileTranslate.y,t=p.tileZoomLevel=p.mapScaleValue=p.initialZoomLevel,p.scale=Math.pow(2,t-1)),p.mapScaleValue=isNaN(p.mapScaleValue)?1:p.mapScaleValue,p.translatePoint.y=(p.tileTranslatePoint.y-.01*p.mapScaleValue)/p.scale,p.translatePoint.x=(p.tileTranslatePoint.x-.01*p.mapScaleValue)/p.scale,this.triggerZoomEvent(o,h,i)?(p.translatePoint=p.tileTranslatePoint=new J(0,0),p.scale=p.previousScale,p.tileZoomLevel=h,p.zoomSettings.zoomFactor=p.previousScale):(document.querySelector(".GroupElement")&&(document.querySelector(".GroupElement").style.display="none"),document.getElementById(this.maps.element.id+"_LayerIndex_1")&&(document.getElementById(this.maps.element.id+"_LayerIndex_1").style.display="none"),this.markerLineAnimation(p),p.mapLayerPanel.generateTiles(t,p.tileTranslatePoint,i+"wheel",null,e),u=0===this.maps.layersCollection[0].animationDuration&&"Enable"===Y.animationMode?1e3:this.maps.layersCollection[0].animationDuration,setTimeout(function(){d.applyTransform(d.maps),document.getElementById(d.maps.element.id+"_LayerIndex_1")&&(document.getElementById(d.maps.element.id+"_LayerIndex_1").style.display="block")},u))):(c=p.mapAreaRect,u=p.baseMapRectBounds.min,a=p.baseMapRectBounds.max,n=Math.abs(u.x-a.x),a=Math.abs(u.y-a.y),r=l=void 0,t<1.2&&"Eckert5"!==p.projectionType?(0!==n&&0!==a&&n!==a||(n=c.width/2,a=c.height),t=parseFloat(Math.min(c.width/n,c.height/a).toFixed(2)),p.translatePoint=this.calculateInitalZoomTranslatePoint(t=1.05<t?1:t,n,a,c,u,p)):(l=(s=p.translatePoint).x-(c.width/m-c.width/t)/(c.width/e.x),r=s.y-(c.height/m-c.height/t)/(c.height/e.y),l=(s=Math.abs(p.baseMapRectBounds.max.y-p.baseMapRectBounds.min.y)*t)<p.mapAreaRect.height?c.x+(-u.x+(c.width/2-n/2)):l,r=s<p.mapAreaRect.height?c.y+(-u.y+(c.height/2-a/2)):r,p.translatePoint=new J(l,r)),p.scale=t,p.zoomTranslatePoint=p.translatePoint,this.triggerZoomEvent(o,h,i)?(p.translatePoint=p.previousPoint,p.scale=p.mapScaleValue=p.previousScale):this.applyTransform(p)),this.triggerZoomComplete(p,h,i)),this.maps.zoomNotApplied=!1,this.maps.isDevice&&this.removeToolbarOpacity(p.isTileMap?Math.round(p.tileZoomLevel):p.scale,p.element.id+"_Zooming_")},v.prototype.calculateInitalZoomTranslatePoint=function(e,t,i,o,n,a){a=0!==n.x&&"layers"===a.translateType?a.availableSize.width-o.width:0,t=o.x+(-n.x+(o.width/2-(t*=e)/2))-a,a=o.y+(-n.y+(o.height/2-(i*=e)/2));return new J(t,a)},v.prototype.triggerZoomEvent=function(e,t,i){var o=this.maps,n=(o.isTileMap&&(o.mapScaleValue=Y.isNullOrUndefined(o.mapScaleValue)?1:o.mapScaleValue,o.translatePoint.y=(o.tileTranslatePoint.y-.01*o.mapScaleValue)/o.scale,o.translatePoint.x=(o.tileTranslatePoint.x-.01*o.mapScaleValue)/o.scale),this.maps.getMinMaxLatitudeLongitude()),e=o.isTileMap?{cancel:!1,name:"zoom",type:i,maps:o,tileTranslatePoint:{previous:e,current:o.tileTranslatePoint},translatePoint:{previous:o.previousPoint,current:o.translatePoint},tileZoomLevel:{previous:t,current:o.tileZoomLevel},scale:{previous:o.previousScale,current:o.scale},minLatitude:n.minLatitude,maxLatitude:n.maxLatitude,minLongitude:n.minLongitude,maxLongitude:n.maxLongitude}:{cancel:!1,name:"zoom",type:i,maps:o,tileTranslatePoint:{},translatePoint:{previous:o.previousPoint,current:o.translatePoint},tileZoomLevel:{},scale:{previous:o.previousScale,current:o.scale},minLatitude:n.minLatitude,maxLatitude:n.maxLatitude,minLongitude:n.minLongitude,maxLongitude:n.maxLongitude};return o.trigger("zoom",e),e.cancel},v.prototype.getTileTranslatePosition=function(e,t,i,o){var n=this.maps,o="ZoomOut"!==o&&"Reset"===o&&1<t?0:10,a=n.availableSize,e=256*Math.pow(2,e),l=256*Math.pow(2,t),r=(i.x-n.tileTranslatePoint.x)/e*100,e=(i.y-n.tileTranslatePoint.y)/e*100;n.tileTranslatePoint.x=1===t?a.width/2-256:i.x-r*l/100,n.tileTranslatePoint.y=1===t?a.height/2-256+2*o:i.y-e*l/100},v.prototype.performRectZooming=function(){this.isDragZoom=!0;var e,t,i,o,n=this.maps,a=n.availableSize,l=(n.previousProjection=n.projectionType,n.tileZoomLevel),r=n.tileTranslatePoint,s=this.zoomingRect,d=n.zoomSettings.maxZoom,p=n.zoomSettings.minZoom;0<s.height&&0<s.width&&(o=this.zoomingRect.x+this.zoomingRect.width/2,t=this.zoomingRect.y+this.zoomingRect.height/2,i=void 0,n.isTileMap?(i=l+Math.round(l+(a.width/s.width+a.height/s.height)/2),n.zoomSettings.zoomFactor=i=p<=i&&i<=d?i:d,this.getTileTranslatePosition(l,i,{x:o,y:t}),n.tileZoomLevel=i,n.translatePoint.x=(n.tileTranslatePoint.x-.5*Math.pow(2,i))/Math.pow(2,i),n.translatePoint.y=(n.tileTranslatePoint.y-.5*Math.pow(2,i))/Math.pow(2,i),n.scale=Math.pow(2,i),(e=this.triggerZoomEvent(r,l,""))?(n.translatePoint=n.tileTranslatePoint=new J(0,0),n.scale=n.tileZoomLevel=n.zoomSettings.zoomFactor=l):n.mapLayerPanel.generateTiles(i,n.tileTranslatePoint)):(i=(i=(p=n.previousScale=n.scale)+Math.round((a.width/s.width+a.height/s.height)/2))<this.maps.zoomSettings.maxZoom?i:this.maps.zoomSettings.maxZoom,s=n.previousPoint=n.translatePoint,i<=d&&(d=s.x-(a.width/p-a.width/i)/(a.width/o),o=s.y-(a.height/p-a.height/i)/(a.height/t),n.translatePoint=new J(d,o)),n.scale=i<this.maps.zoomSettings.maxZoom?i:this.maps.zoomSettings.maxZoom,(e=this.triggerZoomEvent(r,l,""))&&(n.translatePoint=n.previousPoint,n.scale=n.previousScale),n.zoomTranslatePoint=n.translatePoint),e||(n.mapScaleValue=i,this.applyTransform(n,!0),this.maps.zoomNotApplied=!1,this.zoomingRect=null)),this.isZoomFinal=this.isZoomSelection&&Math.round(n.scale)===this.maps.zoomSettings.maxZoom,this.triggerZoomComplete(n,l,""),this.removeToolbarOpacity(n.scale,this.maps.element.id+"_Zooming_")},v.prototype.setInteraction=function(e){this.lastScale=1,this.interaction=e},v.prototype.updateInteraction=function(){2===this.fingers?this.setInteraction("zoom"):this.setInteraction(null)},v.prototype.performPinchZooming=function(e){var t,i,o,n,a,l,r,s,d,p,h=this.maps,m=h.tileZoomLevel,c=this.pinchFactor,u=h.tileTranslatePoint;h.isTileMap?(o=this.getTouchCenterPoint(),n=Math.sqrt(Math.pow(this.touchMoveList[0].pageX-this.touchMoveList[1].pageX,2)+Math.pow(this.touchMoveList[0].pageY-this.touchMoveList[1].pageY,2)),i=h.tileZoomLevel,Y.isNullOrUndefined(this.pinchDistance)||(this.pinchDistance>n?i-=1:this.pinchDistance<n&&(i+=1),(i=Math.min(this.maps.zoomSettings.maxZoom,Math.max(this.maps.zoomSettings.minZoom,i)))!==h.tileZoomLevel&&(this.pinchFactor=i,h.previousScale=h.scale,h.tileZoomLevel=this.pinchFactor,h.scale=Math.pow(2,h.tileZoomLevel-1),this.getTileTranslatePosition(m,this.pinchFactor,{x:o.x,y:o.y},null),h.translatePoint.x=(h.tileTranslatePoint.x-.01*h.scale)/h.scale,h.translatePoint.y=(h.tileTranslatePoint.y-.01*h.scale)/h.scale,(t=this.triggerZoomEvent(u,m,""))?(h.translatePoint=h.tileTranslatePoint=new J(0,0),h.scale=h.previousScale,h.tileZoomLevel=m,h.zoomSettings.zoomFactor=h.previousScale):h.mapLayerPanel.generateTiles(i,h.tileTranslatePoint))),this.pinchDistance=n):(i=h.mapAreaRect,h.isMarkerZoomCompleted=!1,h.previousScale=h.scale,h.previousPoint=h.translatePoint,h.previousProjection=h.projectionType,n=Tt(this.touchStartList,this.touchMoveList),o=Nt(kt(this.touchMoveList,this.maps)),l=n/this.lastScale,this.lastScale=n,this.pinchFactor*=l,this.pinchFactor=Math.min(this.maps.zoomSettings.maxZoom,Math.max(this.pinchFactor,this.maps.zoomSettings.minZoom)),n=h.baseMapRectBounds.min,l=h.baseMapRectBounds.max,a=Math.abs(n.y-l.y),l=Math.abs(n.x-l.x),r=h.translatePoint,p=d=void 0,c<1.2&&"Eckert5"!==h.projectionType?(0!==l&&0!==a&&l!==a||(l=i.width/2,a=i.height),c=parseFloat(Math.min(i.width/l,i.height/a).toFixed(2)),h.translatePoint=this.calculateInitalZoomTranslatePoint(c=1.05<c?1:c,l,a,i,n,h)):(s=Math.abs(h.baseMapRectBounds.max.y-h.baseMapRectBounds.min.y)*c,d=r.x-(i.width/h.scale-i.width/c)/(i.width/o.x),p=r.y-(i.height/h.scale-i.height/c)/(i.height/o.y),d=s<h.mapAreaRect.height?i.x+(-n.x+(i.width/2-l/2)):d,p=s<h.mapAreaRect.height?i.y+(-n.y+(i.height/2-a/2)):p,h.translatePoint=new J(d,p)),h.scale=c,(t=this.triggerZoomEvent(u,m,""))&&(h.translatePoint=h.previousPoint,h.scale=h.previousScale)),h.mapScaleValue=c,t||this.applyTransform(h),this.triggerZoomComplete(h,m,""),Y.Browser.isDevice&&this.removeToolbarOpacity(h.isTileMap?Math.round(h.tileZoomLevel):h.scale,h.element.id+"_Zooming_")},v.prototype.getTouchCenterPoint=function(){for(var e=[],t=0;t<this.touchMoveList.length;t++)e.push(this.getMousePosition(this.touchMoveList[t].pageX,this.touchMoveList[t].pageY));return{x:(e[0].x+e[1].x)/2,y:(e[0].y+e[1].y)/2}},v.prototype.triggerZoomComplete=function(e,t,i){var o,n;e.zoomSettings.enable&&(n=void 0,e.isTileMap&&(e.mapScaleValue=Y.isNullOrUndefined(e.mapScaleValue)?1:e.mapScaleValue,e.translatePoint.y=(e.tileTranslatePoint.y-.01*e.mapScaleValue)/e.scale,e.translatePoint.x=(e.tileTranslatePoint.x-.01*e.mapScaleValue)/e.scale),o=this.maps.getMinMaxLatitudeLongitude(),n=e.isTileMap?{cancel:!1,name:"zoomComplete",type:i,maps:e,tileTranslatePoint:{previous:e.tileTranslatePoint,current:e.tileTranslatePoint},translatePoint:{previous:e.previousPoint,current:e.translatePoint},tileZoomLevel:{previous:t,current:e.tileZoomLevel},scale:{previous:e.previousScale,current:e.scale},minLatitude:o.minLatitude,maxLatitude:o.maxLatitude,minLongitude:o.minLongitude,maxLongitude:o.maxLongitude}:{cancel:!1,name:"zoomComplete",type:i,maps:e,tileTranslatePoint:{},translatePoint:{previous:e.previousPoint,current:e.translatePoint},tileZoomLevel:{},scale:{previous:e.previousScale,current:e.scale},minLatitude:o.minLatitude,maxLatitude:o.maxLatitude,minLongitude:o.minLongitude,maxLongitude:o.maxLongitude},this.maps.trigger("zoomComplete",n))},v.prototype.drawZoomRectangle=function(){var e=this.maps,t=this.mouseDownPoints,i=this.mouseMovePoints,o={width:1,color:this.maps.themeStyle.rectangleZoomBorderColor},n=Math.abs(i.x-t.x),a=Math.abs(i.y-t.y),l=i.x>t.x?t.x:t.x-n,i=i.y>t.y?t.y:t.y-a;l>e.mapAreaRect.x&&l<e.mapAreaRect.x+e.mapAreaRect.width&&i>e.mapAreaRect.y&&i<e.mapAreaRect.y+e.mapAreaRect.height&&(this.zoomingRect=new K(l,i,n,a),t=e.renderer.createSvg({id:e.element.id+"_Selection_Rect_Zooming",width:e.availableSize.width,height:e.availableSize.height,style:"position: absolute;"}),l=new Q(e.element.id+"_ZoomRect",this.maps.themeStyle.rectangleZoomFillColor,o,this.maps.themeStyle.rectangleZoomFillOpacity,this.zoomingRect,0,0,"","3"),t.appendChild(e.renderer.drawRectangle(l)),N(e.element.id+"_Secondary_Element").appendChild(t))},v.prototype.animateTransform=function(e,t,i,o,n){var a=0===this.currentLayer.animationDuration&&"Enable"===Y.animationMode?1e3:this.currentLayer.animationDuration;!t||0===a||this.maps.isTileMap?this.maps.isTileMap&&-1<e.id.indexOf("_Polygons_Group")||e.setAttribute("transform","scale("+n+") translate( "+i+" "+o+" )"):this.maps.isTileMap||Et(e,0,a,new T(i,o),n,this.maps.mapAreaRect,this.maps)},v.prototype.applyTransform=function(f,b,S){var v,x=this,O=(this.templateCount=0,f.scale),C=f.translatePoint.x,_=f.translatePoint.y,M=0;if(f.zoomShapeCollection=[],this.isPanningInProgress=S||!1,document.getElementById(f.element.id+"_mapsTooltip")&&P(f.element.id+"_mapsTooltip"),this.layerCollectionEle){for(var e=function(e){var g=L.layerCollectionEle.childNodes[e];if("g"===g.tagName){L.templateCount++,L.index=-1<g.id.indexOf("_LayerIndex_")&&parseFloat(g.id.split("_LayerIndex_")[1].split("_")[0]),L.currentLayer=f.layersCollection[L.index];for(var y=f.mapLayerPanel.calculateFactor(L.currentLayer),t=g.childElementCount,i=0;i<t;i++)!function(e){var l,t,i,a,r,s=g.childNodes[e];if(-1<s.id.indexOf("_Markers_Group")||-1<s.id.indexOf("_bubble_Group")||-1<s.id.indexOf("_dataLableIndex_Group"))if(-1<s.id.indexOf("_Markers_Group"))L.isPanModeEnabled&&S||Y.isNullOrUndefined(s.childNodes[0])||L.markerTranslates(s.childNodes[0],y,C,_,O,"Marker",g),s=g.childNodes[e],Y.isNullOrUndefined(s)||-1===s.id.indexOf("Markers")||(Array.prototype.forEach.call(s.childNodes,function(e,t){x.markerTranslate(e,y,C,_,O,"Marker",b);var i=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=parseInt(e.id.split("_MarkerIndex_")[1].split("_")[0],10);if(l=0<x.currentLayer.markerSettings[o].animationDuration||"Enable"===Y.animationMode,0<x.currentLayer.markerSettings[o].initialMarkerSelection.length)for(var n=x.currentLayer.markerSettings[o].dataSource[i],a=0;a<x.currentLayer.markerSettings[o].initialMarkerSelection.length;a++)x.currentLayer.markerSettings[o].initialMarkerSelection[a].latitude!==n.latitude&&x.currentLayer.markerSettings[o].initialMarkerSelection[a].longitude!==n.longitude||f.markerSelection(x.currentLayer.markerSettings[o].selectionSettings,f,s.children[t],x.currentLayer.markerSettings[o].dataSource[i]);(0<x.currentLayer.animationDuration||"Enable"===Y.animationMode||(0<f.layersCollection[0].animationDuration||"Enable"===Y.animationMode)&&"SubLayer"===x.currentLayer.type)&&!x.isPanModeEnabled&&(f.isTileMap?(e=document.querySelector(".GroupElement"))&&!document.querySelector(".ClusterGroupElement")&&l&&(e.style.display="none"):s.style.cssText="visibility:hidden")}),L.isPanModeEnabled&&0<f.markerModule.sameMarkerData.length?je(f.markerModule.sameMarkerData,f,s,!0):0<f.markerModule.sameMarkerData.length&&(f.markerModule.sameMarkerData=[],document.getElementById(f.element.id+"_mapsTooltip"))&&P(f.element.id+"_mapsTooltip"),document.getElementById(f.element.id+"_mapsTooltip")&&f.mapsTooltipModule.tooltipTargetID.indexOf("_MarkerIndex_")&&!L.isPanModeEnabled&&(e=f.mapsTooltipModule,i=s.querySelector("#"+e.tooltipTargetID),Y.isNullOrUndefined(i)||("hidden"===i.style.visibility?P(f.element.id+"_mapsTooltip"):(t=parseFloat(i.getAttribute("transform").split("(")[1].split(")")[0].split(" ")[1]),i=parseFloat(i.getAttribute("transform").split("(")[1].split(")")[0].split(" ")[2]),f.isTileMap&&(t+=+F(f.element.id+"_tile_parent").style.left.split("px")[0],i+=+F(f.element.id+"_tile_parent").style.top.split("px")[0]),e.svgTooltip.location.x=t,e.svgTooltip.location.y=i,e.svgTooltip.enableAnimation=!1))));else if(-1<s.id.indexOf("_bubble_Group"))for(var o=void 0,n=0;n<s.childElementCount;n++){o=s.childNodes[n],v=parseFloat(o.id.split("_LayerIndex_")[1].split("_")[0]);for(var d=parseFloat(o.id.split("_BubbleIndex_")[1].split("_")[0]),p=parseFloat(o.id.split("_BubbleIndex_")[1].split("_")[2]),h=0;h<f.bubbleModule.bubbleCollection.length;h++){var m=f.bubbleModule.bubbleCollection[h];if(m.LayerIndex===v&&m.BubbleIndex===d&&m.DataIndex===p){var c=m.center.x,m=m.center.y,c=(c+C)*O,m=(m+_)*O,u=0===L.currentLayer.animationDuration&&"Enable"===Y.animationMode?1e3:L.currentLayer.animationDuration;b&&0!==u?Ut(o,0,u,new T(c,m)):o.setAttribute("transform","translate( "+c+" "+m+" )");break}}}else-1<s.id.indexOf("_dataLableIndex_Group")&&!Y.isNullOrUndefined(f.layers[L.index])&&(f.zoomLabelPositions=[],f.zoomLabelPositions=f.dataLabelModule.dataLabelCollections,a=!f.isTileMap&&b,r=[],Array.prototype.forEach.call(s.childNodes,function(e,t){var i,o,n;-1<s.childNodes[t].id.indexOf("_LabelIndex_")&&(n=parseFloat(s.childNodes[t].id.split("_LabelIndex_")[1].split("_")[0]),o=s.childNodes[t].id,f.zoomShapeCollection.push(o),x.dataLabelTranslate(s.childNodes[t],y,C,_,O,"DataLabel",a,M,S,r),M++,o=f.layers[x.index].dataLabelSettings.border,0<t)&&1<o.width&&-1<s.childNodes[t-1].id.indexOf("_rectIndex_")&&!Y.isNullOrUndefined(f.zoomLabelPositions[n])&&(o=(f.zoomLabelPositions[n].location.x+C)*O,n=(f.zoomLabelPositions[n].location.y+_)*O,i=W(s.childNodes[t].textContent,f.layers[x.index].dataLabelSettings.textStyle),t=s.childNodes[t-1],o=o-i.width/2,n=n-i.height/2-5,t.setAttribute("x",o),t.setAttribute("y",n))}));else f.isTileMap&&-1<s.id.indexOf("_line_Group")?(s.remove(),0<g.children.length&&g.children[0]?g.insertBefore(f.navigationLineModule.renderNavigation(L.currentLayer,f.tileZoomLevel,L.index),g.children[1]):g.appendChild(f.navigationLineModule.renderNavigation(L.currentLayer,f.tileZoomLevel,L.index))):f.isTileMap&&-1<s.id.indexOf("_Polygons_Group")?0<L.currentLayer.polygonSettings.polygons.length&&(L.currentLayer.polygonSettings.polygons.map(function(e,t){e=e.points,e=D(f,f.tileZoomLevel,x.currentLayer,e),t=document.getElementById(f.element.id+"_LayerIndex_"+x.index+"_PolygonIndex_"+t);Y.isNullOrUndefined(t)||t.setAttribute("d",e)}),document.getElementById(f.element.id+"_LayerIndex_"+L.index+"_Polygons_Group").style.visibility=""):-1===s.id.indexOf("Legend")&&(Lt(s,L.index,O,f),f.zoomTranslatePoint=f.translatePoint,L.animateTransform(s,b,C,_,O))}(i)}f.arrangeTemplate()},L=this,t=0;t<this.layerCollectionEle.childElementCount;t++)e(t);Y.isNullOrUndefined(this.currentLayer)||b&&0!==this.currentLayer.animationDuration&&!f.isTileMap||this.processTemplate(C,_,O,f)}},v.prototype.markerTranslates=function(e,c,u,g,y,f,b){var S=this,v=0,x=0,O=0,C=parseInt((e||b).id.split("_LayerIndex_")[1].split("_")[0],10),_=this.maps.renderer.createGroup({id:this.maps.element.id+"_Markers_Group",class:"GroupElement"}),e=(_.style.pointerEvents="auto",document.getElementById(_.id)&&P(_.id),this.maps.mapAreaRect),M=Y.createElement("div",{id:this.maps.element.id+"_LayerIndex_"+C+"_Markers_Template_Group",className:"template"}),L=(M.style.cssText="overflow: hidden; position: absolute;pointer-events: none;top:"+e.y+"px;left:"+e.x+"px;height:"+e.height+"px;width:"+e.width+"px;",document.getElementById(M.id)&&P(M.id),this.maps.layersCollection[C]);Array.prototype.forEach.call(L.markerSettings,function(p,h){var m=p.dataSource;Array.prototype.forEach.call(m,function(r,s){S.maps.markerNullCount=0<=h&&0===s?0:S.maps.markerNullCount;var d={template:p.template,data:r,maps:S.maps,marker:p,cancel:!1,name:Zo,fill:p.fill,colorValuePath:p.colorValuePath,shapeValuePath:p.shapeValuePath,height:p.height,width:p.width,imageUrl:p.imageUrl,imageUrlValuePath:p.imageUrlValuePath,shape:p.shape,border:p.border};d=Ie(d=ke(d,r),r),S.maps.trigger("markerRendering",d,function(e){p.shapeValuePath!==d.shapeValuePath&&(d=ke(d,r)),p.colorValuePath!==d.colorValuePath&&(d=Ie(d,r));var t,i=Y.isNullOrUndefined(p.latitudeValuePath)?Y.isNullOrUndefined(r.latitude)?Y.isNullOrUndefined(r.Latitude)?null:r.Latitude:parseFloat(r.latitude):Number(k(r,p.latitudeValuePath)),o=Y.isNullOrUndefined(p.longitudeValuePath)?Y.isNullOrUndefined(r.longitude)?Y.isNullOrUndefined(r.Longitude)?null:r.Longitude:parseFloat(r.longitude):Number(k(r,p.longitudeValuePath)),n=p.offset,a=(d.cancel||!p.visible||Y.isNullOrUndefined(o)||Y.isNullOrUndefined(i)||(a=S.maps.element.id+"_LayerIndex_"+C+"_MarkerIndex_"+h+"_dataIndex_"+s,l=S.maps.isTileMap?R(new T(o,i),S.maps.tileZoomLevel,S.maps.tileTranslatePoint,!0):B(i,o,c,L,S.maps),t={x:u,y:g},!d.template||isNaN(l.x)||isNaN(l.y)?d.template||isNaN(l.x)||isNaN(l.y)||(x++,Ze(d,p,m,s,l,t,a,n,y,S.maps,_)):(O++,De(d,void 0,a,r,h,M,l,t,y,n,S.maps))),v+=isNaN(i)||isNaN(o)?1:0,O+=d.cancel?1:0,x+=d.cancel?1:0,S.maps.markerNullCount=Y.isNullOrUndefined(i)||Y.isNullOrUndefined(o)?S.maps.markerNullCount+1:S.maps.markerNullCount,m.length-S.maps.markerNullCount),l=!1;_.childElementCount===a-O-v&&"Template"!==f&&(S.maps.isTileMap?(t=document.getElementById(S.maps.element.id+"_LayerIndex_"+C+"_Polygons_Group"),n=document.getElementById(S.maps.element.id+"_LayerIndex_"+C+"_Polygon_Group"),Y.isNullOrUndefined(t)?Y.isNullOrUndefined(n)?b.insertBefore(_,b.firstElementChild):n.insertAdjacentElement("afterend",_):t.insertAdjacentElement("afterend",_)):b.appendChild(_),L.markerClusterSettings.allowClustering)&&(S.maps.svgObject.appendChild(_),S.maps.element.appendChild(S.maps.svgObject),l=ze(L,_,S.maps,C,_,b,!0,!0)),M.childElementCount===a-x-v&&N(S.maps.element.id+"_Secondary_Element")&&(N(S.maps.element.id+"_Secondary_Element").appendChild(M),1<=y)&&L.markerClusterSettings.allowClustering&&!l&&ze(L,M,S.maps,C,_,b,!1,!0)})})})},v.prototype.processTemplate=function(e,t,i,o){for(var n=0,a=0;a<this.templateCount;a++){var l=o.mapLayerPanel.calculateFactor(this.currentLayer),r=N(o.element.id+"_LayerIndex_"+a+"_Markers_Template_Group"),s=N(o.element.id+"_LayerIndex_"+a+"_Label_Template_Group"),d=N(o.element.id+"_LayerIndex_"+a+"_Polygons_Group");if(!Y.isNullOrUndefined(r)&&0<r.childElementCount){r.style.visibility="visible";for(var p=0;p<r.childElementCount;p++)this.markerTranslate(r.childNodes[p],l,e,t,i,"Template")}if(!Y.isNullOrUndefined(s)&&0<s.childElementCount)for(p=0;p<s.childElementCount;p++)this.dataLabelTranslate(s.childNodes[p],l,e,t,i,"Template",!1,n),n++;if(!Y.isNullOrUndefined(d))for(p=0;p<d.childElementCount;p++){var h=o.layersCollection[a].polygonSettings.polygons[p].borderWidth;d.childNodes[p].childNodes[0].setAttribute("stroke-width",(h/i).toString())}}},v.prototype.dataLabelTranslate=function(e,t,i,o,n,a,l,r,s,d){void 0===l&&(l=!1);var p,h=this.maps.dataLabelModule.dataLabelCollections,m=this.maps.layers[this.index].dataLabelSettings.textStyle,c=parseFloat(e.id.split("_LayerIndex_")[1].split("_")[0]),u=parseFloat(e.id.split("_shapeIndex_")[1].split("_")[0]),g=(-1<e.id.indexOf("_LabelIndex_")&&(f=parseFloat(e.id.split("_LabelIndex_")[1].split("_")[0])),0===this.currentLayer.animationDuration&&"Enable"===Y.animationMode?1e3:this.currentLayer.animationDuration),h=h[r],y=r;if(h.layerIndex===c&&h.shapeIndex===u&&h.labelIndex===f){r=h.location.x,c=h.location.y;if("Template"===a){var u=0,f=0;f=this.maps.isTileMap?(u=(r+i)*n-(b=W(p=h.dataLabelText,m)).width/2,(c+o)*n-b.height):(a=N(this.maps.element.id+"_Layer_Collections"),r=Math.abs(this.maps.baseMapRectBounds.min.x-r)*n,c=Math.abs(this.maps.baseMapRectBounds.min.y-c)*n,a=a.getBoundingClientRect(),S=e.parentElement.getBoundingClientRect(),u=r+(a.left-S.left),c+(a.top-S.top)),e.style.left=u+"px",e.style.top=f+"px"}else{if(r=(r+i)*n,c=(c+o)*n,p=h.dataLabelText,l&&0!==g||e.setAttribute("transform","translate( "+r+" "+c+" )"),(Y.isNullOrUndefined(s)||!s)&&("None"!==this.maps.layers[this.index].dataLabelSettings.smartLabelMode||"None"!==this.maps.layers[this.index].dataLabelSettings.intersectionAction)){var b,a=c-(b=le(p,m)).height/2,S=c+b.height/2,v={rightWidth:r+b.width/2,leftWidth:r-b.width/2,heightTop:a,heightBottom:S},x=("Hide"===this.maps.layers[this.index].dataLabelSettings.smartLabelMode&&(_=1<n?this.maps.dataLabelShape[y]*n>=b.width?p:"":this.maps.dataLabelShape[y]>=b.width?p:"",e.textContent=_),[]);if("Trim"===this.maps.layers[this.index].dataLabelSettings.smartLabelMode&&(_=tt(1<n?this.maps.dataLabelShape[y]*n:this.maps.dataLabelShape[y],p,m,b.width,!0,x),e.textContent=_),"Hide"===this.maps.layers[this.index].dataLabelSettings.intersectionAction){for(var O=0;O<d.length;O++)if(!Y.isNullOrUndefined(d[O])){if(!(v.leftWidth>d[O].rightWidth||v.rightWidth<d[O].leftWidth||v.heightTop>d[O].heightBottom||v.heightBottom<d[O].heightTop)){e.textContent=_="";break}_=Y.isNullOrUndefined(_)?p:_,e.textContent=_}d.push(v)}if("Trim"===this.maps.layers[this.index].dataLabelSettings.intersectionAction){for(var C,_,M=0;M<d.length;M++)if(!Y.isNullOrUndefined(d[M]))if(v.rightWidth<d[M].leftWidth||v.leftWidth>d[M].rightWidth||v.heightBottom<d[M].heightTop||v.heightTop>d[M].heightBottom)C=Y.isNullOrUndefined(_)?p:_,1<n&&(w=0<x.length?x[0]:b.width,C=tt(this.maps.dataLabelShape[y]*n,C,m,w,!0)),e.textContent=C;else{if(v.leftWidth>d[M].leftWidth){C=tt(P=(L=d[M].rightWidth-v.leftWidth)-(v.rightWidth-v.leftWidth),_=Y.isNullOrUndefined(_)?p:_,m,w=0<x.length?x[0]:b.width,!0),e.textContent=C;break}if(v.leftWidth<d[M].leftWidth){var L=v.rightWidth-d[M].leftWidth,P=Math.abs(L-(v.rightWidth-v.leftWidth)),w=(_=Y.isNullOrUndefined(_)?p:_,0<x.length?x[0]:b.width);C=tt(P,_,m,w,!0),e.textContent=C;break}}d.push(v),Y.isNullOrUndefined(C)&&(C=tt(this.maps.dataLabelShape[y]*n,p,m,b.width,!0),e.textContent=C)}}(l||0<g)&&Ut(e,0,g,new T(r,c))}}},v.prototype.markerTranslate=function(e,t,i,o,n,a,l){void 0===l&&(l=!1);var r,s,d,p=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),h=parseInt(e.id.split("_MarkerIndex_")[1].split("_")[0],10),m=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),p=this.maps.layersCollection[p],h=p.markerSettings[h];Y.isNullOrUndefined(h)||Y.isNullOrUndefined(h.dataSource)||Y.isNullOrUndefined(h.dataSource[m])||(s=Y.isNullOrUndefined(h.longitudeValuePath)?Y.isNullOrUndefined(h.dataSource[m].longitude)?Y.isNullOrUndefined(h.dataSource[m].Longitude)?0:parseFloat(h.dataSource[m].Longitude):parseFloat(h.dataSource[m].longitude):Number(k(h.dataSource[m],h.longitudeValuePath)),m=Y.isNullOrUndefined(h.latitudeValuePath)?Y.isNullOrUndefined(h.dataSource[m].latitude)?Y.isNullOrUndefined(h.dataSource[m].Latitude)?0:parseFloat(h.dataSource[m].Latitude):parseFloat(h.dataSource[m].latitude):Number(k(h.dataSource[m],h.latitudeValuePath)),r=0===this.currentLayer.animationDuration&&"Enable"===Y.animationMode?1e3:this.currentLayer.animationDuration,m=this.maps.isTileMap?R(new J(s,m),this.maps.tileZoomLevel,this.maps.tileTranslatePoint,!0):B(m,s,t,p,this.maps),this.maps.isTileMap?"Template"===a?(s=e.getBoundingClientRect(),e.style.left=m.x-s.width/2+h.offset.x+"px",e.style.top=m.y-s.height/2+h.offset.y+"px"):(m.x+=h.offset.x,m.y+=h.offset.y,e.setAttribute("transform","translate( "+m.x+" "+m.y+" )")):"Template"===a?0<r?(m.x=Math.abs(this.maps.baseMapRectBounds.min.x-m.x)*n,m.y=Math.abs(this.maps.baseMapRectBounds.min.y-m.y)*n,t=N(this.maps.element.id+"_Layer_Collections").getBoundingClientRect(),d=e.parentElement.getBoundingClientRect(),e.style.left=m.x+(t.left-d.left)+h.offset.x+"px",e.style.top=m.y+(t.top-d.top)+h.offset.y+"px",e.style.transform="translate(-50%, -50%)"):(d=e.getBoundingClientRect(),e.style.left=(m.x+i)*n+h.offset.x-this.maps.mapAreaRect.x-d.width/2+"px",e.style.top=(m.y+o)*n+h.offset.y-this.maps.mapAreaRect.y-d.height/2+"px"):(m.x=(m.x+i)*n+h.offset.x,m.y=(m.y+o)*n+h.offset.y,l&&0!==r?Ut(e,0,r,m):e.setAttribute("transform","translate( "+m.x+" "+m.y+" )")))},v.prototype.markerLineAnimation=function(e){if(e.isTileMap)for(var t=0;t<e.layersCollection.length;t++){var i=N(this.maps.element.id+"_LayerIndex_"+t+"_Markers_Template_Group"),o=N(this.maps.element.id+"_LayerIndex_"+t+"_line_Group"),n=N(this.maps.element.id+"_LayerIndex_"+t+"_Polygons_Group");Y.isNullOrUndefined(i)||(i.style.visibility="hidden"),Y.isNullOrUndefined(o)||(o.style.visibility="hidden"),Y.isNullOrUndefined(n)||(n.style.visibility="hidden")}},v.prototype.panning=function(e,t,i,o){var n,a,l,r,s,d=this.maps,p=this.mouseDownPoints,h=this.mouseMovePoints,m=d.scale,c=(d.markerZoomedState=!1,d.zoomPersistence=d.enablePersistence,d.defaultState=!1,d.initialCheck=!1,d.translatePoint),u=d.tileTranslatePoint,p=(t=Y.isNullOrUndefined(t)?p.x-h.x:t,i=Y.isNullOrUndefined(i)?p.y-h.y:i,-1<o.type.indexOf("mouse")||-1<o.type.indexOf("key")?o.layerX:o.touches[0].pageX),h=-1<o.type.indexOf("mouse")||-1<o.type.indexOf("key")?o.layerY:o.touches[0].pageY;this.maps.mergeCluster(),d.isTileMap?1<this.maps.tileZoomLevel&&(n=d.tileTranslatePoint.x-t,a=d.tileTranslatePoint.y-i,d.tileTranslatePoint.x=n,d.tileTranslatePoint.y=a,(-10<d.tileTranslatePoint.y&&i<0||d.tileTranslatePoint.y<-256*(Math.pow(2,this.maps.tileZoomLevel)-2)&&0<i)&&(d.tileTranslatePoint.x=n+t,d.tileTranslatePoint.y=a+i),d.translatePoint.x=d.tileTranslatePoint.x/d.scale,d.translatePoint.y=d.tileTranslatePoint.y/d.scale,o=this.maps.getTileGeoLocation(p,h),r=this.maps.getMinMaxLatitudeLongitude(),s={cancel:!1,name:nn,maps:d,tileTranslatePoint:{previous:u,current:d.tileTranslatePoint},translatePoint:{previous:c,current:d.translatePoint},scale:d.scale,tileZoomLevel:d.tileZoomLevel,latitude:o.latitude,longitude:o.longitude,minLatitude:r.minLatitude,maxLatitude:r.maxLatitude,minLongitude:r.minLongitude,maxLongitude:r.maxLongitude},d.trigger(nn,s),d.mapLayerPanel.generateTiles(d.tileZoomLevel,d.tileTranslatePoint,"Pan"),this.applyTransform(d,!1,!0),d.translatePoint.x=(d.tileTranslatePoint.x-t)/d.scale,d.translatePoint.y=(d.tileTranslatePoint.y-i)/d.scale):(u=rt(d.margin.top),o=document.getElementById(d.element.id+"_Legend_Group"),o=Y.isNullOrUndefined(o)?0:o.getClientRects()[0].height,n=c.x-t/m,a=c.y-i/m,m=N(d.element.id+"_Layer_Collections").getBoundingClientRect(),l=N(d.element.id+"_svg").getBoundingClientRect(),t=t<0?m.left<=l.left+d.mapAreaRect.x:m.left+m.width+d.mapAreaRect.x>=l.width,i=i<0?m.top<=l.top+d.mapAreaRect.y:m.top+m.height+o+u>=l.top+l.height,m=this.maps.getGeoLocation(this.maps.layersCollection.length-1,p,h),r=this.maps.getMinMaxLatitudeLongitude(),s={cancel:!1,name:nn,maps:d,tileTranslatePoint:{},translatePoint:{previous:c,current:new J(n,a)},scale:d.scale,tileZoomLevel:d.tileZoomLevel,latitude:m.latitude,longitude:m.longitude,minLatitude:r.minLatitude,maxLatitude:r.maxLatitude,minLongitude:r.minLongitude,maxLongitude:r.maxLongitude},d.trigger(nn,s),s.cancel||(t&&i?(d.translatePoint=new J(n,a),this.applyTransform(d,!1,!0)):t?(d.translatePoint=new J(n,d.translatePoint.y),this.applyTransform(d,!1,!0)):i&&(d.translatePoint=new J(d.translatePoint.x,a),this.applyTransform(d,!1,!0))),this.maps.zoomNotApplied=!1),d.zoomTranslatePoint=d.translatePoint,this.mouseDownPoints=this.mouseMovePoints,this.isSingleClick=!1},v.prototype.toolBarZooming=function(e,t){var i,o,n,a,l,r=this,s=this.maps,d=(s.initialCheck=s.isMarkerZoomCompleted=!1,s.defaultState="Reset"===t&&1===e&&!(s.zoomSettings.resetToInitial&&s.applyZoomReset)||"ZoomOut"===t&&1===e,s.tileZoomLevel),p=s.previousScale=s.scale,h=(s.markerZoomedState=!1,s.zoomPersistence=s.enablePersistence,s.mapScaleValue=e,s.zoomSettings.maxZoom),m=s.zoomSettings.minZoom,c=s.mapAreaRect,u=s.previousPoint=s.translatePoint,g=s.tileTranslatePoint;s.previousProjection="Reset"===t?void 0:s.projectionType,e="ZoomOut"===t&&1===Math.round(e)?1:e,e=(e="Reset"===t?m:0===Math.round(e)?1:e)<m&&"ZoomIn"===t?m+1:e,!s.isTileMap&&("ZoomIn"===t?m<=e&&Math.round(e)<=h:m<=e||s.isReset)?(i=s.baseMapRectBounds.min,o=s.baseMapRectBounds.max,l=Math.abs(o.x-i.x),o=Math.abs(i.y-o.y),a=n=void 0,e<1.2&&"Eckert5"!==s.projectionType?(0!==o&&0!==l&&o!==l||(l=c.width/2,o=c.height),e=parseFloat(Math.min(c.width/l,c.height/o).toFixed(2)),s.translatePoint=this.calculateInitalZoomTranslatePoint(e=1.05<e?1:e,l,o,c,i,s)):(n=u.x-(c.width/p-c.width/e)/2,a=u.y-(c.height/p-c.height/e)/2,n=(u=Math.abs(s.baseMapRectBounds.max.y-s.baseMapRectBounds.min.y)*e)<s.mapAreaRect.height?c.x+(-i.x+(c.width/2-l/2)):n,a=u<s.mapAreaRect.height?c.y+(-i.y+(c.height/2-o/2)):a,s.translatePoint=new J(n,a)),s.zoomTranslatePoint=s.translatePoint,s.scale=e,this.triggerZoomEvent(g,d,t)?(s.translatePoint=s.zoomTranslatePoint=s.previousPoint,s.scale=s.previousScale):this.applyTransform(s,!0)):s.isTileMap&&(m<=e&&e<=h||s.isReset)&&(p=d<m&&!s.isReset?m:e,s.scale=Math.pow(2,p-1),s.tileZoomLevel=p,s.previousScale===s.scale&&!s.isReset||(s.zoomSettings.zoomFactor=e,l={x:s.availableSize.width/2,y:s.availableSize.height/2},this.getTileTranslatePosition(d,p,l,t),(s.zoomSettings.resetToInitial&&s.applyZoomReset&&"Reset"===t||"ZoomOut"===t&&s.zoomSettings.resetToInitial&&s.applyZoomReset&&p<=s.initialZoomLevel)&&(s.initialCheck=!0,s.zoomPersistence=!1,s.tileTranslatePoint.x=s.initialTileTranslate.x,s.tileTranslatePoint.y=s.initialTileTranslate.y,p=s.tileZoomLevel=s.mapScaleValue=s.initialZoomLevel),this.triggerZoomEvent(g,d,t)?(s.translatePoint=s.tileTranslatePoint=new J(0,0),s.scale=s.previousScale,s.tileZoomLevel=d,s.zoomSettings.zoomFactor=s.previousScale):(s.translatePoint.y=(s.tileTranslatePoint.y-.01*s.mapScaleValue)/s.scale,s.translatePoint.x=(s.tileTranslatePoint.x-.01*s.mapScaleValue)/s.scale,document.getElementById(this.maps.element.id+"_LayerIndex_1")&&(document.getElementById(this.maps.element.id+"_LayerIndex_1").style.display="none"),document.querySelector(".GroupElement")&&(document.querySelector(".GroupElement").style.display="none"),this.markerLineAnimation(s),s.mapLayerPanel.generateTiles(p,s.tileTranslatePoint,t),u=0===this.maps.layersCollection[0].animationDuration&&"Enable"===Y.animationMode?1e3:this.maps.layersCollection[0].animationDuration,setTimeout(function(){r.applyTransform(r.maps,!0),document.getElementById(r.maps.element.id+"_LayerIndex_1")&&(document.getElementById(r.maps.element.id+"_LayerIndex_1").style.display="block"),r.maps.isAddLayer=!1},u))),this.maps.zoomNotApplied=!1),this.triggerZoomComplete(s,d,t)},v.prototype.createZoomingToolbars=function(){for(var e=this.maps,t=(this.toolBarGroup=e.renderer.createGroup({id:e.element.id+"_Zooming_KitCollection",opacity:"fluentdark"===e.theme.toLowerCase()?.6:.3}),15),i=15,o=e.zoomSettings.toolbarSettings,n=e.zoomSettings.toolbarSettings.buttonSettings,a=(this.maps.toolbarProperties={toolBarOrientation:o.orientation,highlightColor:n.highlightColor,selectionColor:n.selectionColor,horizontalAlignment:o.horizontalAlignment,verticalAlignment:o.verticalAlignment,color:n.color,shapeOpacity:n.opacity,borderOpacity:n.borderOpacity},n.radius||e.themeStyle.zoomButtonRadius),l=a/4,r=a/4,s=a/2,d=n.padding,p=this.maps.toolbarProperties.toolBarOrientation,h=e.zoomSettings.toolbarSettings.buttonSettings.toolbarItems.map(function(e){return e}),t=a/4+n.borderWidth/2+d,i=a/4+n.borderWidth/2+d,m=('<filter id="chart_shadow" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="5"/>'+'<feOffset dx="-3" dy="4" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="1"/>'+'</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>',h.length),c="Horizontal"===p?m*a+m*d+d+m*n.borderWidth:a+n.borderWidth+2*d,p="Horizontal"===p?a+n.borderWidth+2*d:m*a+m*d+d+m*n.borderWidth,m=e.renderer.createDefs(),m=(m.innerHTML='<filter id="chart_shadow" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="5"/><feOffset dx="-3" dy="4" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="1"/></feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>',this.toolBarGroup.appendChild(m),e.renderer.drawRectangle(new Q(e.element.id+"_Zooming_Rect",o.backgroundColor,{color:o.borderColor,width:o.borderWidth,opacity:o.borderOpacity},o.borderOpacity,new K(o.borderWidth/2,o.borderWidth/2,c-o.borderWidth,p-o.borderWidth),0,0))),u=(this.toolBarGroup.appendChild(m),(a-n.borderWidth/2)/30),g=0;g<h.length;g++){0!==g&&(t="Horizontal"===e.toolbarProperties.toolBarOrientation?t+(a+d)+n.borderWidth:t,i="Horizontal"===e.toolbarProperties.toolBarOrientation?i:i+(a+d)+n.borderWidth);var y=h[g],f=Y.isNullOrUndefined(this.maps.toolbarProperties.color)?this.maps.themeStyle.zoomFillColor:this.maps.toolbarProperties.color,b=n.borderColor||this.maps.themeStyle.zoomBorderColor||this.maps.themeStyle.zoomFillColor,S=(this.currentToolbarEle=e.renderer.createGroup({id:e.element.id+"_Zooming_ToolBar_"+y+"_Group",transform:"translate( "+t+" "+i+" ) "}),this.currentToolbarEle.setAttribute("class","e-maps-toolbar"),this.currentToolbarEle.appendChild(e.renderer.drawCircle(new me(e.element.id+"_Zooming_ToolBar_"+y+"_Rect",n.fill,{color:b,width:n.borderWidth,opacity:n.borderOpacity},n.opacity,l,r,s,""))),""),v=n.fill;switch(this.selectionColor=this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor,y.toLowerCase()){case"zoom":var x=void 0,O=void 0,O=(S=(S="M0.001,14.629L1.372,16l4.571-4.571v-0.685l0.228-0.274c1.051,0.868,2.423,1.417,3.885,1.417c3.291,0,")+"5.943-2.651,5.943-5.943S13.395,0,10.103,0S4.16,2.651,4.16,5.943c0,1.508,0.503,2.834,1.417,3.885l-0.274,0.228H4.571"+"L0.001,14.629L0.001,14.629z M5.943,5.943c0-2.285,1.828-4.114,4.114-4.114s4.114,1.828,4.114,",this.currentToolbarEle.setAttribute("class",this.maps.zoomSettings.enableSelectionZooming?"e-maps-toolbar":""),(!this.maps.zoomSettings.enablePanning||this.maps.zoomSettings.enableSelectionZooming)&&(!this.maps.zoomSettings.enablePanning||!this.maps.zoomSettings.enableSelectionZooming)&&(this.maps.zoomSettings.enablePanning||this.maps.zoomSettings.enableSelectionZooming)?!this.maps.zoomSettings.enablePanning&&this.maps.zoomSettings.enableSelectionZooming?(x=this.maps.themeStyle.zoomFillColor,f):(x=this.selectionColor,this.selectionColor):(x=v,f)),x=e.renderer.drawPath(new A(e.element.id+"_Zooming_ToolBar_"+y,x,1,O,1,1,null,S+"4.114s-1.828,4.114-4.114,4.114S5.943,8.229,5.943,5.943z"));x.setAttribute("transform","scale( "+u+","+u+" )"),this.currentToolbarEle.appendChild(x),this.zoomElements=this.currentToolbarEle,this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"zoomin":O=e.renderer.drawPath(new A(e.element.id+"_Zooming_ToolBar_"+y+"_Path",v,3,f,1,1,null,S="M 8, 0 L 8, 16 M 0, 8 L 16, 8"));O.setAttribute("transform","scale( "+u+","+u+" )"),this.currentToolbarEle.appendChild(O),this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"zoomout":x=e.renderer.drawPath(new A(e.element.id+"_Zooming_ToolBar_"+y,v,3,f,1,1,null,S="M 0, 8 L 16, 8"));x.setAttribute("transform","scale( "+u+","+u+" )"),this.currentToolbarEle.appendChild(x),this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"pan":var C=void 0,_=(S="M5,3h2.3L7.275,5.875h1.4L8.65,3H11L8,0L5,3z M3,11V8.7l2.875,0.025v-1.4L3,7.35V5L0,8L3,",S+="11z M11,13H8.7l0.025-2.875h-1.4L7.35,13H5l3,3L11,13z M13,5v2.3l-2.875-0.025v1.4L13,8.65V11l3-3L13,5z",this.currentToolbarEle.setAttribute("class",this.maps.zoomSettings.enablePanning?"e-maps-toolbar":""),this.maps.zoomSettings.enablePanning&&this.maps.zoomModule.isDragZoom?C=this.selectionColor||this.maps.themeStyle.zoomFillColor:this.maps.zoomSettings.enablePanning?C=v||this.maps.themeStyle.zoomFillColor:(C=this.selectionColor||this.maps.themeStyle.zoomFillColor,this.currentToolbarEle.setAttribute("class","")),e.renderer.drawPath(new A(e.element.id+"_Zooming_ToolBar_"+y,C,1,f,1,1,null,S)));_.setAttribute("transform","scale( "+u+","+u+" )"),this.currentToolbarEle.appendChild(_),this.panColor=C,this.panElements=this.currentToolbarEle,this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"reset":S=(S="M12.364,8h-2.182l2.909,3.25L16,8h-2.182c0-3.575-2.618-6.5-5.818-6.5c-1.128,0-2.218,0.366-3.091,")+"1.016l1.055,1.178C6.581,3.328,7.272,3.125,8,3.125C10.4,3.125,12.363,5.319,12.364,8L12.364,8z M11.091,"+"13.484l-1.055-1.178C9.419,12.672,8.728,12.875,8,12.875c-2.4,0-4.364-2.194-4.364-4.875h2.182L2.909,4.75L0,8h2.182c0,";_=e.renderer.drawPath(new A(e.element.id+"_Zooming_ToolBar_"+y,v,null,f,1,1,null,S+"3.575,2.618,6.5,5.818,6.5C9.128,14.5,10.219,14.134,11.091,13.484L11.091,13.484z"));_.setAttribute("transform","scale( "+u+","+u+" )"),this.currentToolbarEle.appendChild(_),this.wireEvents(this.currentToolbarEle,this.performToolBarAction)}this.toolBarGroup.appendChild(this.currentToolbarEle)}},v.prototype.performToolBarAction=function(e){var t=e.target,i=(e.stopImmediatePropagation(),"touch"===e.pointerType||"2"===e.pointerType||-1<e.type.indexOf("touch")),t=t.id.split("_Zooming_ToolBar_")[1].split("_")[0],o=!0;switch(t.toLowerCase()){case"zoomin":o=(this.maps.isTileMap?this.maps.tileZoomLevel:this.maps.scale)+1<=this.maps.zoomSettings.maxZoom;break;case"zoomout":var n=this.maps.isTileMap?this.maps.tileZoomLevel:this.maps.scale,o="Miller"===this.maps.projectionType||"Winkel3"===this.maps.projectionType||"AitOff"===this.maps.projectionType?Math.round(n)-1>=this.maps.zoomSettings.minZoom:n-1>=this.maps.zoomSettings.minZoom;break;case"reset":o=Math.round(this.maps.isTileMap?this.maps.tileZoomLevel:this.maps.scale)!==this.maps.zoomSettings.minZoom}i&&o?(this.handled=!0,this.performZoomingByToolBar(t)):"mousedown"!==e.type&&"pointerdown"!==e.type||this.handled||!o?this.handled=!1:(this.handled=!1,this.performZoomingByToolBar(t))},v.prototype.performZoomingByToolBar=function(e){var t=this.maps,i=(t.isReset=!1,0),o=this.fillColor||this.maps.themeStyle.zoomFillColor;switch(e.toLowerCase()){case"zoom":this.panColor=o,this.zoomColor=this.maps.zoomSettings.enableSelectionZooming?this.selectionColor:o,this.applySelection(this.zoomElements,this.zoomColor),this.applySelection(this.panElements,this.panColor),this.isPan=!1,this.isZoomSelection=this.maps.zoomSettings.enableSelectionZooming;break;case"pan":this.panColor=this.maps.zoomSettings.enablePanning?this.selectionColor:o,this.zoomColor=o,this.maps.zoomSettings.enablePanning?this.applySelection(this.zoomElements,this.fillColor||o):this.applySelection(this.zoomElements,this.selectionColor),this.applySelection(this.panElements,this.panColor),this.isPan=this.maps.zoomSettings.enablePanning,this.isZoomSelection=!1;break;case"zoomin":t.staticMapZoom=t.tileZoomLevel,0<t.staticMapZoom&&t.staticMapZoom<t.zoomSettings.maxZoom&&(t.staticMapZoom+=1),t.isTileMap&&t.tileZoomLevel>=t.zoomSettings.minZoom&&t.tileZoomLevel<t.zoomSettings.maxZoom?this.toolBarZooming(t.tileZoomLevel+1,"ZoomIn"):t.isTileMap||this.toolBarZooming(t.scale+1,"ZoomIn"),i=this.maps.isTileMap?Math.round(this.maps.tileZoomLevel):Math.round(this.maps.mapScaleValue),this.isZoomSelection||(i===t.zoomSettings.maxZoom||1<i||1===i&&this.maps.isTileMap?(this.applySelection(this.zoomElements,o),this.applySelection(this.panElements,t.zoomSettings.enablePanning?this.selectionColor:o)):1!==i||this.maps.isTileMap||(this.applySelection(this.zoomElements,o),this.applySelection(this.panElements,o)));break;case"zoomout":t.staticMapZoom=t.tileZoomLevel,t.markerCenterLatitude=null,t.markerCenterLongitude=null,this.toolBarZooming((t.isTileMap?t.tileZoomLevel:t.scale)-1,"ZoomOut"),i=this.maps.isTileMap?Math.round(this.maps.tileZoomLevel):Math.round(this.maps.mapScaleValue),!this.isPan&&this.isZoomSelection?(this.panColor=o,this.zoomColor=this.selectionColor,this.applySelection(this.zoomElements,this.selectionColor),this.applySelection(this.panElements,this.panColor)):i<=1&&!t.isTileMap?this.applySelection(this.panElements,o):this.applySelection(this.panElements,t.zoomSettings.enablePanning?this.selectionColor:o);break;case"reset":t.staticMapZoom=t.zoomSettings.enable?t.zoomSettings.zoomFactor:0,t.markerCenterLatitude=null,t.markerCenterLongitude=null,this.isZoomSelection=!1,this.isPan=t.zoomSettings.enablePanning,this.toolBarZooming(t.zoomSettings.minZoom,"Reset"),this.isPan&&!this.isZoomSelection||!this.isPan&&this.isZoomSelection?this.maps.zoomSettings.enablePanning?(this.applySelection(this.zoomElements,o),this.applySelection(this.panElements,this.selectionColor)):(this.applySelection(this.zoomElements,this.selectionColor),this.applySelection(this.panElements,o)):this.isPan||this.isZoomSelection||(this.applySelection(this.zoomElements,o),this.applySelection(this.panElements,o))}this.panningStyle(e.toLowerCase())},v.prototype.panningStyle=function(e){var t=N(this.maps.element.id+"_svg");"pan"===e||this.isPanModeEnabled&&"reset"!==e?t.setAttribute("class","e-maps-panning"):t.setAttribute("class","")},v.prototype.applySelection=function(e,t){if(e)for(var i,o=0;o<e.childElementCount;o++)"circle"!==(i=e.childNodes[o]).tagName&&(i.setAttribute("fill",-1<e.id.indexOf("Pan")?t:"transparent"),i.setAttribute("stroke",t))},v.prototype.showTooltip=function(e){var t=e.target.id.split("_Zooming_ToolBar_")[1].split("_")[0],i=this.maps.zoomSettings.toolbarSettings.tooltipSettings,i={visible:i.visible,fill:i.fill,borderOpacity:i.borderOpacity,borderWidth:i.borderWidth,borderColor:i.borderColor,fontColor:i.fontColor,fontFamily:i.fontFamily,fontStyle:i.fontStyle,fontWeight:i.fontWeight,fontSize:i.fontSize||"10px",fontOpacity:i.fontOpacity};i.fontFamily=this.maps.themeStyle.fontFamily,this.isTouch||(xt("EJ2_Map_Toolbar_Tip",this.maps.getLocalizedLabel(t),e.pageY+10,e.pageX+10,i),this.maps.isDevice&&(clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3)))},v.prototype.removeTooltip=function(){N("EJ2_Map_Toolbar_Tip")&&Y.remove(N("EJ2_Map_Toolbar_Tip"))},v.prototype.alignToolBar=function(){var e=this.maps,t=Y.createElement("div",{id:e.element.id+"_ToolBar"}),i=(t.style.cssText="position:absolute;z-index:2",e.renderer.createSvg({id:e.element.id+"_Zooming_ToolBar",width:10,height:10})),o=(i.appendChild(this.toolBarGroup),t.appendChild(i),N(e.element.id+"_Secondary_Element")&&N(e.element.id+"_Secondary_Element").appendChild(t),this.toolBarGroup.getBoundingClientRect()),n=(i.setAttribute("height",(o.height+e.zoomSettings.toolbarSettings.borderWidth).toString()),i.setAttribute("width",(o.width+e.zoomSettings.toolbarSettings.borderWidth).toString()),Y.isNullOrUndefined(e.totalRect)?e.mapAreaRect:e.totalRect),a=0,l=0;switch(e.toolbarProperties.verticalAlignment){case"Near":l=n.y;break;case"Center":l=n.height/2-o.height/2;break;case"Far":l=n.height-o.height-10}switch(e.toolbarProperties.horizontalAlignment){case"Near":a=n.x;break;case"Center":a=n.width/2-o.width/2;break;case"Far":a=Y.isNullOrUndefined(e.legendModule)||"Left"!==e.legendSettings.position?n.width-o.width-10:n.width+n.x-o.width-10}t.style.left=a+"px",t.style.top=l+"px";var i=this.maps.toolbarProperties.highlightColor||this.maps.themeStyle.zoomSelectionColor,i=" .e-maps-toolbar:hover > circle { stroke:"+i+"; } .e-maps-toolbar:hover > path { fill: "+i+" ; stroke: "+i+"; }.e-maps-toolbar:hover { cursor: pointer; } .e-maps-cursor-disable:hover { cursor: not-allowed; } .e-maps-panning:hover { cursor: pointer; } .e-maps-popup-close { display: block; opacity: 0; }",r=document.createElement("style");r.appendChild(document.createTextNode(i)),t.appendChild(r)},v.prototype.removeToolbarOpacity=function(e,t){var i;!Y.isNullOrUndefined(this.maps)&&this.maps.zoomModule&&this.maps.zoomSettings.enable&&(N(this.maps.element.id+"_Zooming_KitCollection")&&-1<t.indexOf(this.maps.element.id+"_Zooming_")?(this.maps.isDevice?(N(this.maps.element.id+"_Zooming_KitCollection").setAttribute("opacity","1"),this.removeToolbarClass("","","","","")):this.removeToolbarClass(this.maps.zoomSettings.enableSelectionZooming?"e-maps-toolbar":"","e-maps-toolbar","e-maps-toolbar",this.maps.zoomSettings.enablePanning?"e-maps-toolbar":"","e-maps-toolbar"),t=this.maps.toolbarProperties.shapeOpacity,i=this.maps.toolbarProperties.borderOpacity,this.maps.isTileMap&&(e<=1.1||this.maps.zoomSettings.minZoom===e)?(this.maps.isDevice||this.removeToolbarClass(this.maps.zoomSettings.enableSelectionZooming?"e-maps-toolbar":"","e-maps-toolbar","",this.maps.zoomSettings.enablePanning?"e-maps-toolbar":"",""),this.maps.zoomSettings.enablePanning&&this.removePanColor(this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor),this.isZoomSelection&&this.maps.zoomSettings.enableSelectionZooming&&!this.maps.isReset&&(this.removeZoomColor(this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor),this.removePanColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor)),this.removeZoomOpacity(this.maps.zoomSettings.enableSelectionZooming?t:.3,this.maps.zoomSettings.enableSelectionZooming?i:.3,t,i,.3,.3,this.maps.zoomSettings.enablePanning?t:.3,this.maps.zoomSettings.enablePanning?i:.3,.3,.3)):e<=1.1||this.maps.zoomSettings.minZoom===e?(this.maps.isDevice||this.removeToolbarClass(this.maps.zoomSettings.enableSelectionZooming?"e-maps-toolbar":"","e-maps-toolbar","","",""),!this.isZoomSelection&&this.maps.zoomSettings.enablePanning&&this.removePanColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor),this.isZoomSelection&&this.maps.zoomSettings.enableSelectionZooming&&!this.maps.isReset&&(this.removeZoomColor(this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor),this.removePanColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor)),this.removeZoomOpacity(this.maps.zoomSettings.enableSelectionZooming?t:.3,this.maps.zoomSettings.enableSelectionZooming?i:.3,t,i,.3,.3,.3,.3,.3,.3)):e<this.maps.zoomSettings.maxZoom?(this.maps.isDevice||this.removeToolbarClass(this.maps.zoomSettings.enableSelectionZooming?"e-maps-toolbar":"","e-maps-toolbar","e-maps-toolbar",this.maps.zoomSettings.enablePanning?"e-maps-toolbar":"","e-maps-toolbar"),this.maps.zoomModule.isZoomFinal?this.maps.zoomModule.isZoomFinal=!1:this.removeZoomOpacity(this.maps.zoomSettings.enableSelectionZooming?t:.3,this.maps.zoomSettings.enableSelectionZooming?i:.3,t,i,t,i,this.maps.zoomSettings.enablePanning?t:.3,this.maps.zoomSettings.enablePanning?i:.3,t,i),this.isZoomSelection&&this.maps.zoomSettings.enableSelectionZooming?(this.removeZoomColor(this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor),this.maps.zoomModule.isPan&&this.maps.zoomSettings.enablePanning&&this.removePanColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor)):!this.isZoomSelection&&this.maps.zoomSettings.enablePanning&&(this.removePanColor(this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor),this.maps.zoomSettings.enableSelectionZooming)&&this.removeZoomColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor)):(this.maps.isDevice||this.removeToolbarClass("","","e-maps-toolbar",this.maps.zoomSettings.enablePanning?"e-maps-toolbar":"","e-maps-toolbar"),this.removeZoomOpacity(.3,.3,.3,.3,t,i,this.maps.zoomSettings.enablePanning?t:.3,this.maps.zoomSettings.enablePanning?i:.3,t,i),this.maps.zoomSettings.enableSelectionZooming&&this.removeZoomColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor),!this.isZoomSelection&&this.maps.zoomSettings.enablePanning&&this.removePanColor(this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor))):this.maps.isDevice||(this.removePanColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor),this.removeZoomColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor),this.removeZoomOpacity(1,1,1,1,1,1,1,1,1,1)))},v.prototype.setOpacity=function(e,t,i,o){N(this.maps.element.id+e)&&(N(this.maps.element.id+e).setAttribute("stroke-opacity",i.toString()),N(this.maps.element.id+e).setAttribute("fill-opacity",i.toString()),N(this.maps.element.id+t).setAttribute("stroke-opacity",o.toString()),N(this.maps.element.id+t).setAttribute("fill-opacity",o.toString()))},v.prototype.removeZoomOpacity=function(e,t,i,o,n,a,l,r,s,d){this.setOpacity("_Zooming_ToolBar_Zoom_Rect","_Zooming_ToolBar_Zoom",t,e),this.setOpacity("_Zooming_ToolBar_ZoomIn_Rect","_Zooming_ToolBar_ZoomIn_Path",o,i),this.setOpacity("_Zooming_ToolBar_ZoomOut_Rect","_Zooming_ToolBar_ZoomOut",a,n),this.setOpacity("_Zooming_ToolBar_Pan_Rect","_Zooming_ToolBar_Pan",r,l),this.setOpacity("_Zooming_ToolBar_Reset_Rect","_Zooming_ToolBar_Reset",d,s)},v.prototype.removeToolbarClass=function(e,t,i,o,n){N(this.maps.element.id+"_Zooming_KitCollection")&&(document.getElementById(this.maps.element.id+"_Zooming_ToolBar_ZoomIn_Group")&&N(this.maps.element.id+"_Zooming_ToolBar_ZoomIn_Group").setAttribute("class",t),document.getElementById(this.maps.element.id+"_Zooming_ToolBar_ZoomOut_Group")&&N(this.maps.element.id+"_Zooming_ToolBar_ZoomOut_Group").setAttribute("class",i),document.getElementById(this.maps.element.id+"_Zooming_ToolBar_Reset_Group")&&N(this.maps.element.id+"_Zooming_ToolBar_Reset_Group").setAttribute("class",n),document.getElementById(this.maps.element.id+"_Zooming_ToolBar_Zoom_Group")&&this.maps.zoomSettings.enableSelectionZooming&&N(this.maps.element.id+"_Zooming_ToolBar_Zoom_Group").setAttribute("class",e),document.getElementById(this.maps.element.id+"_Zooming_ToolBar_Pan_Group"))&&this.maps.zoomSettings.enablePanning&&N(this.maps.element.id+"_Zooming_ToolBar_Pan_Group").setAttribute("class",o)},v.prototype.removePanColor=function(e){N(this.maps.element.id+"_Zooming_ToolBar_Pan_Rect")&&this.maps.zoomSettings.enablePanning&&(N(this.maps.element.id+"_Zooming_ToolBar_Pan").setAttribute("fill",e),N(this.maps.element.id+"_Zooming_ToolBar_Pan").setAttribute("stroke",e))},v.prototype.removeZoomColor=function(e){N(this.maps.element.id+"_Zooming_ToolBar_Zoom_Rect")&&this.maps.zoomSettings.enableSelectionZooming&&(N(this.maps.element.id+"_Zooming_ToolBar_Zoom").setAttribute("fill","transparent"),N(this.maps.element.id+"_Zooming_ToolBar_Zoom").setAttribute("stroke",e))},v.prototype.wireEvents=function(e,t){Y.EventHandler.add(e,Y.Browser.touchStartEvent,t,this),Y.EventHandler.add(e,"mouseover",this.showTooltip,this),Y.EventHandler.add(e,"mouseout",this.removeTooltip,this)},v.prototype.mapMouseWheel=function(e){var t,i,o,n,a;this.maps.zoomSettings.enable&&this.maps.zoomSettings.mouseWheelZoom&&((t=this.maps).markerZoomedState=!1,t.zoomPersistence=t.enablePersistence,i=this.getMousePosition(e.pageX,e.pageY),n=t.tileZoomLevel,a=t.scale,o=t.zoomSettings.maxZoom,n=t.isTileMap?n:a,i.x>t.mapAreaRect.x&&i.x<t.mapAreaRect.x+t.mapAreaRect.width&&i.y>t.mapAreaRect.y&&i.y<t.mapAreaRect.y+t.mapAreaRect.height&&(e.preventDefault(),"ZoomIn"==(a="mozilla"!==this.browserName||this.isPointer?0<e.wheelDelta/120?"ZoomIn":"ZoomOut":0<-e.detail/3?"ZoomIn":"ZoomOut")?(t.mapScaleValue=n+1,t.isTileMap?(t.staticMapZoom=t.tileZoomLevel,0<t.staticMapZoom&&t.staticMapZoom<o&&(t.staticMapZoom+=1,this.performZooming(i,n+1,a))):this.performZooming(i,n+1,a)):(t.mapScaleValue=n-1,t.isReset=t.mapScaleValue<1,t.staticMapZoom=t.tileZoomLevel,1===t.mapScaleValue&&(t.markerCenterLatitude=null,t.markerCenterLongitude=null),1<t.staticMapZoom&&t.staticMapZoom<o&&--t.staticMapZoom,this.performZooming(i,n-1,a))),this.removeToolbarOpacity(t.mapScaleValue,this.maps.isDevice?this.maps.element.id+"_Zooming_":(Y.isNullOrUndefined(e.target)?this.maps.element:e.target).id))},v.prototype.doubleClick=function(e){var t=e.pageX,i=e.pageY,o=e.target.closest("#"+this.maps.element.id+"_mapsTooltipparent_template");this.maps.zoomSettings.enable&&this.maps.zoomSettings.doubleClickZoom&&!(-1<e.target.id.indexOf("_Zooming_"))&&Y.isNullOrUndefined(o)&&(e=this.getMousePosition(t,i),t=(o=this.maps).tileZoomLevel,i=o.scale,o.mapScaleValue=o.mapScaleValue+1,t=o.isTileMap?t:i,e.x>o.mapAreaRect.x)&&e.x<o.mapAreaRect.x+o.mapAreaRect.width&&e.y>o.mapAreaRect.y&&e.y<o.mapAreaRect.y+o.mapAreaRect.height&&this.performZooming(e,t+1,"ZoomIn")},v.prototype.mouseDownHandler=function(e){var t,i,o=null,e=(e.target,"touchstart"===e.type?(this.isTouch=!0,o=e.touches,e.target,t=o[0].pageX,i=o[0].pageY):(t=e.pageX,i=e.pageY,e.target),this.isTouch||e.preventDefault(),this.maps.zoomSettings.enablePanning?this.isPan=this.isPanModeEnabled=!this.isZoomSelection:this.isPan=this.isPanModeEnabled=this.panColor!==this.selectionColor?this.maps.zoomSettings.enablePanning:this.zoomColor===this.selectionColor,this.mouseDownLatLong={x:t,y:i},this.maps.isTileMap?Math.round(this.maps.tileZoomLevel):Math.round(this.maps.mapScaleValue));this.rectZoomingStart=this.isZoomSelection&&e<this.maps.zoomSettings.maxZoom&&this.maps.zoomSettings.enable,this.mouseDownPoints=this.getMousePosition(t,i),this.isTouch&&null!==o&&(this.firstMove=!0,this.pinchFactor=this.maps.scale,this.fingers=o.length),this.isSingleClick=!0},v.prototype.mouseMoveHandler=function(e){var t,i,o,n=this.maps,a=null,l=this.maps.zoomSettings;"touchmove"===e.type?(this.isTouch=!0,o=e.target,t=(a=e.touches)[0].pageX,i=a[0].pageY):(t=e.pageX,i=e.pageY,o=e.target),N(n.element.id+"_Zooming_KitCollection")&&(-1<o.id.indexOf("_Zooming_")?N(n.element.id+"_Zooming_KitCollection").setAttribute("opacity","1"):n.isDevice||N(n.element.id+"_Zooming_KitCollection").setAttribute("opacity","fluentdark"===n.theme.toLowerCase()?"0.6":"0.3")),this.isTouch&&this.maps.zoomSettings.pinchZooming&&null!==a&&(this.firstMove&&2===a.length?(this.rectZoomingStart=!1,this.updateInteraction(),this.touchStartList=wt(e)):2===a.length&&2===this.touchStartList.length&&(this.touchMoveList=wt(e),e.preventDefault(),this.rectZoomingStart=!1,this.performPinchZooming(e)),this.firstMove=!1),this.mouseMovePoints=this.getMousePosition(t,i),l.enable&&this.isPanModeEnabled&&-1===this.maps.markerDragId.indexOf("_MarkerIndex_")&&(Y.Browser.isDevice&&1<=a.length||!Y.Browser.isDevice)&&(e.preventDefault(),this.maps.element.style.cursor="pointer",this.mouseMoveLatLong={x:t,y:i},this.mouseDownLatLong.x!==this.mouseMoveLatLong.x)&&this.mouseDownLatLong.y!==this.mouseMoveLatLong.y&&(this.maps.zoomSettings.enablePanning&&this.panning("None",null,null,e),this.mouseDownLatLong.x=t,this.mouseDownLatLong.y=i),(!this.isTouch||null!==a&&1===a.length)&&this.rectZoomingStart&&(e.preventDefault(),o=this.maps.isTileMap?Math.round(this.maps.tileZoomLevel):Math.round(this.maps.mapScaleValue),this.maps.zoomSettings.enableSelectionZooming&&o<this.maps.zoomSettings.maxZoom?this.drawZoomRectangle():(this.rectZoomingStart=!1,this.isPan=!0))},v.prototype.mouseUpHandler=function(e){this.rectZoomingStart=!1,this.isSingleClick=!!this.isSingleClick,this.isTouch=!1,this.touchStartList=[],this.touchMoveList=[],this.lastScale=1,this.maps.element.style.cursor="auto",this.isPanModeEnabled&&this.maps.zoomSettings.enablePanning&&!Y.isNullOrUndefined(this.maps.previousPoint)&&this.maps.translatePoint.x!==this.maps.previousPoint.x&&this.maps.translatePoint.y!==this.maps.previousPoint.y&&(o=t=void 0,a=l=0,i=e.target,e=void(-1!==e.type.indexOf("touch")?(l=t=e.changedTouches[0].pageX,a=(o=e.changedTouches[0].pageY)-(this.maps.isTileMap?10:0),e.target,this.maps.mouseClickEvent={x:t,y:o}):(t=e.pageX,o=e.pageY,l=e.layerX,a=e.layerY-(this.maps.isTileMap?10:0),e.target)),n=this.maps.getMinMaxLatitudeLongitude(),e=this.maps.isTileMap?(l=this.maps.getTileGeoLocation(l,a),{cancel:!1,name:"panComplete",maps:this.maps,tileTranslatePoint:{previous:this.maps.tileTranslatePoint,current:this.maps.tileTranslatePoint},translatePoint:{previous:this.maps.previousPoint,current:this.maps.translatePoint},scale:this.maps.scale,tileZoomLevel:this.maps.tileZoomLevel,latitude:l.latitude,longitude:l.longitude,minLatitude:n.minLatitude,maxLatitude:n.maxLatitude,minLongitude:n.minLongitude,maxLongitude:n.maxLongitude}):(this.maps.mouseClickEvent.x=this.maps.mouseDownEvent.x,this.maps.mouseClickEvent.y=this.maps.mouseDownEvent.y,a=this.maps.getClickLocation(i.id,t,o,i,t,o),{cancel:!1,name:"panComplete",maps:this.maps,tileTranslatePoint:{},translatePoint:{previous:this.maps.previousPoint,current:this.maps.translatePoint},scale:this.maps.scale,tileZoomLevel:this.maps.tileZoomLevel,latitude:Y.isNullOrUndefined(a)?0:a.latitude,longitude:Y.isNullOrUndefined(a)?0:a.longitude,minLatitude:n.minLatitude,maxLatitude:n.maxLatitude,minLongitude:n.minLongitude,maxLongitude:n.maxLongitude}),this.maps.trigger("panComplete",e)),this.isPanModeEnabled=!1;var t,i,o,n,a,l=N(this.maps.element.id+"_Selection_Rect_Zooming");l&&this.maps.zoomSettings.enable&&this.maps.zoomSettings.enableSelectionZooming&&(Y.remove(l),this.performRectZooming()),this.mouseMoveLatLong={x:0,y:0},this.mouseDownLatLong={x:0,y:0},this.pinchDistance=null},v.prototype.mouseCancelHandler=function(e){this.isPanModeEnabled=!1,this.isTouch=!1,this.rectZoomingStart=!1;var t=N(this.maps.element.id+"_Selection_Rect_Zooming");t&&this.maps.zoomSettings.enable&&(Y.remove(t),this.performRectZooming())},v.prototype.click=function(e){var t,i=this.maps,o=e.target.closest("#"+this.maps.element.id+"_mapsTooltipparent_template");if(i.markerModule&&0<i.markerModule.sameMarkerData.length||-1<e.target.id.indexOf("MarkerIndex")&&-1===e.target.id.indexOf("cluster")||!Y.isNullOrUndefined(o))return null;!this.isSingleClick||!i.zoomSettings.zoomOnClick||-1<e.target.id.indexOf("_Zooming_")||i.zoomSettings.doubleClickZoom||this.zoomColor===this.selectionColor||(o=e.pageX,e=e.pageY,o=this.getMousePosition(o,e),e=i.tileZoomLevel,t=i.scale,i.mapScaleValue=i.mapScaleValue+1,e=i.isTileMap?e:t,o.x>i.mapAreaRect.x&&o.x<i.mapAreaRect.x+i.mapAreaRect.width&&o.y>i.mapAreaRect.y&&o.y<i.mapAreaRect.y+i.mapAreaRect.height&&this.performZooming(o,e+1,"ZoomIn"))},v.prototype.getMousePosition=function(e,t){var i=this.maps,o=i.element.getBoundingClientRect(),n=i.element.ownerDocument.defaultView.pageXOffset,a=i.element.ownerDocument.defaultView.pageYOffset,l=i.element.ownerDocument.documentElement.clientTop,i=i.element.ownerDocument.documentElement.clientLeft,n=o.left+n-i,i=o.top+a-l;return new J(Math.abs(e-n),Math.abs(t-i))},v.prototype.addEventListener=function(){this.maps.isDestroyed||(Y.EventHandler.add(this.maps.element,this.wheelEvent,this.mapMouseWheel,this),Y.EventHandler.add(this.maps.element,"click",this.click,this),Y.EventHandler.add(this.maps.element,"dblclick",this.doubleClick,this),this.maps.on(Y.Browser.touchMoveEvent,this.mouseMoveHandler,this),this.maps.on(Y.Browser.touchStartEvent,this.mouseDownHandler,this),this.maps.on(Y.Browser.touchEndEvent,this.mouseUpHandler,this),Y.EventHandler.add(this.maps.element,this.cancelEvent,this.mouseCancelHandler,this))},v.prototype.removeEventListener=function(){this.maps.isDestroyed||(Y.EventHandler.remove(this.maps.element,this.wheelEvent,this.mapMouseWheel),Y.EventHandler.remove(this.maps.element,"click",this.click),Y.EventHandler.remove(this.maps.element,"dblclick",this.doubleClick),this.maps.off(Y.Browser.touchMoveEvent,this.mouseMoveHandler),this.maps.off(Y.Browser.touchStartEvent,this.mouseDownHandler),this.maps.off(Y.Browser.touchEndEvent,this.mouseUpHandler),Y.EventHandler.remove(this.maps.element,this.cancelEvent,this.mouseCancelHandler))},v.prototype.getModuleName=function(){return"Zoom"},v.prototype.destroy=function(){this.toolBarGroup=null,this.currentToolbarEle=null,this.zoomingRect=null,this.zoomElements=null,this.panElements=null,this.baseTranslatePoint=null,this.touchStartList=null,this.touchMoveList=null,this.previousTouchMoveList=null,this.mouseDownPoints=null,this.mouseMovePoints=null,this.startTouches=[],this.mouseDownLatLong=null,this.mouseMoveLatLong=null,this.removeEventListener(),this.layerCollectionEle=null,this.currentLayer=null,this.pinchDistance=null,this.maps=null};var Tn=v;function v(e){this.isPanModeEnabled=!1,this.mouseEnter=!1,this.isTouch=!1,this.rectZoomingStart=!1,this.browserName=Y.Browser.info.name,this.isPointer=Y.Browser.isPointer,this.handled=!1,this.isPanningInProgress=!1,this.isPan=!1,this.isZoomFinal=!1,this.isZoomSelection=!1,this.pinchFactor=1,this.startTouches=[],this.mouseDownLatLong={x:0,y:0},this.mouseMoveLatLong={x:0,y:0},this.isSingleClick=!1,this.maps=e,this.wheelEvent="mozilla"!==this.browserName||this.isPointer?"mousewheel":"DOMMouseScroll",this.cancelEvent=this.isPointer?"pointerleave":"mouseleave",this.selectionColor=this.maps.zoomSettings.toolbarSettings.buttonSettings.selectionColor,this.fillColor=this.maps.zoomSettings.toolbarSettings.buttonSettings.color,this.addEventListener()}kn.prototype.print=function(e,t){var i=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth+",tabbar=no"),o=(i.moveTo(0,0),i.resizeTo(screen.availWidth,screen.availHeight),{cancel:!1,htmlContent:this.getHTMLContent(e,t),name:on});e.trigger("beforePrint",o,function(e){o.cancel||Y.print(o.htmlContent,i)})},kn.prototype.getHTMLContent=function(e,t){var i,o=Y.createElement("div"),n=e.element.cloneNode(!0),a=e.isTileMap?n.getElementsByTagName("svg")[1]:n.getElementsByTagName("svg")[0];if(Y.isNullOrUndefined(a)||(a=a.childNodes[0],Y.isNullOrUndefined(a))||(i=a.getAttribute("fill"),"Tailwind"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme&&"Fluent2"!==e.theme||"rgba(255,255,255, 0.0)"!==i&&"transparent"!==i?"TailwindDark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme&&"Fluent2Dark"!==e.theme&&"Fluent2HighContrast"!==e.theme||"rgba(255,255,255, 0.0)"!==i&&"transparent"!==i||a.setAttribute("fill","rgba(0, 0, 0, 1)"):a.setAttribute("fill","rgba(255,255,255, 1)")),e.isTileMap)for(var l=0;l<n.childElementCount;l++)if(n.children[l].id===e.element.id+"_tile_parent"){n.children[l].style.removeProperty("height"),n.children[l].style.removeProperty("width"),n.children[l].style.removeProperty("top"),n.children[l].style.removeProperty("left"),n.children[l].style.removeProperty("right"),n.children[l].style.removeProperty("overflow");var r=document.getElementById(e.element.id+"_Tile_SVG_Parent");n.children[l].children[0].style.overflow="hidden",n.children[l].children[0].style.position="absolute",n.children[l].children[0].style.height=r.style.height,n.children[l].children[0].style.width=r.style.width,n.children[l].children[0].style.left=r.style.left,n.children[l].children[0].style.top=r.style.top;break}return t?t instanceof Array?Array.prototype.forEach.call(t,function(e){o.appendChild(F(e).cloneNode(!0))}):t instanceof Element?o.appendChild(t.cloneNode(!0)):o.appendChild(F(t).cloneNode(!0)):o.appendChild(n),o},kn.prototype.getModuleName=function(){return"Print"},kn.prototype.destroy=function(){};var In=kn;function kn(e){}Fn.prototype.export=function(f,b,S,v){return new Promise(function(n,e){var a,l=Y.createElement("canvas",{id:"ej2-canvas",attrs:{width:f.availableSize.width.toString(),height:f.availableSize.height.toString()}}),r=!(-1<Y.Browser.userAgent.toString().indexOf("HeadlessChrome")),s=document.getElementById(f.element.id+"_Tile_SVG_Parent"),t=N(f.element.id+"_svg").cloneNode(!0),d=t.childNodes[0].getAttribute("fill"),p=("Tailwind"!==f.theme&&"Bootstrap5"!==f.theme&&"Fluent"!==f.theme&&"Material3"!==f.theme&&"Fluent2"!==f.theme||"rgba(255,255,255, 0.0)"!==d&&"transparent"!==d?"TailwindDark"!==f.theme&&"Bootstrap5Dark"!==f.theme&&"FluentDark"!==f.theme&&"Material3Dark"!==f.theme&&"Fluent2Dark"!==f.theme&&"Fluent2HighContrast"!==f.theme||"rgba(255,255,255, 0.0)"!==d&&"transparent"!==d||t.childNodes[0].setAttribute("fill","rgba(0, 0, 0, 1)"):t.childNodes[0].setAttribute("fill","rgba(255,255,255, 1)"),o=f.isTileMap?(a=N(f.element.id+"_Tile_SVG").cloneNode(!0),'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+t.outerHTML+a.outerHTML+"</svg>"):'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+t.outerHTML+"</svg>",window.URL.createObjectURL(new Blob("SVG"===b?[o]:[(new XMLSerializer).serializeToString(t)],{type:"image/svg+xml"})));if("SVG"===b)v?ie(S,b,p,r):n(null);else{var i=new Image,h=l.getContext("2d");if(f.isTileMap){f.isExportInitialTileMap=!0;for(var o=document.getElementById(f.element.id+"_MapAreaBorder"),m=parseFloat(o.getAttribute("y")),c=parseFloat(o.getAttribute("x")),u=new XMLHttpRequest,g=f.mapLayerPanel.tiles.length,y=0;y<=g+1;y++)!function(t){var i=document.getElementById(f.element.id+"_tile_"+(t-1)),o=new Image,e=(o.crossOrigin="Anonymous",f.background||(!("Tailwind"!==f.theme&&"Bootstrap5"!==f.theme&&"Fluent"!==f.theme&&"Material3"!==f.theme||"rgba(255,255,255, 0.0)"!==d&&"transparent"!==d)||"TailwindDark"!==f.theme&&"Bootstrap5Dark"!==f.theme&&"FluentDark"!==f.theme&&"Material3Dark"!==f.theme||"rgba(255,255,255, 0.0)"!==d&&"transparent"!==d?"#ffffff":"#000000")),e=(h.fillStyle=e,h.fillRect(0,0,f.availableSize.width,f.availableSize.height),h.font=f.titleSettings.textStyle.size+" Arial",document.getElementById(f.element.id+"_Map_title"));Y.isNullOrUndefined(e)||(h.fillStyle=e.getAttribute("fill"),h.fillText(f.titleSettings.text,parseFloat(e.getAttribute("x")),parseFloat(e.getAttribute("y")))),o.onload=function(){var e;0===t||t===g+1?0===t?(h.setTransform(1,0,0,1,0,0),h.rect(0,m,parseFloat(s.style.width),parseFloat(s.style.height)),h.clip()):h.setTransform(1,0,0,1,c,m):h.setTransform(1,0,0,1,parseFloat(i.style.left)+c,parseFloat(i.style.top)+m),h.drawImage(o,0,0),t===g+1&&(localStorage.setItem("local-canvasImage",l.toDataURL("image/png")),e=localStorage.getItem("local-canvasImage"),v?(ie(S,b,e,r),localStorage.removeItem("local-canvasImage"),f.isExportInitialTileMap=!1):(f.isExportInitialTileMap=!1,"PNG"===b?n(e):"JPEG"===b&&n(l.toDataURL("image/jpeg"))))},0===t||t===g+1?0===t?o.src=p:setTimeout(function(){o.src=window.URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(a)],{type:"image/svg+xml"}))},300):(u.open("GET",i.children[0].getAttribute("src"),!0),u.send(),o.src=i.children[0].getAttribute("src"))}(y)}else i.onload=function(){h.drawImage(i,0,0),window.URL.revokeObjectURL(p),v?ie(S,b,l.toDataURL("image/png").replace("image/png","image/octet-stream"),r):"PNG"===b?n(l.toDataURL("image/png")):"JPEG"===b&&n(l.toDataURL("image/jpeg"))},i.src=p}})},Fn.prototype.getModuleName=function(){return"ImageExport"},Fn.prototype.destroy=function(){};var Nn=Fn;function Fn(e){}zn.prototype.export=function(g,y,f,b,S){return new Promise(function(n){g.isTileMap&&(g.isExportInitialTileMap=!0);var a=Y.createElement("canvas",{id:"ej2-canvas",attrs:{width:g.availableSize.width.toString(),height:g.availableSize.height.toString()}}),l=(S=Y.isNullOrUndefined(S)?_.PdfPageOrientation.Landscape:S,document.getElementById(g.element.id+"_Tile_SVG_Parent")),e=g.svgObject.cloneNode(!0),r=e.childNodes[0].getAttribute("fill"),s=("Tailwind"!==g.theme&&"Bootstrap5"!==g.theme&&"Fluent"!==g.theme&&"Material3"!==g.theme&&"Fluent2"!==g.theme||"rgba(255,255,255, 0.0)"!==r&&"transparent"!==r?"TailwindDark"!==g.theme&&"Bootstrap5Dark"!==g.theme&&"FluentDark"!==g.theme&&"Material3Dark"!==g.theme&&"Fluent2Dark"!==g.theme&&"Fluent2HighContrast"!==g.theme||"rgba(255,255,255, 0.0)"!==r&&"transparent"!==r||e.childNodes[0].setAttribute("fill","rgba(0, 0, 0, 1)"):e.childNodes[0].setAttribute("fill","rgba(255,255,255, 1)"),window.URL.createObjectURL(new Blob("SVG"===y?[void 0]:[(new XMLSerializer).serializeToString(e)],{type:"image/svg+xml"}))),d=new _.PdfDocument,t=new Image,p=a.getContext("2d");if(g.isTileMap)for(var e=document.getElementById(g.element.id+"_MapAreaBorder"),h=parseFloat(e.getAttribute("y")),m=parseFloat(e.getAttribute("x")),c=new XMLHttpRequest,u=g.mapLayerPanel.tiles.length,i=0;i<=u+1;i++)!function(t){var i=document.getElementById(g.element.id+"_tile_"+(t-1)),o=new Image,e=(o.crossOrigin="Anonymous",g.background||(!("Tailwind"!==g.theme&&"Bootstrap5"!==g.theme&&"Fluent"!==g.theme&&"Material3"!==g.theme||"rgba(255,255,255, 0.0)"!==r&&"transparent"!==r)||"TailwindDark"!==g.theme&&"Bootstrap5Dark"!==g.theme&&"FluentDark"!==g.theme&&"Material3Dark"!==g.theme||"rgba(255,255,255, 0.0)"!==r&&"transparent"!==r?"#ffffff":"#000000")),e=(p.fillStyle=e,p.fillRect(0,0,g.availableSize.width,g.availableSize.height),p.font=g.titleSettings.textStyle.size+" Arial",document.getElementById(g.element.id+"_Map_title"));Y.isNullOrUndefined(e)||(p.fillStyle=e.getAttribute("fill"),p.fillText(g.titleSettings.text,parseFloat(e.getAttribute("x")),parseFloat(e.getAttribute("y")))),o.onload=function(){var e;0===t||t===u+1?0===t?(p.setTransform(1,0,0,1,0,0),p.rect(0,h,parseFloat(l.style.width),parseFloat(l.style.height)),p.clip()):p.setTransform(1,0,0,1,m,h):p.setTransform(1,0,0,1,parseFloat(i.style.left)+m,parseFloat(i.style.top)+h),p.drawImage(o,0,0),t===u+1&&"PDF"===y&&(localStorage.setItem("saved-image-example",a.toDataURL("image/jpeg")),e=localStorage.getItem("saved-image-example"),d.pageSettings.orientation=S,e=e.slice(e.indexOf(",")+1),d.pages.add().graphics.drawImage(new _.PdfBitmap(e),0,0,g.availableSize.width-60,g.availableSize.height),g.isExportInitialTileMap=!1,b?(d.save(f+".pdf"),d.destroy()):n(null))},0===t||t===u+1?0===t?o.src=s:setTimeout(function(){var e=document.getElementById(g.element.id+"_Tile_SVG");o.src=window.URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(e)],{type:"image/svg+xml"}))},300):(c.open("GET",i.children[0].getAttribute("src"),!0),c.send(),o.src=i.children[0].getAttribute("src"))}(i);else t.onload=function(){var e;p.drawImage(t,0,0),window.URL.revokeObjectURL(s),"PDF"===y&&(e=a.toDataURL("image/jpeg").replace("image/jpeg","image/octet-stream"),d.pageSettings.orientation=S,e=e.slice(e.indexOf(",")+1),d.pages.add().graphics.drawImage(new _.PdfBitmap(e),0,0,g.availableSize.width-60,g.availableSize.height),b?(d.save(f+".pdf"),d.destroy()):n(null))},t.src=s})},zn.prototype.getModuleName=function(){return"PdfExport"},zn.prototype.destroy=function(){};var En=zn;function zn(){}e.Annotation=Gt,e.Annotations=pn,e.Arrow=Xt,e.BingMap=an,e.Border=a,e.Bubble=y,e.BubbleSettings=Ki,e.CenterPosition=si,e.CircleOption=me,e.ColorMapping=rn,e.ColorMappingSettings=wi,e.ColorValue=de,e.CommonTitleSettings=eo,e.ConnectorLineSettings=vi,e.Coordinate=oe,e.DataLabel=bn,e.DataLabelSettings=fo,e.Font=Jt,e.GeoLocation=ae,e.Highlight=Cn,e.HighlightSettings=Zi,e.ImageExport=Nn,e.InitialMarkerSelectionSettings=ki,e.InitialShapeSelectionSettings=Ei,e.Internalize=st,e.LayerPanel=dn,e.LayerSettings=Lo,e.Legend=On,e.LegendSettings=go,e.Line=Oe,e.LineOption=L,e.MapAjax=Bt,e.MapLocation=T,e.Maps=i,e.MapsAreaSettings=t,e.MapsTooltip=Pn,e.Margin=fi,e.Marker=gn,e.MarkerBase=xo,e.MarkerClusterData=Mi,e.MarkerClusterSettings=Ci,e.MarkerSettings=Co,e.MinMax=ne,e.NavigationLine=vn,e.NavigationLineSettings=Yi,e.PathOption=A,e.PatternOptions=Ce,e.PdfExport=En,e.Point=J,e.Polygon=yn,e.PolygonOption=ge,e.PolygonSetting=Vi,e.PolygonSettings=Wi,e.PolygonTooltipSettings=ui,e.PolylineOption=be,e.Print=In,e.Rect=K,e.RectOption=Q,e.Selection=Mn,e.SelectionSettings=Ai,e.ShapeSettings=So,e.Size=H,e.SubTitleSettings=oo,e.TextOption=se,e.Tile=wo,e.TitleSettings=lo,e.ToggleLegendSettings=mo,e.TooltipSettings=hi,e.Zoom=Tn,e.ZoomSettings=po,e.ZoomToolbarButtonSettings=$t,e.ZoomToolbarSettings=oi,e.ZoomToolbarTooltipSettings=ti,e.acos=ee,e.aitoff=X,e.animate=zt,e.animationComplete=Qo,e.annotationRendering=$o,e.appendShape=s,e.beforePrint=on,e.bubbleClick=Yo,e.bubbleMouseMove=Jo,e.bubbleRendering=qo,e.calculateBound=te,e.calculateCenterFromPixel=ot,e.calculatePolygonPath=D,e.calculateScale=Tt,e.calculateShapes=Xe,e.calculateSize=I,e.calculateZoomLevel=Zt,e.changeBorderWidth=Lt,e.changeNavaigationLineWidth=Pt,e.checkPropertyPath=Je,e.checkShapeDataFields=Ye,e.click=Io,e.clusterSeparate=je,e.clusterTemplate=ze,e.compareZoomFactor=jt,e.convertElement=Me,e.convertElementFromLabel=we,e.convertGeoToPoint=B,e.convertStringToValue=Pe,e.convertTileLatLongToPoint=R,e.createStyle=ut,e.createSvg=z,e.createTooltip=xt,e.customizeStyle=gt,e.dataLabelRendering=Xo,e.degreesToRadians=j,e.doubleClick=Fo,e.drawBalloon=qe,e.drawCircle=He,e.drawCross=function(e,t,i,o,n){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+o.x+" "+(o.y+i.height/2)+" M "+(o.x-i.width/2)+" "+o.y+" L "+(o.x+i.width/2)+" "+o.y,s(e.renderer.drawPath(t),n)},e.drawDiamond=function(e,t,i,o,n){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+(o.x+i.width/2)+" "+o.y+" L "+o.x+" "+(o.y+i.height/2)+" L "+(o.x-i.width/2)+" "+o.y+" Z",s(e.renderer.drawPath(t),n)},e.drawHorizontalLine=function(e,t,i,o,n){return t.d=" M "+(o.x-i.width/2)+" "+o.y+" L "+(o.x+i.width/2)+" "+o.y,s(e.renderer.drawPath(t),n)},e.drawLine=function(e,t,i){return s(e.renderer.drawLine(t),i)},e.drawPath=function(e,t,i){return s(e.renderer.drawPath(t),i)},e.drawPattern=function(e,t,i,o){for(var n=e.renderer.createPattern(t,"pattern"),a=0,l=i;a<l.length;a++)s(l[a],n);return s(n,o)},e.drawPolygon=function(e,t,i){return s(e.renderer.drawPolygon(t),i)},e.drawPolyline=function(e,t,i){return s(e.renderer.drawPolyline(t),i)},e.drawRectangle=We,e.drawStar=function(e,t,i,o,n){return t.d="M "+(o.x+i.width/3)+" "+(o.y+i.height/2)+" L "+(o.x-i.width/2)+" "+(o.y-i.height/6)+" L "+(o.x+i.width/2)+" "+(o.y-i.height/6)+" L "+(o.x-i.width/3)+" "+(o.y+i.height/2)+" L "+o.x+" "+(o.y-i.height/2)+" L "+(o.x+i.width/3)+" "+(o.y+i.height/2)+" Z",s(e.renderer.drawPath(t),n)},e.drawSymbol=Ct,e.drawSymbols=Te,e.drawTriangle=function(e,t,i,o,n){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+(o.x+i.width/2)+" "+(o.y+i.height/2)+" L "+(o.x-i.width/2)+" "+(o.y+i.height/2)+" Z",s(e.renderer.drawPath(t),n)},e.drawVerticalLine=function(e,t,i,o,n){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+o.x+" "+(o.y+i.height/2),s(e.renderer.drawPath(t),n)},e.elementAnimate=ft,e.filter=Qe,e.findMidPointOfPolygon=$e,e.findPosition=it,e.fixInitialScaleForTile=lt,e.formatValue=Le,e.getClientElement=function(e){return e=document.getElementById(e),Y.isNullOrUndefined(e)?null:e.getClientRects()[0]},e.getDistance=It,e.getElement=F,e.getElementByID=N,e.getElementOffset=Mt,e.getElementsByClassName=mt,e.getFieldData=function(e,t){for(var i=[],o=0,n=e;o<n.length;o++){for(var a=n[o],l={},r=0,s=t;r<s.length;r++){var d=s[r];a[d]&&(l[d]=a[d])}i.push(l)}return i},e.getHexColor=Ot,e.getMousePosition=U,e.getProcessedMarginValue=rt,e.getRatioOfBubble=Ke,e.getShapeData=pt,e.getTargetElement=ct,e.getTemplateFunction=dt,e.getTouchCenter=Nt,e.getTouches=kt,e.getTranslate=nt,e.getValueFromObject=k,e.getZoomTranslate=at,e.isCustomPath=et,e.itemHighlight=tn,e.itemSelection=en,e.layerRendering=Uo,e.legendRendering=Ko,e.load="load",e.loaded="loaded",e.maintainSelection=Re,e.maintainStyleClass=Ge,e.maintainToggleSelection=Ve,e.marker=Ze,e.markerBoundsComparer=Ae,e.markerClick=Ro,e.markerClusterClick=Go,e.markerClusterListHandler=Be,e.markerClusterMouseMove=Wo,e.markerClusterRendering=Do,e.markerColorChoose=Ie,e.markerDragEnd="markerDragEnd",e.markerDragStart=Vo,e.markerMouseMove=Ho,e.markerRendering=Zo,e.markerShapeChoose=ke,e.markerTemplate=De,e.measureText=W,e.measureTextElement=le,e.mergeSeparateCluster=Ue,e.mousedown="mousedown",e.mousemove="mousemove",e.mouseup="mouseup",e.onclick=ko,e.pan=nn,e.panComplete="panComplete",e.processResult=Dt,e.querySelector=C,e.radiansToDegrees=Z,e.removeClass=x,e.removeElement=P,e.renderLegendShape=_t,e.renderTextElement=_e,e.resize=Eo,e.rightClick=No,e.roundTo=q,e.shapeHighlight=Ao,e.shapeRendering=jo,e.shapeSelected=Bo,e.showTooltip=St,e.sinci=$,e.smoothTranslate=Ut,e.stringToNumber=w,e.sum=Ft,e.targetTouches=wt,e.textTrim=tt,e.timeout=bt,e.tooltipRender=zo,e.triggerDownload=ie,e.triggerItemSelectionEvent=yt,e.triggerShapeEvent=ht,e.wordWrap=vt,e.xToCoordinate=V,e.yToCoordinate=G,e.zoomAnimate=Et,e.zoomComplete="zoomComplete",e.zoomIn="zoomIn",e.zoomOut="zoomOut",Object.defineProperty(e,"__esModule",{value:!0})});
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-svg-base"),require("@syncfusion/ej2-data"),require("@syncfusion/ej2-pdf-export")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-svg-base","@syncfusion/ej2-data","@syncfusion/ej2-pdf-export"],t):t((e=e||self).ej={},e.ej2Base,e.ej2SvgBase,e.ej2Data,e.ej2PdfExport)}(this,function(e,Y,E,O,_){"use strict";M=function(e,t){return(M=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var M,L=function(e,t){function i(){this.constructor=e}M(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},H=function(e,t){this.width=e,this.height=t};function w(e,t){return"string"!=typeof e?e:Y.isNullOrUndefined(e)?null:-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10)}function I(e){e.element.style.height=Y.isNullOrUndefined(e.height)?"auto":e.height,e.element.style.width=Y.isNullOrUndefined(e.width)?"auto":e.width,e.element.style.setProperty("display","block");var t=e.element.clientWidth,i=e.element.clientHeight,o="string"==typeof e.element.style.width?w(e.element.style.width,t):e.element.style.width,n="string"==typeof e.element.style.height?w(e.element.style.height,i):e.element.style.height;new H(0,0);return"0px"===e.width||"0%"===e.width||"0%"===e.height||"0px"===e.height?new H(0,0):new H(w(e.width,t)||t||o||600,w(e.height,i)||i||n||(e.isDevice?Math.min(window.innerWidth,window.innerHeight):450))}function z(e){e.renderer=new E.SvgRenderer(e.element.id),e.availableSize=I(e),e.svgObject=e.renderer.createSvg({id:e.element.id+"_svg",width:e.availableSize.width,height:e.availableSize.height}),"0px"!==e.width&&"0%"!==e.width&&"0%"!==e.height&&"0px"!==e.height||(e.svgObject.setAttribute("height","0"),e.svgObject.setAttribute("width","0"))}function U(e,t,i){var o=i.getBoundingClientRect(),n=i.ownerDocument.defaultView.pageXOffset,a=i.ownerDocument.defaultView.pageYOffset,l=i.ownerDocument.documentElement.clientTop,i=i.ownerDocument.documentElement.clientLeft,n=o.left+n-i,i=o.top+a-l;return new T(e-n,t-i)}function j(e){return e*(Math.PI/180)}function Z(e){return e*(180/Math.PI)}function B(e,t,i,o,n){var a,l,r,s=new H(n.mapAreaRect.width,n.mapAreaRect.height),d=n.baseMapBounds.longitude,p=n.baseMapBounds.latitude,h=j(e),m=j(t),c=Y.isNullOrUndefined(n.projectionType)?"Mercator":n.projectionType,u=n.isTileMap?256*Math.pow(2,1):Y.isNullOrUndefined(i)?Math.min(s.width,s.height):Math.min(s.width,s.height)*i;if("Normal"===o.geometryType)y=Y.isNullOrUndefined(i)?t:Math.abs((t-d.min)*i),b=Y.isNullOrUndefined(i)?e:Math.abs((p.max-e)*i);else if("Geographic"===o.geometryType){switch(c){case"Mercator":var g=new J(u/2,u/2),y=g.x+t*(u/360),f=te(Math.sin(j(e)),-.9999,.9999),b=g.y+.5*Math.log((1+f)/(1-f))*-(u/(2*Math.PI));break;case"Winkel3":r=((a=X(m,h)).x+m/(Math.PI/2))/2,l=(a.y+h)/2;break;case"Miller":r=m,l=1.25*Math.log(Math.tan(Math.PI/4+.4*h));break;case"Eckert3":r=2/(S=Math.sqrt(Math.PI*(4+Math.PI)))*m*(1+Math.sqrt(1-4*h*h/(Math.PI*Math.PI))),l=4/S*h;break;case"AitOff":r=(a=X(m,h)).x,l=a.y;break;case"Eckert5":r=m*(1+Math.cos(h))/Math.sqrt(2+Math.PI),l=2*h/Math.sqrt(2+Math.PI);break;case"Equirectangular":r=m,l=h;break;case"Eckert6":for(var S=(1+Math.PI/2)*Math.sin(h),v=1/0,x=0;x<10&&1e-6<Math.abs(v);x++)h-=v=(h+Math.sin(h)-S)/(1+Math.cos(h));S=Math.sqrt(2+Math.PI),r=m*(1+Math.cos(h))/S,l=2*h/S}y="Mercator"===c?y:q(V(n,Z(r)),3),b="Mercator"===c?b:-q(G(n,Z(l)),3)}return new J(y,b)}function D(o,n,a,e){var l="";return!Y.isNullOrUndefined(e)&&1<e.length&&(Array.prototype.forEach.call(e,function(e,t){var i=e.latitude,e=e.longitude,i=o.isTileMap?R(new T(e,i),n,o.tileTranslatePoint,!0):B(i,e,n,a,o);l+=0===t?"M "+i.x+" "+i.y:" L "+i.x+" "+i.y}),l+=" z "),l}function R(e,t,i,o){var t=256*Math.pow(2,t),n=(e.x+180)/360,a=Math.sin(e.y*Math.PI/180),a=.5-Math.log((1+a)/(1-a))/(4*Math.PI),l=e.x,e=e.y;return o&&(l=n*t+.5+i.x,e=a*t+.5+i.y),{x:l,y:e}}function V(e,t){var i=e.baseMapBounds.longitude,e=Y.isNullOrUndefined(e.baseSize)?e.mapAreaRect.width:e.mapAreaRect.width+Math.abs(e.baseSize.width-e.mapAreaRect.width)/2;return Math.round(e*(t-i.min)/(i.max-i.min)*100)/100}function G(e,t){var i=e.baseMapBounds.latitude;return Math.round(e.mapAreaRect.height*(t-i.min)/(i.max-i.min)*100)/100}function X(e,t){var i=Math.cos(t),o=$(ee(i*Math.cos(e/=2)));return new J(2*i*Math.sin(e)*o,Math.sin(t)*o)}function q(e,t){t=Math.pow(10,t);return Math.round(e*t)/t}function $(e){return e/Math.sin(e)}function ee(e){return Math.acos(e)}function te(e,t,i){return Y.isNullOrUndefined(t)||(e=Math.max(e,t)),e=Y.isNullOrUndefined(i)?e:Math.min(e,i)}function ie(e,t,i,o){Y.createElement("a",{attrs:{download:e+"."+t.toLocaleLowerCase(),href:i}}).dispatchEvent(new MouseEvent(o?"click":"move",{view:window,bubbles:!1,cancelable:!0}))}function oe(e,t){this.latitude=e,this.longitude=t}var J=function(e,t){this.x=e,this.y=t},ne=function(e,t){this.min=e,this.max=t},ae=function(e,t){this.latitude=new ne(e.min,e.max),this.longitude=new ne(t.min,t.max)};function W(e,t){var i=document.getElementById("mapsmeasuretext");return null===i&&((i=document.createElement("text")).id="mapsmeasuretext",document.body.appendChild(i)),i.innerText=e,i.style.cssText="position: absolute; font-size: "+("number"==typeof t.size?t.size+"px":t.size)+"; font-weight: "+t.fontWeight+"; font-style: "+t.fontStyle+"; font-family: "+t.fontFamily+"; visibility: hidden; top: -100; left: 0; whiteSpace: nowrap; lineHeight: normal",new H(i.clientWidth,i.clientHeight)}function le(e,t){var i=document.createElement("canvas").getContext("2d");i.font=t.fontStyle+" "+t.fontWeight+" "+("number"==typeof t.size?t.size+"px":t.size)+" "+t.fontFamily;i=i.measureText(e).width,e=parseFloat(t.size)||16;return new H(i,e)}var re,se=function(e,t,i,o,n,a,l){void 0===a&&(a=""),this.transform="",this.baseLine="auto",this.id=e,this.text=n,this.transform=a,this.anchor=o,this.x=t,this.y=i,this.baseLine=l},A=function(e,t,i,o,n,a,l,r){this.id=e,this["fill-opacity"]=n,this["stroke-opacity"]=a,this.fill=t,this.stroke=o,this["stroke-width"]=i,this["stroke-dasharray"]=l,this.d=r},de=function(e,t,i){this.r=e,this.g=t,this.b=i},Q=(L(pe,re=A),pe);function pe(e,t,i,o,n,a,l,r,s){e=re.call(this,e,t,i.width,i.color,o,i.opacity)||this;return e.y=n.y,e.x=n.x,e.height=n.height,e.width=n.width,e.rx=a||0,e.ry=l||0,e.transform=r||"",e["stroke-dasharray"]=s,e["fill-opacity"]=o,e["stroke-opacity"]=i.opacity,e}L(ce,he=A);var he,me=ce;function ce(e,t,i,o,n,a,l,r){e=he.call(this,e,t,i.width,i.color,o,i.opacity,r)||this;return e.cy=a,e.cx=n,e.r=l,e["stroke-dasharray"]=r,e["fill-opacity"]=o,e["stroke-opacity"]=i.opacity,e}L(ye,ue=A);var ue,ge=ye;function ye(e,t,i,o,n,a,l,r){e=ue.call(this,e,i,o,n,a=void 0===a?1:a,l=void 0===l?1:l,r=void 0===r?"":r)||this;return e.points=t,e}L(Se,fe=ge);var fe,be=Se;function Se(e,t,i,o,n,a,l,r){return fe.call(this,e,t,i,o,n,a=void 0===a?1:a,l=void 0===l?1:l,r=void 0===r?"":r)||this}L(xe,ve=A);var ve,L=xe;function xe(e,t,i,o,n,a,l,r){e=ve.call(this,e,i,o,n,a=void 0===a?1:a,l=void 0===l?1:l,r=void 0===r?"":r)||this;return e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e}function Oe(e,t,i,o){this.x1=e,this.y1=t,this.x2=i,this.y2=o}function Ce(e,t,i,o,n,a,l,r,s){void 0===a&&(a="userSpaceOnUse"),void 0===l&&(l="userSpaceOnUse"),void 0===r&&(r=""),void 0===s&&(s=""),this.id=e,this.x=t,this.y=i,this.width=o,this.height=n,this.patternUnits=a,this.patternContentUnits=l,this.patternTransform=r,this.href=s}var T=function(e,t){this.x=e,this.y=t},K=function(e,t,i,o){this.x=e,this.y=t,this.width=i,this.height=o};function _e(e,t,i,o,n){void 0===n&&(n=!1);var a,i={id:e.id,x:e.x,y:e.y,fill:i,"font-size":t.size,"font-style":t.fontStyle,"font-family":t.fontFamily,"font-weight":t.fontWeight,"text-anchor":e.anchor,transform:e.transform,opacity:t.opacity,"dominant-baseline":e.baseLine},l="string"==typeof e.text||"number"==typeof e.text?e.text:n?e.text[e.text.length-1]:e.text[0],r=new E.SvgRenderer(""),s=r.createText(i,l);if(s.style["user-select"]="none",s.style["font-family"]=t.fontFamily,s.style["font-size"]=t.size,s.style["font-weight"]=t.fontWeight,s.style["font-color"]=t.color,s.style["-moz-user-select"]="none",s.style["-webkit-touch-callout"]="none",s.style["-webkit-user-select"]="none",s.style["-khtml-user-select"]="none",s.style["-ms-user-select"]="none",s.style["-o-user-select"]="none","string"!=typeof e.text&&1<e.text.length)for(var d=1,p=e.text.length;d<p;d++)a=W(e.text[d],t).height,a=r.createTSpan({x:e.x,id:e.id,y:e.y+(n?-d*a:d*a)},n?e.text[e.text.length-(d+1)]:e.text[d]),s.appendChild(a);return o.appendChild(s),s}function Me(e,t,i,o,n,a){for(var l=Y.createElement("div",{id:t,className:n.element.id+"_marker_template_element"}),r=(l.style.cssText="position: absolute;pointer-events: auto;",e.length);0<r;)l.appendChild(e[0]),r--;if(!n.isReact||"function"!==a){for(var s=l.innerHTML,d=Object.keys(i),p=RegExp,h=0;h<d.length;h++)"object"==typeof i[d[h]]?s=Pe(s,"",i,n):"latitude"!==d[h].toLowerCase()&&"longitude"!==d[h].toLowerCase()&&(s=s.replace(new p("{{:"+d[h]+"}}","g"),i[d[h].toString()]));l.innerHTML=s}return l}function Le(e,t){t=t.format&&!isNaN(Number(e))?t.intl.getNumberFormat({format:t.format,useGrouping:t.useGroupingSeparator})(Number(e)):e;return t}function Pe(e,t,i,o){for(var n=""===e?t:e,a=""===e?n.split("${"):n.split("{{:"),l=RegExp,r=0;r<a.length;r++)if(-1<a[r].indexOf("}}")&&-1<a[r].indexOf(".")||-1<a[r].indexOf("}")&&-1<a[r].search("."))for(var s,d=""===e?a[r].split("}"):a[r].split("}}"),p=0;p<d.length;p++)-1<d[p].indexOf(".")&&(s=k(i,d[p]).toString(),n=""===e?n.split("${"+d[p]+"}").join(Le(s,o)):n.replace(new l("{{:"+d[p]+"}}","g"),s));return n}function we(e,t,i){for(var o=(Y.isNullOrUndefined(e.childElementCount)?e[0]:e).outerHTML,n=Object.keys(i),a=RegExp,l=0;l<n.length;l++)o=o.replace(new a("{{:"+n[l]+"}}","g"),i[n[l].toString()]);e=Y.createElement("div",{id:t,innerHTML:o});return e.style.position="absolute",e}function Te(e,t,i,o,n,a,l){var r,s,d=n.size,p=n.borderColor,h=parseFloat(n.borderWidth),m=parseFloat(n.borderOpacity),c=n.fill,u=n.dashArray,g={color:p,width:h,opacity:m},n=n.opacity,h=new A(o,c,h,p,n,m,u,"");return d.width="string"==typeof d.width?parseInt(d.width,10):d.width,d.height="string"==typeof d.height?parseInt(d.height,10):d.height,"Circle"===e?(p=(d.width+d.height)/4,m=new me(o,c,g,n,i.x,i.y,p,u),l.renderer.drawCircle(m)):"Rectangle"===e?(r=i.x-d.width/2,s=i.y-d.height/2,p=new Q(o,c,g,n,new K(r,s,d.width,d.height),null,null,"",u),l.renderer.drawRectangle(p)):"Image"===e?(r=i.x-d.width/2,s=i.y-(-1<o.indexOf("cluster")?d.height/2:d.height),Y.merge(h,{href:t,height:d.height,width:d.width,x:r,y:s}),l.renderer.drawImage(h)):Xe(l,e,h,d,i,a)}function k(e,t){if(!Y.isNullOrUndefined(e)&&!Y.isNullOrUndefined(t)){var i=t.replace(/\[/g,".").replace(/\]/g,"").split(".");if(1===i.length)e=e[i[0]];else for(var o=0;o<i.length&&!Y.isNullOrUndefined(e);o++)e=e[i[o]]}return e}function Ie(e,t){var i=!Y.isNullOrUndefined(e.colorValuePath)&&-1<e.colorValuePath.indexOf(".")?k(t,e.colorValuePath).toString():t[e.colorValuePath];return e.fill=Y.isNullOrUndefined(e.colorValuePath)||Y.isNullOrUndefined(i)?e.fill:-1<e.colorValuePath.indexOf(".")?k(t,e.colorValuePath).toString():t[e.colorValuePath],e}function ke(e,t){return Y.isNullOrUndefined(e.shapeValuePath)||Y.isNullOrUndefined(t[e.shapeValuePath])?(Fe(e,t),Ee(e,t)):(Fe(e,t),"Image"===t[e.shapeValuePath]&&Ee(e,t)),e}function Ne(e,t){return-1<e.indexOf(".")?k(t,e).toString():t[e]}function Fe(e,t){Y.isNullOrUndefined(e.shapeValuePath)||(t=Ne(e.shapeValuePath,t),e.shape=Y.isNullOrUndefined(t)||""===t.toString()?e.shape:t)}function Ee(e,t){Y.isNullOrUndefined(e.imageUrlValuePath)||(t=Ne(e.imageUrlValuePath,t),e.imageUrl=Y.isNullOrUndefined(t)?e.imageUrl:t)}function ze(s,d,p,h,m,o,n,a){var c,l,u,r,g,y,f,b=[],S=[],v=0,x=0,O=s.markerClusterSettings.labelStyle,C=0,_=[],M=s.markerClusterSettings,L=p.renderer.createGroup({id:p.element.id+"_LayerIndex_"+h+"_markerCluster"}),P={cancel:!1,name:Do,fill:M.fill,height:M.height,width:M.width,imageUrl:M.imageUrl,shape:M.shape,data:void 0,maps:p,cluster:M,border:M.border},w=p.element.getBoundingClientRect(),T=(p.isTileMap?new Object:nt(p,s,!1),p.isTileMap||(f=p.mapLayerPanel.calculateFactor(s)),!1),I=p.isTileMap?p.tileZoomLevel:p.mapScaleValue;return p.trigger("markerClusterRendering",P,function(e){for(Array.prototype.forEach.call(d.childNodes,function(e,i){var t,o,n,a,l,r;_=[],"hidden"!==e.style.visibility?(c=(y=e).getBoundingClientRect(),_.push(i),Y.isNullOrUndefined(c)||(t=0<p.markerModule.zoomedMarkerCluster.length&&p.markerModule.zoomedMarkerCluster[h]&&p.markerModule.zoomedMarkerCluster[h][i]&&0<p.markerModule.zoomedMarkerCluster[h][i].length||0<p.markerModule.initialMarkerCluster.length&&p.markerModule.initialMarkerCluster[h]&&p.markerModule.initialMarkerCluster[h][i]&&0<p.markerModule.initialMarkerCluster[h][i].length?(p.previousScale<I?p.markerModule.zoomedMarkerCluster:p.markerModule.initialMarkerCluster)[h][i]:null,Y.isNullOrUndefined(t)||0===t.length?Array.prototype.forEach.call(d.childNodes,function(e,t){i+1<=t&&"hidden"!==e.style.visibility&&Ae(e,c,b,_,t)}):Array.prototype.forEach.call(t,function(e){var t;i!==e&&"hidden"!==(t=document.getElementById(p.element.id+"_LayerIndex_"+h+"_MarkerIndex_0_dataIndex_"+e)).style.visibility&&Ae(t,c,b,_,e)}),Be(p,I,h,i,_),v=c.left+c.width/2,x=c.top+c.height,0<b.length&&(_=_.filter(function(e,t,i){return i.indexOf(e)===t}),v-=w.left,x-=p.availableSize.height<=w.height?w.top:w.bottom-w.top,t=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=parseInt(e.id.split("_MarkerIndex_")[1].split("_")[0],10),l=(a=s.markerSettings[o]).dataSource[t],r=Y.isNullOrUndefined(a.longitudeValuePath)?Y.isNullOrUndefined(l.longitude)?Y.isNullOrUndefined(l.Longitude)?0:parseFloat(l.Longitude):parseFloat(l.longitude):Number(k(l,a.longitudeValuePath)),l=Y.isNullOrUndefined(a.latitudeValuePath)?Y.isNullOrUndefined(l.latitude)?Y.isNullOrUndefined(l.Latitude)?0:parseFloat(l.Latitude):parseFloat(l.latitude):Number(k(l,a.latitudeValuePath)),p.isTileMap?p.isTileMap&&!p.zoomSettings.enable&&(n=R(new J(r,l),p.tileZoomLevel,p.tileTranslatePoint,!0)):n=B(l,r,f,s,p),e.style.visibility="hidden",P.cancel?(g={size:new H(M.width,M.height),fill:M.fill,borderColor:M.border.color,borderWidth:M.border.width,opacity:M.opacity,dashArray:M.dashArray,imageUrl:M.imageUrl,shape:M.shape}).borderOpacity=(Y.isNullOrUndefined(M.border.opacity)?M:M.border).opacity:(g={size:new H(P.width,P.height),fill:P.fill,borderColor:P.border.color,borderWidth:P.border.width,opacity:M.opacity,dashArray:M.dashArray,imageUrl:P.imageUrl,shape:P.shape}).borderOpacity=(Y.isNullOrUndefined(P.border.opacity)?M:P.border).opacity,v=p.isTileMap||-1<d.id.indexOf("_Markers_Group")?v:v+3.75-P.width/2,x=p.isTileMap||-1<d.id.indexOf("_Markers_Group")?x:x-P.height/2,p.isTileMap&&!p.zoomSettings.enable&&(v=n.x,x=n.y),a=p.element.id+"_LayerIndex_"+h+"_MarkerIndex_"+o+"_dataIndex_"+t+"_cluster_"+C,l=p.element.id+"_LayerIndex_"+h+"_MarkerIndex_"+o+"_dataIndex_"+t+"_cluster_"+C+"_datalabel_"+C,C++,(r=Te(g.shape,g.imageUrl,{x:0,y:0},a,g,m,p)).setAttribute("transform","translate( "+v+" "+x+" )"),"Balloon"===P.shape?r.children[0].textContent=_.toString():r.textContent=_.toString(),u=new se(l,0,3.75,"middle",(b.length+1).toString(),"",""),(u=_e(u,O,O.color,m)).setAttribute("transform","translate( "+v+" "+x+" )"),L.appendChild(u),L.appendChild(r))),b=[]):Be(p,I,h,i,_),T=!0}),o.appendChild(L),p.svgObject.appendChild(o),p.element.appendChild(p.svgObject),M.allowDeepClustering&&Array.prototype.forEach.call(L.childNodes,function(e,t){if("hidden"!==e.style.visibility&&(c=(y=e).getBoundingClientRect(),!(Y.isNullOrUndefined(c)||-1<y.id.indexOf("_datalabel_")))){for(var i=t+1;i<L.childElementCount;i++)"hidden"!==L.childNodes[i].style.visibility&&(r=L.childNodes[i],l=r.getBoundingClientRect(),Y.isNullOrUndefined(l)||-1<r.id.indexOf("_datalabel_")||c.left>l.right||c.right<l.left||c.top>l.bottom||c.bottom<l.top||(S.push(r),S.push(L.childNodes[i-1]),L.childNodes[i].style.visibility="hidden",L.childNodes[i-1].style.visibility="hidden",_.push(i)));if(0<S.length){y=e;for(var o=0;o<S.length;o++)"g"===y.tagName?y.childNodes[0].textContent=y.childNodes[0].textContent+","+S[o].textContent:y.textContent=y.textContent+","+S[o].textContent,L.childNodes[t-1].textContent=(+L.childNodes[t-1].textContent+ +S[o+1].textContent).toString(),o++}S=[]}});0<L.childNodes.length;)m.insertBefore(L.childNodes[0],m.firstChild);n||N(p.element.id+"_Secondary_Element").appendChild(m);var t=document.getElementById(p.element.id+"_LayerIndex_"+h+"_Polygon_Group"),i=document.getElementById(p.element.id+"_LayerIndex_"+h+"_Polygons_Group"),t=(Y.isNullOrUndefined(t)&&!p.isTileMap?o.insertBefore(m,o.firstChild):p.isTileMap?Y.isNullOrUndefined(i)?Y.isNullOrUndefined(t)?o.insertBefore(m,o.firstChild):t.insertAdjacentElement("afterend",m):i.insertAdjacentElement("afterend",m):o.appendChild(m),document.getElementById(p.element.id+"_LayerIndex_"+h+"_markerCluster"));Y.isNullOrUndefined(t)||t.remove(),a&&(i=document.getElementById(p.element.id+"_Layer_Collections"),t=document.getElementById(p.element.id+"_LayerIndex_"+(h+1)),Y.isNullOrUndefined(i)||Y.isNullOrUndefined(t)?Y.isNullOrUndefined(i)||i.appendChild(o):i.insertBefore(o,t))}),T}function Be(e,t,i,o,n){var a;1===t?(a=!Y.isNullOrUndefined(e.markerModule.initialMarkerCluster[i][o])&&1<n.length?n:[],e.markerModule.initialMarkerCluster[i][o]=a,a=!Y.isNullOrUndefined(e.markerModule.zoomedMarkerCluster[i][o])&&1<n.length?n:[],e.markerModule.zoomedMarkerCluster[i][o]=a):1<t&&(e.markerModule.zoomedMarkerCluster[i][o]=1<n.length?n:[])}function Ae(e,t,i,o,n){var a=e.getBoundingClientRect();Y.isNullOrUndefined(a)||t.left>a.right||t.right<a.left||t.top>a.bottom||t.bottom<a.top||(i.push(a),e.style.visibility="hidden",o.push(n))}function Ue(e,t){for(var i=e[0].layerIndex,o=e[0].targetClusterIndex,n=e[0].markerIndex,a=e[0].dataIndex,l=t.element.id+"_LayerIndex_"+i+"_MarkerIndex_"+n,r=t.layers[i].markerSettings[n],a=l+"_dataIndex_"+a+"_cluster_"+o,s="Balloon"===t.layers[i].markerClusterSettings.shape?F(a+"_Group"):F(a),a=F(a+"_datalabel_"+o),d=(s.setAttribute("visibility","visible"),a.setAttribute("visibility","visible"),e[0].data.length),p=0;p<d;p++)("Balloon"===r.shape&&Y.isNullOrUndefined(r.template)?F(l+"_dataIndex_"+e[0].data[p].index+"_Group"):F(l+"_dataIndex_"+e[0].data[p].index)).style.visibility="hidden";P(t.element.id+"_LayerIndex_"+i+"_MarkerIndex_"+n+"_markerClusterConnectorLine")}function je(e,t,i,o){for(var n=e[0].layerIndex,a=e[0].markerIndex,l=e[0].targetClusterIndex,r=e[0].dataIndex,s=o?F:i.querySelector.bind(i),d=o?"":"#",p=t.element.id+"_LayerIndex_"+n+"_MarkerIndex_"+a,h=t.layers[n].markerSettings[a],m=p+"_dataIndex_"+r+"_cluster_"+l,c="Balloon"===t.layers[n].markerClusterSettings.shape?s(d+m+"_Group"):s(d+m),m=s(d+m+"_datalabel_"+l),u=(c.setAttribute("visibility","hidden"),m.setAttribute("visibility","hidden"),"Balloon"===h.shape&&Y.isNullOrUndefined(h.template)?s(d+p+"_dataIndex_"+r+"_Group"):s(d+p+"_dataIndex_"+r)),g=(-1<u.parentElement.id.indexOf("Template_Group")?u.getBoundingClientRect():h).height,y=(-1<u.parentElement.id.indexOf("Template_Group")?u.getBoundingClientRect():h).width,f=+c.getAttribute("transform").split("translate(")[1].trim().split(" ")[0],b=+c.getAttribute("transform").split("translate(")[1].trim().split(" ")[1].split(")")[0].trim(),S=y+5,v=6.28*S,x=0,O=Math.round(v/y),C=(x+=O,e[0].data.length),_=Math.round(g/v*100),M=(C<O?100/C:_)/100*360,L=C<O?45:0,P=1,w="M "+f+" "+b+" ",T="",I=0;I<C;I++){if(x===I||360<=Math.round(L)){for(L=0,v=6.28*(S=(y+5)*++P),O=Math.round(v/g),_=Math.round(g/v*100);_*O<100;)O++;M=_/100*360,x+=O}var k=f+S*Math.sin(2*Math.PI*L/360),N=b+S*Math.cos(2*Math.PI*L/360);T+=w+"L "+k+" "+N+" ",-1<(u="Balloon"===h.shape&&Y.isNullOrUndefined(h.template)?s(d+p+"_dataIndex_"+e[0].data[I].index+"_Group"):s(d+p+"_dataIndex_"+e[0].data[I].index)).parentElement.id.indexOf("Template_Group")&&(u.style.transform="",u.style.left=t.isTileMap?k-y/2+"px":k-y/2-10+"px",u.style.top=t.isTileMap?N-g/2+"px":N-g/2-10+"px"),u.setAttribute("transform","translate( "+k+" "+N+")"),u.style.visibility="visible",L+=M}l=t.layers[n].markerClusterSettings.connectorLineSettings,m={d:T,id:t.element.id+"_LayerIndex_"+n+"_MarkerIndex_"+a+"_dataIndex_"+r+"_markerClusterConnectorLine",stroke:l.color,"fill-opacity":l.opacity,"stroke-opacity":l.opacity,"stroke-width":l.width},i=o?s(t.element.id+"_Markers_Group"):i,c=t.renderer.createGroup({id:t.element.id+"_LayerIndex_"+n+"_MarkerIndex_"+a+"_markerClusterConnectorLine"});c.appendChild(t.renderer.drawPath(m)),"Balloon"===h.shape?i.insertBefore(c,i.querySelector("#"+p+"_dataIndex_0_Group")):i.insertBefore(c,i.querySelector("#"+p+"_dataIndex_0"))}function Ze(e,t,i,o,n,a,l,r,s,d,p){var h={size:new H(e.width,e.height),fill:e.fill,borderColor:e.border.color,borderWidth:e.border.width,opacity:t.opacity,dashArray:t.dashArray,borderOpacity:(Y.isNullOrUndefined(e.border.opacity)?t:e.border).opacity},e=(P(l),Te(e.shape,e.imageUrl,{x:0,y:0},l,h,p,d)),l=(d.isTileMap?n.x:(n.x+a.x)*s)+(Y.isNullOrUndefined(r)||Y.isNullOrUndefined(r.x)?0:r.x),h=(d.isTileMap?n.y:(n.y+a.y)*s)+(Y.isNullOrUndefined(r)||Y.isNullOrUndefined(r.y)?0:r.y),a=(e.setAttribute("transform","translate( "+l+" "+h+" )"),Re(d.selectedMarkerElementId,d.markerSelectionClass,e,"MarkerselectionMapStyle"),d.legendSettings.toggleLegendSettings.enable&&"Markers"===d.legendSettings.type&&(n=parseInt(e.id.split("_LayerIndex_")[1],10),Ve(d.toggledElementId,"g"===e.tagName?e.children[0]:e,d.legendSettings.toggleLegendSettings.applyShapeSettings?d.layers[n].shapeSettings:d.legendSettings.toggleLegendSettings)),p.appendChild(e),i.length-1===o?"marker":null),s=new J(l,h);return(0<t.animationDuration||"Enable"===Y.animationMode)&&ft(e,t.animationDelay,t.animationDuration,s,d,a),p}function De(e,t,i,o,n,a,l,r,s,d,p){if((t=dt(e.template,p))&&t(o,p,e.template,p.element.id+"_MarkerTemplate"+n,!1).length){for(var h=Me(t(o,p,e.template,p.element.id+"_MarkerTemplate"+n,!1),i,o,0,p,typeof e.template),m=0;m<h.children.length;m++)h.children[m].style.pointerEvents="auto";h.style.left=(p.isTileMap?l.x:(l.x+r.x)*s)+d.x-p.mapAreaRect.x+"px",h.style.top=(p.isTileMap?l.y:(l.y+r.y)*s)+d.y-p.mapAreaRect.y+"px",a.appendChild(h)}return a}function Re(e,t,i,o){if(e)for(var n=0;n<e.length;n++)i.getAttribute("id")===e[n]&&(0!==n&&"g"!==i.tagName||(Y.isNullOrUndefined(t)||Y.isNullOrUndefined(t.id)||document.body.appendChild(t),-1<i.id.indexOf("_MarkerIndex_")&&0<i.childElementCount&&i.children[0].setAttribute("class",o)),i.setAttribute("class",o))}function Ve(e,t,i){if(!Y.isNullOrUndefined(e)&&0<e.length)for(var o=0;o<e.length;o++)e[o]===t.id&&(t.setAttribute("fill",i.fill),t.setAttribute("stroke",i.border.color),t.setAttribute("fill-opacity",i.opacity.toString()),t.setAttribute("stroke-opacity",(Y.isNullOrUndefined(i.border.opacity)?i:i.border).opacity.toString()),t.setAttribute("stroke-width",(Y.isNullOrUndefined(i.border.width)?0:i.border.width).toString()))}function Ge(e,t,i,o,n,a,l){F(e)||((e=Y.createElement("style",{id:e})).innerText="."+t+"{fill:"+i+";opacity:"+o+";stroke-width:"+a+";stroke:"+n+";}",l.shapeSelectionClass=e,document.body.appendChild(e))}function s(e,t){return t&&t.appendChild(e),e}function He(e,t,i){return s(e.renderer.drawCircle(t),i)}function We(e,t,i){return s(e.renderer.drawRectangle(t),i)}function Xe(e,t,i,o,n,a){var l;switch(t){case"Balloon":l=qe(e,i,o,n,"Marker",a);break;case"Cross":i.d="M "+n.x+" "+(n.y-o.height/2)+" L "+n.x+" "+(n.y+o.height/2)+" M "+(n.x-o.width/2)+" "+n.y+" L "+(n.x+o.width/2)+" "+n.y;break;case"Diamond":i.d="M "+n.x+" "+(n.y-o.height/2)+" L "+(n.x+o.width/2)+" "+n.y+" L "+n.x+" "+(n.y+o.height/2)+" L "+(n.x-o.width/2)+" "+n.y+" Z";break;case"Star":i.d="M "+(n.x+o.width/3)+" "+(n.y+o.height/2)+" L "+(n.x-o.width/2)+" "+(n.y-o.height/6)+" L "+(n.x+o.width/2)+" "+(n.y-o.height/6)+" L "+(n.x-o.width/3)+" "+(n.y+o.height/2)+" L "+n.x+" "+(n.y-o.height/2)+" L "+(n.x+o.width/3)+" "+(n.y+o.height/2)+" Z";break;case"Triangle":i.d="M "+n.x+" "+(n.y-o.height/2)+" L "+(n.x+o.width/2)+" "+(n.y+o.height/2)+" L "+(n.x-o.width/2)+" "+(n.y+o.height/2)+" Z";break;case"HorizontalLine":i.d=" M "+(n.x-o.width/2)+" "+n.y+" L "+(n.x+o.width/2)+" "+n.y;break;case"VerticalLine":i.d="M "+n.x+" "+(n.y-o.height/2)+" L "+n.x+" "+(n.y+o.height/2);break;case"InvertedTriangle":i.d="M "+(n.x-o.width/2)+" "+(n.y-o.height/2)+" L "+(n.x+o.width/2)+" "+(n.y-o.height/2)+" L "+n.x+" "+(n.y+o.height/2)+" Z";break;case"Pentagon":for(var r,s,d=0;d<5;d++)r=o.width/2*Math.cos(Math.PI/180*(72*d)),s=o.height/2*Math.sin(Math.PI/180*(72*d)),i.d+=(0===d?"M ":"L ")+(n.x+r)+" "+(n.y+s);i.d+=" Z"}return"Cross"!==t&&"HorizontalLine"!==t&&"VerticalLine"!==t||(i.stroke="transparent"===i.stroke?i.fill:i.stroke),"Balloon"===t?l:e.renderer.drawPath(i)}function qe(e,t,i,o,n,a){var l=i.width,r=i.height,l=(o.x-=l/2,o.y-=-1<t.id.indexOf("cluster")?r/2:-1<t.id.indexOf("Legend")?r/1.25:r,t.d="M15,0C8.8,0,3.8,5,3.8,11.2C3.8,17.5,9.4,24.4,15,30c5.6-5.6,11.2-12.5,11.2-18.8C26.2,5,21.2,0,15,0z M15,16c-2.8,0-5-2.2-5-5s2.2-5,5-5s5,2.2,5,5S17.8,16,15,16z",e.renderer.drawPath(t)),r=i.width/30,i=i.height/30;return l.setAttribute("transform","translate("+o.x+", "+o.y+") scale("+r+", "+i+")"),"Marker"===n?(s(l,o=e.renderer.createGroup({id:t.id+"_Group"})),s(o,a)):l}function Ye(e,t,i,o,n){if(!Y.isNullOrUndefined(t)&&!Y.isNullOrUndefined(e)&&!Y.isNullOrUndefined(i))for(var a=0;a<e.length;a++){var l=-1<i.indexOf(".")?k(e[a],i):e[a][i],r=Je(l,o,t);if((!Y.isNullOrUndefined(l)&&isNaN(t[r])&&"string"==typeof l?l.toLowerCase():l)===(!Y.isNullOrUndefined(t[r])&&isNaN(t[r])?t[r].toLowerCase():t[r]))return a}return null}function Je(e,t,i){if(!Y.isNullOrUndefined(e)&&!Y.isNullOrUndefined(i)&&!Y.isNullOrUndefined(t))for(var o="[object Array]"===Object.prototype.toString.call(t)?t:[t],n=0;n<o.length;n++)if((Y.isNullOrUndefined(e)||"string"!=typeof e?e:e.toLowerCase())===(!Y.isNullOrUndefined(i[o[n]])&&isNaN(i[o[n]])?i[o[n]].toLowerCase():i[o[n]]))return o[n];return null}function Qe(e,t,i){for(var o=[],n=0;n<e.length;n++){var a=e[n];t<=a.y&&i>=a.y&&o.push(a)}return o}function Ke(e,t,i,o,n){return n===o?(t-e)/100+e:(t-e)/100*(100/(n-o)*(i-o))+e}function $e(e,t,i){if(!e.length)return null;for(var o,n,a,l,r=e.length,s=0,d=0,p=0,h=0;h<=r-1;h++)o=e[h].x,n="Mercator"===t||"Normal"===i?e[h].y:-e[h].y,l=h===r-1?(a=e[0].x,"Mercator"===t||"Normal"===i?e[0].y:-e[0].y):(a=e[h+1].x,"Mercator"===t||"Normal"===i?e[h+1].y:-e[h+1].y),s+=Math.abs(o*l-a*n),d+=Math.abs((o+a)*(o*l-a*n)),p+=Math.abs((n+l)*(o*l-a*n));s*=.5;for(var m=e.some(function(e){return e.x<5&&e.y<5})&&"Normal"===i?6:4,d=0!==s?1/(m*s)*d:0,p=0!==s?1/(m*s)*p:0,c={x:0,y:0},u={x:0,y:0},g={x:0,y:0},y={x:0,y:0},f={x:0,y:0},b={x:0,y:0},S={x:0,y:0},v={x:0,y:0},x=0,h=0;h<=r-1;h++){var O=e[h];O.y="Mercator"===t||"Normal"===i?O.y:-O.y,O.y>p?O.x<d&&d-O.x<d-f.x?f={x:O.x,y:O.y}:O.x>d&&(0===b.x||O.x-d<b.x-d)&&(b={x:O.x,y:O.y}):O.x<d&&d-O.x<d-S.x?S={x:O.x,y:O.y}:O.x>d&&(0===v.x||O.x-d<v.x-d)&&(v={x:O.x,y:O.y}),x=b.y-v.y+(b.y-v.y)/4,O.x>d?O.y<p&&p-O.y<p-c.y?c={x:O.x,y:O.y}:O.y>p&&(0===u.y||O.y-p<u.y-p)&&(u={x:O.x,y:O.y}):O.y<p&&p-O.y<p-g.y?g={x:O.x,y:O.y}:O.y>p&&(0===y.y||O.y-p<y.y-p)&&(y={x:O.x,y:O.y})}return{x:d,y:p,rightMin:c,rightMax:u,leftMin:g,leftMax:y,points:e,topMax:v,topMin:S,bottomMax:b,bottomMin:f,height:x}}function et(e){var t=!1;return"[object Array]"===Object.prototype.toString.call(e)&&Array.prototype.forEach.call(e,function(e){Y.isNullOrUndefined(e.geometry)||"Path"!==e.geometry.type||(t=!0)}),t}function tt(e,t,i,o,n,a){var l=t;if(e<(o=Y.isNullOrUndefined(o)?(n?le:W)(t,i).width:o))for(var r=t.length-1;0<=r;--r)if((o=(n?le:W)(l=t.substring(0,r)+"...",i).width)<=e||l.length<4)return l.length<4&&(l=" "),Y.isNullOrUndefined(a)||a.push(o),l;return Y.isNullOrUndefined(a)||a.push(o),l}function it(e,t,i,o){var n;switch(t){case"Near":n=e.x;break;case"Center":n="title"===o?e.width/2-i.width/2:e.x+e.width/2-i.width/2;break;case"Far":n="title"===o?e.width-e.y-i.width:e.x+e.width-i.width}t="title"===o?e.y+i.height/2:e.y+e.height/2+i.height/2;return new J(n,t)}function P(e){e=document.getElementById(e);return e?Y.remove(e):null}function ot(e,t){var i=B(e.minLatOfGivenLocation,e.minLongOfGivenLocation,e.mapLayerPanel.calculateFactor(t),t,e),t=B(e.maxLatOfGivenLocation,e.maxLongOfGivenLocation,e.mapLayerPanel.calculateFactor(t),t,e),e=(i.x+t.x)/2,i=(i.y+t.y)/2;return new J(e,i)}function nt(e,t,i){var o,n,a,l,r=e.zoomSettings.zoomFactor,s=e.centerPosition,d=s.latitude,p=s.longitude,h=!Y.isNullOrUndefined(e.centerLatOfGivenLocation)&&!Y.isNullOrUndefined(e.centerLongOfGivenLocation)&&e.zoomNotApplied,m=(Y.isNullOrUndefined(e.mapScaleValue)&&(e.mapScaleValue=r),e.zoomSettings.shouldZoomInitially&&e.zoomSettings.enable&&(e.mapScaleValue=n=r=(e.zoomSettings.shouldZoomInitially||e.enablePersistence)&&1===e.scale?e.scale:Y.isNullOrUndefined(e.markerZoomFactor)?1:e.markerZoomedState?e.markerZoomFactor:parseInt(e.scale.toString()),e.markerZoomedState&&e.mapScaleValue!==e.markerZoomFactor&&!e.enablePersistence&&(e.mapScaleValue=r=e.markerZoomFactor),!e.markerZoomedState||Y.isNullOrUndefined(e.markerCenterLatitude)||Y.isNullOrUndefined(e.markerCenterLongitude)||(d=e.markerCenterLatitude,p=e.markerCenterLongitude)),h&&(e.mapScaleValue=n=r=e.scaleOfGivenLocation),Y.isNullOrUndefined(e.baseMapRectBounds)?null:e.baseMapRectBounds.min),c=Y.isNullOrUndefined(e.baseMapRectBounds)?null:e.baseMapRectBounds.max,u=i?1:e.mapScaleValue,g=(Y.isNullOrUndefined(e.currentShapeDataLength)&&!Y.isNullOrUndefined(t.shapeData)&&(e.currentShapeDataLength=Y.isNullOrUndefined(t.shapeData.features)?Y.isNullOrUndefined(t.shapeData.geometries)?0:t.shapeData.geometries.length:t.shapeData.features.length),e.totalRect&&e.legendSettings.visible?e.totalRect:e.mapAreaRect),y=e.availableSize;return Y.isNullOrUndefined(m)||Y.isNullOrUndefined(c)||(o=Math.abs(c.x-m.x),c=Math.abs(m.y-c.y),i=i?1:1===e.markerZoomFactor?e.mapScaleValue:r,s=e.zoomSettings.shouldZoomInitially&&e.markerZoomedState&&!e.zoomPersistence?e.markerZoomCenterPoint:e.centerPosition,!Y.isNullOrUndefined(p)&&0!==p&&!Y.isNullOrUndefined(d)&&0!==d||h?(r=((o+Math.abs(e.mapAreaRect.width-o))/2+e.mapAreaRect.x)/i,s=((c+Math.abs(e.mapAreaRect.height-c))/2+e.mapAreaRect.y)/i,i=h?ot(e,t):B(d,p,e.mapLayerPanel.calculateFactor(t),t,e),n=Y.isNullOrUndefined(e.previousProjection)||e.previousProjection!==e.projectionType||e.isMarkerZoomCompleted?(a=-i.x+r,l=-i.y+s,u):(1!==Math.floor(e.scale)&&e.zoomSettings.shouldZoomInitially||e.zoomNotApplied?(a=-i.x+r,l=-i.y+s):e.zoomSettings.shouldZoomInitially||e.zoomNotApplied?(a=-i.x+r,l=-i.y+s,n=u):(a=e.zoomTranslatePoint.x,l=e.zoomTranslatePoint.y),e.mapScaleValue)):Y.isNullOrUndefined(e.previousProjection)||e.previousProjection!==e.projectionType?(0!==c&&0!==o&&c!==o||(o=g.width/2,c=g.height),n=parseFloat(Math.min(g.width/o,g.height/c).toFixed(2)),h=0!==m.x&&"layers"===e.translateType?y.width-g.width:0,a=g.x+(-m.x+(g.width/2-(o*=n=1.05<n?1:n)/2))-h,l=g.y+(-m.y+(g.height/2-(c*=n)/2)),e.previousTranslate=new J(a,l)):e.zoomSettings.shouldZoomInitially||1!==e.markerZoomFactor||1!==e.mapScaleValue?(n=e.mapScaleValue<1?e.mapScaleValue+1:e.mapScaleValue,e.mapScaleValue=e.zoomSettings.enable&&1!==e.mapScaleValue?e.mapScaleValue:1,e.currentShapeDataLength!==(Y.isNullOrUndefined(t.shapeData.features)?t.shapeData.geometries:t.shapeData.features).length&&"SubLayer"!==t.type?(d=parseFloat(Math.min(g.height/c,g.width/o).toFixed(2)),l=g.y+(-m.y+(g.height/2-(c*=d)/2)),a=g.x+(-m.x+(g.width/2-(o*=n=d)/2))):e.availableSize.height===e.heightBeforeRefresh&&e.widthBeforeRefresh===e.availableSize.width||Y.isNullOrUndefined(e.translatePoint)||Y.isNullOrUndefined(e.previousTranslate)?Y.isNullOrUndefined(e.previousProjection)||!(1===e.mapScaleValue||e.mapScaleValue<=1.05)||e.zoomModule.isDragZoom?(a=e.zoomTranslatePoint.x,l=e.zoomTranslatePoint.y,n=e.scale):(n=parseFloat(Math.min(g.width/o,g.height/c).toFixed(2)),a=g.x+(-m.x+(g.width/2-(o*=n=1.05<n?1:n)/2)),l=g.y+(-m.y+(g.height/2-(c*=n)/2))):(p=parseFloat(Math.min(g.width/o,g.height/c).toFixed(2)),r=o,i=c,s=g.x+(-m.x+(g.width/2-(r*=p)/2)),u=g.y+(-m.y+(g.height/2-(i*=p)/2)),y=(e.translatePoint.x-e.previousTranslate.x)/e.widthBeforeRefresh,h=(e.translatePoint.y-e.previousTranslate.y)/e.heightBeforeRefresh,a=s+y*e.availableSize.width,l=u+h*e.availableSize.height,e.previousTranslate=new J(s,u),e.zoomTranslatePoint.x=a,e.zoomTranslatePoint.y=l)):(n=parseFloat(Math.min(g.width/o,g.height/c).toFixed(2)),l=g.y+(-m.y+(g.height/2-(c*=n)/2)),a=g.x+(-m.x+(g.width/2-(o*=n)/2))),Y.isNullOrUndefined(e.translatePoint))||(a=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:a,l=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:l),n=e.enablePersistence?1<=e.mapScaleValue?e.mapScaleValue:1:n,e.widthBeforeRefresh=e.availableSize.width,e.heightBeforeRefresh=e.availableSize.height,{scale:n,location:new J(a,l)}}function at(e,t,i){var o,n,a=e.zoomSettings.zoomFactor,l=e.centerPosition,r=l.latitude,l=l.longitude,s=!Y.isNullOrUndefined(e.centerLongOfGivenLocation)&&!Y.isNullOrUndefined(e.centerLatOfGivenLocation)&&e.zoomNotApplied,d=(Y.isNullOrUndefined(e.previousCenterLatitude)&&Y.isNullOrUndefined(e.previousCenterLongitude)?(e.previousCenterLatitude=e.centerPosition.latitude,e.previousCenterLongitude=e.centerPosition.longitude):e.previousCenterLatitude!==e.centerPosition.latitude&&e.previousCenterLongitude!==e.centerPosition.longitude?(e.centerPositionChanged=!0,e.previousCenterLatitude=e.centerPosition.latitude,e.previousCenterLongitude=e.centerPosition.longitude):e.centerPositionChanged=!1,(Y.isNullOrUndefined(e.mapScaleValue)||a>e.mapScaleValue)&&(e.isReset&&1===e.mapScaleValue?e.mapScaleValue=e.mapScaleValue:!Y.isNullOrUndefined(e.mapScaleValue)&&e.mapScaleValue<=e.scale?e.mapScaleValue=e.scale:e.mapScaleValue=a),e.mapScaleValue=1!==e.zoomSettings.zoomFactor&&e.zoomSettings.zoomFactor===e.mapScaleValue||e.zoomSettings.zoomFactor===e.mapScaleValue||e.centerPositionChanged?e.zoomSettings.zoomFactor:e.mapScaleValue,e.zoomSettings.shouldZoomInitially&&!e.isZoomByPosition&&(e.mapScaleValue=a=b=(e.enablePersistence||e.zoomSettings.shouldZoomInitially)&&1===e.scale?e.scale:Y.isNullOrUndefined(e.markerZoomFactor)?e.mapScaleValue:e.markerZoomFactor,a=e.mapScaleValue,Y.isNullOrUndefined(e.markerCenterLatitude)||Y.isNullOrUndefined(e.markerCenterLongitude)||(r=e.markerCenterLatitude,l=e.markerCenterLongitude)),s&&(e.mapScaleValue=b=a=e.scaleOfGivenLocation),i?1:e.mapScaleValue),p=e.mapAreaRect,h=e.baseMapRectBounds.min,m=e.baseMapRectBounds.max,c=i?1:e.mapScaleValue,u=Math.abs(m.x-h.x),m=Math.abs(h.y-m.y);if(!Y.isNullOrUndefined(l)&&0!==l&&!Y.isNullOrUndefined(r)&&0!==r||s){var g=(m+Math.abs(e.mapAreaRect.height-m))/2/c,y=(u+Math.abs(e.mapAreaRect.width-u))/2/c,c=s?ot(e,t):B(r,l,e.mapLayerPanel.calculateFactor(t),t,e);Y.isNullOrUndefined(e.zoomTranslatePoint)&&Y.isNullOrUndefined(e.previousProjection)||e.zoomNotApplied?(o=-c.x+y+e.mapAreaRect.x/d,n=-c.y+g+e.mapAreaRect.y/d):e.previousProjection!==e.projectionType?(o=-c.x+y,n=-c.y+g):(e.isZoomByPosition&&(e.zoomTranslatePoint.x=-c.x+y,e.zoomTranslatePoint.y=-c.y+g),o=e.zoomTranslatePoint.x,n=e.zoomTranslatePoint.y,a=d),Y.isNullOrUndefined(e.translatePoint)||(n=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:n,o=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:o),b=0!==a?a:1}else{var s=0===e.zoomSettings.zoomFactor?1:e.zoomSettings.zoomFactor,f=e.zoomSettings.maxZoom,b=s=f<s?f:s,r=0===e.mapScaleValue?1:e.mapScaleValue>f?f:e.mapScaleValue,y=p.x+(-h.x+(p.width/2-u/2)),g=p.y+(-h.y+(p.height/2-m/2));if(!Y.isNullOrUndefined(e.zoomTranslatePoint)||!Y.isNullOrUndefined(e.previousProjection))if(e.previousProjection!==e.projectionType){var S=[];S.push({x:y,y:g});for(var v=1;v<f;v++){var x=S[v-1].x-(p.width/v-p.width/(v+1))/2,O=S[v-1].y-(p.height/v-p.height/(v+1))/2;S.push({x:x,y:O})}y=S[s-1].x,g=S[s-1].y}else y=e.zoomTranslatePoint.x,g=e.zoomTranslatePoint.y,s!==r&&(b=r);Y.isNullOrUndefined(e.translatePoint)||(o=e.enablePersistence&&0!==e.translatePoint.x&&!e.zoomNotApplied?e.translatePoint.x:y,n=e.enablePersistence&&0!==e.translatePoint.y&&!e.zoomNotApplied?e.translatePoint.y:g)}return b=e.enablePersistence?0===e.mapScaleValue?1:e.mapScaleValue:b,e.widthBeforeRefresh=e.availableSize.width,e.heightBeforeRefresh=e.availableSize.height,{scale:i?1:b,location:new J(o,n)}}function lt(e){e.tileZoomScale=e.tileZoomLevel=Math.floor(e.availableSize.height/512)+1;var t=256*Math.pow(2,e.tileZoomLevel);e.tileTranslatePoint.x=e.availableSize.width/2-t/2,e.tileTranslatePoint.y=e.availableSize.height/2-t/2+20,e.previousTileWidth=e.availableSize.width,e.previousTileHeight=e.availableSize.height}function N(e){return document.getElementById(e)}function rt(e){return"string"==typeof e?parseFloat(e):e}function st(e,t){return e.formatFunction=e.intl.getNumberFormat({format:e.format,useGrouping:e.useGroupingSeparator}),e.formatFunction(t)}function dt(t,e){var i=null;try{"function"!=typeof t&&document.querySelectorAll(t).length?i=Y.compile(document.querySelector(t).innerHTML.trim()):(e.isVue||e.isVue3||"function"==typeof t)&&(i=Y.compile(t))}catch(e){i=Y.compile(t)}return i}function F(e){return document.getElementById(e)}function pt(e,t){var i,o=parseInt(e.split("_LayerIndex_")[1].split("_")[0],10),e=parseInt(e.split("_shapeIndex_")[1].split("_")[0],10),t=t.layersCollection[o],o=t.layerData[e].property;return{shapeData:o,data:i=t.dataSource?t.dataSource[Ye(t.dataSource,o,t.shapeDataPath,t.shapePropertyPath)]:i}}function ht(e,t,i,o){var n=pt(e,i),a={color:t.border.color,opacity:t.border.opacity,width:t.border.width},l=t.enableMultiSelect?{cancel:!1,name:o,fill:t.fill,opacity:t.opacity,border:a,shapeData:n.shapeData,data:n.data,target:e,maps:i,shapeDataCollection:i.shapeSelectionItem}:{cancel:!1,name:o,fill:t.fill,opacity:t.opacity,border:a,shapeData:n.shapeData,data:n.data,target:e,maps:i};return i.trigger(o,l,function(){l.border.opacity=(Y.isNullOrUndefined(l.border.opacity)?l:l.border).opacity}),l}function mt(e){return document.getElementsByClassName(e)}function C(e,t){var i=null;return i=document.getElementById(t)?document.getElementById(t).querySelector("#"+e):i}function ct(e,t,i,o){for(var n,a=o.layers[e].shapeData.features,l=0;l<a.length;l++)if(a[l].properties.name===t){n=o.element.id+"_LayerIndex_"+e+"_shapeIndex_"+l+"_dataIndex_undefined";break}return F(n)}function ut(e,t,i){e=Y.createElement("style",{id:e});return e.innerText="."+t+"{fill:"+i.fill+";fill-opacity:"+(Y.isNullOrUndefined(i.opacity)?"1":i.opacity.toString())+";stroke-opacity:"+(Y.isNullOrUndefined(i.border.opacity)?"1":i.border.opacity.toString())+";stroke-width:"+i.border.width.toString()+";stroke:"+i.border.color+";}",e}function gt(e,t,i){e=F(e);Y.isNullOrUndefined(e)||(e.innerText="."+t+"{fill:"+i.fill+";fill-opacity:"+(Y.isNullOrUndefined(i.opacity)?"1":i.opacity.toString())+";stroke-width:"+i.border.width.toString()+";stroke-opacity:"+(Y.isNullOrUndefined(i.border.opacity)?"1":i.border.opacity.toString())+";stroke:"+i.border.color+"}")}function yt(t,i,e,o,n){var a={color:t.border.color,width:t.border.width/i.scale,opacity:t.border.opacity},l={opacity:t.opacity,fill:t.fill,border:a,name:en,target:e.id,cancel:!1,shapeData:o,data:n,maps:i};i.trigger("itemSelection",l,function(e){l.border.opacity=(Y.isNullOrUndefined(t.border.opacity)?t:t.border).opacity,i.shapeSelectionItem.push(l.shapeData),F("ShapeselectionMap")?gt("ShapeselectionMap","ShapeselectionMapStyle",l):document.body.appendChild(ut("ShapeselectionMap","ShapeselectionMapStyle",l))})}function x(e){e.removeAttribute("class")}function ft(i,e,t,o,n,a,l){void 0===l&&(l=0);var r=o.x,s=o.y,d=0,p=i.getAttribute("transform")||"";new Y.Animation({}).animate(i,{duration:0===t&&"Enable"===Y.animationMode?1e3:t,delay:e,progress:function(e){var t;e.timeStamp>e.delay&&!n.zoomModule.isPanningInProgress&&(n.isTileMap&&0===d&&(t=document.querySelector(".GroupElement"),Y.isNullOrUndefined(t)||(t.style.display="block")),d=(e.timeStamp-e.delay)/e.duration,i.setAttribute("transform","translate( "+(r-l*d)+" "+(s-l*d)+" ) scale("+d+")"))},end:function(e){n.zoomModule.isPanningInProgress||i.setAttribute("transform",p),n.zoomModule.isPanningInProgress=!1,a&&n.trigger(Qo,{cancel:!1,name:Qo,element:a,maps:n})}})}function bt(e){P(e)}function St(e,t,i,o,n,a,l,r,s){for(var d=U(i,o,r),d=(Y.isNullOrUndefined(d)||(i=d.x,o=d.y),document.getElementById(l)),p=W(e,{fontFamily:"Segoe UI",size:"8px",fontStyle:"Normal",fontWeight:"Regular"}).width,h=e.split(" "),m=h[0].length,c=1;c<h.length;c++)m<h[c].length&&(m=h[c].length);d||((d=Y.createElement("div",{id:l})).style.cssText='background-color: rgb(255, 255, 255) !important; color:black !important; position:absolute;border:1px solid rgb(0, 0, 0); padding-left:5px;font-size:12px; font-family: "Segoe UI"; text-align:center'),i<n-p||(n-p<i&&i<n-8*m?p=n-i:n-8*m<=i&&(p<i?i-=p:(p=i,i=0)));t=t.split("px");vt(d,e,i,o,t,p,n,r),d.clientHeight+2*parseInt(t[0],10)>a&&(p=i,i=0),vt(d,e,i,o,t,p,n,r),s&&setTimeout(bt,5e3,l)}function vt(e,t,i,o,n,a,l,r){e.innerText=t,e.style.top=-1!==e.id.indexOf("_Legend")?(parseInt(n[0],10)+o).toString()+"px":(2*parseInt(n[0],10)).toString()+"px",e.style.left=i.toString()+"px",e.style.width=a.toString()+"px",e.style.maxWidth=l.toString()+"px",e.style.wordWrap="break-word",r.appendChild(e)}function xt(e,t,i,o,n){var a=F(e),l=Ot(n.borderColor),r=Ot(n.fontColor),i="top:"+i.toString()+"px;left:"+o.toString()+"px;color:"+(r?"rgba("+r.r+","+r.g+","+r.b+","+n.fontOpacity+")":n.fontColor)+";background:"+n.fill+";z-index: 2;position:absolute;border:"+n.borderWidth+"px solid "+(l?"rgba("+l.r+","+l.g+","+l.b+","+n.borderOpacity+")":n.borderColor)+";font-family:"+n.fontFamily+";font-style:"+n.fontStyle+";font-weight:"+n.fontWeight+";font-size:"+n.fontSize+";border-radius:"+n.borderWidth+"px;";!a&&n.visible?((a=Y.createElement("div",{id:e})).innerHTML=Y.SanitizeHtmlHelper.sanitize(" "+t+" "),a.style.cssText=i,document.body.appendChild(a)):n.visible&&(a.innerHTML=Y.SanitizeHtmlHelper.sanitize(" "+t+" "),a.style.cssText=i)}function Ot(e){var t,i;return-1!==e.indexOf("#")&&-1===e.toLowerCase().indexOf("rgb")?(i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e))?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null:-1!==e.toLowerCase().indexOf("rgb")?(i=e.match(/\d+/g).map(function(e){return parseInt(e,10)}))?{r:i[0],g:i[1],b:i[2]}:null:((t=document.createElement("div")).style.color=e,i=window.getComputedStyle(document.body.appendChild(t)).color.match(/\d+/g).map(function(e){return parseInt(e,10)}),document.body.removeChild(t),i?{r:i[0],g:i[1],b:i[2]}:null)}function Ct(e,t,i,o,n){var a=new E.SvgRenderer(""),e=_t(e,i,t,n,o);return a["draw"+e.functionName](e.renderOption)}function _t(e,t,i,o,n){var a,l="Path",r=t.width,s=t.height,d=e.x,p=e.y,h=e.x+-r/2,m=e.y+-s/2;switch(o.stroke="HorizontalLine"===i||"VerticalLine"===i||"Cross"===i?o.fill:o.stroke,o["stroke-width"]=0!==o["stroke-width"]||"HorizontalLine"!==i&&"VerticalLine"!==i&&"Cross"!==i?o["stroke-width"]:1,i){case"Circle":case"Bubble":l="Ellipse",Y.merge(o,{rx:r/2,ry:s/2,cx:d,cy:p});break;case"VerticalLine":Y.merge(o,{d:a="M "+d+" "+(p+s/2)+" L "+d+" "+(p+-s/2)});break;case"HorizontalLine":Y.merge(o,{d:a="M "+d+" "+p+" L "+(d+r/2)+" "+p});break;case"Diamond":Y.merge(o,{d:a="M "+h+" "+p+" L "+d+" "+(p+-s/2)+" L "+(d+r/2)+" "+p+" L "+d+" "+(p+s/2)+" L "+h+" "+p+" z"});break;case"Rectangle":Y.merge(o,{d:a="M "+h+" "+(p+-s/2)+" L "+(d+r/2)+" "+(p+-s/2)+" L "+(d+r/2)+" "+(p+s/2)+" L "+h+" "+(p+s/2)+" L "+h+" "+(p+-s/2)+" z"});break;case"Triangle":Y.merge(o,{d:a="M "+h+" "+(p+s/2)+" L "+d+" "+(p+-s/2)+" L "+(d+r/2)+" "+(p+s/2)+" L "+h+" "+(p+s/2)+" z"});break;case"InvertedTriangle":Y.merge(o,{d:a="M "+(d+r/2)+" "+(p-s/2)+" L "+d+" "+(p+s/2)+" L "+(d-r/2)+" "+(p-s/2)+" L "+(d+r/2)+" "+(p-s/2)+" z"});break;case"Pentagon":for(var c,u,g=0;g<=5;g++)c=r/2*Math.cos(Math.PI/180*(72*g)),u=r/2*Math.sin(Math.PI/180*(72*g)),a=0===g?"M "+(d+c)+" "+(p+u)+" ":a.concat("L "+(d+c)+" "+(p+u)+" ");a=a.concat("Z"),Y.merge(o,{d:a});break;case"Star":a="M "+(e.x+t.width/3)+" "+(e.y+t.height/2)+" L "+(e.x-t.width/2)+" "+(e.y-t.height/6)+" L "+(e.x+t.width/2)+" "+(e.y-t.height/6)+" L "+(e.x-t.width/3)+" "+(e.y+t.height/2)+" L "+e.x+" "+(e.y-t.height/2)+" L "+(e.x+t.width/3)+" "+(e.y+t.height/2)+" Z",Y.merge(o,{d:a});break;case"Cross":Y.merge(o,{d:a="M "+h+" "+p+" L "+(d+r/2)+" "+p+" M "+d+" "+(p+s/2)+" L "+d+" "+(p+-s/2)});break;case"Image":l="Image",Y.merge(o,{href:n,height:s,width:r,x:h,y:m})}return{renderOption:o,functionName:l}}function Mt(e,t){t.appendChild(e);var i=e.offsetWidth,o=e.offsetHeight;return t.removeChild(e),new H(i,o)}function Lt(e,t,i,o){for(var n,a=0;a<e.childElementCount;a++)if(-1<(n=e.childNodes[a]).id.indexOf("_NavigationGroup"))Pt(n,t,i,o);else if(-1<n.id.indexOf("_Polygons_Group"))for(var l=0;l<n.childElementCount;l++){var r=o.layersCollection[t].polygonSettings.polygons[parseInt(n.children[l].id.split("_PolygonIndex_")[1])].borderWidth;n.children[l].setAttribute("stroke-width",(r/i).toString())}else{var s,d=void 0,p=o.layersCollection[t].shapeSettings.borderWidthValuePath,h=o.layersCollection[t].shapeSettings.border.width,m=o.layersCollection[t].shapeSettings.circleRadius,d=o.layersCollection[t].shapeSettings.borderWidthValuePath&&null!==(s=Ye(o.layersCollection[t].dataSource,o.layersCollection[t].layerData[a].property,o.layersCollection[t].shapeDataPath,o.layersCollection[t].shapePropertyPath,o.layersCollection[t]))&&o.layersCollection[t].dataSource[s][p]||(Y.isNullOrUndefined(h)?0:h);n.setAttribute("stroke-width",(d/i).toString()),(-1<e.id.indexOf("_Point")||-1<e.id.indexOf("_MultiPoint"))&&n.setAttribute("r",(m/i).toString())}}function Pt(e,t,i,o){for(var n,a,l=0;l<e.childElementCount;l++)"path"===(a=e.childNodes[l]).tagName&&(n=o.layersCollection[t].navigationLineSettings[parseFloat(a.id.split("_NavigationIndex_")[1].split("_")[0])].width,a.setAttribute("stroke-width",(n/i).toString()))}function wt(e){for(var t=[],i=e.touches,o=0;o<i.length;o++)t.push({pageX:i[o].pageX,pageY:i[o].pageY});return t}function Tt(e,t){e=It(e[0],e[1]);return It(t[0],t[1])/e}function It(e,t){var i=e.pageX-t.pageX,e=e.pageY-t.pageY;return Math.sqrt(i*i+e*e)}function kt(e,t){var t=t.element.getBoundingClientRect(),i=t.top+document.defaultView.pageXOffset,o=t.left+document.defaultView.pageYOffset;return Array.prototype.slice.call(e).map(function(e){return{x:e.pageX-o,y:e.pageY-i}})}function Nt(e){return{x:e.map(function(e){return e.x}).reduce(Ft)/e.length,y:e.map(function(e){return e.y}).reduce(Ft)/e.length}}function Ft(e,t){return e+t}function Et(e,t,i,o,n,a,l){var r,s,d,p,h,m,c,u,g=l.previousPoint,y=l.previousScale,f=n-y,b=new T(0,0);n===y?e.setAttribute("transform","scale( "+n+" ) translate( "+o.x+" "+o.y+" )"):(h=o,d=(m=g).x===h.x?null:(h.y-m.y)/(h.x-m.x),h=g,p=null===(m=d)?h.x:h.y-m*h.x,c=o.x-g.x,u=o.y-g.y,zt(e,0,i,function(e){e.timeStamp>e.delay&&(r=(e.timeStamp-e.delay)/e.duration,s=y+r*f,b.x=g.x+r*c/(s/n),b.y=null==d?g.y+r*u:d*b.x+p,e.element.setAttribute("transform","scale( "+s+" ) translate( "+b.x+" "+b.y+" )"),l.translatePoint=b,l.scale=s,l.zoomModule.processTemplate(o.x,o.y,s,l))},function(){l.translatePoint=o,l.scale=n,e.setAttribute("transform","scale( "+n+" ) translate( "+o.x+" "+o.y+" )"),l.zoomModule.processTemplate(o.x,o.y,n,l)}))}function zt(t,e,i,o,n){function a(e){(e-=r=r||e)<i?(o.call(l,{element:t,delay:0,timeStamp:e,duration:i}),window.requestAnimationFrame(a)):(window.cancelAnimationFrame(s),n.call(l,{element:t}),-1<t.id.indexOf("Marker")&&(N(t.id.split("_Layer")[0]+"_Markers_Group").style.cssText="visibility:visible"))}var l=this,r=null,s=(i="Disable"===Y.animationMode?0:i,window.requestAnimationFrame(a))}function Bt(e,t,i,o,n){this.dataOptions=e,this.type=t||"GET",this.async=i||!0,this.contentType=o,this.sendData=n}var At;function Ut(e,t,i,o){var n,a=e.getAttribute("transform").split(" "),l=(2===a.length&&(a[2]=a[1].split(")")[0],a[1]=a[0].split("(")[1]),new T(parseInt(a[1],10),parseInt(a[2],10))),r=o.x-l.x,s=o.y-l.y,d=new T(0,0);zt(e,0,i,function(e){e.timeStamp>e.delay&&(n=(e.timeStamp-e.delay)/e.duration,d.x=l.x+n*r,d.y=l.y+n*s,e.element.setAttribute("transform","translate( "+d.x+" "+d.y+" )"))},function(){e.setAttribute("transform","translate( "+o.x+" "+o.y+" )")})}function jt(e,t){var i=Y.isNullOrUndefined(t.shouldZoomPreviousFactor)?null:t.shouldZoomPreviousFactor,o=Y.isNullOrUndefined(t.shouldZoomCurrentFactor)?null:t.shouldZoomCurrentFactor;Y.isNullOrUndefined(o)?!Y.isNullOrUndefined(i)&&Y.isNullOrUndefined(o)&&t.shouldZoomPreviousFactor!==e?t.shouldZoomCurrentFactor=e:t.shouldZoomPreviousFactor=e:(t.shouldZoomCurrentFactor=null,t.shouldZoomPreviousFactor=null)}function Zt(e,t,i,o,n,a,l,r){var s,d=l.zoomSettings.maxZoom,p=Math.sin(t*Math.PI/180),p=Math.log((1+p)/(1-p))/2,p=Math.max(Math.min(p,Math.PI),-Math.PI)/2,h=Math.sin(e*Math.PI/180),h=Math.log((1+h)/(1-h))/2,h=Math.max(Math.min(h,Math.PI),-Math.PI)/2,t=(l.zoomNotApplied&&!l.isTileMap&&(t=Math.abs((l.baseMapBounds.latitude.max-l.baseMapBounds.latitude.min)/(t-e)),e=Math.abs((l.baseMapBounds.longitude.max-l.baseMapBounds.longitude.min)/(o-i)),s=r?(t+e)/2:Math.min(t,e)),(p-h)/Math.PI),e=o-i,p=(e<0?360+e:e)/360,h=Math.log(a/256/t)/Math.LN2,o=Math.log(n/256/p)/Math.LN2,i=l.zoomNotApplied&&!l.isTileMap?s:r&&!l.isTileMap?(h+o)/2:Math.min(h,o),e=Math.min(i,d);return e=l.isTileMap||!l.zoomNotApplied?Math.floor(e):e,l.isTileMap||jt(e,l),e}function Dt(e){var t,e=Y.isNullOrUndefined(e.result)?e.actual:e.result;return Y.isNullOrUndefined(e.length)?Y.isNullOrUndefined(e.Items)||(t=e.Items):t=e,t}(t=At=At||{}).mapsTitleFont={size:"14px",fontWeight:null,color:"#424242",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},t.mapsSubTitleFont={size:"13px",fontWeight:null,color:"#424242",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},t.tooltipLabelFont={size:"12px",fontWeight:"Regular",color:null,fontStyle:"Regular",fontFamily:null},t.legendTitleFont={size:"12px",fontWeight:"Medium",color:null,fontStyle:"Medium",fontFamily:null},t.legendLabelFont={size:"13px",fontWeight:"Medium",color:null,fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"},t.dataLabelFont={size:null,fontWeight:"Medium",color:"#000000",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"};Rt=function(e,t){return(Rt=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var Rt,Vt,t=function(e,t){function i(){this.constructor=e}Rt(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},i=function(e,t,i,o){var n,a=arguments.length,l=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;0<=r;r--)(n=e[r])&&(l=(a<3?n(l):3<a?n(t,i,l):n(t,i))||l);return 3<a&&l&&Object.defineProperty(t,i,l),l},Gt=(Vt=Y.ChildProperty,t(Ht,Vt),i([Y.Property("")],Ht.prototype,"content",void 0),i([Y.Property("0px")],Ht.prototype,"x",void 0),i([Y.Property("0px")],Ht.prototype,"y",void 0),i([Y.Property("None")],Ht.prototype,"verticalAlignment",void 0),i([Y.Property("None")],Ht.prototype,"horizontalAlignment",void 0),i([Y.Property("-1")],Ht.prototype,"zIndex",void 0),Ht);function Ht(){return null!==Vt&&Vt.apply(this,arguments)||this}Wt=Y.ChildProperty,t(qt,Wt),i([Y.Property("Start")],qt.prototype,"position",void 0),i([Y.Property("false")],qt.prototype,"showArrow",void 0),i([Y.Property(2)],qt.prototype,"size",void 0),i([Y.Property("black")],qt.prototype,"color",void 0),i([Y.Property(0)],qt.prototype,"offSet",void 0);var Wt,Xt=qt;function qt(){return null!==Wt&&Wt.apply(this,arguments)||this}Yt=Y.ChildProperty,t(Qt,Yt),i([Y.Property(null)],Qt.prototype,"size",void 0),i([Y.Property(null)],Qt.prototype,"color",void 0),i([Y.Property("Roboto, Noto, Sans-serif")],Qt.prototype,"fontFamily",void 0),i([Y.Property("Medium")],Qt.prototype,"fontWeight",void 0),i([Y.Property("Medium")],Qt.prototype,"fontStyle",void 0),i([Y.Property(1)],Qt.prototype,"opacity",void 0);var Yt,Jt=Qt;function Qt(){return null!==Yt&&Yt.apply(this,arguments)||this}Kt=Y.ChildProperty,t(o,Kt),i([Y.Property("transparent")],o.prototype,"fill",void 0),i([Y.Property(null)],o.prototype,"color",void 0),i([Y.Property(1)],o.prototype,"borderOpacity",void 0),i([Y.Property(1)],o.prototype,"borderWidth",void 0),i([Y.Property(null)],o.prototype,"borderColor",void 0),i([Y.Property(null)],o.prototype,"radius",void 0),i([Y.Property(null)],o.prototype,"selectionColor",void 0),i([Y.Property(null)],o.prototype,"highlightColor",void 0),i([Y.Property(5)],o.prototype,"padding",void 0),i([Y.Property(1)],o.prototype,"opacity",void 0),i([Y.Property(["ZoomIn","ZoomOut","Reset"])],o.prototype,"toolbarItems",void 0);var Kt,$t=o;function o(){return null!==Kt&&Kt.apply(this,arguments)||this}ei=Y.ChildProperty,t(n,ei),i([Y.Property(!0)],n.prototype,"visible",void 0),i([Y.Property("white")],n.prototype,"fill",void 0),i([Y.Property(1)],n.prototype,"borderOpacity",void 0),i([Y.Property(1)],n.prototype,"borderWidth",void 0),i([Y.Property("#707070")],n.prototype,"borderColor",void 0),i([Y.Property("black")],n.prototype,"fontColor",void 0),i([Y.Property("")],n.prototype,"fontFamily",void 0),i([Y.Property("")],n.prototype,"fontStyle",void 0),i([Y.Property("")],n.prototype,"fontWeight",void 0),i([Y.Property("")],n.prototype,"fontSize",void 0),i([Y.Property(1)],n.prototype,"fontOpacity",void 0);var ei,ti=n;function n(){return null!==ei&&ei.apply(this,arguments)||this}ii=Y.ChildProperty,t(ni,ii),i([Y.Property("transparent")],ni.prototype,"backgroundColor",void 0),i([Y.Property(1)],ni.prototype,"borderOpacity",void 0),i([Y.Property(1)],ni.prototype,"borderWidth",void 0),i([Y.Property("transparent")],ni.prototype,"borderColor",void 0),i([Y.Property("Far")],ni.prototype,"horizontalAlignment",void 0),i([Y.Property("Near")],ni.prototype,"verticalAlignment",void 0),i([Y.Property("Horizontal")],ni.prototype,"orientation",void 0),i([Y.Complex({},$t)],ni.prototype,"buttonSettings",void 0),i([Y.Complex({},ti)],ni.prototype,"tooltipSettings",void 0);var ii,oi=ni;function ni(){return null!==ii&&ii.apply(this,arguments)||this}ai=Y.ChildProperty,t(li,ai),i([Y.Property("")],li.prototype,"color",void 0),i([Y.Property(0)],li.prototype,"width",void 0),i([Y.Property(null)],li.prototype,"opacity",void 0);var ai,a=li;function li(){return null!==ai&&ai.apply(this,arguments)||this}ri=Y.ChildProperty,t(di,ri),i([Y.Property(null)],di.prototype,"latitude",void 0),i([Y.Property(null)],di.prototype,"longitude",void 0);var ri,si=di;function di(){return null!==ri&&ri.apply(this,arguments)||this}pi=Y.ChildProperty,t(mi,pi),i([Y.Property(!1)],mi.prototype,"visible",void 0),i([Y.Property("")],mi.prototype,"template",void 0),i([Y.Property("")],mi.prototype,"fill",void 0),i([Y.Complex({color:null,width:1},a)],mi.prototype,"border",void 0),i([Y.Complex({fontFamily:null,size:null,fontWeight:null},Jt)],mi.prototype,"textStyle",void 0),i([Y.Property(null)],mi.prototype,"format",void 0),i([Y.Property(null)],mi.prototype,"valuePath",void 0),i([Y.Property(2e3)],mi.prototype,"duration",void 0);var pi,hi=mi;function mi(){return null!==pi&&pi.apply(this,arguments)||this}ci=Y.ChildProperty,t(gi,ci),i([Y.Property(!1)],gi.prototype,"visible",void 0),i([Y.Property("")],gi.prototype,"fill",void 0),i([Y.Complex({color:null,width:1},a)],gi.prototype,"border",void 0),i([Y.Complex({fontFamily:null,size:null,fontWeight:null},Jt)],gi.prototype,"textStyle",void 0),i([Y.Property(2e3)],gi.prototype,"duration",void 0);var ci,ui=gi;function gi(){return null!==ci&&ci.apply(this,arguments)||this}yi=Y.ChildProperty,t(bi,yi),i([Y.Property(10)],bi.prototype,"left",void 0),i([Y.Property(10)],bi.prototype,"right",void 0),i([Y.Property(10)],bi.prototype,"top",void 0),i([Y.Property(10)],bi.prototype,"bottom",void 0);var yi,fi=bi;function bi(){return null!==yi&&yi.apply(this,arguments)||this}Si=Y.ChildProperty,t(xi,Si),i([Y.Property("#000000")],xi.prototype,"color",void 0),i([Y.Property(1)],xi.prototype,"width",void 0),i([Y.Property(1)],xi.prototype,"opacity",void 0);var Si,vi=xi;function xi(){return null!==Si&&Si.apply(this,arguments)||this}Oi=Y.ChildProperty,t(l,Oi),i([Y.Property(!1)],l.prototype,"allowClustering",void 0),i([Y.Property(!0)],l.prototype,"allowDeepClustering",void 0),i([Y.Complex({color:"transparent",width:1},a)],l.prototype,"border",void 0),i([Y.Property("#D2691E")],l.prototype,"fill",void 0),i([Y.Property(1)],l.prototype,"opacity",void 0),i([Y.Property("Rectangle")],l.prototype,"shape",void 0),i([Y.Property(12)],l.prototype,"width",void 0),i([Y.Property(12)],l.prototype,"height",void 0),i([Y.Property(new J(0,0))],l.prototype,"offset",void 0),i([Y.Property("")],l.prototype,"imageUrl",void 0),i([Y.Property("")],l.prototype,"dashArray",void 0),i([Y.Complex({},Jt)],l.prototype,"labelStyle",void 0),i([Y.Property(!1)],l.prototype,"allowClusterExpand",void 0),i([Y.Complex({},vi)],l.prototype,"connectorLineSettings",void 0);var Oi,Ci=l;function l(){return null!==Oi&&Oi.apply(this,arguments)||this}_i=Y.ChildProperty,t(Li,_i);var _i,Mi=Li;function Li(){return null!==_i&&_i.apply(this,arguments)||this}Pi=Y.ChildProperty,t(Ti,Pi),i([Y.Property(null)],Ti.prototype,"from",void 0),i([Y.Property(null)],Ti.prototype,"to",void 0),i([Y.Property(null)],Ti.prototype,"value",void 0),i([Y.Property(null)],Ti.prototype,"color",void 0),i([Y.Property(null)],Ti.prototype,"minOpacity",void 0),i([Y.Property(null)],Ti.prototype,"maxOpacity",void 0),i([Y.Property(null)],Ti.prototype,"label",void 0),i([Y.Property(!0)],Ti.prototype,"showLegend",void 0);var Pi,wi=Ti;function Ti(){return null!==Pi&&Pi.apply(this,arguments)||this}Ii=Y.ChildProperty,t(Ni,Ii),i([Y.Property(null)],Ni.prototype,"latitude",void 0),i([Y.Property(null)],Ni.prototype,"longitude",void 0);var Ii,ki=Ni;function Ni(){return null!==Ii&&Ii.apply(this,arguments)||this}Fi=Y.ChildProperty,t(zi,Fi),i([Y.Property(null)],zi.prototype,"shapePath",void 0),i([Y.Property(null)],zi.prototype,"shapeValue",void 0);var Fi,Ei=zi;function zi(){return null!==Fi&&Fi.apply(this,arguments)||this}Bi=Y.ChildProperty,t(Ui,Bi),i([Y.Property(!1)],Ui.prototype,"enable",void 0),i([Y.Property(null)],Ui.prototype,"fill",void 0),i([Y.Property(1)],Ui.prototype,"opacity",void 0),i([Y.Property(!1)],Ui.prototype,"enableMultiSelect",void 0),i([Y.Complex({color:"transparent",width:0},a)],Ui.prototype,"border",void 0);var Bi,Ai=Ui;function Ui(){return null!==Bi&&Bi.apply(this,arguments)||this}ji=Y.ChildProperty,t(Di,ji),i([Y.Property(null)],Di.prototype,"fill",void 0),i([Y.Property(!1)],Di.prototype,"enable",void 0),i([Y.Property(1)],Di.prototype,"opacity",void 0),i([Y.Complex({color:"transparent",width:0},a)],Di.prototype,"border",void 0);var ji,Zi=Di;function Di(){return null!==ji&&ji.apply(this,arguments)||this}Ri=Y.ChildProperty,t(Gi,Ri),i([Y.Property(1)],Gi.prototype,"borderWidth",void 0),i([Y.Property(1)],Gi.prototype,"borderOpacity",void 0),i([Y.Property(1)],Gi.prototype,"opacity",void 0),i([Y.Property("#FF471A")],Gi.prototype,"borderColor",void 0),i([Y.Property("#FF471A")],Gi.prototype,"fill",void 0),i([Y.Property([])],Gi.prototype,"points",void 0),i([Y.Property("")],Gi.prototype,"tooltipText",void 0),i([Y.Property("")],Gi.prototype,"tooltipTemplate",void 0);var Ri,Vi=Gi;function Gi(){return null!==Ri&&Ri.apply(this,arguments)||this}Hi=Y.ChildProperty,t(Xi,Hi),i([Y.Collection([],Vi)],Xi.prototype,"polygons",void 0),i([Y.Complex({},Ai)],Xi.prototype,"selectionSettings",void 0),i([Y.Complex({},Zi)],Xi.prototype,"highlightSettings",void 0),i([Y.Complex({},ui)],Xi.prototype,"tooltipSettings",void 0);var Hi,Wi=Xi;function Xi(){return null!==Hi&&Hi.apply(this,arguments)||this}qi=Y.ChildProperty,t(Ji,qi),i([Y.Property(!1)],Ji.prototype,"visible",void 0),i([Y.Property(1)],Ji.prototype,"width",void 0),i([Y.Property(null)],Ji.prototype,"longitude",void 0),i([Y.Property(null)],Ji.prototype,"latitude",void 0),i([Y.Property("")],Ji.prototype,"dashArray",void 0),i([Y.Property("black")],Ji.prototype,"color",void 0),i([Y.Property(0)],Ji.prototype,"angle",void 0),i([Y.Complex({showArrow:!1,position:"Start",size:5,color:"black"},Xt)],Ji.prototype,"arrowSettings",void 0),i([Y.Complex({},Ai)],Ji.prototype,"selectionSettings",void 0),i([Y.Complex({},Zi)],Ji.prototype,"highlightSettings",void 0);var qi,Yi=Ji;function Ji(){return null!==qi&&qi.apply(this,arguments)||this}Qi=Y.ChildProperty,t(r,Qi),i([Y.Complex({},a)],r.prototype,"border",void 0),i([Y.Property(!1)],r.prototype,"visible",void 0),i([Y.Property([])],r.prototype,"dataSource",void 0),i([Y.Property()],r.prototype,"query",void 0),i([Y.Property(1e3)],r.prototype,"animationDuration",void 0),i([Y.Property(0)],r.prototype,"animationDelay",void 0),i([Y.Property("")],r.prototype,"fill",void 0),i([Y.Property(10)],r.prototype,"minRadius",void 0),i([Y.Property(20)],r.prototype,"maxRadius",void 0),i([Y.Property(1)],r.prototype,"opacity",void 0),i([Y.Property(null)],r.prototype,"valuePath",void 0),i([Y.Property("Circle")],r.prototype,"bubbleType",void 0),i([Y.Property(null)],r.prototype,"colorValuePath",void 0),i([Y.Collection([],wi)],r.prototype,"colorMapping",void 0),i([Y.Complex({},hi)],r.prototype,"tooltipSettings",void 0),i([Y.Complex({},Ai)],r.prototype,"selectionSettings",void 0),i([Y.Complex({},Zi)],r.prototype,"highlightSettings",void 0);var Qi,Ki=r;function r(){return null!==Qi&&Qi.apply(this,arguments)||this}$i=Y.ChildProperty,t(to,$i),i([Y.Property("")],to.prototype,"text",void 0),i([Y.Property("")],to.prototype,"description",void 0);var $i,eo=to;function to(){return null!==$i&&$i.apply(this,arguments)||this}t(no,io=eo),i([Y.Complex({size:null,fontWeight:null,fontFamily:null},Jt)],no.prototype,"textStyle",void 0),i([Y.Property("Center")],no.prototype,"alignment",void 0);var io,oo=no;function no(){return null!==io&&io.apply(this,arguments)||this}t(ro,ao=eo),i([Y.Complex({size:null,fontWeight:null,fontFamily:null},Jt)],ro.prototype,"textStyle",void 0),i([Y.Property("Center")],ro.prototype,"alignment",void 0),i([Y.Complex({},oo)],ro.prototype,"subtitleSettings",void 0);var ao,lo=ro;function ro(){return null!==ao&&ao.apply(this,arguments)||this}so=Y.ChildProperty,t(d,so),i([Y.Property(!1)],d.prototype,"enable",void 0),i([Y.Property(!0)],d.prototype,"enablePanning",void 0),i([Y.Property(!0)],d.prototype,"enableSelectionZooming",void 0),i([Y.Property(!0)],d.prototype,"mouseWheelZoom",void 0),i([Y.Property(!1)],d.prototype,"doubleClickZoom",void 0),i([Y.Property(!0)],d.prototype,"pinchZooming",void 0),i([Y.Property(!1)],d.prototype,"zoomOnClick",void 0),i([Y.Property(1)],d.prototype,"zoomFactor",void 0),i([Y.Property(10)],d.prototype,"maxZoom",void 0),i([Y.Property(1)],d.prototype,"minZoom",void 0),i([Y.Property(!1)],d.prototype,"shouldZoomInitially",void 0),i([Y.Property(!0)],d.prototype,"resetToInitial",void 0),i([Y.Complex({},oi)],d.prototype,"toolbarSettings",void 0);var so,po=d;function d(){return null!==so&&so.apply(this,arguments)||this}ho=Y.ChildProperty,t(co,ho),i([Y.Property(!1)],co.prototype,"enable",void 0),i([Y.Property(!0)],co.prototype,"applyShapeSettings",void 0),i([Y.Property(1)],co.prototype,"opacity",void 0),i([Y.Property("")],co.prototype,"fill",void 0),i([Y.Complex({color:"",width:0},a)],co.prototype,"border",void 0);var ho,mo=co;function co(){return null!==ho&&ho.apply(this,arguments)||this}uo=Y.ChildProperty,t(p,uo),i([Y.Property(!1)],p.prototype,"useMarkerShape",void 0),i([Y.Property(!1)],p.prototype,"toggleVisibility",void 0),i([Y.Property(!1)],p.prototype,"visible",void 0),i([Y.Property("transparent")],p.prototype,"background",void 0),i([Y.Property("Layers")],p.prototype,"type",void 0),i([Y.Property(!1)],p.prototype,"invertedPointer",void 0),i([Y.Property("After")],p.prototype,"labelPosition",void 0),i([Y.Property("None")],p.prototype,"labelDisplayMode",void 0),i([Y.Property("Circle")],p.prototype,"shape",void 0),i([Y.Property("")],p.prototype,"width",void 0),i([Y.Property("")],p.prototype,"height",void 0),i([Y.Complex({fontFamily:null,fontWeight:null},Jt)],p.prototype,"textStyle",void 0),i([Y.Property(15)],p.prototype,"shapeWidth",void 0),i([Y.Property(15)],p.prototype,"shapeHeight",void 0),i([Y.Property(10)],p.prototype,"shapePadding",void 0),i([Y.Complex({color:null,width:0},a)],p.prototype,"border",void 0),i([Y.Complex({color:"#000000",width:0},a)],p.prototype,"shapeBorder",void 0),i([Y.Complex({},eo)],p.prototype,"title",void 0),i([Y.Complex({size:null,color:At.legendTitleFont.color,fontStyle:At.legendTitleFont.fontStyle,fontWeight:null,fontFamily:null},Jt)],p.prototype,"titleStyle",void 0),i([Y.Property("Bottom")],p.prototype,"position",void 0),i([Y.Property("Center")],p.prototype,"alignment",void 0),i([Y.Property("None")],p.prototype,"orientation",void 0),i([Y.Property({x:0,y:0})],p.prototype,"location",void 0),i([Y.Property(null)],p.prototype,"fill",void 0),i([Y.Property(1)],p.prototype,"opacity",void 0),i([Y.Property("Default")],p.prototype,"mode",void 0),i([Y.Property(null)],p.prototype,"showLegendPath",void 0),i([Y.Property(null)],p.prototype,"valuePath",void 0),i([Y.Property(!1)],p.prototype,"removeDuplicateLegend",void 0),i([Y.Complex({},mo)],p.prototype,"toggleLegendSettings",void 0);var uo,go=p;function p(){return null!==uo&&uo.apply(this,arguments)||this}yo=Y.ChildProperty,t(h,yo),i([Y.Property(!1)],h.prototype,"visible",void 0),i([Y.Complex({width:0,color:"transparent"},a)],h.prototype,"border",void 0),i([Y.Property("black")],h.prototype,"fill",void 0),i([Y.Property(1)],h.prototype,"opacity",void 0),i([Y.Property(5)],h.prototype,"rx",void 0),i([Y.Property(5)],h.prototype,"ry",void 0),i([Y.Complex({fontWeight:null},Jt)],h.prototype,"textStyle",void 0),i([Y.Property("")],h.prototype,"labelPath",void 0),i([Y.Property("None")],h.prototype,"smartLabelMode",void 0),i([Y.Property("None")],h.prototype,"intersectionAction",void 0),i([Y.Property("")],h.prototype,"template",void 0),i([Y.Property(0)],h.prototype,"animationDuration",void 0);var yo,fo=h;function h(){return null!==yo&&yo.apply(this,arguments)||this}bo=Y.ChildProperty,t(m,bo),i([Y.Property(null)],m.prototype,"fill",void 0),i([Y.Property([])],m.prototype,"palette",void 0),i([Y.Property(5)],m.prototype,"circleRadius",void 0),i([Y.Complex({width:null,color:null},a)],m.prototype,"border",void 0),i([Y.Property("")],m.prototype,"dashArray",void 0),i([Y.Property(1)],m.prototype,"opacity",void 0),i([Y.Property(null)],m.prototype,"colorValuePath",void 0),i([Y.Property(null)],m.prototype,"borderColorValuePath",void 0),i([Y.Property(null)],m.prototype,"borderWidthValuePath",void 0),i([Y.Property(null)],m.prototype,"valuePath",void 0),i([Y.Collection([],wi)],m.prototype,"colorMapping",void 0),i([Y.Property(!1)],m.prototype,"autofill",void 0);var bo,So=m;function m(){return null!==bo&&bo.apply(this,arguments)||this}vo=Y.ChildProperty,t(c,vo),i([Y.Complex({color:"transparent",width:1},a)],c.prototype,"border",void 0),i([Y.Property(null)],c.prototype,"dashArray",void 0),i([Y.Property(!1)],c.prototype,"visible",void 0),i([Y.Property(!1)],c.prototype,"enableDrag",void 0),i([Y.Property("#FF471A")],c.prototype,"fill",void 0),i([Y.Property(10)],c.prototype,"height",void 0),i([Y.Property(10)],c.prototype,"width",void 0),i([Y.Property(1)],c.prototype,"opacity",void 0),i([Y.Property(null)],c.prototype,"colorValuePath",void 0),i([Y.Property(null)],c.prototype,"shapeValuePath",void 0),i([Y.Property(null)],c.prototype,"imageUrlValuePath",void 0),i([Y.Property("Balloon")],c.prototype,"shape",void 0),i([Y.Property("")],c.prototype,"legendText",void 0),i([Y.Property(new J(0,0))],c.prototype,"offset",void 0),i([Y.Property("")],c.prototype,"imageUrl",void 0),i([Y.Property(null)],c.prototype,"template",void 0),i([Y.Property([])],c.prototype,"dataSource",void 0),i([Y.Property()],c.prototype,"query",void 0),i([Y.Complex({},hi)],c.prototype,"tooltipSettings",void 0),i([Y.Property(1e3)],c.prototype,"animationDuration",void 0),i([Y.Property(0)],c.prototype,"animationDelay",void 0),i([Y.Complex({},Ai)],c.prototype,"selectionSettings",void 0),i([Y.Complex({},Zi)],c.prototype,"highlightSettings",void 0),i([Y.Property(null)],c.prototype,"latitudeValuePath",void 0),i([Y.Property(null)],c.prototype,"longitudeValuePath",void 0),i([Y.Collection([],ki)],c.prototype,"initialMarkerSelection",void 0);var vo,xo=c;function c(){return null!==vo&&vo.apply(this,arguments)||this}t(_o,Oo=xo);var Oo,Co=_o;function _o(e,t,i,o){return Oo.call(this,e,t,i,o)||this}Mo=Y.ChildProperty,t(u,Mo),i([Y.Property(null)],u.prototype,"shapeData",void 0),i([Y.Property()],u.prototype,"query",void 0),i([Y.Complex({},So)],u.prototype,"shapeSettings",void 0),i([Y.Property([])],u.prototype,"dataSource",void 0),i([Y.Property("Layer")],u.prototype,"type",void 0),i([Y.Property("Geographic")],u.prototype,"geometryType",void 0),i([Y.Property("")],u.prototype,"urlTemplate",void 0),i([Y.Property(!0)],u.prototype,"visible",void 0),i([Y.Property("name")],u.prototype,"shapeDataPath",void 0),i([Y.Property("name")],u.prototype,"shapePropertyPath",void 0),i([Y.Property(0)],u.prototype,"animationDuration",void 0),i([Y.Collection([],Co)],u.prototype,"markerSettings",void 0),i([Y.Complex({},Ci)],u.prototype,"markerClusterSettings",void 0),i([Y.Complex({},fo)],u.prototype,"dataLabelSettings",void 0),i([Y.Collection([],Ki)],u.prototype,"bubbleSettings",void 0),i([Y.Collection([],Yi)],u.prototype,"navigationLineSettings",void 0),i([Y.Complex({},Wi)],u.prototype,"polygonSettings",void 0),i([Y.Complex({},hi)],u.prototype,"tooltipSettings",void 0),i([Y.Complex({},Ai)],u.prototype,"selectionSettings",void 0),i([Y.Complex({},Zi)],u.prototype,"highlightSettings",void 0),i([Y.Complex({},mo)],u.prototype,"toggleLegendSettings",void 0),i([Y.Collection([],Ei)],u.prototype,"initialShapeSelection",void 0);var Mo,Lo=u;function u(){var e=null!==Mo&&Mo.apply(this,arguments)||this;return e.isBaseLayer=!1,e}var Po,wo=function(e,t,i,o,n,a,l){void 0===i&&(i=256),void 0===o&&(o=256),void 0===n&&(n=0),void 0===a&&(a=0),void 0===l&&(l=null),this.x=e,this.y=t,this.top=n,this.left=a,this.height=i,this.width=o,this.src=l},t=(Po=Y.ChildProperty,t(To,Po),i([Y.Property(null)],To.prototype,"background",void 0),i([Y.Complex({color:"transparent",width:1},a)],To.prototype,"border",void 0),To);function To(){return null!==Po&&Po.apply(this,arguments)||this}var Io="click",ko="onclick",No="rightClick",Fo="doubleClick",Eo="resize",zo="tooltipRender",Bo="shapeSelected",Ao="shapeHighlight",Uo="layerRendering",jo="shapeRendering",Zo="markerRendering",Do="markerClusterRendering",Ro="markerClick",Vo="markerDragStart",Go="markerClusterClick",Ho="markerMouseMove",Wo="markerClusterMouseMove",Xo="dataLabelRendering",qo="bubbleRendering",Yo="bubbleClick",Jo="bubbleMouseMove",Qo="animationComplete",Ko="legendRendering",$o="annotationRendering",en="itemSelection",tn="itemHighlight",on="beforePrint",nn="pan",an=(ln.prototype.getBingMap=function(e,t,i,o,n,a){for(var l="",r=Math.min(this.maps.tileZoomLevel,parseInt(this.maxZoom,10));0<r;r--){var s=0,d=1<<r-1;0!=(e.x&d)&&s++,0!=(e.y&d)&&(s+=2),l=l+""+s}return Y.isNullOrUndefined(a)?"":(a=a[Math.min(parseInt(l.substr(l.length-1,1),10),a.length)],(n=n.replace("{quadkey}",l).replace("{subdomain}",a))+"&mkt="+o+"&ur=IN&Key="+t)},ln.prototype.destroy=function(){this.maps=null,this.subDomains=[]},ln);function ln(e){this.maps=e}sn.prototype.getShapeColorMapping=function(e,t,i){var o=e.colorValuePath||e.valuePath,t=!Y.isNullOrUndefined(o)&&-1<o.indexOf(".")?k(t,o):t[o],o=Number(t),e=this.getColorByValue(e.colorMapping,o,t);return Y.isNullOrUndefined(e)?i:e},sn.prototype.getColorByValue=function(e,t,i){if(isNaN(t)&&Y.isNullOrUndefined(i))return null;for(var o,n="",a=0,l=e;a<l.length;a++){var r=l[a];(!Y.isNullOrUndefined(r.from)&&!Y.isNullOrUndefined(r.to)&&t>=r.from&&t<=r.to||r.value===i)&&(n="[object Array]"===Object.prototype.toString.call(r.color)?Y.isNullOrUndefined(r.value)?this.getColor(r,t):r.color[0]:r.color),(t>=r.from&&t<=r.to||r.value===i)&&!Y.isNullOrUndefined(r.minOpacity)&&!Y.isNullOrUndefined(r.maxOpacity)&&n&&(o=this.deSaturationColor(r,n,t,i)),(""===n||Y.isNullOrUndefined(n))&&Y.isNullOrUndefined(r.from)&&Y.isNullOrUndefined(r.to)&&Y.isNullOrUndefined(r.minOpacity)&&Y.isNullOrUndefined(r.maxOpacity)&&Y.isNullOrUndefined(r.value)&&(n="[object Array]"===Object.prototype.toString.call(r.color)?r.color[0]:r.color)}return{fill:n||(e.length?null:i),opacity:o}},sn.prototype.deSaturationColor=function(e,t,i,o){var n=1;return n=i>=e.from&&i<=e.to||e.value===o?(isNaN(i)?e.from/(e.to-e.from):(i-e.from)/(e.to-e.from))*(e.maxOpacity-e.minOpacity)+e.minOpacity:n},sn.prototype.rgbToHex=function(e,t,i){return"#"+this.componentToHex(e)+this.componentToHex(t)+this.componentToHex(i)},sn.prototype.componentToHex=function(e){e=e.toString(16);return 1===e.length?"0"+e:e},sn.prototype.getColor=function(e,t){return Number(t)===e.from?e.color[0]:Number(t)===e.to?e.color[e.color.length-1]:(t=this.getGradientColor(Number(t),e),this.rgbToHex(t.r,t.g,t.b))},sn.prototype.getGradientColor=function(e,t){var i=t.from,o=t.to,n=0,a=o-i,n=(e-i)/a;if(t.color.length<=2)r="#"===t.color[0].charAt(0)?t.color[0]:this._colorNameToHex(t.color[0]),s="#"===t.color[t.color.length-1].charAt(0)?t.color[t.color.length-1]:this._colorNameToHex(t.color[t.color.length-1]);else{for(var l,r="#"===t.color[0].charAt(0)?t.color[0]:this._colorNameToHex(t.color[0]),s="#"===t.color[t.color.length-1].charAt(0)?t.color[t.color.length-1]:this._colorNameToHex(t.color[t.color.length-1]),d=a/(t.color.length-1),p=t.color.length-1,h=[],m=1;m<p;m++)l={b:i+m*d,color:t.color[m]},h.push(l);for(var c=0;c<h.length;c++)i<=e&&e<=h[c].b&&0===c?(s="#"===h[c].color.charAt(0)?h[c].color:this._colorNameToHex(h[c].color),n=e<h[c].b?1-Math.abs((e-h[c].b)/d):(e-h[c].b)/d):h[c].b<=e&&e<=o&&c===h.length-1&&(r="#"===h[c].color.charAt(0)?h[c].color:this._colorNameToHex(h[c].color),n=e<h[c].b?1-Math.abs((e-h[c].b)/d):(e-h[c].b)/d),c!==h.length-1&&c<h.length&&h[c].b<=e&&e<=h[c+1].b&&(r="#"===h[c].color.charAt(0)?h[c].color:this._colorNameToHex(h[c].color),s="#"===h[c+1].color.charAt(0)?h[c+1].color:this._colorNameToHex(h[c+1].color),n=Math.abs(e-h[c+1].b)/d)}return this.getPercentageColor(n,r,s)},sn.prototype.getPercentageColor=function(e,t,i){var i=i.split("#")[1],t=t.split("#")[1],o=this.getPercentage(e,parseInt(t.substr(0,2),16),parseInt(i.substr(0,2),16)),n=this.getPercentage(e,parseInt(t.substr(2,2),16),parseInt(i.substr(2,2),16)),e=this.getPercentage(e,parseInt(t.substr(4,2),16),parseInt(i.substr(4,2),16));return new de(o,n,e)},sn.prototype.getPercentage=function(e,t,i){return Math.round(t+(i-t)*e)},sn.prototype._colorNameToHex=function(e){var t={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",orchid:"#da70d6",papayawhip:"#ffefd5",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};return"[object Array]"!==Object.prototype.toString.call(e)&&void 0!==t[e.toLowerCase()]?t[e.toLowerCase()]:e};var rn=sn;function sn(e){}g.prototype.measureLayerPanel=function(){var e,i=this,t=this.mapObject.layersCollection,o=this.mapObject.mapAreaRect,n=N(this.mapObject.element.id+"_Secondary_Element");this.mapObject.isTileMap&&n&&(this.tileSvgObject=this.mapObject.renderer.createSvg({id:this.mapObject.element.id+"_Tile_SVG",width:o.width,height:o.height}),(e=Y.createElement("div",{id:this.mapObject.element.id+"_Tile_SVG_Parent"})).style.cssText="position: absolute; height: "+o.height+"px; width: "+o.width+"px;",e.appendChild(this.tileSvgObject),n.appendChild(e)),this.layerGroup=this.mapObject.renderer.createGroup({id:this.mapObject.element.id+"_Layer_Collections","clip-path":"url(#"+this.mapObject.element.id+"_MapArea_ClipRect)"}),this.clipRectElement=this.mapObject.renderer.drawClipPath(new Q(this.mapObject.element.id+"_MapArea_ClipRect","transparent",{width:1,color:"Gray"},1,{x:this.mapObject.isTileMap?0:o.x,y:this.mapObject.isTileMap?0:o.y,width:o.width,height:o.height})),this.layerGroup.appendChild(this.clipRectElement),this.mapObject.baseMapBounds=null,this.mapObject.baseMapRectBounds=null,this.mapObject.baseSize=null,Array.prototype.forEach.call(t,function(e,t){i.currentLayer=e,i.processLayers(e,t)}),Y.isNullOrUndefined(this.mapObject.legendModule)||"Float"!==this.mapObject.legendSettings.position||(this.mapObject.isTileMap?this.layerGroup:this.mapObject.svgObject).appendChild(this.mapObject.legendModule.legendGroup)},g.prototype.renderTileLayer=function(e,t,i,o){e.currentFactor=e.calculateFactor(t),e.mapObject.defaultState=!(1!==e.mapObject.zoomSettings.zoomFactor&&!Y.isNullOrUndefined(e.mapObject.tileZoomLevel)&&1!==e.mapObject.tileZoomLevel),Y.isNullOrUndefined(e.mapObject.previousCenterLatitude)&&Y.isNullOrUndefined(e.mapObject.previousCenterLongitude)&&!e.mapObject.isZoomByPosition?(e.mapObject.previousCenterLatitude=e.mapObject.centerPosition.latitude,e.mapObject.previousCenterLongitude=e.mapObject.centerPosition.longitude):e.mapObject.previousCenterLatitude!==e.mapObject.centerPosition.latitude&&e.mapObject.previousCenterLongitude!==e.mapObject.centerPosition.longitude||e.mapObject.isZoomByPosition?(e.mapObject.centerPositionChanged=!0,e.mapObject.previousCenterLatitude=e.mapObject.centerPosition.latitude,e.mapObject.previousCenterLongitude=e.mapObject.centerPosition.longitude):e.mapObject.centerPositionChanged=!1;var n,t=new J(e.mapObject.centerPosition.longitude,e.mapObject.centerPosition.latitude),a=t,t=(this.mapObject.isTileMap&&e.mapObject.markerModule&&e.mapObject.zoomSettings.enable&&(e.mapObject.markerModule.calculateZoomCenterPositionAndFactor(this.mapObject.layersCollection),Y.isNullOrUndefined(this.mapObject.markerCenterLatitude)||Y.isNullOrUndefined(this.mapObject.markerCenterLongitude)||e.mapObject.isZoomByPosition||(a=new J(e.mapObject.markerCenterLongitude,e.mapObject.markerCenterLatitude))),t=!e.mapObject.zoomSettings.shouldZoomInitially&&e.mapObject.centerPosition.longitude&&e.mapObject.centerPosition.latitude&&!e.mapObject.zoomPersistence&&e.mapObject.defaultState?new J(e.mapObject.centerPosition.longitude,e.mapObject.centerPosition.latitude):e.mapObject.zoomSettings.shouldZoomInitially&&e.mapObject.markerZoomedState&&!e.mapObject.zoomPersistence&&!Y.isNullOrUndefined(e.mapObject.markerZoomCenterPoint)?new J(e.mapObject.markerZoomCenterPoint.longitude,e.mapObject.markerZoomCenterPoint.latitude):{x:null,y:null},e.mapObject.zoomSettings.shouldZoomInitially&&!e.mapObject.isZoomByPosition?Y.isNullOrUndefined(e.mapObject.markerZoomFactor)?1:e.mapObject.markerZoomFactor:e.mapObject.zoomSettings.zoomFactor),t=e.mapObject.enablePersistence?Y.isNullOrUndefined(e.mapObject.mapScaleValue)?Y.isNullOrUndefined(e.mapObject.markerZoomFactor)?e.mapObject.zoomSettings.zoomFactor:e.mapObject.markerZoomFactor:e.mapObject.mapScaleValue:t;t=e.mapObject.zoomSettings.enable?t:e.mapObject.zoomSettings.zoomFactor,e.mapObject.defaultState=1===(t=0<t?t:1),!e.mapObject.markerZoomedState&&e.mapObject.zoomSettings.shouldZoomInitially&&1===e.mapObject.zoomSettings.zoomFactor&&(e.mapObject.defaultState=!0),Y.isNullOrUndefined(e.mapObject.tileZoomLevel)?(e.mapObject.tileZoomLevel=t,e.mapObject.previousZoomFactor=t):this.mapObject.isReset&&1===e.mapObject.tileZoomLevel&&!e.mapObject.zoomSettings.shouldZoomInitially?(n=e.mapObject.tileZoomLevel,e.mapObject.tileZoomLevel=n):1!==e.mapObject.zoomSettings.zoomFactor||e.mapObject.zoomSettings.shouldZoomInitially?(e.mapObject.previousZoomFactor=e.mapObject.tileZoomLevel,e.mapObject.tileZoomLevel=e.mapObject.defaultState&&e.mapObject.zoomSettings.enable?e.mapObject.tileZoomLevel:e.mapObject.zoomSettings.shouldZoomInitially||e.mapObject.centerPositionChanged?t:e.mapObject.previousZoomFactor!==e.mapObject.zoomSettings.zoomFactor?e.mapObject.zoomSettings.zoomFactor:e.mapObject.tileZoomLevel,e.mapObject.tileZoomLevel=1===t&&0===e.mapObject.zoomSettings.zoomFactor?t:e.mapObject.tileZoomLevel,!Y.isNullOrUndefined(e.mapObject.tileTranslatePoint)&&(e.mapObject.markerZoomFactor!==e.mapObject.mapScaleValue||Y.isNullOrUndefined(e.mapObject.markerZoomFactor)&&Y.isNullOrUndefined(e.mapObject.mapScaleValue))&&(e.mapObject.zoomSettings.zoomFactor<=1||e.mapObject.previousZoomFactor!==e.mapObject.zoomSettings.zoomFactor)&&(e.mapObject.tileTranslatePoint.x=0,e.mapObject.tileTranslatePoint.y=0)):e.mapObject.defaultState&&(e.mapObject.previousZoomFactor=e.mapObject.tileZoomLevel,e.mapObject.tileZoomLevel=t,Y.isNullOrUndefined(e.mapObject.tileTranslatePoint)||(e.mapObject.tileTranslatePoint.x=0,e.mapObject.tileTranslatePoint.y=0)),t<=1&&!Y.isNullOrUndefined(e.mapObject.height)&&!e.mapObject.zoomSettings.shouldZoomInitially&&e.mapObject.tileZoomLevel===e.mapObject.tileZoomScale&&this.mapObject.initialCheck&<(this.mapObject),Y.isNullOrUndefined(e.mapObject.centerLatOfGivenLocation)||Y.isNullOrUndefined(e.mapObject.centerLongOfGivenLocation)||!e.mapObject.zoomNotApplied||(Y.isNullOrUndefined(a)||(a.y=e.mapObject.centerLatOfGivenLocation,a.x=e.mapObject.centerLongOfGivenLocation),e.mapObject.tileZoomLevel=e.mapObject.mapScaleValue=e.mapObject.scaleOfGivenLocation),e.mapObject.tileTranslatePoint=e.panTileMap(e.mapObject.availableSize.width,e.mapObject.availableSize.height,a),this.mapObject.zoomSettings.resetToInitial&&this.mapObject.initialCheck&&!Y.isNullOrUndefined(e.mapObject.height)&&512<this.mapObject.availableSize.height&&(this.mapObject.applyZoomReset=!0,this.mapObject.initialZoomLevel=Math.floor(this.mapObject.availableSize.height/512),n=256*Math.pow(2,this.mapObject.initialZoomLevel),Y.isNullOrUndefined(this.mapObject.initialTileTranslate)||(this.mapObject.initialTileTranslate.x=this.mapObject.availableSize.width/2-n/2,this.mapObject.initialTileTranslate.y=this.mapObject.availableSize.height/2-n/2+20)),e.generateTiles(e.mapObject.tileZoomLevel,e.mapObject.tileTranslatePoint,null,o),Y.isNullOrUndefined(e.mapObject.previousZoomFactor)||e.mapObject.previousZoomFactor===e.mapObject.zoomSettings.zoomFactor||(e.mapObject.previousZoomFactor=e.mapObject.zoomSettings.zoomFactor),e.mapObject.polygonModule&&(t=e.mapObject.polygonModule.polygonRender(this.mapObject,i,e.mapObject.tileZoomLevel),Y.isNullOrUndefined(t)||e.layerObject.appendChild(t)),e.mapObject.navigationLineModule&&(a=e.mapObject.navigationLineModule.renderNavigation(e.currentLayer,e.mapObject.tileZoomLevel,i),Y.isNullOrUndefined(a)||e.layerObject.appendChild(a)),e.mapObject.markerModule&&e.mapObject.markerModule.markerRender(this.mapObject,e.layerObject,i,e.mapObject.tileZoomLevel,null),e.translateLayerElements(e.layerObject),e.layerGroup.appendChild(e.layerObject)},g.prototype.processLayers=function(o,n){var a=this;if(this.layerObject=this.mapObject.renderer.createGroup({id:this.mapObject.element.id+"_LayerIndex_"+n}),!this.mapObject.enablePersistence){var e=this.mapObject.getModuleName()+this.mapObject.element.id;if(-1===navigator.userAgent.indexOf("Edge")){var t=void 0;try{t=window.localStorage}catch(e){t=null}!Y.isNullOrUndefined(t)&&window.localStorage.getItem(e)&&window.localStorage.removeItem(e)}}var l={cancel:!1,name:Uo,index:n,layer:o,maps:this.mapObject,visible:o.visible};this.mapObject.trigger("layerRendering",l,function(e){var t,i;!l.cancel&&l.visible&&(Y.isNullOrUndefined(o.shapeData)&&!Y.isNullOrUndefined(o.urlTemplate)&&""!==o.urlTemplate?!Y.isNullOrUndefined(o.urlTemplate)&&-1<o.urlTemplate.indexOf("quadkey")?(t=new an(a.mapObject),a.bingMapCalculation(o,n,a,t)):a.renderTileLayer(a,o,n):Y.isNullOrUndefined(o.shapeData)||Y.isNullOrUndefined(o.shapeData.geometries)&&Y.isNullOrUndefined(o.shapeData.features)||(t=!Y.isNullOrUndefined(o.shapeData.geometries)&&0<o.shapeData.geometries.length?o.shapeData.geometries:o.shapeData.features,o.layerData=[],i=o.shapeData.bbox,!Y.isNullOrUndefined(i)&&o.isBaseLayer?a.mapObject.baseMapBounds=new ae({min:i[0][1],max:i[1][1]},{min:i[0][0],max:i[1][0]}):Y.isNullOrUndefined(a.mapObject.baseMapBounds)&&!et(t)&&a.calculateRectBounds(t),a.calculatePathCollection(n,t)))}),this.mapObject.isTileMap?this.tileSvgObject&&(this.tileSvgObject.appendChild(this.layerGroup),this.mapObject.baseMapBounds=null):this.mapObject.svgObject.appendChild(this.layerGroup)},g.prototype.bingMapCalculation=function(e,t,i,o){o.imageUrl=e.urlTemplate,o.subDomains=["t0","t1","t2","t3"],o.maxZoom="21",i.mapObject.bingMap=o,i.renderTileLayer(i,e,t,o),this.mapObject.arrangeTemplate(),this.mapObject.zoomModule&&this.mapObject.previousScale!==this.mapObject.scale&&this.mapObject.zoomModule.applyTransform(this.mapObject,!0)},g.prototype.bubbleCalculation=function(e,t){if(null!=e.dataSource&&null!=e)for(var i=e.dataSource,o=0;o<i.length;o++){var n=!Y.isNullOrUndefined(e.valuePath)&&-1<e.valuePath.indexOf(".")?Number(k(e.dataSource[o],e.valuePath)):parseFloat(e.dataSource[o][e.valuePath]);isNaN(n)||(0!==o?n>t.max?t.max=n:n<t.min&&(t.min=n):t.max=t.min=n)}},g.prototype.calculatePathCollection=function(f,b){var S=this,v=(this.groupElements=[],et(b)||(this.currentFactor=this.calculateFactor(this.currentLayer)),this.rectBounds=null,this.currentLayer.shapeSettings),x=(Array.prototype.forEach.call(b,function(e){var t,i,o;Y.isNullOrUndefined(e.geometry)&&Y.isNullOrUndefined(e.coordinates)||(t=(Y.isNullOrUndefined(e.geometry)?e:e.geometry).type,i=(Y.isNullOrUndefined(e.geometry)?e:e.geometry).coordinates,o=e.geometry,e=e.properties,S.generatePoints(t,i,o,e))}),this.currentLayer.rectBounds=this.rectBounds,Y.isNullOrUndefined(this.mapObject.baseMapRectBounds)&&this.currentLayer.isBaseLayer&&(this.mapObject.baseMapRectBounds=this.rectBounds),!Y.isNullOrUndefined(v.palette)&&1<v.palette.length?v.palette:function(e){var t;switch(e.toLowerCase()){case"tailwind":t=["#0369A1","#14B8A6","#15803D","#334155","#5A61F6","#65A30D","#8B5CF6","#9333EA","#F59E0B","#F97316"];break;case"tailwinddark":t=["#10B981","#22D3EE","#2DD4BF","#4ADE80","#8B5CF6","#E879F9","#F472B6","#F87171","#F97316","#FCD34D"];break;case"fluent":t=["#614570","#4C6FB1","#CC6952","#3F579A","#4EA09B","#6E7A89","#D4515C","#E6AF5D","#639751","#9D4D69"];break;case"fluentdark":t=["#8AB113","#2A72D5","#43B786","#584EC6","#E85F9C","#6E7A89","#EA6266","#EBA844","#26BC7A","#BC4870"];break;case"material3":t=["#6200EE","#E77A16","#82C100","#7107DC","#05BB3D","#D21020","#FAD200","#0085FF","#9204EA","#08EE9B"];break;case"material3dark":t=["#4EAAFF","#FA4EAB","#FFF500","#17EA58","#38FFE7","#FF9E45","#B3F32F","#B93CE4","#FC5664","#9B55FF"];break;case"fluent2":t=["#6200EE","#09AF74","#0076E5","#CB3587","#E7910F","#0364DE","#66CD15","#F3A93C","#107C10","#C19C00"];break;case"fluent2dark":case"fluent2highcontrast":t=["#9BB449","#2A72D5","#43B786","#3F579A","#584EC6","#E85F9C","#6E7A89","#EA6266","#0B6A0B","#C19C00"];break;case"bootstrap5":case"bootstrap5dark":t=["#6610F2","#6f42C1","#D63384","#DC3545","#FD7E14","#FFC107","#198754","#0DCAF0"];break;default:t=["#B5E485","#7BC1E8","#DF819C","#EC9B79","#78D0D3","#D6D572","#9178E3","#A1E5B4","#87A4B4","#E4C16C"]}return t}(this.mapObject.theme)),O=Y.createElement("div",{id:this.mapObject.element.id+"_LayerIndex_"+f+"_Label_Template_Group",className:this.mapObject.element.id+"_template"});if(O.style.cssText="pointer-events: none; overflow: hidden; position: absolute;top:"+this.mapObject.mapAreaRect.y+"px;left:"+this.mapObject.mapAreaRect.x+"px;height:"+this.mapObject.mapAreaRect.height+"px;width:"+this.mapObject.mapAreaRect.width+"px;",0!==this.currentLayer.layerData.length)for(var e=function(r){function e(o){var n,a="Polygon"===(a=Y.isNullOrUndefined(m._isMultiPolygon)?(Y.isNullOrUndefined(m.type)?m[0]:m).type:"MultiPolygon")||"MultiPolygon"===a?"Polygon":a;if(o.cancel?(o.fill=u,o.border.color=v.border.color||S.mapObject.themeStyle.shapeBorderColor,o.border.width=v.border.width):(o.fill="#A6A6A6"===o.fill?o.shape.fill||S.mapObject.themeStyle.shapeFill:o.fill,o.border.color=("transparent"===o.border.color?o.shape:o).border.color,o.border.width=(0===o.border.width?o.shape:o).border.width,Y.isNullOrUndefined(v.borderColorValuePath)&&(h.color=o.border.color),Y.isNullOrUndefined(v.borderWidthValuePath)&&(h.width=o.border.width)),o.border.opacity=Y.isNullOrUndefined(o.border.opacity)?y:o.border.opacity,S.groupElements.length<1)p=S.mapObject.renderer.createGroup({id:S.mapObject.element.id+"_LayerIndex_"+f+"_"+a+"_Group",transform:""}),S.groupElements.push(p);else for(var e=0;e<S.groupElements.length;e++){var t=S.groupElements[e];if(-1<t.id.indexOf(a)){p=t;break}if(e>=S.groupElements.length-1){p=S.mapObject.renderer.createGroup({id:S.mapObject.element.id+"_LayerIndex_"+f+"_"+a+"_Group"}),S.groupElements.push(p);break}}switch(a){case"Polygon":m._isMultiPolygon?c=S.generateMultiPolygonPath(m):(c+="M"+m[0].point.x+" "+m[0].point.y,m.map(function(e){c+=" L "+e.point.x+" "+e.point.y})),3<(c+=" z ").length&&(s=new A(g,o.fill,o.border.width,o.border.color,y,o.border.opacity,v.dashArray,c),n=S.mapObject.renderer.drawPath(s));break;case"LineString":m.map(function(e,t){c+=0===t?"M "+e.point.x+" "+e.point.y:"L"+e.point.x+" , "+e.point.y+" "}),3<c.length&&(s=new A(g,"transparent",Y.isNullOrUndefined(o.border.width)?1:o.border.width,Y.isNullOrUndefined(o.fill)?o.border.color:o.fill,y,o.border.opacity,v.dashArray,c),n=S.mapObject.renderer.drawPath(s));break;case"MultiLineString":m.map(function(e){e.map(function(e,t){c+=0===t?"M "+e.point.x+" "+e.point.y:"L"+e.point.x+" , "+e.point.y+" "})}),3<c.length&&(s=new A(g,"transparent",Y.isNullOrUndefined(o.border.width)?1:o.border.width,Y.isNullOrUndefined(o.fill)?o.border.color:o.fill,y,o.border.opacity,v.dashArray,c),n=S.mapObject.renderer.drawPath(s));break;case"Point":var i=m.point,l="SubLayer"!==S.mapObject.layers[f].type?v.circleRadius:v.circleRadius/(S.mapObject.isTileMap?S.mapObject.scale:S.currentFactor);d=new me(g,o.fill,o.border,y,i.x,i.y,l,v.dashArray),n=S.mapObject.renderer.drawCircle(d);break;case"MultiPoint":m.map(function(e,t){var e=e.point,i="SubLayer"!==S.mapObject.layers[f].type?v.circleRadius:v.circleRadius/(S.mapObject.isTileMap?S.mapObject.scale:S.currentFactor);d=new me(g+"_multiLine_"+t,o.fill,o.border,y,e.x,e.y,i,v.dashArray),n=S.mapObject.renderer.drawCircle(d),S.pathAttributeCalculate(p,n,a,m)});break;case"Path":c=m.point,s=new A(g,o.fill,o.border.width,o.border.color,y,o.border.opacity,v.dashArray,c),n=S.mapObject.renderer.drawPath(s)}Y.isNullOrUndefined(n)||"MultiPoint"===a||S.pathAttributeCalculate(p,n,a,m),r===S.currentLayer.layerData.length-1&&S.layerFeatures(f,x,b,O)}var s,d,p,t=void 0,h={color:v.border.color||o.mapObject.themeStyle.shapeBorderColor,width:v.border.width,opacity:v.border.opacity},m=o.currentLayer.layerData[r],c="",u=v.autofill?x[r%x.length]:v.fill||o.mapObject.themeStyle.shapeFill,g=(null===v.colorValuePath||Y.isNullOrUndefined(m.property)||(null!==(t=Ye(o.currentLayer.dataSource,m.property,o.currentLayer.shapeDataPath,o.currentLayer.shapePropertyPath,o.currentLayer))&&0===v.colorMapping.length?u=-1<o.currentLayer.shapeSettings.colorValuePath.indexOf(".")?k(o.currentLayer.dataSource[t],v.colorValuePath):o.currentLayer.dataSource[t][v.colorValuePath]:m.property[v.colorValuePath]&&0===o.currentLayer.dataSource.length&&0===v.colorMapping.length&&(u=-1<o.currentLayer.shapeSettings.colorValuePath.indexOf(".")?k(m.property,v.colorValuePath):m.property[v.colorValuePath]),u=Y.isNullOrUndefined(u)?v.fill||o.mapObject.themeStyle.shapeFill:u),o.mapObject.element.id+"_LayerIndex_"+f+"_shapeIndex_"+r+"_dataIndex_"+t),i=o.getShapeColorMapping(o.currentLayer,m.property,u),u="[object Object]"!==Object.prototype.toString.call(i)||Y.isNullOrUndefined(i.fill)?u:i.fill,y=((o.currentLayer.shapeSettings.borderColorValuePath||o.currentLayer.shapeSettings.borderWidthValuePath)&&null!==(t=Ye(o.currentLayer.dataSource,m.property,o.currentLayer.shapeDataPath,o.currentLayer.shapePropertyPath,o.currentLayer))&&(o.currentLayer.dataSource[t][v.borderColorValuePath]&&(h.color=o.currentLayer.dataSource[t][v.borderColorValuePath]),o.currentLayer.dataSource[t][v.borderWidthValuePath])&&(h.width=o.currentLayer.dataSource[t][v.borderWidthValuePath]),("[object Object]"!==Object.prototype.toString.call(i)||Y.isNullOrUndefined(i.opacity)?v:i).opacity),i={cancel:!1,name:jo,index:r,data:o.currentLayer.dataSource?o.currentLayer.dataSource[t]:null,maps:o.mapObject,shape:v,fill:u,border:{width:h.width,color:h.color,opacity:h.opacity}};e.bind(o),o.mapObject.trigger("shapeRendering",i,e)},o=this,t=0;t<this.currentLayer.layerData.length;t++)e(t);else this.layerFeatures(f,x,b,O)},g.prototype.pathAttributeCalculate=function(e,t,i,o){for(var n,a="[object Array]"===Object.prototype.toString.call(this.currentLayer.shapePropertyPath)?this.currentLayer.shapePropertyPath:[this.currentLayer.shapePropertyPath],l=0;l<a.length;l++)if(!Y.isNullOrUndefined(o.property)){n=a[l];break}t.setAttribute("aria-label",Y.isNullOrUndefined(o.property)?"":o.property[n]),this.currentLayer.selectionSettings.enable||this.currentLayer.highlightSettings.enable?(t.tabIndex=this.mapObject.tabIndex,t.setAttribute("role","button"),t.style.cursor=this.currentLayer.highlightSettings.enable&&!this.currentLayer.selectionSettings.enable?"default":"pointer"):t.setAttribute("role","region"),"LineString"!==i&&"MultiLineString"!==i||(t.style.cssText="outline:none"),Re(this.mapObject.selectedElementId,this.mapObject.shapeSelectionClass,t,"ShapeselectionMapStyle"),this.mapObject.legendSettings.toggleLegendSettings.enable&&"Layers"===this.mapObject.legendSettings.type&&Ve(this.mapObject.toggledElementId,t,this.mapObject.legendSettings.toggleLegendSettings.applyShapeSettings?this.currentLayer.shapeSettings:this.mapObject.legendSettings.toggleLegendSettings),e.appendChild(t)},g.prototype.layerFeatures=function(n,a,e,i){var l,r=this;if(this.mapObject.polygonModule&&this.groupElements.push(this.mapObject.polygonModule.polygonRender(this.mapObject,n,this.mapObject.isTileMap?Math.floor(this.currentFactor):this.currentFactor)),this.currentLayer.bubbleSettings.length&&this.mapObject.bubbleModule)for(var s,t=this.currentLayer.bubbleSettings.length,d=this,o=0;o<t;o++)!function(i){s=d.currentLayer.bubbleSettings[i],l=d.mapObject.renderer.createGroup({id:d.mapObject.element.id+"_LayerIndex_"+n+"_bubble_Group_"+i});var o={min:0,max:0},e=(d.bubbleCalculation(s,o),s.dataSource);d.mapObject.bubbleModule.bubbleCollection=[],!Y.isNullOrUndefined(e)&&0<e.length&&(e.map(function(e,t){r.renderBubble(r.currentLayer,e,a[t%a.length],o,i,t,l,n,s)}),d.groupElements.push(l))}(o);this.mapObject.markerModule&&!this.mapObject.isTileMap&&this.mapObject.zoomSettings.enable&&this.mapObject.markerModule.calculateZoomCenterPositionAndFactor(this.mapObject.layersCollection);var p,h=this.mapObject.renderer.createGroup({id:this.mapObject.element.id+"_LayerIndex_"+n+"_dataLableIndex_Group"});h.style.pointerEvents="none",this.mapObject.dataLabelModule&&this.currentLayer.dataLabelSettings.visible&&(p=[],Array.prototype.forEach.call(e,function(e,t){r.renderLabel(r.currentLayer,n,e,h,t,i,p)}),this.groupElements.push(h)),this.mapObject.navigationLineModule&&this.groupElements.push(this.mapObject.navigationLineModule.renderNavigation(this.currentLayer,this.currentFactor,n)),Y.isNullOrUndefined(this.groupElements)||Y.isNullOrUndefined(this.layerObject)||this.groupElements.map(function(e){Y.isNullOrUndefined(e)||r.layerObject.appendChild(e)}),this.mapObject.markerModule&&this.mapObject.markerModule.markerRender(this.mapObject,this.layerObject,n,this.mapObject.isTileMap?Math.floor(this.currentFactor):this.currentFactor,null),this.translateLayerElements(this.layerObject),this.layerGroup.appendChild(this.layerObject)},g.prototype.renderLabel=function(e,t,i,o,n,a,l){this.mapObject.dataLabelModule.renderLabel(e,t,i,e.layerData,o,a,n,l)},g.prototype.generateMultiPolygonPath=function(e){for(var t="",i=0;i<e.length;i++)t+="M"+e[i][0].point.x+" "+e[i][0].point.y,e[i].map(function(e){t+=" L "+e.point.x+" "+e.point.y});return t},g.prototype.renderBubble=function(e,t,i,o,n,a,l,r,s){if(Y.isNullOrUndefined(this.mapObject.bubbleModule)||!s.visible)return null;i=s.fill||i,this.mapObject.bubbleModule.id=this.mapObject.element.id+"_LayerIndex_"+r+"_BubbleIndex_"+n+"_dataIndex_"+a,this.mapObject.bubbleModule.renderBubble(s,t,i,o,n,a,r,e,l,this.mapObject.bubbleModule.id)},g.prototype.getShapeColorMapping=function(e,t,i){var o;return i=i||e.shapeSettings.fill,0===e.shapeSettings.colorMapping.length&&Y.isNullOrUndefined(e.dataSource)||(t=Ye(e.dataSource,t,e.shapeDataPath,e.shapePropertyPath),o=new rn(this.mapObject),Y.isNullOrUndefined(e.dataSource))||Y.isNullOrUndefined(e.dataSource[t])?i:o.getShapeColorMapping(e.shapeSettings,e.dataSource[t],i)},g.prototype.generatePoints=function(e,t,i,o){var n=this,a=[];switch(e.toLowerCase()){case"polygon":0<(a=this.calculatePolygonBox(t[0])).length&&(a.property=o,a.type=e,a._isMultiPolygon=!1,this.currentLayer.layerData.push(a));break;case"multipolygon":for(var l=[],r=0;r<t.length;r++)for(var s=0;s<t[r].length;s++)0<(a=this.calculatePolygonBox(t[r][s])).length&&l.push(a);l.property=o,l.type=e,l._isMultiPolygon=!0,this.currentLayer.layerData.push(l);break;case"linestring":var d=Y.isNullOrUndefined(this.currentLayer.shapeSettings.border.width)?1:"string"==typeof this.currentLayer.shapeSettings.border.width?parseInt(this.currentLayer.shapeSettings.border.width,10):this.currentLayer.shapeSettings.border.width;t.map(function(e){c=e[1],u=e[0];e=B(c,u,n.currentFactor,n.currentLayer,n.mapObject);n.calculateBox(e,d),a.push({point:e,lat:c,lng:u})}),a.property=o,a.type=e,this.currentLayer.layerData.push(a);break;case"multilinestring":var p=Y.isNullOrUndefined(this.currentLayer.shapeSettings.border.width)?1:"string"==typeof this.currentLayer.shapeSettings.border.width?parseInt(this.currentLayer.shapeSettings.border.width,10):this.currentLayer.shapeSettings.border.width,h=[];t.map(function(e){a=[],e.map(function(e){c=e[1],u=e[0];e=B(c,u,n.currentFactor,n.currentLayer,n.mapObject);n.calculateBox(e,p),a.push({point:e,lat:c,lng:u})}),h.push(a)}),h.property=o,h.type=e,this.currentLayer.layerData.push(h);break;case"point":var m=(Y.isNullOrUndefined(this.currentLayer.shapeSettings.border.width)?1:"string"==typeof this.currentLayer.shapeSettings.border.width?parseInt(this.currentLayer.shapeSettings.border.width,10):this.currentLayer.shapeSettings.border.width)+2*this.currentLayer.shapeSettings.circleRadius,c=t[1],u=t[0],g=B(c,u,this.currentFactor,this.currentLayer,this.mapObject);this.calculateBox(g,m),this.currentLayer.layerData.push({point:g,type:e,lat:c,lng:u,property:o});break;case"multipoint":var y=(Y.isNullOrUndefined(this.currentLayer.shapeSettings.border.width)?1:"string"==typeof this.currentLayer.shapeSettings.border.width?parseInt(this.currentLayer.shapeSettings.border.width,10):this.currentLayer.shapeSettings.border.width)+2*this.currentLayer.shapeSettings.circleRadius,a=[];t.map(function(e){c=e[1],u=e[0];e=B(c,u,n.currentFactor,n.currentLayer,n.mapObject);n.calculateBox(e,y),a.push({point:e,lat:c,lng:u})}),a.property=o,a.type=e,this.currentLayer.layerData.push(a);break;case"path":this.currentLayer.layerData.push({point:i.d,type:e,property:o})}},g.prototype.calculateBox=function(e,t){Y.isNullOrUndefined(this.rectBounds)?this.rectBounds={min:{x:e.x-t,y:e.y-t},max:{x:e.x+t,y:e.y+t}}:(this.rectBounds.min.x=Math.min(this.rectBounds.min.x,e.x-t),this.rectBounds.min.y=Math.min(this.rectBounds.min.y,e.y-t),this.rectBounds.max.x=Math.max(this.rectBounds.max.x,e.x+t),this.rectBounds.max.y=Math.max(this.rectBounds.max.y,e.y+t))},g.prototype.calculateFactor=function(e){var t,i,o=1,n=this.mapObject.baseMapBounds,a=new H(this.mapObject.mapAreaRect.width,this.mapObject.mapAreaRect.height-5);return n?(i=B(n.latitude.min,n.longitude.min,null,e,this.mapObject),t=(n=B(n.latitude.max,n.longitude.max,null,e,this.mapObject)).y-i.y,i=n.x-i.x,0!==t&&0!==i||(i=a.width/2,t=a.height)):t=i=500,e=t<a.height?parseFloat(Math.abs(100*Number(a.height/Number(t.toString()+"e+1"))).toString().split(".")[0])/10:a.height/t,o=i<a.width?parseFloat(Math.abs(100*Number(a.width/Number(i.toString()+"e+1"))).toString().split(".")[0])/10:a.width/i,Math.min(o,e)},g.prototype.translateLayerElements=function(e){if(this.mapObject.translateType="layer",Y.isNullOrUndefined(this.mapObject.baseMapRectBounds)){if(this.mapObject.isTileMap&&!Y.isNullOrUndefined(this.mapObject.scale))for(var t=0;t<e.childElementCount;t++)-1<(s=e.childNodes[t]).id.indexOf("_Markers_Group")||-1<s.id.indexOf("_bubble_Group")||-1<s.id.indexOf("_dataLableIndex_Group")||-1<s.id.indexOf("_line_Group")||-1===s.id.indexOf("_Polygons_Group")&&(r="scale( "+this.mapObject.scale+" ) translate( "+this.mapObject.translatePoint.x+" "+this.mapObject.translatePoint.y+" ) ",s.setAttribute("transform",r))}else{var i="Disable"===Y.animationMode?0:0===this.currentLayer.animationDuration&&"Enable"===Y.animationMode?1e3:this.currentLayer.animationDuration,o=0!==i||Y.isNullOrUndefined(this.mapObject.zoomModule),n=(this.mapObject.baseTranslatePoint=this.mapObject.zoomTranslatePoint,void 0),n=(1<this.mapObject.zoomSettings.zoomFactor&&!Y.isNullOrUndefined(this.mapObject.zoomModule)?at:nt)(this.mapObject,this.currentLayer,o),a=this.mapObject.previousScale=n.scale,l=this.mapObject.previousPoint=n.location;this.mapObject.baseTranslatePoint=this.mapObject.translatePoint=l,this.mapObject.baseScale=this.mapObject.scale=a;for(var r,s,d=0;d<e.childElementCount;d++)-1<(s=e.childNodes[d]).id.indexOf("_Markers_Group")||-1<s.id.indexOf("_bubble_Group")||-1<s.id.indexOf("_dataLableIndex_Group")||(r="scale( "+a+" ) translate( "+l.x+" "+l.y+" ) ",s.setAttribute("transform",r),0<i&&!Y.isNullOrUndefined(this.mapObject.zoomModule)&&(n=(1<this.mapObject.zoomSettings.zoomFactor?at:nt)(this.mapObject,this.currentLayer),this.mapObject.scale=n.scale,this.mapObject.zoomTranslatePoint=this.mapObject.translatePoint=n.location))}},g.prototype.calculateRectBounds=function(e){var o=this;Array.prototype.forEach.call(e,function(e){if(!Y.isNullOrUndefined(e.geometry)||!Y.isNullOrUndefined(e.coordinates)){var t=(Y.isNullOrUndefined(e.geometry)?e:e.geometry).type,i=(Y.isNullOrUndefined(e.geometry)?e:e.geometry).coordinates;switch(t.toLowerCase()){case"polygon":o.calculateRectBox(i[0]);break;case"multipolygon":i.map(function(e){o.calculateRectBox(e[0])});break;case"multilinestring":i.map(function(e){e.map(function(e,t){o.calculateRectBox(e,"multilinestring",0===t)})});break;case"linestring":i.map(function(e,t){o.calculateRectBox(e,"linestring",0===t)});break;case"point":o.calculateRectBox(i,"point");break;case"multipoint":i.map(function(e,t){o.calculateRectBox(e,"multipoint",0===t)})}}})},g.prototype.calculatePolygonBox=function(e){var o=this,n=[],a=this.mapObject.baseMapBounds;return e.map(function(e){var t,i=e[1],e=e[0];e>=a.longitude.min&&e<=a.longitude.max&&i>=a.latitude.min&&i<=a.latitude.max&&(t=B(i,e,o.currentFactor,o.currentLayer,o.mapObject),Y.isNullOrUndefined(o.rectBounds)?o.rectBounds={min:{x:t.x,y:t.y},max:{x:t.x,y:t.y}}:(o.rectBounds.min.x=Math.min(o.rectBounds.min.x,t.x),o.rectBounds.min.y=Math.min(o.rectBounds.min.y,t.y),o.rectBounds.max.x=Math.max(o.rectBounds.max.x,t.x),o.rectBounds.max.y=Math.max(o.rectBounds.max.y,t.y)),n.push({point:t,lat:i,lng:e}))}),n},g.prototype.calculateRectBox=function(e,t,i){var o=this;"linestring"!==t&&"multilinestring"!==t&&"point"!==t&&"multipoint"!==t?Array.prototype.forEach.call(e,function(e){Y.isNullOrUndefined(o.mapObject.baseMapBounds)?o.mapObject.baseMapBounds=new ae({min:e[1],max:e[1]},{min:e[0],max:e[0]}):(o.mapObject.baseMapBounds.latitude.min=Math.min(o.mapObject.baseMapBounds.latitude.min,e[1]),o.mapObject.baseMapBounds.latitude.max=Math.max(o.mapObject.baseMapBounds.latitude.max,e[1]),o.mapObject.baseMapBounds.longitude.min=Math.min(o.mapObject.baseMapBounds.longitude.min,e[0]),o.mapObject.baseMapBounds.longitude.max=Math.max(o.mapObject.baseMapBounds.longitude.max,e[0]))}):(i||"point"===t)&&Y.isNullOrUndefined(this.mapObject.baseMapBounds)?this.mapObject.baseMapBounds=new ae({min:e[1],max:e[1]},{min:e[0],max:e[0]}):(this.mapObject.baseMapBounds.latitude.min=Math.min(this.mapObject.baseMapBounds.latitude.min,e[1]),this.mapObject.baseMapBounds.latitude.max=Math.max(this.mapObject.baseMapBounds.latitude.max,e[1]),this.mapObject.baseMapBounds.longitude.min=Math.min(this.mapObject.baseMapBounds.longitude.min,e[0]),this.mapObject.baseMapBounds.longitude.max=Math.max(this.mapObject.baseMapBounds.longitude.max,e[0]))},g.prototype.generateTiles=function(e,t,i,o,n){var a,l=this.mapObject.locale,r=this.mapObject.availableSize,s=(this.tiles=[],c=a=Math.pow(2,e),0),d=0,p=(t.x+256*c<r.width&&(s=0<t.x?Math.ceil(t.x/256):0,d=t.x+256*c<r.width?Math.ceil((r.width-(t.x+256*c))/256):0),c+=s+d,"Pan"===i?(c=this.horizontalPanXCount>=c?this.horizontalPanXCount:c,this.horizontalPan=!1):(this.horizontalPanXCount=c,this.horizontalPan=!0),this.mapObject.layers[this.mapObject.baseLayerIndex]),h=(this.urlTemplate=p.urlTemplate,Math.min(a,(-t.y+r.height)/256+1)),m=Math.min(c,(-t.x+r.width+256*d)/256+1),c=-(t.x+256*s+256)/256,u=-(t.y+256)/256;o=o||this.bing||this.mapObject.bingMap;for(var g=Math.round(c);g<Math.round(m);g++)for(var y=Math.round(u);y<Math.round(h);y++){var f,b=256*g+t.x,S=256*y+t.y;-256<b&&b<=r.width&&-256<S&&S<r.height&&0<=y&&((f=new wo((g<0?g%a+a:g)%a,y)).left=Math.round(b),f.top=Math.round(S),o&&!Y.isNullOrUndefined(p.urlTemplate)&&""!==p.urlTemplate&&-1<p.urlTemplate.indexOf("quadkey")?f.src=o.getBingMap(f,"","",l,o.imageUrl,o.subDomains):(o=null,f.src=this.urlTemplate.replace("level",e.toString()).replace("tileX",f.x.toString()).replace("tileY",f.y.toString())),this.tiles.push(f))}Y.isNullOrUndefined(i)||(1<i.indexOf("wheel")?(this.animateToZoomX=this.mapObject.availableSize.width/2-n.x-10,this.animateToZoomY=-n.y):(this.animateToZoomX=-10,this.animateToZoomY=10-(this.mapObject.availableSize.height/2+11.5)));for(var v=Y.extend([],this.tiles,[],!0),x=0,O=this.mapObject.layers;x<O.length;x++){var C=O[x];if("SubLayer"===C.type&&C.visible&&(Y.isNullOrUndefined(C.shapeData)&&!Y.isNullOrUndefined(C.urlTemplate)&&""!==C.urlTemplate))for(var _=0,M=v;_<M.length;_++){var L=M[_],P=Y.extend({},L,{},!0);C.urlTemplate.indexOf("quadkey")?(o=new an(this.mapObject),P.src=o.getBingMap(P,"","",l,o.imageUrl,o.subDomains)):P.src=C.urlTemplate.replace("level",e.toString()).replace("tileX",L.x.toString()).replace("tileY",L.y.toString()),this.tiles.push(P)}}(this.mapObject.previousScale!==this.mapObject.scale||this.mapObject.isReset||this.mapObject.isZoomByPosition||this.mapObject.zoomNotApplied)&&this.arrangeTiles(i,this.animateToZoomX,this.animateToZoomY)},g.prototype.arrangeTiles=function(p,e,t){var h=this,m=document.getElementById(this.mapObject.element.id+"_tile_parent"),c=document.getElementById(this.mapObject.element.id+"_tiles"),e=Y.isNullOrUndefined(p)||"Pan"===p||(this.tileAnimation(p,e,t),"Disable"===Y.animationMode)?0:0===this.mapObject.layersCollection[0].animationDuration&&"Enable"===Y.animationMode?1e3:this.mapObject.layersCollection[0].animationDuration;setTimeout(function(){var e;m&&(m.style.zIndex="1"),c&&(c.style.zIndex="0"),!document.getElementById(h.mapObject.element.id+"_animated_tiles")&&m?(e=Y.createElement("div",{id:h.mapObject.element.id+"_animated_tiles"}),m.appendChild(e)):"Pan"!==p&&c&&m?(c.appendChild(m.children[0]),h.mapObject.isAddLayer||Y.isNullOrUndefined(document.getElementById(h.mapObject.element.id+"_animated_tiles"))||(document.getElementById(h.mapObject.element.id+"_animated_tiles").id=h.mapObject.element.id+"_animated_tiles_old"),e=Y.createElement("div",{id:h.mapObject.element.id+"_animated_tiles"}),m.appendChild(e)):e=m?m.children[0]:null;for(var t=0;t<h.tiles.length;t++){var i,o,n=h.tiles[t],a=null,l=h.mapObject.element.id;"Pan"===p?(o=document.getElementById(l+"_tile_"+t),i=!1,a=Y.isNullOrUndefined(o)?(i=!0,o=Y.createElement("div",{id:l+"_tile_"+t}),Y.createElement("img")):(o.style.removeProperty("display"),o.children[0]),!i&&a&&a.src!==n.src&&(a.src=n.src),o.style.position="absolute",o.style.left=n.left+"px",o.style.top=n.top+"px",o.style.height=n.height+"px",o.style.width=n.width+"px",i&&(a.setAttribute("height","256px"),a.setAttribute("width","256px"),a.setAttribute("src",n.src),a.setAttribute("alt",h.mapObject.getLocalizedLabel("ImageNotFound")),a.style.setProperty("user-select","none"),o.appendChild(a),e.appendChild(o))):((a=Y.createElement("img")).setAttribute("height","256px"),a.setAttribute("width","256px"),a.setAttribute("src",n.src),a.style.setProperty("user-select","none"),a.setAttribute("alt",h.mapObject.getLocalizedLabel("ImageNotFound")),(o=Y.createElement("div",{id:l+"_tile_"+t})).style.position="absolute",o.style.left=n.left+"px",o.style.top=n.top+"px",o.style.height=n.height+"px",o.style.width=n.width+"px",o.appendChild(a),e&&e.appendChild(o)),t===h.tiles.length-1&&document.getElementById(h.mapObject.element.id+"_animated_tiles_old")&&P(h.mapObject.element.id+"_animated_tiles_old")}if(!Y.isNullOrUndefined(h.mapObject.currentTiles))for(var r=h.tiles.length;r<e.childElementCount;r++){for(var s=!1,d=0;d<h.mapObject.currentTiles.childElementCount;d++)s||h.mapObject.currentTiles.children[d].id!==e.children[r].id||(s=!0);s?e.children[r].style.display="none":e.removeChild(e.children[r])}},e)},g.prototype.tileAnimation=function(e,t,i){var o=document.getElementById(this.mapObject.element.id+"_tile_parent"),n=document.getElementById(this.mapObject.element.id+"_animated_tiles"),a=document.getElementById(this.mapObject.element.id+"_tiles"),l="2";if(0===e.indexOf("ZoomOut")||"Reset"===e){for(a.style.zIndex="1",o.style.zIndex="0";1<=a.childElementCount;)a.removeChild(a.children[0]);t=0,i=document.getElementById(this.mapObject.element.id+"_tile_parent").getClientRects()[0].height/4,l=0===e.indexOf("ZoomOut")?"0.5":"0.2"}Y.isNullOrUndefined(n)||(n.style.transition="Disable"===Y.animationMode?"0ms":0===this.mapObject.layersCollection[0].animationDuration&&"Enable"===Y.animationMode?"1000ms":this.mapObject.layersCollection[0].animationDuration+"ms",n.style.transform="translate("+t+"px, "+i+"px) scale("+l+")")},g.prototype.panTileMap=function(e,t,i){this.mapObject.tileZoomLevel<=this.mapObject.tileZoomScale&&this.mapObject.initialCheck&&(this.mapObject.tileZoomLevel=this.mapObject.tileZoomScale);var o=this.mapObject.tileZoomLevel,n=256*Math.pow(2,o),a=e/2-n/2,l=t/2-n/2,r=R(i,o,{x:a,y:l},this.isMapCoordinates),s=this.mapObject.zoomNotApplied?0:20;return a-=r.x-e/2,l=l-(r.y-t/2)+s,this.mapObject.scale=Math.pow(2,o-1),(Y.isNullOrUndefined(this.mapObject.tileTranslatePoint)||0===this.mapObject.tileTranslatePoint.y&&0===this.mapObject.tileTranslatePoint.x||Y.isNullOrUndefined(this.mapObject.previousTileWidth)||Y.isNullOrUndefined(this.mapObject.previousTileHeight))&&(this.mapObject.previousTileWidth=e,this.mapObject.previousTileHeight=t),Y.isNullOrUndefined(this.mapObject.tileTranslatePoint)||!Y.isNullOrUndefined(i.x)||1!==this.mapObject.zoomSettings.zoomFactor&&this.mapObject.zoomSettings.zoomFactor===o&&this.mapObject.defaultState||e===this.mapObject.previousTileWidth&&t===this.mapObject.previousTileHeight||(r=a-(this.mapObject.previousTileWidth/2-n/2),i=l-(this.mapObject.previousTileHeight/2-n/2+s),this.mapObject.tileTranslatePoint.x=this.mapObject.tileTranslatePoint.x+r,this.mapObject.tileTranslatePoint.y=this.mapObject.tileTranslatePoint.y+i),Y.isNullOrUndefined(this.mapObject.tileTranslatePoint)||this.mapObject.zoomNotApplied||(0===this.mapObject.tileTranslatePoint.x||this.mapObject.tileTranslatePoint.x===a||this.mapObject.centerPositionChanged||(a=this.mapObject.tileTranslatePoint.x),0===this.mapObject.tileTranslatePoint.y)||this.mapObject.tileTranslatePoint.y===l||this.mapObject.centerPositionChanged||(l=this.mapObject.tileTranslatePoint.y),this.mapObject.translatePoint=new J((a-.01*this.mapObject.zoomSettings.zoomFactor)/this.mapObject.scale,(l-.01*this.mapObject.zoomSettings.zoomFactor)/this.mapObject.scale),this.mapObject.previousTileWidth=e,this.mapObject.previousTileHeight=t,new J(a,l)},g.prototype.destroy=function(){this.mapObject=null,this.groupElements=[],this.layerObject=null,this.currentLayer=null,this.rectBounds=null,this.tiles=[],this.clipRectElement=null,this.tileSvgObject=null,this.ajaxModule=null,this.ajaxResponse=[],this.layerGroup=null,Y.isNullOrUndefined(this.bing)||this.bing.destroy(),this.bing=null};var dn=g;function g(e){this.isMapCoordinates=!0,this.horizontalPan=!1,this.horizontalPanXCount=0,this.mapObject=e,this.ajaxModule=new Y.Fetch,this.ajaxResponse=[]}hn.prototype.renderAnnotationElements=function(){var i=this,e=this.map.element.id+"_Secondary_Element",o=Y.createElement("div",{id:this.map.element.id+"_Annotations_Group"});o.style.position="absolute",o.style.top="0px",o.style.left="0px",this.map.annotations.map(function(e,t){null!==e.content&&i.createAnnotationTemplate(o,e,t)}),0<o.childElementCount&&!Y.isNullOrUndefined(N(e))&&N(e).appendChild(o),this.map.renderReactTemplates()},hn.prototype.createAnnotationTemplate=function(e,t,o){var n,a,l=this,i=this.map,r=i.availableSize,s=Y.createElement("div",{id:i.element.id+"_Annotation_"+o}),d=(s.style.cssText="position: absolute; z-index:"+t.zIndex+";",{cancel:!1,name:$o,content:t.content,annotation:t}),p=(this.map.trigger($o,d,function(e){if(!d.cancel)if((n=dt(d.content,l.map))&&n(l.map,l.map,d.content,l.map.element.id+"_ContentTemplate_"+o).length)for(var t=(a=Array.prototype.slice.call(n(l.map,l.map,d.content,l.map.element.id+"_ContentTemplate_"+o))).length,i=0;i<t;i++)s.appendChild(a[i]);else s.appendChild(Y.createElement("div",{innerHTML:d.content}))}),Mt(s.cloneNode(!0),i.element)),h=i.element.getBoundingClientRect(),m=i.svgObject.getBoundingClientRect(),c=Math.abs(m.left-h.left),u=Math.abs(m.top-h.top),i=Y.isNullOrUndefined(t.x)?"0%":t.x,h=Y.isNullOrUndefined(t.y)?"0%":t.y,g=-1<i.indexOf("%")?r.width/100*parseFloat(i):parseFloat(i),y=-1<h.indexOf("%")?r.height/100*parseFloat(h):parseFloat(h);switch(c="None"===t.horizontalAlignment?c+g:c,u="None"===t.verticalAlignment?u+y:u,t.verticalAlignment){case"Near":u+=y;break;case"Center":u=u+y+(m.height/2-p.height/2);break;case"Far":u=u+m.height+y-p.height}switch(t.horizontalAlignment){case"Near":c+=g;break;case"Center":c=c+g+(m.width/2-p.width/2);break;case"Far":c=c+m.width+g-p.width}s.style.left=c+"px",s.style.top=u+"px",e.appendChild(s)},hn.prototype.getModuleName=function(){return"Annotations"},hn.prototype.destroy=function(){this.map=null};var pn=hn;function hn(e){this.map=e}mn=function(e,t){return(mn=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}))(e,t)};var mn,cn,i=function(e,t){function i(){this.constructor=e}mn(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},y=function(e,t,i,o){var n,a=arguments.length,l=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,i,o);else for(var r=e.length-1;0<=r;r--)(n=e[r])&&(l=(a<3?n(l):3<a?n(t,i,l):n(t,i))||l);return 3<a&&l&&Object.defineProperty(t,i,l),l},i=(cn=Y.Component,i(f,cn),Object.defineProperty(f.prototype,"isShapeSelected",{get:function(){return this.mapSelect},enumerable:!0,configurable:!0}),f.prototype.mergePersistMapsData=function(){var e;try{i=window.localStorage}catch(e){i=null}if(Y.isNullOrUndefined(i)||(e=window.localStorage.getItem(this.getModuleName()+this.element.id)),!Y.isNullOrUndefined(e)&&""!==e){var t=JSON.parse(e),i=Object.keys(t);this.isProtectedOnChange=!0;for(var o=0,n=i;o<n.length;o++){var a=n[o];"object"!=typeof this[a]||Y.isNullOrUndefined(this[a])?this[a]=t[a]:Y.extend(this[a],t[a])}this.isProtectedOnChange=!1}},f.prototype.getLocalizedLabel=function(e){return this.localeObject.getConstant(e)},f.prototype.preRender=function(){this.isDevice=Y.Browser.isDevice,this.initPrivateVariable(),this.allowServerDataBinding=!1,this.unWireEVents(),this.wireEVents(),this.setCulture()},f.prototype.renderElements=function(){this.isDestroyed||(this.trigger("load",{maps:this}),this.createSVG(),this.findBaseAndSubLayers(),!Y.isNullOrUndefined(this.markerModule)&&this.markerModule.getMapsInstance()&&this.markerModule.initializeMarkerClusterList(),this.createSecondaryElement(),this.addTabIndex(),this.themeStyle=function(e){var t,i;switch(e.toLowerCase()){case"materialdark":i="#303030";break;case"fabricdark":i="#201F1F";break;case"bootstrapdark":i="#1A1A1A"}switch(e.toLowerCase()){case"materialdark":case"fabricdark":case"bootstrapdark":t={backgroundColor:i,areaBackgroundColor:i,titleFontColor:"#FFFFFF",titleFontSize:"14px",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#DADADA",legendTextColor:"#DADADA",dataLabelFontColor:"#DADADA",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#363F4C",zoomFillColor:"#FFFFFF",labelFontFamily:"Roboto, Noto, Sans-serif",fontFamily:"Roboto, Noto, Sans-serif",fontSize:"12px",legendFontSize:"12px",fontWeight:"Medium",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};break;case"highcontrast":t={backgroundColor:"#000000",areaBackgroundColor:"#000000",titleFontColor:"#FFFFFF",titleFontSize:"14px",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#FFFFFF",legendTextColor:"#FFFFFF",dataLabelFontColor:"#000000",tooltipFontColor:"#000000",tooltipFillColor:"#ffffff",zoomFillColor:"#FFFFFF",fontFamily:"Roboto, Noto, Sans-serif",fontSize:"12px",legendFontSize:"12px",fontWeight:"Medium",labelFontFamily:"Roboto, Noto, Sans-serif",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};break;case"bootstrap4":t={backgroundColor:"#FFFFFF",areaBackgroundColor:"#FFFFFF",titleFontColor:"#212529",subTitleFontColor:"#212529",legendTitleFontColor:"#212529",legendTextColor:"#212529",dataLabelFontColor:"#212529",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#000000",zoomFillColor:"#5B6269",fontFamily:"HelveticaNeue-Medium",fontSize:"12px",fontWeight:"Medium",titleFontSize:"16px",legendFontSize:"14px",tooltipFillOpacity:1,tooltipTextOpacity:.9,labelFontFamily:"HelveticaNeue-Medium",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};break;case"tailwind":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#374151",subTitleFontColor:"#374151",legendTitleFontColor:"#374151",legendTextColor:"#6B7280",dataLabelFontColor:"#505967",tooltipFontColor:"#F9FAFB",tooltipFillColor:"#111827",zoomFillColor:"#6b7280",fontFamily:"Inter",fontSize:"12px",fontWeight:"Medium",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:.9,labelFontFamily:"Inter",titleFontWeight:"500",zoomSelectionColor:"#374151",shapeFill:"#E5E7EB",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};break;case"tailwinddark":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#D1D5DB",subTitleFontColor:"#D1D5DB",legendTitleFontColor:"#D1D5DB",legendTextColor:"#D1D5DB",dataLabelFontColor:"#D1D5DB",tooltipFontColor:"#1F2937",tooltipFillColor:"#F9FAFB",zoomFillColor:"#D1D5DB",fontFamily:"Inter",fontSize:"12px",fontWeight:"Medium",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:.9,labelFontFamily:"Inter",titleFontWeight:"500",zoomSelectionColor:"#F3F4F6",shapeFill:"#374151",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};break;case"bootstrap5":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#212529",subTitleFontColor:"#212529",legendTitleFontColor:"#212529",legendTextColor:"#212529",dataLabelFontColor:"#212529",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#000000",zoomFillColor:"#6E757D",fontFamily:"Segoe UI",fontSize:"10px",fontWeight:"400",titleFontSize:"14px",subTitleFontSize:"12px",legendFontSize:"10px",tooltipFillOpacity:.9,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"400",zoomSelectionColor:"#212529",zoomBorderColor:"#DEE2E6",shapeFill:"#E9ECEF",shapeBorderColor:"#DEE2E6",zoomButtonRadius:32,rectangleZoomBorderColor:"#0D6EFD",rectangleZoomFillColor:"#86B7FE",rectangleZoomFillOpacity:.3,legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent"};break;case"bootstrap5dark":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#DEE2E6",subTitleFontColor:"#DEE2E6",legendTitleFontColor:"#DEE2E6",legendTextColor:"#DEE2E6",dataLabelFontColor:"#DEE2E6",tooltipFontColor:"#212529",tooltipFillColor:"#FFFFFF",zoomFillColor:"#ADB5BD",fontFamily:"Segoe UI",fontSize:"10px",fontWeight:"400",titleFontSize:"14px",subTitleFontSize:"12px",legendFontSize:"10px",tooltipFillOpacity:.9,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"400",zoomSelectionColor:"#F8F9FA",zoomBorderColor:"#495057",shapeFill:"#343A40",shapeBorderColor:"#495057",zoomButtonRadius:32,rectangleZoomFillColor:"#86B7FE",rectangleZoomBorderColor:"#0D6EFD",rectangleZoomFillOpacity:.3,legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent"};break;case"fluent":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#201F1E",subTitleFontColor:"#201F1E",legendTitleFontColor:"#201F1E",legendTextColor:"#201F1E",dataLabelFontColor:"#201F1E",tooltipFontColor:"#323130",tooltipFillColor:"#FFFFFF",zoomFillColor:"#A19F9D",fontFamily:"Segoe UI",fontSize:"12px",fontWeight:"Medium",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"600",zoomSelectionColor:"#323130",shapeFill:"#F3F2F1",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};break;case"fluentdark":t={backgroundColor:"rgba(255,255,255, 0.0)",areaBackgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#F3F2F1",subTitleFontColor:"#F3F2F1",legendTitleFontColor:"#F3F2F1",legendTextColor:"#F3F2F1",dataLabelFontColor:"#F3F2F1",tooltipFontColor:"#F3F2F1",tooltipFillColor:"#252423",zoomFillColor:"#484644",fontFamily:"Segoe UI",fontSize:"12px",fontWeight:"Medium",titleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"600",zoomSelectionColor:"#F3F2F1",shapeFill:"#252423",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};break;case"material3":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#1C1B1F",subTitleFontColor:"#1C1B1F",legendTitleFontColor:"#1C1B1F",legendTextColor:"#49454E",dataLabelFontColor:"#1C1B1F",tooltipFontColor:"#F4EFF4",tooltipFillColor:"#313033",zoomFillColor:"#49454E",fontFamily:"Roboto",fontSize:"14px",titleFontSize:"16px",subTitleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Roboto",titleFontWeight:"500",fontWeight:"400",zoomSelectionColor:"#49454E",shapeFill:"#E7E0EC",shapeBorderColor:"#000000",rectangleZoomFillColor:"#6750A4",rectangleZoomFillOpacity:.24,rectangleZoomBorderColor:"#6750A4",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};break;case"material3dark":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#E6E1E5",subTitleFontColor:"#E6E1E5",legendTitleFontColor:"#E6E1E5",legendTextColor:"#CAC4D0",dataLabelFontColor:"#E6E1E5",tooltipFontColor:"#313033",tooltipFillColor:"#E6E1E5",zoomFillColor:"#E6E1E5",fontFamily:"Roboto",fontSize:"14px",titleFontSize:"16px",subTitleFontSize:"14px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Roboto",titleFontWeight:"500",fontWeight:"400",zoomSelectionColor:"#E6E1E5",shapeFill:"#49454F",shapeBorderColor:"#000000",rectangleZoomFillColor:"#D0BCFF",rectangleZoomFillOpacity:.24,rectangleZoomBorderColor:"#D0BCFF",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30};break;case"fluent2":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#242424",subTitleFontColor:"#242424",legendTitleFontColor:"#242424",legendTextColor:"#242424",dataLabelFontColor:"#242424",tooltipFontColor:"#242424",tooltipFillColor:"#FFFFFF",zoomFillColor:"#D1D1D1",fontFamily:"Segoe UI",fontSize:"10px",fontWeight:"400",titleFontSize:"14px",subTitleFontSize:"12px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"600",zoomSelectionColor:"#242424",shapeFill:"#E6E6E6",shapeBorderColor:"#EBEBEB",rectangleZoomFillColor:"#B4D6FA",rectangleZoomFillOpacity:.25,rectangleZoomBorderColor:"#0F6CBD",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:32};break;case"fluent2dark":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#FFFFFF",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#FFFFFF",legendTextColor:"#FFFFFF",dataLabelFontColor:"#FFFFFF",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#292929",zoomFillColor:"#666",fontFamily:"Segoe UI",fontSize:"10px",fontWeight:"400",titleFontSize:"14px",subTitleFontSize:"12px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"600",zoomSelectionColor:"#FFFFFF",shapeFill:"#333333",shapeBorderColor:"#000000",rectangleZoomFillColor:"#0E4775",rectangleZoomFillOpacity:.25,rectangleZoomBorderColor:"#0E4775",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:32};break;case"fluent2highcontrast":t={backgroundColor:"transparent",areaBackgroundColor:"transparent",titleFontColor:"#FFFFFF",subTitleFontColor:"#FFFFFF",legendTitleFontColor:"#FFFFFF",legendTextColor:"#FFFFFF",dataLabelFontColor:"#FFFFFF",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#000000",zoomFillColor:"#3FF23F",fontFamily:"Segoe UI",fontSize:"10px",fontWeight:"400",titleFontSize:"14px",subTitleFontSize:"12px",legendFontSize:"12px",tooltipFillOpacity:1,tooltipTextOpacity:1,labelFontFamily:"Segoe UI",titleFontWeight:"600",zoomSelectionColor:"#FFFFFF",zoomBorderColor:"#FFFFFF",shapeFill:"#FFFFFF",shapeBorderColor:"#FFFFFF",rectangleZoomFillColor:"#1AEBFF",rectangleZoomFillOpacity:.25,rectangleZoomBorderColor:"#1AEBFF",legendBorderColor:"#FFFFFF",legendBorderWidth:1,tooltipBorderColor:"#FFF",zoomButtonRadius:32};break;default:t={backgroundColor:"#FFFFFF",areaBackgroundColor:"#FFFFFF",titleFontColor:"#424242",titleFontSize:"14px",subTitleFontColor:"#424242",legendTitleFontColor:"#757575",legendTextColor:"#757575",dataLabelFontColor:"#000000",tooltipFontColor:"#FFFFFF",tooltipFillColor:"#000000",zoomFillColor:"#737373",labelFontFamily:"Roboto, Noto, Sans-serif",fontFamily:"Roboto, Noto, Sans-serif",fontSize:"12px",legendFontSize:"12px",fontWeight:"Medium",titleFontWeight:"Medium",zoomSelectionColor:"#e61576",shapeFill:"#A6A6A6",shapeBorderColor:"#000000",rectangleZoomFillColor:"#d3d3d3",rectangleZoomFillOpacity:.5,rectangleZoomBorderColor:"#009900",legendBorderColor:"#000000",legendBorderWidth:0,tooltipBorderColor:"transparent",zoomButtonRadius:30}}return t}(this.theme),this.renderBorder(),this.renderTitle(this.titleSettings,"title",null,null),this.renderArea(),this.processRequestJsonData(),this.renderComplete(),this.isAddLayer=!!this.isTileMap&&this.isAddLayer)},f.prototype.render=function(){this.renderElements()},f.prototype.processRequestJsonData=function(){var o,n,a=this,l=this.layersCollection.length-1;this.serverProcess={request:0,response:0},Array.prototype.forEach.call(this.layersCollection,function(i,e){if(i.shapeData instanceof O.DataManager?(a.serverProcess.request++,n=i.shapeData,o=i.query instanceof O.Query?i.query:new O.Query,n.executeQuery(o).then(function(e){a.processResponseJsonData("DataManager",e,i,"ShapeData")})):(i.shapeData instanceof Bt||i.shapeData)&&!Y.isNullOrUndefined(i.shapeData.dataOptions)&&a.processAjaxRequest(i,i.shapeData,"ShapeData"),i.dataSource instanceof O.DataManager&&(a.serverProcess.request++,n=i.dataSource,o=i.query instanceof O.Query?i.query:new O.Query,n.executeQuery(o).then(function(e){i.dataSource=Dt(e)})),0<i.markerSettings.length)for(var t=0;t<i.markerSettings.length;t++)!function(t){i.markerSettings[t].dataSource instanceof O.DataManager&&(a.serverProcess.request++,n=i.markerSettings[t].dataSource,o=i.markerSettings[t].query instanceof O.Query?i.markerSettings[t].query:new O.Query,n.executeQuery(o).then(function(e){i.markerSettings[t].dataSource=Dt(e)}))}(t);if(0<i.bubbleSettings.length)for(t=0;t<i.bubbleSettings.length;t++)!function(t){i.bubbleSettings[t].dataSource instanceof O.DataManager&&(a.serverProcess.request++,n=i.bubbleSettings[t].dataSource,o=i.bubbleSettings[t].query instanceof O.Query?i.bubbleSettings[t].query:new O.Query,n.executeQuery(o).then(function(e){i.bubbleSettings[t].dataSource=Dt(e)}))}(t);(i.dataSource instanceof Bt||!Y.isNullOrUndefined(i.dataSource)&&!Y.isNullOrUndefined(i.dataSource.dataOptions))&&a.processAjaxRequest(i,i.dataSource,"DataSource"),a.serverProcess.request===a.serverProcess.response&&l===e&&a.processResponseJsonData(null)})},f.prototype.processAjaxRequest=function(o,e,n){var a=this,t=(this.serverProcess.request++,new Y.Fetch(e.dataOptions,e.type,e.contentType));t.onSuccess=function(e){var t,i;Y.isNullOrUndefined(e.type)||"application/octet-stream"!==e.type?a.processResponseJsonData("Fetch",e,o,n):(t=new FileReader,i=a,t.onload=function(){e=JSON.parse(t.result.toString()),i.processResponseJsonData("Fetch",e,o,n)},t.readAsText(e))},t.send(e.sendData)},f.prototype.processResponseJsonData=function(e,t,i,o){if(this.serverProcess.response++,e&&("ShapeData"===o?i.shapeData="DataManager"===e?Dt(t):t:i.dataSource="DataManager"===e?Dt(t):t),Y.isNullOrUndefined(e)||this.serverProcess.request!==this.serverProcess.response)Y.isNullOrUndefined(e)&&this.renderMap();else{var n=this.layersCollection;this.layersCollection=[];for(var a=0;a<n.length;a++)n[a].isBaseLayer&&this.layersCollection.push(n[a]);for(var l=0;l<n.length;l++)n[l].isBaseLayer||this.layersCollection.push(n[l]);this.renderMap()}},f.prototype.renderMap=function(){this.legendModule&&this.legendSettings.visible&&this.legendModule.renderLegend(),this.createTile(),this.zoomSettings.enable&&this.zoomModule&&this.zoomModule.createZoomingToolbars(),Y.isNullOrUndefined(this.dataLabelModule)||(this.dataLabelModule.dataLabelCollections=[]),this.mapLayerPanel.measureLayerPanel(),Y.isNullOrUndefined(this.svgObject)||this.element.appendChild(this.svgObject),this.setSecondaryElementPosition();for(var e,t,i,o,n,a,l=0;l<this.layers.length;l++){if(this.layers[l].selectionSettings&&this.layers[l].selectionSettings.enable&&0<this.layers[l].initialShapeSelection.length&&this.checkInitialRender){for(var r=this.layers[l].selectionSettings.enableMultiSelect,s=(this.layers[l].selectionSettings.enableMultiSelect=r||!0,this.layers[l].initialShapeSelection),d=0;d<this.layers[l].initialShapeSelection.length;d++)this.shapeSelection(l,s[d].shapePath,s[d].shapeValue,!0);this.layers[l].selectionSettings.enableMultiSelect=r,l===this.layers.length-1&&(this.checkInitialRender=!1)}if(!this.isResize)for(var p=0;p<this.layers[l].markerSettings.length;p++)if(this.layers[l].markerSettings[p].selectionSettings&&this.layers[l].markerSettings[p].selectionSettings.enable&&0<this.layers[l].markerSettings[p].initialMarkerSelection.length)for(var h=this.layers[l].markerSettings[p].initialMarkerSelection,d=0;d<h.length;d++)this.markerInitialSelection(l,p,this.layers[l].markerSettings[p],h[d].latitude,h[d].longitude)}Y.isNullOrUndefined(document.getElementById(this.element.id+"_tile_parent"))||(n=this.svgObject.getBoundingClientRect(),e=document.getElementById(this.element.id),t=document.getElementById(this.element.id+"_tile_parent"),i=document.getElementById(this.element.id+"_tiles"),a=t.getBoundingClientRect(),o=void 0,o=parseFloat(t.style.left),n=n.bottom-a.bottom-e.offsetTop,a=parseFloat(t.style.top),a=n<=11?a:Y.isNullOrUndefined(this.legendModule)||"Bottom"!==this.legendSettings.position?2*a:this.mapAreaRect.y,o=!(n<=11)&&Y.isNullOrUndefined(this.legendModule)?2*o:o,t.style.top=a+"px",t.style.left=o+"px",i.style.top=a+"px",i.style.left=o+"px",!Y.isNullOrUndefined(this.legendModule)&&0<this.legendModule.totalPages.length&&(t.style.height=i.style.height=this.legendModule.legendTotalRect.height+"px",t.style.width=i.style.width=this.legendModule.legendTotalRect.width+"px")),this.arrangeTemplate(),this.annotationsModule&&"0px"!==this.width&&"0px"!==this.height&&"0%"!==this.width&&"0%"!==this.height&&this.annotationsModule.renderAnnotationElements(),this.element.style.outline="none",this.element.style.position="relative";for(l=0;l<document.getElementsByTagName("path").length-1;l++)-1<document.getElementsByTagName("path")[l].id.indexOf("shapeIndex")&&(document.getElementsByTagName("path")[l].style.outline="none");this.zoomingChange(),this.zoomModule&&this.isDevice&&this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.mapScaleValue,this.element.id+"_Zooming_"),this.isZoomByPosition||this.zoomNotApplied||this.triggerZoomEvent(),this.isResize=!1},f.prototype.triggerZoomEvent=function(){var e=this.getMinMaxLatitudeLongitude(),e={maps:this,isResized:this.isResize,minLatitude:e.minLatitude,maxLatitude:e.maxLatitude,minLongitude:e.minLongitude,maxLongitude:e.maxLongitude,cancel:!1,name:"Loaded"};this.trigger("loaded",e)},f.prototype.markerSelection=function(e,t,i,o){var n={color:e.border.color,width:e.border.width/t.scale,opacity:e.border.opacity},n={opacity:e.opacity,fill:e.fill,border:n,target:i.id,cancel:!1,data:o,maps:t};F("MarkerselectionMap")?gt("MarkerselectionMap","MarkerselectionMapStyle",n):document.body.appendChild(ut("MarkerselectionMap","MarkerselectionMapStyle",n)),0!==this.selectedMarkerElementId.length&&!e.enableMultiSelect||("g"===i.tagName?(i.children[0].setAttribute("class","MarkerselectionMapStyle"),this.selectedMarkerElementId.push(i.children[0].id)):(i.setAttribute("class","MarkerselectionMapStyle"),this.selectedMarkerElementId.push(i.id)))},f.prototype.markerInitialSelection=function(e,t,i,o,n){var a=i.selectionSettings;if(a.enable)for(var l=0;l<i.dataSource.length;l++){var r,s=i.dataSource[l];s.latitude===o&&s.longitude===n&&(r=this.element.id+"_LayerIndex_"+e+"_MarkerIndex_"+t+"_dataIndex_"+l,this.markerSelection(a,this,F(r),s))}},f.prototype.renderArea=function(){var e=this.mapsArea.border.width,t=this.mapsArea.background;(0<e||t||this.themeStyle.areaBackgroundColor)&&(e={opacity:Y.isNullOrUndefined(this.mapsArea.border.opacity)?1:this.mapsArea.border.opacity,color:this.mapsArea.border.color,width:this.mapsArea.border.width},t=new Q(this.element.id+"_MapAreaBorder",t||this.themeStyle.areaBackgroundColor,e,1,this.mapAreaRect),this.svgObject.appendChild(this.renderer.drawRectangle(t)))},f.prototype.addTabIndex=function(){this.element.setAttribute("aria-label",this.description||"Maps Element"),this.element.setAttribute("role","region"),this.element.tabIndex=this.tabIndex},f.prototype.setSecondaryElementPosition=function(){var e=N(this.element.id+"_Secondary_Element"),t=this.element.getBoundingClientRect(),i=N(this.element.id+"_svg");Y.isNullOrUndefined(i)||(i=i.getBoundingClientRect(),e.style.left=Math.max(i.left-t.left,0)+"px",e.style.top=Math.max(i.top-t.top,0)+"px")},f.prototype.zoomingChange=function(){if(N(this.element.id+"_Layer_Collections")&&this.zoomModule&&(this.zoomModule.layerCollectionEle=N(this.element.id+"_Layer_Collections")),this.isTileMap&&N(this.element.id+"_Tile_SVG")&&N(this.element.id+"_tile_parent")){var e=N(this.element.id+"_tile_parent"),t=N(this.element.id+"_Tile_SVG"),i=N(this.element.id+"_Tile_SVG_Parent"),o=e.getBoundingClientRect(),n=t.getBoundingClientRect(),a=o.left-n.left,l=o.top-n.top,r=(i.style.left=a+"px",i.style.top=l+"px",!Y.isNullOrUndefined(this.legendModule)&&0<this.legendModule.totalPages.length&&(e.style.width=t.style.width=this.legendModule.legendTotalRect.width.toString(),e.style.height=t.style.height=this.legendModule.legendTotalRect.height.toString(),i.style.width=this.legendModule.legendTotalRect.width+"px",i.style.height=this.legendModule.legendTotalRect.height+"px"),document.getElementsByClassName("template"));if(!Y.isNullOrUndefined(r)&&0<r.length)for(var s=0;s<r.length;s++){var d=r[s];d.style.left=a+"px",d.style.top=l+"px"}}if(0<=this.zoomSettings.zoomFactor){this.zoomModule&&this.zoomModule.toolBarGroup&&this.zoomSettings.enable&&this.zoomModule.alignToolBar();var p=document.getElementById(this.element.id+"_Layer_Collections");if(!Y.isNullOrUndefined(p)&&0<p.childElementCount)for(s=0;s<p.childNodes.length;s++){var h=p.childNodes[s];if("g"===h.tagName&&-1===h.id.indexOf("_Legend_Group"))for(var m=parseFloat(h.id.split("_LayerIndex_")[1].split("_")[0]),c=0;c<h.childNodes.length;c++){var u=h.childNodes[c];-1<u.id.indexOf("_Markers_Group")||-1<u.id.indexOf("_bubble_Group")||-1<u.id.indexOf("_dataLableIndex_Group")||Lt(u,m,this.scale,this)}}this.zoomModule&&(this.previousScale!==this.scale||this.zoomNotApplied||this.isZoomByPosition)&&this.zoomModule.applyTransform(this,!0)}},f.prototype.createSecondaryElement=function(){var e;Y.isNullOrUndefined(document.getElementById(this.element.id+"_Secondary_Element"))&&((e=Y.createElement("div",{id:this.element.id+"_Secondary_Element"})).style.cssText="position: relative;z-index:2;",this.element.appendChild(e))},f.prototype.getMinMaxLatitudeLongitude=function(){var e,t=document.getElementById(this.element.id);return Y.isNullOrUndefined(t)?{minLatitude:0,maxLatitude:0,minLongitude:0,maxLongitude:0}:(t=t.getBoundingClientRect(),e=rt(this.margin.left),e=this.isTileMap?this.pointToLatLong(this.mapAreaRect.x-e,-this.mapAreaRect.y):this.getGeoLocation(0,this.mapAreaRect.x+t.left,this.mapAreaRect.y),t=this.isTileMap?this.pointToLatLong(this.mapAreaRect.width,this.mapAreaRect.height-this.mapAreaRect.y):this.getGeoLocation(0,this.mapAreaRect.x+t.left+this.mapAreaRect.width,this.mapAreaRect.y+this.mapAreaRect.height),{minLatitude:e.latitude,maxLatitude:t.latitude,minLongitude:e.longitude,maxLongitude:t.longitude})},f.prototype.arrangeTemplate=function(){var a=this,e=(document.getElementById(this.element.id+"_Legend_Border")&&(document.getElementById(this.element.id+"_Legend_Border").style.pointerEvents="none"),document.getElementsByClassName(this.element.id+"_template"));!Y.isNullOrUndefined(e)&&0<e.length&&N(this.element.id+"_Layer_Collections")&&!this.isTileMap&&Array.prototype.forEach.call(e,function(e){var t,i,o=0,n=0;!Y.isNullOrUndefined(e)&&0<e.childElementCount&&(t=N(a.element.id+"_Layer_Collections").getBoundingClientRect(),i=N(e.id).getBoundingClientRect(),-1===e.id.indexOf("Marker")&&(o=a.isTileMap?0:t.left<i.left?-Math.abs(i.left-t.left):Math.abs(i.left-t.left),n=a.isTileMap?0:t.top<i.top?-Math.abs(i.top-t.top):Math.abs(i.top-t.top)),Array.prototype.forEach.call(e.childNodes,function(e){var t;-1!==e.id.indexOf("Marker")?"hidden"!==e.style.visibility&&(t=N(e.id).getBoundingClientRect(),e.style.left=parseFloat(e.style.left)-(a.isTileMap?0:t.width/2)+"px",e.style.top=parseFloat(e.style.top)-(a.isTileMap?0:t.height/2)+"px"):(e.style.left=parseFloat(e.style.left)+o+"px",e.style.top=parseFloat(e.style.top)+n+"px",e.style.transform="translate(-50%, -50%)")}))})},f.prototype.createTile=function(){var e,t,i=this.layersCollection[0];i.isBaseLayer&&!Y.isNullOrUndefined(i.urlTemplate)&&""!==i.urlTemplate&&Y.isNullOrUndefined(i.shapeData)&&(P(this.element.id+"_tile_parent"),P(this.element.id+"_tiles"),P("animated_tiles"),i=Y.createElement("div",{id:this.element.id+"_tile_parent"}),e=rt(this.margin.right),i.style.cssText="position: absolute; left: "+this.mapAreaRect.x+"px; right: "+e+"px; top: "+(this.mapAreaRect.y+0)+"px; height: "+this.mapAreaRect.height+"px; width: "+this.mapAreaRect.width+"px; overflow: hidden;",(t=Y.createElement("div",{id:this.element.id+"_tiles"})).style.cssText="position: absolute; left: "+this.mapAreaRect.x+"px; right: "+e+"px; top: "+(this.mapAreaRect.y+0)+"px; height: "+this.mapAreaRect.height+"px; width: "+this.mapAreaRect.width+"px; overflow: hidden;",this.element.appendChild(i),this.element.appendChild(t))},f.prototype.initPrivateVariable=function(){var e;""===this.element.id&&(e=document.getElementsByClassName("e-maps").length,this.element.id="maps_control_"+e),this.renderer=new E.SvgRenderer(this.element.id),this.mapLayerPanel=new dn(this)},f.prototype.findBaseAndSubLayers=function(){var t=this,e=this.baseLayerIndex,i=[],o=[];this.layersCollection=[],Array.prototype.forEach.call(this.layers,function(e){("Layer"===e.type?i:o).push(e)});for(var n=0;n<i.length;n++){var a=i[n];if(a.visible&&e===n){a.isBaseLayer=!0,this.isTileMap=!!Y.isNullOrUndefined(a.shapeData),this.layersCollection.push(a);break}if(n===i.length-1){this.layersCollection.push(i[0]);break}}o.map(function(e){e.visible&&t.layersCollection.push(e)})},f.prototype.renderBorder=function(){var e,t=this.border.width,i=this.svgObject.querySelector("#"+this.element.id+"_MapBorder");(0<t||this.background||this.themeStyle.backgroundColor)&&Y.isNullOrUndefined(i)?(e={opacity:Y.isNullOrUndefined(this.border.opacity)?1:this.border.opacity,color:this.border.color,width:this.border.width},e=new Q(this.element.id+"_MapBorder",this.background||this.themeStyle.backgroundColor,e,1,new K(t/2,t/2,this.availableSize.width-t,this.availableSize.height-t)),this.svgObject.appendChild(this.renderer.drawRectangle(e))):i.setAttribute("fill",this.background||this.themeStyle.backgroundColor)},f.prototype.renderTitle=function(e,t,i,o){var n,a,l,r={size:e.textStyle.size,color:e.textStyle.color,fontFamily:e.textStyle.fontFamily,fontWeight:e.textStyle.fontWeight,fontStyle:e.textStyle.fontStyle,opacity:e.textStyle.opacity},s=rt(this.margin.top),d=rt(this.margin.bottom),p=rt(this.margin.left),h=rt(this.margin.right),h=Math.abs(p+h-this.availableSize.width);r.fontFamily=(Y.isNullOrUndefined(r.fontFamily)?this.themeStyle:r).fontFamily,r.fontWeight=r.fontWeight||this.themeStyle.titleFontWeight,r.size="title"===t?r.size||this.themeStyle.titleFontSize:r.size||this.themeStyle.subTitleFontSize||At.mapsSubTitleFont.size,e.text?(Y.isNullOrUndefined(o)&&(o=this.renderer.createGroup({id:this.element.id+"_Title_Group"})),l=W(a=tt(h,e.text,r),r),i=it(Y.isNullOrUndefined(i)?new K(p,s,this.availableSize.width,this.availableSize.height):i,Y.isNullOrUndefined(e.alignment)?"Center":e.alignment,l,t),a=new se(this.element.id+"_Map_"+t,i.x,i.y,"start",a),i=new K(i.x,i.y,l.width,l.height),(l=_e(a,r,r.color||("title"===t?this.themeStyle.titleFontColor:this.themeStyle.subTitleFontColor),o)).setAttribute("aria-label",e.text),l.setAttribute("role","region"),("title"!==t||e.subtitleSettings.text)&&"subtitle"!==t||(n=Math.abs(i.y+d-this.availableSize.height),this.mapAreaRect=new K(p,i.y+10,h,n-10)),"subtitle"!==t&&e.subtitleSettings.text?this.renderTitle(e.subtitleSettings,"subtitle",i,o):this.svgObject.appendChild(o)):(n=Math.abs(s+d-this.availableSize.height),this.mapAreaRect=new K(p,s,h,n))},f.prototype.createSVG=function(){this.removeSvg(),z(this)},f.prototype.removeSvg=function(){if(P(this.element.id+"_Secondary_Element"),P(this.element.id+"_tile_parent"),P(this.element.id+"_tiles"),this.svgObject){for(;0<this.svgObject.childNodes.length;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&Y.remove(this.svgObject)}this.clearTemplate()},f.prototype.wireEVents=function(){Y.EventHandler.add(this.element,"click",this.mapsOnClick,this),Y.EventHandler.add(this.element,"contextmenu",this.mapsOnRightClick,this),Y.EventHandler.add(this.element,"dblclick",this.mapsOnDoubleClick,this),Y.EventHandler.add(this.element,Y.Browser.touchStartEvent,this.mouseDownOnMap,this),Y.EventHandler.add(this.element,Y.Browser.touchMoveEvent,this.mouseMoveOnMap,this),Y.EventHandler.add(this.element,Y.Browser.touchEndEvent,this.mouseEndOnMap,this),Y.EventHandler.add(this.element,"pointerleave mouseleave",this.mouseLeaveOnMap,this),Y.EventHandler.add(this.element,"keydown",this.keyDownHandler,this),Y.EventHandler.add(this.element,"keyup",this.keyUpHandler,this),this.resizeEvent=this.mapsOnResize.bind(this),window.addEventListener(Y.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeEvent)},f.prototype.unWireEVents=function(){Y.EventHandler.remove(this.element,"click",this.mapsOnClick),Y.EventHandler.remove(this.element,"contextmenu",this.mapsOnRightClick),Y.EventHandler.remove(this.element,"dblclick",this.mapsOnDoubleClick),Y.EventHandler.remove(this.element,Y.Browser.touchStartEvent,this.mouseDownOnMap),Y.EventHandler.remove(this.element,Y.Browser.touchMoveEvent,this.mouseMoveOnMap),Y.EventHandler.remove(this.element,Y.Browser.touchEndEvent,this.mouseEndOnMap),Y.EventHandler.remove(this.element,"pointerleave mouseleave",this.mouseLeaveOnMap),Y.EventHandler.remove(this.element,"keydown",this.keyDownHandler),Y.EventHandler.remove(this.element,"keyup",this.keyUpHandler),window.removeEventListener(Y.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeEvent)},f.prototype.mouseLeaveOnMap=function(e){0<document.getElementsByClassName("highlightMapStyle").length&&this.legendModule&&(this.legendModule.removeShapeHighlightCollection(),x(document.getElementsByClassName("highlightMapStyle")[0]))},f.prototype.keyUpHandler=function(e){var t=e.target.id;this.isTileMap&&this.removeTileMap(),"Tab"===e.code&&-1<t.indexOf("_LayerIndex_")&&-1<t.indexOf("shapeIndex")?this.keyboardHighlightSelection(t,e):-1===t.indexOf("_LayerIndex_")&&-1===t.indexOf("shapeIndex")&&0<mt("highlightMapStyle").length&&(x(mt("highlightMapStyle")[0]),this.legendSettings.visible)&&this.legendModule&&this.legendModule.removeShapeHighlightCollection()},f.prototype.keyboardHighlightSelection=function(e,t){var i=t.type,o=parseInt(e.split("_LayerIndex_")[1].split("_")[0],10),n=parseInt(e.split("_shapeIndex_")[1].split("_")[0],10),n=this.layers[o].shapeData.features.length>n?this.layers[o].shapeData.features[n].properties:null,e=parseInt(e.split("_dataIndex_")[1].split("_")[0],10),e=Y.isNullOrUndefined(e)?null:this.layers[o].dataSource[e];this.layers[o].selectionSettings.enable&&"keydown"===i&&this.selectionModule?(this.selectionModule.selectionsettings=this.layers[o].selectionSettings,this.selectionModule.selectionType="Shape",this.selectionModule.selectElement(t.target,o,e,n)):this.highlightModule&&this.layers[o].highlightSettings.enable&&"keyup"===i&&!t.target.classList.contains("ShapeselectionMapStyle")&&(this.highlightModule.highlightSettings=this.layers[o].highlightSettings,this.highlightModule.handleHighlight(t.target,o,e,n))},f.prototype.keyDownHandler=function(e){var t,i=this.zoomModule,o=e.target.id;"ArrowUp"!==e.code&&"ArrowDown"!==e.code&&"ArrowLeft"!==e.code&&"ArrowRight"!==e.code||!i||(t=document.getElementById(this.element.id+"_animated_tiles"),this.isTileMap&&!Y.isNullOrUndefined(t)&&(this.currentTiles=t.cloneNode(!0))),this.zoomSettings.enable&&i&&("+"===e.key||"Equal"===e.code)?i.performZoomingByToolBar("zoomin"):this.zoomSettings.enable&&i&&("-"===e.key||"Minus"===e.code)?i.performZoomingByToolBar("zoomout"):this.zoomSettings.enable&&i&&82===e.keyCode?(i.performZoomingByToolBar("reset"),i.isPanModeEnabled=!1):this.zoomSettings.enable&&this.zoomSettings.enablePanning&&i&&("ArrowUp"===e.code||"ArrowDown"===e.code)?(e.preventDefault(),i.mouseDownLatLong.x=0,i.mouseMoveLatLong.y=this.mapAreaRect.height/7,i.panning("None",i.mouseDownLatLong.x,"ArrowUp"===e.code?-i.mouseMoveLatLong.y:i.mouseMoveLatLong.y,e),i.mouseDownLatLong.y=i.mouseMoveLatLong.y):this.zoomSettings.enable&&this.zoomSettings.enablePanning&&i&&("ArrowLeft"===e.code||"ArrowRight"===e.code)?(e.preventDefault(),i.mouseDownLatLong.y=0,i.mouseMoveLatLong.x=this.mapAreaRect.width/7,i.panning("None","ArrowLeft"===e.code?-i.mouseMoveLatLong.x:i.mouseMoveLatLong.x,i.mouseDownLatLong.y,e),i.mouseDownLatLong.x=i.mouseMoveLatLong.x):"Enter"===e.code&&(o=e.target.id,e.preventDefault(),this.legendModule&&(-1<o.indexOf("_Left_Page_Rect")||-1<o.indexOf("_Right_Page_Rect"))&&(this.mapAreaRect=this.legendModule.initialMapAreaRect,this.legendModule.currentPage=-1<o.indexOf("_Left_Page_")?this.legendModule.currentPage-1:this.legendModule.currentPage+1,this.legendModule.legendGroup=this.renderer.createGroup({id:this.element.id+"_Legend_Group"}),this.legendModule.drawLegendItem(this.legendModule.currentPage),t=document.getElementById(this.element.id+"_Paging_Text").textContent.split("/").map(Number),-1<o.indexOf("_Left_Page_Rect")?(1!==t[0]&&e.target.focus(),e.target.style.outlineColor=t[0]-1!==t[1]?"":"transparent"):-1<o.indexOf("_Right_Page_Rect")&&(t[0]!==t[1]&&e.target.focus(),e.target.style.outlineColor=t[0]!==t[1]+1?"":"transparent"),C(this.element.id+"_Legend_Border",this.element.id))&&(C(this.element.id+"_Legend_Border",this.element.id).style.pointerEvents="none"),-1<o.indexOf("shapeIndex"))&&this.keyboardHighlightSelection(o,e),this.zoomModule&&this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.mapScaleValue,this.mouseMoveId)},f.prototype.SelectedElement=function(e){var t=!1;return t="ShapeselectionMapStyle"===e.getAttribute("class")?!0:t},f.prototype.mapsOnClick=function(t){var e,i,o=this,n=t.target,a=n.id,l=null,r=null;this.mouseClickEvent={x:t.x,y:t.y},-1===n.id.indexOf("_ToolBar")&&(e=this.getClickLocation(a,t.pageX,t.pageY,n,t.layerX,t.layerY),Y.isNullOrUndefined(e)||(l=e.latitude,r=e.longitude),i={cancel:!1,name:Io,target:a,x:t.clientX,y:t.clientY,latitude:l,longitude:r,isShapeSelected:this.SelectedElement(n)},this.onclick?(i.name=ko,this.trigger("onclick",i,function(e){o.clickHandler(t,i,n)})):this.trigger("click",i,function(e){o.clickHandler(t,i,n)})),this.zoomModule&&(this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.mapScaleValue,a),this.isDevice)&&this.zoomModule.removeToolbarClass("","","","","")},f.prototype.clickHandler=function(e,t,i){-1<i.id.indexOf("shapeIndex")&&(this.mergeCluster(),F(this.element.id+"_mapsTooltip"))&&-1<this.mapsTooltipModule.tooltipTargetID.indexOf("_MarkerIndex_")&&P(this.element.id+"_mapsTooltip"),this.markerModule&&this.markerModule.markerClusterClick(e),t.cancel||this.notify(Io,i),t.cancel||-1===i.id.indexOf("shapeIndex")||this.triggerShapeSelection(i)},f.prototype.triggerShapeSelection=function(e){var t=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),t=ht(e.id,this.layers[t].selectionSettings,this,Bo);t.cancel||!this.selectionModule||Y.isNullOrUndefined(this.shapeSelected)?t.cancel&&this.selectionModule&&Y.isNullOrUndefined(t.data)&&(x(e),this.selectionModule.removedSelectionList(e)):gt(this.selectionModule.selectionType+"selectionMap",this.selectionModule.selectionType+"selectionMapStyle",t)},f.prototype.getMarkerClickLocation=function(e,t,i,o,n,a){document.getElementById(this.element.id+"_svg").style.cursor="grabbing";var l=F(n.targetId),r=this.getClickLocation(n.targetId,e,t,l,i,o),s=this.isTileMap?R(new T(r.longitude,r.latitude),this.tileZoomLevel,this.tileTranslatePoint,!0):B(r.latitude,r.longitude,this.mapLayerPanel.currentFactor,this.layersCollection[n.layerIndex],this),d=this.translatePoint,p=this.isTileMap?s.x:(s.x+d.x)*this.scale,s=this.isTileMap?s.y:(s.y+d.y)*this.scale;return("Balloon"!==this.markerDragArgument.shape?l:l.parentElement).setAttribute("transform","translate( "+p+" "+s+" )"),a&&(d=this.layers[n.layerIndex].markerSettings[n.markerIndex],r=this.getClickLocation(n.targetId,e-d.offset.x,t-d.offset.y,l,i-d.offset.x,o-d.offset.y)),r},f.prototype.getClickLocation=function(e,t,i,o,n,a,l){var r,s,d,p=0;return-1===e.indexOf("_LayerIndex_")||this.isTileMap||Y.isNullOrUndefined(l)&&(parseInt(this.mouseDownEvent.x,10)!==parseInt(this.mouseClickEvent.x,10)||parseInt(this.mouseDownEvent.y,10)!==parseInt(this.mouseClickEvent.y,10))?this.isTileMap&&(!Y.isNullOrUndefined(l)||parseInt(this.mouseDownEvent.x,10)===parseInt(this.mouseClickEvent.x,10)&&parseInt(this.mouseDownEvent.y,10)===parseInt(this.mouseClickEvent.y,10))&&(r=this.getTileGeoLocation(n,a)):(p=parseFloat(e.split("_LayerIndex_")[1].split("_")[0]),"Normal"===this.layers[p].geometryType?-1<e.indexOf("_shapeIndex_")?(n=U(t,i,-1<(l=o.parentElement).id.indexOf("_Point_Group")||-1<l.id.indexOf("_LineString_Group")||-1<l.id.indexOf("_MultiLineString_Group")||-1<l.id.indexOf("_Polygon_Group")?l.parentElement:l),a=this.mapLayerPanel.currentFactor*this.mapScaleValue,s=Math.abs(-this.baseMapBounds.longitude.min*a),d=Math.abs(this.baseMapBounds.latitude.max*a),r={latitude:Math.abs(this.baseMapBounds.latitude.max-n.y/a),longitude:Math.abs(n.x/a+this.baseMapBounds.longitude.min)},this.baseMapBounds.longitude.min<0&&s>n.x&&(r.longitude=-r.longitude),this.baseMapBounds.latitude.min<0&&d>n.y&&(r.latitude=-r.latitude)):-1<e.indexOf("_MarkerIndex_")&&this.markerModule&&!this.markerDragArgument?(o=parseInt(e.split("_MarkerIndex_")[1].split("_")[0],10),l=parseInt(e.split("_dataIndex_")[1].split("_")[0],10),r=isNaN(o)||isNaN(l)?{latitude:null,longitude:null}:{latitude:(a=this.layers[p].markerSettings[o].dataSource[l]).latitude,longitude:a.longitude}):-1<e.indexOf("_MarkerIndex_")&&this.markerModule&&this.markerDragArgument?(n=document.getElementById(this.element.id+"_LayerIndex_"+this.markerDragArgument.layerIndex).getBoundingClientRect(),o=new T(t>n.left?Math.abs(n.left-t):0,i>n.top?Math.abs(n.top-i):0),s=Math.abs(-this.baseMapBounds.longitude.min*this.mapLayerPanel.currentFactor),d=Math.abs(this.baseMapBounds.latitude.max*this.mapLayerPanel.currentFactor),r={latitude:Math.abs(this.baseMapBounds.latitude.max-o.y/(this.mapLayerPanel.currentFactor*this.scale)),longitude:Math.abs(o.x/(this.mapLayerPanel.currentFactor*this.scale)+this.baseMapBounds.longitude.min)},this.baseMapBounds.longitude.min<0&&s>o.x&&(r.longitude=-r.longitude),this.baseMapBounds.latitude.min<0&&d>o.y&&(r.latitude=-r.latitude)):r={latitude:null,longitude:null}:r=this.getGeoLocation(p,t,i)),r},f.prototype.removeTileMap=function(){var e=document.getElementById(this.element.id+"_animated_tiles");if(!Y.isNullOrUndefined(this.currentTiles)&&e.childElementCount<this.currentTiles.childElementCount)for(var t=e.childElementCount-1;t>=this.currentTiles.childElementCount;t--)e.removeChild(e.children[t]);this.currentTiles=null},f.prototype.mouseEndOnMap=function(e){var t,i,o=0,n=0;return-1!==e.type.indexOf("touch")?(this.isTouch=!0,o=t=e.changedTouches[0].pageX,n=(i=e.changedTouches[0].pageY)-(this.isTileMap?10:0),this.mouseClickEvent={x:t,y:i}):(this.isTouch="touch"===e.pointerType,t=e.pageX,i=e.pageY,o=e.layerX,n=e.layerY-(this.isTileMap?10:0)),this.isTileMap&&this.removeTileMap(),this.isTouch&&(this.titleTooltip(e,t,i,!0),Y.isNullOrUndefined(this.legendModule)||this.legendTooltip(e,e.pageX,e.pageY,!0)),this.notify(Y.Browser.touchEndEvent,e),e.cancelable&&!this.isTouch&&e.preventDefault(),Y.isNullOrUndefined(this.markerDragArgument)?document.getElementById(this.element.id+"_svg").style.cursor="auto":(e=this.markerDragArgument,this.mouseClickEvent.x=this.mouseDownEvent.x,this.mouseClickEvent.y=this.mouseDownEvent.y,o=this.getMarkerClickLocation(t,i,o,n,this.markerDragArgument,!0),n=this.layers[e.layerIndex].markerSettings[e.markerIndex],document.getElementById(this.element.id+"_svg").style.cursor=n.enableDrag?"pointer":"grabbing",t={name:"markerDragEnd",x:t,y:i,latitude:o.latitude,longitude:o.longitude,layerIndex:e.layerIndex,markerIndex:e.markerIndex,dataIndex:e.dataIndex},Y.isNullOrUndefined(n.latitudeValuePath)&&Y.isNullOrUndefined(n.longitudeValuePath)?(i=n.dataSource[e.dataIndex],Y.isNullOrUndefined(i.Longitude)||Y.isNullOrUndefined(i.Latitude)?(n.dataSource[e.dataIndex].latitude=t.latitude,n.dataSource[e.dataIndex].longitude=t.longitude):(n.dataSource[e.dataIndex].Latitude=t.latitude,n.dataSource[e.dataIndex].Longitude=t.longitude)):(n.dataSource[e.dataIndex][n.latitudeValuePath]=t.latitude,n.dataSource[e.dataIndex][n.longitudeValuePath]=t.longitude),this.markerDragId="",this.markerDragArgument=null,this.trigger("markerDragEnd",t)),this.zoomModule&&this.isDevice&&(this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.scale,this.element.id+"_Zooming_"),this.zoomModule.removeToolbarClass("","","","","")),!1},f.prototype.mouseDownOnMap=function(e){this.mouseDownEvent={x:e.x,y:e.y},-1!==e.type.indexOf("touch")&&e.changedTouches&&(this.mouseDownEvent={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}),this.isDevice&&!Y.isNullOrUndefined(this.mapsTooltipModule)&&this.mapsTooltipModule.renderTooltip(e);var t=e.target,i=(this.markerDragId=t.id,document.getElementById(this.element.id+"_animated_tiles"));this.isTileMap&&!Y.isNullOrUndefined(i)&&(this.currentTiles=i.cloneNode(!0)),-1===t.id.indexOf("_ToolBar")&&(i=this.markerModule,(-1<t.id.indexOf("shapeIndex")||-1<t.id.indexOf("Tile"))&&this.mergeCluster(),i&&(i.markerClick(e),i.markerClusterClick(e)),this.bubbleModule)&&this.bubbleModule.bubbleClick(e),this.notify(Y.Browser.touchStartEvent,e)},f.prototype.mergeCluster=function(){this.markerModule&&0<this.markerModule.sameMarkerData.length&&(!this.zoomModule||this.zoomModule.isSingleClick)&&(Ue(this.markerModule.sameMarkerData,this),this.markerModule.sameMarkerData=[])},f.prototype.mapsOnRightClick=function(e){var t=e.target,i=t.id,o=null,n=null;this.mouseClickEvent=this.mouseDownEvent={x:e.x,y:e.y},-1===t.id.indexOf("_ToolBar")&&(t=this.getClickLocation(i,e.pageX,e.pageY,t,e.layerX,e.layerY),Y.isNullOrUndefined(t)||(o=t.latitude,n=t.longitude),t={cancel:!1,name:No,target:i,x:e.clientX,y:e.clientY,latitude:o,longitude:n,isShapeSelected:!1},this.trigger("rightClick",t))},f.prototype.mapsOnDoubleClick=function(e){this.notify("dblclick",e);var t,i=e.target,o=i.id,n=null,a=null;-1===i.id.indexOf("_ToolBar")&&(-1===i.id.indexOf("_LayerIndex_")||this.isTileMap||this.mouseDownEvent.x!==e.clientX||this.mouseDownEvent.y!==e.clientY?this.isTileMap&&this.mouseDownEvent.x===e.clientX&&this.mouseDownEvent.y===e.clientY&&(n=(t=this.getTileGeoLocation(e.layerX,e.layerY)).latitude,a=t.longitude):(i=parseFloat(i.id.split("_LayerIndex_")[1].split("_")[0]),n=(t=this.getGeoLocation(i,e.layerX,e.layerY)).latitude,a=t.longitude),i={cancel:!1,name:Fo,x:e.clientX,y:e.clientY,target:o,latitude:n,longitude:a,isShapeSelected:null},this.trigger("doubleClick",i))},f.prototype.mouseMoveOnMap=function(e){var t;e.type,t=e.target,this.markerModule&&(this.markerModule.markerMove(e),this.markerModule.markerClusterMouseMove(e)),this.bubbleModule&&this.bubbleModule.bubbleMove(e),-1===t.id.indexOf("MarkerIndex")&&(document.getElementById(this.element.id+"_svg").style.cursor="auto"),this.onMouseMove(e),this.notify(Y.Browser.touchMoveEvent,e)},f.prototype.onMouseMove=function(e){var t,i,o,n=e.target,n=(this.mouseMoveId=n.id,0),a=0;return-1===e.type.indexOf("touch")?(t=e.pageX,i=e.pageY,n=e.layerX,a=e.layerY-(this.isTileMap?10:0),this.titleTooltip(e,e.pageX,e.pageY),Y.isNullOrUndefined(this.legendModule)||this.legendTooltip(e,e.pageX,e.pageY,!0)):(n=t=(o=e.touches)[0].clientX,a=i=o[0].clientY-(this.isTileMap?10:0)),Y.isNullOrUndefined(this.markerDragArgument)||(o=this.markerDragArgument,this.mouseClickEvent.x=this.mouseDownEvent.x,this.mouseClickEvent.y=this.mouseDownEvent.y,this.getMarkerClickLocation(t,i,n,a,o,!1)),this.zoomModule&&this.zoomModule.removeToolbarOpacity(this.isTileMap?Math.round(this.tileZoomLevel):this.scale,e.target.id),!1},f.prototype.legendTooltip=function(e,t,i,o){for(var n,a,l=e.target.id,r=(this.legendModule.currentPage,e.target.id.split("_Index_")[1]),s=this.legendModule.totalPages.length<=this.legendModule.currentPage?this.legendModule.totalPages.length-1:this.legendModule.currentPage<0?0:this.legendModule.currentPage,d=(0!==this.legendModule.totalPages.length?this.legendModule.totalPages[s].Collection:this.legendModule.totalPages).length,p=0;p<d;p++)n=(a=this.legendModule.totalPages[s].Collection[p]).DisplayText,l=e.target.id,r=e.target.id.split("_Index_")[1],l===this.element.id+"_Legend_Text_Index_"+r&&-1<e.target.textContent.indexOf("...")&&a.idIndex===parseInt(r,10)&&St(n,this.legendSettings.textStyle.size,t,i,this.element.offsetWidth,this.element.offsetHeight,this.element.id+"_EJ2_Legend_Text_Tooltip",F(this.element.id+"_Secondary_Element"),o);l!==this.element.id+"_Legend_Text_Index_"+r&&P(this.element.id+"_EJ2_Legend_Text_Tooltip")},f.prototype.titleTooltip=function(e,t,i,o){var n=e.target.id;n===this.element.id+"_LegendTitle"&&-1<e.target.textContent.indexOf("...")?St(this.legendSettings.title.text,this.legendSettings.titleStyle.size,t,i,this.element.offsetWidth,this.element.offsetHeight,this.element.id+"_EJ2_LegendTitle_Tooltip",F(this.element.id+"_Secondary_Element"),o):P(this.element.id+"_EJ2_LegendTitle_Tooltip"),n===this.element.id+"_Map_title"&&-1<e.target.textContent.indexOf("...")?St(this.titleSettings.text,this.titleSettings.textStyle.size||this.themeStyle.titleFontSize,t,i,this.element.offsetWidth,this.element.offsetHeight,this.element.id+"_EJ2_Title_Tooltip",F(this.element.id+"_Secondary_Element"),o):P(this.element.id+"_EJ2_Title_Tooltip")},f.prototype.mapsOnResize=function(e){var t,i=this;return this.isDestroyed||this.isExportInitialTileMap||(t={cancel:!(this.isResize=this.isReset=!0),name:Eo,previousSize:this.availableSize,currentSize:I(this),maps:this},this.trigger(Eo,t),t.cancel)||(this.resizeTo&&clearTimeout(this.resizeTo),!Y.isNullOrUndefined(this.element)&&this.element.classList.contains("e-maps")&&(this.resizeTo=setTimeout(function(){i.unWireEVents(),i.createSVG(),i.refreshing=!0,i.wireEVents(),i.render(),i.refreshing=!1},500))),!1},f.prototype.zoomByPosition=function(e,t){var i;this.isDestroyed||(this.zoomNotApplied=this.isMarkerZoomCompleted=!1,i=this.zoomSettings.zoomFactor===t,this.previousProjection=null,!this.isTileMap&&this.zoomModule?(Y.isNullOrUndefined(e)?this.zoomSettings.zoomFactor=t:(this.zoomSettings.zoomFactor=t,i=this.centerPosition.latitude===e.latitude&&this.centerPosition.longitude===e.longitude||i,this.centerPosition=e),this.isZoomByPosition=!0,this.mapScaleValue=null):this.zoomModule&&(this.tileZoomLevel=this.zoomSettings.zoomFactor=t,i=this.centerPosition.latitude===e.latitude&&this.centerPosition.longitude===e.longitude||i,this.centerPosition=e,this.isZoomByPosition=!0),i&&this.refresh())},f.prototype.panByDirection=function(e,t){if(!this.isDestroyed){var i=0,o=0;switch(e){case"Left":i=-this.mapAreaRect.width/7;break;case"Right":i=this.mapAreaRect.width/7;break;case"Top":o=-this.mapAreaRect.height/7;break;case"Bottom":o=this.mapAreaRect.height/7}this.zoomModule&&this.zoomModule.panning(e,i,o,t)}},f.prototype.addLayer=function(e){var t;this.isDestroyed||((t=this.layers).push(e),this.isAddLayer=!0,this.layers=t)},f.prototype.removeLayer=function(e){var t;this.isDestroyed||((t=this.layers).splice(e,1),this.layers=t)},f.prototype.addMarker=function(e,t){if(!this.isDestroyed&&!Y.isNullOrUndefined(this.markerModule)){var i=document.getElementById(this.element.id+"_LayerIndex_"+e);if(0<t.length&&i){for(var o=0,n=t;o<n.length;o++){var a=n[o];this.layersCollection[e].markerSettings.push(new Co(this,"markerSettings",a))}this.markerModule.markerRender(this,i,e,this.mapLayerPanel.currentFactor,"AddMarker"),this.arrangeTemplate()}}},f.prototype.shapeSelection=function(e,t,i,o){if(!this.isDestroyed&&!Y.isNullOrUndefined(this.layers[e])){var n=void 0,a=void 0,l=Array.isArray(t)?t:Array(t),r=(Y.isNullOrUndefined(o)&&(o=!0),this.layers[e].selectionSettings);if(!r.enableMultiSelect&&this.legendSelection&&o&&this.removeShapeSelection(),"SubLayer"===this.layers[e].type)for(var s=0;s<this.layersCollection.length;s++)if(this.layersCollection[s].shapeData===this.layers[e].shapeData){a=s;break}if(!Y.isNullOrUndefined(r)&&r.enable)for(var d=void 0,p=this.layers[e].shapeData.features,s=0;s<p.length;s++)for(var h=0;h<l.length;h++){var m=void 0;if((!Y.isNullOrUndefined(p[s].properties[l[h]])&&isNaN(p[s].properties[l[h]])?p[s].properties[l[h]].toLowerCase():p[s].properties[l[h]])===(Y.isNullOrUndefined(i)||"string"!=typeof i?i:i.toLowerCase())){Y.isNullOrUndefined(this.layers[e].shapeSettings.colorValuePath)||(m=Ye(this.layers[e].dataSource,p[s].properties,this.layers[e].shapeDataPath,this.layers[e].shapePropertyPath,this.layers[e]));var c=this.layers[e];if(0<=this.baseLayerIndex&&c.isBaseLayer?d=0:"SubLayer"===this.layers[e].type&&(d=a),n=F(this.element.id+"_LayerIndex_"+d+"_shapeIndex_"+s+"_dataIndex_"+m),Y.isNullOrUndefined(m)&&Y.isNullOrUndefined(n)&&(n=F(this.element.id+"_LayerIndex_"+e+"_shapeIndex_"+s+"_dataIndex_null")),c=parseInt(n.id.split("_shapeIndex_")[1].split("_")[0],10),m=this.layers[e].shapeData.features.length>c?this.layers[e].shapeData.features[c].properties:null,c=parseInt(n.id.split("_dataIndex_")[1].split("_")[0],10),c=Y.isNullOrUndefined(c)?null:this.layers[e].dataSource[c],o){yt(r,this,n,m,c),this.shapeSelectionClass=F("ShapeselectionMap"),this.legendSettings.visible&&-1===n.id.indexOf("_MarkerIndex_")&&this.legendModule.shapeHighLightAndSelection(n,c,r,"selection",e);var u=!this.legendSettings.visible||this.legendModule.shapeToggled;if(u&&(n.setAttribute("class","ShapeselectionMapStyle"),-1===this.selectedElementId.indexOf(n.getAttribute("id"))&&this.selectedElementId.push(n.getAttribute("id")),!r.enableMultiSelect))return}else this.legendSelection=!r.enableMultiSelect&&!this.legendSelection||this.legendSelection,this.legendSettings.visible&&-1===n.id.indexOf("_MarkerIndex_")&&"ShapeselectionMapStyle"===n.getAttribute("class")&&this.legendModule.shapeHighLightAndSelection(n,c,r,"selection",e),(u=!this.legendSettings.visible||this.legendModule.shapeToggled)&&(x(n),-1!==(m=this.selectedElementId.indexOf(n.getAttribute("id"))))&&(this.selectedElementId.splice(m,1),!r.enableMultiSelect)&&this.legendSelection&&0<this.selectedElementId.length&&this.removeShapeSelection()}}}},f.prototype.zoomToCoordinates=function(e,t,i,o){var n,a,l,r;this.isDestroyed||(a=n=void 0,r=this.isMarkerZoomCompleted=!1,this.centerPosition={latitude:null,longitude:null},this.isZoomByPosition=!1,(Y.isNullOrUndefined(i)&&Y.isNullOrUndefined(o)||Y.isNullOrUndefined(e)&&Y.isNullOrUndefined(t))&&(e=Y.isNullOrUndefined(e)?0:e,t=Y.isNullOrUndefined(e)?0:t,i=Y.isNullOrUndefined(i)?e:i,o=Y.isNullOrUndefined(o)?t:o,r=!0),i<e&&(e=(l=[i,e])[0],i=l[1]),o<t&&(t=(l=[o,t])[0],o=l[1]),a=r?(n=e+i,t+o):(n=(e+i)/2,(t+o)/2),this.centerLatOfGivenLocation=n,this.centerLongOfGivenLocation=a,this.minLatOfGivenLocation=e,this.minLongOfGivenLocation=t,this.maxLatOfGivenLocation=i,this.maxLongOfGivenLocation=o,this.zoomNotApplied=!0,this.scaleOfGivenLocation=Zt(e,i,t,o,this.mapAreaRect.width,this.mapAreaRect.height,this,!0),l=this.getMinMaxLatitudeLongitude(),r={cancel:!1,name:"zoom",type:"zoomIn",maps:this,tileTranslatePoint:{},translatePoint:{},tileZoomLevel:this.isTileMap?{previous:this.tileZoomLevel,current:this.scaleOfGivenLocation}:{},scale:this.isTileMap?{previous:this.tileZoomLevel,current:this.scaleOfGivenLocation}:{previous:this.scale,current:this.scaleOfGivenLocation},minLatitude:l.minLatitude,maxLatitude:l.maxLatitude,minLongitude:l.minLongitude,maxLongitude:l.maxLongitude},this.trigger("zoom",r),this.refresh())},f.prototype.removeShapeSelection=function(){for(var e=this.selectedElementId.length,t=0;t<e;t++)x(N(this.selectedElementId[0])),this.selectedElementId.splice(0,1);if(this.legendSettings.visible)for(var i=this.legendSelectionCollection.length,t=0;t<i;t++)x(N(this.legendSelectionCollection[t].legendElement.id)),this.selectedLegendElementId.splice(0,1);this.shapeSelectionItem=[],this.legendSelectionCollection=[]},f.prototype.setCulture=function(){this.intl=new Y.Internationalization,this.setLocaleConstants(),this.localeObject=new Y.L10n(this.getModuleName(),this.defaultLocalConstants,this.locale)},f.prototype.setLocaleConstants=function(){this.defaultLocalConstants={ZoomIn:"Zoom in",Zoom:"Zoom",ZoomOut:"Zoom out",Pan:"Pan",Reset:"Reset",ImageNotFound:"Image Not Found"}},f.prototype.destroy=function(){this.unWireEVents(),Y.isNullOrUndefined(this.mapsTooltipModule)||this.mapsTooltipModule.removeEventListener(),Y.isNullOrUndefined(this.bingMap)||this.bingMap.destroy(),cn.prototype.destroy.call(this),this.shapeSelectionItem=[],this.toggledElementId=[],this.toggledLegendId=[],this.legendSelectionCollection=[],this.selectedLegendElementId=[],this.selectedNavigationElementId=[],this.selectedBubbleElementId=[],this.selectedMarkerElementId=[],this.selectedElementId=[],this.dataLabelShape=[],this.zoomShapeCollection=[],this.zoomLabelPositions=[],this.mouseDownEvent={x:null,y:null},this.mouseClickEvent={x:null,y:null},this.formatFunction=null,this.localeObject=null,this.defaultLocalConstants=null,this.intl=null,this.mapAreaRect=null,this.layersCollection=null,this.themeStyle=null,this.totalRect=null,this.baseSize=null,this.baseMapBounds=null,this.baseMapRectBounds=null,this.baseTranslatePoint=null,this.baseTileTranslatePoint=null,this.markerZoomCenterPoint=null,this.currentTiles=null,this.serverProcess=null,this.toolbarProperties=null,this.zoomLabelPositions=null,this.resizeEvent=null,this.availableSize=null,document.getElementById("mapsmeasuretext")&&document.getElementById("mapsmeasuretext").remove(),this.removeSvg(),this.svgObject=null,this.mapLayerPanel=null,this.renderer=null,this.translatePoint=null,this.tileTranslatePoint=null,this.previousPoint=null,this.dataLabelShape=[],this.zoomShapeCollection=[],this.selectedElementId=[],this.selectedMarkerElementId=[],this.selectedBubbleElementId=[],this.shapeSelectionClass=null,this.markerSelectionClass=null,this.bubbleSelectionClass=null,this.navigationSelectionClass=null,this.selectedNavigationElementId=[],this.polygonSelectionClass=null,this.selectedPolygonElementId=[],this.legendSelectionClass=null,this.previousTranslate=null,this.initialTileTranslate=null,this.markerDragArgument=null},f.prototype.getModuleName=function(){return"maps"},f.prototype.getPersistData=function(){return this.addOnPersist(["translatePoint","zoomSettings","mapScaleValue","tileTranslatePoint","baseTranslatePoint","scale","zoomPersistence","defaultState","markerZoomedState","initialCheck","initialZoomLevel","initialTileTranslate","applyZoomReset","markerZoomFactor"])},f.prototype.onPropertyChanged=function(e,t){if(!this.isDestroyed){for(var i=!1,o=!1,n=!1,a=0,l=Object.keys(e);a<l.length;a++){var r=l[a];switch(r){case"background":this.renderBorder();break;case"height":case"width":case"layers":case"projectionType":case"centerPosition":case"legendSettings":case"baseLayerIndex":if("layers"===r)for(var n=!0,s=Object.keys(e.layers).length,d=0;d<s;d++)if(!Y.isNullOrUndefined(e.layers[d]))for(var p=0,h=Object.keys(e.layers[d]);p<h.length;p++){var m=h[p];Y.isNullOrUndefined(this.layers[d].shapeData)&&!Y.isNullOrUndefined(this.layers[d].urlTemplate)&&""!==this.layers[d].urlTemplate?this.isReset=!0:"markerSettings"===m&&(o=!0)}i=!0;break;case"zoomSettings":Y.isNullOrUndefined(t.zoomSettings)||(i=!(e.zoomSettings.zoomFactor!==t.zoomSettings.zoomFactor&&!n||(e.zoomSettings.shouldZoomInitially!==t.zoomSettings.shouldZoomInitially?(this.zoomSettings.zoomFactor=1,this.previousProjection=null,this.scale=this.isMarkerZoomCompleted?null:this.scale,this.isMarkerZoomCompleted=!e.zoomSettings.shouldZoomInitially):e.zoomSettings.enable!==t.zoomSettings.enable&&(this.zoomSettings.zoomFactor=1),0)));break;case"locale":case"currencyCode":cn.prototype.refresh.call(this)}}i&&(e.layers&&o?(P(this.element.id+"_Markers_Group"),this.isTileMap?this.mapLayerPanel.renderTileLayer(this.mapLayerPanel,this.layers.currentFactor,this.layers.length-1):this.render()):(this.createSVG(),this.renderElements()))}},f.prototype.requiredModules=function(){var e=[],t=this.findVisibleLayers(this.layers),i=!1;return this.annotations.map(function(e){i=null!=e.content}),this.isBubbleVisible()&&e.push({member:"Bubble",args:[this],name:"Bubble"}),t.highlight&&e.push({member:"Highlight",args:[this],name:"Highlight"}),t.selection&&e.push({member:"Selection",args:[this],name:"Selection"}),this.legendSettings.visible&&e.push({member:"Legend",args:[this],name:"Legend"}),(this.zoomSettings.enable||this.zoomSettings.zoomFactor>this.zoomSettings.minZoom)&&e.push({member:"Zoom",args:[this],name:"Zoom"}),this.isMarkersVisible()&&e.push({member:"Marker",args:[this],name:"Marker"}),this.isDataLabelVisible()&&e.push({member:"DataLabel",args:[this],name:"DataLabel"}),this.isNavigationVisible()&&e.push({member:"NavigationLine",args:[this],name:"NavigationLine"}),this.isPolygonVisible()&&e.push({member:"Polygon",args:[this],name:"Polygon"}),t.tooltip&&e.push({member:"MapsTooltip",args:[this],name:"MapsTooltip"}),i&&e.push({member:"Annotations",args:[this,pn],name:"Annotations"}),this.allowPrint&&e.push({member:"Print",args:[this],name:"Print"}),this.allowImageExport&&e.push({member:"ImageExport",args:[this],name:"ImageExport"}),this.allowPdfExport&&e.push({member:"PdfExport",args:[this],name:"PdfExport"}),e},f.prototype.isMarkersVisible=function(){var i=!1;return Array.prototype.forEach.call(this.layers,function(e){for(var t=0;t<e.markerSettings.length;t++)if(e.markerSettings[t].visible){i=!0;break}}),i},f.prototype.isDataLabelVisible=function(){for(var e=!1,t=0;t<this.layers.length;t++)if(this.layers[t].dataLabelSettings.visible){e=!0;break}return e},f.prototype.isNavigationVisible=function(){var i=!1;return Array.prototype.forEach.call(this.layers,function(e){for(var t=0;t<e.navigationLineSettings.length;t++)if(e.navigationLineSettings[t].visible){i=!0;break}}),i},f.prototype.isPolygonVisible=function(){var i=!1;return Array.prototype.forEach.call(this.layers,function(e){for(var t=0;t<e.polygonSettings.polygons.length;t++)if(0<e.polygonSettings.polygons.length){i=!0;break}}),i},f.prototype.isBubbleVisible=function(){for(var e=!1,t=0,i=this.layers;t<i.length;t++){var o=i[t];if(this.getBubbleVisible(o)){e=!0;break}}return e},f.prototype.getBubbleVisible=function(e){for(var t=!1,i=0,o=e.bubbleSettings;i<o.length;i++)if(o[i].visible){t=!0;break}return t},f.prototype.print=function(e){this.allowPrint&&this.printModule&&!this.isDestroyed&&this.printModule.print(this,e)},f.prototype.export=function(t,i,o,n){var a=this;if(!this.isDestroyed){if(Y.isNullOrUndefined(n)&&(n=!0),"PDF"!==t&&this.allowImageExport&&this.imageExportModule)return new Promise(function(e){e(a.imageExportModule.export(a,t,i,n))});if(this.allowPdfExport&&this.pdfExportModule)return new Promise(function(e){e(a.pdfExportModule.export(a,t,i,n,o))})}return null},f.prototype.getBingUrlTemplate=function(i){var e;return e=this.isDestroyed?e:new Promise(function(t){var e=new Y.Fetch({url:i});e.onSuccess=function(e){e=e.resourceSets[0].resources[0];t(e.imageUrl)},e.send()})},f.prototype.findVisibleLayers=function(e,t,i,o,n,a){void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===o&&(o=!1),void 0===n&&(n=!1),void 0===a&&(a=!1);for(var l=0,r=e;l<r.length;l++){var s=r[l];if(t=s.visible||t,s.visible){for(var d=s.bubbleSettings,p=s.markerSettings,h=s.polygonSettings,m=0,c=s.navigationLineSettings;m<c.length;m++){var u=c[m];u.visible&&(n=!Y.isNullOrUndefined(u.highlightSettings)&&u.highlightSettings.enable||n,a=!Y.isNullOrUndefined(u.selectionSettings)&&u.selectionSettings.enable||a)}for(var g=0,y=h.polygons;g<y.length;g++){var f=y[g];!Y.isNullOrUndefined(f.points)&&0<f.points.length&&(n=s.polygonSettings.highlightSettings.enable||n,a=s.polygonSettings.selectionSettings.enable||a,o=s.polygonSettings.tooltipSettings.visible||o)}for(var b=0,S=p;b<S.length;b++){var v=S[b];if(v.visible&&(o=v.tooltipSettings.visible||o,n=v.selectionSettings.enable||n,a=v.highlightSettings.enable||a),o)break}for(var x=0,O=d;x<O.length;x++){var C=O[x];if(C.visible&&(o=C.tooltipSettings.visible||o,n=C.selectionSettings.enable||n,a=C.highlightSettings.enable||a),o)break}o=s.tooltipSettings.visible||o,n=s.selectionSettings.enable||n,a=s.highlightSettings.enable||a}if(t&&i&&o)break}return{layer:t,bubble:i,tooltip:o,selection:n,highlight:a}},f.prototype.getGeoLocation=function(e,t,i){var o,n,a=null,l=null;return this.isDestroyed||this.isTileMap||(n=document.getElementById(this.element.id),o=this.element.getBoundingClientRect(),t=t-n.offsetLeft-(o.left-n.offsetLeft)-window.scrollX,i=i-n.offsetTop-(o.top-n.offsetTop)-window.scrollY,n=(o=nt(this,this.layersCollection[e],!1).location).x*this.scale,e=o.y*this.scale,o=Math.min(this.mapAreaRect.height,this.mapAreaRect.width)*this.mapLayerPanel.currentFactor*this.scale,t=this.clip(t-n,0,o-1)/o-.5,n=.5-this.clip(i-e,0,o-1)/o,a=90-360*Math.atan(Math.exp(2*-n*Math.PI))/Math.PI,l=360*t),{latitude:a,longitude:l}},f.prototype.clip=function(e,t,i){return Math.min(Math.max(e,t),i)},f.prototype.getTileGeoLocation=function(e,t){var i,o=null,n=null;return this.isTileMap&&(i=document.getElementById(this.element.id+"_tile_parent"),this.isDestroyed||Y.isNullOrUndefined(i)||(o=(e=this.pointToLatLong(e+this.mapAreaRect.x-i.offsetLeft,t+this.mapAreaRect.y-i.offsetTop)).latitude,n=e.longitude)),{latitude:o,longitude:n}},f.prototype.pointToLatLong=function(e,t){var i,o=0,n=0;return this.isDestroyed||Y.isNullOrUndefined(this.translatePoint)||(t=Y.isNullOrUndefined(this.markerDragArgument)?t:t+10,i=256*Math.pow(2,this.tileZoomLevel),e=this.clip(e-this.translatePoint.x*this.scale,0,i-1)/i-.5,t=.5-this.clip(t-this.translatePoint.y*this.scale,0,i-1)/i,o=90-360*Math.atan(Math.exp(2*-t*Math.PI))/Math.PI,n=360*e),{latitude:o,longitude:n}},y([Y.Property(null)],f.prototype,"background",void 0),y([Y.Property(!1)],f.prototype,"useGroupingSeparator",void 0),y([Y.Property(null)],f.prototype,"format",void 0),y([Y.Property(null)],f.prototype,"width",void 0),y([Y.Property(null)],f.prototype,"height",void 0),y([Y.Property("MouseMove")],f.prototype,"tooltipDisplayMode",void 0),y([Y.Property(!1)],f.prototype,"allowPrint",void 0),y([Y.Property(!1)],f.prototype,"allowImageExport",void 0),y([Y.Property(!1)],f.prototype,"allowPdfExport",void 0),y([Y.Complex({},lo)],f.prototype,"titleSettings",void 0),y([Y.Complex({},po)],f.prototype,"zoomSettings",void 0),y([Y.Complex({},go)],f.prototype,"legendSettings",void 0),y([Y.Collection([],Lo)],f.prototype,"layers",void 0),y([Y.Collection([],Gt)],f.prototype,"annotations",void 0),y([Y.Complex({},fi)],f.prototype,"margin",void 0),y([Y.Complex({color:"#DDDDDD",width:0},a)],f.prototype,"border",void 0),y([Y.Property("Material")],f.prototype,"theme",void 0),y([Y.Property("Mercator")],f.prototype,"projectionType",void 0),y([Y.Property(0)],f.prototype,"baseLayerIndex",void 0),y([Y.Property(null)],f.prototype,"description",void 0),y([Y.Property(0)],f.prototype,"tabIndex",void 0),y([Y.Complex({latitude:null,longitude:null},si)],f.prototype,"centerPosition",void 0),y([Y.Complex({},t)],f.prototype,"mapsArea",void 0),y([Y.Event()],f.prototype,"load",void 0),y([Y.Event()],f.prototype,"beforePrint",void 0),y([Y.Event()],f.prototype,"loaded",void 0),y([Y.Event()],f.prototype,"click",void 0),y([Y.Event()],f.prototype,"onclick",void 0),y([Y.Event()],f.prototype,"doubleClick",void 0),y([Y.Event()],f.prototype,"rightClick",void 0),y([Y.Event()],f.prototype,"resize",void 0),y([Y.Event()],f.prototype,"tooltipRender",void 0),y([Y.Event()],f.prototype,"legendRendering",void 0),y([Y.Event()],f.prototype,"tooltipRenderComplete",void 0),y([Y.Event()],f.prototype,"shapeSelected",void 0),y([Y.Event()],f.prototype,"itemSelection",void 0),y([Y.Event()],f.prototype,"itemHighlight",void 0),y([Y.Event()],f.prototype,"shapeHighlight",void 0),y([Y.Event()],f.prototype,"layerRendering",void 0),y([Y.Event()],f.prototype,"shapeRendering",void 0),y([Y.Event()],f.prototype,"markerRendering",void 0),y([Y.Event()],f.prototype,"markerClusterRendering",void 0),y([Y.Event()],f.prototype,"markerClick",void 0),y([Y.Event()],f.prototype,"markerDragStart",void 0),y([Y.Event()],f.prototype,"markerDragEnd",void 0),y([Y.Event()],f.prototype,"markerClusterClick",void 0),y([Y.Event()],f.prototype,"markerClusterMouseMove",void 0),y([Y.Event()],f.prototype,"markerMouseMove",void 0),y([Y.Event()],f.prototype,"dataLabelRendering",void 0),y([Y.Event()],f.prototype,"bubbleRendering",void 0),y([Y.Event()],f.prototype,"bubbleClick",void 0),y([Y.Event()],f.prototype,"bubbleMouseMove",void 0),y([Y.Event()],f.prototype,"animationComplete",void 0),y([Y.Event()],f.prototype,"annotationRendering",void 0),y([Y.Event()],f.prototype,"zoom",void 0),y([Y.Event()],f.prototype,"pan",void 0),y([Y.Event()],f.prototype,"panComplete",void 0),y([Y.Event()],f.prototype,"zoomComplete",void 0),y([Y.NotifyPropertyChanges],f));function f(e,t){e=cn.call(this,e,t)||this;return e.isTileMap=!1,e.isResize=!1,e.isReset=!1,e.baseSize=new H(0,0),e.translatePoint=new J(0,0),e.baseTranslatePoint=new J(0,0),e.zoomTranslatePoint=new J(0,0),e.markerZoomedState=!0,e.zoomPersistence=!1,e.defaultState=!0,e.centerPositionChanged=!1,e.markerNullCount=0,e.tileTranslatePoint=new J(0,0),e.baseTileTranslatePoint=new J(0,0),e.isDevice=!1,e.staticMapZoom=e.zoomSettings.enable?e.zoomSettings.zoomFactor:0,e.zoomNotApplied=!1,e.dataLabelShape=[],e.zoomShapeCollection=[],e.zoomLabelPositions=[],e.mouseDownEvent={x:null,y:null},e.mouseClickEvent={x:null,y:null},e.selectedElementId=[],e.selectedMarkerElementId=[],e.selectedBubbleElementId=[],e.selectedNavigationElementId=[],e.selectedPolygonElementId=[],e.selectedLegendElementId=[],e.legendSelectionCollection=[],e.shapeSelections=!0,e.legendSelection=!0,e.toggledLegendId=[],e.toggledElementId=[],e.checkInitialRender=!0,e.initialTileTranslate=new J(0,0),e.isMarkerZoomCompleted=!1,e.markerDragId="",e.initialCheck=!0,e.applyZoomReset=!1,e.markerClusterExpandCheck=!1,e.markerClusterExpand=!1,e.mouseMoveId="",e.shapeSelectionItem=[],e.markerDragArgument=null,Y.setValue("mergePersistData",e.mergePersistMapsData,e),e}un.prototype.renderBubble=function(a,e,t,i,l,r,s,d,p,h){var m=this,o=d.layerData,n=a.colorValuePath,c=!Y.isNullOrUndefined(n)&&-1<n.indexOf(".")?k(e,a.colorValuePath):e[n],n=!Y.isNullOrUndefined(n)&&-1<n.indexOf(".")?Number(k(e,a.colorValuePath)):Number(e[n]),u=!Y.isNullOrUndefined(a.valuePath)&&-1<a.valuePath.indexOf(".")?Number(k(e,a.valuePath)):Number(e[a.valuePath]);if(isNaN(u)&&isNaN(n)&&Y.isNullOrUndefined(c))return null;for(var g=Ke(a.minRadius,a.maxRadius,u,i.min,i.max),u=new rn(this.maps).getColorByValue(a.colorMapping,n,c),i="[object Object]"!==Object.prototype.toString.call(u)||Y.isNullOrUndefined(u.fill)?t:u.fill,y=("[object Object]"!==Object.prototype.toString.call(u)||Y.isNullOrUndefined(u.opacity)?a:u).opacity,f=[[]],b=(this.maps.translateType="bubble",0),S=0,v=0,x=0,O=o.length;x<O;x++){var C=(C=o[x]).property,_=Je(e[d.shapeDataPath],d.shapePropertyPath,C);if((!Y.isNullOrUndefined(e[d.shapeDataPath])&&isNaN(e[d.shapeDataPath])?e[d.shapeDataPath].toLowerCase():e[d.shapeDataPath])===(!Y.isNullOrUndefined(C[_])&&isNaN(C[_])?C[_].toLowerCase():C[_])&&"LineString"!==o[x].type&&"MultiLineString"!==o[x].type&&"Point"!==o[x].type&&"MultiPoint"!==o[x].type)if(o[x]._isMultiPolygon)for(var M=o[x],L=0;L<M.length;L++)f.push(this.getPoints(M[L],[])),S<(v=f[f.length-1].length)&&(S=v,b=f.length-1);else f.push(this.getPoints(o[x],[])),S<(v=f[f.length-1].length)&&(S=v,b=f.length-1)}var P,n=this.maps.projectionType,c={color:a.border.color,opacity:a.border.opacity,width:a.border.width},t=$e(f[b],n,d.geometryType);if(a.visible){if(Y.isNullOrUndefined(t)){u=f.length-1;if(!f[u].x||!f[u].y)return;P={cancel:!1,name:qo,border:c,cx:f[u].x,cy:f[u].y,data:e,fill:i,maps:this.maps,radius:g}}else n="Mercator"===this.maps.projectionType?t.y:-t.y,P={cancel:!1,name:qo,border:c,cx:t.x,cy:n,data:e,fill:i,maps:this.maps,radius:g};this.maps.trigger("bubbleRendering",P,function(e){var t,i,o,n;!P.cancel&&(P.border.opacity=Y.isNullOrUndefined(P.border.opacity)?y:P.border.opacity,t="Circle"===a.bubbleType?(t=new me(h,P.fill,P.border,y,0,0,P.radius,null),He(m.maps,t,p)):(t="Mercator"===m.maps.projectionType?P.cy-g:P.cy+g,o=new Q(h,P.fill,P.border,y,new K(0,0,2*g,2*g),2,2),P.cx-=g,P.cy=t,We(m.maps,o,p)),Re(m.maps.selectedBubbleElementId,m.maps.bubbleSelectionClass,t,"BubbleselectionMapStyle"),m.bubbleCollection.push({LayerIndex:s,BubbleIndex:l,DataIndex:r,element:t,center:{x:P.cx,y:P.cy}}),o=0!==d.animationDuration||"Enable"===Y.animationMode||Y.isNullOrUndefined(m.maps.zoomModule),o=(1<m.maps.zoomSettings.zoomFactor&&!Y.isNullOrUndefined(m.maps.zoomModule)&&!m.maps.isTileMap?at:nt)(m.maps,d,o),i=a.dataSource,n=o.scale,o=o.location,o=new T(m.maps.isTileMap?(P.cx+m.maps.translatePoint.x)*m.maps.tileZoomLevel:(P.cx+o.x)*n,m.maps.isTileMap?(P.cy+m.maps.translatePoint.y)*m.maps.tileZoomLevel:(P.cy+o.y)*n),t.setAttribute("transform","translate( "+o.x+" "+o.y+" )"),n=i.length-1===r?"bubble":null,"Square"===a.bubbleType?(o.x+=g,o.y+=g*("Mercator"===m.maps.projectionType?1:-1)):g=0,0<a.animationDuration||"Enable"===Y.animationMode)&&ft(t,a.animationDelay,a.animationDuration,o,m.maps,n,g)})}},un.prototype.getPoints=function(e,t){return Y.isNullOrUndefined(e.map)?t=e.point:e.map(function(e){t.push(new J(e.point.x,e.point.y))}),t},un.prototype.bubbleClick=function(e){var t,i=e.target.id;-1===i.indexOf("_LayerIndex_")||(t=this.getbubble(i),Y.isNullOrUndefined(t))||(t={cancel:!1,name:Yo,data:t,maps:this.maps,target:i,x:e.clientX,y:e.clientY},this.maps.trigger(Yo,t))},un.prototype.getbubble=function(e){var t=e.split("_LayerIndex_"),i=parseInt(t[1].split("_")[0],10);if(-1<e.indexOf("_BubbleIndex_")){e=this.maps.layers[i],i=parseInt(t[1].split("_BubbleIndex_")[1],10),t=parseInt(t[1].split("_BubbleIndex_")[1].split("_dataIndex_")[1],10);if(!isNaN(i))return e.bubbleSettings[i].dataSource[t]}return null},un.prototype.bubbleMove=function(e){var t,i=e.target.id;-1===i.indexOf("_LayerIndex_")||(t=this.getbubble(i),Y.isNullOrUndefined(t))||(t={cancel:!1,name:Jo,data:t,maps:this.maps,target:i,x:e.clientX,y:e.clientY},this.maps.trigger(Jo,t))},un.prototype.getModuleName=function(){return"Bubble"},un.prototype.destroy=function(){this.bubbleCollection=[],this.maps=null};y=un;function un(e){this.id="",this.maps=e,this.bubbleCollection=[]}b.prototype.getMapsInstance=function(){return this.maps},b.prototype.markerRender=function(u,g,y,f,b){var S,v=this,x=0,O=0,C=0,_=(u.translateType="marker",u.layersCollection[y]),M=(this.markerSVGObject=u.renderer.createGroup({id:u.element.id+"_Markers_Group",class:"GroupElement"}),this.markerSVGObject.style.pointerEvents="auto",Y.createElement("div",{id:u.element.id+"_LayerIndex_"+y+"_Markers_Template_Group",className:u.element.id+"_template"})),e=(M.style.cssText="overflow: hidden; position: absolute;pointer-events: none;top:"+u.mapAreaRect.y+"px;left:"+u.mapAreaRect.x+"px;height:"+u.mapAreaRect.height+"px;width:"+u.mapAreaRect.width+"px;",0!==_.animationDuration||"Enable"===Y.animationMode||Y.isNullOrUndefined(u.zoomModule));u.isTileMap||(S=(!Y.isNullOrUndefined(u.zoomModule)&&1<u.zoomSettings.zoomFactor?at:nt)(u,_,e)),Array.prototype.forEach.call(_.markerSettings,function(h,m){var c=h.dataSource;Y.isNullOrUndefined(h.dataSource)||Array.prototype.forEach.call(c,function(s,d){u.markerNullCount=0<m&&0===d?0:u.markerNullCount;var p={cancel:!1,name:Zo,fill:h.fill,height:h.height,width:h.width,imageUrl:h.imageUrl,shape:h.shape,template:h.template,data:s,maps:u,marker:h,border:h.border,colorValuePath:h.colorValuePath,shapeValuePath:h.shapeValuePath,imageUrlValuePath:h.imageUrlValuePath};u.trigger("markerRendering",p,function(e){p=ke(p=Ie(p,s),s);var t,i,o=Y.isNullOrUndefined(h.longitudeValuePath)?Y.isNullOrUndefined(s.longitude)?Y.isNullOrUndefined(s.Longitude)?null:parseFloat(s.Longitude):parseFloat(s.longitude):Number(k(s,h.longitudeValuePath)),n=Y.isNullOrUndefined(h.latitudeValuePath)?Y.isNullOrUndefined(s.latitude)?Y.isNullOrUndefined(s.Latitude)?null:parseFloat(s.Latitude):parseFloat(s.latitude):Number(k(s,h.latitudeValuePath)),a=h.offset,l=(p.cancel||!h.visible||Y.isNullOrUndefined(o)||Y.isNullOrUndefined(n)||(l=u.element.id+"_LayerIndex_"+y+"_MarkerIndex_"+m+"_dataIndex_"+d,r=u.isTileMap?R(new T(o,n),f,u.tileTranslatePoint,!0):B(n,o,f,_,u),u.isTileMap&&(S="SubLayer"===_.type&&Y.isNullOrUndefined(u.zoomModule)?r=R(new T(o,n),u.tileZoomLevel,u.tileTranslatePoint,!0):new Object),t=("AddMarker"===b?u:S).scale,i="AddMarker"===b?u.translatePoint:S.location,!p.template||isNaN(r.x)||isNaN(r.y)?p.template||isNaN(r.x)||isNaN(r.y)||(x++,Ze(p,h,c,d,r,i,l,a,t,u,v.markerSVGObject)):(C++,De(p,void 0,l,s,m,M,r,i,t,a,u),u.renderReactTemplates())),O+=isNaN(n)||isNaN(o)?1:0,C+=p.cancel?1:0,x+=p.cancel?1:0,u.markerNullCount=Y.isNullOrUndefined(o)||Y.isNullOrUndefined(n)?u.markerNullCount+1:u.markerNullCount,c.length-u.markerNullCount),r=!1;v.markerSVGObject.childElementCount===l-C-O&&"Template"!==b&&(g.appendChild(v.markerSVGObject),_.markerClusterSettings.allowClustering)&&(u.svgObject.appendChild(v.markerSVGObject),u.element.appendChild(u.svgObject),-1!==_.urlTemplate.indexOf("openstreetmap")&&Y.isNullOrUndefined(_.shapeData)&&u.zoomSettings.enable?(r=ze(_,v.markerSVGObject,u,y,v.markerSVGObject,g,!0,!1),g.appendChild(v.markerSVGObject)):r=ze(_,v.markerSVGObject,u,y,v.markerSVGObject,g,!0,!1),u.renderReactTemplates()),M.childElementCount===l-x-O&&N(u.element.id+"_Secondary_Element")&&(N(u.element.id+"_Secondary_Element").appendChild(M),u.checkInitialRender)&&_.markerClusterSettings.allowClustering&&!r&&(ze(_,M,u,y,v.markerSVGObject,g,!1,!1),u.renderReactTemplates())})})})},b.prototype.calculateIndividualLayerMarkerZoomLevel=function(e,t,i){var o=Math.abs(this.maps.baseMapBounds.latitude.max-this.maps.baseMapBounds.latitude.min),n=Math.abs(this.maps.baseMapBounds.longitude.max-this.maps.baseMapBounds.longitude.min),t=Math.floor(Math.log(t/o)),o=(t=i<t?i:t,i<(o=Math.floor(Math.log(e/n)))?i:o),e=Math.min(t,o),n=Math.min(e,i-1);return this.maps.isTileMap||jt(n,this.maps),n},b.prototype.calculateZoomCenterPositionAndFactor=function(e){var o,n,a,l,t,i,r,s,d,p;Y.isNullOrUndefined(this.maps)||(this.maps.zoomSettings.shouldZoomInitially&&this.maps.markerModule?(r=i=t=void 0,s=this.maps.zoomSettings.maxZoom,d=this.maps.mapAreaRect.width,p=this.maps.mapAreaRect.height,this.maps.markerZoomedState=this.maps.markerZoomedState||(!Y.isNullOrUndefined(this.maps.markerZoomFactor)&&1<this.maps.markerZoomFactor?this.maps.markerZoomedState:!this.maps.markerZoomedState),this.maps.defaultState=this.maps.markerZoomedState?!this.maps.markerZoomedState:this.maps.defaultState,Array.prototype.forEach.call(e,function(e){0!==e.markerSettings.length&&Array.prototype.forEach.call(e.markerSettings,function(e){e=e.dataSource;!Y.isNullOrUndefined(e)&&0<e.length&&Array.prototype.forEach.call(e,function(e,t){var i=Y.isNullOrUndefined(e.latitude)?Y.isNullOrUndefined(e.Latitude)?null:parseFloat(e.Latitude):parseFloat(e.latitude),e=Y.isNullOrUndefined(e.longitude)?Y.isNullOrUndefined(e.Longitude)?null:parseFloat(e.Longitude):parseFloat(e.longitude);Y.isNullOrUndefined(i)||Y.isNullOrUndefined(e)||(o=Y.isNullOrUndefined(o)&&0===t?e:o,n=Y.isNullOrUndefined(n)&&0===t?i:n,a=Y.isNullOrUndefined(a)&&0===t?i:a,l=Y.isNullOrUndefined(l)&&0===t?e:l,e<o&&(o=e),i<a&&(a=i),l<e&&(l=e),n<i&&(n=i))})})}),Y.isNullOrUndefined(a)||Y.isNullOrUndefined(o)||Y.isNullOrUndefined(l)||Y.isNullOrUndefined(n)||(i=(a+n)/2,r=(o+l)/2,this.maps.markerCenterLatitude=i,this.maps.markerCenterLongitude=r,(Y.isNullOrUndefined(this.maps.markerZoomCenterPoint)||this.maps.markerZoomedState)&&(this.maps.markerZoomCenterPoint={latitude:i,longitude:r}),e=void 0,this.maps.isTileMap||0===this.maps.baseMapRectBounds.min.x?(t=Zt(a,n,o,l,d,p,this.maps,!1),this.maps.isTileMap?e=!Y.isNullOrUndefined(this.maps.markerZoomFactor)&&!Y.isNullOrUndefined(this.maps.mapScaleValue)&&1<this.maps.mapScaleValue&&1!==this.maps.markerZoomFactor?this.maps.mapScaleValue:t:(e=!Y.isNullOrUndefined(this.maps.mapScaleValue)&&1!==Math.floor(this.maps.scale)&&this.maps.mapScaleValue!==t&&Y.isNullOrUndefined(this.maps.shouldZoomCurrentFactor)?this.maps.mapScaleValue:t)!==this.maps.mapScaleValue||1!==this.maps.markerZoomFactor&&1!==this.maps.mapScaleValue||this.maps.enablePersistence||(e=t)):(t=this.calculateIndividualLayerMarkerZoomLevel(d,p,s),e=!Y.isNullOrUndefined(this.maps.mapScaleValue)&&this.maps.mapScaleValue!==t?this.maps.mapScaleValue:t),this.maps.markerZoomFactor=e)):(this.maps.markerZoomedState=!1,1<this.maps.markerZoomFactor&&(this.maps.markerCenterLatitude=null,this.maps.markerCenterLongitude=null,this.maps.markerZoomFactor=1,this.maps.enablePersistence||(this.maps.mapScaleValue=1)),this.maps.isTileMap&&!this.maps.enablePersistence&&this.maps.mapScaleValue<=1&&(this.maps.tileZoomLevel=0===this.maps.mapScaleValue?this.maps.isZoomByPosition?this.maps.tileZoomLevel:1:this.maps.mapScaleValue,1!==this.maps.mapScaleValue||1!==this.maps.markerZoomFactor||Y.isNullOrUndefined(this.maps.tileTranslatePoint)||(this.maps.tileTranslatePoint.x=0,this.maps.tileTranslatePoint.y=0))))},b.prototype.markerClick=function(e){var t,i,o,n,a,l,r=e.target.id;-1===(r=-1===r.indexOf(this.maps.element.id)&&(t=e.target.closest("."+this.maps.element.id+"_marker_template_element"),!Y.isNullOrUndefined(t))&&-1<t.id.indexOf("_MarkerIndex_")?t.id:r).indexOf("_LayerIndex_")||0<r.indexOf("_cluster_")||(t=this.getMarker(r),Y.isNullOrUndefined(t))||(t.marker.enableDrag&&(document.getElementById(this.maps.element.id+"_svg").style.cursor="grabbing"),l={cancel:!1,name:Ro,data:t.data,maps:this.maps,marker:t.marker,target:r,x:e.clientX,y:e.clientY,latitude:t.data.latitude||t.data.Latitude,longitude:t.data.longitude||t.data.Longitude,value:t.data.name},this.maps.trigger(Ro,l),!t.marker.enableDrag)||(l=!1,i=parseInt(r.split("_LayerIndex_")[1].split("_")[0],10),o=parseInt(r.split("_MarkerIndex_")[1].split("_")[0],10),n=parseInt(r.split("_dataIndex_")[1].split("_")[0],10),a=this.maps.layers[i].markerSettings[o],l=0<this.sameMarkerData.length?0<this.sameMarkerData[0].data.filter(function(e){return e.index===n}).length&&this.sameMarkerData[0].layerIndex===i&&this.sameMarkerData[0].markerIndex===o:l)||(l={name:Vo,x:e.clientX,y:e.clientY,latitude:t.data.latitude||t.data.Latitude,longitude:t.data.longitude||t.data.Longitude,layerIndex:i,markerIndex:o,dataIndex:n},this.maps.trigger(Vo,l),this.maps.markerDragArgument={targetId:r,x:e.clientX,y:e.clientY,latitude:t.data.latitude||t.data.Latitude,longitude:t.data.longitude||t.data.Longitude,shape:Y.isNullOrUndefined(a.shapeValuePath)?a.shape:a.dataSource[n][a.shapeValuePath],layerIndex:i,markerIndex:o,dataIndex:n})},b.prototype.markerClusterClick=function(e){var t,i=e.target.id;-1===i.indexOf("_LayerIndex_")||-1===i.indexOf("_cluster_")||(t=this.getMarker(i),Y.isNullOrUndefined(t))||(0<t.clusterCollection.length&&this.maps.markerClusterExpand&&(F(this.maps.element.id+"_mapsTooltip")&&-1<this.maps.mapsTooltipModule.tooltipTargetID.indexOf("_MarkerIndex_")&&P(this.maps.element.id+"_mapsTooltip"),0<this.sameMarkerData.length&&!this.maps.markerClusterExpandCheck?(this.maps.markerClusterExpandCheck=!0,Ue(this.sameMarkerData,this.maps)):(this.sameMarkerData=t.clusterCollection,this.maps.markerClusterExpandCheck=!1,je(this.sameMarkerData,this.maps,this.markerSVGObject,!0))),i={cancel:!1,name:Go,data:t,maps:this.maps,target:i,x:e.clientX,y:e.clientY,latitude:t.data.latitude||t.data.Latitude,longitude:t.data.longitude||t.data.Longitude,markerClusterCollection:t.markCollection},this.maps.trigger(Go,i))},b.prototype.getMarker=function(e){var t=e.split("_LayerIndex_"),i=parseInt(t[1].split("_")[0],10),o=this.maps.layers[i],n=[],a=[];if(this.maps.markerClusterExpand=o.markerClusterSettings.allowClusterExpand,-1<e.indexOf("_MarkerIndex_")){var l=parseInt(t[1].split("_MarkerIndex_")[1].split("_")[0],10),t=parseInt(t[1].split("_dataIndex_")[1].split("_")[0],10),r=o.markerSettings[l];if(!isNaN(l)){var s=r.dataSource[t],d=[];if(!r.template&&-1<e.indexOf("_cluster_")&&this.maps.layers[i].markerClusterSettings.allowClusterExpand&&Array.prototype.forEach.call(r.dataSource,function(e,t){e.latitude===s.latitude&&e.longitude===s.longitude&&d.push({data:s,index:t})}),-1<e.indexOf("_cluster_")){for(var p=document.getElementById(-1<e.indexOf("_datalabel_")?"Balloon"===o.markerClusterSettings.shape?e.split("_datalabel_")[0]+"_Group":e.split("_datalabel_")[0]:"Balloon"===o.markerClusterSettings.shape?e+"_Group":e),o=("Balloon"===o.markerClusterSettings.shape?p.children[0]:p).textContent.split(",").map(Number),d=[],h=0,m=o;h<m.length;h++){var c=m[h];d.push({data:r.dataSource[c],index:c}),n.push(r.dataSource[c])}a.push({data:d,layerIndex:i,markerIndex:l,dataIndex:t,targetClusterIndex:+(-1<e.split("_cluster_")[1].indexOf("_datalabel_")?e.split("_cluster_")[1].split("_datalabel_")[0]:e.split("_cluster_")[1]),isClusterSame:!1})}return{marker:r,data:s,clusterCollection:a,markCollection:n}}}return null},b.prototype.markerMove=function(e){var t,i=e.target.id;-1===i.indexOf("_LayerIndex_")||0<i.indexOf("_cluster_")||(t=this.getMarker(i),Y.isNullOrUndefined(t))||(t.marker.enableDrag&&(document.getElementById(this.maps.element.id+"_svg").style.cursor=Y.isNullOrUndefined(this.maps.markerDragArgument)?"pointer":"grabbing"),t={cancel:!1,name:Ho,data:t.data,maps:this.maps,target:i,x:e.clientX,y:e.clientY},this.maps.trigger(Ho,t))},b.prototype.markerClusterMouseMove=function(e){var t,i=e.target.id;-1===i.indexOf("_LayerIndex_")||-1===i.indexOf("_cluster_")||(t=this.getMarker(i),this.maps.markerClusterExpand&&(e.target.style.cursor="pointer"),Y.isNullOrUndefined(t))||(t={cancel:!1,name:Wo,data:t.data,maps:this.maps,target:i,x:e.clientX,y:e.clientY},this.maps.trigger(Wo,t))},b.prototype.initializeMarkerClusterList=function(){for(var e=0;e<this.maps.layers.length;e++)this.initialMarkerCluster[e]=[],this.zoomedMarkerCluster[e]=[]},b.prototype.getModuleName=function(){return"Marker"},b.prototype.destroy=function(){this.maps=null,this.trackElements=[],this.markerSVGObject=null,this.sameMarkerData=[],this.initialMarkerCluster=[],this.zoomedMarkerCluster=[]};var gn=b;function b(e){this.maps=e,this.trackElements=[],this.sameMarkerData=[],this.initialMarkerCluster=[],this.zoomedMarkerCluster=[]}fn.prototype.polygonRender=function(n,a,l){var r=n.layersCollection[a],s=n.renderer.createGroup({id:n.element.id+"_LayerIndex_"+a+"_Polygons_Group"});return r.polygonSettings.polygons.map(function(e,t){var i=n.renderer.createGroup({id:n.element.id+"_LayerIndex_"+a+"_Polygons_Group_"+t}),o=e.points;!Y.isNullOrUndefined(e.points)&&0<e.points.length&&(o=D(n,l,r,o),t=new A(n.element.id+"_LayerIndex_"+a+"_PolygonIndex_"+t,e.fill,e.borderWidth/l,e.borderColor,e.opacity,e.borderOpacity,"",o),e=n.renderer.drawPath(t),Re(n.selectedPolygonElementId,n.polygonSelectionClass,e,"PolygonselectionMapStyle"),i.appendChild(e),s.appendChild(i))}),s},fn.prototype.getModuleName=function(){return"Polygon"},fn.prototype.destroy=function(){};var yn=fn;function fn(e){}Sn.prototype.getDataLabel=function(e,t,i,o){for(var n,a=0;a<(Y.isNullOrUndefined(e)?0:e.length);a++){var l=e[a],r=!Y.isNullOrUndefined(l[o])&&isNaN(l[o])&&"string"==typeof l[o]?l[o].toLowerCase():l[o];if(i=Y.isNullOrUndefined(i)||"string"!=typeof i?i:i.toString(),r===(Y.isNullOrUndefined(i)||"string"!=typeof i?i:i.toLowerCase())){n=l;break}}return n},Sn.prototype.renderLabel=function(g,y,e,t,D,f,b,S){var v,x,O,C,R,V,G,p,_,M=this,i=g.dataLabelSettings,L=g.dataLabelSettings.textStyle,P=g.dataLabelSettings,o=g.dataLabelSettings.labelPath,w=[[]],T=0,n=0,I=e,k="",a=0,H=!1,h=e.properties,N=this.maps.element.id+"_LayerIndex_"+y+"_shapeIndex_"+b+"_LabelIndex_"+b,F=new J(0,0),l=t[b],m=(L.fontFamily="material"!==this.maps.theme.toLowerCase()?this.maps.themeStyle.labelFontFamily:L.fontFamily,L.fontWeight=L.fontWeight||this.maps.themeStyle.fontWeight,L.size=L.size||this.maps.themeStyle.fontSize,e=Y.isNullOrUndefined(l)?null:l.property,"[object Array]"===Object.prototype.toString.call(g.shapePropertyPath)?g.shapePropertyPath:[g.shapePropertyPath]),e=0!==g.animationDuration||"Enable"===Y.animationMode||Y.isNullOrUndefined(this.maps.zoomModule),e=this.maps.isTileMap?new Object:(1<this.maps.zoomSettings.zoomFactor&&!Y.isNullOrUndefined(this.maps.zoomModule)?at:nt)(this.maps,g,e),E=(this.maps.isTileMap?this.maps:e).scale,z=this.maps.isTileMap?this.maps.translatePoint:e.location,B=this.maps.zoomTranslatePoint,A=Y.isNullOrUndefined(this.maps.scale)?1:Math.floor(this.maps.scale),U=this.maps.zoomSettings.enable&&!Y.isNullOrUndefined(this.maps.zoomShapeCollection)&&0<this.maps.zoomShapeCollection.length&&!this.maps.isAddLayer;this.maps.translateType="labels";for(var r=0;r<m.length&&!(h[m[r]]&&(p=m[r],C=this.getDataLabel(g.dataSource,g.shapeDataPath,I.properties[p],g.shapeDataPath)));r++);if(C=this.getDataLabel(g.dataSource,g.shapeDataPath,I.properties[p],g.shapeDataPath),!Y.isNullOrUndefined(l)&&!Y.isNullOrUndefined(l.property))if(w=[[]],t[b]._isMultiPolygon||"Point"===t[b].type||"MultiPoint"===t[b].type){if("Point"!==t[b].type&&"MultiPoint"!==t[b].type)for(var c=t[b],r=0;r<c.length;r++)w.push(this.getPoint(c[r],[])),n<(a=w[w.length-1].length)&&(n=a,T=w.length-1)}else w.push(this.getPoint(t[b],[])),n<(a=w[w.length-1].length)&&(n=a,T=w.length-1);if(k=Y.isNullOrUndefined(C)?I.properties[o]:Y.isNullOrUndefined(C[o])?C[g.shapeDataPath]:C[o].toString(),"[object Array]"===Object.prototype.toString.call(g.shapePropertyPath)&&Y.isNullOrUndefined(k)&&!Y.isNullOrUndefined(g.dataSource)&&0===g.dataSource.length)for(var s=0;s<g.shapePropertyPath.length;s++)if(I.properties[g.shapePropertyPath[s]]){k=I.properties[g.shapePropertyPath[s]];break}Y.isNullOrUndefined(k)&&""!==g.dataLabelSettings.template&&0===g.dataSource.length&&(k=I.properties[g.shapePropertyPath]);var j,W=k=Y.isNullOrUndefined(k)&&!Y.isNullOrUndefined(g.dataSource)&&0<g.dataSource.length?"":k,X=this.maps.projectionType,q=j=$e(w[T],X,g.geometryType);if(!Y.isNullOrUndefined(k)&&!Y.isNullOrUndefined(j)){if(U&&1<A&&!this.maps.zoomNotApplied&&""===i.template){if(0<y)for(var d=0;d<this.maps.zoomLabelPositions.length;d++)if(this.maps.zoomLabelPositions[d].dataLabelText===k){R=b,b=d,H=!0;break}V=j.x,G=j.y,j.x=(j.x+B.x)*E,j.y=(j.y+B.y)*E}j.y="Mercator"===this.maps.projectionType||"Normal"===g.geometryType?j.y:-j.y,Y.isNullOrUndefined(this.maps.format)||isNaN(Number(k))||isNaN(parseFloat(k))||this.maps.useGroupingSeparator&&(k=st(this.maps,parseFloat(k)),Y.isNullOrUndefined(C)||(C[o]=k));var Z={name:Xo,maps:this.maps,cancel:!1,border:{color:i.border.color,width:i.border.width,opacity:i.border.opacity},datalabel:i,fill:i.fill,template:i.template,text:k,offsetX:0,offsetY:0};this.maps.trigger("dataLabelRendering",Z,function(e){if(!Z.cancel){var t,i=U&&1<A&&!M.maps.zoomNotApplied&&M.maps.zoomShapeCollection.length>b?M.maps.dataLabelShape[b]*E:(j.rightMax.x-j.leftMax.x)*E,o=(Y.isNullOrUndefined(M.maps.dataLabelShape)||M.maps.isReset||(_=q.rightMax.x-q.leftMax.x,M.maps.dataLabelShape.push(_)),le(k=Z.text===k||Z.cancel?k:Z.text,L)),n=k,a=o,l=j.y-o.height/2,r=j.y+o.height/2,s=(j.y+z.y)*E-o.height/2,d=(j.y+z.y)*E+o.height/2,l=(5<(l=Qe(w[T],l,r)).length&&"MultiPolygon"!==I.geometry.type&&"MultiPolygon"!==I.type&&(r=$e(l,X,g.geometryType),U&&1<A&&!M.maps.zoomNotApplied&&""===Z.template&&(r.x=(M.maps.zoomLabelPositions[b].location.x+B.x)*E,r.y=(M.maps.zoomLabelPositions[b].location.y+B.y)*E),V=r.x,j.x=r.x,i=U&&1<A&&!M.maps.zoomNotApplied&&M.maps.zoomShapeCollection.length>b?M.maps.dataLabelShape[b]*E:0<(r.rightMax.x-r.leftMax.x)*E?(r.rightMax.x-r.leftMax.x)*E:i),(j.x+z.x)*E+o.width/2),r=(j.x+z.x)*E-o.width/2;if(M.value[b]={rightWidth:l,leftWidth:r,heightTop:s,heightBottom:d},""!==Z.template){l=(_=dt(Z.template,M.maps))?_(Y.isNullOrUndefined(C)?I.properties:C,M.maps,Z.template,M.maps.element.id+"_LabelTemplate",!1):document.createElement("div");l.innerHTML=_?"":Z.template,t=we(l,N,Y.isNullOrUndefined(C)?I.properties:C),M.maps.isTileMap?(t.style.left=(j.x+z.x)*E-o.width/2+"px",t.style.top=(j.y+z.y)*E-o.height+"px"):(t.style.left=Math.abs(M.maps.baseMapRectBounds.min.x-j.x)*E+e.offsetX+"px",t.style.top=Math.abs(M.maps.baseMapRectBounds.min.y-j.y)*E+e.offsetY+"px"),f.appendChild(t)}else{r=Y.isNullOrUndefined(P.smartLabelMode)?"None":P.smartLabelMode.toString(),s=("Trim"===r&&(a=le(n=tt(i,"number"==typeof k?k.toString():k,L,null,!0),L),v=new se(N,F.x,F.y,"middle",n,"","")),"None"===r&&(v=new se(N,F.x,F.y,"middle",k,"","")),"Hide"===r&&(k=i>=o.width?k:"",v=new se(N,F.x,F.y,"middle",k,"","")),Y.isNullOrUndefined(v)||(k=v.text),Y.isNullOrUndefined(P.intersectionAction)?"None":P.intersectionAction.toString());if("Hide"===s){for(var p=0;p<S.length;p++)if(!Y.isNullOrUndefined(S[p])&&!(M.value[b].leftWidth>S[p].rightWidth||M.value[b].rightWidth<S[p].leftWidth||M.value[b].heightTop>S[p].heightBottom||M.value[b].heightBottom<S[p].heightTop)){k="";break}S.push(M.value[b]),v=new se(N,F.x,F.y,"middle",k,"","")}var h,m,c;if("Trim"===s){for(var u=0;u<S.length;u++)if(!Y.isNullOrUndefined(S[u]))if(S[u].rightWidth<M.value[b].leftWidth||S[u].leftWidth>M.value[b].rightWidth||S[u].heightBottom<M.value[b].heightTop||S[u].heightTop>M.value[b].heightBottom)n=k,0;else{if(M.value[b].leftWidth>S[u].leftWidth){n=tt((i=S[u].rightWidth-M.value[b].leftWidth)-(M.value[b].rightWidth-M.value[b].leftWidth),k,L,null,!0);break}if(M.value[b].leftWidth<S[u].leftWidth){i=M.value[b].rightWidth-S[u].leftWidth,n=tt(Math.abs(i-(M.value[b].rightWidth-M.value[b].leftWidth)),k,L,null,!0);break}}a=le(n,L),S.push(M.value[b]),v=new se(N,F.x,F.y,"middle",n,"","")}"None"===s&&(v=new se(N,F.x,F.y,"middle",k,"","")),1<n.length&&1<(d=Z.border).width&&(l=Z.fill,r=P.opacity,s=P.rx,h=P.ry,c=m=void 0,c=U&&1<A&&!M.maps.zoomNotApplied?(m=j.x-o.width/2,j.y-o.height/2-5):(m=(j.x+z.x)*E-o.width/2,(j.y+z.y)*E-o.height/2),d.opacity=Y.isNullOrUndefined(d.opacity)?r:d.opacity,l=new Q(M.maps.element.id+"_LayerIndex_"+y+"_shapeIndex_"+b+"_rectIndex_"+b,l,d,r,new K(m+e.offsetX,c+e.offsetY,o.width,o.height),s,h),(O=M.maps.renderer.drawRectangle(l)).setAttribute("visibility",0<g.dataLabelSettings.animationDuration||"Enable"===Y.animationMode?"hidden":"visibile"),D.appendChild(O)),(x=_e(v,L,L.color||M.maps.themeStyle.dataLabelFontColor,D)).setAttribute("aria-label",k),x.setAttribute("role","region"),x.setAttribute("visibility",0<g.dataLabelSettings.animationDuration||"Enable"===Y.animationMode?"hidden":"visibile"),U&&1<A&&!M.maps.zoomNotApplied?(x.setAttribute("transform","translate( "+(j.x+e.offsetX)+" "+(j.y+e.offsetY)+" )"),j.x=V,j.y=G):x.setAttribute("transform","translate( "+((j.x+z.x)*E+e.offsetX)+" "+((j.y+z.y)*E+a.height/2+e.offsetY)+" )"),D.appendChild(x)}M.dataLabelCollections.push({location:{x:j.x+e.offsetX,y:j.y+e.offsetY},element:Y.isNullOrUndefined(t)?x:t,layerIndex:y,shapeIndex:H?R:b,labelIndex:H?R:b,dataLabelText:W}),0<f.childElementCount&&!M.maps.element.contains(f)&&(document.getElementById(M.maps.element.id+"_Secondary_Element").appendChild(f),M.maps.renderReactTemplates()),!(0<g.dataLabelSettings.animationDuration||"Enable"===Y.animationMode)||Y.isNullOrUndefined(x)||(M.datalabelAnimate(x,P.animationDuration,L.opacity,!1),Y.isNullOrUndefined(O))||M.datalabelAnimate(O,P.animationDuration,P.opacity,!0)}})}},Sn.prototype.datalabelAnimate=function(t,e,i,o){var n;new Y.Animation({}).animate(t,{duration:0===e&&"Enable"===Y.animationMode?1e3:e,delay:0,progress:function(e){e.timeStamp>e.delay&&(n=(e.timeStamp-e.delay)/e.duration,t.setAttribute("style","user-select: none; visibility: visible;"),t.setAttribute(o?"fill-opacity":"opacity",(i*n).toString()))},end:function(){t.style.visibility="visible",t.setAttribute(o?"fill-opacity":"opacity",i.toString())}})},Sn.prototype.getPoint=function(e,t){return"MultiLineString"===e.type?Array.prototype.forEach.call(e,function(e){Array.prototype.forEach.call(e,function(e){t.push(new J(e.point.x,e.point.y))})}):Array.prototype.forEach.call(e,function(e){t.push(new J(e.point.x,e.point.y))}),t},Sn.prototype.getModuleName=function(){return"DataLabel"},Sn.prototype.destroy=function(){this.dataLabelCollections=[],this.value=null,this.maps=null};var bn=Sn;function Sn(e){this.value={rightWidth:0,leftWidth:0,heightTop:0,heightBottom:0},this.maps=e,this.dataLabelCollections=[]}xn.prototype.renderNavigation=function(e,t,i){if(!Y.isNullOrUndefined(this.maps))for(var o,n,a,l,r,s,d,p,h=void 0,m=e.navigationLineSettings,c=[],u=void 0,g=void 0,y=void 0,f=void 0,b=void 0,S=void 0,v=void 0,x=void 0,O=void 0,C=void 0,_=void 0,M=this.maps.renderer.createGroup({id:this.maps.element.id+"_LayerIndex_"+i+"_line_Group"}),L=0;L<m.length;L++){if(n=m[L].latitude,o=m[L].longitude,a=!Y.isNullOrUndefined(m[L].visible)&&m[L].visible,u=Y.isNullOrUndefined(m[L].angle)?0:m[L].angle,l=m[L].width||1,r=m[L].color,s=m[L].dashArray,p=m[L].arrowSettings,d=!Y.isNullOrUndefined(p)&&p.showArrow,!Y.isNullOrUndefined(o)&&!Y.isNullOrUndefined(n)&&o.length===n.length&&a)for(var P=0;P<o.length;P++){var w=this.maps.isTileMap?R(new J(o[P],n[P]),t,this.maps.tileTranslatePoint,!0):B(n[P],o[P],t,e,this.maps);c.push(w)}for(var _=this.maps.renderer.createGroup({id:this.maps.element.id+"_LayerIndex_"+i+"_NavigationGroup"+L}),T=0;T<c.length-1;T++){var I,k,N,F,u=1<(u=u<-1?-1:u)?1:u,E=this.maps.element.id+"_LayerIndex_"+i+"_NavigationIndex_"+L+"_Line"+T,z=this.convertRadius(c[T],c[T+1]);u<=1&&0<u&&(y=0,c[T].x>c[T+1].x)&&(y=1),-1<=u&&u<0&&c[T].x>c[T+(y=1)].x&&(y=0),d&&(f=p.color,b=Y.isNullOrUndefined(p.size)?0:p.size,C=Y.isNullOrUndefined(p.offSet)?0:p.offSet,I=Math.round(b/2),v="Start"===(S=p.position)?"url(#triangle"+L+")":null,x="End"===S?"url(#triangle"+L+")":null,0!==O&&0===u&&(O="Start"===S?C:-C),O=Y.isNullOrUndefined(O)?0:O,k=this.maps.element.id+"_triangle",(N=this.maps.renderer.createDefs()).innerHTML+='<marker id="triangle'+L+'"></marker>',(F=N.querySelector("#triangle"+L)).setAttribute("markerWidth",b.toString()),F.setAttribute("markerHeight",b.toString()),F.setAttribute("refX",(I-O).toString()),F.setAttribute("refY",I.toString()),F.setAttribute("orient","auto"),g=new A(k,f,l,r,1,1,s,"M 0,0 L 0,"+b+" L "+I+", "+I+" Z"),h=this.maps.renderer.drawPath(g),F.appendChild(h),N.appendChild(F),_.appendChild(N)),k=0===(u=Math.abs(u))?"M "+c[T].x+","+c[T].y+"L "+c[T+1].x+","+c[T+1].y+" ":"M "+c[T].x+","+c[T].y+" A "+(z/2+(1-u)*z/(10*u))+" "+(z/2+(1-u)*z/(10*u))+" 0,0,"+y+" , "+c[T+1].x+","+c[T+1].y+" ",g=new A(E,"none",l,r,1,1,s,k),h=this.maps.renderer.drawPath(g),Y.isNullOrUndefined(S)||("Start"===S?h.setAttribute("marker-start",v):h.setAttribute("marker-end",x)),Re(this.maps.selectedNavigationElementId,this.maps.navigationSelectionClass,h,"navigationlineselectionMapStyle"),_.appendChild(h),M.appendChild(_)}c=[]}return M},xn.prototype.convertRadius=function(e,t){var i=t.x-e.x,t=t.y-e.y;return Math.sqrt(Math.pow(i,2)+Math.pow(t,2))},xn.prototype.getModuleName=function(){return"NavigationLine"},xn.prototype.destroy=function(){this.maps=null};var vn=xn;function xn(e){this.maps=e}S.prototype.renderLegend=function(){this.legendRenderingCollections=[],this.legendCollection=[],this.totalPages=[],this.widthIncrement=0,this.heightIncrement=0,this.defsElement=this.maps.renderer.createDefs(),this.maps.svgObject.appendChild(this.defsElement),this.initialMapAreaRect=this.maps.mapAreaRect,this.calculateLegendBounds(),this.drawLegend()},S.prototype.calculateLegendBounds=function(){var h=this,e=this.maps,m=e.legendSettings,t=(this.legendCollection=[],e.mapAreaRect.y);if(this.legendRenderingCollections=[],Array.prototype.forEach.call(e.layersCollection,function(e,t){if(!Y.isNullOrUndefined(e.shapeData)){var i=e.shapeData.features,o=e.shapeDataPath,n=e.shapePropertyPath,a=e.dataSource,l=void 0,r=void 0;if("Layers"===m.type&&e.visible)l=e.shapeSettings.colorValuePath,r=e.shapeSettings.colorMapping,h.getLegends(t,i,r,a,o,l,n);else if("Bubbles"===m.type)for(var s=0,d=e.bubbleSettings;s<d.length;s++){var p=d[s];p.visible&&(l=p.colorValuePath,r=p.colorMapping,a=p.dataSource,h.getLegends(t,i,r,a,o,l,n))}}"Markers"===m.type&&h.getMarkersLegendCollections(t,e.markerSettings)}),0<this.legendCollection.length)for(var i=0;i<this.legendCollection.length;i++){var o=this.legendCollection[i],n={name:Ko,cancel:!1,fill:o.fill,shape:m.shape,shapeBorder:m.shapeBorder,text:"number"==typeof o.text?o.text.toString():o.text};e.trigger("legendRendering",n),o.fill=n.fill,o.shape=n.shape,o.shapeBorder=n.shapeBorder,o.text=n.text,n.cancel&&(this.legendCollection.splice(i,1),i--)}var a=e.legendSettings.title.text,B=e.legendSettings.titleStyle;if(0<this.legendCollection.length){var l,A,U,j=m.mode,r=0,s=0,Z=m.shapePadding,d=m.shapeHeight,p=m.shapeWidth,c=[],u=[],g=m.position,D=m.labelDisplayMode,y="None"===m.orientation?"Top"===g||"Bottom"===g?"Horizontal":"Vertical":m.orientation,f=1<m.width.length?-1<m.width.indexOf("%")?e.availableSize.width/100*parseInt(m.width,10):parseInt(m.width,10):null,b=1<m.height.length?-1<m.height.indexOf("%")?e.availableSize.height/100*parseInt(m.height,10):parseInt(m.height,10):null,S=0,v=0,R=W(a,B);if("Interactive"===j){for(var V=m.textStyle,g=this.legendCollection.length,x="Horizontal"===y?Y.isNullOrUndefined(f)?e.mapAreaRect.width/g:f/g:Y.isNullOrUndefined(f)?25:f,O="Horizontal"===y?Y.isNullOrUndefined(b)?25:b:Y.isNullOrUndefined(b)?e.mapAreaRect.height/g:b/g,C=(v=R.height+10,m.labelPosition),_=S=0,G=0,M=0,L=0,P=0,w=0,i=0;i<this.legendCollection.length;i++){var S="Horizontal"===y?S+x:S,v="Horizontal"===y?v:v+O,T=this.legendCollection[i].text,I=new H(0,0);"None"===D?I=W(T,V):"Trim"===D?I=W(T=tt("Horizontal"===y?x:O,T,V),V):T="",P=Math.max(P,I.height),w=Math.max(w,I.width),0<I.width&&0<I.height&&(G="Horizontal"===y?(_=S+x/2,"After"===C?v+O+I.height/2+10:v-10):(_="After"===C?S-I.width/2-10:S+x+I.width/2+10,v+O/2+I.height/4)),0===i?(M="Horizontal"!==y&&"After"===C?_-I.width/2:S,L="Horizontal"!==y||"After"===C?v:G-I.height/2,1===this.legendCollection.length&&(f="Horizontal"===y?Math.abs(S+x-M):x+w+10,b="Horizontal"===y?O+P/2+10:Math.abs(v+O-L))):i===this.legendCollection.length-1&&(f="Horizontal"===y?Math.abs(S+x-M):x+w+10,b="Horizontal"===y?O+P/2+10:Math.abs(v+O-L)),this.legendRenderingCollections.push({fill:this.legendCollection[i].fill,x:S,y:v,width:x,height:O,text:T,textX:_,textY:G,textWidth:I.width,textHeight:I.height,shapeBorder:this.legendCollection[i].shapeBorder})}1!==this.legendCollection.length||"Fluent2HighContrast"===e.theme&&"Bottom"===m.position||(b=O,f=x),this.legendItemRect={x:M,y:L,width:f,height:b}}else{for(var f=Y.isNullOrUndefined(f)?e.mapAreaRect.width:f,b=Y.isNullOrUndefined(b)?e.mapAreaRect.height:b,k=0,i=this.page=0;i<this.legendCollection.length;i++){var N,F,E,o=this.legendCollection[i],z=(Y.isNullOrUndefined(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]}),W(o.text,m.textStyle));this.textMaxWidth=Math.max(this.textMaxWidth,z.width),0===i?(S=r=10+p/2,v=s=t+R.height+(d>z.height?d/2:z.height/4)):(N=z.height>d?z.height:d,"Horizontal"===y?s=(E=u[k-1].x+u[k-1].width+10+p)+Z+z.width>f?b<(F=(u[k-1].y>c[k-1].y+d/2?u[k-1].y:c[k-1].y+d/2)+t)+N?(this.getPageChanged(),k=0,c=[],u=[],r=S,v):(r=c[0].x,F+N/2):(r=E-p/2,c[k-1].y):b<(F=u[k-1].y>c[k-1].y+d/2?u[k-1].y:c[k-1].y+d/2)+t+N?(E=u[k-1].x+this.textMaxWidth+10)+Z+z.width>f?(r=S,s=v,u=[],c=[],this.getPageChanged(),k=0):(r=E+p/2,s=c[0].y):(r=c[k-1].x,s=F+10+d/2)),N=r+p/2+Z,l=s+z.height/4,c.push({x:r,y:s}),u.push({x:N,y:l,width:z.width,height:z.height/2}),this.totalPages[this.page].Collection.push({DisplayText:o.text,ImageSrc:o.imageSrc,Shape:{x:r,y:s},Text:{x:N,y:l},Fill:o.fill,legendShape:o.shape,shapeBorder:o.shapeBorder,idIndex:i,Rect:{x:c[k].x-p/2,y:c[k].y-d/2<l-z.height?c[k].y-d/2:l-z.height,width:Math.abs(c[k].x-p/2-(N+z.width)),height:d>z.height?d:z.height}}),k++}a=this.totalPages[0].Collection;Array.prototype.forEach.call(a,function(e,t){e=new K(e.Rect.x,e.Rect.y,e.Rect.width,e.Rect.height);0===t&&(A=e.x,U=e.y),h.widthIncrement=Math.max(h.widthIncrement,Math.abs(A-(e.x+e.width))),h.heightIncrement=Math.max(h.heightIncrement,Math.abs(U-(e.y+e.height)))}),f=this.widthIncrement<f?this.widthIncrement:f,b=this.heightIncrement<b?this.heightIncrement:b,this.legendItemRect={x:a[0].Rect.x,y:a[0].Rect.y,width:f,height:b}}}},S.prototype.getLegends=function(e,t,i,o,n,a,l){this.getRangeLegendCollection(e,t,i,o,n,a,l),this.getEqualLegendCollection(e,t,i,o,n,a,l),this.getDataLegendCollection(e,t,i,o,n,a,l)},S.prototype.getPageChanged=function(){this.page++,Y.isNullOrUndefined(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]})},S.prototype.legendTextTrim=function(e,t,i,o){var n=t,a=o-W(t,i).width;if(e<o)for(var l=t.length-1;0<=l;--l)if(a+W(n=t.substring(0,l)+"...",i).width<=e||n.length<4)return n=n.length<4?" ":n;return n},S.prototype.drawLegend=function(){var e=this.maps,t=e.legendSettings,i=e.renderer,o={size:t.textStyle.size,color:t.textStyle.color,fontFamily:t.textStyle.fontFamily,fontWeight:t.textStyle.fontWeight,fontStyle:t.textStyle.fontStyle,opacity:t.textStyle.opacity};if(this.legendGroup=i.createGroup({id:e.element.id+"_Legend_Group"}),"Interactive"===t.mode)for(var n=0;n<this.legendRenderingCollections.length;n++){var a=e.element.id+"_Legend_Index_"+n,l=e.element.id+"_Legend_Index_"+n+"_Text",r=this.legendRenderingCollections[n],s=new K(r.x,r.y,r.width,r.height),d=(0===n&&this.renderLegendBorder(),new J(r.textX,r.textY)),a=(o.color=null!==o.color?o.color:this.maps.themeStyle.legendTextColor,new Q(a,r.fill,r.shapeBorder,t.opacity,s)),s=new se(l,d.x,d.y,"middle",r.text,"",""),l=(o.fontFamily=(Y.isNullOrUndefined(o.fontFamily)?this.maps.themeStyle:o).fontFamily,o.size=o.size||e.themeStyle.legendFontSize,_e(s,o,o.color,this.legendGroup)),d=(l.setAttribute("aria-label",r.text),l.setAttribute("role","region"),i.drawRectangle(a));this.legendGroup.appendChild(d),!e.legendSettings.toggleLegendSettings.enable||"Layers"!==t.type&&"Markers"!==t.type||this.maintainLegendToggle(n,d,l),this.legendToggle()}else this.drawLegendItem(this.currentPage)},S.prototype.drawLegendItem=function(e){var t=this.maps,i=t.legendSettings,o=new H(i.shapeWidth,i.shapeHeight),n=t.renderer,a=i.shape;if(0<=e&&e<this.totalPages.length){C(this.legendGroup.id,this.maps.element.id)&&Y.remove(C(this.legendGroup.id,this.maps.element.id));for(var l=0;l<this.totalPages[e].Collection.length;l++){var r,s,d=this.totalPages[e].Collection[l],p=d.shapeBorder,h=n.createGroup({id:t.element.id+"_Legend_Index_"+d.idIndex}),m=d.DisplayText,c="HorizontalLine"===i.shape||"VerticalLine"===i.shape||"Cross"===i.shape?Y.isNullOrUndefined(i.fill)?"#000000":i.fill:p.color,u=("HorizontalLine"===i.shape||"VerticalLine"===i.shape||"Cross"===i.shape)&&0===p.width?1:p.width,g=t.element.id+"_Legend_Shape_Index_"+d.idIndex,y=t.element.id+"_Legend_Text_Index_"+d.idIndex,f=new J(d.Shape.x,d.Shape.y-4),b=new J(d.Text.x,d.Text.y-4),g=new A(g,d.Fill,u,c,i.opacity,(Y.isNullOrUndefined(p.opacity)?i:p).opacity,""),u={fontFamily:i.textStyle.fontFamily,fontStyle:i.textStyle.fontStyle,fontWeight:i.textStyle.fontWeight,size:i.textStyle.size,color:i.textStyle.color,opacity:i.textStyle.opacity},c=(u.color=null!==u.color?u.color:this.maps.themeStyle.legendTextColor,u.fontFamily=(Y.isNullOrUndefined(u.fontFamily)?this.maps.themeStyle:u).fontFamily,u.size=u.size||t.themeStyle.legendFontSize,u.fontWeight=u.fontWeight||t.themeStyle.fontWeight,0===l&&this.renderLegendBorder(),"Markers"===i.type&&i.useMarkerShape&&(c=this.legendCollection[d.idIndex].data[0],p=t.layers[c.layerIndex].markerSettings[c.markerIndex],a=Y.isNullOrUndefined(p.dataSource[c.dataIndex][p.shapeValuePath])||""===p.dataSource[c.dataIndex][p.shapeValuePath]?p.shape:p.dataSource[c.dataIndex][p.shapeValuePath]),"Balloon"===a?h.appendChild(qe(t,g,o,{x:f.x,y:f.y+5},"Legend")):h.appendChild(Ct(f,a,o,d.ImageSrc,g)),d.Rect.x+d.Rect.width),p=(c>this.legendBorderRect.width&&(m=this.legendTextTrim(this.legendBorderRect.width,m,u,c)),_e(new se(y,b.x,b.y,"start",m,"",""),u,u.color,h));p.setAttribute("aria-label",m),p.setAttribute("role","region"),this.legendGroup.appendChild(h),!t.legendSettings.toggleLegendSettings.enable||"Layers"!==i.type&&"Markers"!==i.type||(f=h.childNodes[0],this.maintainLegendToggle(d.idIndex,f,p)),l===this.totalPages[e].Collection.length-1&&(g=void 0,0!==this.page&&(b=W(c=e+1+"/"+this.totalPages.length,y=i.textStyle),u=this.legendItemRect.x+this.legendItemRect.width-b.width-20-20+2,h=(m=this.legendItemRect.x+this.legendItemRect.width)-10-b.width/2-5-4,d=this.legendItemRect.y+this.legendItemRect.height+2.5+10,g=n.createGroup({id:t.element.id+"_Legend_Paging_Group"}),f=n.createGroup({id:t.element.id+"_Legend_Left_Paging_Group"}),p=n.createGroup({id:t.element.id+"_Legend_Right_Paging_Group"}),r=" M "+m+" "+d+" L "+(m-10)+" "+(d-5)+" L "+(m-10)+" "+(d+5)+" z ",s=new A(t.element.id+"_Left_Page",this.maps.themeStyle.legendTextColor,0,this.maps.themeStyle.legendTextColor,e+1===1?.5:1,1,""," M "+u+" "+d+" L "+(10+u)+" "+(d-5)+" L "+(10+u)+" "+(d+5)+" z "),f.appendChild(n.drawPath(s)),s=new Q(t.element.id+"_Left_Page_Rect","transparent",{},1,new K(u-5,d-10,20,20),null,null,"",""),(u=n.drawRectangle(s)).setAttribute("aria-label","Navigate to the previous legend items"),u.setAttribute("role","button"),u.tabIndex=e+1===1?-1:t.tabIndex,e+1===1?(u.style.cursor="default",u.style.setProperty("outline","none")):(u.style.cursor="pointer",u.style.removeProperty("outline")),f.appendChild(u),this.wireEvents(f),s=new A(t.element.id+"_Right_Page",this.maps.themeStyle.legendTextColor,0,this.maps.themeStyle.legendTextColor,e+1===this.totalPages.length?.5:1,1,"",r),p.appendChild(n.drawPath(s)),r=new Q(t.element.id+"_Right_Page_Rect","transparent",{},1,new K(m-10-5,d-10,20,20),null,null,"",""),(u=n.drawRectangle(r)).setAttribute("aria-label","Navigate to the next legend items"),u.setAttribute("role","button"),u.tabIndex=e+1===this.totalPages.length?-1:t.tabIndex,e+1===this.totalPages.length?(u.style.cursor="default",u.style.setProperty("outline","none")):(u.style.cursor="pointer",u.style.removeProperty("outline")),p.appendChild(u),this.wireEvents(p),g.appendChild(f),g.appendChild(p),s={id:t.element.id+"_Paging_Text",x:h,y:d+b.height/4,fill:this.maps.themeStyle.legendTextColor,"font-size":"14px","font-style":y.fontStyle,"font-family":y.fontFamily,"font-weight":y.fontWeight,"text-anchor":"middle",transform:"",opacity:1,"dominant-baseline":""},(m=n.createText(s,c)).style.cssText="user-select: none;",m.setAttribute("aria-label",c),m.setAttribute("role","region"),g.appendChild(m),this.legendGroup.appendChild(g)),this.legendToggle())}}},S.prototype.maintainLegendToggle=function(e,t,i){var o;this.maps.legendSettings.toggleLegendSettings.enable&&!Y.isNullOrUndefined(this.maps.toggledLegendId)&&-1<this.maps.toggledLegendId.indexOf(e)&&!Y.isNullOrUndefined(this.maps.toggledElementId)&&0<this.maps.toggledElementId.length&&(e=this.legendCollection[e].data,this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(o=e[e.length-1].layerIndex,this.setToggleAttributes(i,t,this.maps.layers[o].shapeSettings.fill,this.maps.layers[o].shapeSettings.opacity,this.maps.layers[o].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor,Y.isNullOrUndefined(this.maps.layers[o].shapeSettings.border.width)?0:this.maps.layers[o].shapeSettings.border.width,(Y.isNullOrUndefined(this.maps.layers[o].shapeSettings.border.opacity)?this.maps.layers[o].shapeSettings:this.maps.layers[o].shapeSettings.border).opacity,this.maps.layers[o].shapeSettings.fill)):this.setToggleAttributes(i,t,this.maps.legendSettings.toggleLegendSettings.fill,this.maps.legendSettings.toggleLegendSettings.opacity,this.maps.legendSettings.toggleLegendSettings.border.color,this.maps.legendSettings.toggleLegendSettings.border.width,(Y.isNullOrUndefined(this.maps.legendSettings.toggleLegendSettings.border.opacity)?this.maps.legendSettings.toggleLegendSettings:this.maps.legendSettings.toggleLegendSettings.border).opacity,this.maps.legendSettings.toggleLegendSettings.fill),e._isVisible=!1)},S.prototype.legendHighLightAndSelection=function(e,t){var i="Default"===this.maps.legendSettings.mode?document.getElementById(e.id.replace("Shape","Text")):document.getElementById(e.id+"_Text"),o=this.maps.legendModule.legendCollection,n=!Y.isNullOrUndefined(o[0].data[0].layerIndex)&&this.maps.layers[o[0].data[0].layerIndex].selectionSettings.enableMultiSelect,a=0,l=!0,r=parseFloat(e.id.charAt(e.id.length-1)),s=(this.updateLegendElement(),this.maps.toggledLegendId.indexOf(r));if(this.maps.legendSettings.toggleLegendSettings.enable&&"highlight"===t&&-1!==s)return-1!==(s=this.getIndexofLegend(this.legendHighlightCollection,e))&&this.legendHighlightCollection.splice(s,1),this.removeLegendHighlightCollection(),null;if("selection"===t){if(this.shapeHighlightCollection=[],this.maps.shapeSelections||n||(this.removeAllSelections(),this.maps.shapeSelections=!0),0<this.maps.legendSelectionCollection.length&&(n||this.maps.shapeSelections))for(var d=0;d<this.maps.legendSelectionCollection.length;d++){if(e===this.maps.legendSelectionCollection[d].legendElement){this.maps.legendSelectionCollection[d].legendElement=e,l=!1,this.removeLegendSelectionCollection(this.maps.legendSelectionCollection[d].legendElement),this.maps.selectedLegendElementId.splice(this.maps.selectedLegendElementId.indexOf(r),1),this.maps.legendSelectionCollection.splice(d,1),this.maps.legendSelection=!(0<this.maps.legendSelectionCollection.length);break}if(!n)if(1<this.maps.legendSelectionCollection.length){for(var p=0;p<this.maps.legendSelectionCollection.length;p++)this.removeLegendSelectionCollection(this.maps.legendSelectionCollection[p].legendElement);this.maps.legendSelectionCollection=[]}else this.removeLegendSelectionCollection(this.maps.legendSelectionCollection[d].legendElement),this.maps.legendSelectionCollection.splice(d,1)}}else{if(0<this.maps.legendSelectionCollection.length)for(d=0;d<this.maps.legendSelectionCollection.length;d++){if((-1<e.id.indexOf("_Legend_Shape")||e.id.indexOf("_Legend_Index"))&&e===this.maps.legendSelectionCollection[d].legendElement){l=!1;break}this.removeLegendHighlightCollection()}this.removeLegendHighlightCollection()}if(l)for(var h=0;h<o.length;h++){var m="Interactive"===this.maps.legendSettings.mode?parseFloat(e.id.split("_Legend_Index_")[1]):parseFloat(e.id.split("_Legend_Shape_Index_")[1]);if(i.textContent===o[h].text&&0<o[h].data.length&&m===h){var c=this.maps.layers[o[h].data[0].layerIndex],m=void 0,u=void 0,g=void 0;if(Y.isNullOrUndefined(c)||(m=("selection"===t?c.selectionSettings:c.highlightSettings).enable,u=void 0,u="selection"===t?c.selectionSettings:c.highlightSettings,g=o[h].data),m)for(var y=0;y<g.length;y++){var f=void 0,b=g[y].shapeIndex,S=g[y].layerIndex,v=g[y].dataIndex;if(null!==(f=-1===(x=g[y].pointIndex)?document.getElementById(this.maps.element.id+"_LayerIndex_"+S+"_shapeIndex_"+b+"_dataIndex_"+v):document.getElementById(this.maps.element.id+"_LayerIndex_"+S+"_shapeIndex_"+b+"_dataIndex_"+v+"_multiLine_"+x))){var x,O,C=!0;if(null!==this.maps.legendSelectionCollection)for(var _=0;_<this.maps.legendSelectionCollection.length;_++)if(this.maps.legendSelectionCollection[_].legendElement===e){C=!1;break}"highlight"===t&&C?(0===y&&(this.legendHighlightCollection=[],this.pushCollection(e,this.legendHighlightCollection,o[h],c.shapeSettings)),S=this.legendHighlightCollection.length,b=this.legendHighlightCollection[S-1].legendOldFill,this.legendHighlightCollection[S-1].MapShapeCollection.Elements.push(f),v=this.legendHighlightCollection[S-1].MapShapeCollection.Elements.length-1,x=f.getAttribute("fill"),O=f.getAttribute("fill-opacity"),this.legendHighlightCollection[S-1].shapeOldFillColor.push(x),this.legendHighlightCollection[S-1].shapeOldOpacity=O,x=this.legendHighlightCollection[S-1].shapeOldFillColor[v],O=this.legendHighlightCollection[S-1].shapeOldOpacity,this.shapePreviousColor=this.legendHighlightCollection[S-1].shapeOldFillColor,this.setColor(f,Y.isNullOrUndefined(u.fill)?x:u.fill,Y.isNullOrUndefined(u.opacity)?O:u.opacity.toString(),u.border.color,u.border.width.toString(),"highlight"),this.setColor(e,Y.isNullOrUndefined(u.fill)?b:u.fill,Y.isNullOrUndefined(u.opacity)?O:u.opacity.toString(),u.border.color,u.border.width.toString(),"highlight")):"selection"===t&&(this.legendHighlightCollection=[],this.maps.legendSelectionClass=u,0===y&&(this.pushCollection(e,this.maps.legendSelectionCollection,o[h],c.shapeSettings),n||0!==this.maps.selectedLegendElementId.length&&(this.maps.selectedLegendElementId=[]),this.maps.selectedLegendElementId.push(h)),a=this.maps.legendSelectionCollection.length,v=this.maps.legendSelectionCollection[a-1].legendOldFill,this.maps.legendSelectionCollection[a-1].MapShapeCollection.Elements.push(f),this.maps.legendSelectionCollection[a-1].shapeOldFillColor=this.shapePreviousColor,this.setColor(e,Y.isNullOrUndefined(u.fill)?v:u.fill,u.opacity.toString(),u.border.color,u.border.width.toString(),"selection"),this.setColor(f,Y.isNullOrUndefined(u.fill)?v:u.fill,u.opacity.toString(),u.border.color,u.border.width.toString(),"selection"),-1===this.maps.selectedElementId.indexOf(f.getAttribute("id"))&&this.maps.selectedElementId.push(f.getAttribute("id")),y===g.length-1)&&(this.maps.legendSelection=!1,this.removeLegend(this.maps.legendSelectionCollection))}}}}},S.prototype.setColor=function(e,t,i,o,n,a){var l=-1<e.parentElement.id.indexOf("LineString");"selection"===a?(Ge(l?"LineselectionMap":"ShapeselectionMap",l?"LineselectionMapStyle":"ShapeselectionMapStyle",l?"transparent":t,i,l?t:o,n,this.maps),e.setAttribute("class",l?"LineselectionMapStyle":"ShapeselectionMapStyle")):(e.setAttribute("fill",l?"transparent":t),e.setAttribute("fill-opacity",i),e.setAttribute("stroke",l?t:o),e.setAttribute("stroke-width",(Number(n)/this.maps.scale).toString()))},S.prototype.pushCollection=function(e,t,i,o){t.push({legendElement:e,legendOldFill:i.fill,legendOldOpacity:i.opacity,legendOldBorderColor:i.borderColor,legendOldBorderWidth:i.borderWidth,shapeOpacity:o.opacity,shapeOldBorderColor:o.border.color||this.maps.themeStyle.shapeBorderColor,shapeOldBorderWidth:o.border.width});e=t.length;t[e-1].MapShapeCollection={Elements:[]},t[e-1].shapeOldFillColor=[],t[e-1].shapeOldOpacity=null},S.prototype.removeLegend=function(e){for(var t=0;t<e.length;t++)for(var i=e[t],o=(this.setColor(i.legendElement,i.legendOldFill,i.legendOldOpacity,i.legendOldBorderColor,i.legendOldBorderWidth,"highlight"),i.MapShapeCollection.Elements.length),n=0;n<o;n++){var a=-1!==i.legendOldFill.indexOf("url")?i.shapeOldFillColor[n]:i.legendOldFill,l=Y.isNullOrUndefined(i.shapeOldOpacity)?i.shapeOpacity:i.shapeOldOpacity;this.setColor(i.MapShapeCollection.Elements[n],a,l,i.shapeOldBorderColor,i.shapeOldBorderWidth,"highlight")}},S.prototype.removeLegendHighlightCollection=function(){0<this.legendHighlightCollection.length&&(this.removeLegend(this.legendHighlightCollection),this.legendHighlightCollection=[])},S.prototype.removeLegendSelectionCollection=function(e){if(0<this.maps.legendSelectionCollection.length){x(e);for(var t=this.shapesOfLegend(e),i=t.length,o=0;o<i;o++){var n=F(t[o]);"ShapeselectionMapStyle"!==n.getAttribute("class")&&"LineselectionMapStyle"!==n.getAttribute("class")||(x(n),-1!==(n=this.maps.selectedElementId.indexOf(n.id))&&this.maps.selectedElementId.splice(n,1))}}},S.prototype.removeShapeHighlightCollection=function(){if(0<this.shapeHighlightCollection.length)for(var e=0;e<this.shapeHighlightCollection.length;e++){for(var t=this.shapeHighlightCollection[e],i=!0,o=0;o<this.maps.legendSelectionCollection.length;o++)this.maps.legendSelectionCollection[o].legendElement===t.legendElement&&(i=!1);i&&this.setColor(t.legendElement,t.legendOldFill,t.legendOldOpacity,t.legendOldBorderColor,t.legendOldBorderWidth,"highlight")}},S.prototype.shapeHighLightAndSelection=function(e,t,i,o,n){if(void 0!==t){this.updateLegendElement(),this.shapeToggled=!0;var a=this.maps.legendModule.legendCollection,l=this.legendIndexOnShape(t,n),r=this.shapeDataOnLegend(e),t=this.maps.toggledLegendId.indexOf(l.actualIndex);if(this.maps.legendSettings.toggleLegendSettings.enable&&-1!==t)return this.shapeToggled=!1,this.legendHighlightCollection=[],-1!==(t=this.getIndexofLegend(this.shapeHighlightCollection,r.LegendEle))&&this.shapeHighlightCollection.splice(t,1),this.removeShapeHighlightCollection(),null;if(void 0===l.currentIndex&&void 0===l.actualIndex)return this.removeShapeHighlightCollection(),null;if(void 0!==l.currentIndex||"selection"!==o||this.maps.layers[n].selectionSettings.enableMultiSelect||"ShapeselectionMapStyle"===e.getAttribute("class")||(this.maps.legendSelection=!1),"selection"!==o||this.maps.layers[n].selectionSettings.enableMultiSelect||this.maps.legendSelection||(this.removeAllSelections(),this.maps.legendSelection=!0),void 0===l.currentIndex){if("selection"===o&&void 0!==l.actualIndex){for(var s=0,d=0;d<r.Elements.length;d++)"ShapeselectionMapStyle"===r.Elements[d].getAttribute("class")&&s++;t=this.maps.selectedLegendElementId.indexOf(l.actualIndex);-1===t?(this.maps.selectedLegendElementId.push(l.actualIndex),this.maps.legendSelectionClass=i):s<=1&&("ShapeselectionMapStyle"===e.getAttribute("class")||"LineselectionMapStyle"===e.getAttribute("class"))&&(!this.maps.layers[n].selectionSettings.enableMultiSelect||s<=1&&("ShapeselectionMapStyle"===e.getAttribute("class")||"LineselectionMapStyle"===e.getAttribute("class")))&&this.maps.selectedLegendElementId.splice(t,1)}return this.removeShapeHighlightCollection(),null}var t=a[l.actualIndex].text,p=void 0,h=void 0,m=("Default"===this.maps.legendSettings.mode?void 0!==l.currentIndex&&(p=document.getElementById(this.maps.element.id+"_Legend_Text_Index_"+l.actualIndex).textContent,h=document.getElementById(this.maps.element.id+"_Legend_Shape_Index_"+l.actualIndex)):(p=document.getElementById(this.maps.element.id+"_Legend_Index_"+l.actualIndex+"_Text").textContent,h=document.getElementById(this.maps.element.id+"_Legend_Index_"+l.actualIndex)),this.oldShapeElement=r.LegendEle,this.maps.legendSelectionCollection.length);if(t===p){var c=!0;if(this.maps.legendSelectionCollection)for(d=0;d<this.maps.legendSelectionCollection.length;d++)if(this.maps.legendSelectionCollection[d].legendElement===r.LegendEle){c=!1;break}if("highlight"===o&&c){(void 0===(g=this.isTargetSelected(r,this.shapeHighlightCollection))||g&&!g.IsSelected)&&this.pushCollection(h,this.shapeHighlightCollection,a[l.actualIndex],this.maps.layers[n].shapeSettings);for(var u=0;u<this.shapeHighlightCollection.length;u++)r.LegendEle.id===this.shapeHighlightCollection[u].legendElement.id&&(this.shapeHighlightCollection[u].legendElement=r.LegendEle);if(0<m)for(u=0;u<m;u++){if(r.LegendEle===this.maps.legendSelectionCollection[u].legendElement){this.maps.legendSelectionCollection[u].legendElement=r.LegendEle,this.removeShapeHighlightCollection();break}u===m-1&&(this.removeShapeHighlightCollection(),this.setColor(h,Y.isNullOrUndefined(i.fill)?h.getAttribute("fill"):i.fill,i.opacity.toString(),i.border.color,i.border.width.toString(),"highlight"))}else this.removeShapeHighlightCollection(),this.setColor(h,Y.isNullOrUndefined(i.fill)?h.getAttribute("fill"):i.fill,Y.isNullOrUndefined(i.opacity)?"1":i.opacity.toString(),i.border.color,i.border.width.toString(),"highlight")}else if("selection"===o){var g=this.isTargetSelected(r,this.maps.legendSelectionCollection);if(0<m)for(var y,f,u=0;u<this.maps.legendSelectionCollection.length;)r.LegendEle===this.maps.legendSelectionCollection[u].legendElement||i.enableMultiSelect?u++:(y=this.maps.legendSelectionCollection[u],f=this.maps.selectedLegendElementId.indexOf(l.actualIndex),this.maps.selectedLegendElementId.splice(f,1),this.maps.legendSelectionCollection.splice(u,1),x(y.legendElement),this.maps.shapeSelections=!0,u=0);if(g&&g.IsSelected&&("ShapeselectionMapStyle"===e.getAttribute("class")||"LineselectionMapStyle"===e.getAttribute("class"))){var b=0;if(i.enableMultiSelect)for(d=0;d<r.Elements.length;d++)e.getAttribute("class")===r.Elements[d].getAttribute("class")&&b++;b<=1&&(i.enableMultiSelect||this.maps.legendSelection)&&(this.maps.selectedLegendElementId.splice(this.maps.selectedLegendElementId.indexOf(l.actualIndex),1),Y.isNullOrUndefined(r.LegendEle)||x(r.LegendEle),this.maps.legendSelectionCollection.splice(g.SelectionIndex,1),this.maps.shapeSelections=!0)}else{void 0!==g&&(!g||g.IsSelected)||Y.isNullOrUndefined(h)||-1===(S=this.getIndexofLegend(this.maps.legendSelectionCollection,h))&&this.pushCollection(h,this.maps.legendSelectionCollection,a[l.actualIndex],this.maps.layers[n].shapeSettings);for(var S,v=!0,d=0;d<this.maps.selectedLegendElementId.length;d++)l.actualIndex===this.maps.selectedLegendElementId[d]&&(v=!1);v&&this.maps.selectedLegendElementId.push(l.actualIndex),this.maps.legendSelectionClass=i,this.removeLegend(this.shapeHighlightCollection),Y.isNullOrUndefined(h)||(this.setColor(h,Y.isNullOrUndefined(i.fill)?h.getAttribute("fill"):i.fill,Y.isNullOrUndefined(i.opacity)?"1":i.opacity.toString(),i.border.color,i.border.width.toString(),"selection"),S=this.getIndexofLegend(this.maps.legendSelectionCollection,h),this.maps.legendSelectionCollection[S].MapShapeCollection.Elements.push(e)),this.maps.shapeSelections=!1}}else 0<document.getElementsByClassName("highlightMapStyle").length&&(this.removeShapeHighlightCollection(),x(document.getElementsByClassName("highlightMapStyle")[0]))}}else this.removeShapeHighlightCollection()},S.prototype.isTargetSelected=function(e,t){for(var i,o=0;o<t.length;o++)Y.isNullOrUndefined(e.LegendEle.getAttribute("id"))||e.LegendEle.getAttribute("id")!==t[o].legendElement.getAttribute("id")||(i={IsSelected:!0,SelectionIndex:o});return i},S.prototype.updateLegendElement=function(){for(var e=0;e<this.maps.legendSelectionCollection.length;e++)document.getElementById(this.maps.legendSelectionCollection[e].legendElement.id)&&(this.maps.legendSelectionCollection[e].legendElement=document.getElementById(this.maps.legendSelectionCollection[e].legendElement.id))},S.prototype.getIndexofLegend=function(e,t){return e.map(function(e){return e.legendElement}).indexOf(t)},S.prototype.removeAllSelections=function(){for(var e=0;e<this.maps.selectedElementId.length;e++)x(i=document.getElementById(this.maps.selectedElementId[e]));for(var t=0;t<this.maps.selectedLegendElementId.length;t++){var i=("Interactive"===this.maps.legendSettings.mode?this.maps.element.id+"_Legend_Index_":this.maps.element.id+"_Legend_Shape_Index_")+this.maps.selectedLegendElementId[t],o=document.getElementById(i);Y.isNullOrUndefined(o)||x(document.getElementById(i))}this.maps.legendSelectionCollection=[],this.maps.selectedLegendElementId=[],this.maps.selectedElementId=[]},S.prototype.legendIndexOnShape=function(e,t){for(var i,o,n,a=e[this.maps.layers[t].shapeDataPath],l=this.maps.legendSettings.mode,r=this.maps.legendModule.legendCollection,s=("Default"===l&&!Y.isNullOrUndefined(this.maps.legendModule.totalPages)&&0<this.maps.legendModule.totalPages.length&&(n=this.maps.legendModule.totalPages[this.maps.legendModule.currentPage].Collection),"Default"!==l||Y.isNullOrUndefined(n)?1:n.length),d=0;d<r.length;d++){for(var p=r[d].data,h=0;h<s;h++)if("Default"!==l||r[d].text===n[h].DisplayText)for(var m=0;m<p.length;m++)a===p[m].name&&(i=h);for(m=0;m<p.length;m++)a===p[m].name&&(o=d)}return{currentIndex:i,actualIndex:o}},S.prototype.shapeDataOnLegend=function(e){for(var t=this.maps.legendModule.legendCollection,i=this.maps.legendSettings,o=0;o<t.length;o++){for(var n=t[o].data,a=!1,l=[],r={Elements:[]},s=0;s<n.length;s++){var d,p=void 0,h=n[s].shapeIndex,m=n[s].layerIndex,c=n[s].dataIndex;e===(p=-1===(d=n[s].pointIndex)?document.getElementById(this.maps.element.id+"_LayerIndex_"+m+"_shapeIndex_"+h+"_dataIndex_"+c):document.getElementById(this.maps.element.id+"_LayerIndex_"+m+"_shapeIndex_"+h+"_dataIndex_"+c+"_multiLine_"+d))&&(a=!0),l.push(p)}if(a)return Y.isNullOrUndefined(r.LegendEle)&&(r.LegendEle="Default"===i.mode?document.getElementById(this.maps.element.id+"_Legend_Shape_Index_"+o):document.getElementById(this.maps.element.id+"_Legend_Index_"+o)),r.Elements=l,r}return null},S.prototype.shapesOfLegend=function(e){for(var e=parseFloat(e.id.charAt(e.id.length-1)),t=this.maps.legendModule.legendCollection[e].data,i=[],o=0;o<t.length;o++){var n,a=void 0,l=t[o].shapeIndex,r=t[o].layerIndex,s=t[o].dataIndex,a=-1===(n=t[o].pointIndex)?document.getElementById(this.maps.element.id+"_LayerIndex_"+r+"_shapeIndex_"+l+"_dataIndex_"+s):document.getElementById(this.maps.element.id+"_LayerIndex_"+r+"_shapeIndex_"+l+"_dataIndex_"+s+"_multiLine_"+n);Y.isNullOrUndefined(a)||i.push(a.id)}return i},S.prototype.legendToggle=function(){var e=this.maps,t=e.legendSettings;if(this.maps.selectedLegendElementId)for(var i=0;i<this.maps.selectedLegendElementId.length;i++){var o="Interactive"===t.mode?this.maps.element.id+"_Legend_Index_":this.maps.element.id+"_Legend_Shape_Index_",n=e.svgObject.querySelector("#"+o+this.maps.selectedLegendElementId[i]);if(!Y.isNullOrUndefined(n)){o=Y.isNullOrUndefined(this.maps.legendSelectionClass.fill)?n.getAttribute("fill"):this.maps.legendSelectionClass.fill;this.setColor(n,o,this.maps.legendSelectionClass.opacity.toString(),this.maps.legendSelectionClass.border.color,this.maps.legendSelectionClass.border.width.toString(),"selection");for(var a=0;a<this.maps.legendSelectionCollection.length;a++)this.maps.legendSelectionCollection[a].legendElement.id===n.id&&(this.maps.legendSelectionCollection[a].legendElement=n);-1===this.getIndexofLegend(this.maps.legendSelectionCollection,n)&&(o=this.maps.legendModule.legendCollection[this.maps.selectedLegendElementId[i]].data[i].layerIndex,this.pushCollection(n,this.maps.legendSelectionCollection,this.maps.legendModule.legendCollection[this.maps.selectedLegendElementId[i]],this.maps.layers[o].shapeSettings))}}if(this.maps.toggledLegendId)for(i=0;i<this.maps.toggledLegendId.length;i++){var l="Interactive"===t.mode?"#"+this.maps.element.id+"_Legend_Index_"+this.maps.toggledLegendId[i]+"_Text":"#"+this.maps.element.id+"_Legend_Text_Index_"+this.maps.toggledLegendId[i],l=e.svgObject.querySelector(l),l=(Y.isNullOrUndefined(l)||l.setAttribute("fill","#E5E5E5"),"Interactive"===t.mode?"#"+this.maps.element.id+"_Legend_Index_"+this.maps.toggledLegendId[i]:"#"+this.maps.element.id+"_Legend_Shape_Index_"+this.maps.toggledLegendId[i]),l=e.svgObject.querySelector(l);Y.isNullOrUndefined(l)||l.setAttribute("fill","#E5E5E5")}},S.prototype.renderLegendBorder=function(){for(var e=this.maps,t=e.legendSettings,i=t.title.text,o={fontFamily:t.titleStyle.fontFamily,fontStyle:t.titleStyle.fontStyle,fontWeight:t.titleStyle.fontWeight,size:t.titleStyle.size,color:t.titleStyle.color,opacity:t.titleStyle.opacity},n=tt(this.legendItemRect.width+20,i,o),a=W(n,o),l=!1,r=0;r<this.legendRenderingCollections.length;r++){if(this.legendRenderingCollections[r].textWidth!==this.legendRenderingCollections[0].textWidth){l=!1;break}l=!0}this.legendBorderRect=new K("Fluent2HighContrast"!==e.theme||l||"Left"!==t.position&&"Right"!==t.position||"Interactive"!==t.mode?this.legendItemRect.x-10:this.legendItemRect.x-30,this.legendItemRect.y-10-a.height,this.legendItemRect.width+20,this.legendItemRect.height+20+a.height+("Interactive"!==t.mode&&0!==this.page?10:0));var s={color:t.border.color||this.maps.themeStyle.legendBorderColor,opacity:t.border.opacity,width:t.border.width||this.maps.themeStyle.legendBorderWidth},s=(s.opacity=Y.isNullOrUndefined(s.opacity)?1:s.opacity,new Q(e.element.id+"_Legend_Border",t.background,s,1,this.legendBorderRect,null,null,"",""));this.legendGroup.appendChild(e.renderer.drawRectangle(s)),this.getLegendAlignment(e,this.legendBorderRect.width,this.legendBorderRect.height,t),this.legendGroup.setAttribute("transform","translate( "+(this.translate.x+-this.legendBorderRect.x)+" "+(this.translate.y+-this.legendBorderRect.y)+" )"),"Float"!==t.position&&e.svgObject.appendChild(this.legendGroup),i&&(o.color=null!==o.color?o.color:this.maps.themeStyle.legendTitleFontColor,o.fontFamily=(Y.isNullOrUndefined(o.fontFamily)?this.maps.themeStyle:o).fontFamily,o.size=Y.isNullOrUndefined(o.size)?this.maps.themeStyle.subTitleFontSize||At.legendTitleFont.size:o.size,o.fontWeight=Y.isNullOrUndefined(o.fontWeight)?this.maps.themeStyle.titleFontWeight||At.legendTitleFont.fontWeight:o.fontWeight,(s=_e(new se(e.element.id+"_LegendTitle",this.legendItemRect.x+this.legendItemRect.width/2,this.legendItemRect.y-a.height/2-5,"middle",n,""),o,o.color,this.legendGroup)).setAttribute("aria-label",i),s.setAttribute("role","region"))},S.prototype.changeNextPage=function(e){this.currentPage=-1<e.target.id.indexOf("_Left_Page_")?this.currentPage-1:this.currentPage+1,this.legendGroup=this.maps.renderer.createGroup({id:this.maps.element.id+"_Legend_Group"}),this.maps.mapAreaRect=this.initialMapAreaRect,this.drawLegendItem(this.currentPage),Y.isNullOrUndefined(this.maps.legendModule)||"Float"!==this.maps.legendSettings.position||(this.maps.isTileMap?this.maps.mapLayerPanel.layerGroup:this.maps.svgObject).appendChild(this.maps.legendModule.legendGroup),C(this.maps.element.id+"_Legend_Border",this.maps.element.id)&&(C(this.maps.element.id+"_Legend_Border",this.maps.element.id).style.pointerEvents="none")},S.prototype.getLegendAlignment=function(e,t,i,o){var n,a,l=Y.extend({},e.mapAreaRect,void 0,!0),r=l.x,s=l.y,d=l.height,p=l.width,h=e.availableSize.width,m=e.availableSize.height,c=Y.isNullOrUndefined(o.location.x)?0:o.location.x,u=Y.isNullOrUndefined(o.location.y)?0:o.location.y;if("Float"===o.position)this.translate=e.isTileMap?new J(c,u+2.5):new J(c+e.mapAreaRect.x,u+e.mapAreaRect.y),this.legendTotalRect=e.mapAreaRect;else{switch(o.position){case"Top":case"Bottom":l.height="Top"===o.position?d-i:d-i-20,n=h/2-t/2,a="Top"===o.position?s:s+l.height,l.y="Top"===o.position?s+i+(e.isTileMap?5:10):s-5;break;case"Left":case"Right":l.width=p-t-e.mapAreaRect.x,n="Left"===o.position?r+5:r+l.width+10,a=m/2-i/2,l.x="Left"===o.position?r+t+10:r}switch(o.alignment){case"Near":"Top"===o.position||"Bottom"===o.position?n=l.x-("Interactive"===o.mode?10:0):a=l.y-(o.height&&o.width||"Interactive"!==o.mode?0:e.mapAreaRect.x);break;case"Far":"Top"===o.position||"Bottom"===o.position?n=h-t-("Interactive"===o.mode?0:10):a=m-i-("Default"===o.mode?10:0)}(o.height||o.width)&&"Interactive"!==o.mode?this.legendTotalRect=e.mapAreaRect=e.totalRect=l:(e.totalRect=null,(o.height||o.width)&&"Interactive"===o.mode&&(e.totalRect=l),this.legendTotalRect=e.mapAreaRect=l),"Left"===o.position&&(e.mapAreaRect.width=l.width),this.translate=new J(n,a)}},S.prototype.getMarkersLegendCollections=function(d,e){var p=this;Array.prototype.forEach.call(e,function(l,r){var e=l.dataSource,s=l.legendText;Array.prototype.forEach.call(e,function(e,t){var i,o,n,a=!!Y.isNullOrUndefined(e[p.maps.legendSettings.showLegendPath])||e[p.maps.legendSettings.showLegendPath];l.visible&&a&&!Y.isNullOrUndefined(e.latitude)&&!Y.isNullOrUndefined(e.longitude)&&(l.template&&(i=dt(l.template,p.maps)(p.maps),(Y.isNullOrUndefined(i.childElementCount)?i[0]:i).querySelector("img").src),i=Y.isNullOrUndefined(e[s])?"":e[s],o=Y.isNullOrUndefined(l.colorValuePath)?l.fill:e[l.colorValuePath],n=[],p.maps.legendSettings.removeDuplicateLegend?n.push(p.getMarkerLegendData(d,i,o)):n.push({layerIndex:d,markerIndex:r,dataIndex:t,value:o,name:i,shape:Y.isNullOrUndefined(l.shapeValuePath)||Y.isNullOrUndefined(e[l.shapeValuePath])||""===e[l.shapeValuePath]?(p.maps.legendSettings.useMarkerShape?l:p.maps.legendSettings).shape:e[l.shapeValuePath]}),p.getOverallLegendItemsCollection(i,o,n,a))})})},S.prototype.getMarkerLegendData=function(n,a,l){var r=this,s=[];return this.maps.layers[n].markerSettings.map(function(e,o){e=e.dataSource;Array.prototype.forEach.call(e,function(e,t){var i=r.maps.layers[n].markerSettings[o];a!==e[i.legendText]&&""!==a||l!==(e[i.colorValuePath]||i.fill)||s.push({layerIndex:n,markerIndex:o,dataIndex:t,value:l,name:a,shape:Y.isNullOrUndefined(i.shapeValuePath)?i.shape:e[i.shapeValuePath]})})}),s},S.prototype.getRangeLegendCollection=function(a,l,e,t,r,s,d){for(var i,p=this,h=0,m=this.maps.legendSettings.fill,c=[],u=this,o=0,n=e;o<n.length;o++)!function(o){var n,e;Y.isNullOrUndefined(o.from)||Y.isNullOrUndefined(o.to)||(i=Y.isNullOrUndefined(o.label)?o.from+" - "+o.to:o.label,n=!(c=[]),!Y.isNullOrUndefined(t)&&0<t.length&&Array.prototype.forEach.call(t,function(e,t){var i=-1<s.indexOf(".")?Number(k(e,s)):parseFloat(e[s]);i>=o.from&&i<=o.to&&(n=!0,c.push(p.getLegendData(a,t,e,r,l,d,i)))}),n||c.push({layerIndex:a,shapeIndex:null,dataIndex:null,name:null,value:null}),e=Y.isNullOrUndefined(m)?"[object Array]"===Object.prototype.toString.call(o.color)?Y.isNullOrUndefined(o.value)?u.legendGradientColor(o,h):o.color[0]:o.color:m,h++,u.getOverallLegendItemsCollection(i,e,c,o.showLegend))}(n[o])},S.prototype.getOverallLegendItemsCollection=function(e,t,i,o){var n=[],a=this.maps.legendSettings;if(0<i.length&&o){for(var l=0;l<i.length;l++){var r=i[l];if(0<r.length)for(var s=0;s<r.length;s++)n.push(r[s]);else n.push(i[l]);n._isVisible=!0}if(!!this.maps.legendSettings.removeDuplicateLegend&&this.removeDuplicates(this.legendCollection,e,t))for(l=0;l<this.legendCollection.length;l++)this.legendCollection[l].text===e&&this.legendCollection[l].fill===t&&this.legendCollection[l].data.push(n[0]);else this.legendCollection.push({text:e,fill:t,data:n,opacity:a.opacity,borderColor:a.shapeBorder.color,borderWidth:a.shapeBorder.width})}},S.prototype.removeDuplicates=function(e,t,i){for(var o=!1,n=0;n<e.length;n++)if((e[n].text===t||""===e[n].text)&&e[n].fill===i){o=!0;break}return o},S.prototype.getEqualLegendCollection=function(r,s,d,p,h,m,c){for(var u,g=this,y=this.maps.legendSettings.fill,f=[],b=[],S=[],v=[],x=this,e=0,t=d;e<t.length;e++)!function(o){if(Y.isNullOrUndefined(o.value)){var n;Y.isNullOrUndefined(o.minOpacity)&&Y.isNullOrUndefined(o.maxOpacity)&&Y.isNullOrUndefined(o.value)&&Y.isNullOrUndefined(o.from)&&Y.isNullOrUndefined(o.to)&&!Y.isNullOrUndefined(o.color)&&(Array.prototype.forEach.call(p,function(e,t){for(var i=-1<m.indexOf(".")?k(e,m):e[m],o=0;o<S.length;o++)i===S[o]&&v.push(g.getLegendData(r,t,e,h,s,c,i))}),0===S.length&&(n=!1,Array.prototype.forEach.call(p,function(e,t){n=!1;for(var i=e[m],o=0;o<d.length;o++)Y.isNullOrUndefined(i)||isNaN(i)?n=n||!1:i>=d[o].from&&i<=d[o].to&&(n=!0);n||v.push(g.getLegendData(r,t,e,h,s,c,i))})),u=Y.isNullOrUndefined(o.label)?"Others":o.label,l="[object Array]"===Object.prototype.toString.call(o.color)?o.color[0]:o.color,x.getOverallLegendItemsCollection(u,l,v,o.showLegend))}else{u=Y.isNullOrUndefined(o.label)?o.value:o.label;var a=!(b=[]);!Y.isNullOrUndefined(p)&&0<p.length&&Array.prototype.forEach.call(p,function(e,t){var i=m&&-1<m.indexOf(".")?k(e,m):e[m];i===o.value?(a=!0,-1===f.indexOf(i)&&f.push(i),b.push(g.getLegendData(r,t,e,h,s,c,i))):-1===S.indexOf(i)&&S.push(i)});for(var e=0;e<f.length;e++)for(var t,i=0;i<S.length;i++)f[e]===S[i]&&(t=S.indexOf(f[e]),S.splice(t,1));a||b.push({layerIndex:r,shapeIndex:null,dataIndex:null,name:null,value:null});var l=Y.isNullOrUndefined(y)?"[object Array]"===Object.prototype.toString.call(o.color)?o.color[0]:o.color:y;x.getOverallLegendItemsCollection(u,l,b,o.showLegend)}}(t[e])},S.prototype.getDataLegendCollection=function(l,r,s,e,d,p,h){var m,c=this,u=this.maps.legendSettings.fill,g=this.maps.legendSettings.valuePath;Y.isNullOrUndefined(p)||Y.isNullOrUndefined(e)||Array.prototype.forEach.call(e,function(e,t){var i=!!Y.isNullOrUndefined(c.maps.legendSettings.showLegendPath)||!Y.isNullOrUndefined(e[c.maps.legendSettings.showLegendPath])&&e[c.maps.legendSettings.showLegendPath],o=-1<p.indexOf(".")?k(e,p):e[p],n=[],a=Y.isNullOrUndefined(u)?o:u;Y.isNullOrUndefined(o)||0!==s.length||Y.isNullOrUndefined(g)&&Y.isNullOrUndefined(d)||(m=Y.isNullOrUndefined(e[g])?-1<d.indexOf(".")?k(e,d):e[d]:-1<g.indexOf(".")?k(e,g):e[g],n.push(c.getLegendData(l,t,e,d,r,h,o))),c.getOverallLegendItemsCollection(m,a,n,i)})},S.prototype.interactiveHandler=function(e){var e=e.target,i=this.maps.legendSettings,o=this.maps.element.id+"_Interactive_Legend",t="Layers"===i.type?"_shapeIndex_":"Markers"===i.type?"_MarkerIndex_":"_BubbleIndex_";if(1<e.id.indexOf(t)){var n=parseFloat(e.id.split("_LayerIndex_")[1].split("_")[0]),a=parseFloat(e.id.split(/_dataIndex_/i)[1].split("_")[0]),l=void 0,r=void 0,s=void 0,t=(Y.isNullOrUndefined(C(o,this.maps.element.id))||Y.remove(C(o,this.maps.element.id)),this.maps.layersCollection[n]),t="Layers"===i.type?t.visible:"Markers"===i.type?t.markerSettings[parseFloat(e.id.split("_MarkerIndex_")[1].split("_")[0])].visible:this.maps.getBubbleVisible(this.maps.layersCollection[n]);if(i.visible&&0<this.legendRenderingCollections.length&&"Interactive"===i.mode&&t)for(var d=this.maps.svgObject.getBoundingClientRect(),p=0;p<this.legendCollection.length;p++){var h=this.legendCollection[p],m=C(this.maps.element.id+"_Legend_Index_"+p,this.maps.element.id),c=m.getBoundingClientRect(),u=new K(Math.abs(c.left-d.left),Math.abs(c.top-d.top),c.width,c.height),l=m.getAttribute("fill"),r=i.shapeBorder.color,s=i.shapeBorder.width;if(!Y.isNullOrUndefined(h.data))for(var g=h.data,y=this,f=0;f<g.length;f++)if("break"===function(e){var t;if(a===g[e].dataIndex&&n===g[e].layerIndex)return y.renderInteractivePointer(i,l,r,o,s,u),t=C(o,y.maps.element.id),y.maps.isDevice&&!Y.isNullOrUndefined(t)&&(clearTimeout(y.arrowTimer),y.arrowTimer=setTimeout(function(){Y.isNullOrUndefined(t.parentNode)||Y.remove(t)},2e3)),"break"}(f))break}}else Y.isNullOrUndefined(C(o,this.maps.element.id))||Y.remove(C(o,this.maps.element.id))},S.prototype.renderInteractivePointer=function(e,t,i,o,n,a){var l,r,s="None"===e.orientation?"Top"===e.position||"Bottom"===e.position?"Horizontal":"Vertical":e.orientation,a=(a.y="Float"===e.position&&this.maps.isTileMap?a.y-this.maps.mapAreaRect.y:a.y,s="Horizontal"===s?e.invertedPointer?" M "+(l=a.x+a.width/2-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(r=a.y+a.height)+" L "+(l-10)+" "+(r+10)+" L "+(l+10)+" "+(r+10)+" Z ":" M "+(l=a.x+a.width/2-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(r=a.y)+" L "+(l-10)+" "+(r-10)+" L "+(l+10)+" "+(r-10)+" Z ":e.invertedPointer?" M "+(l=a.x-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(r=a.y+a.height/2)+" L "+(l-10)+" "+(r-10)+" L "+(l-10)+" "+(r+10)+" z ":" M "+(l=a.x+a.width-("Float"===e.position&&this.maps.isTileMap?this.maps.mapAreaRect.x:0))+" "+(r=a.y+a.height/2)+" L "+(l+10)+" "+(r-10)+" L "+(l+10)+" "+(r+10)+" z ",new A(o,t,n,i,1,1,"",s));("Float"===e.position&&this.maps.isTileMap?this.maps.mapLayerPanel.layerGroup:this.maps.svgObject).appendChild(this.maps.renderer.drawPath(a))},S.prototype.wireEvents=function(e){Y.EventHandler.add(e,Y.Browser.touchStartEvent,this.changeNextPage,this)},S.prototype.addEventListener=function(){this.maps.isDestroyed||(this.maps.on(Y.Browser.touchMoveEvent,this.interactiveHandler,this),this.maps.on(Y.Browser.touchEndEvent,this.interactiveHandler,this),this.maps.on(Io,this.legendClick,this))},S.prototype.markerToggleSelection=function(e,t,i,o){e.setAttribute("fill",this.legendCollection[o].fill),e.setAttribute("stroke",this.maps.layers[t].markerSettings[i].border.color),e.setAttribute("fill-opacity",this.maps.layers[t].markerSettings[i].opacity.toString()),e.setAttribute("stroke-width",this.maps.layers[t].markerSettings[i].border.width.toString()),e.setAttribute("stroke-opacity",(Y.isNullOrUndefined(this.maps.layers[t].markerSettings[i].border.opacity)?this.maps.layers[t].markerSettings[i]:this.maps.layers[t].markerSettings[i].border).opacity.toString());o=this.maps.toggledElementId.indexOf(e.id);-1!==o&&this.maps.toggledElementId.splice(o,1)},S.prototype.bubbleToggleSelection=function(e,t,i,o){e.setAttribute("fill",this.legendCollection[o].fill),e.setAttribute("stroke",this.maps.layers[t].bubbleSettings[i].border.color),e.setAttribute("fill-opacity",this.maps.layers[t].bubbleSettings[i].opacity.toString()),e.setAttribute("stroke-width",this.maps.layers[t].bubbleSettings[i].border.width.toString()),e.setAttribute("stroke-opacity",(Y.isNullOrUndefined(this.maps.layers[t].bubbleSettings[i].border.opacity)?this.maps.layers[t].bubbleSettings[i]:this.maps.layers[t].bubbleSettings[i].border).opacity.toString())},S.prototype.legendClick=function(e){var t,i,o=this.maps.legendSettings.toggleLegendSettings.fill,n=this.maps.legendSettings.toggleLegendSettings.opacity,a=this.maps.legendSettings.toggleLegendSettings.border.color,l=this.maps.legendSettings.toggleLegendSettings.border.width,r=(Y.isNullOrUndefined(this.maps.legendSettings.toggleLegendSettings.border.opacity)?this.maps.legendSettings.toggleLegendSettings:this.maps.legendSettings.toggleLegendSettings.border).opacity;if(!Y.isNullOrUndefined(e.parentNode)&&-1<e.parentNode.id.indexOf(this.maps.element.id+"_Legend_Index_")){var s=void 0,d=parseFloat(e.parentElement.id.substr((this.maps.element.id+"_Legend_Index_").length)),p=(f=this.legendCollection[d].data)._isVisible,h=void 0;if(this.maps.legendSettings.toggleLegendSettings.enable&&("Bubbles"===this.maps.legendSettings.type||"Markers"===this.maps.legendSettings.type))for(var m=0;m<this.maps.layers.length;m++)for(var c=0;c<("Bubbles"===this.maps.legendSettings.type?this.maps.layers[m].bubbleSettings:this.maps.layers[m].markerSettings).length;c++){for(var u=0;u<f.length;u++){h=this.legendCollection[d].data[u],s="Bubbles"===this.maps.legendSettings.type?C(this.maps.element.id+"_LayerIndex_"+h.layerIndex+"_BubbleIndex_"+c+"_dataIndex_"+h.dataIndex,this.maps.element.id):C(this.maps.element.id+"_LayerIndex_"+h.layerIndex+"_MarkerIndex_"+h.markerIndex+"_dataIndex_"+h.dataIndex,this.maps.element.id),Y.isNullOrUndefined(h.shape)||"Balloon"!==h.shape||(s=(s="Bubbles"===this.maps.legendSettings.type?C(this.maps.element.id+"_LayerIndex_"+h.layerIndex+"_BubbleIndex_"+c+"_dataIndex_"+h.dataIndex+"_Group",this.maps.element.id):C(this.maps.element.id+"_LayerIndex_"+h.layerIndex+"_MarkerIndex_"+h.markerIndex+"_dataIndex_"+h.dataIndex+"_Group",this.maps.element.id)).children[0]);var g=this.maps.toggledLegendId.indexOf(d);p&&null!==s?(this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(s.setAttribute("fill",this.maps.layers[m].shapeSettings.fill),s.setAttribute("stroke",this.maps.layers[m].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor),s.setAttribute("fill-opacity",this.maps.layers[m].shapeSettings.opacity.toString()),s.setAttribute("stroke-width",(Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.width)?0:this.maps.layers[m].shapeSettings.border.width).toString()),s.setAttribute("stroke-opacity",(Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.opacity)?this.maps.layers[m].shapeSettings:this.maps.layers[m].shapeSettings.border).opacity.toString())):(s.setAttribute("fill",o),s.setAttribute("fill-opacity",n.toString()),s.setAttribute("stroke",a),s.setAttribute("stroke-width",l.toString()),s.setAttribute("stroke-opacity",r.toString())),"Markers"===this.maps.legendSettings.type&&(-1===g&&this.maps.toggledLegendId.push(d),-1===this.maps.toggledElementId.indexOf(s.id))&&this.maps.toggledElementId.push(s.id),null!==e&&(t=C(this.maps.element.id+"_Legend_Shape_Index_"+d,this.maps.element.id),i=C(this.maps.element.id+"_Legend_Text_Index_"+d,this.maps.element.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?this.setToggleAttributes(i,t,this.maps.layers[m].shapeSettings.fill,this.maps.layers[m].shapeSettings.opacity,this.maps.layers[m].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor,Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.width)?0:this.maps.layers[m].shapeSettings.border.width,(Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.opacity)?this.maps.layers[m].shapeSettings:this.maps.layers[m].shapeSettings.border).opacity,this.maps.layers[m].shapeSettings.fill):this.setToggleAttributes(i,t,o,n,a,l,r,o))):("Markers"===this.maps.legendSettings.type?(-1!==g&&0===u&&this.maps.toggledLegendId.splice(g,1),this.markerToggleSelection(s,m,c,d)):this.bubbleToggleSelection(s,m,c,d),null!==e&&(t=C(this.maps.element.id+"_Legend_Shape_Index_"+d,this.maps.element.id),i=C(this.maps.element.id+"_Legend_Text_Index_"+d,this.maps.element.id),this.setToggleAttributes(i,t,this.legendCollection[d].fill,this.legendCollection[d].opacity,this.legendCollection[d].shapeBorder.color,this.legendCollection[d].shapeBorder.width,this.legendCollection[d].shapeBorder.opacity,this.maps.legendSettings.textStyle.color),"HorizontalLine"!==this.maps.legendSettings.shape&&"VerticalLine"!==this.maps.legendSettings.shape&&"Cross"!==this.maps.legendSettings.shape||t.setAttribute("stroke",this.legendCollection[d].fill)))}f._isVisible=!p}if("Layers"===this.maps.legendSettings.type&&this.maps.legendSettings.toggleLegendSettings.enable){var y=void 0;this.removeCollections(e,d),-1!==(g=this.maps.toggledLegendId.indexOf(d))&&(p=!1);for(c=0;c<this.maps.layers.length;c++)for(u=0;u<f.length;u++){h=this.legendCollection[d].data[u];null!==(y=C(this.maps.element.id+"_LayerIndex_"+h.layerIndex+"_shapeIndex_"+h.shapeIndex+"_dataIndex_"+h.dataIndex,this.maps.element.id))&&(O=this.maps.toggledElementId.indexOf(y.id),p?(0===u&&this.maps.toggledLegendId.push(d),-1===O&&this.maps.toggledElementId.push(y.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(y.setAttribute("fill",this.maps.layers[c].shapeSettings.fill),y.setAttribute("fill-opacity",this.maps.layers[c].shapeSettings.opacity.toString()),y.setAttribute("stroke",this.maps.layers[c].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor),y.setAttribute("stroke-width",(Y.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width).toString()),y.setAttribute("stroke-opacity",(Y.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.opacity)?this.maps.layers[c].shapeSettings:this.maps.layers[c].shapeSettings.border).opacity.toString())):(y.setAttribute("fill",o),y.setAttribute("fill-opacity",n.toString()),y.setAttribute("stroke",a),y.setAttribute("stroke-width",l.toString()),y.setAttribute("stroke-opacity",r.toString())),null!==e&&(i=C(this.maps.element.id+"_Legend_Text_Index_"+d,this.maps.element.id),t=C(this.maps.element.id+"_Legend_Shape_Index_"+d,this.maps.element.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?this.setToggleAttributes(i,t,this.maps.layers[c].shapeSettings.fill,this.maps.layers[c].shapeSettings.opacity,this.maps.layers[c].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor,Y.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width,(Y.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.opacity)?this.maps.layers[c].shapeSettings:this.maps.layers[c].shapeSettings.border).opacity,this.maps.layers[c].shapeSettings.fill):this.setToggleAttributes(i,t,o,n,a,l,r,o))):(-1!==g&&0===u&&this.maps.toggledLegendId.splice(g,1),-1!==O&&this.maps.toggledElementId.splice(O,1),y.setAttribute("fill",this.legendCollection[d].fill),y.setAttribute("stroke-opacity",(Y.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.opacity)?this.maps.layers[c].shapeSettings:this.maps.layers[c].shapeSettings.border).opacity.toString()),y.setAttribute("stroke-width",(Y.isNullOrUndefined(this.maps.layers[c].shapeSettings.border.width)?0:this.maps.layers[c].shapeSettings.border.width).toString()),y.setAttribute("fill-opacity",this.maps.layers[c].shapeSettings.opacity.toString()),y.setAttribute("stroke",this.maps.layers[c].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor),null!==e&&(i=C(this.maps.element.id+"_Legend_Text_Index_"+d,this.maps.element.id),t=C(this.maps.element.id+"_Legend_Shape_Index_"+d,this.maps.element.id),this.setToggleAttributes(i,t,this.legendCollection[d].fill,this.legendCollection[d].opacity,this.legendCollection[d].shapeBorder.color,this.legendCollection[d].shapeBorder.width,this.legendCollection[d].shapeBorder.opacity,"#757575"))))}f._isVisible=!p}}else if(!Y.isNullOrUndefined(e.id)&&(-1<e.id.indexOf(this.maps.element.id+"_Legend_Shape_Index")||-1!==e.id.indexOf(this.maps.element.id+"_Legend_Index"))&&this.maps.legendSettings.visible&&-1===e.id.indexOf("_Text")){var f,b=void 0,d=parseFloat(e.id.split(this.maps.element.id+"_Legend_Index_")[1]),S=void 0,p=(f=this.legendCollection[d].data)._isVisible;if(("Bubbles"===this.maps.legendSettings.type||"Markers"===this.maps.legendSettings.type)&&this.maps.legendSettings.toggleLegendSettings.enable)for(g=this.maps.toggledLegendId.indexOf(d),m=0;m<this.maps.layers.length;m++)for(c=0;c<("Bubbles"===this.maps.legendSettings.type?this.maps.layers[m].bubbleSettings:this.maps.layers[m].markerSettings).length;c++){for(u=0;u<f.length;u++){S=this.legendCollection[d].data[u],b="Bubbles"===this.maps.legendSettings.type?C(this.maps.element.id+"_LayerIndex_"+S.layerIndex+"_BubbleIndex_"+c+"_dataIndex_"+S.dataIndex,this.maps.element.id):C(this.maps.element.id+"_LayerIndex_"+S.layerIndex+"_MarkerIndex_"+c+"_dataIndex_"+S.dataIndex,this.maps.element.id);Y.isNullOrUndefined(S.shape)||"Balloon"!==S.shape||(b=(b="Bubbles"===this.maps.legendSettings.type?C(this.maps.element.id+"_LayerIndex_"+S.layerIndex+"_BubbleIndex_"+c+"_dataIndex_"+S.dataIndex+"_Group",this.maps.element.id):C(this.maps.element.id+"_LayerIndex_"+S.layerIndex+"_MarkerIndex_"+c+"_dataIndex_"+S.dataIndex+"_Group",this.maps.element.id)).children[0]),p&&null!==b?("Markers"===this.maps.legendSettings.type&&(-1===g&&this.maps.toggledLegendId.push(d),-1===this.maps.toggledElementId.indexOf(b.id))&&this.maps.toggledElementId.push(b.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(b.setAttribute("fill",this.maps.layers[m].shapeSettings.fill),b.setAttribute("stroke",this.maps.layers[m].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor),b.setAttribute("stroke-width",(Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.width)?0:this.maps.layers[m].shapeSettings.border.width).toString()),b.setAttribute("stroke-opacity",(Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.opacity)?this.maps.layers[m].shapeSettings:this.maps.layers[m].shapeSettings.border).opacity.toString()),b.setAttribute("fill-opacity",this.maps.layers[m].shapeSettings.opacity.toString())):(b.setAttribute("fill",o),b.setAttribute("fill-opacity",n.toString()),b.setAttribute("stroke",a),b.setAttribute("stroke-width",l.toString()),b.setAttribute("stroke-opacity",r.toString())),null!==e&&(i=C(this.maps.element.id+"_Legend_Index_"+d+"_Text",this.maps.element.id),t=C(this.maps.element.id+"_Legend_Index_"+d,this.maps.element.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?this.setToggleAttributes(i,t,this.maps.layers[m].shapeSettings.fill,this.maps.layers[m].shapeSettings.opacity,this.maps.layers[m].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor,Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.width)?0:this.maps.layers[m].shapeSettings.border.width,(Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.opacity)?this.maps.layers[m].shapeSettings:this.maps.layers[m].shapeSettings.border).opacity,this.maps.layers[m].shapeSettings.fill):this.setToggleAttributes(i,t,o,n,a,l,r,o))):("Markers"===this.maps.legendSettings.type?(-1!==g&&0===u&&this.maps.toggledLegendId.splice(g,1),this.markerToggleSelection(b,m,c,d)):this.bubbleToggleSelection(b,m,c,d),null!==e&&((t=C(this.maps.element.id+"_Legend_Index_"+d,this.maps.element.id)).setAttribute("fill",this.legendCollection[d].fill),t.setAttribute("fill-opacity",this.legendCollection[d].opacity),t.setAttribute("stroke",this.legendCollection[d].shapeBorder.color),t.setAttribute("stroke-width",this.legendCollection[d].shapeBorder.width),t.setAttribute("stroke-opacity",this.legendCollection[d].shapeBorder.opacity),(i=C(this.maps.element.id+"_Legend_Index_"+d+"_Text",this.maps.element.id)).setAttribute("fill",this.maps.legendSettings.textStyle.color)))}f._isVisible=!p}if("Layers"===this.maps.legendSettings.type&&this.maps.legendSettings.toggleLegendSettings.enable){var v=void 0,x=(this.removeCollections(e,d),this.maps.toggledLegendId.indexOf(d));-1!==x&&(p=!1);for(m=0;m<this.maps.layers.length;m++)for(var O,u=0;u<f.length;u++)S=this.legendCollection[d].data[u],null!==(v=C(this.maps.element.id+"_LayerIndex_"+S.layerIndex+"_shapeIndex_"+S.shapeIndex+"_dataIndex_"+S.dataIndex,this.maps.element.id))&&(O=this.maps.toggledElementId.indexOf(v.id),p?(0===u&&this.maps.toggledLegendId.push(d),-1===O&&this.maps.toggledElementId.push(v.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?(v.setAttribute("fill",this.maps.layers[0].shapeSettings.fill),v.setAttribute("stroke",this.maps.layers[0].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor),v.setAttribute("fill-opacity",this.maps.layers[m].shapeSettings.opacity.toString()),v.setAttribute("stroke-width",(Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.width)?0:this.maps.layers[m].shapeSettings.border.width).toString()),v.setAttribute("stroke-opacity",(Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.opacity)?this.maps.layers[m].shapeSettings:this.maps.layers[m].shapeSettings.border).opacity.toString())):(v.setAttribute("fill",o),v.setAttribute("fill-opacity",n.toString()),v.setAttribute("stroke",a),v.setAttribute("stroke-width",l.toString()),v.setAttribute("stroke-opacity",r.toString())),null!==e&&(t=C(this.maps.element.id+"_Legend_Index_"+d,this.maps.element.id),i=C(this.maps.element.id+"_Legend_Index_"+d+"_Text",this.maps.element.id),this.maps.legendSettings.toggleLegendSettings.applyShapeSettings?this.setToggleAttributes(i,t,this.maps.layers[0].shapeSettings.fill,this.maps.layers[m].shapeSettings.opacity,this.maps.layers[0].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor,Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.width)?0:this.maps.layers[m].shapeSettings.border.width,(Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.opacity)?this.maps.layers[m].shapeSettings:this.maps.layers[m].shapeSettings.border).opacity,this.maps.layers[0].shapeSettings.fill):this.setToggleAttributes(i,t,o,n,a,l,r,o))):(-1!==x&&0===u&&this.maps.toggledLegendId.splice(x,1),-1!==O&&this.maps.toggledElementId.splice(O,1),v.setAttribute("fill-opacity",this.maps.layers[m].shapeSettings.opacity.toString()),v.setAttribute("stroke-width",(Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.width)?0:this.maps.layers[m].shapeSettings.border.width).toString()),v.setAttribute("stroke",this.maps.layers[0].shapeSettings.border.color||this.maps.themeStyle.shapeBorderColor),v.setAttribute("stroke-opacity",(Y.isNullOrUndefined(this.maps.layers[m].shapeSettings.border.opacity)?this.maps.layers[m].shapeSettings:this.maps.layers[m].shapeSettings.border).opacity.toString()),v.setAttribute("fill",this.legendCollection[d].fill),null!==e&&(i=C(this.maps.element.id+"_Legend_Index_"+d+"_Text",this.maps.element.id),t=C(this.maps.element.id+"_Legend_Index_"+d,this.maps.element.id),this.setToggleAttributes(i,t,this.legendCollection[d].fill,this.legendCollection[d].opacity,this.legendCollection[d].shapeBorder.color,this.legendCollection[d].shapeBorder.width,this.legendCollection[d].shapeBorder.opacity,"#757575"))));f._isVisible=!p}}},S.prototype.removeCollections=function(e,t){this.removeLegendSelectionCollection(e);var i=this.getIndexofLegend(this.maps.legendSelectionCollection,e);-1!==i&&this.maps.legendSelectionCollection.splice(i,1);-1!==this.getIndexofLegend(this.legendHighlightCollection,e)&&this.legendHighlightCollection.splice(i,1);i=this.getIndexofLegend(this.shapeHighlightCollection,e),-1!==i&&this.shapeHighlightCollection.splice(i,1),e=this.maps.selectedLegendElementId.indexOf(t);-1!==e&&this.maps.selectedLegendElementId.splice(e,1)},S.prototype.removeEventListener=function(){this.maps.isDestroyed||(this.maps.off(Y.Browser.touchMoveEvent,this.interactiveHandler),this.maps.off(Y.Browser.touchEndEvent,this.interactiveHandler),this.maps.off(Io,this.legendClick))},S.prototype.getLegendData=function(e,t,i,o,n,a,l){var r=[];if("[object Array]"===Object.prototype.toString.call(n))for(var s=0;s<n.length;s++){var d=n[s],p=-1<o.indexOf(".")?k(i,o):i[o],h=Je(i[o],a,d.properties),p=Y.isNullOrUndefined(p)||"string"!=typeof p?p:p.toLowerCase();if((!Y.isNullOrUndefined(d.properties[h])&&isNaN(d.properties[h])?d.properties[h].toLowerCase():d.properties[h])===p)if("MultiPoint"!==d.geometry.type)r.push({layerIndex:e,shapeIndex:s,dataIndex:t,name:i[o],value:l,pointIndex:-1});else for(var m=0;m<d.geometry.coordinates.length;m++)r.push({layerIndex:e,shapeIndex:s,dataIndex:t,name:i[o],value:l,pointIndex:m})}return r},S.prototype.setToggleAttributes=function(e,t,i,o,n,a,l,r){e.setAttribute("fill",r),t.setAttribute("fill",i),t.setAttribute("fill-opacity",o.toString()),t.setAttribute("stroke",n),t.setAttribute("stroke-width",a.toString()),Y.isNullOrUndefined(l)||t.setAttribute("stroke-opacity",l.toString())},S.prototype.legendGradientColor=function(e,t){var i="http://www.w3.org/2000/svg";if(!Y.isNullOrUndefined(e.color)&&"object"==typeof e.color){var o=document.createElementNS(i,"linearGradient"),n=this.maps.legendSettings.position,a="Top"===n||"Bottom"===n?"100":"0",n="Top"===n||"Bottom"===n?"0":"100";o.setAttribute("id","linear_"+t+"_"+this.maps.element.id),o.setAttribute("x1","0%"),o.setAttribute("y1","0%"),o.setAttribute("x2",a+"%"),o.setAttribute("y2",n+"%");for(var l=0;l<e.color.length;l++){var r=100/(e.color.length-1),s=document.createElementNS(i,"stop");s.setAttribute("offset",l*r+"%"),s.setAttribute("stop-color",e.color[l]),s.setAttribute("stop-opacity",1..toString()),o.appendChild(s)}this.legendLinearGradient=o;a="url(#linear_"+t+"_"+this.maps.element.id+")";this.defsElement.appendChild(o),n=a}return n},S.prototype.getModuleName=function(){return"Legend"},S.prototype.destroy=function(){this.legendCollection=[],this.legendRenderingCollections=[],this.translate=null,this.legendBorderRect=null,this.initialMapAreaRect=null,this.legendTotalRect=null,this.totalPages=[],this.legendItemRect=null,this.legendGroup=null,this.shapeHighlightCollection=[],this.legendHighlightCollection=[],this.shapePreviousColor=[],this.selectedNonLegendShapes=[],this.legendLinearGradient=null,this.currentLayer=null,this.defsElement=null,this.legendElement=[],this.oldShapeElement=null,this.removeEventListener(),this.maps=null};var On=S;function S(e){this.legendBorderRect=new K(0,0,0,0),this.initialMapAreaRect=new K(0,0,0,0),this.legendTotalRect=new K(0,0,0,0),this.totalPages=[],this.page=0,this.currentPage=0,this.legendItemRect=new K(0,0,0,0),this.heightIncrement=0,this.widthIncrement=0,this.textMaxWidth=0,this.shapeHighlightCollection=[],this.legendHighlightCollection=[],this.shapePreviousColor=[],this.selectedNonLegendShapes=[],this.shapeToggled=!0,this.legendElement=null,this.maps=e,this.addEventListener()}_n.prototype.addEventListener=function(){this.maps.isDestroyed||(this.maps.on(Y.Browser.touchMoveEvent,this.mouseMove,this),this.maps.on(Y.Browser.touchStartEvent,this.mouseMove,this))},_n.prototype.removeEventListener=function(){this.maps.isDestroyed||(this.maps.off(Y.Browser.touchMoveEvent,this.mouseMove),this.maps.off(Y.Browser.touchStartEvent,this.mouseMove))},_n.prototype.addHighlight=function(e,t,i){e=ct(e,t,0,this.maps);i?this.mapHighlight(e,null,null):x(e)},_n.prototype.mouseMove=function(e){var t,i,o,n,a,l=e.target,e="touch"===e.pointerType||"2"===e.pointerType||-1<e.type.indexOf("touch");(-1!==l.id.indexOf("LayerIndex")||-1<l.id.indexOf("NavigationIndex"))&&"ShapeselectionMapStyle"!==l.getAttribute("class")&&!e&&"MarkerselectionMapStyle"!==l.getAttribute("class")&&"BubbleselectionMapStyle"!==l.getAttribute("class")&&"navigationlineselectionMapStyle"!==l.getAttribute("class")&&"PolygonselectionMapStyle"!==l.getAttribute("class")&&"LineselectionMapStyle"!==l.getAttribute("class")?(i=parseInt(l.id.split("_LayerIndex_")[1].split("_")[0],10),n=o=t=e=void 0,-1<l.id.indexOf("shapeIndex")?(o=parseInt(l.id.split("_shapeIndex_")[1].split("_")[0],10),e=this.maps.layers[i].shapeData.features&&!Y.isNullOrUndefined(this.maps.layersCollection[i].layerData[o])?this.maps.layersCollection[i].layerData[o].property:null,n=parseInt(l.id.split("_dataIndex_")[1].split("_")[0],10),t=Y.isNullOrUndefined(n)?null:this.maps.layers[i].dataSource[n],this.highlightSettings=this.maps.layers[i].highlightSettings):-1<l.id.indexOf("BubbleIndex")?(o=parseInt(l.id.split("_BubbleIndex_")[1].split("_")[0],10),n=parseInt(l.id.split("_dataIndex_")[1].split("_")[0],10),t=this.maps.layers[i].bubbleSettings[o].dataSource[n],this.highlightSettings=this.maps.layers[i].bubbleSettings[o].highlightSettings):-1<l.id.indexOf("MarkerIndex")?(o=parseInt(l.id.split("_MarkerIndex_")[1].split("_")[0],10),n=parseInt(l.id.split("_dataIndex_")[1].split("_")[0],10),t=this.maps.layers[i].markerSettings[o].dataSource[n],this.highlightSettings=this.maps.layers[i].markerSettings[o].highlightSettings):-1<l.id.indexOf("_PolygonIndex_")?(n=parseInt(l.id.split("_PolygonIndex_")[1].split("_")[0],10),t=this.maps.layers[i].polygonSettings.polygons[n].points,this.highlightSettings=this.maps.layers[i].polygonSettings.highlightSettings):(a=parseInt(l.id.split("_NavigationIndex_")[1].split("_")[0],10),i=parseInt(l.id.split("_LayerIndex_")[1].split("_")[0],10),e=null,t={latitude:this.maps.layers[i].navigationLineSettings[a].latitude,longitude:this.maps.layers[i].navigationLineSettings[a].longitude},this.highlightSettings=this.maps.layers[i].navigationLineSettings[a].highlightSettings),this.highlightSettings.enable?this.handleHighlight(l,i,t,e):(o=document.getElementsByClassName("highlightMapStyle")[0],Y.isNullOrUndefined(o)||(x(o),-1<o.id.indexOf("NavigationIndex")&&(a=parseInt(o.id.split("_NavigationIndex_")[1].split("_")[0],10),n=parseInt(o.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10),o.setAttribute("stroke-width",this.maps.layers[n].navigationLineSettings[a].width.toString()),o.setAttribute("stroke",this.maps.layers[n].navigationLineSettings[a].color))))):0<mt("highlightMapStyle").length?(-1<(l=mt("highlightMapStyle")[0]).id.indexOf("NavigationIndex")&&(a=parseInt(l.id.split("_NavigationIndex_")[1].split("_")[0],10),i=parseInt(l.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10),l.setAttribute("stroke-width",this.maps.layers[i].navigationLineSettings[a].width.toString()),l.setAttribute("stroke",this.maps.layers[i].navigationLineSettings[a].color)),x(l),this.maps.legendSettings.visible&&this.maps.legendModule&&this.maps.legendModule.removeShapeHighlightCollection()):(-1!==l.id.indexOf(this.maps.element.id+"_Legend_Shape_Index")||-1!==l.id.indexOf(this.maps.element.id+"_Legend_Index"))&&this.maps.legendModule&&this.maps.legendSettings.visible&&-1===l.id.indexOf("_Text")?this.maps.legendModule.legendHighLightAndSelection(l,"highlight"):this.maps.legendSettings.visible&&this.maps.legendModule&&this.maps.legendModule.removeLegendHighlightCollection()},_n.prototype.handleHighlight=function(e,t,i,o){this.maps.legendSettings.visible&&-1===e.id.indexOf("_MarkerIndex_")&&this.maps.legendModule&&"Layers"===this.maps.legendSettings.type&&this.maps.legendModule.shapeHighLightAndSelection(e,i,this.highlightSettings,"highlight",t),-1<e.id.indexOf("shapeIndex")&&this.maps.legendSettings.visible&&this.maps.legendModule&&!this.maps.legendModule.shapeToggled||this.mapHighlight(e,o,i)},_n.prototype.mapHighlight=function(e,t,i){var o=this,n=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),a=!1,n=(-1<e.id.indexOf("MarkerIndex")&&(l=parseInt(e.id.split("_MarkerIndex_")[1].split("_")[0],10),a=this.maps.layers[n].markerSettings[l].highlightSettings.enable),-1!==e.parentElement.id.indexOf("LineString")&&this.highlightSettings.fill||this.highlightSettings.border.color),l=-1===e.parentElement.id.indexOf("LineString")?this.highlightSettings.border.width/(a?1:this.maps.scale):this.highlightSettings.border.width/this.maps.scale,a=(Y.isNullOrUndefined(this.highlightSettings.border.opacity)?this.highlightSettings:this.highlightSettings.border).opacity,r={opacity:this.highlightSettings.opacity,fill:-1===e.parentElement.id.indexOf("LineString")?-1===e.id.indexOf("NavigationIndex")?Y.isNullOrUndefined(this.highlightSettings.fill)?e.getAttribute("fill"):this.highlightSettings.fill:"none":"transparent",border:{color:n,width:l,opacity:a},cancel:!1},s={opacity:r.opacity,fill:r.fill,border:{color:n,width:l,opacity:a},name:Ao,target:e.id,cancel:!1,shapeData:t,data:i,maps:this.maps},d=(-1<e.id.indexOf("shapeIndex")&&this.maps.trigger(Ao,s,function(){}),{opacity:r.opacity,fill:r.fill,border:{color:n,width:l,opacity:a},name:tn,target:e.id,cancel:!1,shapeData:t,data:i,maps:this.maps});this.maps.trigger(tn,d,function(){d.cancel=(r.cancel!==d.cancel?d:-1<e.id.indexOf("shapeIndex")?s:r).cancel,d.fill=(r.fill!==d.fill?d:-1<e.id.indexOf("shapeIndex")?s:r).fill,d.opacity=(r.opacity!==d.opacity?d:-1<e.id.indexOf("shapeIndex")?s:r).opacity,d.border.color=(r.border.color!==d.border.color?d:-1<e.id.indexOf("shapeIndex")?s:r).border.color,d.border.width=(r.border.width!==d.border.width?d:-1<e.id.indexOf("shapeIndex")?s:r).border.width,d.border.opacity=(r.border.opacity!==d.border.opacity?d:-1<e.id.indexOf("shapeIndex")?s:r).border.opacity,o.highlightMap(e,d)})},_n.prototype.highlightMap=function(e,t){var i,o,n;"highlightMapStyle"===e.getAttribute("class")||t.cancel||(0<mt("highlightMapStyle").length&&(x(i=mt("highlightMapStyle")[0]),-1<i.id.indexOf("NavigationIndex"))&&(o=parseInt(i.id.split("_NavigationIndex_")[1].split("_")[0],10),n=parseInt(i.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10),i.setAttribute("stroke-width",this.maps.layers[n].navigationLineSettings[o].width.toString()),i.setAttribute("stroke",this.maps.layers[n].navigationLineSettings[o].color)),F("highlightMap")?gt("highlightMap","highlightMapStyle",t):document.body.appendChild(ut("highlightMap","highlightMapStyle",t)),e.setAttribute("class","highlightMapStyle"))},_n.prototype.getModuleName=function(){return"Highlight"},_n.prototype.destroy=function(){this.highlightSettings=null,this.removeEventListener(),this.maps=null};var Cn=_n;function _n(e){this.maps=e,this.addEventListener()}Ln.prototype.addEventListener=function(){this.maps.isDestroyed||this.maps.on(Io,this.mouseClick,this)},Ln.prototype.removeEventListener=function(){this.maps.isDestroyed||this.maps.off(Io,this.mouseClick)},Ln.prototype.mouseClick=function(e){var t,i,o,n,a;!Y.isNullOrUndefined(e.type)&&-1!==e.type.indexOf("touch")&&Y.isNullOrUndefined(e.id)&&(e=e.target),!Y.isNullOrUndefined(e.id)&&(-1<e.id.indexOf("LayerIndex")||-1<e.id.indexOf("NavigationIndex"))?(i=n=o=a=void 0,t=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),-1<e.id.indexOf("shapeIndex")?(n=parseInt(e.id.split("_shapeIndex_")[1].split("_")[0],10),a=!Y.isNullOrUndefined(this.maps.layers[t].shapeData.features)&&this.maps.layers[t].shapeData.features.length>n?this.maps.layers[t].shapeData.features[n].properties:!Y.isNullOrUndefined(this.maps.layers[t].shapeData.geometries)&&this.maps.layers[t].shapeData.geometries.length>n?this.maps.layers[t].shapeData.geometries[n].properties:null,i=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=Y.isNullOrUndefined(i)?null:this.maps.layers[t].dataSource[i],this.selectionsettings=this.maps.layers[t].selectionSettings,this.selectionType="Shape"):-1<e.id.indexOf("BubbleIndex")?(n=parseInt(e.id.split("_BubbleIndex_")[1].split("_")[0],10),i=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=this.maps.layers[t].bubbleSettings[n].dataSource[i],this.selectionsettings=this.maps.layers[t].bubbleSettings[n].selectionSettings,this.selectionType="Bubble"):-1<e.id.indexOf("MarkerIndex")?(n=parseInt(e.id.split("_MarkerIndex_")[1].split("_")[0],10),i=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=this.maps.layers[t].markerSettings[n].dataSource[i],this.selectionsettings=this.maps.layers[t].markerSettings[n].selectionSettings,this.selectionType="Marker"):-1<e.id.indexOf("_PolygonIndex_")?(i=parseInt(e.id.split("_PolygonIndex_")[1].split("_")[0],10),o=this.maps.layers[t].polygonSettings.polygons[i].points,this.selectionsettings=this.maps.layers[t].polygonSettings.selectionSettings,this.selectionType="Polygon"):-1<e.id.indexOf("NavigationIndex")&&(n=parseInt(e.id.split("_NavigationIndex_")[1].split("_")[0],10),a=null,o={latitude:this.maps.layers[t].navigationLineSettings[n].latitude,longitude:this.maps.layers[t].navigationLineSettings[n].longitude},this.selectionsettings=this.maps.layers[t].navigationLineSettings[n].selectionSettings,this.selectionType="navigationline"),!Y.isNullOrUndefined(this.selectionsettings)&&this.selectionsettings.enable&&this.selectElement(e,t,o,a)):this.maps.legendSettings.visible&&!this.maps.legendSettings.toggleLegendSettings.enable&&this.maps.legendModule&&!Y.isNullOrUndefined(e.id)&&-1===e.id.indexOf("_Text")&&(-1<e.id.indexOf(this.maps.element.id+"_Legend_Shape_Index")||-1!==e.id.indexOf(this.maps.element.id+"_Legend_Index"))&&this.maps.legendModule.legendHighLightAndSelection(e,"selection")},Ln.prototype.selectElement=function(e,t,i,o){this.maps.mapSelect=!!e,this.maps.legendModule&&this.maps.legendSettings.visible&&-1===e.id.indexOf("_MarkerIndex_")&&this.maps.legendModule.shapeHighLightAndSelection(e,i,this.selectionsettings,"selection",t),-1<e.id.indexOf("shapeIndex")&&this.maps.legendSettings.visible&&this.maps.legendModule&&!this.maps.legendModule.shapeToggled||this.selectMap(e,o,i)},Ln.prototype.addSelection=function(e,t,i){e=ct(e,t,0,this.maps);i?this.selectMap(e,null,null):x(e)},Ln.prototype.selectMap=function(h,e,t){var m=this,c=-1<h.parentElement.id.indexOf("LineString"),i={color:c&&this.selectionsettings.fill||this.selectionsettings.border.color,width:c?this.selectionsettings.border.width/this.maps.scale:this.selectionsettings.border.width/("Marker"===this.selectionType?1:this.maps.scale),opacity:this.selectionsettings.border.opacity},u={opacity:this.selectionsettings.opacity,fill:c?"transparent":"navigationline"!==this.selectionType?this.selectionsettings.fill:"none",border:i,name:en,target:h.id,cancel:!1,shapeData:e,data:t,maps:this.maps};this.maps.trigger("itemSelection",u,function(e){if(u.border.opacity=(Y.isNullOrUndefined(m.selectionsettings.border.opacity)?m.selectionsettings:m.selectionsettings.border).opacity,!u.cancel)if(h.getAttribute("class")===m.selectionType+"selectionMapStyle"||"LineselectionMapStyle"===h.getAttribute("class")){x(h),m.removedSelectionList(h);for(var t=0;t<m.maps.shapeSelectionItem.length;t++)if(m.maps.shapeSelectionItem[t]===u.shapeData){m.maps.shapeSelectionItem.splice(t,1);break}-1<h.id.indexOf("NavigationIndex")&&(o=parseInt(h.id.split("_NavigationIndex_")[1].split("_")[0],10),n=parseInt(h.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10),h.setAttribute("stroke-width",m.maps.layers[n].navigationLineSettings[o].width.toString()),h.setAttribute("stroke",m.maps.layers[n].navigationLineSettings[o].color))}else{var i=N(m.maps.element.id+"_Layer_Collections");if(!m.selectionsettings.enableMultiSelect&&(0<i.getElementsByClassName(m.selectionType+"selectionMapStyle").length||0<i.getElementsByClassName("LineselectionMapStyle").length)){for(var o,n,a=i.getElementsByClassName(m.selectionType+"selectionMapStyle").length,l=void 0,r=0;r<a;r++)x(l=i.getElementsByClassName(m.selectionType+"selectionMapStyle")[0]),m.removedSelectionList(l);if(0<i.getElementsByClassName("LineselectionMapStyle").length)for(a=i.getElementsByClassName("LineselectionMapStyle").length,r=0;r<a;r++)x(l=i.getElementsByClassName("LineselectionMapStyle")[0]),m.removedSelectionList(l);if("Shape"===m.selectionType){m.maps.shapeSelectionItem=[];for(var s=m.maps.selectedElementId.length,d=0;d<s;d++){x(l=i.getElementsByClassName(m.selectionType+"selectionMapStyle")[0]);var p=m.maps.selectedElementId.indexOf(l.getAttribute("id"));m.maps.selectedElementId.splice(p,1)}}-1<l.id.indexOf("NavigationIndex")&&(o=parseInt(h.id.split("_NavigationIndex_")[1].split("_")[0],10),n=parseInt(h.parentElement.id.split("_LayerIndex_")[1].split("_")[0],10),l.setAttribute("stroke-width",m.maps.layers[n].navigationLineSettings[o].width.toString()),l.setAttribute("stroke",m.maps.layers[n].navigationLineSettings[o].color))}c?(F("LineselectionMap")?gt("LineselectionMap","LineselectionMapStyle",u):document.body.appendChild(ut("LineselectionMap","LineselectionMapStyle",u)),h.setAttribute("class","LineselectionMapStyle")):(F(m.selectionType+"selectionMap")?gt(m.selectionType+"selectionMap",m.selectionType+"selectionMapStyle",u):document.body.appendChild(ut(m.selectionType+"selectionMap",m.selectionType+"selectionMapStyle",u)),h.setAttribute("class",m.selectionType+"selectionMapStyle")),"ShapeselectionMapStyle"===h.getAttribute("class")&&(m.maps.shapeSelectionClass=F(m.selectionType+"selectionMap"),m.maps.selectedElementId.push(h.getAttribute("id")),m.maps.shapeSelectionItem.push(u.shapeData)),"MarkerselectionMapStyle"===h.getAttribute("class")&&(m.maps.markerSelectionClass=F(m.selectionType+"selectionMap"),m.maps.selectedMarkerElementId.push(h.getAttribute("id"))),"BubbleselectionMapStyle"===h.getAttribute("class")&&(m.maps.bubbleSelectionClass=F(m.selectionType+"selectionMap"),m.maps.selectedBubbleElementId.push(h.getAttribute("id"))),"navigationlineselectionMapStyle"===h.getAttribute("class")&&(m.maps.navigationSelectionClass=F(m.selectionType+"selectionMap"),m.maps.selectedNavigationElementId.push(h.getAttribute("id"))),"PolygonselectionMapStyle"===h.getAttribute("class")&&(m.maps.polygonSelectionClass=F(m.selectionType+"selectionMap"),m.maps.selectedPolygonElementId.push(h.getAttribute("id")))}})},Ln.prototype.removedSelectionList=function(e){"Shape"===this.selectionType&&this.maps.selectedElementId.splice(this.maps.selectedElementId.indexOf(e.getAttribute("id")),1),"Bubble"===this.selectionType&&this.maps.selectedBubbleElementId.splice(this.maps.selectedBubbleElementId.indexOf(e.getAttribute("id")),1),"Marker"===this.selectionType&&this.maps.selectedMarkerElementId.splice(this.maps.selectedMarkerElementId.indexOf(e.getAttribute("id")),1),"navigationline"===this.selectionType&&this.maps.selectedBubbleElementId.splice(this.maps.selectedBubbleElementId.indexOf(e.getAttribute("id")),1),"Polygon"===this.selectionType&&this.maps.selectedPolygonElementId.splice(this.maps.selectedPolygonElementId.indexOf(e.getAttribute("id")),1)},Ln.prototype.getModuleName=function(){return"Selection"},Ln.prototype.destroy=function(){this.selectionsettings=null,this.removeEventListener(),this.maps=null};var Mn=Ln;function Ln(e){this.maps=e,this.addEventListener()}wn.prototype.renderTooltip=function(i){var o,e,t,n,a=this,l=(u=(-1!==i.type.indexOf("touch")?(this.isTouch=!0,c=i.changedTouches[0].pageX,i.changedTouches[0]):(this.isTouch="touch"===i.pointerType,c=i.pageX,i)).pageY,i.target),r=(-1===l.id.indexOf(this.maps.element.id)&&(m=l.closest("."+this.maps.element.id+"_marker_template_element"),!Y.isNullOrUndefined(m))&&-1<m.id.indexOf("_MarkerIndex_")&&(l=m),""),s=l.id,d=[],p=-1<s.indexOf("_LayerIndex_")&&parseFloat(s.split("_LayerIndex_")[1].split("_")[0]),h=this.maps.layersCollection[p],m=[],c=U(c,u,this.maps.svgObject),u=(this.tooltipTargetID=s,null),g=null,y=this.maps.getClickLocation(s,i.pageX,i.pageY,l,i.layerX,i.layerY,"tooltip"),f=(Y.isNullOrUndefined(y)||(u=y.latitude,g=y.longitude),-1<s.indexOf("_PolygonIndex_"));if((-1<s.indexOf("_shapeIndex_")||-1<s.indexOf("_MarkerIndex_")||-1<s.indexOf("_BubbleIndex_")||-1<s.indexOf("_PolygonIndex_"))&&null===this.maps.markerDragArgument){if(-1<s.indexOf("_PolygonIndex_")){var y=parseInt(s.split("_PolygonIndex_")[1].split("_")[0],10),b=h.polygonSettings.tooltipSettings,S=h.polygonSettings.polygons[y],v=b.textStyle,x=b.fill;m.push(S.tooltipText)}else if(-1<s.indexOf("_shapeIndex_")){var O=h.tooltipSettings,y=parseInt(s.split("_shapeIndex_")[1].split("_")[0],10);if(Y.isNullOrUndefined(h.layerData)||Y.isNullOrUndefined(h.layerData[y]))return;var C=h.layerData[y].property,_=!1,M="[object Array]"===Object.prototype.toString.call(h.shapePropertyPath)?h.shapePropertyPath:[h.shapePropertyPath];if(!Y.isNullOrUndefined(M)){for(var L=0;L<M.length;L++)if(!Y.isNullOrUndefined(h.dataSource)&&!Y.isNullOrUndefined(h.shapeDataPath))for(var P=0;P<h.dataSource.length;P++){var w=h.dataSource[P],T=-1<h.shapeDataPath.indexOf(".")?k(w,h.shapeDataPath):w[h.shapeDataPath];if((!Y.isNullOrUndefined(T)&&isNaN(w[h.shapeDataPath])?T.toLowerCase():T)===(!Y.isNullOrUndefined(C[M[L]])&&isNaN(C[M[L]])?C[M[L]].toLowerCase():C[M[L]])){_=!0,p=P,L=M.length;break}}if(p=_?p:null,h.dataSource&&0<h.dataSource.length){if(!Y.isNullOrUndefined(h.dataSource[p]))for(e in d=JSON.parse(JSON.stringify(h.dataSource[p])),C)d.hasOwnProperty(e)||(d[e]=C[e])}else d=C}!O.visible||(Y.isNullOrUndefined(p)||isNaN(p))&&Y.isNullOrUndefined(C)||(h.tooltipSettings.format?r=this.formatter(h.tooltipSettings.format,d):(y=Je(h.shapeDataPath,h.shapePropertyPath,C),r=Y.isNullOrUndefined(h.dataSource)||Y.isNullOrUndefined(p)?C[y]:Le(-1<O.valuePath.indexOf(".")?k(h.dataSource[p],O.valuePath):h.dataSource[p][O.valuePath],this.maps),Y.isNullOrUndefined(r)&&!Y.isNullOrUndefined(O.valuePath)&&(r=-1<O.valuePath.indexOf(".")?k(C,O.valuePath):C[O.valuePath])))}else-1<s.indexOf("_MarkerIndex_")?(y=parseInt(s.split("_MarkerIndex_")[1].split("_")[0],10),I=parseInt(s.split("_MarkerIndex_")[1].split("_")[2],10),t=h.markerSettings[y],O=t.tooltipSettings,d=t.dataSource[I],O.visible&&!isNaN(y)&&(t.tooltipSettings.format?r=this.formatter(t.tooltipSettings.format,t.dataSource[I]):"function"!=typeof t.template&&t.template&&!t.tooltipSettings.valuePath?r=t.template.split(">")[1].split("<")[0]:Y.isNullOrUndefined(t.tooltipSettings.valuePath)||(r=Le(-1<t.tooltipSettings.valuePath.indexOf(".")?k(t.dataSource[I],t.tooltipSettings.valuePath):t.dataSource[I][t.tooltipSettings.valuePath],this.maps)))):-1<s.indexOf("_BubbleIndex_")&&(y=parseInt(s.split("_BubbleIndex_")[1].split("_")[0],10),I=parseInt(s.split("_BubbleIndex_")[1].split("_")[2],10),t=h.bubbleSettings[y],O=t.tooltipSettings,d=t.dataSource[I],O.visible)&&!isNaN(I)&&(t.tooltipSettings.format?r=this.formatter(t.tooltipSettings.format,t.dataSource[I]):Y.isNullOrUndefined(t.tooltipSettings.valuePath)||(r=Le(-1<t.tooltipSettings.valuePath.indexOf(".")?k(t.dataSource[I],t.tooltipSettings.valuePath):t.dataSource[I][t.tooltipSettings.valuePath],this.maps)));(f?b:O).visible&&(document.getElementById(this.tooltipId)?o=document.getElementById(this.tooltipId):(o=Y.createElement("div",{id:this.maps.element.id+"_mapsTooltip",className:"EJ2-maps-Tooltip"}),Y.isNullOrUndefined(f?S.tooltipTemplate:O.template)||(f?""===S.tooltipTemplate:""===O.template)||"MouseMove"===this.maps.tooltipDisplayMode?o.style.cssText="position: absolute;pointer-events:none;":o.style.position="absolute",document.getElementById(this.maps.element.id+"_Secondary_Element").appendChild(o)),f?S.tooltipTemplate:O.template,(f?null!==S.tooltipTemplate:null!==O.template)&&1===Object.keys((f?S.tooltipTemplate:O.template,f?S.tooltipTemplate:O.template)).length&&(f?S.tooltipTemplate=S.tooltipTemplate[Object.keys(S.tooltipTemplate)[0]]:O.template=O.template[Object.keys(O.template)[0]]),y={location:c,text:m,data:d=this.setTooltipContent(O,d),textStyle:{color:(f?v:O.textStyle).color,fontFamily:(f?v:O.textStyle).fontFamily,fontStyle:(f?v:O.textStyle).fontStyle,fontWeight:(f?v:O.textStyle).fontWeight,opacity:(f?v:O.textStyle).opacity,size:(f?v:O.textStyle).size},template:f?S.tooltipTemplate:O.template},""!==(n={cancel:!1,name:zo,options:y,fill:f?x:O.fill,maps:this.maps,latitude:u,longitude:g,element:l,eventArgs:i,content:f?Y.isNullOrUndefined(S.tooltipText)?"":S.tooltipText:Y.isNullOrUndefined(r)?"":r.toString()}).content||""!==n.options.template?this.maps.trigger(zo,n,function(e){var t;n.cancel||Y.isNullOrUndefined(r)||-1!==s.indexOf("_cluster_")||-1!==s.indexOf("_dataLabel_")?a.clearTooltip(i.target):(a.maps.isProtectedOnChange=!0,n.options.textStyle.size=n.options.textStyle.size||a.maps.themeStyle.fontSize,n.options.textStyle.color=n.options.textStyle.color||a.maps.themeStyle.tooltipFontColor,n.options.textStyle.fontFamily=n.options.textStyle.fontFamily||a.maps.themeStyle.fontFamily,n.options.textStyle.fontWeight=n.options.textStyle.fontWeight||a.maps.themeStyle.fontWeight,n.options.textStyle.opacity=n.options.textStyle.opacity||a.maps.themeStyle.tooltipTextOpacity,t=f?{color:b.border.color||a.maps.themeStyle.tooltipBorderColor,width:b.border.width,opacity:b.border.opacity}:{color:O.border.color||a.maps.themeStyle.tooltipBorderColor,width:O.border.width,opacity:O.border.opacity},n.cancel?a.svgTooltip=new E.Tooltip({theme:a.maps.theme,enable:!0,header:"",data:O.data,template:O.template,content:n.content.toString()!==r.toString()?[n.content.toString()]:[r.toString()],shapes:[],location:O.location,palette:[void 0],areaBounds:a.maps.mapAreaRect,textStyle:O.textStyle,availableSize:a.maps.availableSize,fill:O.fill||a.maps.themeStyle.tooltipFillColor,enableShadow:!0,border:t}):a.svgTooltip=new E.Tooltip({theme:a.maps.theme,enable:!0,header:"",data:n.options.data,template:n.options.template,content:n.content.toString()!==r.toString()?[n.content.toString()]:[r.toString()],shapes:[],location:n.options.location,palette:[void 0],areaBounds:a.maps.mapAreaRect,textStyle:n.options.textStyle,availableSize:a.maps.availableSize,fill:n.fill||a.maps.themeStyle.tooltipFillColor,enableShadow:!0,border:t}),(a.maps.isVue||a.maps.isVue3)&&(a.svgTooltip.controlInstance=a.maps),a.svgTooltip.opacity=a.maps.themeStyle.tooltipFillOpacity||a.svgTooltip.opacity,a.svgTooltip.appendTo(o),a.maps.renderReactTemplates(),a.maps.isDevice&&(t=(-1<s.indexOf("_MarkerIndex_")||-1<s.indexOf("_BubbleIndex_")||-1<s.indexOf("_shapeIndex_")?O:b).duration,null!==(t=!Y.isNullOrUndefined(t)&&0<t?t:t<0?2e3:null))&&(clearTimeout(a.tooltipTimer),a.tooltipTimer=setTimeout(a.removeTooltip.bind(a),t)))}):this.clearTooltip(i.target),this.svgTooltip&&this.maps.trigger("tooltipRenderComplete",{cancel:!1,name:"tooltipRenderComplete",maps:this.maps,options:y,element:this.svgTooltip.element}),this.svgTooltip)?this.maps.trigger("tooltipRenderComplete",{cancel:!1,name:"tooltipRenderComplete",maps:this.maps,options:y,element:this.svgTooltip.element}):this.clearTooltip(i.target)}else{var I=i.target.closest("#"+this.maps.element.id+"_mapsTooltipparent_template");Y.isNullOrUndefined(I)&&this.clearTooltip(i.target)}},wn.prototype.setTooltipContent=function(e,t){t=Y.extend({},t,null,!0);return this.maps.format&&!isNaN(Number(t[e.valuePath]))?t[e.valuePath]=st(this.maps,Number(t[e.valuePath])):t=Object.keys(t).length?t:void 0,t},wn.prototype.formatter=function(e,t){void 0===t&&(t={});for(var i=0,o=Object.keys(t);i<o.length;i++){var n=o[i];e="object"==typeof t[n]?Pe("",e,t,this.maps):e.split("${"+n+"}").join(Le(t[n],this.maps))}return e},wn.prototype.mouseUpHandler=function(e){Y.isNullOrUndefined(this.maps)||(this.renderTooltip(e),"MouseMove"===this.maps.tooltipDisplayMode&&(clearTimeout(this.tooltipTimer),this.tooltipTimer=setTimeout(this.removeTooltip.bind(this),2e3)))},wn.prototype.removeTooltip=function(){var e=!1;return 0<document.getElementsByClassName("EJ2-maps-Tooltip").length&&(Y.remove(document.getElementsByClassName("EJ2-maps-Tooltip")[0]),e=!0),e},wn.prototype.clearTooltip=function(e){e=e.closest("#"+this.maps.element.id+"_mapsTooltipparent_template");Y.isNullOrUndefined(e)&&this.removeTooltip()&&this.maps.clearTemplate()},wn.prototype.addEventListener=function(){this.maps.isDestroyed||("DoubleClick"===this.maps.tooltipDisplayMode?this.maps.on("dblclick",this.renderTooltip,this):"Click"===this.maps.tooltipDisplayMode?this.maps.on(Y.Browser.touchEndEvent,this.mouseUpHandler,this):this.maps.on(Y.Browser.touchMoveEvent,this.renderTooltip,this),this.maps.on(Y.Browser.touchCancelEvent,this.removeTooltip,this),this.maps.element.addEventListener("contextmenu",this.removeTooltip))},wn.prototype.removeEventListener=function(){!this.maps||this.maps.isDestroyed||("DoubleClick"===this.maps.tooltipDisplayMode?this.maps.off("dblclick",this.renderTooltip):"Click"===this.maps.tooltipDisplayMode?this.maps.off(Y.Browser.touchEndEvent,this.mouseUpHandler):this.maps.off(Y.Browser.touchMoveEvent,this.renderTooltip),this.maps.off(Y.Browser.touchCancelEvent,this.removeTooltip),this.maps.element.removeEventListener("contextmenu",this.removeTooltip))},wn.prototype.getModuleName=function(){return"MapsTooltip"},wn.prototype.destroy=function(){Y.isNullOrUndefined(this.svgTooltip)||this.svgTooltip.destroy(),this.svgTooltip=null,this.maps=null};var Pn=wn;function wn(e){this.maps=e,this.tooltipId=this.maps.element.id+"_mapsTooltip",this.addEventListener()}v.prototype.performZooming=function(e,t,i){var o,n,a,l,r,s,d=this,p=this.maps,h=(p.previousProjection=t<=1.5?void 0:p.projectionType,p.defaultState=!1,p.initialCheck=!1,p.markerZoomedState=p.isMarkerZoomCompleted=!1,p.zoomPersistence=p.enablePersistence,p.tileZoomLevel),m=p.previousScale=p.scale,c=p.zoomSettings.maxZoom,u=p.zoomSettings.minZoom,g=(t=t<=c?t:c,!0);switch(i.toLowerCase()){case"zoomin":g=t<=this.maps.zoomSettings.maxZoom;break;case"zoomout":g=t>=this.maps.zoomSettings.minZoom}g&&(o=p.tileTranslatePoint,p.isTileMap||!("ZoomIn"===i?u<=t&&t<=c:u<=t)&&!p.isReset?p.isTileMap&&u<=t&&t<=c&&(this.getTileTranslatePosition(h,t,e,i),p.tileZoomLevel=t,p.zoomSettings.zoomFactor=t,p.scale=Math.pow(2,t-1),"ZoomOut"===i&&p.zoomSettings.resetToInitial&&p.applyZoomReset&&t<=p.initialZoomLevel&&(p.initialCheck=!0,p.zoomPersistence=!1,p.tileTranslatePoint.x=p.initialTileTranslate.x,p.tileTranslatePoint.y=p.initialTileTranslate.y,t=p.tileZoomLevel=p.mapScaleValue=p.initialZoomLevel,p.scale=Math.pow(2,t-1)),p.mapScaleValue=isNaN(p.mapScaleValue)?1:p.mapScaleValue,p.translatePoint.y=(p.tileTranslatePoint.y-.01*p.mapScaleValue)/p.scale,p.translatePoint.x=(p.tileTranslatePoint.x-.01*p.mapScaleValue)/p.scale,this.triggerZoomEvent(o,h,i)?(p.translatePoint=p.tileTranslatePoint=new J(0,0),p.scale=p.previousScale,p.tileZoomLevel=h,p.zoomSettings.zoomFactor=p.previousScale):(document.querySelector(".GroupElement")&&(document.querySelector(".GroupElement").style.display="none"),document.getElementById(this.maps.element.id+"_LayerIndex_1")&&(document.getElementById(this.maps.element.id+"_LayerIndex_1").style.display="none"),this.markerLineAnimation(p),p.mapLayerPanel.generateTiles(t,p.tileTranslatePoint,i+"wheel",null,e),u=0===this.maps.layersCollection[0].animationDuration&&"Enable"===Y.animationMode?1e3:this.maps.layersCollection[0].animationDuration,setTimeout(function(){d.applyTransform(d.maps),document.getElementById(d.maps.element.id+"_LayerIndex_1")&&(document.getElementById(d.maps.element.id+"_LayerIndex_1").style.display="block")},u))):(c=p.mapAreaRect,u=p.baseMapRectBounds.min,a=p.baseMapRectBounds.max,n=Math.abs(u.x-a.x),a=Math.abs(u.y-a.y),r=l=void 0,t<1.2&&"Eckert5"!==p.projectionType?(0!==n&&0!==a&&n!==a||(n=c.width/2,a=c.height),t=parseFloat(Math.min(c.width/n,c.height/a).toFixed(2)),p.translatePoint=this.calculateInitalZoomTranslatePoint(t=1.05<t?1:t,n,a,c,u,p)):(l=(s=p.translatePoint).x-(c.width/m-c.width/t)/(c.width/e.x),r=s.y-(c.height/m-c.height/t)/(c.height/e.y),l=(s=Math.abs(p.baseMapRectBounds.max.y-p.baseMapRectBounds.min.y)*t)<p.mapAreaRect.height?c.x+(-u.x+(c.width/2-n/2)):l,r=s<p.mapAreaRect.height?c.y+(-u.y+(c.height/2-a/2)):r,p.translatePoint=new J(l,r)),p.scale=t,p.zoomTranslatePoint=p.translatePoint,this.triggerZoomEvent(o,h,i)?(p.translatePoint=p.previousPoint,p.scale=p.mapScaleValue=p.previousScale):this.applyTransform(p)),this.triggerZoomComplete(p,h,i)),this.maps.zoomNotApplied=!1,this.maps.isDevice&&this.removeToolbarOpacity(p.isTileMap?Math.round(p.tileZoomLevel):p.scale,p.element.id+"_Zooming_")},v.prototype.calculateInitalZoomTranslatePoint=function(e,t,i,o,n,a){a=0!==n.x&&"layers"===a.translateType?a.availableSize.width-o.width:0,t=o.x+(-n.x+(o.width/2-(t*=e)/2))-a,a=o.y+(-n.y+(o.height/2-(i*=e)/2));return new J(t,a)},v.prototype.triggerZoomEvent=function(e,t,i){var o=this.maps,n=(o.isTileMap&&(o.mapScaleValue=Y.isNullOrUndefined(o.mapScaleValue)?1:o.mapScaleValue,o.translatePoint.y=(o.tileTranslatePoint.y-.01*o.mapScaleValue)/o.scale,o.translatePoint.x=(o.tileTranslatePoint.x-.01*o.mapScaleValue)/o.scale),this.maps.getMinMaxLatitudeLongitude()),e=o.isTileMap?{cancel:!1,name:"zoom",type:i,maps:o,tileTranslatePoint:{previous:e,current:o.tileTranslatePoint},translatePoint:{previous:o.previousPoint,current:o.translatePoint},tileZoomLevel:{previous:t,current:o.tileZoomLevel},scale:{previous:o.previousScale,current:o.scale},minLatitude:n.minLatitude,maxLatitude:n.maxLatitude,minLongitude:n.minLongitude,maxLongitude:n.maxLongitude}:{cancel:!1,name:"zoom",type:i,maps:o,tileTranslatePoint:{},translatePoint:{previous:o.previousPoint,current:o.translatePoint},tileZoomLevel:{},scale:{previous:o.previousScale,current:o.scale},minLatitude:n.minLatitude,maxLatitude:n.maxLatitude,minLongitude:n.minLongitude,maxLongitude:n.maxLongitude};return o.trigger("zoom",e),e.cancel},v.prototype.getTileTranslatePosition=function(e,t,i,o){var n=this.maps,o="ZoomOut"!==o&&"Reset"===o&&1<t?0:10,a=n.availableSize,e=256*Math.pow(2,e),l=256*Math.pow(2,t),r=(i.x-n.tileTranslatePoint.x)/e*100,e=(i.y-n.tileTranslatePoint.y)/e*100;n.tileTranslatePoint.x=1===t?a.width/2-256:i.x-r*l/100,n.tileTranslatePoint.y=1===t?a.height/2-256+2*o:i.y-e*l/100},v.prototype.performRectZooming=function(){this.isDragZoom=!0;var e,t,i,o,n=this.maps,a=n.availableSize,l=(n.previousProjection=n.projectionType,n.tileZoomLevel),r=n.tileTranslatePoint,s=this.zoomingRect,d=n.zoomSettings.maxZoom,p=n.zoomSettings.minZoom;0<s.height&&0<s.width&&(o=this.zoomingRect.x+this.zoomingRect.width/2,t=this.zoomingRect.y+this.zoomingRect.height/2,i=void 0,n.isTileMap?(i=l+Math.round(l+(a.width/s.width+a.height/s.height)/2),n.zoomSettings.zoomFactor=i=p<=i&&i<=d?i:d,this.getTileTranslatePosition(l,i,{x:o,y:t}),n.tileZoomLevel=i,n.translatePoint.x=(n.tileTranslatePoint.x-.5*Math.pow(2,i))/Math.pow(2,i),n.translatePoint.y=(n.tileTranslatePoint.y-.5*Math.pow(2,i))/Math.pow(2,i),n.scale=Math.pow(2,i),(e=this.triggerZoomEvent(r,l,""))?(n.translatePoint=n.tileTranslatePoint=new J(0,0),n.scale=n.tileZoomLevel=n.zoomSettings.zoomFactor=l):n.mapLayerPanel.generateTiles(i,n.tileTranslatePoint)):(i=(i=(p=n.previousScale=n.scale)+Math.round((a.width/s.width+a.height/s.height)/2))<this.maps.zoomSettings.maxZoom?i:this.maps.zoomSettings.maxZoom,s=n.previousPoint=n.translatePoint,i<=d&&(d=s.x-(a.width/p-a.width/i)/(a.width/o),o=s.y-(a.height/p-a.height/i)/(a.height/t),n.translatePoint=new J(d,o)),n.scale=i<this.maps.zoomSettings.maxZoom?i:this.maps.zoomSettings.maxZoom,(e=this.triggerZoomEvent(r,l,""))&&(n.translatePoint=n.previousPoint,n.scale=n.previousScale),n.zoomTranslatePoint=n.translatePoint),e||(n.mapScaleValue=i,this.applyTransform(n,!0),this.maps.zoomNotApplied=!1,this.zoomingRect=null)),this.isZoomFinal=this.isZoomSelection&&Math.round(n.scale)===this.maps.zoomSettings.maxZoom,this.triggerZoomComplete(n,l,""),this.removeToolbarOpacity(n.scale,this.maps.element.id+"_Zooming_")},v.prototype.setInteraction=function(e){this.lastScale=1,this.interaction=e},v.prototype.updateInteraction=function(){2===this.fingers?this.setInteraction("zoom"):this.setInteraction(null)},v.prototype.performPinchZooming=function(e){var t,i,o,n,a,l,r,s,d,p,h=this.maps,m=h.tileZoomLevel,c=this.pinchFactor,u=h.tileTranslatePoint;h.isTileMap?(o=this.getTouchCenterPoint(),n=Math.sqrt(Math.pow(this.touchMoveList[0].pageX-this.touchMoveList[1].pageX,2)+Math.pow(this.touchMoveList[0].pageY-this.touchMoveList[1].pageY,2)),i=h.tileZoomLevel,Y.isNullOrUndefined(this.pinchDistance)||(this.pinchDistance>n?i-=1:this.pinchDistance<n&&(i+=1),(i=Math.min(this.maps.zoomSettings.maxZoom,Math.max(this.maps.zoomSettings.minZoom,i)))!==h.tileZoomLevel&&(this.pinchFactor=i,h.previousScale=h.scale,h.tileZoomLevel=this.pinchFactor,h.scale=Math.pow(2,h.tileZoomLevel-1),this.getTileTranslatePosition(m,this.pinchFactor,{x:o.x,y:o.y},null),h.translatePoint.x=(h.tileTranslatePoint.x-.01*h.scale)/h.scale,h.translatePoint.y=(h.tileTranslatePoint.y-.01*h.scale)/h.scale,(t=this.triggerZoomEvent(u,m,""))?(h.translatePoint=h.tileTranslatePoint=new J(0,0),h.scale=h.previousScale,h.tileZoomLevel=m,h.zoomSettings.zoomFactor=h.previousScale):h.mapLayerPanel.generateTiles(i,h.tileTranslatePoint))),this.pinchDistance=n):(i=h.mapAreaRect,h.isMarkerZoomCompleted=!1,h.previousScale=h.scale,h.previousPoint=h.translatePoint,h.previousProjection=h.projectionType,n=Tt(this.touchStartList,this.touchMoveList),o=Nt(kt(this.touchMoveList,this.maps)),l=n/this.lastScale,this.lastScale=n,this.pinchFactor*=l,this.pinchFactor=Math.min(this.maps.zoomSettings.maxZoom,Math.max(this.pinchFactor,this.maps.zoomSettings.minZoom)),n=h.baseMapRectBounds.min,l=h.baseMapRectBounds.max,a=Math.abs(n.y-l.y),l=Math.abs(n.x-l.x),r=h.translatePoint,p=d=void 0,c<1.2&&"Eckert5"!==h.projectionType?(0!==l&&0!==a&&l!==a||(l=i.width/2,a=i.height),c=parseFloat(Math.min(i.width/l,i.height/a).toFixed(2)),h.translatePoint=this.calculateInitalZoomTranslatePoint(c=1.05<c?1:c,l,a,i,n,h)):(s=Math.abs(h.baseMapRectBounds.max.y-h.baseMapRectBounds.min.y)*c,d=r.x-(i.width/h.scale-i.width/c)/(i.width/o.x),p=r.y-(i.height/h.scale-i.height/c)/(i.height/o.y),d=s<h.mapAreaRect.height?i.x+(-n.x+(i.width/2-l/2)):d,p=s<h.mapAreaRect.height?i.y+(-n.y+(i.height/2-a/2)):p,h.translatePoint=new J(d,p)),h.scale=c,(t=this.triggerZoomEvent(u,m,""))&&(h.translatePoint=h.previousPoint,h.scale=h.previousScale)),h.mapScaleValue=c,t||this.applyTransform(h),this.triggerZoomComplete(h,m,""),Y.Browser.isDevice&&this.removeToolbarOpacity(h.isTileMap?Math.round(h.tileZoomLevel):h.scale,h.element.id+"_Zooming_")},v.prototype.getTouchCenterPoint=function(){for(var e=[],t=0;t<this.touchMoveList.length;t++)e.push(this.getMousePosition(this.touchMoveList[t].pageX,this.touchMoveList[t].pageY));return{x:(e[0].x+e[1].x)/2,y:(e[0].y+e[1].y)/2}},v.prototype.triggerZoomComplete=function(e,t,i){var o,n;e.zoomSettings.enable&&(n=void 0,e.isTileMap&&(e.mapScaleValue=Y.isNullOrUndefined(e.mapScaleValue)?1:e.mapScaleValue,e.translatePoint.y=(e.tileTranslatePoint.y-.01*e.mapScaleValue)/e.scale,e.translatePoint.x=(e.tileTranslatePoint.x-.01*e.mapScaleValue)/e.scale),o=this.maps.getMinMaxLatitudeLongitude(),n=e.isTileMap?{cancel:!1,name:"zoomComplete",type:i,maps:e,tileTranslatePoint:{previous:e.tileTranslatePoint,current:e.tileTranslatePoint},translatePoint:{previous:e.previousPoint,current:e.translatePoint},tileZoomLevel:{previous:t,current:e.tileZoomLevel},scale:{previous:e.previousScale,current:e.scale},minLatitude:o.minLatitude,maxLatitude:o.maxLatitude,minLongitude:o.minLongitude,maxLongitude:o.maxLongitude}:{cancel:!1,name:"zoomComplete",type:i,maps:e,tileTranslatePoint:{},translatePoint:{previous:e.previousPoint,current:e.translatePoint},tileZoomLevel:{},scale:{previous:e.previousScale,current:e.scale},minLatitude:o.minLatitude,maxLatitude:o.maxLatitude,minLongitude:o.minLongitude,maxLongitude:o.maxLongitude},this.maps.trigger("zoomComplete",n))},v.prototype.drawZoomRectangle=function(){var e=this.maps,t=this.mouseDownPoints,i=this.mouseMovePoints,o={width:1,color:this.maps.themeStyle.rectangleZoomBorderColor},n=Math.abs(i.x-t.x),a=Math.abs(i.y-t.y),l=i.x>t.x?t.x:t.x-n,i=i.y>t.y?t.y:t.y-a;l>e.mapAreaRect.x&&l<e.mapAreaRect.x+e.mapAreaRect.width&&i>e.mapAreaRect.y&&i<e.mapAreaRect.y+e.mapAreaRect.height&&(this.zoomingRect=new K(l,i,n,a),t=e.renderer.createSvg({id:e.element.id+"_Selection_Rect_Zooming",width:e.availableSize.width,height:e.availableSize.height,style:"position: absolute;"}),l=new Q(e.element.id+"_ZoomRect",this.maps.themeStyle.rectangleZoomFillColor,o,this.maps.themeStyle.rectangleZoomFillOpacity,this.zoomingRect,0,0,"","3"),t.appendChild(e.renderer.drawRectangle(l)),N(e.element.id+"_Secondary_Element").appendChild(t))},v.prototype.animateTransform=function(e,t,i,o,n){var a=0===this.currentLayer.animationDuration&&"Enable"===Y.animationMode?1e3:this.currentLayer.animationDuration;!t||0===a||this.maps.isTileMap?this.maps.isTileMap&&-1<e.id.indexOf("_Polygons_Group")||e.setAttribute("transform","scale("+n+") translate( "+i+" "+o+" )"):this.maps.isTileMap||Et(e,0,a,new T(i,o),n,this.maps.mapAreaRect,this.maps)},v.prototype.applyTransform=function(f,b,S){var v,x=this,O=(this.templateCount=0,f.scale),C=f.translatePoint.x,_=f.translatePoint.y,M=0;if(f.zoomShapeCollection=[],this.isPanningInProgress=S||!1,document.getElementById(f.element.id+"_mapsTooltip")&&P(f.element.id+"_mapsTooltip"),this.layerCollectionEle){for(var e=function(e){var g=L.layerCollectionEle.childNodes[e];if("g"===g.tagName){L.templateCount++,L.index=-1<g.id.indexOf("_LayerIndex_")&&parseFloat(g.id.split("_LayerIndex_")[1].split("_")[0]),L.currentLayer=f.layersCollection[L.index];for(var y=f.mapLayerPanel.calculateFactor(L.currentLayer),t=g.childElementCount,i=0;i<t;i++)!function(e){var l,t,i,a,r,s=g.childNodes[e];if(-1<s.id.indexOf("_Markers_Group")||-1<s.id.indexOf("_bubble_Group")||-1<s.id.indexOf("_dataLableIndex_Group"))if(-1<s.id.indexOf("_Markers_Group"))L.isPanModeEnabled&&S||Y.isNullOrUndefined(s.childNodes[0])||L.markerTranslates(s.childNodes[0],y,C,_,O,"Marker",g),s=g.childNodes[e],Y.isNullOrUndefined(s)||-1===s.id.indexOf("Markers")||(Array.prototype.forEach.call(s.childNodes,function(e,t){x.markerTranslate(e,y,C,_,O,"Marker",b);var i=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),o=parseInt(e.id.split("_MarkerIndex_")[1].split("_")[0],10);if(l=0<x.currentLayer.markerSettings[o].animationDuration||"Enable"===Y.animationMode,0<x.currentLayer.markerSettings[o].initialMarkerSelection.length)for(var n=x.currentLayer.markerSettings[o].dataSource[i],a=0;a<x.currentLayer.markerSettings[o].initialMarkerSelection.length;a++)x.currentLayer.markerSettings[o].initialMarkerSelection[a].latitude!==n.latitude&&x.currentLayer.markerSettings[o].initialMarkerSelection[a].longitude!==n.longitude||f.markerSelection(x.currentLayer.markerSettings[o].selectionSettings,f,s.children[t],x.currentLayer.markerSettings[o].dataSource[i]);(0<x.currentLayer.animationDuration||"Enable"===Y.animationMode||(0<f.layersCollection[0].animationDuration||"Enable"===Y.animationMode)&&"SubLayer"===x.currentLayer.type)&&!x.isPanModeEnabled&&(f.isTileMap?(e=document.querySelector(".GroupElement"))&&!document.querySelector(".ClusterGroupElement")&&l&&(e.style.display="none"):s.style.cssText="visibility:hidden")}),L.isPanModeEnabled&&0<f.markerModule.sameMarkerData.length?je(f.markerModule.sameMarkerData,f,s,!0):0<f.markerModule.sameMarkerData.length&&(f.markerModule.sameMarkerData=[],document.getElementById(f.element.id+"_mapsTooltip"))&&P(f.element.id+"_mapsTooltip"),document.getElementById(f.element.id+"_mapsTooltip")&&f.mapsTooltipModule.tooltipTargetID.indexOf("_MarkerIndex_")&&!L.isPanModeEnabled&&(e=f.mapsTooltipModule,i=s.querySelector("#"+e.tooltipTargetID),Y.isNullOrUndefined(i)||("hidden"===i.style.visibility?P(f.element.id+"_mapsTooltip"):(t=parseFloat(i.getAttribute("transform").split("(")[1].split(")")[0].split(" ")[1]),i=parseFloat(i.getAttribute("transform").split("(")[1].split(")")[0].split(" ")[2]),f.isTileMap&&(t+=+F(f.element.id+"_tile_parent").style.left.split("px")[0],i+=+F(f.element.id+"_tile_parent").style.top.split("px")[0]),e.svgTooltip.location.x=t,e.svgTooltip.location.y=i,e.svgTooltip.enableAnimation=!1))));else if(-1<s.id.indexOf("_bubble_Group"))for(var o=void 0,n=0;n<s.childElementCount;n++){o=s.childNodes[n],v=parseFloat(o.id.split("_LayerIndex_")[1].split("_")[0]);for(var d=parseFloat(o.id.split("_BubbleIndex_")[1].split("_")[0]),p=parseFloat(o.id.split("_BubbleIndex_")[1].split("_")[2]),h=0;h<f.bubbleModule.bubbleCollection.length;h++){var m=f.bubbleModule.bubbleCollection[h];if(m.LayerIndex===v&&m.BubbleIndex===d&&m.DataIndex===p){var c=m.center.x,m=m.center.y,c=(c+C)*O,m=(m+_)*O,u=0===L.currentLayer.animationDuration&&"Enable"===Y.animationMode?1e3:L.currentLayer.animationDuration;b&&0!==u?Ut(o,0,u,new T(c,m)):o.setAttribute("transform","translate( "+c+" "+m+" )");break}}}else-1<s.id.indexOf("_dataLableIndex_Group")&&!Y.isNullOrUndefined(f.layers[L.index])&&(f.zoomLabelPositions=[],f.zoomLabelPositions=f.dataLabelModule.dataLabelCollections,a=!f.isTileMap&&b,r=[],Array.prototype.forEach.call(s.childNodes,function(e,t){var i,o,n;-1<s.childNodes[t].id.indexOf("_LabelIndex_")&&(n=parseFloat(s.childNodes[t].id.split("_LabelIndex_")[1].split("_")[0]),o=s.childNodes[t].id,f.zoomShapeCollection.push(o),x.dataLabelTranslate(s.childNodes[t],y,C,_,O,"DataLabel",a,M,S,r),M++,o=f.layers[x.index].dataLabelSettings.border,0<t)&&1<o.width&&-1<s.childNodes[t-1].id.indexOf("_rectIndex_")&&!Y.isNullOrUndefined(f.zoomLabelPositions[n])&&(o=(f.zoomLabelPositions[n].location.x+C)*O,n=(f.zoomLabelPositions[n].location.y+_)*O,i=W(s.childNodes[t].textContent,f.layers[x.index].dataLabelSettings.textStyle),t=s.childNodes[t-1],o=o-i.width/2,n=n-i.height/2-5,t.setAttribute("x",o),t.setAttribute("y",n))}));else f.isTileMap&&-1<s.id.indexOf("_line_Group")?(s.remove(),0<g.children.length&&g.children[0]?g.insertBefore(f.navigationLineModule.renderNavigation(L.currentLayer,f.tileZoomLevel,L.index),g.children[1]):g.appendChild(f.navigationLineModule.renderNavigation(L.currentLayer,f.tileZoomLevel,L.index))):f.isTileMap&&-1<s.id.indexOf("_Polygons_Group")?0<L.currentLayer.polygonSettings.polygons.length&&(L.currentLayer.polygonSettings.polygons.map(function(e,t){e=e.points,e=D(f,f.tileZoomLevel,x.currentLayer,e),t=document.getElementById(f.element.id+"_LayerIndex_"+x.index+"_PolygonIndex_"+t);Y.isNullOrUndefined(t)||t.setAttribute("d",e)}),document.getElementById(f.element.id+"_LayerIndex_"+L.index+"_Polygons_Group").style.visibility=""):-1===s.id.indexOf("Legend")&&(Lt(s,L.index,O,f),f.zoomTranslatePoint=f.translatePoint,L.animateTransform(s,b,C,_,O))}(i)}f.arrangeTemplate()},L=this,t=0;t<this.layerCollectionEle.childElementCount;t++)e(t);Y.isNullOrUndefined(this.currentLayer)||b&&0!==this.currentLayer.animationDuration&&!f.isTileMap||this.processTemplate(C,_,O,f)}},v.prototype.markerTranslates=function(e,c,u,g,y,f,b){var S=this,v=0,x=0,O=0,C=parseInt((e||b).id.split("_LayerIndex_")[1].split("_")[0],10),_=this.maps.renderer.createGroup({id:this.maps.element.id+"_Markers_Group",class:"GroupElement"}),e=(_.style.pointerEvents="auto",document.getElementById(_.id)&&P(_.id),this.maps.mapAreaRect),M=Y.createElement("div",{id:this.maps.element.id+"_LayerIndex_"+C+"_Markers_Template_Group",className:"template"}),L=(M.style.cssText="overflow: hidden; position: absolute;pointer-events: none;top:"+e.y+"px;left:"+e.x+"px;height:"+e.height+"px;width:"+e.width+"px;",document.getElementById(M.id)&&P(M.id),this.maps.layersCollection[C]);Array.prototype.forEach.call(L.markerSettings,function(p,h){var m=p.dataSource;Array.prototype.forEach.call(m,function(r,s){S.maps.markerNullCount=0<=h&&0===s?0:S.maps.markerNullCount;var d={template:p.template,data:r,maps:S.maps,marker:p,cancel:!1,name:Zo,fill:p.fill,colorValuePath:p.colorValuePath,shapeValuePath:p.shapeValuePath,height:p.height,width:p.width,imageUrl:p.imageUrl,imageUrlValuePath:p.imageUrlValuePath,shape:p.shape,border:p.border};d=Ie(d=ke(d,r),r),S.maps.trigger("markerRendering",d,function(e){p.shapeValuePath!==d.shapeValuePath&&(d=ke(d,r)),p.colorValuePath!==d.colorValuePath&&(d=Ie(d,r));var t,i=Y.isNullOrUndefined(p.latitudeValuePath)?Y.isNullOrUndefined(r.latitude)?Y.isNullOrUndefined(r.Latitude)?null:r.Latitude:parseFloat(r.latitude):Number(k(r,p.latitudeValuePath)),o=Y.isNullOrUndefined(p.longitudeValuePath)?Y.isNullOrUndefined(r.longitude)?Y.isNullOrUndefined(r.Longitude)?null:r.Longitude:parseFloat(r.longitude):Number(k(r,p.longitudeValuePath)),n=p.offset,a=(d.cancel||!p.visible||Y.isNullOrUndefined(o)||Y.isNullOrUndefined(i)||(a=S.maps.element.id+"_LayerIndex_"+C+"_MarkerIndex_"+h+"_dataIndex_"+s,l=S.maps.isTileMap?R(new T(o,i),S.maps.tileZoomLevel,S.maps.tileTranslatePoint,!0):B(i,o,c,L,S.maps),t={x:u,y:g},!d.template||isNaN(l.x)||isNaN(l.y)?d.template||isNaN(l.x)||isNaN(l.y)||(x++,Ze(d,p,m,s,l,t,a,n,y,S.maps,_)):(O++,De(d,void 0,a,r,h,M,l,t,y,n,S.maps))),v+=isNaN(i)||isNaN(o)?1:0,O+=d.cancel?1:0,x+=d.cancel?1:0,S.maps.markerNullCount=Y.isNullOrUndefined(i)||Y.isNullOrUndefined(o)?S.maps.markerNullCount+1:S.maps.markerNullCount,m.length-S.maps.markerNullCount),l=!1;_.childElementCount===a-O-v&&"Template"!==f&&(S.maps.isTileMap?(t=document.getElementById(S.maps.element.id+"_LayerIndex_"+C+"_Polygons_Group"),n=document.getElementById(S.maps.element.id+"_LayerIndex_"+C+"_Polygon_Group"),Y.isNullOrUndefined(t)?Y.isNullOrUndefined(n)?b.insertBefore(_,b.firstElementChild):n.insertAdjacentElement("afterend",_):t.insertAdjacentElement("afterend",_)):b.appendChild(_),L.markerClusterSettings.allowClustering)&&(S.maps.svgObject.appendChild(_),S.maps.element.appendChild(S.maps.svgObject),l=ze(L,_,S.maps,C,_,b,!0,!0)),M.childElementCount===a-x-v&&N(S.maps.element.id+"_Secondary_Element")&&(N(S.maps.element.id+"_Secondary_Element").appendChild(M),1<=y)&&L.markerClusterSettings.allowClustering&&!l&&ze(L,M,S.maps,C,_,b,!1,!0)})})})},v.prototype.processTemplate=function(e,t,i,o){for(var n=0,a=0;a<this.templateCount;a++){var l=o.mapLayerPanel.calculateFactor(this.currentLayer),r=N(o.element.id+"_LayerIndex_"+a+"_Markers_Template_Group"),s=N(o.element.id+"_LayerIndex_"+a+"_Label_Template_Group"),d=N(o.element.id+"_LayerIndex_"+a+"_Polygons_Group");if(!Y.isNullOrUndefined(r)&&0<r.childElementCount){r.style.visibility="visible";for(var p=0;p<r.childElementCount;p++)this.markerTranslate(r.childNodes[p],l,e,t,i,"Template")}if(!Y.isNullOrUndefined(s)&&0<s.childElementCount)for(p=0;p<s.childElementCount;p++)this.dataLabelTranslate(s.childNodes[p],l,e,t,i,"Template",!1,n),n++;if(!Y.isNullOrUndefined(d))for(p=0;p<d.childElementCount;p++){var h=o.layersCollection[a].polygonSettings.polygons[p].borderWidth;d.childNodes[p].childNodes[0].setAttribute("stroke-width",(h/i).toString())}}},v.prototype.dataLabelTranslate=function(e,t,i,o,n,a,l,r,s,d){void 0===l&&(l=!1);var p,h=this.maps.dataLabelModule.dataLabelCollections,m=this.maps.layers[this.index].dataLabelSettings.textStyle,c=parseFloat(e.id.split("_LayerIndex_")[1].split("_")[0]),u=parseFloat(e.id.split("_shapeIndex_")[1].split("_")[0]),g=(-1<e.id.indexOf("_LabelIndex_")&&(f=parseFloat(e.id.split("_LabelIndex_")[1].split("_")[0])),0===this.currentLayer.animationDuration&&"Enable"===Y.animationMode?1e3:this.currentLayer.animationDuration),h=h[r],y=r;if(h.layerIndex===c&&h.shapeIndex===u&&h.labelIndex===f){r=h.location.x,c=h.location.y;if("Template"===a){var u=0,f=0;f=this.maps.isTileMap?(u=(r+i)*n-(b=W(p=h.dataLabelText,m)).width/2,(c+o)*n-b.height):(a=N(this.maps.element.id+"_Layer_Collections"),r=Math.abs(this.maps.baseMapRectBounds.min.x-r)*n,c=Math.abs(this.maps.baseMapRectBounds.min.y-c)*n,a=a.getBoundingClientRect(),S=e.parentElement.getBoundingClientRect(),u=r+(a.left-S.left),c+(a.top-S.top)),e.style.left=u+"px",e.style.top=f+"px"}else{if(r=(r+i)*n,c=(c+o)*n,p=h.dataLabelText,l&&0!==g||e.setAttribute("transform","translate( "+r+" "+c+" )"),(Y.isNullOrUndefined(s)||!s)&&("None"!==this.maps.layers[this.index].dataLabelSettings.smartLabelMode||"None"!==this.maps.layers[this.index].dataLabelSettings.intersectionAction)){var b,a=c-(b=le(p,m)).height/2,S=c+b.height/2,v={rightWidth:r+b.width/2,leftWidth:r-b.width/2,heightTop:a,heightBottom:S},x=("Hide"===this.maps.layers[this.index].dataLabelSettings.smartLabelMode&&(_=1<n?this.maps.dataLabelShape[y]*n>=b.width?p:"":this.maps.dataLabelShape[y]>=b.width?p:"",e.textContent=_),[]);if("Trim"===this.maps.layers[this.index].dataLabelSettings.smartLabelMode&&(_=tt(1<n?this.maps.dataLabelShape[y]*n:this.maps.dataLabelShape[y],p,m,b.width,!0,x),e.textContent=_),"Hide"===this.maps.layers[this.index].dataLabelSettings.intersectionAction){for(var O=0;O<d.length;O++)if(!Y.isNullOrUndefined(d[O])){if(!(v.leftWidth>d[O].rightWidth||v.rightWidth<d[O].leftWidth||v.heightTop>d[O].heightBottom||v.heightBottom<d[O].heightTop)){e.textContent=_="";break}_=Y.isNullOrUndefined(_)?p:_,e.textContent=_}d.push(v)}if("Trim"===this.maps.layers[this.index].dataLabelSettings.intersectionAction){for(var C,_,M=0;M<d.length;M++)if(!Y.isNullOrUndefined(d[M]))if(v.rightWidth<d[M].leftWidth||v.leftWidth>d[M].rightWidth||v.heightBottom<d[M].heightTop||v.heightTop>d[M].heightBottom)C=Y.isNullOrUndefined(_)?p:_,1<n&&(w=0<x.length?x[0]:b.width,C=tt(this.maps.dataLabelShape[y]*n,C,m,w,!0)),e.textContent=C;else{if(v.leftWidth>d[M].leftWidth){C=tt(P=(L=d[M].rightWidth-v.leftWidth)-(v.rightWidth-v.leftWidth),_=Y.isNullOrUndefined(_)?p:_,m,w=0<x.length?x[0]:b.width,!0),e.textContent=C;break}if(v.leftWidth<d[M].leftWidth){var L=v.rightWidth-d[M].leftWidth,P=Math.abs(L-(v.rightWidth-v.leftWidth)),w=(_=Y.isNullOrUndefined(_)?p:_,0<x.length?x[0]:b.width);C=tt(P,_,m,w,!0),e.textContent=C;break}}d.push(v),Y.isNullOrUndefined(C)&&(C=tt(this.maps.dataLabelShape[y]*n,p,m,b.width,!0),e.textContent=C)}}(l||0<g)&&Ut(e,0,g,new T(r,c))}}},v.prototype.markerTranslate=function(e,t,i,o,n,a,l){void 0===l&&(l=!1);var r,s,d,p=parseInt(e.id.split("_LayerIndex_")[1].split("_")[0],10),h=parseInt(e.id.split("_MarkerIndex_")[1].split("_")[0],10),m=parseInt(e.id.split("_dataIndex_")[1].split("_")[0],10),p=this.maps.layersCollection[p],h=p.markerSettings[h];Y.isNullOrUndefined(h)||Y.isNullOrUndefined(h.dataSource)||Y.isNullOrUndefined(h.dataSource[m])||(s=Y.isNullOrUndefined(h.longitudeValuePath)?Y.isNullOrUndefined(h.dataSource[m].longitude)?Y.isNullOrUndefined(h.dataSource[m].Longitude)?0:parseFloat(h.dataSource[m].Longitude):parseFloat(h.dataSource[m].longitude):Number(k(h.dataSource[m],h.longitudeValuePath)),m=Y.isNullOrUndefined(h.latitudeValuePath)?Y.isNullOrUndefined(h.dataSource[m].latitude)?Y.isNullOrUndefined(h.dataSource[m].Latitude)?0:parseFloat(h.dataSource[m].Latitude):parseFloat(h.dataSource[m].latitude):Number(k(h.dataSource[m],h.latitudeValuePath)),r=0===this.currentLayer.animationDuration&&"Enable"===Y.animationMode?1e3:this.currentLayer.animationDuration,m=this.maps.isTileMap?R(new J(s,m),this.maps.tileZoomLevel,this.maps.tileTranslatePoint,!0):B(m,s,t,p,this.maps),this.maps.isTileMap?"Template"===a?(s=e.getBoundingClientRect(),e.style.left=m.x-s.width/2+h.offset.x+"px",e.style.top=m.y-s.height/2+h.offset.y+"px"):(m.x+=h.offset.x,m.y+=h.offset.y,e.setAttribute("transform","translate( "+m.x+" "+m.y+" )")):"Template"===a?0<r?(m.x=Math.abs(this.maps.baseMapRectBounds.min.x-m.x)*n,m.y=Math.abs(this.maps.baseMapRectBounds.min.y-m.y)*n,t=N(this.maps.element.id+"_Layer_Collections").getBoundingClientRect(),d=e.parentElement.getBoundingClientRect(),e.style.left=m.x+(t.left-d.left)+h.offset.x+"px",e.style.top=m.y+(t.top-d.top)+h.offset.y+"px",e.style.transform="translate(-50%, -50%)"):(d=e.getBoundingClientRect(),e.style.left=(m.x+i)*n+h.offset.x-this.maps.mapAreaRect.x-d.width/2+"px",e.style.top=(m.y+o)*n+h.offset.y-this.maps.mapAreaRect.y-d.height/2+"px"):(m.x=(m.x+i)*n+h.offset.x,m.y=(m.y+o)*n+h.offset.y,l&&0!==r?Ut(e,0,r,m):e.setAttribute("transform","translate( "+m.x+" "+m.y+" )")))},v.prototype.markerLineAnimation=function(e){if(e.isTileMap)for(var t=0;t<e.layersCollection.length;t++){var i=N(this.maps.element.id+"_LayerIndex_"+t+"_Markers_Template_Group"),o=N(this.maps.element.id+"_LayerIndex_"+t+"_line_Group"),n=N(this.maps.element.id+"_LayerIndex_"+t+"_Polygons_Group");Y.isNullOrUndefined(i)||(i.style.visibility="hidden"),Y.isNullOrUndefined(o)||(o.style.visibility="hidden"),Y.isNullOrUndefined(n)||(n.style.visibility="hidden")}},v.prototype.panning=function(e,t,i,o){var n,a,l,r,s,d=this.maps,p=this.mouseDownPoints,h=this.mouseMovePoints,m=d.scale,c=(d.markerZoomedState=!1,d.zoomPersistence=d.enablePersistence,d.defaultState=!1,d.initialCheck=!1,d.translatePoint),u=d.tileTranslatePoint,p=(t=Y.isNullOrUndefined(t)?p.x-h.x:t,i=Y.isNullOrUndefined(i)?p.y-h.y:i,-1<o.type.indexOf("mouse")||-1<o.type.indexOf("key")?o.layerX:o.touches[0].pageX),h=-1<o.type.indexOf("mouse")||-1<o.type.indexOf("key")?o.layerY:o.touches[0].pageY;this.maps.mergeCluster(),d.isTileMap?1<this.maps.tileZoomLevel&&(n=d.tileTranslatePoint.x-t,a=d.tileTranslatePoint.y-i,d.tileTranslatePoint.x=n,d.tileTranslatePoint.y=a,(-10<d.tileTranslatePoint.y&&i<0||d.tileTranslatePoint.y<-256*(Math.pow(2,this.maps.tileZoomLevel)-2)&&0<i)&&(d.tileTranslatePoint.x=n+t,d.tileTranslatePoint.y=a+i),d.translatePoint.x=d.tileTranslatePoint.x/d.scale,d.translatePoint.y=d.tileTranslatePoint.y/d.scale,o=this.maps.getTileGeoLocation(p,h),r=this.maps.getMinMaxLatitudeLongitude(),s={cancel:!1,name:nn,maps:d,tileTranslatePoint:{previous:u,current:d.tileTranslatePoint},translatePoint:{previous:c,current:d.translatePoint},scale:d.scale,tileZoomLevel:d.tileZoomLevel,latitude:o.latitude,longitude:o.longitude,minLatitude:r.minLatitude,maxLatitude:r.maxLatitude,minLongitude:r.minLongitude,maxLongitude:r.maxLongitude},d.trigger(nn,s),d.mapLayerPanel.generateTiles(d.tileZoomLevel,d.tileTranslatePoint,"Pan"),this.applyTransform(d,!1,!0),d.translatePoint.x=(d.tileTranslatePoint.x-t)/d.scale,d.translatePoint.y=(d.tileTranslatePoint.y-i)/d.scale):(u=rt(d.margin.top),o=document.getElementById(d.element.id+"_Legend_Group"),o=Y.isNullOrUndefined(o)?0:o.getClientRects()[0].height,n=c.x-t/m,a=c.y-i/m,m=N(d.element.id+"_Layer_Collections").getBoundingClientRect(),l=N(d.element.id+"_svg").getBoundingClientRect(),t=t<0?m.left<=l.left+d.mapAreaRect.x:m.left+m.width+d.mapAreaRect.x>=l.width,i=i<0?m.top<=l.top+d.mapAreaRect.y:m.top+m.height+o+u>=l.top+l.height,m=this.maps.getGeoLocation(this.maps.layersCollection.length-1,p,h),r=this.maps.getMinMaxLatitudeLongitude(),s={cancel:!1,name:nn,maps:d,tileTranslatePoint:{},translatePoint:{previous:c,current:new J(n,a)},scale:d.scale,tileZoomLevel:d.tileZoomLevel,latitude:m.latitude,longitude:m.longitude,minLatitude:r.minLatitude,maxLatitude:r.maxLatitude,minLongitude:r.minLongitude,maxLongitude:r.maxLongitude},d.trigger(nn,s),s.cancel||(t&&i?(d.translatePoint=new J(n,a),this.applyTransform(d,!1,!0)):t?(d.translatePoint=new J(n,d.translatePoint.y),this.applyTransform(d,!1,!0)):i&&(d.translatePoint=new J(d.translatePoint.x,a),this.applyTransform(d,!1,!0))),this.maps.zoomNotApplied=!1),d.zoomTranslatePoint=d.translatePoint,this.mouseDownPoints=this.mouseMovePoints,this.isSingleClick=!1},v.prototype.toolBarZooming=function(e,t){var i,o,n,a,l,r=this,s=this.maps,d=(s.initialCheck=s.isMarkerZoomCompleted=!1,s.defaultState="Reset"===t&&1===e&&!(s.zoomSettings.resetToInitial&&s.applyZoomReset)||"ZoomOut"===t&&1===e,s.tileZoomLevel),p=s.previousScale=s.scale,h=(s.markerZoomedState=!1,s.zoomPersistence=s.enablePersistence,s.mapScaleValue=e,s.zoomSettings.maxZoom),m=s.zoomSettings.minZoom,c=s.mapAreaRect,u=s.previousPoint=s.translatePoint,g=s.tileTranslatePoint;s.previousProjection="Reset"===t?void 0:s.projectionType,e="ZoomOut"===t&&1===Math.round(e)?1:e,e=(e="Reset"===t?m:0===Math.round(e)?1:e)<m&&"ZoomIn"===t?m+1:e,!s.isTileMap&&("ZoomIn"===t?m<=e&&Math.round(e)<=h:m<=e||s.isReset)?(i=s.baseMapRectBounds.min,o=s.baseMapRectBounds.max,l=Math.abs(o.x-i.x),o=Math.abs(i.y-o.y),a=n=void 0,e<1.2&&"Eckert5"!==s.projectionType?(0!==o&&0!==l&&o!==l||(l=c.width/2,o=c.height),e=parseFloat(Math.min(c.width/l,c.height/o).toFixed(2)),s.translatePoint=this.calculateInitalZoomTranslatePoint(e=1.05<e?1:e,l,o,c,i,s)):(n=u.x-(c.width/p-c.width/e)/2,a=u.y-(c.height/p-c.height/e)/2,n=(u=Math.abs(s.baseMapRectBounds.max.y-s.baseMapRectBounds.min.y)*e)<s.mapAreaRect.height?c.x+(-i.x+(c.width/2-l/2)):n,a=u<s.mapAreaRect.height?c.y+(-i.y+(c.height/2-o/2)):a,s.translatePoint=new J(n,a)),s.zoomTranslatePoint=s.translatePoint,s.scale=e,this.triggerZoomEvent(g,d,t)?(s.translatePoint=s.zoomTranslatePoint=s.previousPoint,s.scale=s.previousScale):this.applyTransform(s,!0)):s.isTileMap&&(m<=e&&e<=h||s.isReset)&&(p=d<m&&!s.isReset?m:e,s.scale=Math.pow(2,p-1),s.tileZoomLevel=p,s.previousScale===s.scale&&!s.isReset||(s.zoomSettings.zoomFactor=e,l={x:s.availableSize.width/2,y:s.availableSize.height/2},this.getTileTranslatePosition(d,p,l,t),(s.zoomSettings.resetToInitial&&s.applyZoomReset&&"Reset"===t||"ZoomOut"===t&&s.zoomSettings.resetToInitial&&s.applyZoomReset&&p<=s.initialZoomLevel)&&(s.initialCheck=!0,s.zoomPersistence=!1,s.tileTranslatePoint.x=s.initialTileTranslate.x,s.tileTranslatePoint.y=s.initialTileTranslate.y,p=s.tileZoomLevel=s.mapScaleValue=s.initialZoomLevel),this.triggerZoomEvent(g,d,t)?(s.translatePoint=s.tileTranslatePoint=new J(0,0),s.scale=s.previousScale,s.tileZoomLevel=d,s.zoomSettings.zoomFactor=s.previousScale):(s.translatePoint.y=(s.tileTranslatePoint.y-.01*s.mapScaleValue)/s.scale,s.translatePoint.x=(s.tileTranslatePoint.x-.01*s.mapScaleValue)/s.scale,document.getElementById(this.maps.element.id+"_LayerIndex_1")&&(document.getElementById(this.maps.element.id+"_LayerIndex_1").style.display="none"),document.querySelector(".GroupElement")&&(document.querySelector(".GroupElement").style.display="none"),this.markerLineAnimation(s),s.mapLayerPanel.generateTiles(p,s.tileTranslatePoint,t),u=0===this.maps.layersCollection[0].animationDuration&&"Enable"===Y.animationMode?1e3:this.maps.layersCollection[0].animationDuration,setTimeout(function(){r.applyTransform(r.maps,!0),document.getElementById(r.maps.element.id+"_LayerIndex_1")&&(document.getElementById(r.maps.element.id+"_LayerIndex_1").style.display="block"),r.maps.isAddLayer=!1},u))),this.maps.zoomNotApplied=!1),this.triggerZoomComplete(s,d,t)},v.prototype.createZoomingToolbars=function(){for(var e=this.maps,t=(this.toolBarGroup=e.renderer.createGroup({id:e.element.id+"_Zooming_KitCollection",opacity:"fluentdark"===e.theme.toLowerCase()?.6:.3}),15),i=15,o=e.zoomSettings.toolbarSettings,n=e.zoomSettings.toolbarSettings.buttonSettings,a=(this.maps.toolbarProperties={toolBarOrientation:o.orientation,highlightColor:n.highlightColor,selectionColor:n.selectionColor,horizontalAlignment:o.horizontalAlignment,verticalAlignment:o.verticalAlignment,color:n.color,shapeOpacity:n.opacity,borderOpacity:n.borderOpacity},n.radius||e.themeStyle.zoomButtonRadius),l=a/4,r=a/4,s=a/2,d=n.padding,p=this.maps.toolbarProperties.toolBarOrientation,h=e.zoomSettings.toolbarSettings.buttonSettings.toolbarItems.map(function(e){return e}),t=a/4+n.borderWidth/2+d,i=a/4+n.borderWidth/2+d,m=('<filter id="chart_shadow" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="5"/>'+'<feOffset dx="-3" dy="4" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="1"/>'+'</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>',h.length),c="Horizontal"===p?m*a+m*d+d+m*n.borderWidth:a+n.borderWidth+2*d,p="Horizontal"===p?a+n.borderWidth+2*d:m*a+m*d+d+m*n.borderWidth,m=e.renderer.createDefs(),m=(m.innerHTML='<filter id="chart_shadow" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="5"/><feOffset dx="-3" dy="4" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="1"/></feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>',this.toolBarGroup.appendChild(m),e.renderer.drawRectangle(new Q(e.element.id+"_Zooming_Rect",o.backgroundColor,{color:o.borderColor,width:o.borderWidth,opacity:o.borderOpacity},o.borderOpacity,new K(o.borderWidth/2,o.borderWidth/2,c-o.borderWidth,p-o.borderWidth),0,0))),u=(this.toolBarGroup.appendChild(m),(a-n.borderWidth/2)/30),g=0;g<h.length;g++){0!==g&&(t="Horizontal"===e.toolbarProperties.toolBarOrientation?t+(a+d)+n.borderWidth:t,i="Horizontal"===e.toolbarProperties.toolBarOrientation?i:i+(a+d)+n.borderWidth);var y=h[g],f=Y.isNullOrUndefined(this.maps.toolbarProperties.color)?this.maps.themeStyle.zoomFillColor:this.maps.toolbarProperties.color,b=n.borderColor||this.maps.themeStyle.zoomBorderColor||this.maps.themeStyle.zoomFillColor,S=(this.currentToolbarEle=e.renderer.createGroup({id:e.element.id+"_Zooming_ToolBar_"+y+"_Group",transform:"translate( "+t+" "+i+" ) "}),this.currentToolbarEle.setAttribute("class","e-maps-toolbar"),this.currentToolbarEle.appendChild(e.renderer.drawCircle(new me(e.element.id+"_Zooming_ToolBar_"+y+"_Rect",n.fill,{color:b,width:n.borderWidth,opacity:n.borderOpacity},n.opacity,l,r,s,""))),""),v=n.fill;switch(this.selectionColor=this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor,y.toLowerCase()){case"zoom":var x=void 0,O=void 0,O=(S=(S="M0.001,14.629L1.372,16l4.571-4.571v-0.685l0.228-0.274c1.051,0.868,2.423,1.417,3.885,1.417c3.291,0,")+"5.943-2.651,5.943-5.943S13.395,0,10.103,0S4.16,2.651,4.16,5.943c0,1.508,0.503,2.834,1.417,3.885l-0.274,0.228H4.571"+"L0.001,14.629L0.001,14.629z M5.943,5.943c0-2.285,1.828-4.114,4.114-4.114s4.114,1.828,4.114,",this.currentToolbarEle.setAttribute("class",this.maps.zoomSettings.enableSelectionZooming?"e-maps-toolbar":""),(!this.maps.zoomSettings.enablePanning||this.maps.zoomSettings.enableSelectionZooming)&&(!this.maps.zoomSettings.enablePanning||!this.maps.zoomSettings.enableSelectionZooming)&&(this.maps.zoomSettings.enablePanning||this.maps.zoomSettings.enableSelectionZooming)?!this.maps.zoomSettings.enablePanning&&this.maps.zoomSettings.enableSelectionZooming?(x=this.maps.themeStyle.zoomFillColor,f):(x=this.selectionColor,this.selectionColor):(x=v,f)),x=e.renderer.drawPath(new A(e.element.id+"_Zooming_ToolBar_"+y,x,1,O,1,1,null,S+"4.114s-1.828,4.114-4.114,4.114S5.943,8.229,5.943,5.943z"));x.setAttribute("transform","scale( "+u+","+u+" )"),this.currentToolbarEle.appendChild(x),this.zoomElements=this.currentToolbarEle,this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"zoomin":O=e.renderer.drawPath(new A(e.element.id+"_Zooming_ToolBar_"+y+"_Path",v,3,f,1,1,null,S="M 8, 0 L 8, 16 M 0, 8 L 16, 8"));O.setAttribute("transform","scale( "+u+","+u+" )"),this.currentToolbarEle.appendChild(O),this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"zoomout":x=e.renderer.drawPath(new A(e.element.id+"_Zooming_ToolBar_"+y,v,3,f,1,1,null,S="M 0, 8 L 16, 8"));x.setAttribute("transform","scale( "+u+","+u+" )"),this.currentToolbarEle.appendChild(x),this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"pan":var C=void 0,_=(S="M5,3h2.3L7.275,5.875h1.4L8.65,3H11L8,0L5,3z M3,11V8.7l2.875,0.025v-1.4L3,7.35V5L0,8L3,",S+="11z M11,13H8.7l0.025-2.875h-1.4L7.35,13H5l3,3L11,13z M13,5v2.3l-2.875-0.025v1.4L13,8.65V11l3-3L13,5z",this.currentToolbarEle.setAttribute("class",this.maps.zoomSettings.enablePanning?"e-maps-toolbar":""),this.maps.zoomSettings.enablePanning&&this.maps.zoomModule.isDragZoom?C=this.selectionColor||this.maps.themeStyle.zoomFillColor:this.maps.zoomSettings.enablePanning?C=v||this.maps.themeStyle.zoomFillColor:(C=this.selectionColor||this.maps.themeStyle.zoomFillColor,this.currentToolbarEle.setAttribute("class","")),e.renderer.drawPath(new A(e.element.id+"_Zooming_ToolBar_"+y,C,1,f,1,1,null,S)));_.setAttribute("transform","scale( "+u+","+u+" )"),this.currentToolbarEle.appendChild(_),this.panColor=C,this.panElements=this.currentToolbarEle,this.wireEvents(this.currentToolbarEle,this.performToolBarAction);break;case"reset":S=(S="M12.364,8h-2.182l2.909,3.25L16,8h-2.182c0-3.575-2.618-6.5-5.818-6.5c-1.128,0-2.218,0.366-3.091,")+"1.016l1.055,1.178C6.581,3.328,7.272,3.125,8,3.125C10.4,3.125,12.363,5.319,12.364,8L12.364,8z M11.091,"+"13.484l-1.055-1.178C9.419,12.672,8.728,12.875,8,12.875c-2.4,0-4.364-2.194-4.364-4.875h2.182L2.909,4.75L0,8h2.182c0,";_=e.renderer.drawPath(new A(e.element.id+"_Zooming_ToolBar_"+y,v,null,f,1,1,null,S+"3.575,2.618,6.5,5.818,6.5C9.128,14.5,10.219,14.134,11.091,13.484L11.091,13.484z"));_.setAttribute("transform","scale( "+u+","+u+" )"),this.currentToolbarEle.appendChild(_),this.wireEvents(this.currentToolbarEle,this.performToolBarAction)}this.toolBarGroup.appendChild(this.currentToolbarEle)}},v.prototype.performToolBarAction=function(e){var t=e.target,i=(e.stopImmediatePropagation(),"touch"===e.pointerType||"2"===e.pointerType||-1<e.type.indexOf("touch")),t=t.id.split("_Zooming_ToolBar_")[1].split("_")[0],o=!0;switch(t.toLowerCase()){case"zoomin":o=(this.maps.isTileMap?this.maps.tileZoomLevel:this.maps.scale)+1<=this.maps.zoomSettings.maxZoom;break;case"zoomout":var n=this.maps.isTileMap?this.maps.tileZoomLevel:this.maps.scale,o="Miller"===this.maps.projectionType||"Winkel3"===this.maps.projectionType||"AitOff"===this.maps.projectionType?Math.round(n)-1>=this.maps.zoomSettings.minZoom:n-1>=this.maps.zoomSettings.minZoom;break;case"reset":o=Math.round(this.maps.isTileMap?this.maps.tileZoomLevel:this.maps.scale)!==this.maps.zoomSettings.minZoom}i&&o?(this.handled=!0,this.performZoomingByToolBar(t)):"mousedown"!==e.type&&"pointerdown"!==e.type||this.handled||!o?this.handled=!1:(this.handled=!1,this.performZoomingByToolBar(t))},v.prototype.performZoomingByToolBar=function(e){var t=this.maps,i=(t.isReset=!1,0),o=this.fillColor||this.maps.themeStyle.zoomFillColor;switch(e.toLowerCase()){case"zoom":this.panColor=o,this.zoomColor=this.maps.zoomSettings.enableSelectionZooming?this.selectionColor:o,this.applySelection(this.zoomElements,this.zoomColor),this.applySelection(this.panElements,this.panColor),this.isPan=!1,this.isZoomSelection=this.maps.zoomSettings.enableSelectionZooming;break;case"pan":this.panColor=this.maps.zoomSettings.enablePanning?this.selectionColor:o,this.zoomColor=o,this.maps.zoomSettings.enablePanning?this.applySelection(this.zoomElements,this.fillColor||o):this.applySelection(this.zoomElements,this.selectionColor),this.applySelection(this.panElements,this.panColor),this.isPan=this.maps.zoomSettings.enablePanning,this.isZoomSelection=!1;break;case"zoomin":t.staticMapZoom=t.tileZoomLevel,0<t.staticMapZoom&&t.staticMapZoom<t.zoomSettings.maxZoom&&(t.staticMapZoom+=1),t.isTileMap&&t.tileZoomLevel>=t.zoomSettings.minZoom&&t.tileZoomLevel<t.zoomSettings.maxZoom?this.toolBarZooming(t.tileZoomLevel+1,"ZoomIn"):t.isTileMap||this.toolBarZooming(t.scale+1,"ZoomIn"),i=this.maps.isTileMap?Math.round(this.maps.tileZoomLevel):Math.round(this.maps.mapScaleValue),this.isZoomSelection||(i===t.zoomSettings.maxZoom||1<i||1===i&&this.maps.isTileMap?(this.applySelection(this.zoomElements,o),this.applySelection(this.panElements,t.zoomSettings.enablePanning?this.selectionColor:o)):1!==i||this.maps.isTileMap||(this.applySelection(this.zoomElements,o),this.applySelection(this.panElements,o)));break;case"zoomout":t.staticMapZoom=t.tileZoomLevel,t.markerCenterLatitude=null,t.markerCenterLongitude=null,this.toolBarZooming((t.isTileMap?t.tileZoomLevel:t.scale)-1,"ZoomOut"),i=this.maps.isTileMap?Math.round(this.maps.tileZoomLevel):Math.round(this.maps.mapScaleValue),!this.isPan&&this.isZoomSelection?(this.panColor=o,this.zoomColor=this.selectionColor,this.applySelection(this.zoomElements,this.selectionColor),this.applySelection(this.panElements,this.panColor)):i<=1&&!t.isTileMap?this.applySelection(this.panElements,o):this.applySelection(this.panElements,t.zoomSettings.enablePanning?this.selectionColor:o);break;case"reset":t.staticMapZoom=t.zoomSettings.enable?t.zoomSettings.zoomFactor:0,t.markerCenterLatitude=null,t.markerCenterLongitude=null,this.isZoomSelection=!1,this.isPan=t.zoomSettings.enablePanning,this.toolBarZooming(t.zoomSettings.minZoom,"Reset"),this.isPan&&!this.isZoomSelection||!this.isPan&&this.isZoomSelection?this.maps.zoomSettings.enablePanning?(this.applySelection(this.zoomElements,o),this.applySelection(this.panElements,this.selectionColor)):(this.applySelection(this.zoomElements,this.selectionColor),this.applySelection(this.panElements,o)):this.isPan||this.isZoomSelection||(this.applySelection(this.zoomElements,o),this.applySelection(this.panElements,o))}this.panningStyle(e.toLowerCase())},v.prototype.panningStyle=function(e){var t=N(this.maps.element.id+"_svg");"pan"===e||this.isPanModeEnabled&&"reset"!==e?t.setAttribute("class","e-maps-panning"):t.setAttribute("class","")},v.prototype.applySelection=function(e,t){if(e)for(var i,o=0;o<e.childElementCount;o++)"circle"!==(i=e.childNodes[o]).tagName&&(i.setAttribute("fill",-1<e.id.indexOf("Pan")?t:"transparent"),i.setAttribute("stroke",t))},v.prototype.showTooltip=function(e){var t=e.target.id.split("_Zooming_ToolBar_")[1].split("_")[0],i=this.maps.zoomSettings.toolbarSettings.tooltipSettings,i={visible:i.visible,fill:i.fill,borderOpacity:i.borderOpacity,borderWidth:i.borderWidth,borderColor:i.borderColor,fontColor:i.fontColor,fontFamily:i.fontFamily,fontStyle:i.fontStyle,fontWeight:i.fontWeight,fontSize:i.fontSize||"10px",fontOpacity:i.fontOpacity};i.fontFamily=this.maps.themeStyle.fontFamily,this.isTouch||(xt("EJ2_Map_Toolbar_Tip",this.maps.getLocalizedLabel(t),e.pageY+10,e.pageX+10,i),this.maps.isDevice&&(clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3)))},v.prototype.removeTooltip=function(){N("EJ2_Map_Toolbar_Tip")&&Y.remove(N("EJ2_Map_Toolbar_Tip"))},v.prototype.alignToolBar=function(){var e=this.maps,t=Y.createElement("div",{id:e.element.id+"_ToolBar"}),i=(t.style.cssText="position:absolute;z-index:2",e.renderer.createSvg({id:e.element.id+"_Zooming_ToolBar",width:10,height:10})),o=(i.appendChild(this.toolBarGroup),t.appendChild(i),N(e.element.id+"_Secondary_Element")&&N(e.element.id+"_Secondary_Element").appendChild(t),this.toolBarGroup.getBoundingClientRect()),n=(i.setAttribute("height",(o.height+e.zoomSettings.toolbarSettings.borderWidth).toString()),i.setAttribute("width",(o.width+e.zoomSettings.toolbarSettings.borderWidth).toString()),Y.isNullOrUndefined(e.totalRect)?e.mapAreaRect:e.totalRect),a=0,l=0;switch(e.toolbarProperties.verticalAlignment){case"Near":l=n.y;break;case"Center":l=n.height/2-o.height/2;break;case"Far":l=n.height-o.height-10}switch(e.toolbarProperties.horizontalAlignment){case"Near":a=n.x;break;case"Center":a=n.width/2-o.width/2;break;case"Far":a=Y.isNullOrUndefined(e.legendModule)||"Left"!==e.legendSettings.position?n.width-o.width-10:n.width+n.x-o.width-10}t.style.left=a+"px",t.style.top=l+"px";var i=this.maps.toolbarProperties.highlightColor||this.maps.themeStyle.zoomSelectionColor,i=" .e-maps-toolbar:hover > circle { stroke:"+i+"; } .e-maps-toolbar:hover > path { fill: "+i+" ; stroke: "+i+"; }.e-maps-toolbar:hover { cursor: pointer; } .e-maps-cursor-disable:hover { cursor: not-allowed; } .e-maps-panning:hover { cursor: pointer; } .e-maps-popup-close { display: block; opacity: 0; }",r=document.createElement("style");r.appendChild(document.createTextNode(i)),t.appendChild(r)},v.prototype.removeToolbarOpacity=function(e,t){var i;!Y.isNullOrUndefined(this.maps)&&this.maps.zoomModule&&this.maps.zoomSettings.enable&&(N(this.maps.element.id+"_Zooming_KitCollection")&&-1<t.indexOf(this.maps.element.id+"_Zooming_")?(this.maps.isDevice?(N(this.maps.element.id+"_Zooming_KitCollection").setAttribute("opacity","1"),this.removeToolbarClass("","","","","")):this.removeToolbarClass(this.maps.zoomSettings.enableSelectionZooming?"e-maps-toolbar":"","e-maps-toolbar","e-maps-toolbar",this.maps.zoomSettings.enablePanning?"e-maps-toolbar":"","e-maps-toolbar"),t=this.maps.toolbarProperties.shapeOpacity,i=this.maps.toolbarProperties.borderOpacity,this.maps.isTileMap&&(e<=1.1||this.maps.zoomSettings.minZoom===e)?(this.maps.isDevice||this.removeToolbarClass(this.maps.zoomSettings.enableSelectionZooming?"e-maps-toolbar":"","e-maps-toolbar","",this.maps.zoomSettings.enablePanning?"e-maps-toolbar":"",""),this.maps.zoomSettings.enablePanning&&this.removePanColor(this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor),this.isZoomSelection&&this.maps.zoomSettings.enableSelectionZooming&&!this.maps.isReset&&(this.removeZoomColor(this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor),this.removePanColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor)),this.removeZoomOpacity(this.maps.zoomSettings.enableSelectionZooming?t:.3,this.maps.zoomSettings.enableSelectionZooming?i:.3,t,i,.3,.3,this.maps.zoomSettings.enablePanning?t:.3,this.maps.zoomSettings.enablePanning?i:.3,.3,.3)):e<=1.1||this.maps.zoomSettings.minZoom===e?(this.maps.isDevice||this.removeToolbarClass(this.maps.zoomSettings.enableSelectionZooming?"e-maps-toolbar":"","e-maps-toolbar","","",""),!this.isZoomSelection&&this.maps.zoomSettings.enablePanning&&this.removePanColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor),this.isZoomSelection&&this.maps.zoomSettings.enableSelectionZooming&&!this.maps.isReset&&(this.removeZoomColor(this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor),this.removePanColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor)),this.removeZoomOpacity(this.maps.zoomSettings.enableSelectionZooming?t:.3,this.maps.zoomSettings.enableSelectionZooming?i:.3,t,i,.3,.3,.3,.3,.3,.3)):e<this.maps.zoomSettings.maxZoom?(this.maps.isDevice||this.removeToolbarClass(this.maps.zoomSettings.enableSelectionZooming?"e-maps-toolbar":"","e-maps-toolbar","e-maps-toolbar",this.maps.zoomSettings.enablePanning?"e-maps-toolbar":"","e-maps-toolbar"),this.maps.zoomModule.isZoomFinal?this.maps.zoomModule.isZoomFinal=!1:this.removeZoomOpacity(this.maps.zoomSettings.enableSelectionZooming?t:.3,this.maps.zoomSettings.enableSelectionZooming?i:.3,t,i,t,i,this.maps.zoomSettings.enablePanning?t:.3,this.maps.zoomSettings.enablePanning?i:.3,t,i),this.isZoomSelection&&this.maps.zoomSettings.enableSelectionZooming?(this.removeZoomColor(this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor),this.maps.zoomModule.isPan&&this.maps.zoomSettings.enablePanning&&this.removePanColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor)):!this.isZoomSelection&&this.maps.zoomSettings.enablePanning&&(this.removePanColor(this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor),this.maps.zoomSettings.enableSelectionZooming)&&this.removeZoomColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor)):(this.maps.isDevice||this.removeToolbarClass("","","e-maps-toolbar",this.maps.zoomSettings.enablePanning?"e-maps-toolbar":"","e-maps-toolbar"),this.removeZoomOpacity(.3,.3,.3,.3,t,i,this.maps.zoomSettings.enablePanning?t:.3,this.maps.zoomSettings.enablePanning?i:.3,t,i),this.maps.zoomSettings.enableSelectionZooming&&this.removeZoomColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor),!this.isZoomSelection&&this.maps.zoomSettings.enablePanning&&this.removePanColor(this.maps.toolbarProperties.selectionColor||this.maps.themeStyle.zoomSelectionColor))):this.maps.isDevice||(this.removePanColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor),this.removeZoomColor(this.maps.toolbarProperties.color||this.maps.themeStyle.zoomFillColor),this.removeZoomOpacity(1,1,1,1,1,1,1,1,1,1)))},v.prototype.setOpacity=function(e,t,i,o){N(this.maps.element.id+e)&&(N(this.maps.element.id+e).setAttribute("stroke-opacity",i.toString()),N(this.maps.element.id+e).setAttribute("fill-opacity",i.toString()),N(this.maps.element.id+t).setAttribute("stroke-opacity",o.toString()),N(this.maps.element.id+t).setAttribute("fill-opacity",o.toString()))},v.prototype.removeZoomOpacity=function(e,t,i,o,n,a,l,r,s,d){this.setOpacity("_Zooming_ToolBar_Zoom_Rect","_Zooming_ToolBar_Zoom",t,e),this.setOpacity("_Zooming_ToolBar_ZoomIn_Rect","_Zooming_ToolBar_ZoomIn_Path",o,i),this.setOpacity("_Zooming_ToolBar_ZoomOut_Rect","_Zooming_ToolBar_ZoomOut",a,n),this.setOpacity("_Zooming_ToolBar_Pan_Rect","_Zooming_ToolBar_Pan",r,l),this.setOpacity("_Zooming_ToolBar_Reset_Rect","_Zooming_ToolBar_Reset",d,s)},v.prototype.removeToolbarClass=function(e,t,i,o,n){N(this.maps.element.id+"_Zooming_KitCollection")&&(document.getElementById(this.maps.element.id+"_Zooming_ToolBar_ZoomIn_Group")&&N(this.maps.element.id+"_Zooming_ToolBar_ZoomIn_Group").setAttribute("class",t),document.getElementById(this.maps.element.id+"_Zooming_ToolBar_ZoomOut_Group")&&N(this.maps.element.id+"_Zooming_ToolBar_ZoomOut_Group").setAttribute("class",i),document.getElementById(this.maps.element.id+"_Zooming_ToolBar_Reset_Group")&&N(this.maps.element.id+"_Zooming_ToolBar_Reset_Group").setAttribute("class",n),document.getElementById(this.maps.element.id+"_Zooming_ToolBar_Zoom_Group")&&this.maps.zoomSettings.enableSelectionZooming&&N(this.maps.element.id+"_Zooming_ToolBar_Zoom_Group").setAttribute("class",e),document.getElementById(this.maps.element.id+"_Zooming_ToolBar_Pan_Group"))&&this.maps.zoomSettings.enablePanning&&N(this.maps.element.id+"_Zooming_ToolBar_Pan_Group").setAttribute("class",o)},v.prototype.removePanColor=function(e){N(this.maps.element.id+"_Zooming_ToolBar_Pan_Rect")&&this.maps.zoomSettings.enablePanning&&(N(this.maps.element.id+"_Zooming_ToolBar_Pan").setAttribute("fill",e),N(this.maps.element.id+"_Zooming_ToolBar_Pan").setAttribute("stroke",e))},v.prototype.removeZoomColor=function(e){N(this.maps.element.id+"_Zooming_ToolBar_Zoom_Rect")&&this.maps.zoomSettings.enableSelectionZooming&&(N(this.maps.element.id+"_Zooming_ToolBar_Zoom").setAttribute("fill","transparent"),N(this.maps.element.id+"_Zooming_ToolBar_Zoom").setAttribute("stroke",e))},v.prototype.wireEvents=function(e,t){Y.EventHandler.add(e,Y.Browser.touchStartEvent,t,this),Y.EventHandler.add(e,"mouseover",this.showTooltip,this),Y.EventHandler.add(e,"mouseout",this.removeTooltip,this)},v.prototype.mapMouseWheel=function(e){var t,i,o,n,a;this.maps.zoomSettings.enable&&this.maps.zoomSettings.mouseWheelZoom&&((t=this.maps).markerZoomedState=!1,t.zoomPersistence=t.enablePersistence,i=this.getMousePosition(e.pageX,e.pageY),n=t.tileZoomLevel,a=t.scale,o=t.zoomSettings.maxZoom,n=t.isTileMap?n:a,i.x>t.mapAreaRect.x&&i.x<t.mapAreaRect.x+t.mapAreaRect.width&&i.y>t.mapAreaRect.y&&i.y<t.mapAreaRect.y+t.mapAreaRect.height&&(e.preventDefault(),"ZoomIn"==(a="mozilla"!==this.browserName||this.isPointer?0<e.wheelDelta/120?"ZoomIn":"ZoomOut":0<-e.detail/3?"ZoomIn":"ZoomOut")?(t.mapScaleValue=n+1,t.isTileMap?(t.staticMapZoom=t.tileZoomLevel,0<t.staticMapZoom&&t.staticMapZoom<o&&(t.staticMapZoom+=1,this.performZooming(i,n+1,a))):this.performZooming(i,n+1,a)):(t.mapScaleValue=n-1,t.isReset=t.mapScaleValue<1,t.staticMapZoom=t.tileZoomLevel,1===t.mapScaleValue&&(t.markerCenterLatitude=null,t.markerCenterLongitude=null),1<t.staticMapZoom&&t.staticMapZoom<o&&--t.staticMapZoom,this.performZooming(i,n-1,a))),this.removeToolbarOpacity(t.mapScaleValue,this.maps.isDevice?this.maps.element.id+"_Zooming_":(Y.isNullOrUndefined(e.target)?this.maps.element:e.target).id))},v.prototype.doubleClick=function(e){var t=e.pageX,i=e.pageY,o=e.target.closest("#"+this.maps.element.id+"_mapsTooltipparent_template");this.maps.zoomSettings.enable&&this.maps.zoomSettings.doubleClickZoom&&!(-1<e.target.id.indexOf("_Zooming_"))&&Y.isNullOrUndefined(o)&&(e=this.getMousePosition(t,i),t=(o=this.maps).tileZoomLevel,i=o.scale,o.mapScaleValue=o.mapScaleValue+1,t=o.isTileMap?t:i,e.x>o.mapAreaRect.x)&&e.x<o.mapAreaRect.x+o.mapAreaRect.width&&e.y>o.mapAreaRect.y&&e.y<o.mapAreaRect.y+o.mapAreaRect.height&&this.performZooming(e,t+1,"ZoomIn")},v.prototype.mouseDownHandler=function(e){var t,i,o=null,e=(e.target,"touchstart"===e.type?(this.isTouch=!0,o=e.touches,e.target,t=o[0].pageX,i=o[0].pageY):(t=e.pageX,i=e.pageY,e.target),this.isTouch||e.preventDefault(),this.maps.zoomSettings.enablePanning?this.isPan=this.isPanModeEnabled=!this.isZoomSelection:this.isPan=this.isPanModeEnabled=this.panColor!==this.selectionColor?this.maps.zoomSettings.enablePanning:this.zoomColor===this.selectionColor,this.mouseDownLatLong={x:t,y:i},this.maps.isTileMap?Math.round(this.maps.tileZoomLevel):Math.round(this.maps.mapScaleValue));this.rectZoomingStart=this.isZoomSelection&&e<this.maps.zoomSettings.maxZoom&&this.maps.zoomSettings.enable,this.mouseDownPoints=this.getMousePosition(t,i),this.isTouch&&null!==o&&(this.firstMove=!0,this.pinchFactor=this.maps.scale,this.fingers=o.length),this.isSingleClick=!0},v.prototype.mouseMoveHandler=function(e){var t,i,o,n=this.maps,a=null,l=this.maps.zoomSettings;"touchmove"===e.type?(this.isTouch=!0,o=e.target,t=(a=e.touches)[0].pageX,i=a[0].pageY):(t=e.pageX,i=e.pageY,o=e.target),N(n.element.id+"_Zooming_KitCollection")&&(-1<o.id.indexOf("_Zooming_")?N(n.element.id+"_Zooming_KitCollection").setAttribute("opacity","1"):n.isDevice||N(n.element.id+"_Zooming_KitCollection").setAttribute("opacity","fluentdark"===n.theme.toLowerCase()?"0.6":"0.3")),this.isTouch&&this.maps.zoomSettings.pinchZooming&&null!==a&&(this.firstMove&&2===a.length?(this.rectZoomingStart=!1,this.updateInteraction(),this.touchStartList=wt(e)):2===a.length&&2===this.touchStartList.length&&(this.touchMoveList=wt(e),e.preventDefault(),this.rectZoomingStart=!1,this.performPinchZooming(e)),this.firstMove=!1),this.mouseMovePoints=this.getMousePosition(t,i),l.enable&&this.isPanModeEnabled&&-1===this.maps.markerDragId.indexOf("_MarkerIndex_")&&(Y.Browser.isDevice&&1<=a.length||!Y.Browser.isDevice)&&(e.preventDefault(),this.maps.element.style.cursor="pointer",this.mouseMoveLatLong={x:t,y:i},this.mouseDownLatLong.x!==this.mouseMoveLatLong.x)&&this.mouseDownLatLong.y!==this.mouseMoveLatLong.y&&(this.maps.zoomSettings.enablePanning&&this.panning("None",null,null,e),this.mouseDownLatLong.x=t,this.mouseDownLatLong.y=i),(!this.isTouch||null!==a&&1===a.length)&&this.rectZoomingStart&&(e.preventDefault(),o=this.maps.isTileMap?Math.round(this.maps.tileZoomLevel):Math.round(this.maps.mapScaleValue),this.maps.zoomSettings.enableSelectionZooming&&o<this.maps.zoomSettings.maxZoom?this.drawZoomRectangle():(this.rectZoomingStart=!1,this.isPan=!0))},v.prototype.mouseUpHandler=function(e){this.rectZoomingStart=!1,this.isSingleClick=!!this.isSingleClick,this.isTouch=!1,this.touchStartList=[],this.touchMoveList=[],this.lastScale=1,this.maps.element.style.cursor="auto",this.isPanModeEnabled&&this.maps.zoomSettings.enablePanning&&!Y.isNullOrUndefined(this.maps.previousPoint)&&(this.maps.isTileMap?this.isPanningInProgress:this.maps.translatePoint.x!==this.maps.previousPoint.x&&this.maps.translatePoint.y!==this.maps.previousPoint.y)&&(o=t=void 0,a=l=0,i=e.target,e=void(-1!==e.type.indexOf("touch")?(l=t=e.changedTouches[0].pageX,a=(o=e.changedTouches[0].pageY)-(this.maps.isTileMap?10:0),e.target,this.maps.mouseClickEvent={x:t,y:o}):(t=e.pageX,o=e.pageY,l=e.layerX,a=e.layerY-(this.maps.isTileMap?10:0),e.target)),n=this.maps.getMinMaxLatitudeLongitude(),e=this.maps.isTileMap?(l=this.maps.getTileGeoLocation(l,a),{cancel:!1,name:"panComplete",maps:this.maps,tileTranslatePoint:{previous:this.maps.tileTranslatePoint,current:this.maps.tileTranslatePoint},translatePoint:{previous:this.maps.previousPoint,current:this.maps.translatePoint},scale:this.maps.scale,tileZoomLevel:this.maps.tileZoomLevel,latitude:l.latitude,longitude:l.longitude,minLatitude:n.minLatitude,maxLatitude:n.maxLatitude,minLongitude:n.minLongitude,maxLongitude:n.maxLongitude}):(this.maps.mouseClickEvent.x=this.maps.mouseDownEvent.x,this.maps.mouseClickEvent.y=this.maps.mouseDownEvent.y,a=this.maps.getClickLocation(i.id,t,o,i,t,o),{cancel:!1,name:"panComplete",maps:this.maps,tileTranslatePoint:{},translatePoint:{previous:this.maps.previousPoint,current:this.maps.translatePoint},scale:this.maps.scale,tileZoomLevel:this.maps.tileZoomLevel,latitude:Y.isNullOrUndefined(a)?0:a.latitude,longitude:Y.isNullOrUndefined(a)?0:a.longitude,minLatitude:n.minLatitude,maxLatitude:n.maxLatitude,minLongitude:n.minLongitude,maxLongitude:n.maxLongitude}),this.maps.trigger("panComplete",e)),this.isPanModeEnabled=!1,this.isPanningInProgress=!1;var t,i,o,n,a,l=N(this.maps.element.id+"_Selection_Rect_Zooming");l&&this.maps.zoomSettings.enable&&this.maps.zoomSettings.enableSelectionZooming&&(Y.remove(l),this.performRectZooming()),this.mouseMoveLatLong={x:0,y:0},this.mouseDownLatLong={x:0,y:0},this.pinchDistance=null},v.prototype.mouseCancelHandler=function(e){this.isPanModeEnabled=!1,this.isTouch=!1,this.rectZoomingStart=!1;var t=N(this.maps.element.id+"_Selection_Rect_Zooming");t&&this.maps.zoomSettings.enable&&(Y.remove(t),this.performRectZooming())},v.prototype.click=function(e){var t,i=this.maps,o=e.target.closest("#"+this.maps.element.id+"_mapsTooltipparent_template");if(i.markerModule&&0<i.markerModule.sameMarkerData.length||-1<e.target.id.indexOf("MarkerIndex")&&-1===e.target.id.indexOf("cluster")||!Y.isNullOrUndefined(o))return null;!this.isSingleClick||!i.zoomSettings.zoomOnClick||-1<e.target.id.indexOf("_Zooming_")||i.zoomSettings.doubleClickZoom||this.zoomColor===this.selectionColor||(o=e.pageX,e=e.pageY,o=this.getMousePosition(o,e),e=i.tileZoomLevel,t=i.scale,i.mapScaleValue=i.mapScaleValue+1,e=i.isTileMap?e:t,o.x>i.mapAreaRect.x&&o.x<i.mapAreaRect.x+i.mapAreaRect.width&&o.y>i.mapAreaRect.y&&o.y<i.mapAreaRect.y+i.mapAreaRect.height&&this.performZooming(o,e+1,"ZoomIn"))},v.prototype.getMousePosition=function(e,t){var i=this.maps,o=i.element.getBoundingClientRect(),n=i.element.ownerDocument.defaultView.pageXOffset,a=i.element.ownerDocument.defaultView.pageYOffset,l=i.element.ownerDocument.documentElement.clientTop,i=i.element.ownerDocument.documentElement.clientLeft,n=o.left+n-i,i=o.top+a-l;return new J(Math.abs(e-n),Math.abs(t-i))},v.prototype.addEventListener=function(){this.maps.isDestroyed||(Y.EventHandler.add(this.maps.element,this.wheelEvent,this.mapMouseWheel,this),Y.EventHandler.add(this.maps.element,"click",this.click,this),Y.EventHandler.add(this.maps.element,"dblclick",this.doubleClick,this),this.maps.on(Y.Browser.touchMoveEvent,this.mouseMoveHandler,this),this.maps.on(Y.Browser.touchStartEvent,this.mouseDownHandler,this),this.maps.on(Y.Browser.touchEndEvent,this.mouseUpHandler,this),Y.EventHandler.add(this.maps.element,this.cancelEvent,this.mouseCancelHandler,this))},v.prototype.removeEventListener=function(){this.maps.isDestroyed||(Y.EventHandler.remove(this.maps.element,this.wheelEvent,this.mapMouseWheel),Y.EventHandler.remove(this.maps.element,"click",this.click),Y.EventHandler.remove(this.maps.element,"dblclick",this.doubleClick),this.maps.off(Y.Browser.touchMoveEvent,this.mouseMoveHandler),this.maps.off(Y.Browser.touchStartEvent,this.mouseDownHandler),this.maps.off(Y.Browser.touchEndEvent,this.mouseUpHandler),Y.EventHandler.remove(this.maps.element,this.cancelEvent,this.mouseCancelHandler))},v.prototype.getModuleName=function(){return"Zoom"},v.prototype.destroy=function(){this.toolBarGroup=null,this.currentToolbarEle=null,this.zoomingRect=null,this.zoomElements=null,this.panElements=null,this.baseTranslatePoint=null,this.touchStartList=null,this.touchMoveList=null,this.previousTouchMoveList=null,this.mouseDownPoints=null,this.mouseMovePoints=null,this.startTouches=[],this.mouseDownLatLong=null,this.mouseMoveLatLong=null,this.removeEventListener(),this.layerCollectionEle=null,this.currentLayer=null,this.pinchDistance=null,this.maps=null};var Tn=v;function v(e){this.isPanModeEnabled=!1,this.mouseEnter=!1,this.isTouch=!1,this.rectZoomingStart=!1,this.browserName=Y.Browser.info.name,this.isPointer=Y.Browser.isPointer,this.handled=!1,this.isPanningInProgress=!1,this.isPan=!1,this.isZoomFinal=!1,this.isZoomSelection=!1,this.pinchFactor=1,this.startTouches=[],this.mouseDownLatLong={x:0,y:0},this.mouseMoveLatLong={x:0,y:0},this.isSingleClick=!1,this.maps=e,this.wheelEvent="mozilla"!==this.browserName||this.isPointer?"mousewheel":"DOMMouseScroll",this.cancelEvent=this.isPointer?"pointerleave":"mouseleave",this.selectionColor=this.maps.zoomSettings.toolbarSettings.buttonSettings.selectionColor,this.fillColor=this.maps.zoomSettings.toolbarSettings.buttonSettings.color,this.addEventListener()}kn.prototype.print=function(e,t){var i=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth+",tabbar=no"),o=(i.moveTo(0,0),i.resizeTo(screen.availWidth,screen.availHeight),{cancel:!1,htmlContent:this.getHTMLContent(e,t),name:on});e.trigger("beforePrint",o,function(e){o.cancel||Y.print(o.htmlContent,i)})},kn.prototype.getHTMLContent=function(e,t){var i,o=Y.createElement("div"),n=e.element.cloneNode(!0),a=e.isTileMap?n.getElementsByTagName("svg")[1]:n.getElementsByTagName("svg")[0];if(Y.isNullOrUndefined(a)||(a=a.childNodes[0],Y.isNullOrUndefined(a))||(i=a.getAttribute("fill"),"Tailwind"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme&&"Fluent2"!==e.theme||"rgba(255,255,255, 0.0)"!==i&&"transparent"!==i?"TailwindDark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme&&"Fluent2Dark"!==e.theme&&"Fluent2HighContrast"!==e.theme||"rgba(255,255,255, 0.0)"!==i&&"transparent"!==i||a.setAttribute("fill","rgba(0, 0, 0, 1)"):a.setAttribute("fill","rgba(255,255,255, 1)")),e.isTileMap)for(var l=0;l<n.childElementCount;l++)if(n.children[l].id===e.element.id+"_tile_parent"){n.children[l].style.removeProperty("height"),n.children[l].style.removeProperty("width"),n.children[l].style.removeProperty("top"),n.children[l].style.removeProperty("left"),n.children[l].style.removeProperty("right"),n.children[l].style.removeProperty("overflow");var r=document.getElementById(e.element.id+"_Tile_SVG_Parent");n.children[l].children[0].style.overflow="hidden",n.children[l].children[0].style.position="absolute",n.children[l].children[0].style.height=r.style.height,n.children[l].children[0].style.width=r.style.width,n.children[l].children[0].style.left=r.style.left,n.children[l].children[0].style.top=r.style.top;break}return t?t instanceof Array?Array.prototype.forEach.call(t,function(e){o.appendChild(F(e).cloneNode(!0))}):t instanceof Element?o.appendChild(t.cloneNode(!0)):o.appendChild(F(t).cloneNode(!0)):o.appendChild(n),o},kn.prototype.getModuleName=function(){return"Print"},kn.prototype.destroy=function(){};var In=kn;function kn(e){}Fn.prototype.export=function(f,b,S,v){return new Promise(function(n,e){var a,l=Y.createElement("canvas",{id:"ej2-canvas",attrs:{width:f.availableSize.width.toString(),height:f.availableSize.height.toString()}}),r=!(-1<Y.Browser.userAgent.toString().indexOf("HeadlessChrome")),s=document.getElementById(f.element.id+"_Tile_SVG_Parent"),t=N(f.element.id+"_svg").cloneNode(!0),d=t.childNodes[0].getAttribute("fill"),p=("Tailwind"!==f.theme&&"Bootstrap5"!==f.theme&&"Fluent"!==f.theme&&"Material3"!==f.theme&&"Fluent2"!==f.theme||"rgba(255,255,255, 0.0)"!==d&&"transparent"!==d?"TailwindDark"!==f.theme&&"Bootstrap5Dark"!==f.theme&&"FluentDark"!==f.theme&&"Material3Dark"!==f.theme&&"Fluent2Dark"!==f.theme&&"Fluent2HighContrast"!==f.theme||"rgba(255,255,255, 0.0)"!==d&&"transparent"!==d||t.childNodes[0].setAttribute("fill","rgba(0, 0, 0, 1)"):t.childNodes[0].setAttribute("fill","rgba(255,255,255, 1)"),o=f.isTileMap?(a=N(f.element.id+"_Tile_SVG").cloneNode(!0),'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+t.outerHTML+a.outerHTML+"</svg>"):'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+t.outerHTML+"</svg>",window.URL.createObjectURL(new Blob("SVG"===b?[o]:[(new XMLSerializer).serializeToString(t)],{type:"image/svg+xml"})));if("SVG"===b)v?ie(S,b,p,r):n(null);else{var i=new Image,h=l.getContext("2d");if(f.isTileMap){f.isExportInitialTileMap=!0;for(var o=document.getElementById(f.element.id+"_MapAreaBorder"),m=parseFloat(o.getAttribute("y")),c=parseFloat(o.getAttribute("x")),u=new XMLHttpRequest,g=f.mapLayerPanel.tiles.length,y=0;y<=g+1;y++)!function(t){var i=document.getElementById(f.element.id+"_tile_"+(t-1)),o=new Image,e=(o.crossOrigin="Anonymous",f.background||(!("Tailwind"!==f.theme&&"Bootstrap5"!==f.theme&&"Fluent"!==f.theme&&"Material3"!==f.theme||"rgba(255,255,255, 0.0)"!==d&&"transparent"!==d)||"TailwindDark"!==f.theme&&"Bootstrap5Dark"!==f.theme&&"FluentDark"!==f.theme&&"Material3Dark"!==f.theme||"rgba(255,255,255, 0.0)"!==d&&"transparent"!==d?"#ffffff":"#000000")),e=(h.fillStyle=e,h.fillRect(0,0,f.availableSize.width,f.availableSize.height),h.font=f.titleSettings.textStyle.size+" Arial",document.getElementById(f.element.id+"_Map_title"));Y.isNullOrUndefined(e)||(h.fillStyle=e.getAttribute("fill"),h.fillText(f.titleSettings.text,parseFloat(e.getAttribute("x")),parseFloat(e.getAttribute("y")))),o.onload=function(){var e;0===t||t===g+1?0===t?(h.setTransform(1,0,0,1,0,0),h.rect(0,m,parseFloat(s.style.width),parseFloat(s.style.height)),h.clip()):h.setTransform(1,0,0,1,c,m):h.setTransform(1,0,0,1,parseFloat(i.style.left)+c,parseFloat(i.style.top)+m),h.drawImage(o,0,0),t===g+1&&(localStorage.setItem("local-canvasImage",l.toDataURL("image/png")),e=localStorage.getItem("local-canvasImage"),v?(ie(S,b,e,r),localStorage.removeItem("local-canvasImage"),f.isExportInitialTileMap=!1):(f.isExportInitialTileMap=!1,"PNG"===b?n(e):"JPEG"===b&&n(l.toDataURL("image/jpeg"))))},0===t||t===g+1?0===t?o.src=p:setTimeout(function(){o.src=window.URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(a)],{type:"image/svg+xml"}))},300):(u.open("GET",i.children[0].getAttribute("src"),!0),u.send(),o.src=i.children[0].getAttribute("src"))}(y)}else i.onload=function(){h.drawImage(i,0,0),window.URL.revokeObjectURL(p),v?ie(S,b,l.toDataURL("image/png").replace("image/png","image/octet-stream"),r):"PNG"===b?n(l.toDataURL("image/png")):"JPEG"===b&&n(l.toDataURL("image/jpeg"))},i.src=p}})},Fn.prototype.getModuleName=function(){return"ImageExport"},Fn.prototype.destroy=function(){};var Nn=Fn;function Fn(e){}zn.prototype.export=function(g,y,f,b,S){return new Promise(function(n){g.isTileMap&&(g.isExportInitialTileMap=!0);var a=Y.createElement("canvas",{id:"ej2-canvas",attrs:{width:g.availableSize.width.toString(),height:g.availableSize.height.toString()}}),l=(S=Y.isNullOrUndefined(S)?_.PdfPageOrientation.Landscape:S,document.getElementById(g.element.id+"_Tile_SVG_Parent")),e=g.svgObject.cloneNode(!0),r=e.childNodes[0].getAttribute("fill"),s=("Tailwind"!==g.theme&&"Bootstrap5"!==g.theme&&"Fluent"!==g.theme&&"Material3"!==g.theme&&"Fluent2"!==g.theme||"rgba(255,255,255, 0.0)"!==r&&"transparent"!==r?"TailwindDark"!==g.theme&&"Bootstrap5Dark"!==g.theme&&"FluentDark"!==g.theme&&"Material3Dark"!==g.theme&&"Fluent2Dark"!==g.theme&&"Fluent2HighContrast"!==g.theme||"rgba(255,255,255, 0.0)"!==r&&"transparent"!==r||e.childNodes[0].setAttribute("fill","rgba(0, 0, 0, 1)"):e.childNodes[0].setAttribute("fill","rgba(255,255,255, 1)"),window.URL.createObjectURL(new Blob("SVG"===y?[void 0]:[(new XMLSerializer).serializeToString(e)],{type:"image/svg+xml"}))),d=new _.PdfDocument,t=new Image,p=a.getContext("2d");if(g.isTileMap)for(var e=document.getElementById(g.element.id+"_MapAreaBorder"),h=parseFloat(e.getAttribute("y")),m=parseFloat(e.getAttribute("x")),c=new XMLHttpRequest,u=g.mapLayerPanel.tiles.length,i=0;i<=u+1;i++)!function(t){var i=document.getElementById(g.element.id+"_tile_"+(t-1)),o=new Image,e=(o.crossOrigin="Anonymous",g.background||(!("Tailwind"!==g.theme&&"Bootstrap5"!==g.theme&&"Fluent"!==g.theme&&"Material3"!==g.theme||"rgba(255,255,255, 0.0)"!==r&&"transparent"!==r)||"TailwindDark"!==g.theme&&"Bootstrap5Dark"!==g.theme&&"FluentDark"!==g.theme&&"Material3Dark"!==g.theme||"rgba(255,255,255, 0.0)"!==r&&"transparent"!==r?"#ffffff":"#000000")),e=(p.fillStyle=e,p.fillRect(0,0,g.availableSize.width,g.availableSize.height),p.font=g.titleSettings.textStyle.size+" Arial",document.getElementById(g.element.id+"_Map_title"));Y.isNullOrUndefined(e)||(p.fillStyle=e.getAttribute("fill"),p.fillText(g.titleSettings.text,parseFloat(e.getAttribute("x")),parseFloat(e.getAttribute("y")))),o.onload=function(){var e;0===t||t===u+1?0===t?(p.setTransform(1,0,0,1,0,0),p.rect(0,h,parseFloat(l.style.width),parseFloat(l.style.height)),p.clip()):p.setTransform(1,0,0,1,m,h):p.setTransform(1,0,0,1,parseFloat(i.style.left)+m,parseFloat(i.style.top)+h),p.drawImage(o,0,0),t===u+1&&"PDF"===y&&(localStorage.setItem("saved-image-example",a.toDataURL("image/jpeg")),e=localStorage.getItem("saved-image-example"),d.pageSettings.orientation=S,e=e.slice(e.indexOf(",")+1),d.pages.add().graphics.drawImage(new _.PdfBitmap(e),0,0,g.availableSize.width-60,g.availableSize.height),g.isExportInitialTileMap=!1,b?(d.save(f+".pdf"),d.destroy()):n(null))},0===t||t===u+1?0===t?o.src=s:setTimeout(function(){var e=document.getElementById(g.element.id+"_Tile_SVG");o.src=window.URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(e)],{type:"image/svg+xml"}))},300):(c.open("GET",i.children[0].getAttribute("src"),!0),c.send(),o.src=i.children[0].getAttribute("src"))}(i);else t.onload=function(){var e;p.drawImage(t,0,0),window.URL.revokeObjectURL(s),"PDF"===y&&(e=a.toDataURL("image/jpeg").replace("image/jpeg","image/octet-stream"),d.pageSettings.orientation=S,e=e.slice(e.indexOf(",")+1),d.pages.add().graphics.drawImage(new _.PdfBitmap(e),0,0,g.availableSize.width-60,g.availableSize.height),b?(d.save(f+".pdf"),d.destroy()):n(null))},t.src=s})},zn.prototype.getModuleName=function(){return"PdfExport"},zn.prototype.destroy=function(){};var En=zn;function zn(){}e.Annotation=Gt,e.Annotations=pn,e.Arrow=Xt,e.BingMap=an,e.Border=a,e.Bubble=y,e.BubbleSettings=Ki,e.CenterPosition=si,e.CircleOption=me,e.ColorMapping=rn,e.ColorMappingSettings=wi,e.ColorValue=de,e.CommonTitleSettings=eo,e.ConnectorLineSettings=vi,e.Coordinate=oe,e.DataLabel=bn,e.DataLabelSettings=fo,e.Font=Jt,e.GeoLocation=ae,e.Highlight=Cn,e.HighlightSettings=Zi,e.ImageExport=Nn,e.InitialMarkerSelectionSettings=ki,e.InitialShapeSelectionSettings=Ei,e.Internalize=st,e.LayerPanel=dn,e.LayerSettings=Lo,e.Legend=On,e.LegendSettings=go,e.Line=Oe,e.LineOption=L,e.MapAjax=Bt,e.MapLocation=T,e.Maps=i,e.MapsAreaSettings=t,e.MapsTooltip=Pn,e.Margin=fi,e.Marker=gn,e.MarkerBase=xo,e.MarkerClusterData=Mi,e.MarkerClusterSettings=Ci,e.MarkerSettings=Co,e.MinMax=ne,e.NavigationLine=vn,e.NavigationLineSettings=Yi,e.PathOption=A,e.PatternOptions=Ce,e.PdfExport=En,e.Point=J,e.Polygon=yn,e.PolygonOption=ge,e.PolygonSetting=Vi,e.PolygonSettings=Wi,e.PolygonTooltipSettings=ui,e.PolylineOption=be,e.Print=In,e.Rect=K,e.RectOption=Q,e.Selection=Mn,e.SelectionSettings=Ai,e.ShapeSettings=So,e.Size=H,e.SubTitleSettings=oo,e.TextOption=se,e.Tile=wo,e.TitleSettings=lo,e.ToggleLegendSettings=mo,e.TooltipSettings=hi,e.Zoom=Tn,e.ZoomSettings=po,e.ZoomToolbarButtonSettings=$t,e.ZoomToolbarSettings=oi,e.ZoomToolbarTooltipSettings=ti,e.acos=ee,e.aitoff=X,e.animate=zt,e.animationComplete=Qo,e.annotationRendering=$o,e.appendShape=s,e.beforePrint=on,e.bubbleClick=Yo,e.bubbleMouseMove=Jo,e.bubbleRendering=qo,e.calculateBound=te,e.calculateCenterFromPixel=ot,e.calculatePolygonPath=D,e.calculateScale=Tt,e.calculateShapes=Xe,e.calculateSize=I,e.calculateZoomLevel=Zt,e.changeBorderWidth=Lt,e.changeNavaigationLineWidth=Pt,e.checkPropertyPath=Je,e.checkShapeDataFields=Ye,e.click=Io,e.clusterSeparate=je,e.clusterTemplate=ze,e.compareZoomFactor=jt,e.convertElement=Me,e.convertElementFromLabel=we,e.convertGeoToPoint=B,e.convertStringToValue=Pe,e.convertTileLatLongToPoint=R,e.createStyle=ut,e.createSvg=z,e.createTooltip=xt,e.customizeStyle=gt,e.dataLabelRendering=Xo,e.degreesToRadians=j,e.doubleClick=Fo,e.drawBalloon=qe,e.drawCircle=He,e.drawCross=function(e,t,i,o,n){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+o.x+" "+(o.y+i.height/2)+" M "+(o.x-i.width/2)+" "+o.y+" L "+(o.x+i.width/2)+" "+o.y,s(e.renderer.drawPath(t),n)},e.drawDiamond=function(e,t,i,o,n){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+(o.x+i.width/2)+" "+o.y+" L "+o.x+" "+(o.y+i.height/2)+" L "+(o.x-i.width/2)+" "+o.y+" Z",s(e.renderer.drawPath(t),n)},e.drawHorizontalLine=function(e,t,i,o,n){return t.d=" M "+(o.x-i.width/2)+" "+o.y+" L "+(o.x+i.width/2)+" "+o.y,s(e.renderer.drawPath(t),n)},e.drawLine=function(e,t,i){return s(e.renderer.drawLine(t),i)},e.drawPath=function(e,t,i){return s(e.renderer.drawPath(t),i)},e.drawPattern=function(e,t,i,o){for(var n=e.renderer.createPattern(t,"pattern"),a=0,l=i;a<l.length;a++)s(l[a],n);return s(n,o)},e.drawPolygon=function(e,t,i){return s(e.renderer.drawPolygon(t),i)},e.drawPolyline=function(e,t,i){return s(e.renderer.drawPolyline(t),i)},e.drawRectangle=We,e.drawStar=function(e,t,i,o,n){return t.d="M "+(o.x+i.width/3)+" "+(o.y+i.height/2)+" L "+(o.x-i.width/2)+" "+(o.y-i.height/6)+" L "+(o.x+i.width/2)+" "+(o.y-i.height/6)+" L "+(o.x-i.width/3)+" "+(o.y+i.height/2)+" L "+o.x+" "+(o.y-i.height/2)+" L "+(o.x+i.width/3)+" "+(o.y+i.height/2)+" Z",s(e.renderer.drawPath(t),n)},e.drawSymbol=Ct,e.drawSymbols=Te,e.drawTriangle=function(e,t,i,o,n){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+(o.x+i.width/2)+" "+(o.y+i.height/2)+" L "+(o.x-i.width/2)+" "+(o.y+i.height/2)+" Z",s(e.renderer.drawPath(t),n)},e.drawVerticalLine=function(e,t,i,o,n){return t.d="M "+o.x+" "+(o.y-i.height/2)+" L "+o.x+" "+(o.y+i.height/2),s(e.renderer.drawPath(t),n)},e.elementAnimate=ft,e.filter=Qe,e.findMidPointOfPolygon=$e,e.findPosition=it,e.fixInitialScaleForTile=lt,e.formatValue=Le,e.getClientElement=function(e){return e=document.getElementById(e),Y.isNullOrUndefined(e)?null:e.getClientRects()[0]},e.getDistance=It,e.getElement=F,e.getElementByID=N,e.getElementOffset=Mt,e.getElementsByClassName=mt,e.getFieldData=function(e,t){for(var i=[],o=0,n=e;o<n.length;o++){for(var a=n[o],l={},r=0,s=t;r<s.length;r++){var d=s[r];a[d]&&(l[d]=a[d])}i.push(l)}return i},e.getHexColor=Ot,e.getMousePosition=U,e.getProcessedMarginValue=rt,e.getRatioOfBubble=Ke,e.getShapeData=pt,e.getTargetElement=ct,e.getTemplateFunction=dt,e.getTouchCenter=Nt,e.getTouches=kt,e.getTranslate=nt,e.getValueFromObject=k,e.getZoomTranslate=at,e.isCustomPath=et,e.itemHighlight=tn,e.itemSelection=en,e.layerRendering=Uo,e.legendRendering=Ko,e.load="load",e.loaded="loaded",e.maintainSelection=Re,e.maintainStyleClass=Ge,e.maintainToggleSelection=Ve,e.marker=Ze,e.markerBoundsComparer=Ae,e.markerClick=Ro,e.markerClusterClick=Go,e.markerClusterListHandler=Be,e.markerClusterMouseMove=Wo,e.markerClusterRendering=Do,e.markerColorChoose=Ie,e.markerDragEnd="markerDragEnd",e.markerDragStart=Vo,e.markerMouseMove=Ho,e.markerRendering=Zo,e.markerShapeChoose=ke,e.markerTemplate=De,e.measureText=W,e.measureTextElement=le,e.mergeSeparateCluster=Ue,e.mousedown="mousedown",e.mousemove="mousemove",e.mouseup="mouseup",e.onclick=ko,e.pan=nn,e.panComplete="panComplete",e.processResult=Dt,e.querySelector=C,e.radiansToDegrees=Z,e.removeClass=x,e.removeElement=P,e.renderLegendShape=_t,e.renderTextElement=_e,e.resize=Eo,e.rightClick=No,e.roundTo=q,e.shapeHighlight=Ao,e.shapeRendering=jo,e.shapeSelected=Bo,e.showTooltip=St,e.sinci=$,e.smoothTranslate=Ut,e.stringToNumber=w,e.sum=Ft,e.targetTouches=wt,e.textTrim=tt,e.timeout=bt,e.tooltipRender=zo,e.triggerDownload=ie,e.triggerItemSelectionEvent=yt,e.triggerShapeEvent=ht,e.wordWrap=vt,e.xToCoordinate=V,e.yToCoordinate=G,e.zoomAnimate=Et,e.zoomComplete="zoomComplete",e.zoomIn="zoomIn",e.zoomOut="zoomOut",Object.defineProperty(e,"__esModule",{value:!0})});
|
|
11
11
|
//# sourceMappingURL=ej2-maps.umd.min.js.map
|